@rjsf/chakra-ui 6.6.1 → 6.6.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/chakra-ui.esm.js +147 -189
- package/dist/chakra-ui.esm.js.map +3 -3
- package/dist/chakra-ui.umd.js +135 -133
- package/dist/index.cjs +237 -234
- package/dist/index.cjs.map +3 -3
- package/lib/AddButton/AddButton.d.ts +1 -1
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/AltDateTimeWidget/AltDateTimeWidget.d.ts +1 -1
- package/lib/AltDateWidget/AltDateWidget.d.ts +1 -1
- package/lib/AltDateWidget/AltDateWidget.js +1 -1
- package/lib/AltDateWidget/AltDateWidget.js.map +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js +5 -5
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/ChakraFrameProvider.js +1 -3
- package/lib/ChakraFrameProvider.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.d.ts +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js +4 -4
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js +4 -4
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.d.ts +1 -1
- package/lib/ErrorList/ErrorList.d.ts +1 -1
- package/lib/ErrorList/ErrorList.js.map +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +1 -3
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/FieldTemplate/FieldTemplate.d.ts +1 -1
- package/lib/FieldTemplate/FieldTemplate.js +1 -1
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
- package/lib/Form/Form.d.ts +3 -3
- package/lib/Form/Form.js.map +1 -1
- package/lib/GridTemplate/GridTemplate.d.ts +1 -1
- package/lib/IconButton/ChakraIconButton.d.ts +2 -2
- package/lib/IconButton/ChakraIconButton.js.map +1 -1
- package/lib/IconButton/IconButton.d.ts +13 -7
- package/lib/IconButton/IconButton.js +11 -5
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.d.ts +1 -1
- package/lib/NativeSelectWidget/NativeSelectWidget.d.ts +1 -1
- package/lib/NativeSelectWidget/NativeSelectWidget.js +13 -15
- package/lib/NativeSelectWidget/NativeSelectWidget.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +2 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.d.ts +1 -1
- package/lib/RadioWidget/RadioWidget.js +6 -6
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.d.ts +1 -1
- package/lib/RangeWidget/RangeWidget.js +5 -5
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.d.ts +1 -1
- package/lib/SelectWidget/SelectWidget.js +15 -17
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/SubmitButton/SubmitButton.d.ts +1 -1
- package/lib/SubmitButton/SubmitButton.js.map +1 -1
- package/lib/Templates/Templates.d.ts +1 -1
- package/lib/TextareaWidget/TextareaWidget.d.ts +1 -1
- package/lib/TextareaWidget/TextareaWidget.js +5 -5
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
- package/lib/Theme/Theme.d.ts +2 -2
- package/lib/TitleField/TitleField.d.ts +1 -1
- package/lib/UpDownWidget/UpDownWidget.d.ts +1 -1
- package/lib/UpDownWidget/UpDownWidget.js +5 -5
- package/lib/UpDownWidget/UpDownWidget.js.map +1 -1
- package/lib/Widgets/Widgets.d.ts +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/components/ui/alert.d.ts +1 -1
- package/lib/components/ui/alert.js +1 -1
- package/lib/components/ui/alert.js.map +1 -1
- package/lib/components/ui/checkbox.d.ts +1 -1
- package/lib/components/ui/checkbox.js +1 -1
- package/lib/components/ui/checkbox.js.map +1 -1
- package/lib/components/ui/close-button.js +1 -1
- package/lib/components/ui/close-button.js.map +1 -1
- package/lib/components/ui/field.d.ts +1 -1
- package/lib/components/ui/field.js +1 -1
- package/lib/components/ui/field.js.map +1 -1
- package/lib/components/ui/number-input.js +1 -1
- package/lib/components/ui/number-input.js.map +1 -1
- package/lib/components/ui/radio.d.ts +1 -1
- package/lib/components/ui/radio.js +1 -1
- package/lib/components/ui/radio.js.map +1 -1
- package/lib/components/ui/select.d.ts +1 -1
- package/lib/components/ui/select.js +13 -17
- package/lib/components/ui/select.js.map +1 -1
- package/lib/components/ui/slider.d.ts +2 -2
- package/lib/components/ui/slider.js +19 -19
- package/lib/components/ui/slider.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils.d.ts +2 -2
- package/lib/utils.js.map +1 -1
- package/package.json +6 -7
- package/src/AddButton/AddButton.tsx +2 -1
- package/src/AltDateTimeWidget/AltDateTimeWidget.tsx +1 -1
- package/src/AltDateWidget/AltDateWidget.tsx +2 -10
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +3 -9
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +2 -9
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +11 -18
- package/src/ChakraFrameProvider.tsx +7 -9
- package/src/CheckboxWidget/CheckboxWidget.tsx +10 -12
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +8 -11
- package/src/DescriptionField/DescriptionField.tsx +1 -1
- package/src/ErrorList/ErrorList.tsx +3 -1
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +8 -8
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -1
- package/src/FieldTemplate/FieldTemplate.tsx +2 -8
- package/src/Form/Form.tsx +4 -3
- package/src/GridTemplate/GridTemplate.tsx +1 -1
- package/src/IconButton/ChakraIconButton.tsx +9 -3
- package/src/IconButton/IconButton.tsx +15 -7
- package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +1 -1
- package/src/NativeSelectWidget/NativeSelectWidget.tsx +20 -29
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +4 -18
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +3 -2
- package/src/RadioWidget/RadioWidget.tsx +13 -16
- package/src/RangeWidget/RangeWidget.tsx +11 -18
- package/src/SelectWidget/SelectWidget.tsx +24 -27
- package/src/SubmitButton/SubmitButton.tsx +2 -1
- package/src/Templates/Templates.ts +1 -1
- package/src/TextareaWidget/TextareaWidget.tsx +10 -16
- package/src/Theme/Theme.tsx +2 -2
- package/src/TitleField/TitleField.tsx +1 -1
- package/src/UpDownWidget/UpDownWidget.tsx +10 -16
- package/src/Widgets/Widgets.ts +1 -1
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +2 -9
- package/src/components/ui/alert.tsx +3 -2
- package/src/components/ui/checkbox.tsx +3 -2
- package/src/components/ui/close-button.tsx +5 -7
- package/src/components/ui/field.tsx +3 -2
- package/src/components/ui/number-input.tsx +1 -1
- package/src/components/ui/radio.tsx +3 -2
- package/src/components/ui/select.tsx +31 -36
- package/src/components/ui/slider.tsx +37 -35
- package/src/utils.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AltDateWidget.js","sourceRoot":"","sources":["../../src/AltDateWidget/AltDateWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AltDateWidget.js","sourceRoot":"","sources":["../../src/AltDateWidget/AltDateWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAErF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,SAAS,aAAa,CAAoF,EACxG,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,KAAK,EACZ,OAAO,EACP,GAAG,KAAK,EACa;IACrB,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAChD,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,MAA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ACN,MAAC,GAAG,IAAC,OAAO,EAAC,MAAM,aAChB,CAAC,OAAO,CAAC,aAAa,IAAI,CACzB,KAAC,MAAM,IAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,YAClC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GACtC,CACV,EACA,CAAC,OAAO,CAAC,eAAe,IAAI,CAC3B,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,YAAG,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAU,CACxF,IACG,IACO,CAChB,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, ButtonGroup, HStack } from '@chakra-ui/react';
|
|
3
|
-
import { getTemplate, getUiOptions
|
|
3
|
+
import { getTemplate, getUiOptions } from '@rjsf/utils';
|
|
4
4
|
export default function ArrayFieldItemTemplate(props) {
|
|
5
5
|
const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
|
|
6
6
|
const uiOptions = getUiOptions(uiSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA2C;IAC3C,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,OAAO,CACL,MAAC,MAAM,IAAC,UAAU,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,aACjC,KAAC,GAAG,IAAC,CAAC,EAAC,MAAM,YAAE,QAAQ,GAAO,EAC7B,UAAU,IAAI,CACb,KAAC,GAAG,cACF,KAAC,WAAW,IAAC,QAAQ,QAAC,EAAE,EAAE,CAAC,YACzB,KAAC,6BAA6B,OAAK,YAAY,GAAI,GACvC,GACV,CACP,IACM,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ArrayFieldTemplateProps, StrictRJSFSchema, RJSFSchema, FormContextType } from '@rjsf/utils';
|
|
1
|
+
import type { ArrayFieldTemplateProps, StrictRJSFSchema, RJSFSchema, FormContextType } from '@rjsf/utils';
|
|
2
2
|
export default function ArrayFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Grid, GridItem } from '@chakra-ui/react';
|
|
3
|
-
import { getTemplate, getUiOptions, buttonId
|
|
3
|
+
import { getTemplate, getUiOptions, buttonId } from '@rjsf/utils';
|
|
4
4
|
export default function ArrayFieldTemplate(props) {
|
|
5
5
|
const { canAdd, disabled, fieldPathId, uiSchema, items, optionalDataControl, onAddClick, readonly, registry, required, schema, title, } = props;
|
|
6
6
|
const uiOptions = getUiOptions(uiSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,GACN,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,MAAM,uBAAuB,GAAG,WAAW,CACzC,yBAAyB,EACzB,QAAQ,EACR,SAAS,CACV,CAA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|
|
1
|
-
import { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
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;
|
|
@@ -2,16 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import { Input } from '@chakra-ui/react';
|
|
4
4
|
import { SchemaExamples } from '@rjsf/core';
|
|
5
|
-
import { ariaDescribedByIds, examplesId, labelValue, getInputProps
|
|
5
|
+
import { ariaDescribedByIds, examplesId, labelValue, getInputProps } from '@rjsf/utils';
|
|
6
6
|
import { Field } from '../components/ui/field.js';
|
|
7
7
|
import { getChakra } from '../utils.js';
|
|
8
8
|
export default function BaseInputTemplate(props) {
|
|
9
9
|
const { id, htmlName, type, value, label, hideLabel, schema, onChange, onChangeOverride, onBlur, onFocus, options, required, readonly, rawErrors, autofocus, placeholder, disabled, uiSchema, registry, } = props;
|
|
10
10
|
const inputProps = getInputProps(schema, type, options);
|
|
11
11
|
const { ClearButton } = registry.templates.ButtonTemplates;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const handleChange = ({ target: { value: newValue } }) => onChange(newValue === '' ? options.emptyValue : newValue);
|
|
13
|
+
const handleBlur = ({ target }) => onBlur(id, target && target.value);
|
|
14
|
+
const handleFocus = ({ target }) => onFocus(id, target && target.value);
|
|
15
15
|
const onClear = useCallback((e) => {
|
|
16
16
|
var _a;
|
|
17
17
|
e.preventDefault();
|
|
@@ -19,6 +19,6 @@ export default function BaseInputTemplate(props) {
|
|
|
19
19
|
onChange((_a = options.emptyValue) !== null && _a !== void 0 ? _a : '');
|
|
20
20
|
}, [onChange, options.emptyValue]);
|
|
21
21
|
const chakraProps = getChakra({ uiSchema });
|
|
22
|
-
return (_jsxs(Field, { mb: 1, disabled: disabled || readonly, required: required, readOnly: readonly, invalid: rawErrors && rawErrors.length > 0, label: labelValue(label, hideLabel || !label), ...chakraProps, children: [_jsx(Input, { id: id, name: htmlName || id, value: value || value === 0 ? value : '', onChange: onChangeOverride ||
|
|
22
|
+
return (_jsxs(Field, { mb: 1, disabled: disabled || readonly, required: required, readOnly: readonly, invalid: rawErrors && rawErrors.length > 0, label: labelValue(label, hideLabel || !label), ...chakraProps, children: [_jsx(Input, { id: id, name: htmlName || id, value: value || value === 0 ? value : '', onChange: onChangeOverride || handleChange, onBlur: handleBlur, onFocus: handleFocus, autoFocus: autofocus, placeholder: placeholder, ...inputProps, list: schema.examples ? examplesId(id) : undefined, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }), options.allowClearTextInputs && !readonly && !disabled && value && (_jsx(ClearButton, { registry: registry, onClick: onClear })), _jsx(SchemaExamples, { id: id, schema: schema })] }));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=BaseInputTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/BaseInputTemplate/BaseInputTemplate.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/BaseInputTemplate/BaseInputTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAExF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,S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ache({ container, key: 'rjsf' });
|
|
22
22
|
return newCache;
|
|
23
23
|
});
|
|
24
|
-
export const __createChakraFrameProvider = (props) => ({ document }) => {
|
|
25
|
-
return (_jsx("div", { style: { margin: 2 }, children: _jsx(CacheProvider, { value: memoizedCreateCacheWithContainer(document.head), children: _jsx(ChakraProvider, { value: defaultSystem, children: props.children }) }) }));
|
|
26
|
-
};
|
|
24
|
+
export const __createChakraFrameProvider = (props) => ({ document }) => (_jsx("div", { style: { margin: 2 }, children: _jsx(CacheProvider, { value: memoizedCreateCacheWithContainer(document.head), children: _jsx(ChakraProvider, { value: defaultSystem, children: props.children }) }) }));
|
|
27
25
|
//# sourceMappingURL=ChakraFrameProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChakraFrameProvider.js","sourceRoot":"","sources":["../src/ChakraFrameProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AAEH,MAAM,gCAAgC,GAAG,WAAW,CAAC,CAAC,SAAsB,EAAE,EAAE;IAC9E,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GACtC,CAAC,KAAU,EAAE,EAAE,CACf,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"ChakraFrameProvider.js","sourceRoot":"","sources":["../src/ChakraFrameProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AAEH,MAAM,gCAAgC,GAAG,WAAW,CAAC,CAAC,SAAsB,EAAE,EAAE;IAC9E,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GACtC,CAAC,KAAU,EAAE,EAAE,CACf,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CACrB,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,YACvB,KAAC,aAAa,IAAC,KAAK,EAAE,gCAAgC,CAAC,QAAQ,CAAC,IAAI,CAAC,YACnE,KAAC,cAAc,IAAC,KAAK,EAAE,aAAa,YAAG,KAAK,CAAC,QAAQ,GAAkB,GACzD,GACZ,CACP,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { WidgetProps, StrictRJSFSchema, RJSFSchema, FormContextType } from '@rjsf/utils';
|
|
1
|
+
import type { WidgetProps, StrictRJSFSchema, RJSFSchema, FormContextType } from '@rjsf/utils';
|
|
2
2
|
export default function CheckboxWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,10 +15,10 @@ export default function CheckboxWidget(props) {
|
|
|
15
15
|
const uiOptions = getUiOptions(uiSchema);
|
|
16
16
|
const isCheckbox = uiOptions.widget === 'checkbox';
|
|
17
17
|
const description = isCheckbox ? undefined : ((_a = options.description) !== null && _a !== void 0 ? _a : schema.description);
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
18
|
+
const handleChange = ({ checked }) => onChange(checked);
|
|
19
|
+
const handleBlur = ({ target }) => onBlur(id, target && target.checked);
|
|
20
|
+
const handleFocus = ({ target }) => onFocus(id, target && target.checked);
|
|
21
21
|
const chakraProps = getChakra({ uiSchema });
|
|
22
|
-
return (_jsxs(Field, { mb: 1, required: required, ...chakraProps, children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(Checkbox, { id: id, name: htmlName || id, checked: typeof value === 'undefined' ? false : value, disabled: disabled || readonly, onCheckedChange:
|
|
22
|
+
return (_jsxs(Field, { mb: 1, required: required, ...chakraProps, children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(Checkbox, { id: id, name: htmlName || id, checked: typeof value === 'undefined' ? false : value, disabled: disabled || readonly, onCheckedChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id), children: labelValue(_jsx(Text, { children: label }), hideLabel || !label) })] }));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=CheckboxWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxWidget.js","sourceRoot":"","sources":["../../src/CheckboxWidget/CheckboxWidget.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CheckboxWidget.js","sourceRoot":"","sources":["../../src/CheckboxWidget/CheckboxWidget.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAA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AAQ,KAAM,WAAW,aAC9C,CAAC,SAAS,IAAI,WAAW,IAAI,CAC5B,KAAC,wBAAwB,IACvB,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC,EACrB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,EACD,KAAC,QAAQ,IACP,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,QAAQ,IAAI,EAAE,EACpB,OAAO,EAAE,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EACrD,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,eAAe,EAAE,YAAY,EAC7B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,sBACF,kBAAkB,CAAC,EAAE,CAAC,YAEvC,UAAU,CAAC,KAAC,IAAI,cAAE,KAAK,GAAQ,EAAE,SAAS,IAAI,CAAC,KAAK,CAAC,GAC7C,IACL,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
2
|
export default function CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,15 +7,15 @@ export default function CheckboxesWidget(props) {
|
|
|
7
7
|
const { id, htmlName, disabled, options, value, readonly, onChange, onBlur, onFocus, required, label, rawErrors = [], hideLabel, uiSchema, } = props;
|
|
8
8
|
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
9
9
|
const optionValueFormat = getOptionValueFormat(options);
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const handleBlur = ({ target }) => onBlur(id, enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
11
|
+
const handleFocus = ({ target }) => onFocus(id, enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
12
12
|
const row = options ? options.inline : false;
|
|
13
13
|
const selectValue = enumOptionSelectedValue(value, enumOptions, true, optionValueFormat, []);
|
|
14
14
|
const chakraProps = getChakra({ uiSchema });
|
|
15
15
|
return (_jsxs(FieldsetRoot, { mb: 1, disabled: disabled || readonly, invalid: rawErrors && rawErrors.length > 0, ...chakraProps, children: [!hideLabel && label && _jsx(FieldsetLegend, { children: labelValue(label) }), _jsx(CheckboxGroup, { onValueChange: (option) => onChange(enumOptionValueDecoder(option, enumOptions, optionValueFormat, emptyValue)), value: selectValue, "aria-describedby": ariaDescribedByIds(id), readOnly: readonly, invalid: required && value.length === 0, children: _jsx(Stack, { direction: row ? 'row' : 'column', children: Array.isArray(enumOptions) &&
|
|
16
16
|
enumOptions.map((option, index) => {
|
|
17
|
-
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.
|
|
18
|
-
return (_jsx(Checkbox, { id: optionId(id, index), name: htmlName || id, value: enumOptionValueEncoder(option.value, index, optionValueFormat), disabled: disabled || itemDisabled || readonly, onBlur:
|
|
17
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
|
|
18
|
+
return (_jsx(Checkbox, { id: optionId(id, index), name: htmlName || id, value: enumOptionValueEncoder(option.value, index, optionValueFormat), disabled: disabled || itemDisabled || readonly, onBlur: handleBlur, onFocus: handleFocus, children: option.label && _jsx(Text, { children: option.label }) }, String(option.value)));
|
|
19
19
|
}) }) })] }));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=CheckboxesWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxesWidget.js","sourceRoot":"","sources":["../../src/CheckboxesWidget/CheckboxesWidget.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,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IAEP,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,EACvB,IAAI,EAAE,QAAQ,IAAI,EAAE,EACpB,KAAK,EAAE,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,CAAC,EACrE,QAAQ,EAAE,QAAQ,IAAI,YAAY,IAAI,QAAQ,EAC9C,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,YAEnB,MAAM,CAAC,KAAK,IAAI,KAAC,IAAI,cAAE,MAAM,CAAC,KAAK,GAAQ,IARvC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAShB,CACZ,CAAC;wBACJ,CAAC,CAAC,GACE,GACM,IACH,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
/** The `DescriptionField` is the template to use to render the description of a field
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `DescriptionFieldProps` for this component
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorList.js","sourceRoot":"","sources":["../../src/ErrorList/ErrorList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorList.js","sourceRoot":"","sources":["../../src/ErrorList/ErrorList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,MAAM,EACN,QAAQ,GACgB;IACxB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,OAAO,CACL,KAAC,KAAK,IAAC,MAAM,EAAC,OAAO,EAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,YACjF,KAAC,QAAQ,IAAC,iBAAiB,EAAC,QAAQ,YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAExB,KAAC,QAAQ,cAAU,KAAK,CAAC,KAAK,IAAf,CAAC,CAA0B,CAC3C,CAAC,GACO,GACL,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
/** The `FieldErrorTemplate` component renders the errors local to the particular field
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `FieldErrorProps` for the errors being rendered
|
|
@@ -11,8 +11,6 @@ export default function FieldErrorTemplate(props) {
|
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
13
|
const id = errorId(fieldPathId);
|
|
14
|
-
return errors.map((error, i) => {
|
|
15
|
-
return (_jsx(Fieldset.ErrorText, { mt: 0, id: id, children: error }, i));
|
|
16
|
-
});
|
|
14
|
+
return errors.map((error, i) => (_jsx(Fieldset.ErrorText, { mt: 0, id: id, children: error }, i)));
|
|
17
15
|
}
|
|
18
16
|
//# sourceMappingURL=FieldErrorTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldErrorTemplate.js","sourceRoot":"","sources":["../../src/FieldErrorTemplate/FieldErrorTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldErrorTemplate.js","sourceRoot":"","sources":["../../src/FieldErrorTemplate/FieldErrorTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAA+B;IAC/B,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC3C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAS,EAAE,EAAE,CAAC,CAEtC,KAAC,QAAQ,CAAC,SAAS,IAAC,EAAE,EAAE,CAAC,EAAU,EAAE,EAAE,EAAE,YACtC,KAAK,IADwB,CAAC,CAEZ,CACtB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
/** The `FieldHelpTemplate` component renders any help desired for a field
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `FieldHelpProps` to be rendered
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHelpTemplate.js","sourceRoot":"","sources":["../../src/FieldHelpTemplate/FieldHelpTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldHelpTemplate.js","sourceRoot":"","sources":["../../src/FieldHelpTemplate/FieldHelpTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,KAA8B;IAC9B,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACxD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,YAClD,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,GAC3D,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fieldset } from '@chakra-ui/react';
|
|
3
|
-
import { getTemplate, getUiOptions
|
|
3
|
+
import { getTemplate, getUiOptions } from '@rjsf/utils';
|
|
4
4
|
export default function FieldTemplate(props) {
|
|
5
5
|
const { id, children, classNames, style, disabled, displayLabel, hidden, label, onKeyRename, onKeyRenameBlur, onRemoveProperty, readonly, registry, required, rawErrors = [], errors, help, description, rawDescription, schema, uiSchema, } = props;
|
|
6
6
|
const uiOptions = getUiOptions(uiSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldTemplate.js","sourceRoot":"","sources":["../../src/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldTemplate.js","sourceRoot":"","sources":["../../src/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,KAAkC;IAClC,MAAM,EACJ,EAAE,EACF,QAAQ,EACR,UAAU,EACV,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,KAAK,EACL,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,MAAM,EACN,IAAI,EACJ,WAAW,EACX,cAAc,EACd,MAAM,EACN,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YAAG,QAAQ,GAAO,CAAC;IAC3D,CAAC;IAED,OAAO,CACL,KAAC,wBAAwB,IACvB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,YAElB,MAAC,QAAQ,CAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,aAC1E,YAAY,IAAI,cAAc,CAAC,CAAC,CAAC,KAAC,QAAQ,CAAC,MAAM,IAAC,EAAE,EAAE,CAAC,YAAG,WAAW,GAAmB,CAAC,CAAC,CAAC,IAAI,EAC/F,IAAI,EACL,KAAC,QAAQ,CAAC,OAAO,cAAE,QAAQ,GAAoB,EAC9C,MAAM,IACO,GACS,CAC5B,CAAC;AACJ,CAAC"}
|
package/lib/Form/Form.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { FormProps } from '@rjsf/core';
|
|
3
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { FormProps } from '@rjsf/core';
|
|
3
|
+
import type { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
4
4
|
export declare function generateForm<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): ComponentType<FormProps<T, S, F>>;
|
|
5
5
|
declare const _default: ComponentType<FormProps<any, RJSFSchema, any>>;
|
|
6
6
|
export default _default;
|
package/lib/Form/Form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,YAAY;IAK1B,OAAO,SAAS,CAAU,aAAa,EAAW,CAAC,CAAC;AACtD,CAAC;AAED,eAAe,YAAY,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridTemplateProps } from '@rjsf/utils';
|
|
1
|
+
import type { GridTemplateProps } from '@rjsf/utils';
|
|
2
2
|
/** Renders a `GridTemplate` for chakra-ui, which is expecting the column sizing information coming in via the
|
|
3
3
|
* extra props provided by the caller, which are spread directly on the `Grid`/`GridItem`.
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconButtonProps } from '@chakra-ui/react';
|
|
2
|
-
import { FormContextType, IconButtonProps as RJSFIconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { IconButtonProps } from '@chakra-ui/react';
|
|
2
|
+
import type { FormContextType, IconButtonProps as RJSFIconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
3
3
|
export type ChakraIconButtonProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = RJSFIconButtonProps<T, S, F> & Omit<IconButtonProps, 'onClick'>;
|
|
4
4
|
declare function ChakraIconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ChakraIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare namespace ChakraIconButton {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChakraIconButton.js","sourceRoot":"","sources":["../../src/IconButton/ChakraIconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChakraIconButton.js","sourceRoot":"","sources":["../../src/IconButton/ChakraIconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAc9C,SAAS,gBAAgB,CACvB,KAAqC;IAErC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAEpE,OAAO,CACL,KAAC,UAAU,kBAAa,KAAK,CAAC,KAAK,KAAM,UAAU,YAChD,IAAI,GACM,CACd,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,eAAe,IAAI,CAAC,gBAAgB,CAA4B,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
-
import { ChakraIconButtonProps } from './ChakraIconButton.js';
|
|
3
|
-
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
export declare
|
|
7
|
-
|
|
1
|
+
import type { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
import type { ChakraIconButtonProps } from './ChakraIconButton.js';
|
|
3
|
+
declare function CopyButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ChakraIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const CopyButton: typeof CopyButtonFn;
|
|
5
|
+
declare function MoveDownButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ChakraIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const MoveDownButton: typeof MoveDownButtonFn;
|
|
7
|
+
declare function MoveUpButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ChakraIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const MoveUpButton: typeof MoveUpButtonFn;
|
|
9
|
+
declare function RemoveButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ChakraIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const RemoveButton: typeof RemoveButtonFn;
|
|
11
|
+
declare function ClearButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ChakraIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const ClearButton: typeof ClearButtonFn;
|
|
13
|
+
export {};
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
2
3
|
import { TranslatableString } from '@rjsf/utils';
|
|
3
4
|
import { ArrowUpIcon, ArrowDownIcon, CopyIcon, DeleteIcon, X } from 'lucide-react';
|
|
4
5
|
import ChakraIconButton from './ChakraIconButton.js';
|
|
5
|
-
|
|
6
|
+
function CopyButtonFn(props) {
|
|
6
7
|
const { registry: { translateString }, } = props;
|
|
7
8
|
return (_jsx(ChakraIconButton, { title: translateString(TranslatableString.CopyButton), ...props, icon: _jsx(CopyIcon, {}) }));
|
|
8
9
|
}
|
|
9
|
-
export
|
|
10
|
+
export const CopyButton = memo(CopyButtonFn);
|
|
11
|
+
function MoveDownButtonFn(props) {
|
|
10
12
|
const { registry: { translateString }, } = props;
|
|
11
13
|
return (_jsx(ChakraIconButton, { title: translateString(TranslatableString.MoveDownButton), ...props, icon: _jsx(ArrowDownIcon, {}) }));
|
|
12
14
|
}
|
|
13
|
-
export
|
|
15
|
+
export const MoveDownButton = memo(MoveDownButtonFn);
|
|
16
|
+
function MoveUpButtonFn(props) {
|
|
14
17
|
const { registry: { translateString }, } = props;
|
|
15
18
|
return (_jsx(ChakraIconButton, { title: translateString(TranslatableString.MoveUpButton), ...props, icon: _jsx(ArrowUpIcon, {}) }));
|
|
16
19
|
}
|
|
17
|
-
export
|
|
20
|
+
export const MoveUpButton = memo(MoveUpButtonFn);
|
|
21
|
+
function RemoveButtonFn(props) {
|
|
18
22
|
const { registry: { translateString }, } = props;
|
|
19
23
|
return (_jsx(ChakraIconButton, { title: translateString(TranslatableString.RemoveButton), ...props, icon: _jsx(DeleteIcon, {}) }));
|
|
20
24
|
}
|
|
21
|
-
export
|
|
25
|
+
export const RemoveButton = memo(RemoveButtonFn);
|
|
26
|
+
function ClearButtonFn(props) {
|
|
22
27
|
const { registry: { translateString }, } = props;
|
|
23
28
|
return _jsx(ChakraIconButton, { title: translateString(TranslatableString.ClearButton), ...props, icon: _jsx(X, {}) });
|
|
24
29
|
}
|
|
30
|
+
export const ClearButton = memo(ClearButtonFn);
|
|
25
31
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../src/IconButton/IconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../src/IconButton/IconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,Q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AAC,gBAAgB,IACf,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,KACnD,KAAK,EACT,IAAI,EAAE,KAAC,UAAU,KAAG,GACpB,CACH,CAAC;AACJ,CAAC;AACD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAA0B,CAAC;AAE1E,SAAS,aAAa,CACpB,KAAqC;IAErC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,KAAC,gBAAgB,IAAU,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,KAAM,KAAK,EAAE,IAAI,EAAE,KAAC,CAAC,KAAG,GAAI,CAAC;AACvH,CAAC;AACD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAyB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormContextType, MultiSchemaFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, MultiSchemaFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
export default function MultiSchemaFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: MultiSchemaFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
2
|
/**
|
|
3
3
|
* NativeSelectWidget is a React component that renders a native select input.
|
|
4
4
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { createListCollection, NativeSelect } from '@chakra-ui/react';
|
|
4
|
-
import { ariaDescribedByIds, enumOptionsIndexForValue, enumOptionsValueForIndex, labelValue
|
|
4
|
+
import { ariaDescribedByIds, enumOptionsIndexForValue, enumOptionsValueForIndex, labelValue } from '@rjsf/utils';
|
|
5
5
|
import { Field } from '../components/ui/field.js';
|
|
6
6
|
import { getChakra } from '../utils.js';
|
|
7
7
|
/**
|
|
@@ -18,27 +18,25 @@ export default function NativeSelectWidget(props) {
|
|
|
18
18
|
var _a;
|
|
19
19
|
const { id, options, label, hideLabel, placeholder, multiple, required, disabled, readonly, value, autofocus, onChange, onBlur, onFocus, rawErrors = [], schema, uiSchema, } = props;
|
|
20
20
|
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
25
|
-
const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
21
|
+
const handleChange = ({ target }) => onChange(enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
22
|
+
const handleBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
23
|
+
const handleFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
26
24
|
const showPlaceholderOption = !multiple && schema.default === undefined;
|
|
27
25
|
const { valueLabelMap, displayEnumOptions } = useMemo(() => {
|
|
28
|
-
const
|
|
29
|
-
let
|
|
26
|
+
const computedValueLabelMap = {};
|
|
27
|
+
let computedOptions = [];
|
|
30
28
|
if (Array.isArray(enumOptions)) {
|
|
31
|
-
|
|
32
|
-
const { value, label } = option;
|
|
33
|
-
|
|
29
|
+
computedOptions = enumOptions.map((option, index) => {
|
|
30
|
+
const { value: enumValue, label: enumLabel } = option;
|
|
31
|
+
computedValueLabelMap[index] = enumLabel || String(enumValue);
|
|
34
32
|
return {
|
|
35
|
-
label,
|
|
33
|
+
label: enumLabel,
|
|
36
34
|
value: String(index),
|
|
37
|
-
disabled: Array.isArray(enumDisabled) && enumDisabled.
|
|
35
|
+
disabled: Array.isArray(enumDisabled) && enumDisabled.includes(enumValue),
|
|
38
36
|
};
|
|
39
37
|
});
|
|
40
38
|
}
|
|
41
|
-
return { valueLabelMap:
|
|
39
|
+
return { valueLabelMap: computedValueLabelMap, displayEnumOptions: computedOptions };
|
|
42
40
|
}, [enumDisabled, enumOptions]);
|
|
43
41
|
const selectedIndex = enumOptionsIndexForValue(value, enumOptions, false);
|
|
44
42
|
const getSingleValue = () => typeof selectedIndex !== 'undefined'
|
|
@@ -54,6 +52,6 @@ export default function NativeSelectWidget(props) {
|
|
|
54
52
|
items: displayEnumOptions.filter((item) => item.value),
|
|
55
53
|
});
|
|
56
54
|
const chakraProps = getChakra({ uiSchema });
|
|
57
|
-
return (_jsx(Field, { mb: 1, disabled: disabled || readonly, required: required, readOnly: readonly, invalid: rawErrors && rawErrors.length > 0, label: labelValue(label, hideLabel || !label), ...chakraProps, children: _jsxs(NativeSelect.Root, { children: [_jsxs(NativeSelect.Field, { id: id, onBlur:
|
|
55
|
+
return (_jsx(Field, { mb: 1, disabled: disabled || readonly, required: required, readOnly: readonly, invalid: rawErrors && rawErrors.length > 0, label: labelValue(label, hideLabel || !label), ...chakraProps, children: _jsxs(NativeSelect.Root, { children: [_jsxs(NativeSelect.Field, { id: id, onBlur: handleBlur, onChange: handleChange, onFocus: handleFocus, autoFocus: autofocus, value: formValue, "aria-describedby": ariaDescribedByIds(id), children: [showPlaceholderOption ? (_jsx("option", { value: '', disabled: true, hidden: true, children: placeholder || '' })) : undefined, selectOptions.items.map((item) => (_jsx("option", { value: item.value, children: item.label }, item.value)))] }), _jsx(NativeSelect.Indicator, {})] }) }));
|
|
58
56
|
}
|
|
59
57
|
//# sourceMappingURL=NativeSelectWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeSelectWidget.js","sourceRoot":"","sources":["../../src/NativeSelectWidget/NativeSelectWidget.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NativeSelectWidget.js","sourceRoot":"","sources":["../../src/NativeSelectWidget/NativeSelectWidget.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGjH,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAA2B;;IAC3B,MAAM,EACJ,EAAE,EACF,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,SAAS,GAAG,EAAE,EACd,MAAM,EACN,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE1D,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAkC,EAAE,EAAE,CAClE,QAAQ,CAAC,wBAAwB,CAAI,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAEzF,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAiC,EAAE,EAAE,CAC/D,MAAM,CAAC,EAAE,EAAE,wBAAwB,CAAI,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CA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AI,EAAE,EAAE,CAAC,CACjC,iBAAyB,KAAK,EAAE,IAAI,CAAC,KAAK,YACvC,IAAI,CAAC,KAAK,IADA,IAAI,CAAC,KAAK,CAEd,CACV,CAAC,IACiB,EACrB,KAAC,YAAY,CAAC,SAAS,KAAG,IACR,GACd,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Grid, GridItem } from '@chakra-ui/react';
|
|
3
|
-
import { buttonId, canExpand, descriptionId, getTemplate, getUiOptions, titleId
|
|
3
|
+
import { buttonId, canExpand, descriptionId, getTemplate, getUiOptions, titleId } from '@rjsf/utils';
|
|
4
4
|
export default function ObjectFieldTemplate(props) {
|
|
5
5
|
const { description, title, properties, required, disabled, readonly, uiSchema, fieldPathId, schema, formData, optionalDataControl, onAddProperty, registry, } = props;
|
|
6
6
|
const uiOptions = getUiOptions(uiSchema);
|
|
@@ -9,6 +9,6 @@ export default function ObjectFieldTemplate(props) {
|
|
|
9
9
|
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
10
10
|
// Button templates are not overridden in the uiSchema
|
|
11
11
|
const { ButtonTemplates: { AddButton }, } = registry.templates;
|
|
12
|
-
return (_jsxs(_Fragment, { children: [title && (_jsx(TitleFieldTemplate, { id: titleId(fieldPathId), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry, optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : undefined })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(fieldPathId), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs(Grid, { gap: description ? 2 : 4, mb: 4, children: [!showOptionalDataControlInTitle ? _jsx(GridItem, { children: optionalDataControl }) : undefined, properties.map((element
|
|
12
|
+
return (_jsxs(_Fragment, { children: [title && (_jsx(TitleFieldTemplate, { id: titleId(fieldPathId), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry, optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : undefined })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(fieldPathId), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs(Grid, { gap: description ? 2 : 4, mb: 4, children: [!showOptionalDataControlInTitle ? _jsx(GridItem, { children: optionalDataControl }) : undefined, properties.map((element) => element.hidden ? element.content : _jsx(GridItem, { children: element.content }, element.name)), canExpand(schema, uiSchema, formData) && (_jsx(GridItem, { justifySelf: 'flex-end', children: _jsx(AddButton, { id: buttonId(fieldPathId, 'add'), className: 'rjsf-object-property-expand', onClick: onAddProperty, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }) }))] })] }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=ObjectFieldTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectFieldTemplate.js","sourceRoot":"","sources":["../../src/ObjectFieldTemplate/ObjectFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ObjectFieldTemplate.js","sourceRoot":"","sources":["../../src/ObjectFieldTemplate/ObjectFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,aAClC,CAAC,8BAA8B,CAAC,CAAC,CAAC,KAAC,QAAQ,cAAE,mBAAmB,GAAY,CAAC,CAAC,CAAC,SAAS,EACxF,UAAU,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAC,QAAQ,cAAqB,OAAO,CAAC,OAAO,IAA9B,OAAO,CAAC,IAAI,CAA8B,CAC7F,EACA,SAAS,CAAU,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CACjD,KAAC,QAAQ,IAAC,WAAW,EAAC,UAAU,YAC9B,KAAC,SAAS,IACR,EAAE,EAAE,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,EAChC,SAAS,EAAC,6BAA6B,EACvC,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,GACO,CACZ,IACI,IACN,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormContextType, OptionalDataControlsTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, OptionalDataControlsTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
/** The OptionalDataControlsTemplate renders one of three different states. If
|
|
3
3
|
* there is an `onAddClick()` function, it renders the "Add" button. If there is
|
|
4
4
|
* an `onRemoveClick()` function, it renders the "Remove" button. Otherwise it
|
|
@@ -14,7 +14,7 @@ export default function OptionalDataControlsTemplate(props) {
|
|
|
14
14
|
if (onAddClick) {
|
|
15
15
|
return (_jsx(ChakraIconButton, { id: id, registry: registry, className: 'rjsf-add-optional-data btn-sm', onClick: onAddClick, title: label, icon: _jsx(PlusIcon, {}), size: 'xs', variant: 'subtle' }));
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
if (onRemoveClick) {
|
|
18
18
|
return (_jsx(RemoveButton, { id: id, registry: registry, className: 'rjsf-remove-optional-data btn-sm', onClick: onRemoveClick, title: label, size: 'xs', variant: 'subtle' }));
|
|
19
19
|
}
|
|
20
20
|
return _jsx("em", { id: id, children: label });
|