@rjsf/utils 5.0.0-beta.1 → 5.0.0-beta.11

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.
Files changed (60) hide show
  1. package/README.md +13 -9
  2. package/dist/index.d.ts +1274 -38
  3. package/dist/utils.cjs.development.js +9 -6
  4. package/dist/utils.cjs.development.js.map +1 -1
  5. package/dist/utils.cjs.production.min.js +1 -1
  6. package/dist/utils.cjs.production.min.js.map +1 -1
  7. package/dist/utils.esm.js +8 -5
  8. package/dist/utils.esm.js.map +1 -1
  9. package/dist/utils.umd.development.js +12 -9
  10. package/dist/utils.umd.development.js.map +1 -1
  11. package/dist/utils.umd.production.min.js +1 -1
  12. package/dist/utils.umd.production.min.js.map +1 -1
  13. package/package.json +3 -3
  14. package/dist/allowAdditionalItems.d.ts +0 -8
  15. package/dist/asNumber.d.ts +0 -10
  16. package/dist/canExpand.d.ts +0 -11
  17. package/dist/constants.d.ts +0 -27
  18. package/dist/createSchemaUtils.d.ts +0 -9
  19. package/dist/dataURItoBlob.d.ts +0 -10
  20. package/dist/deepEquals.d.ts +0 -8
  21. package/dist/findSchemaDefinition.d.ts +0 -20
  22. package/dist/getInputProps.d.ts +0 -10
  23. package/dist/getSchemaType.d.ts +0 -13
  24. package/dist/getSubmitButtonOptions.d.ts +0 -10
  25. package/dist/getTemplate.d.ts +0 -10
  26. package/dist/getUiOptions.d.ts +0 -8
  27. package/dist/getWidget.d.ts +0 -13
  28. package/dist/guessType.d.ts +0 -7
  29. package/dist/hasWidget.d.ts +0 -10
  30. package/dist/isConstant.d.ts +0 -8
  31. package/dist/isCustomWidget.d.ts +0 -7
  32. package/dist/isFixedItems.d.ts +0 -8
  33. package/dist/isObject.d.ts +0 -7
  34. package/dist/localToUTC.d.ts +0 -6
  35. package/dist/mergeDefaultsWithFormData.d.ts +0 -15
  36. package/dist/mergeObjects.d.ts +0 -9
  37. package/dist/mergeSchemas.d.ts +0 -10
  38. package/dist/optionsList.d.ts +0 -10
  39. package/dist/orderProperties.d.ts +0 -11
  40. package/dist/pad.d.ts +0 -7
  41. package/dist/parseDateString.d.ts +0 -9
  42. package/dist/processSelectValue.d.ts +0 -11
  43. package/dist/rangeSpec.d.ts +0 -9
  44. package/dist/schema/getDefaultFormState.d.ts +0 -47
  45. package/dist/schema/getDisplayLabel.d.ts +0 -11
  46. package/dist/schema/getMatchingOption.d.ts +0 -10
  47. package/dist/schema/index.d.ts +0 -11
  48. package/dist/schema/isFilesArray.d.ts +0 -10
  49. package/dist/schema/isMultiSelect.d.ts +0 -9
  50. package/dist/schema/isSelect.d.ts +0 -9
  51. package/dist/schema/mergeValidationData.d.ts +0 -12
  52. package/dist/schema/retrieveSchema.d.ts +0 -98
  53. package/dist/schema/toIdSchema.d.ts +0 -13
  54. package/dist/schema/toPathSchema.d.ts +0 -11
  55. package/dist/schemaRequiresTrueValue.d.ts +0 -11
  56. package/dist/shouldRender.d.ts +0 -10
  57. package/dist/toConstant.d.ts +0 -9
  58. package/dist/toDateString.d.ts +0 -9
  59. package/dist/types.d.ts +0 -755
  60. package/dist/utcToLocal.d.ts +0 -6
