@rjsf/core 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/core.umd.js +454 -373
- package/dist/index.cjs +416 -334
- package/dist/index.cjs.map +3 -3
- package/dist/index.esm.js +418 -415
- package/dist/index.esm.js.map +3 -3
- package/lib/components/Form.d.ts +14 -11
- package/lib/components/Form.d.ts.map +1 -1
- package/lib/components/Form.js +97 -62
- package/lib/components/RichDescription.d.ts +2 -2
- package/lib/components/RichDescription.d.ts.map +1 -1
- package/lib/components/RichDescription.js +1 -1
- package/lib/components/RichHelp.d.ts +2 -2
- package/lib/components/RichHelp.d.ts.map +1 -1
- package/lib/components/RichHelp.js +1 -1
- package/lib/components/SchemaExamples.d.ts +1 -1
- package/lib/components/SchemaExamples.d.ts.map +1 -1
- package/lib/components/SchemaExamples.js +1 -3
- package/lib/components/fields/ArrayField.d.ts +1 -1
- package/lib/components/fields/ArrayField.d.ts.map +1 -1
- package/lib/components/fields/ArrayField.js +87 -88
- package/lib/components/fields/BooleanField.d.ts +1 -1
- package/lib/components/fields/BooleanField.d.ts.map +1 -1
- package/lib/components/fields/BooleanField.js +2 -5
- package/lib/components/fields/FallbackField.d.ts +1 -1
- package/lib/components/fields/FallbackField.d.ts.map +1 -1
- package/lib/components/fields/FallbackField.js +2 -2
- package/lib/components/fields/LayoutGridField.d.ts +7 -9
- package/lib/components/fields/LayoutGridField.d.ts.map +1 -1
- package/lib/components/fields/LayoutGridField.js +5 -4
- package/lib/components/fields/LayoutHeaderField.d.ts +1 -1
- package/lib/components/fields/LayoutHeaderField.d.ts.map +1 -1
- package/lib/components/fields/LayoutHeaderField.js +1 -1
- package/lib/components/fields/LayoutMultiSchemaField.d.ts +1 -1
- package/lib/components/fields/LayoutMultiSchemaField.d.ts.map +1 -1
- package/lib/components/fields/LayoutMultiSchemaField.js +4 -1
- package/lib/components/fields/MultiSchemaField.d.ts +9 -3
- package/lib/components/fields/MultiSchemaField.d.ts.map +1 -1
- package/lib/components/fields/MultiSchemaField.js +27 -9
- package/lib/components/fields/NullField.d.ts +1 -1
- package/lib/components/fields/NullField.d.ts.map +1 -1
- package/lib/components/fields/NumberField.d.ts +1 -1
- package/lib/components/fields/NumberField.d.ts.map +1 -1
- package/lib/components/fields/NumberField.js +7 -9
- package/lib/components/fields/ObjectField.d.ts +1 -1
- package/lib/components/fields/ObjectField.d.ts.map +1 -1
- package/lib/components/fields/ObjectField.js +27 -25
- package/lib/components/fields/OptionalDataControlsField.d.ts +1 -1
- package/lib/components/fields/OptionalDataControlsField.d.ts.map +1 -1
- package/lib/components/fields/SchemaField.d.ts +1 -1
- package/lib/components/fields/SchemaField.d.ts.map +1 -1
- package/lib/components/fields/SchemaField.js +7 -7
- package/lib/components/fields/StringField.d.ts +1 -1
- package/lib/components/fields/StringField.d.ts.map +1 -1
- package/lib/components/fields/StringField.js +2 -5
- package/lib/components/fields/index.d.ts +1 -1
- package/lib/components/fields/index.d.ts.map +1 -1
- package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts +1 -1
- package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts.map +1 -1
- package/lib/components/templates/ArrayFieldDescriptionTemplate.js +1 -1
- package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts +1 -1
- package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts.map +1 -1
- package/lib/components/templates/ArrayFieldItemButtonsTemplate.js +1 -1
- package/lib/components/templates/ArrayFieldItemTemplate.d.ts +1 -1
- package/lib/components/templates/ArrayFieldItemTemplate.d.ts.map +1 -1
- package/lib/components/templates/ArrayFieldItemTemplate.js +1 -1
- package/lib/components/templates/ArrayFieldTemplate.d.ts +1 -1
- package/lib/components/templates/ArrayFieldTemplate.d.ts.map +1 -1
- package/lib/components/templates/ArrayFieldTemplate.js +1 -1
- package/lib/components/templates/ArrayFieldTitleTemplate.d.ts +1 -1
- package/lib/components/templates/ArrayFieldTitleTemplate.d.ts.map +1 -1
- package/lib/components/templates/ArrayFieldTitleTemplate.js +1 -1
- package/lib/components/templates/BaseInputTemplate.d.ts +1 -1
- package/lib/components/templates/BaseInputTemplate.d.ts.map +1 -1
- package/lib/components/templates/BaseInputTemplate.js +7 -6
- package/lib/components/templates/ButtonTemplates/AddButton.d.ts +1 -1
- package/lib/components/templates/ButtonTemplates/AddButton.d.ts.map +1 -1
- package/lib/components/templates/ButtonTemplates/IconButton.d.ts +14 -7
- package/lib/components/templates/ButtonTemplates/IconButton.d.ts.map +1 -1
- package/lib/components/templates/ButtonTemplates/IconButton.js +14 -6
- package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts +1 -1
- package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts.map +1 -1
- package/lib/components/templates/ButtonTemplates/index.d.ts +1 -1
- package/lib/components/templates/ButtonTemplates/index.d.ts.map +1 -1
- package/lib/components/templates/DescriptionField.d.ts +1 -1
- package/lib/components/templates/DescriptionField.d.ts.map +1 -1
- package/lib/components/templates/ErrorList.d.ts +1 -1
- package/lib/components/templates/ErrorList.d.ts.map +1 -1
- package/lib/components/templates/ErrorList.js +2 -4
- package/lib/components/templates/FallbackFieldTemplate.d.ts +1 -1
- package/lib/components/templates/FallbackFieldTemplate.d.ts.map +1 -1
- package/lib/components/templates/FieldErrorTemplate.d.ts +1 -1
- package/lib/components/templates/FieldErrorTemplate.d.ts.map +1 -1
- package/lib/components/templates/FieldErrorTemplate.js +1 -3
- package/lib/components/templates/FieldHelpTemplate.d.ts +1 -1
- package/lib/components/templates/FieldHelpTemplate.d.ts.map +1 -1
- package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts +1 -1
- package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts.map +1 -1
- package/lib/components/templates/FieldTemplate/FieldTemplate.js +1 -1
- package/lib/components/templates/FieldTemplate/Label.d.ts +2 -2
- package/lib/components/templates/FieldTemplate/Label.d.ts.map +1 -1
- package/lib/components/templates/GridTemplate.d.ts +1 -1
- package/lib/components/templates/GridTemplate.d.ts.map +1 -1
- package/lib/components/templates/MultiSchemaFieldTemplate.d.ts +1 -1
- package/lib/components/templates/MultiSchemaFieldTemplate.d.ts.map +1 -1
- package/lib/components/templates/ObjectFieldTemplate.d.ts +1 -1
- package/lib/components/templates/ObjectFieldTemplate.d.ts.map +1 -1
- package/lib/components/templates/ObjectFieldTemplate.js +1 -1
- package/lib/components/templates/OptionalDataControlsTemplate.d.ts +1 -1
- package/lib/components/templates/OptionalDataControlsTemplate.d.ts.map +1 -1
- package/lib/components/templates/OptionalDataControlsTemplate.js +1 -1
- package/lib/components/templates/TitleField.d.ts +1 -1
- package/lib/components/templates/TitleField.d.ts.map +1 -1
- package/lib/components/templates/UnsupportedField.d.ts +1 -1
- package/lib/components/templates/UnsupportedField.d.ts.map +1 -1
- package/lib/components/templates/UnsupportedField.js +1 -1
- package/lib/components/templates/WrapIfAdditionalTemplate.d.ts +1 -1
- package/lib/components/templates/WrapIfAdditionalTemplate.d.ts.map +1 -1
- package/lib/components/templates/WrapIfAdditionalTemplate.js +1 -1
- package/lib/components/templates/index.d.ts +1 -1
- package/lib/components/templates/index.d.ts.map +1 -1
- package/lib/components/widgets/AltDateTimeWidget.d.ts +1 -1
- package/lib/components/widgets/AltDateTimeWidget.d.ts.map +1 -1
- package/lib/components/widgets/AltDateWidget.d.ts +1 -1
- package/lib/components/widgets/AltDateWidget.d.ts.map +1 -1
- package/lib/components/widgets/AltDateWidget.js +2 -2
- package/lib/components/widgets/CheckboxWidget.d.ts +1 -1
- package/lib/components/widgets/CheckboxWidget.d.ts.map +1 -1
- package/lib/components/widgets/CheckboxesWidget.d.ts +1 -1
- package/lib/components/widgets/CheckboxesWidget.d.ts.map +1 -1
- package/lib/components/widgets/CheckboxesWidget.js +2 -2
- package/lib/components/widgets/ColorWidget.d.ts +1 -1
- package/lib/components/widgets/ColorWidget.d.ts.map +1 -1
- package/lib/components/widgets/DateTimeWidget.d.ts +1 -1
- package/lib/components/widgets/DateTimeWidget.d.ts.map +1 -1
- package/lib/components/widgets/DateTimeWidget.js +2 -2
- package/lib/components/widgets/DateWidget.d.ts +1 -1
- package/lib/components/widgets/DateWidget.d.ts.map +1 -1
- package/lib/components/widgets/EmailWidget.d.ts +1 -1
- package/lib/components/widgets/EmailWidget.d.ts.map +1 -1
- package/lib/components/widgets/FileWidget.d.ts +1 -1
- package/lib/components/widgets/FileWidget.d.ts.map +1 -1
- package/lib/components/widgets/FileWidget.js +6 -4
- package/lib/components/widgets/HiddenWidget.d.ts +1 -1
- package/lib/components/widgets/HiddenWidget.d.ts.map +1 -1
- package/lib/components/widgets/PasswordWidget.d.ts +1 -1
- package/lib/components/widgets/PasswordWidget.d.ts.map +1 -1
- package/lib/components/widgets/RadioWidget.d.ts +1 -1
- package/lib/components/widgets/RadioWidget.d.ts.map +1 -1
- package/lib/components/widgets/RadioWidget.js +2 -2
- package/lib/components/widgets/RangeWidget.d.ts +1 -1
- package/lib/components/widgets/RangeWidget.d.ts.map +1 -1
- package/lib/components/widgets/RatingWidget.d.ts +1 -1
- package/lib/components/widgets/RatingWidget.d.ts.map +1 -1
- package/lib/components/widgets/RatingWidget.js +15 -15
- package/lib/components/widgets/SelectWidget.d.ts +1 -1
- package/lib/components/widgets/SelectWidget.d.ts.map +1 -1
- package/lib/components/widgets/SelectWidget.js +4 -4
- package/lib/components/widgets/TextWidget.d.ts +1 -1
- package/lib/components/widgets/TextWidget.d.ts.map +1 -1
- package/lib/components/widgets/TextareaWidget.d.ts +1 -1
- package/lib/components/widgets/TextareaWidget.d.ts.map +1 -1
- package/lib/components/widgets/TextareaWidget.js +2 -2
- package/lib/components/widgets/TimeWidget.d.ts +1 -1
- package/lib/components/widgets/TimeWidget.d.ts.map +1 -1
- package/lib/components/widgets/URLWidget.d.ts +1 -1
- package/lib/components/widgets/URLWidget.d.ts.map +1 -1
- package/lib/components/widgets/UpDownWidget.d.ts +1 -1
- package/lib/components/widgets/UpDownWidget.d.ts.map +1 -1
- package/lib/components/widgets/index.d.ts +1 -1
- package/lib/components/widgets/index.d.ts.map +1 -1
- package/lib/getDefaultRegistry.d.ts +1 -1
- package/lib/getDefaultRegistry.d.ts.map +1 -1
- package/lib/getDefaultRegistry.js +1 -1
- package/lib/getTestRegistry.d.ts +1 -1
- package/lib/getTestRegistry.d.ts.map +1 -1
- package/lib/getTestRegistry.js +1 -1
- package/lib/index.d.ts +10 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/withTheme.d.ts +3 -3
- package/lib/withTheme.d.ts.map +1 -1
- package/lib/withTheme.js +6 -6
- package/package.json +5 -6
- package/src/components/Form.tsx +164 -97
- package/src/components/RichDescription.tsx +3 -10
- package/src/components/RichHelp.tsx +3 -10
- package/src/components/SchemaExamples.tsx +6 -4
- package/src/components/fields/ArrayField.tsx +122 -108
- package/src/components/fields/BooleanField.tsx +4 -9
- package/src/components/fields/FallbackField.tsx +4 -8
- package/src/components/fields/LayoutGridField.tsx +21 -19
- package/src/components/fields/LayoutHeaderField.tsx +2 -10
- package/src/components/fields/LayoutMultiSchemaField.tsx +15 -10
- package/src/components/fields/MultiSchemaField.tsx +29 -16
- package/src/components/fields/NullField.tsx +1 -1
- package/src/components/fields/NumberField.tsx +8 -10
- package/src/components/fields/ObjectField.tsx +48 -39
- package/src/components/fields/OptionalDataControlsField.tsx +6 -4
- package/src/components/fields/SchemaField.tsx +22 -19
- package/src/components/fields/StringField.tsx +4 -15
- package/src/components/fields/index.ts +1 -1
- package/src/components/templates/ArrayFieldDescriptionTemplate.tsx +2 -9
- package/src/components/templates/ArrayFieldItemButtonsTemplate.tsx +2 -7
- package/src/components/templates/ArrayFieldItemTemplate.tsx +3 -9
- package/src/components/templates/ArrayFieldTemplate.tsx +2 -9
- package/src/components/templates/ArrayFieldTitleTemplate.tsx +2 -10
- package/src/components/templates/BaseInputTemplate.tsx +15 -19
- package/src/components/templates/ButtonTemplates/AddButton.tsx +2 -1
- package/src/components/templates/ButtonTemplates/IconButton.tsx +16 -7
- package/src/components/templates/ButtonTemplates/SubmitButton.tsx +2 -1
- package/src/components/templates/ButtonTemplates/index.ts +1 -1
- package/src/components/templates/DescriptionField.tsx +1 -1
- package/src/components/templates/ErrorList.tsx +8 -15
- package/src/components/templates/FallbackFieldTemplate.tsx +2 -1
- package/src/components/templates/FieldErrorTemplate.tsx +8 -8
- package/src/components/templates/FieldHelpTemplate.tsx +2 -1
- package/src/components/templates/FieldTemplate/FieldTemplate.tsx +2 -8
- package/src/components/templates/FieldTemplate/Label.tsx +2 -2
- package/src/components/templates/GridTemplate.tsx +1 -1
- package/src/components/templates/MultiSchemaFieldTemplate.tsx +1 -1
- package/src/components/templates/ObjectFieldTemplate.tsx +2 -7
- package/src/components/templates/OptionalDataControlsTemplate.tsx +3 -2
- package/src/components/templates/TitleField.tsx +1 -1
- package/src/components/templates/UnsupportedField.tsx +3 -2
- package/src/components/templates/WrapIfAdditionalTemplate.tsx +2 -9
- package/src/components/templates/index.ts +1 -1
- package/src/components/widgets/AltDateTimeWidget.tsx +1 -1
- package/src/components/widgets/AltDateWidget.tsx +7 -13
- package/src/components/widgets/CheckboxWidget.tsx +3 -5
- package/src/components/widgets/CheckboxesWidget.tsx +6 -8
- package/src/components/widgets/ColorWidget.tsx +2 -1
- package/src/components/widgets/DateTimeWidget.tsx +3 -10
- package/src/components/widgets/DateWidget.tsx +2 -1
- package/src/components/widgets/EmailWidget.tsx +2 -1
- package/src/components/widgets/FileWidget.tsx +9 -8
- package/src/components/widgets/HiddenWidget.tsx +1 -1
- package/src/components/widgets/PasswordWidget.tsx +2 -1
- package/src/components/widgets/RadioWidget.tsx +6 -8
- package/src/components/widgets/RangeWidget.tsx +1 -1
- package/src/components/widgets/RatingWidget.tsx +48 -47
- package/src/components/widgets/SelectWidget.tsx +12 -10
- package/src/components/widgets/TextWidget.tsx +2 -1
- package/src/components/widgets/TextareaWidget.tsx +7 -4
- package/src/components/widgets/TimeWidget.tsx +2 -1
- package/src/components/widgets/URLWidget.tsx +2 -1
- package/src/components/widgets/UpDownWidget.tsx +2 -1
- package/src/components/widgets/index.ts +1 -1
- package/src/getDefaultRegistry.ts +2 -9
- package/src/getTestRegistry.tsx +2 -7
- package/src/index.ts +10 -5
- package/src/withTheme.tsx +14 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/DateTimeWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DateTimeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/DateTimeWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAW5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getTemplate, localToUTC, utcToLocal
|
|
2
|
+
import { getTemplate, localToUTC, utcToLocal } from '@rjsf/utils';
|
|
3
3
|
/** The `DateTimeWidget` component uses the `BaseInputTemplate` changing the type to `datetime-local` and transforms
|
|
4
4
|
* the value to/from utc using the appropriate utility functions.
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@ import { getTemplate, localToUTC, utcToLocal, } from '@rjsf/utils';
|
|
|
8
8
|
export default function DateTimeWidget(props) {
|
|
9
9
|
const { onChange, value, options, registry } = props;
|
|
10
10
|
const BaseInputTemplate = getTemplate('BaseInputTemplate', registry, options);
|
|
11
|
-
return (_jsx(BaseInputTemplate, { type: 'datetime-local', ...props, value: utcToLocal(value), onChange: (
|
|
11
|
+
return (_jsx(BaseInputTemplate, { type: 'datetime-local', ...props, value: utcToLocal(value), onChange: (newValue) => onChange(localToUTC(newValue)) }));
|
|
12
12
|
}
|
|
@@ -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
|
/** The `DateWidget` component uses the `BaseInputTemplate` changing the type to `date` and transforms
|
|
3
3
|
* the value to undefined when it is falsy during the `onChange` handling.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/DateWidget.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DateWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/DateWidget.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;;GAIG;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,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAO5B"}
|
|
@@ -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
|
/** The `EmailWidget` component uses the `BaseInputTemplate` changing the type to `email`.
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `WidgetProps` for this component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/EmailWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"EmailWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/EmailWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACnH,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAK5B"}
|
|
@@ -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
|
* The `FileWidget` is a widget for rendering file upload fields.
|
|
4
4
|
* It is typically used with a string property with data-url format.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/FileWidget.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"FileWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/FileWidget.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,eAAe,EAEf,UAAU,EACV,gBAAgB,EAEhB,WAAW,EACZ,MAAM,aAAa,CAAC;AA2ErB;;;GAGG;AACH,iBAAS,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACnG,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAkC5B;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getTemplate, TranslatableString, useFileWidgetProps
|
|
3
|
-
import { Markdown } from 'markdown-to-jsx';
|
|
2
|
+
import { getTemplate, TranslatableString, useFileWidgetProps } from '@rjsf/utils';
|
|
3
|
+
import { Markdown } from 'markdown-to-jsx/react';
|
|
4
4
|
function FileInfoPreview({ fileInfo, registry, }) {
|
|
5
5
|
const { translateString } = registry;
|
|
6
6
|
const { dataURL, type, name } = fileInfo;
|
|
7
7
|
if (!dataURL) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
|
+
const previewLabel = translateString(TranslatableString.PreviewLabel);
|
|
10
11
|
// If type is JPEG or PNG then show image preview.
|
|
11
12
|
// Originally, any type of image was supported, but this was changed into a whitelist
|
|
12
13
|
// since SVGs and animated GIFs are also images, which are generally considered a security risk.
|
|
13
14
|
if (['image/jpeg', 'image/png'].includes(type)) {
|
|
14
|
-
return _jsx("img", { src: dataURL, style: { maxWidth: '100%' }, className: 'file-preview' });
|
|
15
|
+
return _jsx("img", { src: dataURL, alt: previewLabel, style: { maxWidth: '100%' }, className: 'file-preview' });
|
|
15
16
|
}
|
|
16
17
|
// otherwise, let users download file
|
|
17
|
-
return (_jsxs(_Fragment, { children: [' ', _jsx("a", { download: `preview-${name}`, href: dataURL, className: 'file-download', children:
|
|
18
|
+
return (_jsxs(_Fragment, { children: [' ', _jsx("a", { download: `preview-${name}`, href: dataURL, className: 'file-download', children: previewLabel })] }));
|
|
18
19
|
}
|
|
19
20
|
function FilesInfo({ filesInfo, registry, preview, onRemove, options, }) {
|
|
20
21
|
if (filesInfo.length === 0) {
|
|
@@ -39,6 +40,7 @@ function FileWidget(props) {
|
|
|
39
40
|
const handleOnChangeEvent = (event) => {
|
|
40
41
|
if (event.target.files) {
|
|
41
42
|
// handleChange is async; DOM event handlers are void-returning, so we intentionally don't await
|
|
43
|
+
// oxlint-disable-next-line no-floating-promises, no-void
|
|
42
44
|
void handleChange(event.target.files);
|
|
43
45
|
}
|
|
44
46
|
};
|
|
@@ -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
|
/** The `HiddenWidget` is a widget for rendering a hidden input field.
|
|
3
3
|
* It is typically used by setting type to "hidden".
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/HiddenWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"HiddenWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/HiddenWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9F;;;;GAIG;AACH,iBAAS,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACvG,EAAE,EACF,KAAK,EACL,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAEtB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -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
|
/** The `PasswordWidget` component uses the `BaseInputTemplate` changing the type to `password`.
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `WidgetProps` for this component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/PasswordWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PasswordWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/PasswordWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAI5B"}
|
|
@@ -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
|
/** The `RadioWidget` is a widget for rendering a radio group.
|
|
3
3
|
* It is typically used with a string property constrained with enum options.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/RadioWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/RadioWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAU9F;;;;GAIG;AACH,iBAAS,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACtG,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,EAAE,EACF,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA0DtB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -14,11 +14,11 @@ function RadioWidget({ options, value, required, disabled, readonly, autofocus =
|
|
|
14
14
|
return (_jsx("div", { className: 'field-radio-group', id: id, role: 'radiogroup', children: Array.isArray(enumOptions) &&
|
|
15
15
|
enumOptions.map((option, i) => {
|
|
16
16
|
const checked = enumOptionsIsSelected(option.value, value);
|
|
17
|
-
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.
|
|
17
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
|
|
18
18
|
const disabledCls = disabled || itemDisabled || readonly ? 'disabled' : '';
|
|
19
19
|
const handleChange = () => onChange(option.value);
|
|
20
20
|
const radio = (_jsxs("span", { children: [_jsx("input", { type: 'radio', id: optionId(id, i), checked: checked, name: htmlName || id, required: required, value: enumOptionValueEncoder(option.value, i, optionValueFormat), disabled: disabled || itemDisabled || readonly, autoFocus: autofocus && i === 0, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id) }), _jsx("span", { children: option.label })] }));
|
|
21
|
-
return inline ? (_jsx("label", { className: `radio-inline ${disabledCls}`, children: radio },
|
|
21
|
+
return inline ? (_jsx("label", { className: `radio-inline ${disabledCls}`, children: radio }, String(option.value))) : (_jsx("div", { className: `radio ${disabledCls}`, children: _jsx("label", { children: radio }) }, String(option.value)));
|
|
22
22
|
}) }));
|
|
23
23
|
}
|
|
24
24
|
export default RadioWidget;
|
|
@@ -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
|
/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result
|
|
3
3
|
* in a div, with the value along side it.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/RangeWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"RangeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/RangeWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9F;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACnH,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAc5B"}
|
|
@@ -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
|
/** The `RatingWidget` component renders a star or heart rating input
|
|
3
3
|
*
|
|
4
4
|
* Features:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RatingWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/RatingWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RatingWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/RatingWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9F;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,EACA,EAAE,EACF,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAiGtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
/** The `RatingWidget` component renders a star or heart rating input
|
|
4
4
|
*
|
|
@@ -46,18 +46,18 @@ export default function RatingWidget({ id, value, required, disabled, readonly,
|
|
|
46
46
|
}
|
|
47
47
|
return isFilled ? '★' : '☆';
|
|
48
48
|
};
|
|
49
|
-
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
return (_jsxs("div", { className: 'rating-widget', style: {
|
|
50
|
+
display: 'inline-flex',
|
|
51
|
+
fontSize: '1.5rem',
|
|
52
|
+
cursor: disabled || readonly ? 'default' : 'pointer',
|
|
53
|
+
}, children: [[...Array(numStars)].map((_, index) => {
|
|
54
|
+
const starValue = min + index;
|
|
55
|
+
const isFilled = starValue <= value;
|
|
56
|
+
return (_jsx("span", { onClick: () => handleStarClick(starValue), onKeyDown: (e) => (e.key === 'Enter' || e.key === ' ') && handleStarClick(starValue), onFocus: handleFocus, onBlur: handleBlur, "data-value": starValue, tabIndex: disabled || readonly ? -1 : 0, role: 'radio', "aria-checked": starValue === value, "aria-label": `${starValue} ${shape === 'heart' ? 'heart' : 'star'}${starValue === 1 ? '' : 's'}`, style: {
|
|
57
|
+
color: isFilled ? '#FFD700' : '#ccc',
|
|
58
|
+
padding: '0 0.2rem',
|
|
59
|
+
transition: 'color 0.2s',
|
|
60
|
+
userSelect: 'none',
|
|
61
|
+
}, children: getSymbol(isFilled) }, index));
|
|
62
|
+
}), _jsx("input", { type: 'hidden', id: id, name: htmlName || id, value: value || '', required: required, disabled: disabled || readonly, "aria-hidden": 'true' })] }));
|
|
63
63
|
}
|
|
@@ -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
|
/** The `SelectWidget` is a widget for rendering dropdowns.
|
|
3
3
|
* It is typically used with string properties constrained with enum options.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/SelectWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/SelectWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAmB9F;;;;GAIG;AACH,iBAAS,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACvG,MAAM,EACN,EAAE,EACF,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAgB,EAChB,SAAiB,EACjB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAgEtB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -33,10 +33,10 @@ function SelectWidget({ schema, id, options, value, required, disabled, readonly
|
|
|
33
33
|
}, [onChange, multiple, enumOptions, optEmptyVal, optionValueFormat]);
|
|
34
34
|
const selectValue = enumOptionSelectedValue(value, enumOptions, multiple, optionValueFormat, emptyValue);
|
|
35
35
|
const showPlaceholderOption = !multiple && schema.default === undefined;
|
|
36
|
-
return (_jsxs("select", { id: id, name: htmlName || id, multiple: multiple,
|
|
37
|
-
enumOptions.map(({ value, label }, i) => {
|
|
38
|
-
const
|
|
39
|
-
return (_jsx("option", { value: enumOptionValueEncoder(
|
|
36
|
+
return (_jsxs("select", { id: id, name: htmlName || id, multiple: multiple, className: 'form-control', value: selectValue, required: required, disabled: disabled || readonly, autoFocus: autofocus, onBlur: handleBlur, onFocus: handleFocus, onChange: handleChange, "aria-describedby": ariaDescribedByIds(id), children: [showPlaceholderOption && _jsx("option", { value: '', children: placeholder }), Array.isArray(enumOptions) &&
|
|
37
|
+
enumOptions.map(({ value: enumValue, label: enumLabel }, i) => {
|
|
38
|
+
const isDisabled = enumDisabled && enumDisabled.includes(enumValue);
|
|
39
|
+
return (_jsx("option", { value: enumOptionValueEncoder(enumValue, i, optionValueFormat), disabled: isDisabled, children: enumLabel }, String(enumValue)));
|
|
40
40
|
})] }));
|
|
41
41
|
}
|
|
42
42
|
export default SelectWidget;
|
|
@@ -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
|
/** The `TextWidget` component uses the `BaseInputTemplate`.
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `WidgetProps` for this component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/TextWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TextWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/TextWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;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,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAK5B"}
|
|
@@ -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
|
/** The `TextareaWidget` is a widget for rendering input fields as textarea.
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `WidgetProps` for this component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/TextareaWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextareaWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/TextareaWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;GAGG;AACH,iBAAS,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACzG,EAAE,EACF,OAAY,EACZ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAiB,EACjB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAmCtB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -6,9 +6,9 @@ import { ariaDescribedByIds } from '@rjsf/utils';
|
|
|
6
6
|
* @param props - The `WidgetProps` for this component
|
|
7
7
|
*/
|
|
8
8
|
function TextareaWidget({ id, options = {}, placeholder, value, required, disabled, readonly, autofocus = false, onChange, onBlur, onFocus, htmlName, }) {
|
|
9
|
-
const handleChange = useCallback(({ target: { value } }) => onChange(
|
|
9
|
+
const handleChange = useCallback(({ target: { value: newValue } }) => onChange(newValue === '' ? options.emptyValue : newValue), [onChange, options.emptyValue]);
|
|
10
10
|
const handleBlur = useCallback(({ target }) => onBlur(id, target && target.value), [onBlur, id]);
|
|
11
11
|
const handleFocus = useCallback(({ target }) => onFocus(id, target && target.value), [id, onFocus]);
|
|
12
|
-
return (_jsx("textarea", { id: id, name: htmlName || id, className: 'form-control', value: value
|
|
12
|
+
return (_jsx("textarea", { id: id, name: htmlName || id, className: 'form-control', value: value || '', placeholder: placeholder, required: required, disabled: disabled, readOnly: readonly, autoFocus: autofocus, rows: options.rows, onBlur: handleBlur, onFocus: handleFocus, onChange: handleChange, "aria-describedby": ariaDescribedByIds(id) }));
|
|
13
13
|
}
|
|
14
14
|
export default TextareaWidget;
|
|
@@ -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
|
/** The `TimeWidget` component uses the `BaseInputTemplate` changing the type to `time` and transforms
|
|
3
3
|
* the value to undefined when it is falsy during the `onChange` handling.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/TimeWidget.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"TimeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/TimeWidget.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;;GAIG;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,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAO5B"}
|
|
@@ -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
|
/** The `URLWidget` component uses the `BaseInputTemplate` changing the type to `url`.
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `WidgetProps` for this component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"URLWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/URLWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"URLWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/URLWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACjH,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAK5B"}
|
|
@@ -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
|
/** The `UpDownWidget` component uses the `BaseInputTemplate` changing the type to `number`.
|
|
3
3
|
*
|
|
4
4
|
* @param props - The `WidgetProps` for this component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpDownWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/UpDownWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"UpDownWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/UpDownWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACpH,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAK5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
declare function widgets<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): RegistryWidgetsType<T, S, F>;
|
|
3
3
|
export default widgets;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAuBtG,iBAAS,OAAO,CACd,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAuBhC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormContextType, Registry, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, Registry, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
/** The default registry consists of all the fields, templates and widgets provided in the core implementation,
|
|
3
3
|
* plus an empty `rootSchema` and `formContext. We omit schemaUtils here because it cannot be defaulted without a
|
|
4
4
|
* rootSchema and validator. It will be added into the computed registry later in the Form.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultRegistry.d.ts","sourceRoot":"","sources":["../src/getDefaultRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getDefaultRegistry.d.ts","sourceRoot":"","sources":["../src/getDefaultRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO3F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAc1C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_ID_PREFIX, DEFAULT_ID_SEPARATOR, englishStringTranslator
|
|
1
|
+
import { DEFAULT_ID_PREFIX, DEFAULT_ID_SEPARATOR, englishStringTranslator } from '@rjsf/utils';
|
|
2
2
|
import fields from './components/fields/index.js';
|
|
3
3
|
import templates from './components/templates/index.js';
|
|
4
4
|
import widgets from './components/widgets/index.js';
|
package/lib/getTestRegistry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Registry } from '@rjsf/utils';
|
|
1
|
+
import type { Registry } from '@rjsf/utils';
|
|
2
2
|
/** Use for react testing library tests where we directly test the component rather than testing inside a Form
|
|
3
3
|
*/
|
|
4
4
|
export default function getTestRegistry(rootSchema: Registry['rootSchema'], fields?: Registry['fields'], templates?: Partial<Registry['templates']>, widgets?: Registry['widgets'], formContext?: Registry['formContext'], globalFormOptions?: Registry['globalFormOptions']): Registry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTestRegistry.d.ts","sourceRoot":"","sources":["../src/getTestRegistry.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getTestRegistry.d.ts","sourceRoot":"","sources":["../src/getTestRegistry.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAM5C;GACG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,EAClC,MAAM,GAAE,QAAQ,CAAC,QAAQ,CAAM,EAC/B,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAM,EAC9C,OAAO,GAAE,QAAQ,CAAC,SAAS,CAAM,EACjC,WAAW,GAAE,QAAQ,CAAC,aAAa,CAAM,EACzC,iBAAiB,GAAE,QAAQ,CAAC,mBAAmB,CAI9C,GACA,QAAQ,CAaV"}
|
package/lib/getTestRegistry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_ID_PREFIX, DEFAULT_ID_SEPARATOR, createSchemaUtils, englishStringTranslator
|
|
1
|
+
import { DEFAULT_ID_PREFIX, DEFAULT_ID_SEPARATOR, createSchemaUtils, englishStringTranslator } from '@rjsf/utils';
|
|
2
2
|
import validator from '@rjsf/validator-ajv8';
|
|
3
3
|
import getDefaultRegistry from './getDefaultRegistry.js';
|
|
4
4
|
/** Use for react testing library tests where we directly test the component rather than testing inside a Form
|
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import type { FormProps, FormState, IChangeEvent } from './components/Form.js';
|
|
2
|
+
import Form from './components/Form.js';
|
|
3
|
+
import type { RichDescriptionProps } from './components/RichDescription.js';
|
|
4
|
+
import RichDescription from './components/RichDescription.js';
|
|
5
|
+
import type { RichHelpProps } from './components/RichHelp.js';
|
|
6
|
+
import RichHelp from './components/RichHelp.js';
|
|
7
|
+
import type { SchemaExamplesProps } from './components/SchemaExamples.js';
|
|
8
|
+
import SchemaExamples from './components/SchemaExamples.js';
|
|
5
9
|
import getDefaultRegistry from './getDefaultRegistry.js';
|
|
6
10
|
import getTestRegistry from './getTestRegistry.js';
|
|
7
|
-
import
|
|
11
|
+
import type { ThemeProps } from './withTheme.js';
|
|
12
|
+
import withTheme from './withTheme.js';
|
|
8
13
|
export type { FormProps, FormState, IChangeEvent, ThemeProps, RichDescriptionProps, RichHelpProps, SchemaExamplesProps, };
|
|
9
14
|
export { withTheme, getDefaultRegistry, getTestRegistry, RichDescription, RichHelp, SchemaExamples };
|
|
10
15
|
export default Form;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,YAAY,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,mBAAmB,GACpB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AACrG,eAAe,IAAI,CAAC"}
|