@rjsf/core 6.0.0-alpha.0 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.umd.js +1680 -809
- package/dist/index.esm.js +2166 -1198
- package/dist/index.esm.js.map +4 -4
- package/dist/index.js +2221 -1299
- package/dist/index.js.map +4 -4
- package/lib/components/Form.d.ts +22 -9
- package/lib/components/Form.d.ts.map +1 -0
- package/lib/components/Form.js +368 -312
- package/lib/components/RichDescription.d.ts +20 -0
- package/lib/components/RichDescription.d.ts.map +1 -0
- package/lib/components/RichDescription.js +17 -0
- package/lib/components/fields/ArrayField.d.ts +20 -9
- package/lib/components/fields/ArrayField.d.ts.map +1 -0
- package/lib/components/fields/ArrayField.js +212 -206
- package/lib/components/fields/BooleanField.d.ts +1 -0
- package/lib/components/fields/BooleanField.d.ts.map +1 -0
- package/lib/components/fields/BooleanField.js +6 -14
- package/lib/components/fields/LayoutGridField.d.ts +480 -0
- package/lib/components/fields/LayoutGridField.d.ts.map +1 -0
- package/lib/components/fields/LayoutGridField.js +711 -0
- package/lib/components/fields/LayoutHeaderField.d.ts +12 -0
- package/lib/components/fields/LayoutHeaderField.d.ts.map +1 -0
- package/lib/components/fields/LayoutHeaderField.js +23 -0
- package/lib/components/fields/LayoutMultiSchemaField.d.ts +28 -0
- package/lib/components/fields/LayoutMultiSchemaField.d.ts.map +1 -0
- package/lib/components/fields/LayoutMultiSchemaField.js +114 -0
- package/lib/components/fields/MultiSchemaField.d.ts +1 -0
- package/lib/components/fields/MultiSchemaField.d.ts.map +1 -0
- package/lib/components/fields/MultiSchemaField.js +31 -31
- package/lib/components/fields/NullField.d.ts +1 -0
- package/lib/components/fields/NullField.d.ts.map +1 -0
- package/lib/components/fields/NullField.js +0 -1
- package/lib/components/fields/NumberField.d.ts +1 -0
- package/lib/components/fields/NumberField.d.ts.map +1 -0
- package/lib/components/fields/NumberField.js +2 -3
- package/lib/components/fields/ObjectField.d.ts +1 -0
- package/lib/components/fields/ObjectField.d.ts.map +1 -0
- package/lib/components/fields/ObjectField.js +146 -141
- package/lib/components/fields/SchemaField.d.ts +1 -0
- package/lib/components/fields/SchemaField.d.ts.map +1 -0
- package/lib/components/fields/SchemaField.js +10 -20
- package/lib/components/fields/StringField.d.ts +1 -0
- package/lib/components/fields/StringField.d.ts.map +1 -0
- package/lib/components/fields/StringField.js +1 -3
- package/lib/components/fields/index.d.ts +1 -0
- package/lib/components/fields/index.d.ts.map +1 -0
- package/lib/components/fields/index.js +14 -9
- package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts +1 -0
- package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts.map +1 -0
- package/lib/components/templates/ArrayFieldDescriptionTemplate.js +0 -1
- package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts +8 -0
- package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts.map +1 -0
- package/lib/components/templates/ArrayFieldItemButtonsTemplate.js +17 -0
- package/lib/components/templates/ArrayFieldItemTemplate.d.ts +4 -3
- package/lib/components/templates/ArrayFieldItemTemplate.d.ts.map +1 -0
- package/lib/components/templates/ArrayFieldItemTemplate.js +7 -6
- package/lib/components/templates/ArrayFieldTemplate.d.ts +2 -1
- package/lib/components/templates/ArrayFieldTemplate.d.ts.map +1 -0
- package/lib/components/templates/ArrayFieldTemplate.js +3 -4
- package/lib/components/templates/ArrayFieldTitleTemplate.d.ts +1 -0
- package/lib/components/templates/ArrayFieldTitleTemplate.d.ts.map +1 -0
- package/lib/components/templates/ArrayFieldTitleTemplate.js +0 -1
- package/lib/components/templates/BaseInputTemplate.d.ts +1 -0
- package/lib/components/templates/BaseInputTemplate.d.ts.map +1 -0
- package/lib/components/templates/BaseInputTemplate.js +0 -1
- package/lib/components/templates/ButtonTemplates/AddButton.d.ts +1 -0
- package/lib/components/templates/ButtonTemplates/AddButton.d.ts.map +1 -0
- package/lib/components/templates/ButtonTemplates/AddButton.js +1 -2
- package/lib/components/templates/ButtonTemplates/IconButton.d.ts +1 -0
- package/lib/components/templates/ButtonTemplates/IconButton.d.ts.map +1 -0
- package/lib/components/templates/ButtonTemplates/IconButton.js +4 -5
- package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts +1 -0
- package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts.map +1 -0
- package/lib/components/templates/ButtonTemplates/SubmitButton.js +0 -1
- package/lib/components/templates/ButtonTemplates/index.d.ts +1 -0
- package/lib/components/templates/ButtonTemplates/index.d.ts.map +1 -0
- package/lib/components/templates/ButtonTemplates/index.js +3 -4
- package/lib/components/templates/DescriptionField.d.ts +1 -0
- package/lib/components/templates/DescriptionField.d.ts.map +1 -0
- package/lib/components/templates/DescriptionField.js +3 -8
- package/lib/components/templates/ErrorList.d.ts +1 -0
- package/lib/components/templates/ErrorList.d.ts.map +1 -0
- package/lib/components/templates/ErrorList.js +0 -1
- package/lib/components/templates/FieldErrorTemplate.d.ts +1 -0
- package/lib/components/templates/FieldErrorTemplate.d.ts.map +1 -0
- package/lib/components/templates/FieldErrorTemplate.js +0 -1
- package/lib/components/templates/FieldHelpTemplate.d.ts +1 -0
- package/lib/components/templates/FieldHelpTemplate.d.ts.map +1 -0
- package/lib/components/templates/FieldHelpTemplate.js +0 -1
- package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts +1 -0
- package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts.map +1 -0
- package/lib/components/templates/FieldTemplate/FieldTemplate.js +1 -2
- package/lib/components/templates/FieldTemplate/Label.d.ts +1 -0
- package/lib/components/templates/FieldTemplate/Label.d.ts.map +1 -0
- package/lib/components/templates/FieldTemplate/Label.js +0 -1
- package/lib/components/templates/FieldTemplate/index.d.ts +2 -1
- package/lib/components/templates/FieldTemplate/index.d.ts.map +1 -0
- package/lib/components/templates/FieldTemplate/index.js +1 -2
- package/lib/components/templates/GridTemplate.d.ts +8 -0
- package/lib/components/templates/GridTemplate.d.ts.map +1 -0
- package/lib/components/templates/GridTemplate.js +10 -0
- package/lib/components/templates/ObjectFieldTemplate.d.ts +1 -0
- package/lib/components/templates/ObjectFieldTemplate.d.ts.map +1 -0
- package/lib/components/templates/ObjectFieldTemplate.js +2 -3
- package/lib/components/templates/TitleField.d.ts +1 -0
- package/lib/components/templates/TitleField.d.ts.map +1 -0
- package/lib/components/templates/TitleField.js +0 -1
- package/lib/components/templates/UnsupportedField.d.ts +1 -0
- package/lib/components/templates/UnsupportedField.d.ts.map +1 -0
- package/lib/components/templates/UnsupportedField.js +0 -1
- package/lib/components/templates/WrapIfAdditionalTemplate.d.ts +1 -0
- package/lib/components/templates/WrapIfAdditionalTemplate.d.ts.map +1 -0
- package/lib/components/templates/WrapIfAdditionalTemplate.js +10 -6
- package/lib/components/templates/index.d.ts +1 -0
- package/lib/components/templates/index.d.ts.map +1 -0
- package/lib/components/templates/index.js +19 -16
- package/lib/components/widgets/AltDateTimeWidget.d.ts +1 -0
- package/lib/components/widgets/AltDateTimeWidget.d.ts.map +1 -0
- package/lib/components/widgets/AltDateTimeWidget.js +0 -1
- package/lib/components/widgets/AltDateWidget.d.ts +1 -0
- package/lib/components/widgets/AltDateWidget.d.ts.map +1 -0
- package/lib/components/widgets/AltDateWidget.js +0 -1
- package/lib/components/widgets/CheckboxWidget.d.ts +1 -0
- package/lib/components/widgets/CheckboxWidget.d.ts.map +1 -0
- package/lib/components/widgets/CheckboxWidget.js +2 -4
- package/lib/components/widgets/CheckboxesWidget.d.ts +1 -0
- package/lib/components/widgets/CheckboxesWidget.d.ts.map +1 -0
- package/lib/components/widgets/CheckboxesWidget.js +0 -1
- package/lib/components/widgets/ColorWidget.d.ts +1 -0
- package/lib/components/widgets/ColorWidget.d.ts.map +1 -0
- package/lib/components/widgets/ColorWidget.js +0 -1
- package/lib/components/widgets/DateTimeWidget.d.ts +1 -0
- package/lib/components/widgets/DateTimeWidget.d.ts.map +1 -0
- package/lib/components/widgets/DateTimeWidget.js +0 -1
- package/lib/components/widgets/DateWidget.d.ts +1 -0
- package/lib/components/widgets/DateWidget.d.ts.map +1 -0
- package/lib/components/widgets/DateWidget.js +0 -1
- package/lib/components/widgets/EmailWidget.d.ts +1 -0
- package/lib/components/widgets/EmailWidget.d.ts.map +1 -0
- package/lib/components/widgets/EmailWidget.js +0 -1
- package/lib/components/widgets/FileWidget.d.ts +1 -0
- package/lib/components/widgets/FileWidget.d.ts.map +1 -0
- package/lib/components/widgets/FileWidget.js +3 -5
- package/lib/components/widgets/HiddenWidget.d.ts +1 -0
- package/lib/components/widgets/HiddenWidget.d.ts.map +1 -0
- package/lib/components/widgets/HiddenWidget.js +0 -1
- package/lib/components/widgets/PasswordWidget.d.ts +1 -0
- package/lib/components/widgets/PasswordWidget.d.ts.map +1 -0
- package/lib/components/widgets/PasswordWidget.js +0 -1
- package/lib/components/widgets/RadioWidget.d.ts +1 -0
- package/lib/components/widgets/RadioWidget.d.ts.map +1 -0
- package/lib/components/widgets/RadioWidget.js +3 -4
- package/lib/components/widgets/RangeWidget.d.ts +1 -0
- package/lib/components/widgets/RangeWidget.d.ts.map +1 -0
- package/lib/components/widgets/RangeWidget.js +0 -1
- package/lib/components/widgets/RatingWidget.d.ts +15 -0
- package/lib/components/widgets/RatingWidget.d.ts.map +1 -0
- package/lib/components/widgets/RatingWidget.js +63 -0
- package/lib/components/widgets/SelectWidget.d.ts +1 -0
- package/lib/components/widgets/SelectWidget.d.ts.map +1 -0
- package/lib/components/widgets/SelectWidget.js +4 -5
- package/lib/components/widgets/TextWidget.d.ts +1 -0
- package/lib/components/widgets/TextWidget.d.ts.map +1 -0
- package/lib/components/widgets/TextWidget.js +0 -1
- package/lib/components/widgets/TextareaWidget.d.ts +1 -0
- package/lib/components/widgets/TextareaWidget.d.ts.map +1 -0
- package/lib/components/widgets/TextareaWidget.js +0 -1
- package/lib/components/widgets/TimeWidget.d.ts +1 -0
- package/lib/components/widgets/TimeWidget.d.ts.map +1 -0
- package/lib/components/widgets/TimeWidget.js +0 -1
- package/lib/components/widgets/URLWidget.d.ts +1 -0
- package/lib/components/widgets/URLWidget.d.ts.map +1 -0
- package/lib/components/widgets/URLWidget.js +0 -1
- package/lib/components/widgets/UpDownWidget.d.ts +1 -0
- package/lib/components/widgets/UpDownWidget.d.ts.map +1 -0
- package/lib/components/widgets/UpDownWidget.js +0 -1
- package/lib/components/widgets/index.d.ts +1 -0
- package/lib/components/widgets/index.d.ts.map +1 -0
- package/lib/components/widgets/index.js +21 -20
- package/lib/getDefaultRegistry.d.ts +1 -0
- package/lib/getDefaultRegistry.d.ts.map +1 -0
- package/lib/getDefaultRegistry.js +3 -4
- package/lib/index.d.ts +7 -5
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5 -5
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/withTheme.d.ts +2 -1
- package/lib/withTheme.d.ts.map +1 -0
- package/lib/withTheme.js +7 -8
- package/package.json +46 -37
- package/src/components/Form.tsx +127 -41
- package/src/components/RichDescription.tsx +50 -0
- package/src/components/fields/ArrayField.tsx +34 -24
- package/src/components/fields/BooleanField.tsx +6 -14
- package/src/components/fields/LayoutGridField.tsx +967 -0
- package/src/components/fields/LayoutHeaderField.tsx +49 -0
- package/src/components/fields/LayoutMultiSchemaField.tsx +228 -0
- package/src/components/fields/MultiSchemaField.tsx +9 -4
- package/src/components/fields/NullField.tsx +1 -1
- package/src/components/fields/NumberField.tsx +5 -5
- package/src/components/fields/ObjectField.tsx +32 -24
- package/src/components/fields/SchemaField.tsx +17 -30
- package/src/components/fields/StringField.tsx +2 -2
- package/src/components/fields/index.ts +7 -1
- package/src/components/templates/ArrayFieldDescriptionTemplate.tsx +2 -2
- package/src/components/templates/ArrayFieldItemButtonsTemplate.tsx +85 -0
- package/src/components/templates/ArrayFieldItemTemplate.tsx +18 -57
- package/src/components/templates/ArrayFieldTemplate.tsx +10 -8
- package/src/components/templates/ArrayFieldTitleTemplate.tsx +2 -2
- package/src/components/templates/BaseInputTemplate.tsx +4 -4
- package/src/components/templates/ButtonTemplates/IconButton.tsx +9 -36
- package/src/components/templates/ButtonTemplates/SubmitButton.tsx +1 -1
- package/src/components/templates/ButtonTemplates/index.ts +1 -1
- package/src/components/templates/DescriptionField.tsx +9 -15
- package/src/components/templates/FieldErrorTemplate.tsx +1 -1
- package/src/components/templates/FieldHelpTemplate.tsx +1 -1
- package/src/components/templates/FieldTemplate/FieldTemplate.tsx +2 -2
- package/src/components/templates/GridTemplate.tsx +15 -0
- package/src/components/templates/ObjectFieldTemplate.tsx +5 -3
- package/src/components/templates/TitleField.tsx +1 -1
- package/src/components/templates/UnsupportedField.tsx +1 -1
- package/src/components/templates/WrapIfAdditionalTemplate.tsx +14 -4
- package/src/components/templates/index.ts +4 -0
- package/src/components/widgets/AltDateWidget.tsx +9 -6
- package/src/components/widgets/CheckboxWidget.tsx +5 -5
- package/src/components/widgets/CheckboxesWidget.tsx +2 -2
- package/src/components/widgets/ColorWidget.tsx +1 -1
- package/src/components/widgets/DateTimeWidget.tsx +1 -1
- package/src/components/widgets/DateWidget.tsx +1 -1
- package/src/components/widgets/EmailWidget.tsx +1 -1
- package/src/components/widgets/FileWidget.tsx +5 -5
- package/src/components/widgets/PasswordWidget.tsx +1 -1
- package/src/components/widgets/RadioWidget.tsx +3 -3
- package/src/components/widgets/RangeWidget.tsx +1 -1
- package/src/components/widgets/RatingWidget.tsx +129 -0
- package/src/components/widgets/SelectWidget.tsx +4 -3
- package/src/components/widgets/TextWidget.tsx +1 -1
- package/src/components/widgets/TextareaWidget.tsx +3 -3
- package/src/components/widgets/TimeWidget.tsx +1 -1
- package/src/components/widgets/URLWidget.tsx +1 -1
- package/src/components/widgets/UpDownWidget.tsx +1 -1
- package/src/components/widgets/index.ts +3 -1
- package/src/getDefaultRegistry.ts +1 -1
- package/src/index.ts +3 -2
- package/src/tsconfig.json +14 -6
- package/src/withTheme.tsx +4 -3
- package/LICENSE.md +0 -201
- package/lib/components/Form.js.map +0 -1
- package/lib/components/fields/ArrayField.js.map +0 -1
- package/lib/components/fields/BooleanField.js.map +0 -1
- package/lib/components/fields/MultiSchemaField.js.map +0 -1
- package/lib/components/fields/NullField.js.map +0 -1
- package/lib/components/fields/NumberField.js.map +0 -1
- package/lib/components/fields/ObjectField.js.map +0 -1
- package/lib/components/fields/SchemaField.js.map +0 -1
- package/lib/components/fields/StringField.js.map +0 -1
- package/lib/components/fields/index.js.map +0 -1
- package/lib/components/templates/ArrayFieldDescriptionTemplate.js.map +0 -1
- package/lib/components/templates/ArrayFieldItemTemplate.js.map +0 -1
- package/lib/components/templates/ArrayFieldTemplate.js.map +0 -1
- package/lib/components/templates/ArrayFieldTitleTemplate.js.map +0 -1
- package/lib/components/templates/BaseInputTemplate.js.map +0 -1
- package/lib/components/templates/ButtonTemplates/AddButton.js.map +0 -1
- package/lib/components/templates/ButtonTemplates/IconButton.js.map +0 -1
- package/lib/components/templates/ButtonTemplates/SubmitButton.js.map +0 -1
- package/lib/components/templates/ButtonTemplates/index.js.map +0 -1
- package/lib/components/templates/DescriptionField.js.map +0 -1
- package/lib/components/templates/ErrorList.js.map +0 -1
- package/lib/components/templates/FieldErrorTemplate.js.map +0 -1
- package/lib/components/templates/FieldHelpTemplate.js.map +0 -1
- package/lib/components/templates/FieldTemplate/FieldTemplate.js.map +0 -1
- package/lib/components/templates/FieldTemplate/Label.js.map +0 -1
- package/lib/components/templates/FieldTemplate/index.js.map +0 -1
- package/lib/components/templates/ObjectFieldTemplate.js.map +0 -1
- package/lib/components/templates/TitleField.js.map +0 -1
- package/lib/components/templates/UnsupportedField.js.map +0 -1
- package/lib/components/templates/WrapIfAdditionalTemplate.js.map +0 -1
- package/lib/components/templates/index.js.map +0 -1
- package/lib/components/widgets/AltDateTimeWidget.js.map +0 -1
- package/lib/components/widgets/AltDateWidget.js.map +0 -1
- package/lib/components/widgets/CheckboxWidget.js.map +0 -1
- package/lib/components/widgets/CheckboxesWidget.js.map +0 -1
- package/lib/components/widgets/ColorWidget.js.map +0 -1
- package/lib/components/widgets/DateTimeWidget.js.map +0 -1
- package/lib/components/widgets/DateWidget.js.map +0 -1
- package/lib/components/widgets/EmailWidget.js.map +0 -1
- package/lib/components/widgets/FileWidget.js.map +0 -1
- package/lib/components/widgets/HiddenWidget.js.map +0 -1
- package/lib/components/widgets/PasswordWidget.js.map +0 -1
- package/lib/components/widgets/RadioWidget.js.map +0 -1
- package/lib/components/widgets/RangeWidget.js.map +0 -1
- package/lib/components/widgets/SelectWidget.js.map +0 -1
- package/lib/components/widgets/TextWidget.js.map +0 -1
- package/lib/components/widgets/TextareaWidget.js.map +0 -1
- package/lib/components/widgets/TimeWidget.js.map +0 -1
- package/lib/components/widgets/URLWidget.js.map +0 -1
- package/lib/components/widgets/UpDownWidget.js.map +0 -1
- package/lib/components/widgets/index.js.map +0 -1
- package/lib/getDefaultRegistry.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/withTheme.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
2
|
+
import { getTemplate, getUiOptions, buttonId, } from '@rjsf/utils';
|
|
3
3
|
/** The `ArrayFieldTemplate` component is the template used to render all items in an array.
|
|
4
4
|
*
|
|
5
|
-
* @param props - The `
|
|
5
|
+
* @param props - The `ArrayFieldItemTemplateType` props for the component
|
|
6
6
|
*/
|
|
7
7
|
export default function ArrayFieldTemplate(props) {
|
|
8
8
|
const { canAdd, className, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title, } = props;
|
|
@@ -13,6 +13,5 @@ export default function ArrayFieldTemplate(props) {
|
|
|
13
13
|
// Button templates are not overridden in the uiSchema
|
|
14
14
|
const { ButtonTemplates: { AddButton }, } = registry.templates;
|
|
15
15
|
return (_jsxs("fieldset", { className: className, id: idSchema.$id, children: [_jsx(ArrayFieldTitleTemplate, { idSchema: idSchema, title: uiOptions.title || title, required: required, schema: schema, uiSchema: uiSchema, registry: registry }), _jsx(ArrayFieldDescriptionTemplate, { idSchema: idSchema, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), _jsx("div", { className: 'row array-item-list', children: items &&
|
|
16
|
-
items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key))) }), canAdd && (_jsx(AddButton, { className: 'array-item-add', onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
|
|
16
|
+
items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key))) }), canAdd && (_jsx(AddButton, { id: buttonId(idSchema, 'add'), className: 'rjsf-array-item-add', onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=ArrayFieldTemplate.js.map
|
|
@@ -5,3 +5,4 @@ import { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } f
|
|
|
5
5
|
* @param props - The `ArrayFieldTitleProps` for the component
|
|
6
6
|
*/
|
|
7
7
|
export default function ArrayFieldTitleTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTitleProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=ArrayFieldTitleTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayFieldTitleTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAsBrC"}
|
|
@@ -15,4 +15,3 @@ export default function ArrayFieldTitleTemplate(props) {
|
|
|
15
15
|
const TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, options);
|
|
16
16
|
return (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry }));
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=ArrayFieldTitleTemplate.js.map
|
|
@@ -6,3 +6,4 @@ import { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema }
|
|
|
6
6
|
* @param props - The `WidgetProps` for this template
|
|
7
7
|
*/
|
|
8
8
|
export default function BaseInputTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=BaseInputTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseInputTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/BaseInputTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,sBAAsB,EAGtB,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAmFvC"}
|
|
@@ -2,3 +2,4 @@ import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '
|
|
|
2
2
|
/** The `AddButton` renders a button that represent the `Add` action on a form
|
|
3
3
|
*/
|
|
4
4
|
export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ className, onClick, disabled, registry, }: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=AddButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/AddButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AAIjH;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACnH,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAiB1B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
-
import IconButton from './IconButton';
|
|
3
|
+
import IconButton from './IconButton.js';
|
|
4
4
|
/** The `AddButton` renders a button that represent the `Add` action on a form
|
|
5
5
|
*/
|
|
6
6
|
export default function AddButton({ className, onClick, disabled, registry, }) {
|
|
7
7
|
const { translateString } = registry;
|
|
8
8
|
return (_jsx("div", { className: 'row', children: _jsx("p", { className: `col-xs-3 col-xs-offset-9 text-right ${className}`, children: _jsx(IconButton, { iconType: 'info', icon: 'plus', className: 'btn-add col-xs-12', title: translateString(TranslatableString.AddButton), onClick: onClick, disabled: disabled, registry: registry }) }) }));
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=AddButton.js.map
|
|
@@ -4,3 +4,4 @@ export declare function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSch
|
|
|
4
4
|
export declare function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AAEjH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAClH,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAQhC;AAED,wBAAgB,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC1G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAMhC;AAED,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC9G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAMhC;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC5G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAMhC;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC5G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAQhC"}
|
|
@@ -6,18 +6,17 @@ export default function IconButton(props) {
|
|
|
6
6
|
}
|
|
7
7
|
export function CopyButton(props) {
|
|
8
8
|
const { registry: { translateString }, } = props;
|
|
9
|
-
return
|
|
9
|
+
return _jsx(IconButton, { title: translateString(TranslatableString.CopyButton), ...props, icon: 'copy' });
|
|
10
10
|
}
|
|
11
11
|
export function MoveDownButton(props) {
|
|
12
12
|
const { registry: { translateString }, } = props;
|
|
13
|
-
return
|
|
13
|
+
return _jsx(IconButton, { title: translateString(TranslatableString.MoveDownButton), ...props, icon: 'arrow-down' });
|
|
14
14
|
}
|
|
15
15
|
export function MoveUpButton(props) {
|
|
16
16
|
const { registry: { translateString }, } = props;
|
|
17
|
-
return
|
|
17
|
+
return _jsx(IconButton, { title: translateString(TranslatableString.MoveUpButton), ...props, icon: 'arrow-up' });
|
|
18
18
|
}
|
|
19
19
|
export function RemoveButton(props) {
|
|
20
20
|
const { registry: { translateString }, } = props;
|
|
21
|
-
return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton),
|
|
21
|
+
return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), ...props, iconType: 'danger', icon: 'remove' }));
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=IconButton.js.map
|
|
@@ -2,3 +2,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from
|
|
|
2
2
|
/** The `SubmitButton` renders a button that represent the `Submit` action on a form
|
|
3
3
|
*/
|
|
4
4
|
export default function SubmitButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ uiSchema }: SubmitButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
//# sourceMappingURL=SubmitButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEvH;GACG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAYzC"}
|
|
@@ -9,4 +9,3 @@ export default function SubmitButton({ uiSchema }) {
|
|
|
9
9
|
}
|
|
10
10
|
return (_jsx("div", { children: _jsx("button", { type: 'submit', ...submitButtonProps, className: `btn btn-info ${submitButtonProps.className || ''}`, children: submitText }) }));
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=SubmitButton.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
|
|
2
2
|
declare function buttonTemplates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<T, S, F>['ButtonTemplates'];
|
|
3
3
|
export default buttonTemplates;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM3F,iBAAS,eAAe,CACtB,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAS7C;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import SubmitButton from './SubmitButton';
|
|
2
|
-
import AddButton from './AddButton';
|
|
3
|
-
import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton';
|
|
1
|
+
import SubmitButton from './SubmitButton.js';
|
|
2
|
+
import AddButton from './AddButton.js';
|
|
3
|
+
import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton.js';
|
|
4
4
|
function buttonTemplates() {
|
|
5
5
|
return {
|
|
6
6
|
SubmitButton,
|
|
@@ -12,4 +12,3 @@ function buttonTemplates() {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
export default buttonTemplates;
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -4,3 +4,4 @@ import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema }
|
|
|
4
4
|
* @param props - The `DescriptionFieldProps` for this component
|
|
5
5
|
*/
|
|
6
6
|
export default function DescriptionField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: DescriptionFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=DescriptionField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionField.d.ts","sourceRoot":"","sources":["../../../src/components/templates/DescriptionField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAInG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAUtC"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import RichDescription from '../RichDescription.js';
|
|
2
3
|
/** The `DescriptionField` is the template to use to render the description of a field
|
|
3
4
|
*
|
|
4
5
|
* @param props - The `DescriptionFieldProps` for this component
|
|
5
6
|
*/
|
|
6
7
|
export default function DescriptionField(props) {
|
|
7
|
-
const { id, description } = props;
|
|
8
|
+
const { id, description, registry, uiSchema } = props;
|
|
8
9
|
if (!description) {
|
|
9
10
|
return null;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
return (_jsx("p", { id: id, className: 'field-description', children: description }));
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return (_jsx("div", { id: id, className: 'field-description', children: description }));
|
|
16
|
-
}
|
|
12
|
+
return (_jsx("div", { id: id, className: 'field-description', children: _jsx(RichDescription, { description: description, registry: registry, uiSchema: uiSchema }) }));
|
|
17
13
|
}
|
|
18
|
-
//# sourceMappingURL=DescriptionField.js.map
|
|
@@ -4,3 +4,4 @@ import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@
|
|
|
4
4
|
* @param props - The `ErrorListProps` for this component
|
|
5
5
|
*/
|
|
6
6
|
export default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ errors, registry, }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ErrorList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorList.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ErrorList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EAEf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACnH,MAAM,EACN,QAAQ,GACT,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAkBzB"}
|
|
@@ -4,3 +4,4 @@ import { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '
|
|
|
4
4
|
* @param props - The `FieldErrorProps` for the errors being rendered
|
|
5
5
|
*/
|
|
6
6
|
export default function FieldErrorTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=FieldErrorTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldErrorTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/FieldErrorTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEtG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAsBhC"}
|
|
@@ -4,3 +4,4 @@ import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@
|
|
|
4
4
|
* @param props - The `FieldHelpProps` to be rendered
|
|
5
5
|
*/
|
|
6
6
|
export default function FieldHelpTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldHelpProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=FieldHelpTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldHelpTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/FieldHelpTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAkB/B"}
|
|
@@ -5,3 +5,4 @@ import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } fro
|
|
|
5
5
|
* @param props - The `FieldTemplateProps` for this component
|
|
6
6
|
*/
|
|
7
7
|
export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=FieldTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AAIrB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAoBnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
3
|
-
import Label from './Label';
|
|
3
|
+
import Label from './Label.js';
|
|
4
4
|
/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
|
|
5
5
|
* content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.
|
|
6
6
|
*
|
|
@@ -15,4 +15,3 @@ export default function FieldTemplate(props) {
|
|
|
15
15
|
}
|
|
16
16
|
return (_jsxs(WrapIfAdditionalTemplate, { ...props, children: [displayLabel && _jsx(Label, { label: label, required: required, id: id }), displayLabel && description ? description : null, children, errors, help] }));
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=FieldTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/FieldTemplate/Label.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,kDAW9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/FieldTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GridTemplateProps } from '@rjsf/utils';
|
|
2
|
+
/** Renders a `GridTemplate` for bootstrap 3, which is expecting the column information coming in via the `className`
|
|
3
|
+
* prop. Also spreads all the other props provided by the user directly on the div.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The GridTemplateProps, including the expected className for the bootstrap 3 grid behavior
|
|
6
|
+
*/
|
|
7
|
+
export default function GridTemplate(props: GridTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=GridTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/GridTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAO5D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** Renders a `GridTemplate` for bootstrap 3, which is expecting the column information coming in via the `className`
|
|
3
|
+
* prop. Also spreads all the other props provided by the user directly on the div.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The GridTemplateProps, including the expected className for the bootstrap 3 grid behavior
|
|
6
|
+
*/
|
|
7
|
+
export default function GridTemplate(props) {
|
|
8
|
+
const { children, column, className, ...rest } = props;
|
|
9
|
+
return (_jsx("div", { className: className, ...rest, children: children }));
|
|
10
|
+
}
|
|
@@ -6,3 +6,4 @@ import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema
|
|
|
6
6
|
* @param props - The `ObjectFieldTemplateProps` for this component
|
|
7
7
|
*/
|
|
8
8
|
export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ObjectFieldTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ObjectFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAOjB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA4DzC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { canExpand, descriptionId, getTemplate, getUiOptions, titleId, } from '@rjsf/utils';
|
|
2
|
+
import { canExpand, descriptionId, getTemplate, getUiOptions, titleId, buttonId, } from '@rjsf/utils';
|
|
3
3
|
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
|
|
4
4
|
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
|
|
5
5
|
* the properties.
|
|
@@ -13,6 +13,5 @@ export default function ObjectFieldTemplate(props) {
|
|
|
13
13
|
const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options);
|
|
14
14
|
// Button templates are not overridden in the uiSchema
|
|
15
15
|
const { ButtonTemplates: { AddButton }, } = registry.templates;
|
|
16
|
-
return (_jsxs("fieldset", { id: idSchema.$id, children: [title && (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), properties.map((prop) => prop.content), canExpand(schema, uiSchema, formData) && (_jsx(AddButton, { className: 'object-property-expand', onClick: onAddClick(schema), disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
|
|
16
|
+
return (_jsxs("fieldset", { id: idSchema.$id, children: [title && (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), properties.map((prop) => prop.content), canExpand(schema, uiSchema, formData) && (_jsx(AddButton, { id: buttonId(idSchema, 'add'), className: 'rjsf-object-property-expand', onClick: onAddClick(schema), disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=ObjectFieldTemplate.js.map
|
|
@@ -4,3 +4,4 @@ import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '
|
|
|
4
4
|
* @param props - The `TitleFieldProps` for this component
|
|
5
5
|
*/
|
|
6
6
|
export default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: TitleFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=TitleField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleField.d.ts","sourceRoot":"","sources":["../../../src/components/templates/TitleField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI7F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAClH,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAShC"}
|
|
@@ -8,4 +8,3 @@ export default function TitleField(props) {
|
|
|
8
8
|
const { id, title, required } = props;
|
|
9
9
|
return (_jsxs("legend", { id: id, children: [title, required && _jsx("span", { className: 'required', children: REQUIRED_FIELD_SYMBOL })] }));
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=TitleField.js.map
|
|
@@ -6,3 +6,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, UnsupportedFieldProps }
|
|
|
6
6
|
*/
|
|
7
7
|
declare function UnsupportedField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: UnsupportedFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default UnsupportedField;
|
|
9
|
+
//# sourceMappingURL=UnsupportedField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsupportedField.d.ts","sourceRoot":"","sources":["../../../src/components/templates/UnsupportedField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAsB,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGvH;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACzG,KAAK,EAAE,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAyBtC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -25,4 +25,3 @@ function UnsupportedField(props) {
|
|
|
25
25
|
return (_jsxs("div", { className: 'unsupported-field', children: [_jsx("p", { children: _jsx(Markdown, { options: { disableParsingRawHTML: true }, children: translateString(translateEnum, translateParams) }) }), schema && _jsx("pre", { children: JSON.stringify(schema, null, 2) })] }));
|
|
26
26
|
}
|
|
27
27
|
export default UnsupportedField;
|
|
28
|
-
//# sourceMappingURL=UnsupportedField.js.map
|
|
@@ -5,3 +5,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WrapIfAdditionalTemplate
|
|
|
5
5
|
* @param props - The `WrapIfAdditionalProps` for this component
|
|
6
6
|
*/
|
|
7
7
|
export default function WrapIfAdditionalTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: WrapIfAdditionalTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=WrapIfAdditionalTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WrapIfAdditionalTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/WrapIfAdditionalTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,UAAU,EACV,gBAAgB,EAEhB,6BAA6B,EAC9B,MAAM,aAAa,CAAC;AAIrB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAoE9C"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ADDITIONAL_PROPERTY_FLAG, TranslatableString, } from '@rjsf/utils';
|
|
3
|
-
import Label from './FieldTemplate/Label';
|
|
2
|
+
import { ADDITIONAL_PROPERTY_FLAG, buttonId, TranslatableString, } from '@rjsf/utils';
|
|
3
|
+
import Label from './FieldTemplate/Label.js';
|
|
4
4
|
/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are
|
|
5
5
|
* part of an `additionalProperties` part of a schema.
|
|
6
6
|
*
|
|
7
7
|
* @param props - The `WrapIfAdditionalProps` for this component
|
|
8
8
|
*/
|
|
9
9
|
export default function WrapIfAdditionalTemplate(props) {
|
|
10
|
-
const { id, classNames, style, disabled, label, onKeyChange, onDropPropertyClick, readonly, required, schema, children, uiSchema, registry, } = props;
|
|
10
|
+
const { id, classNames, style, disabled, label, onKeyChange, onDropPropertyClick, readonly, required, schema, hideError, rawErrors, children, uiSchema, registry, } = props;
|
|
11
11
|
const { templates, translateString } = registry;
|
|
12
12
|
// Button templates are not overridden in the uiSchema
|
|
13
13
|
const { RemoveButton } = templates.ButtonTemplates;
|
|
14
14
|
const keyLabel = translateString(TranslatableString.KeyLabel, [label]);
|
|
15
15
|
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
16
|
+
const classNamesList = ['form-group', classNames];
|
|
17
|
+
if (!hideError && rawErrors && rawErrors.length > 0) {
|
|
18
|
+
classNamesList.push('has-error has-danger');
|
|
19
|
+
}
|
|
20
|
+
const uiClassNames = classNamesList.join(' ').trim();
|
|
16
21
|
if (!additional) {
|
|
17
|
-
return (_jsx("div", { className:
|
|
22
|
+
return (_jsx("div", { className: uiClassNames, style: style, children: children }));
|
|
18
23
|
}
|
|
19
|
-
return (_jsx("div", { className:
|
|
24
|
+
return (_jsx("div", { className: uiClassNames, style: style, children: _jsxs("div", { className: 'row', children: [_jsx("div", { className: 'col-xs-5 form-additional', children: _jsxs("div", { className: 'form-group', children: [_jsx(Label, { label: keyLabel, required: required, id: `${id}-key` }), _jsx("input", { className: 'form-control', type: 'text', id: `${id}-key`, onBlur: ({ target }) => onKeyChange(target && target.value), defaultValue: label })] }) }), _jsx("div", { className: 'form-additional form-group col-xs-5', children: children }), _jsx("div", { className: 'col-xs-2', children: _jsx(RemoveButton, { id: buttonId(id, 'remove'), className: 'rjsf-object-property-remove btn-block', style: { border: '0' }, disabled: disabled || readonly, onClick: onDropPropertyClick(label), uiSchema: uiSchema, registry: registry }) })] }) }));
|
|
20
25
|
}
|
|
21
|
-
//# sourceMappingURL=WrapIfAdditionalTemplate.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
|
|
2
2
|
declare function templates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<T, S, F>;
|
|
3
3
|
export default templates;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAoB3F,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,KAAK,aAAa,CACpH,CAAC,EACD,CAAC,EACD,CAAC,CACF,CAoBA;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate';
|
|
2
|
-
import ArrayFieldItemTemplate from './ArrayFieldItemTemplate';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
1
|
+
import ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate.js';
|
|
2
|
+
import ArrayFieldItemTemplate from './ArrayFieldItemTemplate.js';
|
|
3
|
+
import ArrayFieldItemButtonsTemplate from './ArrayFieldItemButtonsTemplate.js';
|
|
4
|
+
import ArrayFieldTemplate from './ArrayFieldTemplate.js';
|
|
5
|
+
import ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate.js';
|
|
6
|
+
import BaseInputTemplate from './BaseInputTemplate.js';
|
|
7
|
+
import ButtonTemplates from './ButtonTemplates/index.js';
|
|
8
|
+
import DescriptionField from './DescriptionField.js';
|
|
9
|
+
import ErrorList from './ErrorList.js';
|
|
10
|
+
import FieldTemplate from './FieldTemplate/index.js';
|
|
11
|
+
import FieldErrorTemplate from './FieldErrorTemplate.js';
|
|
12
|
+
import FieldHelpTemplate from './FieldHelpTemplate.js';
|
|
13
|
+
import GridTemplate from './GridTemplate.js';
|
|
14
|
+
import ObjectFieldTemplate from './ObjectFieldTemplate.js';
|
|
15
|
+
import TitleField from './TitleField.js';
|
|
16
|
+
import UnsupportedField from './UnsupportedField.js';
|
|
17
|
+
import WrapIfAdditionalTemplate from './WrapIfAdditionalTemplate.js';
|
|
16
18
|
function templates() {
|
|
17
19
|
return {
|
|
18
20
|
ArrayFieldDescriptionTemplate,
|
|
19
21
|
ArrayFieldItemTemplate,
|
|
22
|
+
ArrayFieldItemButtonsTemplate,
|
|
20
23
|
ArrayFieldTemplate,
|
|
21
24
|
ArrayFieldTitleTemplate,
|
|
22
25
|
ButtonTemplates: ButtonTemplates(),
|
|
@@ -26,6 +29,7 @@ function templates() {
|
|
|
26
29
|
FieldTemplate,
|
|
27
30
|
FieldErrorTemplate,
|
|
28
31
|
FieldHelpTemplate,
|
|
32
|
+
GridTemplate,
|
|
29
33
|
ObjectFieldTemplate,
|
|
30
34
|
TitleFieldTemplate: TitleField,
|
|
31
35
|
UnsupportedFieldTemplate: UnsupportedField,
|
|
@@ -33,4 +37,3 @@ function templates() {
|
|
|
33
37
|
};
|
|
34
38
|
}
|
|
35
39
|
export default templates;
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -6,3 +6,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjs
|
|
|
6
6
|
*/
|
|
7
7
|
declare function AltDateTimeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ time, ...props }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default AltDateTimeWidget;
|
|
9
|
+
//# sourceMappingURL=AltDateTimeWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AltDateTimeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/AltDateTimeWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzF;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EAC5G,IAAW,EACX,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAGtB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -4,3 +4,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjs
|
|
|
4
4
|
*/
|
|
5
5
|
declare function AltDateWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ time, disabled, readonly, autofocus, options, id, name, registry, onBlur, onFocus, onChange, value, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default AltDateWidget;
|
|
7
|
+
//# sourceMappingURL=AltDateWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AltDateWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/AltDateWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,eAAe,EACf,UAAU,EACV,gBAAgB,EAEhB,WAAW,EAEZ,MAAM,aAAa,CAAC;AAsDrB;;GAEG;AACH,iBAAS,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACxG,IAAY,EACZ,QAAgB,EAChB,QAAgB,EAChB,SAAiB,EACjB,OAAO,EACP,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAwFtB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -51,4 +51,3 @@ function AltDateWidget({ time = false, disabled = false, readonly = false, autof
|
|
|
51
51
|
return (_jsxs("ul", { className: 'list-inline', children: [getDateElementProps(state, time, options.yearsRange, options.format).map((elemProps, i) => (_jsx("li", { className: 'list-inline-item', children: _jsx(DateElement, { rootId: id, name: name, select: handleChange, ...elemProps, disabled: disabled, readonly: readonly, registry: registry, onBlur: onBlur, onFocus: onFocus, autofocus: autofocus && i === 0 }) }, i))), (options.hideNowButton !== 'undefined' ? !options.hideNowButton : true) && (_jsx("li", { className: 'list-inline-item', children: _jsx("a", { href: '#', className: 'btn btn-info btn-now', onClick: handleSetNow, children: translateString(TranslatableString.NowLabel) }) })), (options.hideClearButton !== 'undefined' ? !options.hideClearButton : true) && (_jsx("li", { className: 'list-inline-item', children: _jsx("a", { href: '#', className: 'btn btn-warning btn-clear', onClick: handleClear, children: translateString(TranslatableString.ClearLabel) }) }))] }));
|
|
52
52
|
}
|
|
53
53
|
export default AltDateWidget;
|
|
54
|
-
//# sourceMappingURL=AltDateWidget.js.map
|
|
@@ -6,3 +6,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjs
|
|
|
6
6
|
*/
|
|
7
7
|
declare function CheckboxWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ schema, uiSchema, options, id, value, disabled, readonly, label, hideLabel, autofocus, onBlur, onFocus, onChange, registry, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default CheckboxWidget;
|
|
9
|
+
//# sourceMappingURL=CheckboxWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/CheckboxWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,iBAAS,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACzG,MAAM,EACN,QAAQ,EACR,OAAO,EACP,EAAE,EACF,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAwDtB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -7,7 +7,6 @@ import { ariaDescribedByIds, descriptionId, getTemplate, labelValue, schemaRequi
|
|
|
7
7
|
* @param props - The `WidgetProps` for this component
|
|
8
8
|
*/
|
|
9
9
|
function CheckboxWidget({ schema, uiSchema, options, id, value, disabled, readonly, label, hideLabel, autofocus = false, onBlur, onFocus, onChange, registry, }) {
|
|
10
|
-
var _a;
|
|
11
10
|
const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options);
|
|
12
11
|
// Because an unchecked checkbox will cause html5 validation to fail, only add
|
|
13
12
|
// the "required" attribute if the field value must be "true", due to the
|
|
@@ -16,8 +15,7 @@ function CheckboxWidget({ schema, uiSchema, options, id, value, disabled, readon
|
|
|
16
15
|
const handleChange = useCallback((event) => onChange(event.target.checked), [onChange]);
|
|
17
16
|
const handleBlur = useCallback((event) => onBlur(id, event.target.checked), [onBlur, id]);
|
|
18
17
|
const handleFocus = useCallback((event) => onFocus(id, event.target.checked), [onFocus, id]);
|
|
19
|
-
const description =
|
|
20
|
-
return (_jsxs("div", { className: `checkbox ${disabled || readonly ? 'disabled' : ''}`, children: [!hideLabel &&
|
|
18
|
+
const description = options.description ?? schema.description;
|
|
19
|
+
return (_jsxs("div", { className: `checkbox ${disabled || readonly ? 'disabled' : ''}`, children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs("label", { children: [_jsx("input", { type: 'checkbox', id: id, name: id, checked: typeof value === 'undefined' ? false : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id) }), labelValue(_jsx("span", { children: label }), hideLabel)] })] }));
|
|
21
20
|
}
|
|
22
21
|
export default CheckboxWidget;
|
|
23
|
-
//# sourceMappingURL=CheckboxWidget.js.map
|
|
@@ -6,3 +6,4 @@ import { FormContextType, WidgetProps, RJSFSchema, StrictRJSFSchema } from '@rjs
|
|
|
6
6
|
*/
|
|
7
7
|
declare function CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, disabled, options: { inline, enumOptions, enumDisabled, emptyValue }, value, autofocus, readonly, onChange, onBlur, onFocus, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default CheckboxesWidget;
|
|
9
|
+
//# sourceMappingURL=CheckboxesWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxesWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/CheckboxesWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,eAAe,EACf,WAAW,EACX,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EAC3G,EAAE,EACF,QAAQ,EACR,OAAO,EAAE,EAAE,MAAc,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,EAClE,KAAK,EACL,SAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA4DtB;AAED,eAAe,gBAAgB,CAAC"}
|