package/dist/index.d.ts CHANGED
@@ -1,38 +1,1274 @@
1
- import allowAdditionalItems from "./allowAdditionalItems";
2
- import asNumber from "./asNumber";
3
- import canExpand from "./canExpand";
4
- import createSchemaUtils from "./createSchemaUtils";
5
- import dataURItoBlob from "./dataURItoBlob";
6
- import deepEquals from "./deepEquals";
7
- import findSchemaDefinition from "./findSchemaDefinition";
8
- import getInputProps from "./getInputProps";
9
- import getSchemaType from "./getSchemaType";
10
- import getSubmitButtonOptions from "./getSubmitButtonOptions";
11
- import getTemplate from "./getTemplate";
12
- import getUiOptions from "./getUiOptions";
13
- import getWidget from "./getWidget";
14
- import guessType from "./guessType";
15
- import hasWidget from "./hasWidget";
16
- import isConstant from "./isConstant";
17
- import isCustomWidget from "./isCustomWidget";
18
- import isFixedItems from "./isFixedItems";
19
- import isObject from "./isObject";
20
- import localToUTC from "./localToUTC";
21
- import mergeDefaultsWithFormData from "./mergeDefaultsWithFormData";
22
- import mergeObjects from "./mergeObjects";
23
- import mergeSchemas from "./mergeSchemas";
24
- import optionsList from "./optionsList";
25
- import orderProperties from "./orderProperties";
26
- import pad from "./pad";
27
- import parseDateString from "./parseDateString";
28
- import processSelectValue from "./processSelectValue";
29
- import rangeSpec from "./rangeSpec";
30
- import schemaRequiresTrueValue from "./schemaRequiresTrueValue";
31
- import shouldRender from "./shouldRender";
32
- import toConstant from "./toConstant";
33
- import toDateString from "./toDateString";
34
- import utcToLocal from "./utcToLocal";
35
- export * from "./types";
36
- export * from "./constants";
37
- export * from "./schema";
38
- export { allowAdditionalItems, asNumber, canExpand, createSchemaUtils, dataURItoBlob, deepEquals, findSchemaDefinition, getInputProps, getSchemaType, getSubmitButtonOptions, getTemplate, getUiOptions, getWidget, guessType, hasWidget, isConstant, isCustomWidget, isFixedItems, isObject, localToUTC, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionsList, orderProperties, pad, parseDateString, processSelectValue, rangeSpec, schemaRequiresTrueValue, shouldRender, toConstant, toDateString, utcToLocal, };
1
+ import React from 'react';
2
+ import * as json_schema from 'json-schema';
3
+ import { JSONSchema7, JSONSchema7Definition } from 'json-schema';
4
+
5
+ /** The representation of any generic object type, usually used as an intersection on other types to make them more
6
+ * flexible in the properties they support (i.e. anything else)
7
+ */
8
+ declare type GenericObjectType = {
9
+ [name: string]: any;
10
+ };
11
+ /** Map the JSONSchema7 to our own type so that we can easily bump to JSONSchema8 at some future date and only have to
12
+ * update this one type.
13
+ */
14
+ declare type RJSFSchema = JSONSchema7;
15
+ /** Map the JSONSchema7Definition to our own type so that we can easily bump to JSONSchema8Definition at some future
16
+ * date and only have to update this one type.
17
+ */
18
+ declare type RJSFSchemaDefinition = JSONSchema7Definition;
19
+ /** The interface representing a Date object that contains an optional time */
20
+ interface DateObject {
21
+ /** The year of the Date */
22
+ year: number;
23
+ /** The month of the Date */
24
+ month: number;
25
+ /** The day of the Date */
26
+ day: number;
27
+ /** The optional hours for the time of a Date */
28
+ hour?: number;
29
+ /** The optional minutes for the time of a Date */
30
+ minute?: number;
31
+ /** The optional seconds for the time of a Date */
32
+ second?: number;
33
+ }
34
+ /** Properties describing a Range specification in terms of attribute that can be added to the `HTML` `<input>` */
35
+ declare type RangeSpecType = {
36
+ /** Specifies the interval between legal numbers in an input field */
37
+ step?: number;
38
+ /** Specifies a minimum value for an <input> element */
39
+ min?: number;
40
+ /** Specifies the maximum value for an <input> element */
41
+ max?: number;
42
+ };
43
+ /** Properties describing a Range specification in terms of attribute that can be added to the `HTML` `<input>` */
44
+ declare type InputPropsType = Omit<RangeSpecType, "step"> & {
45
+ /** Specifies the type of the <input> element */
46
+ type: string;
47
+ /** Specifies the interval between legal numbers in an input field or "any" */
48
+ step?: number | "any";
49
+ /** Specifies the `autoComplete` value for an <input> element */
50
+ autoComplete?: HTMLInputElement["autocomplete"];
51
+ };
52
+ /** Type describing an id used for a field in the `IdSchema` */
53
+ declare type FieldId = {
54
+ /** The id for a field */
55
+ $id: string;
56
+ };
57
+ /** Type describing a recursive structure of `FieldId`s for an object with a non-empty set of keys */
58
+ declare type IdSchema<T = any> = FieldId & {
59
+ [key in keyof T]?: IdSchema<T[key]>;
60
+ };
61
+ /** Type describing a name used for a field in the `PathSchema` */
62
+ declare type FieldPath = {
63
+ /** The name of a field */
64
+ $name: string;
65
+ };
66
+ /** Type describing a recursive structure of `FieldPath`s for an object with a non-empty set of keys */
67
+ declare type PathSchema<T = any> = FieldPath & {
68
+ [key in keyof T]?: PathSchema<T[key]>;
69
+ };
70
+ /** The type for error produced by RJSF schema validation */
71
+ declare type RJSFValidationError = {
72
+ /** Name of the error, for example, "required" or "minLength" */
73
+ name?: string;
74
+ /** Message, for example, "is a required property" or "should NOT be shorter than 3 characters" */
75
+ message?: string;
76
+ /** An object with the error params returned by ajv
77
+ * ([see doc](https://github.com/ajv-validator/ajv/tree/6a671057ea6aae690b5967ee26a0ddf8452c6297#error-parameters)
78
+ * for more info)
79
+ */
80
+ params?: any;
81
+ /** A string in Javascript property accessor notation to the data path of the field with the error. For example,
82
+ * `.name` or `['first-name']`
83
+ */
84
+ property?: string;
85
+ /** JSON pointer to the schema of the keyword that failed validation. For example, `#/fields/firstName/required`.
86
+ * (Note: this may sometimes be wrong due to a [bug in ajv](https://github.com/ajv-validator/ajv/issues/512))
87
+ */
88
+ schemaPath?: string;
89
+ /** Full error name, for example ".name is a required property" */
90
+ stack: string;
91
+ };
92
+ /** The type that describes an error in a field */
93
+ declare type FieldError = string;
94
+ /** The type that describes the list of errors for a field */
95
+ declare type FieldErrors = {
96
+ /** The list of errors for the field */
97
+ __errors?: FieldError[];
98
+ };
99
+ /** Type describing a recursive structure of `FieldErrors`s for an object with a non-empty set of keys */
100
+ declare type ErrorSchema<T = any> = FieldErrors & {
101
+ [key in keyof T]?: ErrorSchema<T[key]>;
102
+ };
103
+ /** Type that describes the list of errors for a field being actively validated by a custom validator */
104
+ declare type FieldValidation = FieldErrors & {
105
+ /** Function that will add a new `message` to the list of errors */
106
+ addError: (message: string) => void;
107
+ };
108
+ /** Type describing a recursive structure of `FieldValidation`s for an object with a non-empty set of keys */
109
+ declare type FormValidation<T = any> = FieldValidation & {
110
+ [key in keyof T]?: FormValidation<T[key]>;
111
+ };
112
+ /** The properties that are passed to an `ErrorListTemplate` implementation */
113
+ declare type ErrorListProps<T = any, F = any> = {
114
+ /** The errorSchema constructed by `Form` */
115
+ errorSchema: ErrorSchema<T>;
116
+ /** An array of the errors */
117
+ errors: RJSFValidationError[];
118
+ /** The `formContext` object that was passed to `Form` */
119
+ formContext?: F;
120
+ /** The schema that was passed to `Form` */
121
+ schema: RJSFSchema;
122
+ /** The uiSchema that was passed to `Form` */
123
+ uiSchema?: UiSchema<T, F>;
124
+ };
125
+ /** The properties that are passed to an `FieldErrorTemplate` implementation */
126
+ declare type FieldErrorProps<T = any, F = any> = {
127
+ /** The errorSchema constructed by `Form` */
128
+ errorSchema?: ErrorSchema<T>;
129
+ /** An array of the errors */
130
+ errors?: Array<string | React.ReactElement>;
131
+ /** The tree of unique ids for every child field */
132
+ idSchema: IdSchema<T>;
133
+ /** The schema that was passed to field */
134
+ schema: RJSFSchema;
135
+ /** The uiSchema that was passed to field */
136
+ uiSchema?: UiSchema<T, F>;
137
+ /** The `registry` object */
138
+ registry: Registry<T, F>;
139
+ };
140
+ /** The properties that are passed to an `FieldHelpTemplate` implementation */
141
+ declare type FieldHelpProps<T = any, F = any> = {
142
+ /** The help information to be rendered */
143
+ help?: string | React.ReactElement;
144
+ /** The tree of unique ids for every child field */
145
+ idSchema: IdSchema<T>;
146
+ /** The schema that was passed to field */
147
+ schema: RJSFSchema;
148
+ /** The uiSchema that was passed to field */
149
+ uiSchema?: UiSchema<T, F>;
150
+ /** Flag indicating whether there are errors associated with this field */
151
+ hasErrors?: boolean;
152
+ /** The `registry` object */
153
+ registry: Registry<T, F>;
154
+ };
155
+ /** The set of `Fields` stored in the `Registry` */
156
+ declare type RegistryFieldsType<T = any, F = any> = {
157
+ /** A `Field` indexed by `name` */
158
+ [name: string]: Field<T, F>;
159
+ };
160
+ /** The set of `Widgets` stored in the `Registry` */
161
+ declare type RegistryWidgetsType<T = any, F = any> = {
162
+ /** A `Widget` indexed by `name` */
163
+ [name: string]: Widget<T, F>;
164
+ };
165
+ /** The set of RJSF templates that can be overridden by themes or users */
166
+ interface TemplatesType<T = any, F = any> {
167
+ /** The template to use while rendering normal or fixed array fields */
168
+ ArrayFieldTemplate: React.ComponentType<ArrayFieldTemplateProps<T, F>>;
169
+ /** The template to use while rendering the description for an array field */
170
+ ArrayFieldDescriptionTemplate: React.ComponentType<ArrayFieldDescriptionProps<T, F>>;
171
+ /** The template to use while rendering an item in an array field */
172
+ ArrayFieldItemTemplate: React.ComponentType<ArrayFieldTemplateItemType<T, F>>;
173
+ /** The template to use while rendering the title for an array field */
174
+ ArrayFieldTitleTemplate: React.ComponentType<ArrayFieldTitleProps<T, F>>;
175
+ /** The template to use while rendering the standard html input */
176
+ BaseInputTemplate: React.ComponentType<WidgetProps<T, F>>;
177
+ /** The template to use for rendering the description of a field */
178
+ DescriptionFieldTemplate: React.ComponentType<DescriptionFieldProps<T, F>>;
179
+ /** The template to use while rendering the errors for the whole form */
180
+ ErrorListTemplate: React.ComponentType<ErrorListProps<T, F>>;
181
+ /** The template to use while rendering the errors for a single field */
182
+ FieldErrorTemplate: React.ComponentType<FieldErrorProps<T, F>>;
183
+ /** The template to use while rendering the errors for a single field */
184
+ FieldHelpTemplate: React.ComponentType<FieldHelpProps<T, F>>;
185
+ /** The template to use while rendering a field */
186
+ FieldTemplate: React.ComponentType<FieldTemplateProps<T, F>>;
187
+ /** The template to use while rendering an object */
188
+ ObjectFieldTemplate: React.ComponentType<ObjectFieldTemplateProps<T, F>>;
189
+ /** The template to use for rendering the title of a field */
190
+ TitleFieldTemplate: React.ComponentType<TitleFieldProps<T, F>>;
191
+ /** The template to use for rendering information about an unsupported field type in the schema */
192
+ UnsupportedFieldTemplate: React.ComponentType<UnsupportedFieldProps<T, F>>;
193
+ /** The template to use for rendering a field that allows a user to add additional properties */
194
+ WrapIfAdditionalTemplate: React.ComponentType<WrapIfAdditionalTemplateProps<T, F>>;
195
+ /** The set of templates associated with buttons in the form */
196
+ ButtonTemplates: {
197
+ /** The template to use for the main `Submit` button */
198
+ SubmitButton: React.ComponentType<SubmitButtonProps<T, F>>;
199
+ /** The template to use for the Add button used for AdditionalProperties and Array items */
200
+ AddButton: React.ComponentType<IconButtonProps<T, F>>;
201
+ /** The template to use for the Move Down button used for Array items */
202
+ MoveDownButton: React.ComponentType<IconButtonProps<T, F>>;
203
+ /** The template to use for the Move Up button used for Array items */
204
+ MoveUpButton: React.ComponentType<IconButtonProps<T, F>>;
205
+ /** The template to use for the Remove button used for AdditionalProperties and Array items */
206
+ RemoveButton: React.ComponentType<IconButtonProps<T, F>>;
207
+ };
208
+ }
209
+ /** The object containing the registered core, theme and custom fields and widgets as well as the root schema, form
210
+ * context, schema utils and templates.
211
+ */
212
+ interface Registry<T = any, F = any> {
213
+ /** The set of all fields used by the `Form`. Includes fields from `core`, theme-specific fields and any custom
214
+ * registered fields
215
+ */
216
+ fields: RegistryFieldsType<T, F>;
217
+ /** The set of templates used by the `Form`. Includes templates from `core`, theme-specific fields and any custom
218
+ * registered templates
219
+ */
220
+ templates: TemplatesType<T, F>;
221
+ /** The set of all widgets used by the `Form`. Includes widgets from `core`, theme-specific widgets and any custom
222
+ * registered widgets
223
+ */
224
+ widgets: RegistryWidgetsType<T, F>;
225
+ /** The `formContext` object that was passed to `Form` */
226
+ formContext: F;
227
+ /** The root schema, as passed to the `Form`, which can contain referenced definitions */
228
+ rootSchema: RJSFSchema;
229
+ /** The current implementation of the `SchemaUtilsType` (from `@rjsf/utils`) in use by the `Form`. Used to call any
230
+ * of the validation-schema-based utility functions
231
+ */
232
+ schemaUtils: SchemaUtilsType<T>;
233
+ }
234
+ /** The properties that are passed to a Field implementation */
235
+ interface FieldProps<T = any, F = any> extends GenericObjectType, Pick<React.HTMLAttributes<HTMLElement>, Exclude<keyof React.HTMLAttributes<HTMLElement>, "onBlur" | "onFocus" | "onChange">> {
236
+ /** The JSON subschema object for this field */
237
+ schema: RJSFSchema;
238
+ /** The uiSchema for this field */
239
+ uiSchema?: UiSchema<T, F>;
240
+ /** The tree of unique ids for every child field */
241
+ idSchema: IdSchema<T>;
242
+ /** The data for this field */
243
+ formData: T;
244
+ /** The tree of errors for this field and its children */
245
+ errorSchema?: ErrorSchema<T>;
246
+ /** The field change event handler; called with the updated form data and an optional `ErrorSchema` */
247
+ onChange: (newFormData: T, es?: ErrorSchema<T>, id?: string) => any;
248
+ /** The input blur event handler; call it with the field id and value */
249
+ onBlur: (id: string, value: any) => void;
250
+ /** The input focus event handler; call it with the field id and value */
251
+ onFocus: (id: string, value: any) => void;
252
+ /** The `formContext` object that you passed to `Form` */
253
+ formContext?: F;
254
+ /** A boolean value stating if the field should autofocus */
255
+ autofocus?: boolean;
256
+ /** A boolean value stating if the field is disabled */
257
+ disabled: boolean;
258
+ /** A boolean value stating if the field is hiding its errors */
259
+ hideError?: boolean;
260
+ /** A boolean value stating if the field is read-only */
261
+ readonly: boolean;
262
+ /** The required status of this field */
263
+ required?: boolean;
264
+ /** The unique name of the field, usually derived from the name of the property in the JSONSchema */
265
+ name: string;
266
+ /** The `registry` object */
267
+ registry: Registry<T, F>;
268
+ }
269
+ /** The definition of a React-based Field component */
270
+ declare type Field<T = any, F = any> = React.ComponentType<FieldProps<T, F>>;
271
+ /** The properties that are passed to a FieldTemplate implementation */
272
+ declare type FieldTemplateProps<T = any, F = any> = {
273
+ /** The id of the field in the hierarchy. You can use it to render a label targeting the wrapped widget */
274
+ id: string;
275
+ /** A string containing the base CSS classes, merged with any custom ones defined in your uiSchema */
276
+ classNames?: string;
277
+ /** The computed label for this field, as a string */
278
+ label: string;
279
+ /** A component instance rendering the field description, if one is defined (this will use any custom
280
+ * `DescriptionField` defined)
281
+ */
282
+ description?: React.ReactElement;
283
+ /** A string containing any `ui:description` uiSchema directive defined */
284
+ rawDescription?: string;
285
+ /** The field or widget component instance for this field row */
286
+ children: React.ReactElement;
287
+ /** A component instance listing any encountered errors for this field */
288
+ errors?: React.ReactElement;
289
+ /** An array of strings listing all generated error messages from encountered errors for this field */
290
+ rawErrors?: string[];
291
+ /** A component instance rendering any `ui:help` uiSchema directive defined */
292
+ help?: React.ReactElement;
293
+ /** A string containing any `ui:help` uiSchema directive defined. **NOTE:** `rawHelp` will be `undefined` if passed
294
+ * `ui:help` is a React component instead of a string
295
+ */
296
+ rawHelp?: string;
297
+ /** A boolean value stating if the field should be hidden */
298
+ hidden?: boolean;
299
+ /** A boolean value stating if the field is required */
300
+ required?: boolean;
301
+ /** A boolean value stating if the field is read-only */
302
+ readonly: boolean;
303
+ /** A boolean value stating if the field is hiding its errors */
304
+ hideError?: boolean;
305
+ /** A boolean value stating if the field is disabled */
306
+ disabled: boolean;
307
+ /** A boolean value stating if the label should be rendered or not. This is useful for nested fields in arrays where
308
+ * you don't want to clutter the UI
309
+ */
310
+ displayLabel?: boolean;
311
+ /** The schema object for this field */
312
+ schema: RJSFSchema;
313
+ /** The uiSchema object for this field */
314
+ uiSchema?: UiSchema<T, F>;
315
+ /** The `formContext` object that was passed to `Form` */
316
+ formContext?: F;
317
+ /** The formData for this field */
318
+ formData: T;
319
+ /** The value change event handler; Can be called with a new value to change the value for this field */
320
+ onChange: FieldProps["onChange"];
321
+ /** The key change event handler; Called when the key associated with a field is changed for an additionalProperty */
322
+ onKeyChange: (value: string) => () => void;
323
+ /** The property drop/removal event handler; Called when a field is removed in an additionalProperty context */
324
+ onDropPropertyClick: (value: string) => () => void;
325
+ /** The `registry` object */
326
+ registry: Registry<T, F>;
327
+ };
328
+ /** The properties that are passed to the `UnsupportedFieldTemplate` implementation */
329
+ declare type UnsupportedFieldProps<T = any, F = any> = {
330
+ /** The schema object for this field */
331
+ schema: RJSFSchema;
332
+ /** The tree of unique ids for every child field */
333
+ idSchema?: IdSchema<T>;
334
+ /** The reason why the schema field has an unsupported type */
335
+ reason: string;
336
+ /** The `registry` object */
337
+ registry: Registry<T, F>;
338
+ };
339
+ /** The properties that are passed to a `TitleFieldTemplate` implementation */
340
+ declare type TitleFieldProps<T = any, F = any> = {
341
+ /** The id of the field title in the hierarchy */
342
+ id: string;
343
+ /** The title for the field being rendered */
344
+ title: string;
345
+ /** The schema object for the field being titled */
346
+ schema: RJSFSchema;
347
+ /** The uiSchema object for this title field */
348
+ uiSchema?: UiSchema<T, F>;
349
+ /** A boolean value stating if the field is required */
350
+ required?: boolean;
351
+ /** The `registry` object */
352
+ registry: Registry<T, F>;
353
+ };
354
+ /** The properties that are passed to a `DescriptionFieldTemplate` implementation */
355
+ declare type DescriptionFieldProps<T = any, F = any> = {
356
+ /** The id of the field description in the hierarchy */
357
+ id: string;
358
+ /** The schema object for the field being described */
359
+ schema: RJSFSchema;
360
+ /** The uiSchema object for this description field */
361
+ uiSchema?: UiSchema<T, F>;
362
+ /** The description of the field being rendered */
363
+ description: string | React.ReactElement;
364
+ /** The `registry` object */
365
+ registry: Registry<T, F>;
366
+ };
367
+ /** The properties that are passed to a `ArrayFieldTitleTemplate` implementation */
368
+ declare type ArrayFieldTitleProps<T = any, F = any> = Omit<TitleFieldProps<T, F>, "id" | "title"> & {
369
+ /** The title for the field being rendered */
370
+ title?: string;
371
+ /** The idSchema of the field in the hierarchy */
372
+ idSchema: IdSchema<T>;
373
+ };
374
+ /** The properties that are passed to a `ArrayFieldDescriptionTemplate` implementation */
375
+ declare type ArrayFieldDescriptionProps<T = any, F = any> = Omit<DescriptionFieldProps<T, F>, "id" | "description"> & {
376
+ /** The description of the field being rendered */
377
+ description?: string | React.ReactElement;
378
+ /** The idSchema of the field in the hierarchy */
379
+ idSchema: IdSchema<T>;
380
+ };
381
+ /** The properties of each element in the ArrayFieldTemplateProps.items array */
382
+ declare type ArrayFieldTemplateItemType<T = any, F = any> = {
383
+ /** The html for the item's content */
384
+ children: React.ReactElement;
385
+ /** The className string */
386
+ className: string;
387
+ /** A boolean value stating if the array item is disabled */
388
+ disabled: boolean;
389
+ /** A boolean value stating whether the array item can be moved down */
390
+ hasMoveDown: boolean;
391
+ /** A boolean value stating whether the array item can be moved up */
392
+ hasMoveUp: boolean;
393
+ /** A boolean value stating whether the array item can be removed */
394
+ hasRemove: boolean;
395
+ /** A boolean value stating whether the array item has a toolbar */
396
+ hasToolbar: boolean;
397
+ /** A number stating the index the array item occurs in `items` */
398
+ index: number;
399
+ /** Returns a function that adds a new item at `index` */
400
+ onAddIndexClick: (index: number) => (event?: any) => void;
401
+ /** Returns a function that removes the item at `index` */
402
+ onDropIndexClick: (index: number) => (event?: any) => void;
403
+ /** Returns a function that swaps the items at `index` with `newIndex` */
404
+ onReorderClick: (index: number, newIndex: number) => (event?: any) => void;
405
+ /** A boolean value stating if the array item is read-only */
406
+ readonly: boolean;
407
+ /** A stable, unique key for the array item */
408
+ key: string;
409
+ /** The uiSchema object for this field */
410
+ uiSchema?: UiSchema<T, F>;
411
+ /** The `registry` object */
412
+ registry: Registry<T, F>;
413
+ };
414
+ /** The properties that are passed to an ArrayFieldTemplate implementation */
415
+ declare type ArrayFieldTemplateProps<T = any, F = any> = {
416
+ /** A boolean value stating whether new elements can be added to the array */
417
+ canAdd?: boolean;
418
+ /** The className string */
419
+ className?: string;
420
+ /** A boolean value stating if the array is disabled */
421
+ disabled?: boolean;
422
+ /** An object containing the id for this object & ids for its properties */
423
+ idSchema: IdSchema<T>;
424
+ /** An array of objects representing the items in the array */
425
+ items: ArrayFieldTemplateItemType<T, F>[];
426
+ /** A function that adds a new item to the array */
427
+ onAddClick: (event?: any) => void;
428
+ /** A boolean value stating if the array is read-only */
429
+ readonly?: boolean;
430
+ /** A boolean value stating if the array is required */
431
+ required?: boolean;
432
+ /** A boolean value stating if the field is hiding its errors */
433
+ hideError?: boolean;
434
+ /** The schema object for this array */
435
+ schema: RJSFSchema;
436
+ /** The uiSchema object for this array field */
437
+ uiSchema?: UiSchema<T, F>;
438
+ /** A string value containing the title for the array */
439
+ title: string;
440
+ /** The `formContext` object that was passed to Form */
441
+ formContext?: F;
442
+ /** The formData for this array */
443
+ formData: T;
444
+ /** An array of strings listing all generated error messages from encountered errors for this widget */
445
+ rawErrors?: string[];
446
+ /** The `registry` object */
447
+ registry: Registry<T, F>;
448
+ };
449
+ /** The properties of each element in the ObjectFieldTemplateProps.properties array */
450
+ declare type ObjectFieldTemplatePropertyType = {
451
+ /** The html for the property's content */
452
+ content: React.ReactElement;
453
+ /** A string representing the property name */
454
+ name: string;
455
+ /** A boolean value stating if the object property is disabled */
456
+ disabled: boolean;
457
+ /** A boolean value stating if the property is read-only */
458
+ readonly: boolean;
459
+ /** A boolean value stating if the property should be hidden */
460
+ hidden: boolean;
461
+ };
462
+ /** The properties that are passed to an ObjectFieldTemplate implementation */
463
+ declare type ObjectFieldTemplateProps<T = any, F = any> = {
464
+ /** A string value containing the title for the object */
465
+ title: string;
466
+ /** A string value containing the description for the object */
467
+ description?: string;
468
+ /** A boolean value stating if the object is disabled */
469
+ disabled?: boolean;
470
+ /** An array of objects representing the properties in the object */
471
+ properties: ObjectFieldTemplatePropertyType[];
472
+ /** Returns a function that adds a new property to the object (to be used with additionalProperties) */
473
+ onAddClick: (schema: RJSFSchema) => () => void;
474
+ /** A boolean value stating if the object is read-only */
475
+ readonly?: boolean;
476
+ /** A boolean value stating if the object is required */
477
+ required?: boolean;
478
+ /** A boolean value stating if the field is hiding its errors */
479
+ hideError?: boolean;
480
+ /** The schema object for this object */
481
+ schema: RJSFSchema;
482
+ /** The uiSchema object for this object field */
483
+ uiSchema?: UiSchema<T, F>;
484
+ /** An object containing the id for this object & ids for its properties */
485
+ idSchema: IdSchema<T>;
486
+ /** The form data for the object */
487
+ formData: T;
488
+ /** The `formContext` object that was passed to Form */
489
+ formContext?: F;
490
+ /** The `registry` object */
491
+ registry: Registry<T, F>;
492
+ };
493
+ /** The properties that are passed to a WrapIfAdditionalTemplate implementation */
494
+ declare type WrapIfAdditionalTemplateProps<T = any, F = any> = {
495
+ /** The field or widget component instance for this field row */
496
+ children: React.ReactNode;
497
+ } & Pick<FieldTemplateProps<T, F>, "id" | "classNames" | "label" | "required" | "readonly" | "disabled" | "schema" | "uiSchema" | "onKeyChange" | "onDropPropertyClick" | "registry">;
498
+ /** The properties that are passed to a Widget implementation */
499
+ interface WidgetProps<T = any, F = any> extends GenericObjectType, Pick<React.HTMLAttributes<HTMLElement>, Exclude<keyof React.HTMLAttributes<HTMLElement>, "onBlur" | "onFocus">> {
500
+ /** The generated id for this widget */
501
+ id: string;
502
+ /** The JSONSchema subschema object for this widget */
503
+ schema: RJSFSchema;
504
+ /** The uiSchema for this widget */
505
+ uiSchema?: UiSchema<T, F>;
506
+ /** The current value for this widget */
507
+ value: any;
508
+ /** The required status of this widget */
509
+ required?: boolean;
510
+ /** A boolean value stating if the widget is disabled */
511
+ disabled?: boolean;
512
+ /** A boolean value stating if the widget is read-only */
513
+ readonly?: boolean;
514
+ /** A boolean value stating if the widget is hiding its errors */
515
+ hideError?: boolean;
516
+ /** A boolean value stating if the widget should autofocus */
517
+ autofocus?: boolean;
518
+ /** The placeholder for the widget, if any */
519
+ placeholder?: string;
520
+ /** A map of UI Options passed as a prop to the component, including the optional `enumOptions`
521
+ * which is a special case on top of `UIOptionsType` needed only by widgets
522
+ */
523
+ options: NonNullable<UIOptionsType<T, F>> & {
524
+ /** The enum options list for a type that supports them */
525
+ enumOptions?: EnumOptionsType[];
526
+ };
527
+ /** The `formContext` object that you passed to `Form` */
528
+ formContext?: F;
529
+ /** The input blur event handler; call it with the widget id and value */
530
+ onBlur: (id: string, value: any) => void;
531
+ /** The value change event handler; call it with the new value every time it changes */
532
+ onChange: (value: any) => void;
533
+ /** The input focus event handler; call it with the widget id and value */
534
+ onFocus: (id: string, value: any) => void;
535
+ /** The computed label for this widget, as a string */
536
+ label: string;
537
+ /** A boolean value stating if the widget can accept multiple values */
538
+ multiple?: boolean;
539
+ /** An array of strings listing all generated error messages from encountered errors for this widget */
540
+ rawErrors?: string[];
541
+ /** The `registry` object */
542
+ registry: Registry<T, F>;
543
+ }
544
+ /** The definition of a React-based Widget component */
545
+ declare type Widget<T = any, F = any> = React.ComponentType<WidgetProps<T, F>>;
546
+ /** The type that defines the props used by the Submit button */
547
+ declare type SubmitButtonProps<T = any, F = any> = {
548
+ /** The uiSchema for this widget */
549
+ uiSchema?: UiSchema<T, F>;
550
+ };
551
+ /** The type that defines the props for an Icon button, extending from a basic HTML button attributes */
552
+ declare type IconButtonProps<T = any, F = any> = React.ButtonHTMLAttributes<HTMLButtonElement> & {
553
+ /** An alternative specification for the type of the icon button */
554
+ iconType?: string;
555
+ /** The name representation or actual react element implementation for the icon */
556
+ icon?: string | React.ReactElement;
557
+ /** The uiSchema for this widget */
558
+ uiSchema?: UiSchema<T, F>;
559
+ };
560
+ /** The type that defines how to change the behavior of the submit button for the form */
561
+ declare type UISchemaSubmitButtonOptions = {
562
+ /** The text of the submit button. Set to "Submit" by default */
563
+ submitText?: string;
564
+ /** Flag, if `true`, removes the submit button completely from the form */
565
+ norender?: boolean;
566
+ /** Any other props to be passed to the submit button itself */
567
+ props?: GenericObjectType & {
568
+ /** A boolean value stating if the submit button is disabled */
569
+ disabled?: boolean;
570
+ /** The class name for the submit button */
571
+ className?: string;
572
+ };
573
+ };
574
+ /** This type represents an element used to render an enum option */
575
+ declare type EnumOptionsType = {
576
+ /** The value for the enum option */
577
+ value: any;
578
+ /** The label for the enum options */
579
+ label: string;
580
+ /** The schema associated with the enum option when the option represents a `oneOf` or `anyOf` choice */
581
+ schema?: RJSFSchema;
582
+ };
583
+ /** This type remaps the keys of `Type` to prepend `ui:` onto them. As a result it does not need to be exported */
584
+ declare type MakeUIType<Type> = {
585
+ [Property in keyof Type as `ui:${string & Property}`]: Type[Property];
586
+ };
587
+ /** This type represents all the known supported options in the `ui:options` property, kept separate in order to
588
+ * remap the keys. It also contains all the properties, optionally, of `TemplatesType` except "ButtonTemplates"
589
+ */
590
+ declare type UIOptionsBaseType<T = any, F = any> = Partial<Omit<TemplatesType<T, F>, "ButtonTemplates">> & {
591
+ /** Any classnames that the user wants to be applied to a field in the ui */
592
+ classNames?: string;
593
+ /** We know that for title, it will be a string, if it is provided */
594
+ title?: string;
595
+ /** We know that for description, it will be a string, if it is provided */
596
+ description?: string;
597
+ /** We know that for placeholder, it will be a string, if it is provided */
598
+ placeholder?: string;
599
+ /** Used to add text next to a field to guide the end user in filling it in */
600
+ help?: string;
601
+ /** Flag, if set to `true`, will mark the field as automatically focused on a text input or textarea input */
602
+ autofocus?: boolean;
603
+ /** Use to mark the field as supporting auto complete on a text input or textarea input */
604
+ autocomplete?: HTMLInputElement["autocomplete"];
605
+ /** Flag, if set to `true`, will mark all child widgets from a given field as disabled */
606
+ disabled?: boolean;
607
+ /** The default value to use when an input for a field is empty */
608
+ emptyValue?: any;
609
+ /** Will disable any of the enum options specified in the array (by value) */
610
+ enumDisabled?: Array<string | number | boolean>;
611
+ /** Flag, if set to `true`, will hide the default error display for the given field AND all of its child fields in the
612
+ * hierarchy
613
+ */
614
+ hideError?: boolean;
615
+ /** Flag, if set to `true`, will mark all child widgets from a given field as read-only */
616
+ readonly?: boolean;
617
+ /** This property allows you to reorder the properties that are shown for a particular object */
618
+ order?: string[];
619
+ /** Flag, if set to `false`, will mark array fields as NOT being able to be added to (defaults to true) */
620
+ addable?: boolean;
621
+ /** Flag, if set to `false`, will mark array fields as NOT being able to be ordered (defaults to true) */
622
+ orderable?: boolean;
623
+ /** Flag, if set to `false`, will mark array fields as NOT being able to be removed (defaults to true) */
624
+ removable?: boolean;
625
+ /** Flag, if set to `true`, will mark a list of checkboxes as displayed all on one line instead of one per row */
626
+ inline?: boolean;
627
+ /** Used to change the input type (for example, `tel` or `email`) for an <input> */
628
+ inputType?: string;
629
+ /** Field labels are rendered by default. Labels may be omitted by setting the `label` option to `false` */
630
+ label?: boolean;
631
+ /** Provides a means to set the initial height of a textarea widget */
632
+ rows?: number;
633
+ /** If submitButtonOptions is provided it should match the `UISchemaSubmitButtonOptions` type */
634
+ submitButtonOptions?: UISchemaSubmitButtonOptions;
635
+ /** Allows RJSF to override the default widget implementation by specifying either the name of a widget that is used
636
+ * to look up an implementation from the `widgets` list or an actual one-off widget implementation itself
637
+ */
638
+ widget?: Widget<T, F> | string;
639
+ /** When using `additionalProperties`, key collision is prevented by appending a unique integer to the duplicate key.
640
+ * This option allows you to change the separator between the original key name and the integer. Default is "-"
641
+ */
642
+ duplicateKeySuffixSeparator?: string;
643
+ };
644
+ /** The type that represents the Options potentially provided by `ui:options` */
645
+ declare type UIOptionsType<T = any, F = any> = UIOptionsBaseType<T, F> & {
646
+ /** Anything else will be one of these types */
647
+ [key: string]: boolean | number | string | object | any[] | null | undefined;
648
+ };
649
+ /** Type describing the well-known properties of the `UiSchema` while also supporting all user defined properties,
650
+ * starting with `ui:`.
651
+ */
652
+ declare type UiSchema<T = any, F = any> = GenericObjectType & MakeUIType<UIOptionsBaseType<T, F>> & {
653
+ /** Allows the form to generate a unique prefix for the `Form`'s root prefix */
654
+ "ui:rootFieldId"?: string;
655
+ /** Allows RJSF to override the default field implementation by specifying either the name of a field that is used
656
+ * to look up an implementation from the `fields` list or an actual one-off `Field` component implementation itself
657
+ */
658
+ "ui:field"?: Field<T, F> | string;
659
+ /** An object that contains all of the potential UI options in a single object */
660
+ "ui:options"?: UIOptionsType<T, F>;
661
+ };
662
+ /** A `CustomValidator` function takes in a `formData` and `errors` object and returns the given `errors` object back,
663
+ * while potentially adding additional messages to the `errors`
664
+ */
665
+ declare type CustomValidator<T = any> = (formData: T, errors: FormValidation<T>) => FormValidation<T>;
666
+ /** An `ErrorTransformer` function will take in a list of `errors` and potentially return a transformation of those
667
+ * errors in what ever way it deems necessary
668
+ */
669
+ declare type ErrorTransformer = (errors: RJSFValidationError[]) => RJSFValidationError[];
670
+ /** The type that describes the data that is returned from the `ValidatorType.validateFormData()` function */
671
+ declare type ValidationData<T> = {
672
+ /** The validation errors as a list of `RJSFValidationError` objects */
673
+ errors: RJSFValidationError[];
674
+ /** The validation errors in the form of an `ErrorSchema` */
675
+ errorSchema: ErrorSchema<T>;
676
+ };
677
+ /** The interface that describes the validation functions that are provided by a Validator implementation used by the
678
+ * schema utilities.
679
+ */
680
+ interface ValidatorType<T = any> {
681
+ /** This function processes the `formData` with an optional user contributed `customValidate` function, which receives
682
+ * the form data and a `errorHandler` function that will be used to add custom validation errors for each field. Also
683
+ * supports a `transformErrors` function that will take the raw AJV validation errors, prior to custom validation and
684
+ * transform them in what ever way it chooses.
685
+ *
686
+ * @param formData - The form data to validate
687
+ * @param schema - The schema against which to validate the form data
688
+ * @param [customValidate] - An optional function that is used to perform custom validation
689
+ * @param [transformErrors] - An optional function that is used to transform errors after AJV validation
690
+ */
691
+ validateFormData(formData: T, schema: RJSFSchema, customValidate?: CustomValidator<T>, transformErrors?: ErrorTransformer): ValidationData<T>;
692
+ /** Converts an `errorSchema` into a list of `RJSFValidationErrors`
693
+ *
694
+ * @param errorSchema - The `ErrorSchema` instance to convert
695
+ * @param [fieldPath=[]] - The current field path, defaults to [] if not specified
696
+ */
697
+ toErrorList(errorSchema?: ErrorSchema<T>, fieldPath?: string[]): RJSFValidationError[];
698
+ /** Validates data against a schema, returning true if the data is valid, or
699
+ * false otherwise. If the schema is invalid, then this function will return
700
+ * false.
701
+ *
702
+ * @param schema - The schema against which to validate the form data * @param schema
703
+ * @param formData- - The form data to validate
704
+ * @param rootSchema - The root schema used to provide $ref resolutions
705
+ */
706
+ isValid(schema: RJSFSchema, formData: T, rootSchema: RJSFSchema): boolean;
707
+ }
708
+ /** The `SchemaUtilsType` interface provides a wrapper around the publicly exported APIs in the `@rjsf/utils/schema`
709
+ * directory such that one does not have to explicitly pass the `validator` or `rootSchema` to each method. Since both
710
+ * the `validator` and `rootSchema` generally does not change across a `Form`, this allows for providing a simplified
711
+ * set of APIs to the `@rjsf/core` components and the various themes as well.
712
+ */
713
+ interface SchemaUtilsType<T = any> {
714
+ /** Returns the `ValidatorType` in the `SchemaUtilsType`
715
+ *
716
+ * @returns - The `ValidatorType`
717
+ */
718
+ getValidator(): ValidatorType<T>;
719
+ /** Determines whether either the `validator` and `rootSchema` differ from the ones associated with this instance of
720
+ * the `SchemaUtilsType`. If either `validator` or `rootSchema` are falsy, then return false to prevent the creation
721
+ * of a new `SchemaUtilsType` with incomplete properties.
722
+ *
723
+ * @param validator - An implementation of the `ValidatorType` interface that will be compared against the current one
724
+ * @param rootSchema - The root schema that will be compared against the current one
725
+ * @returns - True if the `SchemaUtilsType` differs from the given `validator` or `rootSchema`
726
+ */
727
+ doesSchemaUtilsDiffer(validator: ValidatorType, rootSchema: RJSFSchema): boolean;
728
+ /** Returns the superset of `formData` that includes the given set updated to include any missing fields that have
729
+ * computed to have defaults provided in the `schema`.
730
+ *
731
+ * @param schema - The schema for which the default state is desired
732
+ * @param [formData] - The current formData, if any, onto which to provide any missing defaults
733
+ * @param [includeUndefinedValues=false] - Optional flag, if true, cause undefined values to be added as defaults
734
+ * @returns - The resulting `formData` with all the defaults provided
735
+ */
736
+ getDefaultFormState(schema: RJSFSchema, formData?: T, includeUndefinedValues?: boolean): T | T[] | undefined;
737
+ /** Determines whether the combination of `schema` and `uiSchema` properties indicates that the label for the `schema`
738
+ * should be displayed in a UI.
739
+ *
740
+ * @param schema - The schema for which the display label flag is desired
741
+ * @param [uiSchema] - The UI schema from which to derive potentially displayable information
742
+ * @returns - True if the label should be displayed or false if it should not
743
+ */
744
+ getDisplayLabel<F = any>(schema: RJSFSchema, uiSchema?: UiSchema<T, F>): boolean;
745
+ /** Given the `formData` and list of `options`, attempts to find the index of the option that best matches the data.
746
+ *
747
+ * @param formData - The current formData, if any, onto which to provide any missing defaults
748
+ * @param options - The list of options to find a matching options from
749
+ * @returns - The index of the matched option or 0 if none is available
750
+ */
751
+ getMatchingOption(formData: T, options: RJSFSchema[]): number;
752
+ /** Checks to see if the `schema` and `uiSchema` combination represents an array of files
753
+ *
754
+ * @param schema - The schema for which check for array of files flag is desired
755
+ * @param [uiSchema] - The UI schema from which to check the widget
756
+ * @returns - True if schema/uiSchema contains an array of files, otherwise false
757
+ */
758
+ isFilesArray<F = any>(schema: RJSFSchema, uiSchema?: UiSchema<T, F>): boolean;
759
+ /** Checks to see if the `schema` combination represents a multi-select
760
+ *
761
+ * @param schema - The schema for which check for a multi-select flag is desired
762
+ * @returns - True if schema contains a multi-select, otherwise false
763
+ */
764
+ isMultiSelect(schema: RJSFSchema): boolean;
765
+ /** Checks to see if the `schema` combination represents a select
766
+ *
767
+ * @param schema - The schema for which check for a select flag is desired
768
+ * @returns - True if schema contains a select, otherwise false
769
+ */
770
+ isSelect(schema: RJSFSchema): boolean;
771
+ /** Merges the errors in `additionalErrorSchema` into the existing `validationData` by combining the hierarchies in the
772
+ * two `ErrorSchema`s and then appending the error list from the `additionalErrorSchema` obtained by calling
773
+ * `validator.toErrorList()` onto the `errors` in the `validationData`. If no `additionalErrorSchema` is passed, then
774
+ * `validationData` is returned.
775
+ *
776
+ * @param validator - The validator used to convert an ErrorSchema to a list of errors
777
+ * @param validationData - The current `ValidationData` into which to merge the additional errors
778
+ * @param [additionalErrorSchema] - The additional set of errors
779
+ * @returns - The `validationData` with the additional errors from `additionalErrorSchema` merged into it, if provided.
780
+ */
781
+ mergeValidationData(validationData: ValidationData<T>, additionalErrorSchema?: ErrorSchema<T>): ValidationData<T>;
782
+ /** Retrieves an expanded schema that has had all of its conditions, additional properties, references and
783
+ * dependencies resolved and merged into the `schema` given a `rawFormData` that is used to do the potentially
784
+ * recursive resolution.
785
+ *
786
+ * @param schema - The schema for which retrieving a schema is desired
787
+ * @param [rawFormData] - The current formData, if any, to assist retrieving a schema
788
+ * @returns - The schema having its conditions, additional properties, references and dependencies resolved
789
+ */
790
+ retrieveSchema(schema: RJSFSchema, formData?: T): RJSFSchema;
791
+ /** Generates an `IdSchema` object for the `schema`, recursively
792
+ *
793
+ * @param schema - The schema for which the display label flag is desired
794
+ * @param [id] - The base id for the schema
795
+ * @param [formData] - The current formData, if any, onto which to provide any missing defaults
796
+ * @param [idPrefix='root'] - The prefix to use for the id
797
+ * @param [idSeparator='_'] - The separator to use for the path segments in the id
798
+ * @returns - The `IdSchema` object for the `schema`
799
+ */
800
+ toIdSchema(schema: RJSFSchema, id?: string, formData?: T, idPrefix?: string, idSeparator?: string): IdSchema<T>;
801
+ /** Generates an `PathSchema` object for the `schema`, recursively
802
+ *
803
+ * @param schema - The schema for which the display label flag is desired
804
+ * @param [name] - The base name for the schema
805
+ * @param [formData] - The current formData, if any, onto which to provide any missing defaults
806
+ * @returns - The `PathSchema` object for the `schema`
807
+ */
808
+ toPathSchema(schema: RJSFSchema, name?: string, formData?: T): PathSchema<T>;
809
+ }
810
+
811
+ /** Checks the schema to see if it is allowing additional items, by verifying that `schema.additionalItems` is an
812
+ * object. The user is warned in the console if `schema.additionalItems` has the value `true`.
813
+ *
814
+ * @param schema - The schema object to check
815
+ * @returns - True if additional items is allowed, otherwise false
816
+ */
817
+ declare function allowAdditionalItems(schema: RJSFSchema): boolean;
818
+
819
+ /** Attempts to convert the string into a number. If an empty string is provided, then `undefined` is returned. If a
820
+ * `null` is provided, it is returned. If the string ends in a `.` then the string is returned because the user may be
821
+ * in the middle of typing a float number. If a number ends in a pattern like `.0`, `.20`, `.030`, string is returned
822
+ * because the user may be typing number that will end in a non-zero digit. Otherwise, the string is wrapped by
823
+ * `Number()` and if that result is not `NaN`, that number will be returned, otherwise the string `value` will be.
824
+ *
825
+ * @param value - The string or null value to convert to a number
826
+ * @returns - The `value` converted to a number when appropriate, otherwise the `value`
827
+ */
828
+ declare function asNumber(value: string | null): string | number | null | undefined;
829
+
830
+ /** Checks whether the field described by `schema`, having the `uiSchema` and `formData` supports expanding. The UI for
831
+ * the field can expand if it has additional properties, is not forced as non-expandable by the `uiSchema` and the
832
+ * `formData` object doesn't already have `schema.maxProperties` elements.
833
+ *
834
+ * @param schema - The schema for the field that is being checked
835
+ * @param [uiSchema={}] - The uiSchema for the field
836
+ * @param [formData] - The formData for the field
837
+ * @returns - True if the schema element has additionalProperties, is expandable, and not at the maxProperties limit
838
+ */
839
+ declare function canExpand<T = any, F = any>(schema: RJSFSchema, uiSchema?: UiSchema<T, F>, formData?: T): boolean;
840
+
841
+ /** Creates a `SchemaUtilsType` interface that is based around the given `validator` and `rootSchema` parameters. The
842
+ * resulting interface implementation will forward the `validator` and `rootSchema` to all the wrapped APIs.
843
+ *
844
+ * @param validator - an implementation of the `ValidatorType` interface that will be forwarded to all the APIs
845
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
846
+ * @returns - An implementation of a `SchemaUtilsType` interface
847
+ */
848
+ declare function createSchemaUtils<T = any>(validator: ValidatorType, rootSchema: RJSFSchema): SchemaUtilsType<T>;
849
+
850
+ /** Given the `FileReader.readAsDataURL()` based `dataURI` extracts that data into an actual Blob along with the name
851
+ * of that Blob if provided in the URL. If no name is provided, then the name falls back to `unknown`.
852
+ *
853
+ * @param dataURI - The `DataUrl` potentially containing name and raw data to be converted to a Blob
854
+ * @returns - an object containing a Blob and its name, extracted from the URI
855
+ */
856
+ declare function dataURItoBlob(dataURI: string): {
857
+ blob: Blob;
858
+ name: string;
859
+ };
860
+
861
+ /** Implements a deep equals using the `lodash.isEqualWith` function, that provides a customized comparator that
862
+ * assumes all functions are equivalent.
863
+ *
864
+ * @param a - The first element to compare
865
+ * @param b - The second element to compare
866
+ * @returns - True if the `a` and `b` are deeply equal, false otherwise
867
+ */
868
+ declare function deepEquals(a: any, b: any): boolean;
869
+
870
+ /** Given the name of a `$ref` from within a schema, using the `rootSchema`, look up and return the sub-schema using the
871
+ * path provided by that reference. If `#` is not the first character of the reference, or the path does not exist in
872
+ * the schema, then throw an Error. Otherwise return the sub-schema. Also deals with nested `$ref`s in the sub-schema.
873
+ *
874
+ * @param $ref - The ref string for which the schema definition is desired
875
+ * @param [rootSchema={}] - The root schema in which to search for the definition
876
+ * @returns - The sub-schema within the `rootSchema` which matches the `$ref` if it exists
877
+ * @throws - Error indicating that no schema for that reference exists
878
+ */
879
+ declare function findSchemaDefinition($ref?: string, rootSchema?: RJSFSchema): RJSFSchema;
880
+
881
+ /** Using the `schema`, `defaultType` and `options`, extract out the props for the <input> element that make sense.
882
+ *
883
+ * @param schema - The schema for the field provided by the widget
884
+ * @param [defaultType] - The default type, if any, for the field provided by the widget
885
+ * @param [options={}] - The UI Options for the field provided by the widget
886
+ * @param [autoDefaultStepAny=true] - Determines whether to auto-default step=any when the type is number and no step
887
+ * @returns - The extracted `InputPropsType` object
888
+ */
889
+ declare function getInputProps<T = any, F = any>(schema: RJSFSchema, defaultType?: string, options?: UIOptionsType<T, F>, autoDefaultStepAny?: boolean): InputPropsType;
890
+
891
+ /** Gets the type of a given `schema`. If the type is not explicitly defined, then an attempt is made to infer it from
892
+ * other elements of the schema as follows:
893
+ * - schema.const: Returns the `guessType()` of that value
894
+ * - schema.enum: Returns `string`
895
+ * - schema.properties: Returns `object`
896
+ * - schema.additionalProperties: Returns `object`
897
+ * - type is an array with a length of 2 and one type is 'null': Returns the other type
898
+ *
899
+ * @param schema - The schema for which to get the type
900
+ * @returns - The type of the schema
901
+ */
902
+ declare function getSchemaType(schema: RJSFSchema): string | string[] | undefined;
903
+
904
+ /** Extracts any `ui:submitButtonOptions` from the `uiSchema` and merges them onto the `DEFAULT_OPTIONS`
905
+ *
906
+ * @param [uiSchema={}] - the UI Schema from which to extract submit button props
907
+ * @returns - The merging of the `DEFAULT_OPTIONS` with any custom ones
908
+ */
909
+ declare function getSubmitButtonOptions<T = any, F = any>(uiSchema?: UiSchema<T, F>): UISchemaSubmitButtonOptions;
910
+
911
+ /** Returns the template with the given `name` from either the `uiSchema` if it is defined or from the `registry`
912
+ * otherwise. NOTE, since `ButtonTemplates` are not overridden in `uiSchema` only those in the `registry` are returned.
913
+ *
914
+ * @param name - The name of the template to fetch, restricted to the keys of `TemplatesType`
915
+ * @param registry - The `Registry` from which to read the template
916
+ * @param [uiOptions={}] - The `UIOptionsType` from which to read an alternate template
917
+ * @returns - The template from either the `uiSchema` or `registry` for the `name`
918
+ */
919
+ declare function getTemplate<Name extends keyof TemplatesType<T, F>, T = any, F = any>(name: Name, registry: Registry<T, F>, uiOptions?: UIOptionsType<T, F>): TemplatesType<T, F>[Name];
920
+
921
+ /** Get all passed options from ui:options, and ui:<optionName>, returning them in an object with the `ui:`
922
+ * stripped off.
923
+ *
924
+ * @param [uiSchema={}] - The UI Schema from which to get any `ui:xxx` options
925
+ * @returns - An object containing all of the `ui:xxx` options with the stripped off
926
+ */
927
+ declare function getUiOptions<T = any, F = any>(uiSchema?: UiSchema<T, F>): UIOptionsType<T, F>;
928
+
929
+ /** Given a schema representing a field to render and either the name or actual `Widget` implementation, returns the
930
+ * React component that is used to render the widget. If the `widget` is already a React component, then it is wrapped
931
+ * with a `MergedWidget`. Otherwise an attempt is made to look up the widget inside of the `registeredWidgets` map based
932
+ * on the schema type and `widget` name. If no widget component can be found an `Error` is thrown.
933
+ *
934
+ * @param schema - The schema for the field
935
+ * @param [widget] - Either the name of the widget OR a `Widget` implementation to use
936
+ * @param [registeredWidgets={}] - A registry of widget name to `Widget` implementation
937
+ * @returns - The `Widget` component to use
938
+ * @throws - An error if there is no `Widget` component that can be returned
939
+ */
940
+ declare function getWidget<T = any, F = any>(schema: RJSFSchema, widget?: Widget<T, F> | string, registeredWidgets?: RegistryWidgetsType<T, F>): Widget<T, F>;
941
+
942
+ /** Given a specific `value` attempts to guess the type of a schema element. In the case where we have to implicitly
943
+ * create a schema, it is useful to know what type to use based on the data we are defining.
944
+ *
945
+ * @param value - The value from which to guess the type
946
+ * @returns - The best guess for the object type
947
+ */
948
+ declare function guessType(value: any): "array" | "string" | "null" | "boolean" | "number" | "object";
949
+
950
+ /** Detects whether the `widget` exists for the `schema` with the associated `registryWidgets` and returns true if it
951
+ * does, or false if it doesn't.
952
+ *
953
+ * @param schema - The schema for the field
954
+ * @param widget - Either the name of the widget OR a `Widget` implementation to use
955
+ * @param [registeredWidgets={}] - A registry of widget name to `Widget` implementation
956
+ * @returns - True if the widget exists, false otherwise
957
+ */
958
+ declare function hasWidget<T = any, F = any>(schema: RJSFSchema, widget: Widget<T, F> | string, registeredWidgets?: RegistryWidgetsType<T, F>): boolean;
959
+
960
+ /** This function checks if the given `schema` matches a single constant value. This happens when either the schema has
961
+ * an `enum` array with a single value or there is a `const` defined.
962
+ *
963
+ * @param schema - The schema for a field
964
+ * @returns - True if the `schema` has a single constant value, false otherwise
965
+ */
966
+ declare function isConstant(schema: RJSFSchema): boolean;
967
+
968
+ /** Checks to see if the `uiSchema` contains the `widget` field and that the widget is not `hidden`
969
+ *
970
+ * @param uiSchema - The UI Schema from which to detect if it is customized
971
+ * @returns - True if the `uiSchema` describes a custom widget, false otherwise
972
+ */
973
+ declare function isCustomWidget<T = any, F = any>(uiSchema?: UiSchema<T, F>): boolean;
974
+
975
+ /** Detects whether the given `schema` contains fixed items. This is the case when `schema.items` is a non-empty array
976
+ * that only contains objects.
977
+ *
978
+ * @param schema - The schema in which to check for fixed items
979
+ * @returns - True if there are fixed items in the schema, false otherwise
980
+ */
981
+ declare function isFixedItems(schema: RJSFSchema): boolean;
982
+
983
+ /** Determines whether a `thing` is an object for the purposes of RSJF. In this case, `thing` is an object if it has
984
+ * the type `object` but is NOT null, an array or a File.
985
+ *
986
+ * @param thing - The thing to check to see whether it is an object
987
+ * @returns - True if it is a non-null, non-array, non-File object
988
+ */
989
+ declare function isObject(thing: any): boolean;
990
+
991
+ /** Converts a local Date string into a UTC date string
992
+ *
993
+ * @param dateString - The string representation of a date as accepted by the `Date()` constructor
994
+ * @returns - A UTC date string if `dateString` is truthy, otherwise undefined
995
+ */
996
+ declare function localToUTC(dateString: string): string | undefined;
997
+
998
+ /** Merges the `defaults` object of type `T` into the `formData` of type `T`
999
+ *
1000
+ * When merging defaults and form data, we want to merge in this specific way:
1001
+ * - objects are deeply merged
1002
+ * - arrays are merged in such a way that:
1003
+ * - when the array is set in form data, only array entries set in form data
1004
+ * are deeply merged; additional entries from the defaults are ignored
1005
+ * - when the array is not set in form data, the default is copied over
1006
+ * - scalars are overwritten/set by form data
1007
+ *
1008
+ * @param defaults - The defaults to merge
1009
+ * @param formData - The form data into which the defaults will be merged
1010
+ * @returns - The resulting merged form data with defaults
1011
+ */
1012
+ declare function mergeDefaultsWithFormData<T = any>(defaults: T, formData: T): T;
1013
+
1014
+ /** Recursively merge deeply nested objects.
1015
+ *
1016
+ * @param obj1 - The first object to merge
1017
+ * @param obj2 - The second object to merge
1018
+ * @param [concatArrays=false] - Optional flag that, when true, will cause arrays to be concatenated
1019
+ * @returns - A new object that is the merge of the two given objects
1020
+ */
1021
+ declare function mergeObjects(obj1: GenericObjectType, obj2: GenericObjectType, concatArrays?: boolean): GenericObjectType;
1022
+
1023
+ /** Recursively merge deeply nested schemas. The difference between `mergeSchemas` and `mergeObjects` is that
1024
+ * `mergeSchemas` only concats arrays for values under the 'required' keyword, and when it does, it doesn't include
1025
+ * duplicate values.
1026
+ *
1027
+ * @param obj1 - The first schema object to merge
1028
+ * @param obj2 - The second schema object to merge
1029
+ * @returns - The merged schema object
1030
+ */
1031
+ declare function mergeSchemas(obj1: GenericObjectType, obj2: GenericObjectType): GenericObjectType;
1032
+
1033
+ /** Gets the list of options from the schema. If the schema has an enum list, then those enum values are returned. The
1034
+ * labels for the options will be extracted from the non-standard, RJSF-deprecated `enumNames` if it exists, otherwise
1035
+ * the label will be the same as the `value`. If the schema has a `oneOf` or `anyOf`, then the value is the list of
1036
+ * `const` values from the schema and the label is either the `schema.title` or the value.
1037
+ *
1038
+ * @param schema - The schema from which to extract the options list
1039
+ * @returns - The list of options from the schema
1040
+ */
1041
+ declare function optionsList(schema: RJSFSchema): EnumOptionsType[] | undefined;
1042
+
1043
+ /** Given a list of `properties` and an `order` list, returns a list that contains the `properties` ordered correctly.
1044
+ * If `order` is not an array, then the untouched `properties` list is returned. Otherwise `properties` is ordered per
1045
+ * the `order` list. If `order` contains a '*' then any `properties` that are not mentioned explicity in `order` will be
1046
+ * places in the location of the `*`.
1047
+ *
1048
+ * @param properties - The list of property keys to be ordered
1049
+ * @param order - An array of property keys to be ordered first, with an optional '*' property
1050
+ * @returns - A list with the `properties` ordered
1051
+ * @throws - Error when the properties cannot be ordered correctly
1052
+ */
1053
+ declare function orderProperties(properties: string[], order?: string[]): string[];
1054
+
1055
+ /** Returns a string representation of the `num` that is padded with leading "0"s if necessary
1056
+ *
1057
+ * @param num - The number to pad
1058
+ * @param width - The width of the string at which no lead padding is necessary
1059
+ * @returns - The number converted to a string with leading zero padding if the number of digits is less than `width`
1060
+ */
1061
+ declare function pad(num: number, width: number): string;
1062
+
1063
+ /** Parses the `dateString` into a `DateObject`, including the time information when `includeTime` is true
1064
+ *
1065
+ * @param dateString - The date string to parse into a DateObject
1066
+ * @param [includeTime=true] - Optional flag, if false, will not include the time data into the object
1067
+ * @returns - The date string converted to a `DateObject`
1068
+ * @throws - Error when the date cannot be parsed from the string
1069
+ */
1070
+ declare function parseDateString(dateString?: string, includeTime?: boolean): DateObject;
1071
+
1072
+ /** Returns the real value for a select widget due to a silly limitation in the DOM which causes option change event
1073
+ * values to always be retrieved as strings. Uses the `schema` to help determine the value's true type. If the value is
1074
+ * an empty string, then the `emptyValue` from the `options` is returned, falling back to undefined.
1075
+ *
1076
+ * @param schema - The schema to used to determine the value's true type
1077
+ * @param [value] - The value to convert
1078
+ * @param [options] - The UIOptionsType from which to potentially extract the emptyValue
1079
+ * @returns - The `value` converted to the proper type
1080
+ */
1081
+ declare function processSelectValue<T = any, F = any>(schema: RJSFSchema, value?: any, options?: UIOptionsType<T, F>): any;
1082
+
1083
+ /** Extracts the range spec information `{ step?: number, min?: number, max?: number }` that can be spread onto an HTML
1084
+ * input from the range analog in the schema `{ multipleOf?: number, minimum?: number, maximum?: number }`.
1085
+ *
1086
+ * @param schema - The schema from which to extract the range spec
1087
+ * @returns - A range specification from the schema
1088
+ */
1089
+ declare function rangeSpec(schema: RJSFSchema): RangeSpecType;
1090
+
1091
+ /** Check to see if a `schema` specifies that a value must be true. This happens when:
1092
+ * - `schema.const` is truthy
1093
+ * - `schema.enum` == `[true]`
1094
+ * - `schema.anyOf` or `schema.oneOf` has a single value which recursively returns true
1095
+ * - `schema.allOf` has at least one value which recursively returns true
1096
+ *
1097
+ * @param schema - The schema to check
1098
+ * @returns - True if the schema specifies a value that must be true, false otherwise
1099
+ */
1100
+ declare function schemaRequiresTrueValue(schema: RJSFSchema): boolean;
1101
+
1102
+ /** Determines whether the given `component` should be rerendered by comparing its current set of props and state
1103
+ * against the next set. If either of those two sets are not the same, then the component should be rerendered.
1104
+ *
1105
+ * @param component - A React component being checked
1106
+ * @param nextProps - The next set of props against which to check
1107
+ * @param nextState - The next set of state against which to check
1108
+ * @returns - True if the component should be re-rendered, false otherwise
1109
+ */
1110
+ declare function shouldRender(component: React.Component, nextProps: any, nextState: any): boolean;
1111
+
1112
+ /** Returns the constant value from the schema when it is either a single value enum or has a const key. Otherwise
1113
+ * throws an error.
1114
+ *
1115
+ * @param schema - The schema from which to obtain the constant value
1116
+ * @returns - The constant value for the schema
1117
+ * @throws - Error when the schema does not have a constant value
1118
+ */
1119
+ declare function toConstant(schema: RJSFSchema): json_schema.JSONSchema7Type | undefined;
1120
+
1121
+ /** Returns a UTC date string for the given `dateObject`. If `time` is false, then the time portion of the string is
1122
+ * removed.
1123
+ *
1124
+ * @param dateObject - The `DateObject` to convert to a date string
1125
+ * @param [time=true] - Optional flag used to remove the time portion of the date string if false
1126
+ * @returns - The UTC date string
1127
+ */
1128
+ declare function toDateString(dateObject: DateObject, time?: boolean): string;
1129
+
1130
+ /** Converts a UTC date string into a local Date format
1131
+ *
1132
+ * @param jsonDate - A UTC date string
1133
+ * @returns - An empty string when `jsonDate` is falsey, otherwise a date string in local format
1134
+ */
1135
+ declare function utcToLocal(jsonDate: string): string;
1136
+
1137
+ /** Below are the list of all the keys into various elements of a RJSFSchema or UiSchema that are used by the various
1138
+ * utility functions. In addition to those keys, there are the special `ADDITIONAL_PROPERTY_FLAG` and
1139
+ * `RJSF_ADDITONAL_PROPERTIES_FLAG` flags that is added to a schema under certain conditions by the `retrieveSchema()`
1140
+ * utility.
1141
+ */
1142
+ declare const ADDITIONAL_PROPERTY_FLAG = "__additional_property";
1143
+ declare const ADDITIONAL_PROPERTIES_KEY = "additionalProperties";
1144
+ declare const ALL_OF_KEY = "allOf";
1145
+ declare const ANY_OF_KEY = "anyOf";
1146
+ declare const CONST_KEY = "const";
1147
+ declare const DEFAULT_KEY = "default";
1148
+ declare const DEFINITIONS_KEY = "definitions";
1149
+ declare const DEPENDENCIES_KEY = "dependencies";
1150
+ declare const ENUM_KEY = "enum";
1151
+ declare const ERRORS_KEY = "__errors";
1152
+ declare const ID_KEY = "$id";
1153
+ declare const ITEMS_KEY = "items";
1154
+ declare const NAME_KEY = "$name";
1155
+ declare const ONE_OF_KEY = "oneOf";
1156
+ declare const PROPERTIES_KEY = "properties";
1157
+ declare const REQUIRED_KEY = "required";
1158
+ declare const SUBMIT_BTN_OPTIONS_KEY = "submitButtonOptions";
1159
+ declare const REF_KEY = "$ref";
1160
+ declare const RJSF_ADDITONAL_PROPERTIES_FLAG = "__rjsf_additionalProperties";
1161
+ declare const UI_FIELD_KEY = "ui:field";
1162
+ declare const UI_WIDGET_KEY = "ui:widget";
1163
+ declare const UI_OPTIONS_KEY = "ui:options";
1164
+
1165
+ /** Returns the superset of `formData` that includes the given set updated to include any missing fields that have
1166
+ * computed to have defaults provided in the `schema`.
1167
+ *
1168
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1169
+ * @param theSchema - The schema for which the default state is desired
1170
+ * @param [formData] - The current formData, if any, onto which to provide any missing defaults
1171
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1172
+ * @param [includeUndefinedValues=false] - Optional flag, if true, cause undefined values to be added as defaults
1173
+ * @returns - The resulting `formData` with all the defaults provided
1174
+ */
1175
+ declare function getDefaultFormState<T = any>(validator: ValidatorType, theSchema: RJSFSchema, formData?: T, rootSchema?: RJSFSchema, includeUndefinedValues?: boolean): T | T[] | undefined;
1176
+
1177
+ /** Determines whether the combination of `schema` and `uiSchema` properties indicates that the label for the `schema`
1178
+ * should be displayed in a UI.
1179
+ *
1180
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1181
+ * @param schema - The schema for which the display label flag is desired
1182
+ * @param [uiSchema={}] - The UI schema from which to derive potentially displayable information
1183
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1184
+ * @returns - True if the label should be displayed or false if it should not
1185
+ */
1186
+ declare function getDisplayLabel<T = any, F = any>(validator: ValidatorType, schema: RJSFSchema, uiSchema?: UiSchema<T, F>, rootSchema?: RJSFSchema): boolean;
1187
+
1188
+ /** Given the `formData` and list of `options`, attempts to find the index of the option that best matches the data.
1189
+ *
1190
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1191
+ * @param formData - The current formData, if any, used to figure out a match
1192
+ * @param options - The list of options to find a matching options from
1193
+ * @param rootSchema - The root schema, used to primarily to look up `$ref`s
1194
+ * @returns - The index of the matched option or 0 if none is available
1195
+ */
1196
+ declare function getMatchingOption<T = any>(validator: ValidatorType, formData: T | undefined, options: RJSFSchema[], rootSchema: RJSFSchema): number;
1197
+
1198
+ /** Checks to see if the `schema` and `uiSchema` combination represents an array of files
1199
+ *
1200
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1201
+ * @param schema - The schema for which check for array of files flag is desired
1202
+ * @param [uiSchema={}] - The UI schema from which to check the widget
1203
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1204
+ * @returns - True if schema/uiSchema contains an array of files, otherwise false
1205
+ */
1206
+ declare function isFilesArray<T = any, F = any>(validator: ValidatorType, schema: RJSFSchema, uiSchema?: UiSchema<T, F>, rootSchema?: RJSFSchema): boolean;
1207
+
1208
+ /** Checks to see if the `schema` combination represents a multi-select
1209
+ *
1210
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1211
+ * @param schema - The schema for which check for a multi-select flag is desired
1212
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1213
+ * @returns - True if schema contains a multi-select, otherwise false
1214
+ */
1215
+ declare function isMultiSelect<T = any>(validator: ValidatorType, schema: RJSFSchema, rootSchema?: RJSFSchema): boolean;
1216
+
1217
+ /** Checks to see if the `schema` combination represents a select
1218
+ *
1219
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1220
+ * @param theSchema - The schema for which check for a select flag is desired
1221
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1222
+ * @returns - True if schema contains a select, otherwise false
1223
+ */
1224
+ declare function isSelect<T = any>(validator: ValidatorType, theSchema: RJSFSchema, rootSchema?: RJSFSchema): boolean;
1225
+
1226
+ /** Merges the errors in `additionalErrorSchema` into the existing `validationData` by combining the hierarchies in the
1227
+ * two `ErrorSchema`s and then appending the error list from the `additionalErrorSchema` obtained by calling
1228
+ * `validator.toErrorList()` onto the `errors` in the `validationData`. If no `additionalErrorSchema` is passed, then
1229
+ * `validationData` is returned.
1230
+ *
1231
+ * @param validator - The validator used to convert an ErrorSchema to a list of errors
1232
+ * @param validationData - The current `ValidationData` into which to merge the additional errors
1233
+ * @param [additionalErrorSchema] - The additional set of errors in an `ErrorSchema`
1234
+ * @returns - The `validationData` with the additional errors from `additionalErrorSchema` merged into it, if provided.
1235
+ */
1236
+ declare function mergeValidationData<T = any>(validator: ValidatorType<T>, validationData: ValidationData<T>, additionalErrorSchema?: ErrorSchema<T>): ValidationData<T>;
1237
+
1238
+ /** Retrieves an expanded schema that has had all of its conditions, additional properties, references and dependencies
1239
+ * resolved and merged into the `schema` given a `validator`, `rootSchema` and `rawFormData` that is used to do the
1240
+ * potentially recursive resolution.
1241
+ *
1242
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
1243
+ * @param schema - The schema for which retrieving a schema is desired
1244
+ * @param [rootSchema={}] - The root schema that will be forwarded to all the APIs
1245
+ * @param [rawFormData] - The current formData, if any, to assist retrieving a schema
1246
+ * @returns - The schema having its conditions, additional properties, references and dependencies resolved
1247
+ */
1248
+ declare function retrieveSchema<T = any>(validator: ValidatorType, schema: RJSFSchema, rootSchema?: RJSFSchema, rawFormData?: T): RJSFSchema;
1249
+
1250
+ /** Generates an `IdSchema` object for the `schema`, recursively
1251
+ *
1252
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1253
+ * @param schema - The schema for which the `IdSchema` is desired
1254
+ * @param [id] - The base id for the schema
1255
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1256
+ * @param [formData] - The current formData, if any, to assist retrieving a schema
1257
+ * @param [idPrefix='root'] - The prefix to use for the id
1258
+ * @param [idSeparator='_'] - The separator to use for the path segments in the id
1259
+ * @returns - The `IdSchema` object for the `schema`
1260
+ */
1261
+ declare function toIdSchema<T = any>(validator: ValidatorType, schema: RJSFSchema, id?: string | null, rootSchema?: RJSFSchema, formData?: T, idPrefix?: string, idSeparator?: string): IdSchema<T>;
1262
+
1263
+ /** Generates an `PathSchema` object for the `schema`, recursively
1264
+ *
1265
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
1266
+ * @param schema - The schema for which the `PathSchema` is desired
1267
+ * @param [name=''] - The base name for the schema
1268
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
1269
+ * @param [formData] - The current formData, if any, to assist retrieving a schema
1270
+ * @returns - The `PathSchema` object for the `schema`
1271
+ */
1272
+ declare function toPathSchema<T = any>(validator: ValidatorType, schema: RJSFSchema, name?: string, rootSchema?: RJSFSchema, formData?: T): PathSchema<T>;
1273
+
1274
+ export { ADDITIONAL_PROPERTIES_KEY, ADDITIONAL_PROPERTY_FLAG, ALL_OF_KEY, ANY_OF_KEY, ArrayFieldDescriptionProps, ArrayFieldTemplateItemType, ArrayFieldTemplateProps, ArrayFieldTitleProps, CONST_KEY, CustomValidator, DEFAULT_KEY, DEFINITIONS_KEY, DEPENDENCIES_KEY, DateObject, DescriptionFieldProps, ENUM_KEY, ERRORS_KEY, EnumOptionsType, ErrorListProps, ErrorSchema, ErrorTransformer, Field, FieldError, FieldErrorProps, FieldErrors, FieldHelpProps, FieldId, FieldPath, FieldProps, FieldTemplateProps, FieldValidation, FormValidation, GenericObjectType, ID_KEY, ITEMS_KEY, IconButtonProps, IdSchema, InputPropsType, NAME_KEY, ONE_OF_KEY, ObjectFieldTemplatePropertyType, ObjectFieldTemplateProps, PROPERTIES_KEY, PathSchema, REF_KEY, REQUIRED_KEY, RJSFSchema, RJSFSchemaDefinition, RJSFValidationError, RJSF_ADDITONAL_PROPERTIES_FLAG, RangeSpecType, Registry, RegistryFieldsType, RegistryWidgetsType, SUBMIT_BTN_OPTIONS_KEY, SchemaUtilsType, SubmitButtonProps, TemplatesType, TitleFieldProps, UIOptionsType, UISchemaSubmitButtonOptions, UI_FIELD_KEY, UI_OPTIONS_KEY, UI_WIDGET_KEY, UiSchema, UnsupportedFieldProps, ValidationData, ValidatorType, Widget, WidgetProps, WrapIfAdditionalTemplateProps, allowAdditionalItems, asNumber, canExpand, createSchemaUtils, dataURItoBlob, deepEquals, findSchemaDefinition, getDefaultFormState, getDisplayLabel, getInputProps, getMatchingOption, getSchemaType, getSubmitButtonOptions, getTemplate, getUiOptions, getWidget, guessType, hasWidget, isConstant, isCustomWidget, isFilesArray, isFixedItems, isMultiSelect, isObject, isSelect, localToUTC, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, mergeValidationData, optionsList, orderProperties, pad, parseDateString, processSelectValue, rangeSpec, retrieveSchema, schemaRequiresTrueValue, shouldRender, toConstant, toDateString, toIdSchema, toPathSchema, utcToLocal };