generated from Exabyte-io/template-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
7,274 additions
and
3,375 deletions.
There are no files selected for viewing
10 changes: 6 additions & 4 deletions
10
dist/mui/components/custom/date-picker/DatePicker.styled.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export declare const DatePickerButtonsContainer: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
export declare const StyledPopover: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
export declare const StyledDatePicker: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
export declare const StyledDatePickerContainer: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
/// <reference types="react" /> | ||
import { Theme } from "@mui/material/styles"; | ||
export declare const DatePickerButtonsContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export declare const StyledPopover: import("@emotion/styled").StyledComponent<import("@mui/material/Popover").PopoverProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>; | ||
export declare const StyledDatePicker: import("@emotion/styled").StyledComponent<import("@mui/x-date-pickers/DatePicker").DatePickerProps<unknown> & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>; | ||
export declare const StyledDatePickerContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { FormProps } from "@rjsf/core"; | ||
import { RJSFSchema } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function RJSFForm(props: FormProps<any, RJSFSchema, any>): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Form from "@rjsf/mui"; | ||
import React from "react"; | ||
import ArrayFieldItemTemplate from "./templates/ArrayFieldItemTemplate"; | ||
import ArrayFieldTemplate from "./templates/ArrayFieldTemplate"; | ||
import BaseInputTemplate from "./templates/BaseInputTemplate"; | ||
import ObjectFieldTemplate from "./templates/ObjectFieldTemplate"; | ||
import TitleFieldTemplate from "./templates/TitleFieldTemplate"; | ||
import SelectWidget from "./widgets/SelectWidget"; | ||
export default function RJSFForm(props) { | ||
return (React.createElement(Form, { ...props, templates: { | ||
ObjectFieldTemplate, | ||
BaseInputTemplate, | ||
ArrayFieldTemplate, | ||
ArrayFieldItemTemplate, | ||
TitleFieldTemplate, | ||
}, widgets: { SelectWidget } })); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { ArrayFieldTemplateItemType, FormContextType, RJSFSchema, StrictRJSFSchema } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTemplateItemType<T, S, F>): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import Grid from "@mui/material/Grid"; | ||
import React from "react"; | ||
export default function ArrayFieldItemTemplate(props) { | ||
const { children, disabled, hasToolbar, hasCopy, hasMoveDown, hasMoveUp, hasRemove, index, onCopyIndexClick, onDropIndexClick, onReorderClick, readonly, uiSchema, registry, } = props; | ||
const { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } = registry.templates.ButtonTemplates; | ||
const btnStyle = { | ||
flex: 1, | ||
paddingLeft: 6, | ||
paddingRight: 6, | ||
fontWeight: "bold", | ||
minWidth: 0, | ||
}; | ||
return (React.createElement(Grid, { container: true, alignItems: "center", className: "ArrayFieldItemTemplate" }, | ||
React.createElement(Grid, { item: true, xs: true, style: { overflow: "visible" } }, children), | ||
hasToolbar && (React.createElement(Grid, { item: true }, | ||
(hasMoveUp || hasMoveDown) && (React.createElement(MoveUpButton, { style: btnStyle, disabled: disabled || readonly || !hasMoveUp, onClick: onReorderClick(index, index - 1), uiSchema: uiSchema, registry: registry })), | ||
(hasMoveUp || hasMoveDown) && (React.createElement(MoveDownButton, { style: btnStyle, disabled: disabled || readonly || !hasMoveDown, onClick: onReorderClick(index, index + 1), uiSchema: uiSchema, registry: registry })), | ||
hasCopy && (React.createElement(CopyButton, { style: btnStyle, disabled: disabled || readonly, onClick: onCopyIndexClick(index), uiSchema: uiSchema, registry: registry })), | ||
hasRemove && (React.createElement(RemoveButton, { style: btnStyle, disabled: disabled || readonly, onClick: onDropIndexClick(index), uiSchema: uiSchema, registry: registry })))))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function ArrayFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTemplateProps<T, S, F>): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import Box from "@mui/material/Box"; | ||
import Grid from "@mui/material/Grid"; | ||
import Stack from "@mui/material/Stack"; | ||
import { getTemplate, getUiOptions, } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function ArrayFieldTemplate(props) { | ||
const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title, } = props; | ||
const uiOptions = getUiOptions(uiSchema); | ||
const ArrayFieldDescriptionTemplate = getTemplate("ArrayFieldDescriptionTemplate", registry, uiOptions); | ||
const ArrayFieldItemTemplate = getTemplate("ArrayFieldItemTemplate", registry, uiOptions); | ||
const ArrayFieldTitleTemplate = getTemplate("ArrayFieldTitleTemplate", registry, uiOptions); | ||
// Button templates are not overridden in the uiSchema | ||
const { ButtonTemplates: { AddButton }, } = registry.templates; | ||
return (React.createElement(Stack, { spacing: 1, className: "ArrayFieldTemplate" }, | ||
React.createElement(ArrayFieldTitleTemplate, { idSchema: idSchema, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, required: required, registry: registry }), | ||
React.createElement(ArrayFieldDescriptionTemplate, { idSchema: idSchema, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), | ||
items && | ||
items.map(({ key, ...itemProps }) => (React.createElement(ArrayFieldItemTemplate, { key: key, ...itemProps }))), | ||
canAdd && (React.createElement(Grid, { container: true, justifyContent: "flex-end" }, | ||
React.createElement(Grid, { item: true }, | ||
React.createElement(Box, { mt: 2 }, | ||
React.createElement(AddButton, { className: "array-item-add", onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))))))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { BaseInputTemplateProps } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function BaseInputTemplate(props: BaseInputTemplateProps): React.JSX.Element | null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import { Templates } from "@rjsf/mui"; | ||
import React from "react"; | ||
export default function BaseInputTemplate(props) { | ||
if (Templates.BaseInputTemplate) { | ||
return React.createElement(Templates.BaseInputTemplate, { ...props, size: "small" }); | ||
} | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ObjectFieldTemplateProps<T, S, F>): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/* eslint-disable react/no-array-index-key */ | ||
import Box from "@mui/material/Box"; | ||
import Grid from "@mui/material/Grid"; | ||
import { canExpand, descriptionId, getTemplate, getUiOptions, titleId, } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function ObjectFieldTemplate(props) { | ||
const { description, title, properties, required, disabled, readonly, uiSchema, idSchema, schema, formData, onAddClick, registry, } = props; | ||
const uiOptions = getUiOptions(uiSchema); | ||
const TitleFieldTemplate = getTemplate("TitleFieldTemplate", registry, uiOptions); | ||
const DescriptionFieldTemplate = getTemplate("DescriptionFieldTemplate", registry, uiOptions); | ||
// Button templates are not overridden in the uiSchema | ||
const { ButtonTemplates: { AddButton }, } = registry.templates; | ||
return (React.createElement(Box, { className: "ObjectFieldTemplate" }, | ||
title && (React.createElement(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), | ||
description && (React.createElement(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), | ||
React.createElement(Grid, { container: true, spacing: 2, style: { marginTop: "10px" } }, | ||
properties.map((element, index) => | ||
// Remove the <Grid> if the inner element is hidden as the <Grid> | ||
// itself would otherwise still take up space. | ||
element.hidden ? (element.content) : (React.createElement(Grid, { item: true, xs: 12, sm: 4, | ||
// md={4} | ||
key: index, style: { marginBottom: "10px" } }, element.content))), | ||
canExpand(schema, uiSchema, formData) && (React.createElement(Grid, { container: true, justifyContent: "flex-end" }, | ||
React.createElement(Grid, { item: true }, | ||
React.createElement(AddButton, { className: "object-property-expand", onClick: onAddClick(schema), disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))))))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { FormContextType, RJSFSchema, StrictRJSFSchema, TitleFieldProps } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function TitleFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, title }: TitleFieldProps<T, S, F>): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import Typography from "@mui/material/Typography"; | ||
import React from "react"; | ||
export default function TitleFieldTemplate({ id, title }) { | ||
return (React.createElement(Typography, { id: id, variant: "caption", className: "TitleFieldTemplate" }, | ||
React.createElement("b", null, title))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
export declare const PositionInfoPopover: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
/// <reference types="react" /> | ||
export declare const PositionInfoPopover: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & { | ||
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined; | ||
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { BaseInputTemplateProps } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function SelectWidget(props: BaseInputTemplateProps): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import { Widgets } from "@rjsf/mui"; | ||
import React from "react"; | ||
export default function SelectWidget(props) { | ||
return React.createElement(Widgets.SelectWidget, { ...props, size: "small" }); | ||
} |
Oops, something went wrong.