@rjsf/utils 6.6.1 → 6.7.0
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/LICENSE.md +201 -0
- package/dist/index.cjs +534 -376
- package/dist/index.cjs.map +4 -4
- package/dist/utils.esm.js +534 -376
- package/dist/utils.esm.js.map +4 -4
- package/dist/utils.umd.js +561 -400
- package/lib/ErrorSchemaBuilder.d.ts +1 -1
- package/lib/SelectedOptionDescription.d.ts +4 -0
- package/lib/SelectedOptionDescription.js +24 -0
- package/lib/SelectedOptionDescription.js.map +1 -0
- package/lib/allowAdditionalItems.d.ts +1 -1
- package/lib/allowAdditionalItems.js +1 -0
- package/lib/allowAdditionalItems.js.map +1 -1
- package/lib/asNumber.js +2 -0
- package/lib/asNumber.js.map +1 -1
- package/lib/canExpand.d.ts +1 -1
- package/lib/constIsAjvDataReference.d.ts +1 -1
- package/lib/constants.d.ts +8 -5
- package/lib/constants.js +10 -7
- package/lib/constants.js.map +1 -1
- package/lib/createErrorHandler.d.ts +1 -1
- package/lib/createErrorHandler.js +2 -6
- package/lib/createErrorHandler.js.map +1 -1
- package/lib/createSchemaUtils.d.ts +1 -1
- package/lib/createSchemaUtils.js +3 -1
- package/lib/createSchemaUtils.js.map +1 -1
- package/lib/dataURItoBlob.js +3 -3
- package/lib/dataURItoBlob.js.map +1 -1
- package/lib/dateRangeOptions.d.ts +1 -1
- package/lib/dateRangeOptions.js +8 -7
- package/lib/dateRangeOptions.js.map +1 -1
- package/lib/englishStringTranslator.d.ts +1 -1
- package/lib/enumOptionSelectedValue.d.ts +1 -1
- package/lib/enumOptionValueDecoder.d.ts +1 -1
- package/lib/enumOptionValueDecoder.js +1 -1
- package/lib/enumOptionValueDecoder.js.map +1 -1
- package/lib/enumOptionValueEncoder.d.ts +1 -1
- package/lib/enumOptionsDeselectValue.d.ts +1 -1
- package/lib/enumOptionsIndexForValue.d.ts +1 -1
- package/lib/enumOptionsIndexForValue.js.map +1 -1
- package/lib/enumOptionsIsSelected.d.ts +1 -1
- package/lib/enumOptionsSelectValue.d.ts +1 -1
- package/lib/enumOptionsValueForIndex.d.ts +2 -2
- package/lib/enumOptionsValueForIndex.js.map +1 -1
- package/lib/enums.d.ts +4 -0
- package/lib/enums.js +4 -0
- package/lib/enums.js.map +1 -1
- package/lib/findSchemaDefinition.d.ts +1 -1
- package/lib/findSchemaDefinition.js +15 -15
- package/lib/findSchemaDefinition.js.map +1 -1
- package/lib/getChangedFields.js +4 -6
- package/lib/getChangedFields.js.map +1 -1
- package/lib/getDateElementProps.d.ts +3 -3
- package/lib/getDiscriminatorFieldFromSchema.d.ts +1 -1
- package/lib/getDiscriminatorFieldFromSchema.js +1 -0
- package/lib/getDiscriminatorFieldFromSchema.js.map +1 -1
- package/lib/getInputProps.d.ts +1 -1
- package/lib/getOptionMatchingSimpleDiscriminator.d.ts +1 -1
- package/lib/getOptionMatchingSimpleDiscriminator.js +10 -11
- package/lib/getOptionMatchingSimpleDiscriminator.js.map +1 -1
- package/lib/getOptionValueFormat.d.ts +1 -1
- package/lib/getSchemaType.d.ts +1 -1
- package/lib/getSchemaType.js +2 -1
- package/lib/getSchemaType.js.map +1 -1
- package/lib/getSubmitButtonOptions.d.ts +1 -1
- package/lib/getSubmitButtonOptions.js +1 -1
- package/lib/getSubmitButtonOptions.js.map +1 -1
- package/lib/getTemplate.d.ts +1 -1
- package/lib/getTestIds.d.ts +1 -1
- package/lib/getUiOptions.d.ts +1 -1
- package/lib/getUiOptions.js +2 -1
- package/lib/getUiOptions.js.map +1 -1
- package/lib/getWidget.d.ts +1 -1
- package/lib/getWidget.js +4 -4
- package/lib/getWidget.js.map +1 -1
- package/lib/guessType.js +1 -1
- package/lib/guessType.js.map +1 -1
- package/lib/hasWidget.d.ts +1 -1
- package/lib/hashForSchema.d.ts +3 -1
- package/lib/hashForSchema.js +11 -4
- package/lib/hashForSchema.js.map +1 -1
- package/lib/idGenerators.d.ts +1 -1
- package/lib/index.d.ts +14 -7
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -1
- package/lib/isConstant.d.ts +1 -1
- package/lib/isCustomWidget.d.ts +1 -1
- package/lib/isCustomWidget.js +1 -1
- package/lib/isCustomWidget.js.map +1 -1
- package/lib/isFixedItems.d.ts +3 -3
- package/lib/isFixedItems.js +3 -3
- package/lib/isFixedItems.js.map +1 -1
- package/lib/isRootSchema.d.ts +1 -1
- package/lib/isRootSchema.js +2 -3
- package/lib/isRootSchema.js.map +1 -1
- package/lib/labelValue.d.ts +1 -1
- package/lib/logUnsupportedDefaultForEnum.d.ts +9 -0
- package/lib/logUnsupportedDefaultForEnum.js +18 -0
- package/lib/logUnsupportedDefaultForEnum.js.map +1 -0
- package/lib/lookupFromFormContext.d.ts +1 -1
- package/lib/mergeDefaultsWithFormData.js +6 -5
- package/lib/mergeDefaultsWithFormData.js.map +1 -1
- package/lib/mergeObjects.d.ts +4 -2
- package/lib/mergeObjects.js +1 -1
- package/lib/mergeObjects.js.map +1 -1
- package/lib/mergeSchemas.d.ts +4 -2
- package/lib/mergeSchemas.js +13 -6
- package/lib/mergeSchemas.js.map +1 -1
- package/lib/nameGenerators.d.ts +1 -1
- package/lib/optionsList.d.ts +1 -1
- package/lib/optionsList.js +22 -21
- package/lib/optionsList.js.map +1 -1
- package/lib/orderProperties.js +3 -3
- package/lib/orderProperties.js.map +1 -1
- package/lib/pad.js +1 -1
- package/lib/pad.js.map +1 -1
- package/lib/parseDateString.d.ts +1 -1
- package/lib/parseDateString.js +1 -1
- package/lib/parseDateString.js.map +1 -1
- package/lib/parser/ParserValidator.d.ts +2 -4
- package/lib/parser/ParserValidator.js +2 -0
- package/lib/parser/ParserValidator.js.map +1 -1
- package/lib/parser/index.d.ts +1 -1
- package/lib/parser/schemaParser.d.ts +2 -2
- package/lib/parser/schemaParser.js +7 -7
- package/lib/parser/schemaParser.js.map +1 -1
- package/lib/rangeSpec.d.ts +1 -2
- package/lib/rangeSpec.js.map +1 -1
- package/lib/removeOptionalEmptyObjects.d.ts +1 -1
- package/lib/removeOptionalEmptyObjects.js +6 -8
- package/lib/removeOptionalEmptyObjects.js.map +1 -1
- package/lib/resolveUiSchema.d.ts +1 -1
- package/lib/resolveUiSchema.js +16 -16
- package/lib/resolveUiSchema.js.map +1 -1
- package/lib/schema/findFieldInSchema.d.ts +1 -1
- package/lib/schema/findSelectedOptionInXxxOf.d.ts +1 -1
- package/lib/schema/findSelectedOptionInXxxOf.js +1 -3
- package/lib/schema/findSelectedOptionInXxxOf.js.map +1 -1
- package/lib/schema/getClosestMatchingOption.d.ts +1 -1
- package/lib/schema/getClosestMatchingOption.js +6 -9
- package/lib/schema/getClosestMatchingOption.js.map +1 -1
- package/lib/schema/getDefaultFormState.d.ts +4 -4
- package/lib/schema/getDefaultFormState.js +81 -43
- package/lib/schema/getDefaultFormState.js.map +1 -1
- package/lib/schema/getDisplayLabel.d.ts +1 -1
- package/lib/schema/getDisplayLabel.js +2 -3
- package/lib/schema/getDisplayLabel.js.map +1 -1
- package/lib/schema/getFirstMatchingOption.d.ts +1 -1
- package/lib/schema/getFirstMatchingOption.js +2 -2
- package/lib/schema/getFirstMatchingOption.js.map +1 -1
- package/lib/schema/getFromSchema.d.ts +1 -1
- package/lib/schema/index.js +9 -3
- package/lib/schema/index.js.map +1 -1
- package/lib/schema/isFilesArray.d.ts +1 -1
- package/lib/schema/isMultiSelect.d.ts +1 -1
- package/lib/schema/isMultiSelect.js.map +1 -1
- package/lib/schema/isSelect.d.ts +1 -1
- package/lib/schema/isSelect.js +1 -1
- package/lib/schema/isSelect.js.map +1 -1
- package/lib/schema/omitExtraData.d.ts +1 -1
- package/lib/schema/omitExtraData.js +66 -52
- package/lib/schema/omitExtraData.js.map +1 -1
- package/lib/schema/retrieveSchema.d.ts +7 -3
- package/lib/schema/retrieveSchema.js +83 -56
- package/lib/schema/retrieveSchema.js.map +1 -1
- package/lib/schema/sanitizeDataForNewSchema.d.ts +1 -1
- package/lib/schema/sanitizeDataForNewSchema.js +48 -7
- package/lib/schema/sanitizeDataForNewSchema.js.map +1 -1
- package/lib/schema/toPathSchema.d.ts +1 -1
- package/lib/schema/toPathSchema.js +9 -5
- package/lib/schema/toPathSchema.js.map +1 -1
- package/lib/schemaRequiresTrueValue.d.ts +1 -1
- package/lib/schemaRequiresTrueValue.js +4 -3
- package/lib/schemaRequiresTrueValue.js.map +1 -1
- package/lib/shallowEquals.js +2 -2
- package/lib/shallowEquals.js.map +1 -1
- package/lib/shouldRenderOptionalField.d.ts +1 -1
- package/lib/toConstant.d.ts +1 -1
- package/lib/toDateString.d.ts +1 -1
- package/lib/toErrorList.d.ts +1 -1
- package/lib/toErrorList.js +3 -3
- package/lib/toErrorList.js.map +1 -1
- package/lib/toErrorSchema.d.ts +1 -1
- package/lib/toFieldPathId.d.ts +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types.d.ts +63 -57
- package/lib/unwrapErrorHandler.d.ts +1 -1
- package/lib/unwrapErrorHandler.js +7 -9
- package/lib/unwrapErrorHandler.js.map +1 -1
- package/lib/useAltDateWidgetProps.d.ts +6 -6
- package/lib/useAltDateWidgetProps.js +3 -3
- package/lib/useAltDateWidgetProps.js.map +1 -1
- package/lib/useFileWidgetProps.d.ts +2 -2
- package/lib/useFileWidgetProps.js +3 -3
- package/lib/useFileWidgetProps.js.map +1 -1
- package/lib/validationDataMerge.d.ts +1 -1
- package/lib/withIdRefPrefix.d.ts +1 -1
- package/lib/withIdRefPrefix.js +12 -12
- package/lib/withIdRefPrefix.js.map +1 -1
- package/package.json +19 -19
- package/src/ErrorSchemaBuilder.ts +1 -1
- package/src/SelectedOptionDescription.tsx +48 -0
- package/src/allowAdditionalItems.ts +2 -1
- package/src/asNumber.ts +2 -0
- package/src/canExpand.ts +1 -1
- package/src/constIsAjvDataReference.ts +2 -2
- package/src/constants.ts +10 -7
- package/src/createErrorHandler.ts +6 -7
- package/src/createSchemaUtils.ts +4 -2
- package/src/dataURItoBlob.ts +3 -3
- package/src/dateRangeOptions.ts +9 -7
- package/src/englishStringTranslator.ts +1 -1
- package/src/enumOptionSelectedValue.ts +1 -1
- package/src/enumOptionValueDecoder.ts +2 -2
- package/src/enumOptionValueEncoder.ts +1 -1
- package/src/enumOptionsDeselectValue.ts +1 -1
- package/src/enumOptionsIndexForValue.ts +2 -2
- package/src/enumOptionsIsSelected.ts +1 -1
- package/src/enumOptionsSelectValue.ts +1 -1
- package/src/enumOptionsValueForIndex.ts +2 -2
- package/src/enums.ts +4 -0
- package/src/findSchemaDefinition.ts +18 -17
- package/src/getChangedFields.ts +5 -5
- package/src/getDateElementProps.ts +3 -3
- package/src/getDiscriminatorFieldFromSchema.ts +2 -1
- package/src/getInputProps.ts +1 -1
- package/src/getOptionMatchingSimpleDiscriminator.ts +11 -15
- package/src/getOptionValueFormat.ts +1 -1
- package/src/getSchemaType.ts +3 -2
- package/src/getSubmitButtonOptions.ts +3 -3
- package/src/getTemplate.ts +1 -1
- package/src/getTestIds.ts +1 -1
- package/src/getUiOptions.ts +10 -2
- package/src/getWidget.tsx +5 -6
- package/src/guessType.ts +1 -1
- package/src/hasWidget.ts +1 -1
- package/src/hashForSchema.ts +12 -5
- package/src/idGenerators.ts +1 -1
- package/src/index.ts +16 -5
- package/src/isConstant.ts +1 -1
- package/src/isCustomWidget.ts +2 -2
- package/src/isFixedItems.ts +4 -4
- package/src/isRootSchema.ts +3 -5
- package/src/labelValue.ts +1 -1
- package/src/logUnsupportedDefaultForEnum.ts +28 -0
- package/src/lookupFromFormContext.ts +1 -1
- package/src/mergeDefaultsWithFormData.ts +8 -7
- package/src/mergeObjects.ts +2 -2
- package/src/mergeSchemas.ts +14 -7
- package/src/nameGenerators.ts +1 -1
- package/src/optionsList.ts +21 -23
- package/src/orderProperties.ts +4 -4
- package/src/pad.ts +1 -1
- package/src/parseDateString.ts +2 -2
- package/src/parser/ParserValidator.ts +4 -4
- package/src/parser/index.ts +1 -1
- package/src/parser/schemaParser.ts +10 -9
- package/src/rangeSpec.ts +1 -2
- package/src/removeOptionalEmptyObjects.ts +8 -11
- package/src/resolveUiSchema.ts +32 -25
- package/src/schema/findFieldInSchema.ts +1 -1
- package/src/schema/findSelectedOptionInXxxOf.ts +17 -7
- package/src/schema/getClosestMatchingOption.ts +17 -11
- package/src/schema/getDefaultFormState.ts +104 -43
- package/src/schema/getDisplayLabel.ts +4 -5
- package/src/schema/getFirstMatchingOption.ts +3 -3
- package/src/schema/getFromSchema.ts +1 -1
- package/src/schema/index.ts +3 -0
- package/src/schema/isFilesArray.ts +1 -1
- package/src/schema/isMultiSelect.ts +7 -1
- package/src/schema/isSelect.ts +8 -2
- package/src/schema/omitExtraData.ts +73 -60
- package/src/schema/retrieveSchema.ts +131 -83
- package/src/schema/sanitizeDataForNewSchema.ts +57 -8
- package/src/schema/toPathSchema.ts +11 -7
- package/src/schemaRequiresTrueValue.ts +4 -4
- package/src/shallowEquals.ts +2 -2
- package/src/shouldRenderOptionalField.ts +1 -1
- package/src/toConstant.ts +1 -1
- package/src/toDateString.ts +1 -1
- package/src/toErrorList.ts +4 -4
- package/src/toErrorSchema.ts +1 -1
- package/src/toFieldPathId.ts +1 -1
- package/src/types.ts +92 -63
- package/src/unwrapErrorHandler.ts +11 -12
- package/src/useAltDateWidgetProps.tsx +10 -8
- package/src/useFileWidgetProps.ts +7 -7
- package/src/validationDataMerge.ts +1 -1
- package/src/withIdRefPrefix.ts +12 -12
package/lib/types.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ChangeEvent, ComponentType, FocusEvent, HTMLAttributes, ReactElement, ReactNode, StyleHTMLAttributes } from 'react';
|
|
2
|
-
import { JSONSchema7 } from 'json-schema';
|
|
3
|
-
import { TranslatableString } from './enums.js';
|
|
2
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
3
|
+
import type { TranslatableString } from './enums.js';
|
|
4
4
|
import './jsonSchemaAugmentation.js';
|
|
5
5
|
/** The representation of any generic object type, usually used as an intersection on other types to make them more
|
|
6
6
|
* flexible in the properties they support (i.e. anything else)
|
|
7
7
|
*/
|
|
8
|
-
export type GenericObjectType =
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export type GenericObjectType = Record<string, any>;
|
|
9
|
+
/** The representation of any generic object type, usually used as an intersection on other types to make them more
|
|
10
|
+
* flexible in the properties they support (i.e. anything else) AND symbol markers with a value of string or boolean
|
|
11
|
+
*/
|
|
12
|
+
export type GenericSymbolObjectType = GenericObjectType & Record<symbol, boolean | string>;
|
|
11
13
|
/** Map the JSONSchema7 to our own type so that we can easily bump to a more recent version at some future date and only
|
|
12
14
|
* have to update this one type.
|
|
13
15
|
*/
|
|
@@ -15,6 +17,10 @@ export type StrictRJSFSchema = JSONSchema7;
|
|
|
15
17
|
/** Allow for more flexible schemas (i.e. draft-2019) than the strict JSONSchema7
|
|
16
18
|
*/
|
|
17
19
|
export type RJSFSchema = StrictRJSFSchema & GenericObjectType;
|
|
20
|
+
/** Allow for more flexible schemas (i.e. draft-2019) than the strict JSONSchema7 with special marking added by
|
|
21
|
+
* `retrieveSchema()`
|
|
22
|
+
*/
|
|
23
|
+
export type RJSFMarkedSchema = StrictRJSFSchema & GenericSymbolObjectType;
|
|
18
24
|
/** Alias GenericObjectType as FormContextType to allow us to remap this at some future date
|
|
19
25
|
*/
|
|
20
26
|
export type FormContextType = GenericObjectType;
|
|
@@ -32,7 +38,7 @@ export type OptionValueFormat = 'indexed' | 'realValue';
|
|
|
32
38
|
export type NameGeneratorFunction = (path: FieldPathList, idPrefix: string, isMultiValue?: boolean) => string;
|
|
33
39
|
/** Experimental feature that specifies the Array `minItems` default form state behavior
|
|
34
40
|
*/
|
|
35
|
-
export
|
|
41
|
+
export interface Experimental_ArrayMinItems {
|
|
36
42
|
/** Optional enumerated flag controlling how array minItems are populated, defaulting to `all`:
|
|
37
43
|
* - `all`: Legacy behavior, populate minItems entries with default values initially and include an empty array when
|
|
38
44
|
* no values have been defined.
|
|
@@ -57,13 +63,13 @@ export type Experimental_ArrayMinItems = {
|
|
|
57
63
|
* `formData` until the `minItems` condition is met.
|
|
58
64
|
*/
|
|
59
65
|
mergeExtraDefaults?: boolean;
|
|
60
|
-
}
|
|
66
|
+
}
|
|
61
67
|
/** Experimental features to specify different default form state behaviors. Currently, this affects the
|
|
62
68
|
* handling of optional array fields where `minItems` is set and handling of setting defaults based on the
|
|
63
69
|
* value of `emptyObjectFields`. It also affects how `allOf` fields are handled and how to handle merging defaults into
|
|
64
70
|
* the formData in relation to explicit `undefined` values via `mergeDefaultsIntoFormData`.
|
|
65
71
|
*/
|
|
66
|
-
export
|
|
72
|
+
export interface Experimental_DefaultFormStateBehavior {
|
|
67
73
|
/** Optional object, that controls how the default form state for arrays with `minItems` is handled. When not provided
|
|
68
74
|
* it defaults to `{ populate: 'all' }`.
|
|
69
75
|
*/
|
|
@@ -102,7 +108,13 @@ export type Experimental_DefaultFormStateBehavior = {
|
|
|
102
108
|
*
|
|
103
109
|
*/
|
|
104
110
|
constAsDefaults?: 'always' | 'skipOneOf' | 'never';
|
|
105
|
-
|
|
111
|
+
/** Optional enumerated flag controlling how defaults defined on multiple levels are merged together for overlapping
|
|
112
|
+
* properties, defaulting to `descendantWins`.
|
|
113
|
+
* - `descendantWins`: The innermost (descendant) default value definition takes precedence over its ancestor's defaults.
|
|
114
|
+
* - `ancestorWins`: The outermost (ancestor) default value definition takes precedence over any descendant's defaults.
|
|
115
|
+
*/
|
|
116
|
+
nestedDefaultsPrecedence?: 'descendantWins' | 'ancestorWins';
|
|
117
|
+
}
|
|
106
118
|
/** Optional function that allows for custom merging of `allOf` schemas
|
|
107
119
|
* @param schema - Schema with `allOf` that needs to be merged
|
|
108
120
|
* @returns The merged schema
|
|
@@ -124,16 +136,16 @@ export interface DateObject {
|
|
|
124
136
|
second?: number;
|
|
125
137
|
}
|
|
126
138
|
/** Properties describing a Range specification in terms of attribute that can be added to the `HTML` `<input>` */
|
|
127
|
-
export
|
|
139
|
+
export interface RangeSpecType {
|
|
128
140
|
/** Specifies the interval between legal numbers in an input field */
|
|
129
141
|
step?: number;
|
|
130
142
|
/** Specifies a minimum value for an <input> element */
|
|
131
143
|
min?: number;
|
|
132
144
|
/** Specifies the maximum value for an <input> element */
|
|
133
145
|
max?: number;
|
|
134
|
-
}
|
|
146
|
+
}
|
|
135
147
|
/** Properties describing a Range specification in terms of attribute that can be added to the `HTML` `<input>` */
|
|
136
|
-
export
|
|
148
|
+
export interface InputPropsType {
|
|
137
149
|
/** Specifies the type of the <input> element */
|
|
138
150
|
type: string;
|
|
139
151
|
/** Specifies the interval between legal numbers in an input field or "any" */
|
|
@@ -146,7 +158,7 @@ export type InputPropsType = {
|
|
|
146
158
|
autoComplete?: HTMLInputElement['autocomplete'];
|
|
147
159
|
/** Specifies a filter for what file types the user can upload. */
|
|
148
160
|
accept?: HTMLInputElement['accept'];
|
|
149
|
-
}
|
|
161
|
+
}
|
|
150
162
|
/** The list of path elements that represents where in the schema a field is located. When the item in the field list is
|
|
151
163
|
* a string, then it represents the name of the property within an object. When it is a number, then it represents the
|
|
152
164
|
* index within an array.
|
|
@@ -160,29 +172,29 @@ export type FieldPathList = (string | number)[];
|
|
|
160
172
|
/** Dot string or segment list for `getFromSchema` / `findFieldInSchema` (same segment rules as {@link FieldPathList}). */
|
|
161
173
|
export type SchemaFieldPath = string | FieldPathList;
|
|
162
174
|
/** Type describing an id and path used for a field */
|
|
163
|
-
export
|
|
175
|
+
export interface FieldPathId {
|
|
164
176
|
/** The id for a field */
|
|
165
177
|
$id: string;
|
|
166
178
|
/** The path for a field */
|
|
167
179
|
path: FieldPathList;
|
|
168
180
|
/** The optional HTML name attribute for a field, generated by nameGenerator if provided */
|
|
169
181
|
name?: string;
|
|
170
|
-
}
|
|
182
|
+
}
|
|
171
183
|
/** Type describing a name used for a field in the `PathSchema` */
|
|
172
|
-
export
|
|
184
|
+
export interface FieldPath {
|
|
173
185
|
/** The name of a field */
|
|
174
186
|
$name: string;
|
|
175
|
-
}
|
|
187
|
+
}
|
|
176
188
|
/** Type describing a recursive structure of `FieldPath`s for an object with a non-empty set of keys
|
|
177
189
|
* @deprecated - To be removed as an exported `@rjsf/utils` type in a future release
|
|
178
190
|
*/
|
|
179
|
-
export type PathSchema<T = any> = T extends
|
|
191
|
+
export type PathSchema<T = any> = T extends (infer U)[] ? FieldPath & {
|
|
180
192
|
[i: number]: PathSchema<U>;
|
|
181
193
|
} : T extends GenericObjectType ? FieldPath & {
|
|
182
194
|
[key in keyof T]?: PathSchema<T[key]>;
|
|
183
195
|
} : FieldPath;
|
|
184
196
|
/** The type for error produced by RJSF schema validation */
|
|
185
|
-
export
|
|
197
|
+
export interface RJSFValidationError {
|
|
186
198
|
/** Name of the error, for example, "required" or "minLength" */
|
|
187
199
|
name?: string;
|
|
188
200
|
/** Message, for example, "is a required property" or "should NOT be shorter than 3 characters" */
|
|
@@ -204,14 +216,14 @@ export type RJSFValidationError = {
|
|
|
204
216
|
stack: string;
|
|
205
217
|
/** The title property for the failing field*/
|
|
206
218
|
title?: string;
|
|
207
|
-
}
|
|
219
|
+
}
|
|
208
220
|
/** The type that describes an error in a field */
|
|
209
221
|
export type FieldError = string;
|
|
210
222
|
/** The type that describes the list of errors for a field */
|
|
211
|
-
export
|
|
223
|
+
export interface FieldErrors {
|
|
212
224
|
/** The list of errors for the field */
|
|
213
225
|
__errors?: FieldError[];
|
|
214
|
-
}
|
|
226
|
+
}
|
|
215
227
|
/** Type describing a recursive structure of `FieldErrors`s for an object with a non-empty set of keys */
|
|
216
228
|
export type ErrorSchema<T = any> = FieldErrors & {
|
|
217
229
|
[key in keyof T]?: ErrorSchema<T[key]>;
|
|
@@ -226,13 +238,21 @@ export type FormValidation<T = any> = FieldValidation & {
|
|
|
226
238
|
[key in keyof T]?: FormValidation<T[key]>;
|
|
227
239
|
};
|
|
228
240
|
/** The base properties passed to various RJSF components. */
|
|
229
|
-
export
|
|
241
|
+
export interface RJSFBaseProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {
|
|
230
242
|
/** The schema object for the field being described */
|
|
231
243
|
schema: S;
|
|
232
244
|
/** The uiSchema object for this base component */
|
|
233
245
|
uiSchema?: UiSchema<T, S, F>;
|
|
234
246
|
/** The `registry` object */
|
|
235
247
|
registry: Registry<T, S, F>;
|
|
248
|
+
}
|
|
249
|
+
export type CyclicSchemaExpandProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = RJSFBaseProps<T, S, F> & {
|
|
250
|
+
/** The FieldPathId of the field in the hierarchy */
|
|
251
|
+
fieldPathId: FieldPathId;
|
|
252
|
+
/** The unique name of the field, usually derived from the name of the property in the JSONSchema */
|
|
253
|
+
name: string;
|
|
254
|
+
/** Callback used to mark a cyclic scheme element as expanded */
|
|
255
|
+
onExpand: (id: string) => void;
|
|
236
256
|
};
|
|
237
257
|
/** The properties that are passed to an `ErrorListTemplate` implementation */
|
|
238
258
|
export type ErrorListProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = RJSFBaseProps<T, S, F> & {
|
|
@@ -246,7 +266,7 @@ export type FieldErrorProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F
|
|
|
246
266
|
/** The errorSchema constructed by `Form` */
|
|
247
267
|
errorSchema?: ErrorSchema<T>;
|
|
248
268
|
/** An array of the errors */
|
|
249
|
-
errors?:
|
|
269
|
+
errors?: (string | ReactElement)[];
|
|
250
270
|
/** The FieldPathId of the field in the hierarchy */
|
|
251
271
|
fieldPathId: FieldPathId;
|
|
252
272
|
};
|
|
@@ -269,15 +289,9 @@ export interface GridTemplateProps extends GenericObjectType {
|
|
|
269
289
|
column?: boolean;
|
|
270
290
|
}
|
|
271
291
|
/** The set of `Fields` stored in the `Registry` */
|
|
272
|
-
export type RegistryFieldsType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> =
|
|
273
|
-
/** A `Field` indexed by `name` */
|
|
274
|
-
[name: string]: Field<T, S, F>;
|
|
275
|
-
};
|
|
292
|
+
export type RegistryFieldsType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Record<string, Field<T, S, F>>;
|
|
276
293
|
/** The set of `Widgets` stored in the `Registry` */
|
|
277
|
-
export type RegistryWidgetsType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> =
|
|
278
|
-
/** A `Widget` indexed by `name` */
|
|
279
|
-
[name: string]: Widget<T, S, F>;
|
|
280
|
-
};
|
|
294
|
+
export type RegistryWidgetsType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Record<string, Widget<T, S, F>>;
|
|
281
295
|
/** The set of RJSF templates that can be overridden by themes or users */
|
|
282
296
|
export type TemplatesType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = {
|
|
283
297
|
/** The template to use while rendering normal or fixed array fields */
|
|
@@ -292,6 +306,8 @@ export type TemplatesType<T = any, S extends StrictRJSFSchema = RJSFSchema, F ex
|
|
|
292
306
|
ArrayFieldTitleTemplate: ComponentType<ArrayFieldTitleProps<T, S, F>>;
|
|
293
307
|
/** The template to use while rendering the standard html input */
|
|
294
308
|
BaseInputTemplate: ComponentType<BaseInputTemplateProps<T, S, F>>;
|
|
309
|
+
/** The template to use while rendering the cyclic schema expand controls */
|
|
310
|
+
CyclicSchemaExpandTemplate: ComponentType<CyclicSchemaExpandProps<T, S, F>>;
|
|
295
311
|
/** The template to use for rendering the description of a field */
|
|
296
312
|
DescriptionFieldTemplate: ComponentType<DescriptionFieldProps<T, S, F>>;
|
|
297
313
|
/** The template to use while rendering the errors for the whole form */
|
|
@@ -335,12 +351,7 @@ export type TemplatesType<T = any, S extends StrictRJSFSchema = RJSFSchema, F ex
|
|
|
335
351
|
/** The template to use for the Clear button used for input fields */
|
|
336
352
|
ClearButton: ComponentType<IconButtonProps<T, S, F>>;
|
|
337
353
|
};
|
|
338
|
-
} &
|
|
339
|
-
/** Allow this to support any named `ComponentType` or an object of named `ComponentType`s */
|
|
340
|
-
[key: string]: ComponentType<any> | {
|
|
341
|
-
[key: string]: ComponentType<any>;
|
|
342
|
-
} | undefined;
|
|
343
|
-
};
|
|
354
|
+
} & Record<string, ComponentType<any> | Record<string, ComponentType<any>> | undefined>;
|
|
344
355
|
/** The set of UiSchema options that can be set globally and used as fallbacks at an individual template, field or
|
|
345
356
|
* widget level when no field-level value of the option is provided. Extends GenericObjectType to support allowing users
|
|
346
357
|
* to provide any value they need for their customizations.
|
|
@@ -398,7 +409,7 @@ export type GlobalUISchemaOptions = GenericObjectType & {
|
|
|
398
409
|
/** The set of options from the `Form` that will be available on the `Registry` for use in everywhere the `registry` is
|
|
399
410
|
* available.
|
|
400
411
|
*/
|
|
401
|
-
export
|
|
412
|
+
export interface GlobalFormOptions {
|
|
402
413
|
/** To avoid collisions with existing ids in the DOM, it is possible to change the prefix used for ids;
|
|
403
414
|
* Default is `root`. This prop is passed to the `toFilePathId()` function within the RJSF field implementations.
|
|
404
415
|
*/
|
|
@@ -419,7 +430,7 @@ export type GlobalFormOptions = {
|
|
|
419
430
|
* is not supported by RJSF or a custom field. When false, the UnsupportedField error component will be shown instead.
|
|
420
431
|
*/
|
|
421
432
|
readonly useFallbackUiForUnsupportedType?: boolean;
|
|
422
|
-
}
|
|
433
|
+
}
|
|
423
434
|
/** The object containing the registered core, theme and custom fields and widgets as well as the root schema, form
|
|
424
435
|
* context, schema utils and templates.
|
|
425
436
|
*/
|
|
@@ -704,7 +715,7 @@ export type ArrayFieldTemplateProps<T = any, S extends StrictRJSFSchema = RJSFSc
|
|
|
704
715
|
rawErrors?: string[];
|
|
705
716
|
};
|
|
706
717
|
/** The properties of each element in the ObjectFieldTemplateProps.properties array */
|
|
707
|
-
export
|
|
718
|
+
export interface ObjectFieldTemplatePropertyType {
|
|
708
719
|
/** The html for the property's content */
|
|
709
720
|
content: ReactElement;
|
|
710
721
|
/** A string representing the property name */
|
|
@@ -715,7 +726,7 @@ export type ObjectFieldTemplatePropertyType = {
|
|
|
715
726
|
readonly?: boolean;
|
|
716
727
|
/** A boolean value stating if the property should be hidden */
|
|
717
728
|
hidden: boolean;
|
|
718
|
-
}
|
|
729
|
+
}
|
|
719
730
|
/** The properties that are passed to an ObjectFieldTemplate implementation */
|
|
720
731
|
export type ObjectFieldTemplateProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = ContainerFieldTemplateProps<T, S, F> & {
|
|
721
732
|
/** A string value containing the description for the object */
|
|
@@ -823,12 +834,12 @@ export interface BaseInputTemplateProps<T = any, S extends StrictRJSFSchema = RJ
|
|
|
823
834
|
onChangeOverride?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
824
835
|
}
|
|
825
836
|
/** The type that defines the props used by the Submit button */
|
|
826
|
-
export
|
|
837
|
+
export interface SubmitButtonProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {
|
|
827
838
|
/** The uiSchema for this widget */
|
|
828
839
|
uiSchema?: UiSchema<T, S, F>;
|
|
829
840
|
/** The `registry` object */
|
|
830
841
|
registry: Registry<T, S, F>;
|
|
831
|
-
}
|
|
842
|
+
}
|
|
832
843
|
/** The type that defines the props for an Icon button, extending from a basic HTML button attributes */
|
|
833
844
|
export type IconButtonProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = ButtonHTMLAttributes<HTMLButtonElement> & Omit<RJSFBaseProps<T, S, F>, 'schema'> & {
|
|
834
845
|
/** An alternative specification for the type of the icon button */
|
|
@@ -837,7 +848,7 @@ export type IconButtonProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F
|
|
|
837
848
|
icon?: string | ReactElement;
|
|
838
849
|
};
|
|
839
850
|
/** The type that defines how to change the behavior of the submit button for the form */
|
|
840
|
-
export
|
|
851
|
+
export interface UISchemaSubmitButtonOptions {
|
|
841
852
|
/** The text of the submit button. Set to "Submit" by default */
|
|
842
853
|
submitText?: string;
|
|
843
854
|
/** Flag, if `true`, removes the submit button completely from the form */
|
|
@@ -849,18 +860,18 @@ export type UISchemaSubmitButtonOptions = {
|
|
|
849
860
|
/** The class name for the submit button */
|
|
850
861
|
className?: string;
|
|
851
862
|
};
|
|
852
|
-
}
|
|
863
|
+
}
|
|
853
864
|
/** Represents a primitive JSON Schema enum value */
|
|
854
865
|
export type EnumValue = string | number | boolean;
|
|
855
866
|
/** This type represents an element used to render an enum option */
|
|
856
|
-
export
|
|
867
|
+
export interface EnumOptionsType<S extends StrictRJSFSchema = RJSFSchema> {
|
|
857
868
|
/** The value for the enum option */
|
|
858
869
|
value: any;
|
|
859
870
|
/** The label for the enum options */
|
|
860
871
|
label: string;
|
|
861
872
|
/** The schema associated with the enum option when the option represents a `oneOf` or `anyOf` choice */
|
|
862
873
|
schema?: S;
|
|
863
|
-
}
|
|
874
|
+
}
|
|
864
875
|
/** This type remaps the keys of `Type` to prepend `ui:` onto them. As a result it does not need to be exported */
|
|
865
876
|
type MakeUIType<Type> = {
|
|
866
877
|
[Property in keyof Type as `ui:${string & Property}`]: Type[Property];
|
|
@@ -931,10 +942,7 @@ type UIOptionsBaseType<T = any, S extends StrictRJSFSchema = RJSFSchema, F exten
|
|
|
931
942
|
widget?: Widget<T, S, F> | string;
|
|
932
943
|
};
|
|
933
944
|
/** The type that represents the Options potentially provided by `ui:options` */
|
|
934
|
-
export type UIOptionsType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = UIOptionsBaseType<T, S, F> &
|
|
935
|
-
/** Anything else will be one of these types */
|
|
936
|
-
[key: string]: boolean | number | string | object | any[] | null | undefined;
|
|
937
|
-
};
|
|
945
|
+
export type UIOptionsType<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = UIOptionsBaseType<T, S, F> & Record<string, boolean | number | string | object | any[] | null | undefined>;
|
|
938
946
|
/**
|
|
939
947
|
* A utility type that extracts the element type from an array type.
|
|
940
948
|
* If the type is not an array, it returns the type itself as a safe fallback.
|
|
@@ -946,9 +954,7 @@ export type ArrayElement<A> = A extends readonly (infer E)[] ? E : A;
|
|
|
946
954
|
* When a schema with a matching `$ref` is resolved, the corresponding uiSchema definition
|
|
947
955
|
* is automatically applied and merged with any local uiSchema overrides.
|
|
948
956
|
*/
|
|
949
|
-
export type UiSchemaDefinitions<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> =
|
|
950
|
-
[refPath: string]: UiSchema<T, S, F>;
|
|
951
|
-
};
|
|
957
|
+
export type UiSchemaDefinitions<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Record<string, UiSchema<T, S, F>>;
|
|
952
958
|
/** Type describing the well-known properties of the `UiSchema` while also supporting all user defined properties,
|
|
953
959
|
* starting with `ui:`.
|
|
954
960
|
*/
|
|
@@ -993,12 +999,12 @@ export type CustomValidator<T = any, S extends StrictRJSFSchema = RJSFSchema, F
|
|
|
993
999
|
*/
|
|
994
1000
|
export type ErrorTransformer<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = (errors: RJSFValidationError[], uiSchema?: UiSchema<T, S, F>) => RJSFValidationError[];
|
|
995
1001
|
/** The type that describes the data that is returned from the `ValidatorType.validateFormData()` function */
|
|
996
|
-
export
|
|
1002
|
+
export interface ValidationData<T> {
|
|
997
1003
|
/** The validation errors as a list of `RJSFValidationError` objects */
|
|
998
1004
|
errors: RJSFValidationError[];
|
|
999
1005
|
/** The validation errors in the form of an `ErrorSchema` */
|
|
1000
1006
|
errorSchema: ErrorSchema<T>;
|
|
1001
|
-
}
|
|
1007
|
+
}
|
|
1002
1008
|
/** The interface that describes the validation functions that are provided by a Validator implementation used by the
|
|
1003
1009
|
* schema utilities.
|
|
1004
1010
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorSchema, FormValidation } from './types.js';
|
|
1
|
+
import type { ErrorSchema, FormValidation } from './types.js';
|
|
2
2
|
/** Unwraps the `errorHandler` structure into the associated `ErrorSchema`, stripping the `addError()` functions from it
|
|
3
3
|
*
|
|
4
4
|
* @param errorHandler - The `FormValidation` error handling structure
|
|
@@ -9,16 +9,14 @@ export default function unwrapErrorHandler(errorHandler) {
|
|
|
9
9
|
if (key === 'addError') {
|
|
10
10
|
return acc;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return { ...acc, [key]: childSchema };
|
|
12
|
+
const childSchema = errorHandler[key];
|
|
13
|
+
if (isPlainObject(childSchema)) {
|
|
14
|
+
return {
|
|
15
|
+
...acc,
|
|
16
|
+
[key]: unwrapErrorHandler(childSchema),
|
|
17
|
+
};
|
|
21
18
|
}
|
|
19
|
+
return { ...acc, [key]: childSchema };
|
|
22
20
|
}, {});
|
|
23
21
|
}
|
|
24
22
|
//# sourceMappingURL=unwrapErrorHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unwrapErrorHandler.js","sourceRoot":"","sources":["../src/unwrapErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAIjD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAU,YAA+B;IACjF,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"unwrapErrorHandler.js","sourceRoot":"","sources":["../src/unwrapErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAIjD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAU,YAA+B;IACjF,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACnE,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC;QACb,CAAC;QACD,MAAM,WAAW,GAAI,YAAkC,CAAC,GAAG,CAAC,CAAC;QAC7D,IAAI,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/B,OAAO;gBACL,GAAG,GAAG;gBACN,CAAC,GAAG,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC;aACvC,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC;IACxC,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MouseEvent } from 'react';
|
|
2
|
-
import { DateElementProp } from './getDateElementProps.js';
|
|
3
|
-
import { DateObject, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from './types.js';
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
2
|
+
import type { DateElementProp } from './getDateElementProps.js';
|
|
3
|
+
import type { DateObject, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from './types.js';
|
|
4
4
|
/** The Props for the `DateElement` component */
|
|
5
5
|
export type DateElementProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<WidgetProps<T, S, F>, 'value' | 'name' | 'disabled' | 'readonly' | 'autofocus' | 'registry' | 'onBlur' | 'onFocus' | 'className'> & {
|
|
6
6
|
/** The root id of the field */
|
|
@@ -17,9 +17,9 @@ export type DateElementProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F
|
|
|
17
17
|
*
|
|
18
18
|
* @param props - The `DateElementProps` for the date element
|
|
19
19
|
*/
|
|
20
|
-
export declare function DateElement<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: DateElementProps<T, S, F>): import("react
|
|
20
|
+
export declare function DateElement<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: DateElementProps<T, S, F>): import("react").JSX.Element;
|
|
21
21
|
/** The result of a call to the `useAltDateWidgetProps()` hook */
|
|
22
|
-
export
|
|
22
|
+
export interface UseAltDateWidgetResult {
|
|
23
23
|
/** The list of `DateElementProp` data to render for the `AltDateWidget` */
|
|
24
24
|
elements: DateElementProp[];
|
|
25
25
|
/** The callback that handles the changing of DateElement components */
|
|
@@ -28,7 +28,7 @@ export type UseAltDateWidgetResult = {
|
|
|
28
28
|
handleClear: (event: MouseEvent) => void;
|
|
29
29
|
/** The callback that will set the `AltDateWidget` to NOW when a button is clicked */
|
|
30
30
|
handleSetNow: (event: MouseEvent) => void;
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
32
|
/** Hook which encapsulates the logic needed to render an `AltDateWidget` with optional `time` elements. It contains
|
|
33
33
|
* the `state` of the current date(/time) selections in the widget. It returns a `UseAltDateWidgetResult` object
|
|
34
34
|
* that contains the `elements: DateElementProp[]` and three callbacks needed to change one of the rendered `elements`,
|
|
@@ -23,7 +23,7 @@ export function DateElement(props) {
|
|
|
23
23
|
const { className = 'form-control', type, range, value, select, rootId, name, disabled, readonly, autofocus, registry, onBlur, onFocus, } = props;
|
|
24
24
|
const id = `${rootId}_${type}`;
|
|
25
25
|
const { SelectWidget } = registry.widgets;
|
|
26
|
-
const onChange = useCallback((
|
|
26
|
+
const onChange = useCallback((newValue) => select(type, newValue), [select, type]);
|
|
27
27
|
return (_jsx(SelectWidget, { schema: { type: 'integer' }, id: id, name: name, className: className, options: { enumOptions: dateRangeOptions(range[0], range[1]) }, placeholder: type, value: value, disabled: disabled, readonly: readonly, autofocus: autofocus, onChange: onChange, onBlur: onBlur, onFocus: onFocus, registry: registry, label: '', "aria-describedby": ariaDescribedByIds(rootId) }));
|
|
28
28
|
}
|
|
29
29
|
/** Hook which encapsulates the logic needed to render an `AltDateWidget` with optional `time` elements. It contains
|
|
@@ -39,10 +39,10 @@ export default function useAltDateWidgetProps(props) {
|
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
setState(parseDateString(value, time));
|
|
41
41
|
}, [time, value]);
|
|
42
|
-
const handleChange = useCallback((property,
|
|
42
|
+
const handleChange = useCallback((property, newValue) => {
|
|
43
43
|
const nextState = {
|
|
44
44
|
...state,
|
|
45
|
-
[property]: typeof
|
|
45
|
+
[property]: typeof newValue === 'undefined' ? -1 : newValue,
|
|
46
46
|
};
|
|
47
47
|
if (readyForChange(nextState)) {
|
|
48
48
|
onChange(toDateString(nextState, time));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAltDateWidgetProps.js","sourceRoot":"","sources":["../src/useAltDateWidgetProps.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"useAltDateWidgetProps.js","sourceRoot":"","sources":["../src/useAltDateWidgetProps.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAG1C;;;;GAIG;AACH,SAAS,cAAc,CAAC,KAAiB;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC;AAiBD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,KAAgC;IAEhC,MAAM,EACJ,SAAS,GAAG,cAAc,EAC1B,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,GACR,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,EA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IAEF,MAAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CACH,mBAAmB,CACjB,KAAK,EACL,IAAI,EACJ,OAAO,CAAC,UAA0C,EAClD,OAAO,CAAC,MAAuC,CAChD,EACH,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,CAClD,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The information about files used by a FileWidget */
|
|
2
|
-
export
|
|
2
|
+
export interface FileInfoType {
|
|
3
3
|
/** The url of the data containing the file */
|
|
4
4
|
dataURL?: string | null;
|
|
5
5
|
/** The name of the file */
|
|
@@ -8,7 +8,7 @@ export type FileInfoType = {
|
|
|
8
8
|
size: number;
|
|
9
9
|
/** The type of the file */
|
|
10
10
|
type: string;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
export interface UseFileWidgetPropsResult {
|
|
13
13
|
/** The list of FileInfoType contained within the FileWidget */
|
|
14
14
|
filesInfo: FileInfoType[];
|
|
@@ -15,7 +15,7 @@ function addNameToDataURL(dataURL, name) {
|
|
|
15
15
|
* @param file - The `File` information to read
|
|
16
16
|
* @returns - A promise that resolves to the read file.
|
|
17
17
|
*/
|
|
18
|
-
function processFile(file) {
|
|
18
|
+
async function processFile(file) {
|
|
19
19
|
const { name, size, type } = file;
|
|
20
20
|
return new Promise((resolve, reject) => {
|
|
21
21
|
const reader = new window.FileReader();
|
|
@@ -47,7 +47,7 @@ function processFile(file) {
|
|
|
47
47
|
* @param files - The list of files to read
|
|
48
48
|
* @returns - The list of read files
|
|
49
49
|
*/
|
|
50
|
-
function processFiles(files) {
|
|
50
|
+
async function processFiles(files) {
|
|
51
51
|
return Promise.all(Array.from(files).map(processFile));
|
|
52
52
|
}
|
|
53
53
|
/** Extracts the file information from the data URLs
|
|
@@ -66,7 +66,7 @@ function extractFileInfo(dataURLs) {
|
|
|
66
66
|
...acc,
|
|
67
67
|
{
|
|
68
68
|
dataURL,
|
|
69
|
-
name
|
|
69
|
+
name,
|
|
70
70
|
size: blob.size,
|
|
71
71
|
type: blob.type,
|
|
72
72
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileWidgetProps.js","sourceRoot":"","sources":["../src/useFileWidgetProps.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAuB5C;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,OAAe,EAAE,IAAY;IACrD,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAChF,CAAC;AAED;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"useFileWidgetProps.js","sourceRoot":"","sources":["../src/useFileWidgetProps.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAuB5C;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,OAAe,EAAE,IAAY;IACrD,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAChF,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,WAAW,CAAC,IAAU;IACnC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACvC,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AAE,QAAQ,CAAC,CAC7B,CAAC;IACF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAa,EAAE,EAAE;QAChB,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;YAC9D,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC;IACH,CAAC,EACD,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAC7B,CAAC;IAEF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorSchema, ValidationData } from './types.js';
|
|
1
|
+
import type { ErrorSchema, ValidationData } from './types.js';
|
|
2
2
|
/** Merges the errors in `additionalErrorSchema` into the existing `validationData` by combining the hierarchies in the
|
|
3
3
|
* two `ErrorSchema`s and then appending the error list from the `additionalErrorSchema` obtained by calling
|
|
4
4
|
* `toErrorList()` on the `errors` in the `validationData`. If no `additionalErrorSchema` is passed, then
|
package/lib/withIdRefPrefix.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RJSFSchema, StrictRJSFSchema } from './types.js';
|
|
1
|
+
import type { RJSFSchema, StrictRJSFSchema } from './types.js';
|
|
2
2
|
/** Recursively prefixes all `$ref`s in a schema with the value of the `ROOT_SCHEMA_PREFIX` constant.
|
|
3
3
|
* This is used in isValid to make references to the rootSchema
|
|
4
4
|
*
|
package/lib/withIdRefPrefix.js
CHANGED
|
@@ -6,14 +6,17 @@ import { REF_KEY, ROOT_SCHEMA_PREFIX } from './constants.js';
|
|
|
6
6
|
* @param node - The object node to which a ROOT_SCHEMA_PREFIX is added when a REF_KEY is part of it
|
|
7
7
|
*/
|
|
8
8
|
function withIdRefPrefixObject(node) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (
|
|
13
|
-
realObj[key]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
const realObj = node;
|
|
10
|
+
for (const key in realObj) {
|
|
11
|
+
/* v8 ignore next -- spread in caller guarantees only own properties reach this loop */
|
|
12
|
+
if (Object.hasOwn(realObj, key)) {
|
|
13
|
+
const value = realObj[key];
|
|
14
|
+
if (key === REF_KEY && typeof value === 'string' && value.startsWith('#')) {
|
|
15
|
+
realObj[key] = ROOT_SCHEMA_PREFIX + value;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
realObj[key] = withIdRefPrefix(value);
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
return node;
|
|
@@ -24,10 +27,7 @@ function withIdRefPrefixObject(node) {
|
|
|
24
27
|
* @param node - The list of object nodes to which a ROOT_SCHEMA_PREFIX is added when a REF_KEY is part of it
|
|
25
28
|
*/
|
|
26
29
|
function withIdRefPrefixArray(node) {
|
|
27
|
-
|
|
28
|
-
node[i] = withIdRefPrefix(node[i]);
|
|
29
|
-
}
|
|
30
|
-
return node;
|
|
30
|
+
return node.map((item) => withIdRefPrefix(item));
|
|
31
31
|
}
|
|
32
32
|
/** Recursively prefixes all `$ref`s in a schema with the value of the `ROOT_SCHEMA_PREFIX` constant.
|
|
33
33
|
* This is used in isValid to make references to the rootSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIdRefPrefix.js","sourceRoot":"","sources":["../src/withIdRefPrefix.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAG1D;;;;GAIG;AACH,SAAS,qBAAqB,CAA0C,IAAO;IAC7E,KAAK,MAAM,GAAG,IAAI,
|
|
1
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