@rjsf/core 6.0.0-beta.9 → 6.0.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.
Files changed (160) hide show
  1. package/README.md +2 -0
  2. package/dist/core.umd.js +2042 -1987
  3. package/dist/index.cjs +4909 -0
  4. package/dist/index.cjs.map +7 -0
  5. package/dist/index.esm.js +2509 -2389
  6. package/dist/index.esm.js.map +4 -4
  7. package/lib/components/Form.d.ts +137 -34
  8. package/lib/components/Form.d.ts.map +1 -1
  9. package/lib/components/Form.js +318 -173
  10. package/lib/components/fields/ArrayField.d.ts +2 -187
  11. package/lib/components/fields/ArrayField.d.ts.map +1 -1
  12. package/lib/components/fields/ArrayField.js +526 -492
  13. package/lib/components/fields/BooleanField.d.ts.map +1 -1
  14. package/lib/components/fields/BooleanField.js +8 -3
  15. package/lib/components/fields/FallbackField.d.ts +7 -0
  16. package/lib/components/fields/FallbackField.d.ts.map +1 -0
  17. package/lib/components/fields/FallbackField.js +72 -0
  18. package/lib/components/fields/LayoutGridField.d.ts +109 -186
  19. package/lib/components/fields/LayoutGridField.d.ts.map +1 -1
  20. package/lib/components/fields/LayoutGridField.js +426 -426
  21. package/lib/components/fields/LayoutHeaderField.d.ts +1 -1
  22. package/lib/components/fields/LayoutHeaderField.js +3 -3
  23. package/lib/components/fields/LayoutMultiSchemaField.d.ts.map +1 -1
  24. package/lib/components/fields/LayoutMultiSchemaField.js +6 -6
  25. package/lib/components/fields/MultiSchemaField.d.ts.map +1 -1
  26. package/lib/components/fields/MultiSchemaField.js +16 -10
  27. package/lib/components/fields/NullField.js +3 -3
  28. package/lib/components/fields/NumberField.d.ts.map +1 -1
  29. package/lib/components/fields/NumberField.js +3 -3
  30. package/lib/components/fields/ObjectField.d.ts +2 -68
  31. package/lib/components/fields/ObjectField.d.ts.map +1 -1
  32. package/lib/components/fields/ObjectField.js +163 -163
  33. package/lib/components/fields/OptionalDataControlsField.d.ts +8 -0
  34. package/lib/components/fields/OptionalDataControlsField.d.ts.map +1 -0
  35. package/lib/components/fields/OptionalDataControlsField.js +43 -0
  36. package/lib/components/fields/SchemaField.d.ts.map +1 -1
  37. package/lib/components/fields/SchemaField.js +52 -30
  38. package/lib/components/fields/StringField.d.ts.map +1 -1
  39. package/lib/components/fields/StringField.js +8 -3
  40. package/lib/components/fields/index.d.ts.map +1 -1
  41. package/lib/components/fields/index.js +4 -0
  42. package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts +1 -1
  43. package/lib/components/templates/ArrayFieldDescriptionTemplate.js +3 -3
  44. package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts +3 -3
  45. package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts.map +1 -1
  46. package/lib/components/templates/ArrayFieldItemButtonsTemplate.js +3 -8
  47. package/lib/components/templates/ArrayFieldItemTemplate.d.ts +3 -3
  48. package/lib/components/templates/ArrayFieldItemTemplate.d.ts.map +1 -1
  49. package/lib/components/templates/ArrayFieldItemTemplate.js +1 -1
  50. package/lib/components/templates/ArrayFieldTemplate.d.ts +1 -1
  51. package/lib/components/templates/ArrayFieldTemplate.d.ts.map +1 -1
  52. package/lib/components/templates/ArrayFieldTemplate.js +4 -5
  53. package/lib/components/templates/ArrayFieldTitleTemplate.d.ts +1 -1
  54. package/lib/components/templates/ArrayFieldTitleTemplate.d.ts.map +1 -1
  55. package/lib/components/templates/ArrayFieldTitleTemplate.js +3 -3
  56. package/lib/components/templates/BaseInputTemplate.js +2 -2
  57. package/lib/components/templates/ButtonTemplates/AddButton.d.ts +1 -1
  58. package/lib/components/templates/ButtonTemplates/AddButton.d.ts.map +1 -1
  59. package/lib/components/templates/ButtonTemplates/AddButton.js +2 -2
  60. package/lib/components/templates/FallbackFieldTemplate.d.ts +7 -0
  61. package/lib/components/templates/FallbackFieldTemplate.d.ts.map +1 -0
  62. package/lib/components/templates/FallbackFieldTemplate.js +12 -0
  63. package/lib/components/templates/FieldErrorTemplate.js +2 -2
  64. package/lib/components/templates/FieldHelpTemplate.js +2 -2
  65. package/lib/components/templates/MultiSchemaFieldTemplate.d.ts +8 -0
  66. package/lib/components/templates/MultiSchemaFieldTemplate.d.ts.map +1 -0
  67. package/lib/components/templates/MultiSchemaFieldTemplate.js +10 -0
  68. package/lib/components/templates/ObjectFieldTemplate.d.ts.map +1 -1
  69. package/lib/components/templates/ObjectFieldTemplate.js +3 -2
  70. package/lib/components/templates/OptionalDataControlsTemplate.d.ts +11 -0
  71. package/lib/components/templates/OptionalDataControlsTemplate.d.ts.map +1 -0
  72. package/lib/components/templates/OptionalDataControlsTemplate.js +20 -0
  73. package/lib/components/templates/TitleField.d.ts.map +1 -1
  74. package/lib/components/templates/TitleField.js +2 -2
  75. package/lib/components/templates/UnsupportedField.js +3 -3
  76. package/lib/components/templates/WrapIfAdditionalTemplate.js +2 -2
  77. package/lib/components/templates/index.d.ts.map +1 -1
  78. package/lib/components/templates/index.js +6 -0
  79. package/lib/components/widgets/AltDateWidget.d.ts +1 -1
  80. package/lib/components/widgets/AltDateWidget.d.ts.map +1 -1
  81. package/lib/components/widgets/AltDateWidget.js +5 -46
  82. package/lib/components/widgets/CheckboxWidget.d.ts +1 -1
  83. package/lib/components/widgets/CheckboxWidget.d.ts.map +1 -1
  84. package/lib/components/widgets/CheckboxWidget.js +2 -2
  85. package/lib/components/widgets/CheckboxesWidget.d.ts +1 -1
  86. package/lib/components/widgets/CheckboxesWidget.d.ts.map +1 -1
  87. package/lib/components/widgets/CheckboxesWidget.js +4 -4
  88. package/lib/components/widgets/FileWidget.d.ts.map +1 -1
  89. package/lib/components/widgets/FileWidget.js +7 -87
  90. package/lib/components/widgets/HiddenWidget.d.ts +1 -1
  91. package/lib/components/widgets/HiddenWidget.d.ts.map +1 -1
  92. package/lib/components/widgets/HiddenWidget.js +2 -2
  93. package/lib/components/widgets/RadioWidget.d.ts +1 -1
  94. package/lib/components/widgets/RadioWidget.d.ts.map +1 -1
  95. package/lib/components/widgets/RadioWidget.js +2 -2
  96. package/lib/components/widgets/RatingWidget.d.ts +1 -1
  97. package/lib/components/widgets/RatingWidget.d.ts.map +1 -1
  98. package/lib/components/widgets/RatingWidget.js +2 -2
  99. package/lib/components/widgets/SelectWidget.d.ts +1 -1
  100. package/lib/components/widgets/SelectWidget.d.ts.map +1 -1
  101. package/lib/components/widgets/SelectWidget.js +2 -2
  102. package/lib/components/widgets/TextareaWidget.d.ts +1 -1
  103. package/lib/components/widgets/TextareaWidget.d.ts.map +1 -1
  104. package/lib/components/widgets/TextareaWidget.js +2 -2
  105. package/lib/getDefaultRegistry.d.ts.map +1 -1
  106. package/lib/getDefaultRegistry.js +6 -1
  107. package/lib/getTestRegistry.d.ts +5 -0
  108. package/lib/getTestRegistry.d.ts.map +1 -0
  109. package/lib/getTestRegistry.js +23 -0
  110. package/lib/index.d.ts +2 -1
  111. package/lib/index.d.ts.map +1 -1
  112. package/lib/index.js +2 -1
  113. package/lib/tsconfig.tsbuildinfo +1 -1
  114. package/package.json +35 -20
  115. package/src/components/Form.tsx +468 -206
  116. package/src/components/fields/ArrayField.tsx +871 -723
  117. package/src/components/fields/BooleanField.tsx +14 -5
  118. package/src/components/fields/FallbackField.tsx +157 -0
  119. package/src/components/fields/LayoutGridField.tsx +626 -603
  120. package/src/components/fields/LayoutHeaderField.tsx +3 -3
  121. package/src/components/fields/LayoutMultiSchemaField.tsx +9 -10
  122. package/src/components/fields/MultiSchemaField.tsx +57 -36
  123. package/src/components/fields/NullField.tsx +3 -3
  124. package/src/components/fields/NumberField.tsx +11 -3
  125. package/src/components/fields/ObjectField.tsx +308 -239
  126. package/src/components/fields/OptionalDataControlsField.tsx +84 -0
  127. package/src/components/fields/SchemaField.tsx +75 -94
  128. package/src/components/fields/StringField.tsx +14 -5
  129. package/src/components/fields/index.ts +4 -0
  130. package/src/components/templates/ArrayFieldDescriptionTemplate.tsx +3 -3
  131. package/src/components/templates/ArrayFieldItemButtonsTemplate.tsx +16 -21
  132. package/src/components/templates/ArrayFieldItemTemplate.tsx +3 -3
  133. package/src/components/templates/ArrayFieldTemplate.tsx +11 -18
  134. package/src/components/templates/ArrayFieldTitleTemplate.tsx +4 -3
  135. package/src/components/templates/BaseInputTemplate.tsx +5 -5
  136. package/src/components/templates/ButtonTemplates/AddButton.tsx +2 -0
  137. package/src/components/templates/FallbackFieldTemplate.tsx +28 -0
  138. package/src/components/templates/FieldErrorTemplate.tsx +2 -2
  139. package/src/components/templates/FieldHelpTemplate.tsx +2 -2
  140. package/src/components/templates/MultiSchemaFieldTemplate.tsx +20 -0
  141. package/src/components/templates/ObjectFieldTemplate.tsx +12 -7
  142. package/src/components/templates/OptionalDataControlsTemplate.tsx +43 -0
  143. package/src/components/templates/TitleField.tsx +6 -1
  144. package/src/components/templates/UnsupportedField.tsx +3 -3
  145. package/src/components/templates/WrapIfAdditionalTemplate.tsx +5 -5
  146. package/src/components/templates/index.ts +6 -0
  147. package/src/components/widgets/AltDateWidget.tsx +8 -126
  148. package/src/components/widgets/CheckboxWidget.tsx +4 -3
  149. package/src/components/widgets/CheckboxesWidget.tsx +5 -4
  150. package/src/components/widgets/FileWidget.tsx +11 -102
  151. package/src/components/widgets/HiddenWidget.tsx +2 -1
  152. package/src/components/widgets/RadioWidget.tsx +3 -2
  153. package/src/components/widgets/RatingWidget.tsx +2 -1
  154. package/src/components/widgets/SelectWidget.tsx +3 -2
  155. package/src/components/widgets/TextareaWidget.tsx +3 -2
  156. package/src/getDefaultRegistry.ts +14 -1
  157. package/src/getTestRegistry.tsx +38 -0
  158. package/src/index.ts +2 -1
  159. package/dist/index.js +0 -4834
  160. package/dist/index.js.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/BooleanField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,eAAe,EAEf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAGrB;;;;GAIG;AACH,iBAAS,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACrG,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA6F3B;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/BooleanField.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,UAAU,EACV,eAAe,EAGf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAGrB;;;;GAIG;AACH,iBAAS,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACrG,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAoG3B;AAED,eAAe,YAAY,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { getWidget, getUiOptions, optionsList, TranslatableString, } from '@rjsf/utils';
3
4
  import isObject from 'lodash-es/isObject.js';
4
5
  /** The `BooleanField` component is used to render a field in the schema is boolean. It constructs `enumOptions` for the
@@ -7,9 +8,9 @@ import isObject from 'lodash-es/isObject.js';
7
8
  * @param props - The `FieldProps` for this template
8
9
  */
9
10
  function BooleanField(props) {
10
- const { schema, name, uiSchema, idSchema, formData, registry, required, disabled, readonly, hideError, autofocus, title, onChange, onFocus, onBlur, rawErrors, } = props;
11
+ const { schema, name, uiSchema, fieldPathId, formData, registry, required, disabled, readonly, hideError, autofocus, title, onChange, onFocus, onBlur, rawErrors, } = props;
11
12
  const { title: schemaTitle } = schema;
12
- const { widgets, formContext, translateString, globalUiOptions } = registry;
13
+ const { widgets, translateString, globalUiOptions } = registry;
13
14
  const { widget = 'checkbox', title: uiTitle,
14
15
  // Unlike the other fields, don't use `getDisplayLabel()` since it always returns false for the boolean type
15
16
  label: displayLabel = true, enumNames, ...options } = getUiOptions(uiSchema, globalUiOptions);
@@ -51,6 +52,10 @@ function BooleanField(props) {
51
52
  enumOptions = optionsList({ enum: enums }, uiSchema);
52
53
  }
53
54
  }
54
- return (_jsx(Widget, { options: { ...options, enumOptions }, schema: schema, uiSchema: uiSchema, id: idSchema.$id, name: name, onChange: onChange, onFocus: onFocus, onBlur: onBlur, label: label, hideLabel: !displayLabel, value: formData, required: required, disabled: disabled, readonly: readonly, hideError: hideError, registry: registry, formContext: formContext, autofocus: autofocus, rawErrors: rawErrors }));
55
+ const onWidgetChange = useCallback((value, errorSchema, id) => {
56
+ // Boolean field change passes an empty path array to the parent field which adds the appropriate path
57
+ return onChange(value, fieldPathId.path, errorSchema, id);
58
+ }, [onChange, fieldPathId]);
59
+ return (_jsx(Widget, { options: { ...options, enumOptions }, schema: schema, uiSchema: uiSchema, id: fieldPathId.$id, name: name, onChange: onWidgetChange, onFocus: onFocus, onBlur: onBlur, label: label, hideLabel: !displayLabel, value: formData, required: required, disabled: disabled, readonly: readonly, hideError: hideError, registry: registry, autofocus: autofocus, rawErrors: rawErrors, htmlName: fieldPathId.name }));
55
60
  }
56
61
  export default BooleanField;
@@ -0,0 +1,7 @@
1
+ import { FallbackFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /**
3
+ * The `FallbackField` component is used to render a field for unsupported or unknown schema types. If
4
+ * `useFallbackUiForUnsupportedType` is enabled in the `globalUiOptions`, it provides a type selector
5
+ */
6
+ export default function FallbackField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FallbackFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=FallbackField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/FallbackField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,eAAe,EAIf,UAAU,EACV,gBAAgB,EAIjB,MAAM,aAAa,CAAC;AAkDrB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAsFnC"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getTemplate, getUiOptions, hashObject, toFieldPathId, TranslatableString, useDeepCompareMemo, } from '@rjsf/utils';
3
+ import { useMemo, useState } from 'react';
4
+ /**
5
+ * Get the schema for the type selection component.
6
+ * @param title - The translated title for the type selection schema.
7
+ */
8
+ function getFallbackTypeSelectionSchema(title) {
9
+ return {
10
+ type: 'string',
11
+ enum: ['string', 'number', 'boolean'],
12
+ default: 'string',
13
+ title: title,
14
+ };
15
+ }
16
+ /**
17
+ * Determines the JSON Schema type of the given formData.
18
+ * @param formData - The form data whose type is to be determined.
19
+ */
20
+ function getTypeOfFormData(formData) {
21
+ const dataType = typeof formData;
22
+ if (dataType === 'string' || dataType === 'number' || dataType === 'boolean') {
23
+ return dataType;
24
+ }
25
+ // Treat everything else as a string
26
+ return 'string';
27
+ }
28
+ /**
29
+ * Casts the given formData to the specified type.
30
+ * @param formData - The form data to be casted.
31
+ * @param newType - The target type to which the form data should be casted.
32
+ */
33
+ function castToNewType(formData, newType) {
34
+ switch (newType) {
35
+ case 'string':
36
+ return String(formData);
37
+ case 'number': {
38
+ const castedNumber = Number(formData);
39
+ return (isNaN(castedNumber) ? 0 : castedNumber);
40
+ }
41
+ case 'boolean':
42
+ return Boolean(formData);
43
+ default:
44
+ return formData;
45
+ }
46
+ }
47
+ /**
48
+ * The `FallbackField` component is used to render a field for unsupported or unknown schema types. If
49
+ * `useFallbackUiForUnsupportedType` is enabled in the `globalUiOptions`, it provides a type selector
50
+ */
51
+ export default function FallbackField(props) {
52
+ const { id, formData, displayLabel = true, schema, name, uiSchema, required, disabled = false, readonly = false, onBlur, onFocus, registry, fieldPathId, onChange, errorSchema, } = props;
53
+ const { translateString, fields, globalFormOptions } = registry;
54
+ const [type, setType] = useState(getTypeOfFormData(formData));
55
+ const uiOptions = getUiOptions(uiSchema);
56
+ const typeSelectorInnerFieldPathId = useDeepCompareMemo(toFieldPathId('__internal_type_selector', globalFormOptions, fieldPathId));
57
+ const schemaTitle = translateString(TranslatableString.Type);
58
+ const typesOptionSchema = useMemo(() => getFallbackTypeSelectionSchema(schemaTitle), [schemaTitle]);
59
+ const onTypeChange = (newType) => {
60
+ if (newType != null) {
61
+ setType(newType);
62
+ onChange(castToNewType(formData, newType), fieldPathId.path, errorSchema, id);
63
+ }
64
+ };
65
+ if (!globalFormOptions.useFallbackUiForUnsupportedType) {
66
+ const UnsupportedFieldTemplate = getTemplate('UnsupportedFieldTemplate', registry, uiOptions);
67
+ return (_jsx(UnsupportedFieldTemplate, { schema: schema, fieldPathId: fieldPathId, reason: translateString(TranslatableString.UnknownFieldType, [String(schema.type)]), registry: registry }));
68
+ }
69
+ const FallbackFieldTemplate = getTemplate('FallbackFieldTemplate', registry, uiOptions);
70
+ const { SchemaField } = fields;
71
+ return (_jsx(FallbackFieldTemplate, { schema: schema, registry: registry, typeSelector: _jsx(SchemaField, { fieldPathId: typeSelectorInnerFieldPathId, name: `${name}__fallback_type`, schema: typesOptionSchema, formData: type, onChange: onTypeChange, onBlur: onBlur, onFocus: onFocus, registry: registry, hideLabel: !displayLabel, disabled: disabled, readonly: readonly, required: required }, formData ? hashObject(formData) : '__empty__'), schemaField: _jsx(SchemaField, { ...props, schema: { type, title: translateString(TranslatableString.Value) } }) }));
72
+ }
@@ -1,5 +1,5 @@
1
- import { ComponentType, PureComponent, ReactNode } from 'react';
2
- import { ErrorSchema, FieldProps, FormContextType, GenericObjectType, IdSchema, RJSFSchema, Registry, SchemaUtilsType, StrictRJSFSchema, UiSchema } from '@rjsf/utils';
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { FieldProps, FieldPathId, FormContextType, GenericObjectType, RJSFSchema, Registry, StrictRJSFSchema, UiSchema } from '@rjsf/utils';
3
3
  /** The enumeration of the three different Layout GridTemplate type values
4
4
  */
5
5
  export declare enum GridType {
@@ -66,6 +66,109 @@ type UIComponentPropsType = {
66
66
  /** The special case where the component is immediately rendered */
67
67
  rendered: ReactNode;
68
68
  };
69
+ /** Computes the uiSchema for the field with `name` from the `uiProps` and `uiSchema` provided. The field UI Schema
70
+ * will always contain a copy of the global options from the `uiSchema` (so they can be passed down) as well as
71
+ * copying them into the local ui options. When the `forceReadonly` flag is true, then the field UI Schema is
72
+ * updated to make "readonly" be true. When the `schemaReadonly` flag is true AND the field UI Schema does NOT have
73
+ * the flag already provided, then we also make "readonly" true. We always make sure to return the final value of the
74
+ * field UI Schema's "readonly" flag as `uiReadonly` along with the `fieldUiSchema` in the return value.
75
+ *
76
+ * @param field - The name of the field to pull the existing UI Schema for
77
+ * @param uiProps - Any props that should be put into the field's uiSchema
78
+ * @param [uiSchema] - The optional UI Schema from which to get the UI schema for the field
79
+ * @param [schemaReadonly] - Optional flag indicating whether the schema indicates the field is readonly
80
+ * @param [forceReadonly] - Optional flag indicating whether the Form itself is in readonly mode
81
+ */
82
+ export declare function computeFieldUiSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(field: string, uiProps: ConfigObject, uiSchema?: UiSchema<T, S, F>, schemaReadonly?: boolean, forceReadonly?: boolean): {
83
+ fieldUiSchema: any;
84
+ uiReadonly: boolean | undefined;
85
+ };
86
+ /** Given an `operator`, `datum` and `value` determines whether this condition is considered matching. Matching
87
+ * depends on the `operator`. The `datum` and `value` are converted into arrays if they aren't already and then the
88
+ * contents of the two arrays are compared using the `operator`. When `operator` is All, then the two arrays must be
89
+ * equal to match. When `operator` is SOME then the intersection of the two arrays must have at least one value in
90
+ * common to match. When `operator` is NONE then the intersection of the two arrays must not have any values in common
91
+ * to match.
92
+ *
93
+ * @param [operator] - The optional operator for the condition
94
+ * @param [datum] - The optional datum for the condition, this can be an item or a list of items of type unknown
95
+ * @param [value='$0m3tH1nG Un3xP3cT3d'] The optional value for the condition, defaulting to a highly unlikely value
96
+ * to avoid comparing two undefined elements when `value` was forgotten in the condition definition.
97
+ * This can be an item or a list of items of type unknown
98
+ * @returns - True if the condition matches, false otherwise
99
+ */
100
+ export declare function conditionMatches(operator?: Operators, datum?: unknown, value?: unknown): boolean;
101
+ /** From within the `layoutGridSchema` finds the `children` and any extra `gridProps` from the object keyed by
102
+ * `schemaKey`. If the `children` contains extra `gridProps` and those props contain a `className` string, try to
103
+ * lookup whether that `className` has a replacement value in the `registry` using the `FORM_CONTEXT_LOOKUP_BASE`.
104
+ * When the `className` value contains multiple classNames separated by a space, the lookup will look for a
105
+ * replacement value for each `className` and combine them into one.
106
+ *
107
+ * @param layoutGridSchema - The GridSchemaType instance from which to obtain the `schemaKey` children and extra props
108
+ * @param schemaKey - A `GridType` value, used to get the children and extra props from within the `layoutGridSchema`
109
+ * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props
110
+ * @returns - An object containing the list of `LayoutGridSchemaType` `children` and any extra `gridProps`
111
+ * @throws - A `TypeError` when the `children` is not an array
112
+ */
113
+ export declare function findChildrenAndProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(layoutGridSchema: GridSchemaType, schemaKey: GridType, registry: Registry<T, S, F>): {
114
+ children: LayoutGridSchemaType[];
115
+ gridProps: GridProps;
116
+ };
117
+ /** Computes the `rawSchema` and `fieldPathId` for a `schema` and a `potentialIndex`. If the `schema` is of type array,
118
+ * has an `ITEMS_KEY` element and `potentialIndex` represents a numeric value, the element at `ITEMS_KEY` is checked
119
+ * to see if it is an array. If it is AND the `potentialIndex`th element is available, it is used as the `rawSchema`,
120
+ * otherwise the last value of the element is used. If it is not, then the element is used as the `rawSchema`. In
121
+ * either case, an `fieldPathId` is computed for the array index. If the `schema` does not represent an array or the
122
+ * `potentialIndex` is not a numeric value, then `rawSchema` is returned as undefined and given `fieldPathId` is returned
123
+ * as is.
124
+ *
125
+ * @param schema - The schema to generate the fieldPathId for
126
+ * @param fieldPathId - The FieldPathId for the schema
127
+ * @param potentialIndex - A string containing a potential index
128
+ * @returns - An object containing the `rawSchema` and `fieldPathId` of an array item, otherwise an undefined `rawSchema`
129
+ */
130
+ export declare function computeArraySchemasIfPresent<S extends StrictRJSFSchema = RJSFSchema>(schema: S | undefined, fieldPathId: FieldPathId, potentialIndex: string): {
131
+ rawSchema?: S;
132
+ fieldPathId: FieldPathId;
133
+ };
134
+ /** Given a `dottedPath` to a field in the `initialSchema`, iterate through each individual path in the schema until
135
+ * the leaf path is found and returned (along with whether that leaf path `isRequired`) OR no schema exists for an
136
+ * element in the path. If the leaf schema element happens to be a oneOf/anyOf then also return the oneOf/anyOf as
137
+ * `options`.
138
+ *
139
+ * @param registry - The registry
140
+ * @param dottedPath - The dotted-path to the field for which to get the schema
141
+ * @param initialSchema - The initial schema to start the search from
142
+ * @param formData - The formData, useful for resolving a oneOf/anyOf selection in the path hierarchy
143
+ * @param initialFieldIdPath - The initial fieldPathId to start the search from
144
+ * @returns - An object containing the destination schema, isRequired and isReadonly flags for the field and options
145
+ * info if a oneOf/anyOf
146
+ */
147
+ export declare function getSchemaDetailsForField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(registry: Registry<T, S, F>, dottedPath: string, initialSchema: S, formData: FieldProps<T, S, F>['formData'], initialFieldIdPath: FieldPathId): {
148
+ schema?: S;
149
+ isRequired: boolean;
150
+ isReadonly?: boolean;
151
+ optionsInfo?: OneOfOptionsInfoType<S>;
152
+ fieldPathId: FieldPathId;
153
+ };
154
+ /** Gets the custom render component from the `render`, by either determining that it is either already a function or
155
+ * it is a non-function value that can be used to look up the function in the registry. If no function can be found,
156
+ * null is returned.
157
+ *
158
+ * @param render - The potential render function or lookup name to one
159
+ * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props
160
+ * @returns - Either a render function if available, or null if not
161
+ */
162
+ export declare function getCustomRenderComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(render: string | RenderComponent, registry: Registry<T, S, F>): RenderComponent | null;
163
+ /** Extract the `name`, and optional `render` and all other props from the `gridSchema`. We look up the `render` to
164
+ * see if can be resolved to a UIComponent. If `name` does not exist and there is an optional `render` UIComponent, we
165
+ * set the `rendered` component with only specified props for that component in the object.
166
+ *
167
+ * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props
168
+ * @param gridSchema - The string or object that represents the configuration for the grid field
169
+ * @returns - The UIComponentPropsType computed from the gridSchema
170
+ */
171
+ export declare function computeUIComponentPropsFromGridSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(registry: Registry<T, S, F>, gridSchema?: string | ConfigObject): UIComponentPropsType;
69
172
  /** The `LayoutGridField` will render a schema, uiSchema and formData combination out into a GridTemplate in the shape
70
173
  * described in the uiSchema. To define the grid to use to render the elements within a field in the schema, provide in
71
174
  * the uiSchema for that field the object contained under a `ui:layoutGrid` element. E.g. (as a JSON object):
@@ -289,189 +392,9 @@ type UIComponentPropsType = {
289
392
  * ]
290
393
  * ```
291
394
  */
292
- export default class LayoutGridField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends PureComponent<LayoutGridFieldProps<T, S, F>> {
293
- static defaultProps: {
294
- layoutGridSchema: undefined;
295
- };
296
- static TEST_IDS: import("@rjsf/utils").TestIdShape;
297
- /** Computes the uiSchema for the field with `name` from the `uiProps` and `uiSchema` provided. The field UI Schema
298
- * will always contain a copy of the global options from the `uiSchema` (so they can be passed down) as well as
299
- * copying them into the local ui options. When the `forceReadonly` flag is true, then the field UI Schema is
300
- * updated to make "readonly" be true. When the `schemaReadonly` flag is true AND the field UI Schema does NOT have
301
- * the flag already provided, then we also make "readonly" true. We always make sure to return the final value of the
302
- * field UI Schema's "readonly" flag as `uiReadonly` along with the `fieldUiSchema` in the return value.
303
- *
304
- * @param field - The name of the field to pull the existing UI Schema for
305
- * @param uiProps - Any props that should be put into the field's uiSchema
306
- * @param [uiSchema] - The optional UI Schema from which to get the UI schema for the field
307
- * @param [schemaReadonly] - Optional flag indicating whether the schema indicates the field is readonly
308
- * @param [forceReadonly] - Optional flag indicating whether the Form itself is in readonly mode
309
- */
310
- static computeFieldUiSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(field: string, uiProps: ConfigObject, uiSchema?: UiSchema<T, S, F>, schemaReadonly?: boolean, forceReadonly?: boolean): {
311
- fieldUiSchema: any;
312
- uiReadonly: boolean | undefined;
313
- };
314
- /** Given an `operator`, `datum` and `value` determines whether this condition is considered matching. Matching
315
- * depends on the `operator`. The `datum` and `value` are converted into arrays if they aren't already and then the
316
- * contents of the two arrays are compared using the `operator`. When `operator` is All, then the two arrays must be
317
- * equal to match. When `operator` is SOME then the intersection of the two arrays must have at least one value in
318
- * common to match. When `operator` is NONE then the intersection of the two arrays must not have any values in common
319
- * to match.
320
- *
321
- * @param [operator] - The optional operator for the condition
322
- * @param [datum] - The optional datum for the condition, this can be an item or a list of items of type unknown
323
- * @param [value='$0m3tH1nG Un3xP3cT3d'] The optional value for the condition, defaulting to a highly unlikely value
324
- * to avoid comparing two undefined elements when `value` was forgotten in the condition definition.
325
- * This can be an item or a list of items of type unknown
326
- * @returns - True if the condition matches, false otherwise
327
- */
328
- static conditionMatches(operator?: Operators, datum?: unknown, value?: unknown): boolean;
329
- /** From within the `layoutGridSchema` finds the `children` and any extra `gridProps` from the object keyed by
330
- * `schemaKey`. If the `children` contains extra `gridProps` and those props contain a `className` string, try to
331
- * lookup whether that `className` has a replacement value in the `registry` using the `FORM_CONTEXT_LOOKUP_BASE`.
332
- * When the `className` value contains multiple classNames separated by a space, the lookup will look for a
333
- * replacement value for each `className` and combine them into one.
334
- *
335
- * @param layoutGridSchema - The GridSchemaType instance from which to obtain the `schemaKey` children and extra props
336
- * @param schemaKey - A `GridType` value, used to get the children and extra props from within the `layoutGridSchema`
337
- * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props
338
- * @returns - An object containing the list of `LayoutGridSchemaType` `children` and any extra `gridProps`
339
- * @throws - A `TypeError` when the `children` is not an array
340
- */
341
- static findChildrenAndProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(layoutGridSchema: GridSchemaType, schemaKey: GridType, registry: Registry<T, S, F>): {
342
- children: LayoutGridSchemaType[];
343
- gridProps: GridProps;
344
- };
345
- /** Generates an idSchema for the `schema` using `@rjsf`'s `toIdSchema` util, passing the `baseIdSchema`'s `$id` value
346
- * as the id prefix.
347
- *
348
- * @param schemaUtils - The `SchemaUtilsType` used to call `toIdSchema`
349
- * @param schema - The schema to generate the idSchema for
350
- * @param baseIdSchema - The IdSchema for the base
351
- * @param formData - The formData to pass the `toIdSchema`
352
- * @param [idSeparator] - The param to pass into the `toIdSchema` util which will use it to join the `idSchema` paths
353
- * @returns - The generated `idSchema` for the `schema`
354
- */
355
- static getIdSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(schemaUtils: SchemaUtilsType<T, S, F>, baseIdSchema: IdSchema<T>, formData: FieldProps['formData'], schema?: S, idSeparator?: string): FieldProps<T, S, F>['idSchema'];
356
- /** Given a `dottedPath` to a field in the `initialSchema`, iterate through each individual path in the schema until
357
- * the leaf path is found and returned (along with whether that leaf path `isRequired`) OR no schema exists for an
358
- * element in the path. If the leaf schema element happens to be a oneOf/anyOf then also return the oneOf/anyOf as
359
- * `options`.
360
- *
361
- * @param schemaUtils - The `SchemaUtilsType` used to call `retrieveSchema`
362
- * @param dottedPath - The dotted-path to the field for which to get the schema
363
- * @param initialSchema - The initial schema to start the search from
364
- * @param formData - The formData, useful for resolving a oneOf/anyOf selection in the path hierarchy
365
- * @param initialIdSchema - The initial idSchema to start the search from
366
- * @param [idSeparator] - The param to pass into the `toIdSchema` util which will use it to join the `idSchema` paths
367
- * @returns - An object containing the destination schema, isRequired and isReadonly flags for the field and options
368
- * info if a oneOf/anyOf
369
- */
370
- static getSchemaDetailsForField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(schemaUtils: SchemaUtilsType<T, S, F>, dottedPath: string, initialSchema: S, formData: FieldProps<T, S, F>['formData'], initialIdSchema: IdSchema<T>, idSeparator?: string): {
371
- schema?: S;
372
- isRequired: boolean;
373
- isReadonly?: boolean;
374
- optionsInfo?: OneOfOptionsInfoType<S>;
375
- idSchema: IdSchema<T>;
376
- };
377
- /** Gets the custom render component from the `render`, by either determining that it is either already a function or
378
- * it is a non-function value that can be used to look up the function in the registry. If no function can be found,
379
- * null is returned.
380
- *
381
- * @param render - The potential render function or lookup name to one
382
- * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props
383
- * @returns - Either a render function if available, or null if not
384
- */
385
- static getCustomRenderComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(render: string | RenderComponent, registry: Registry<T, S, F>): RenderComponent | null;
386
- /** Extract the `name`, and optional `render` and all other props from the `gridSchema`. We look up the `render` to
387
- * see if can be resolved to a UIComponent. If `name` does not exist and there is an optional `render` UIComponent, we
388
- * set the `rendered` component with only specified props for that component in the object.
389
- *
390
- * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props
391
- * @param gridSchema - The string or object that represents the configuration for the grid field
392
- * @returns - The UIComponentPropsType computed from the gridSchema
393
- */
394
- static computeUIComponentPropsFromGridSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(registry: Registry<T, S, F>, gridSchema?: string | ConfigObject): UIComponentPropsType;
395
- /** Constructs an `LayoutGridField` with the given `props`
396
- *
397
- * @param props - The `LayoutGridField` for this template
398
- */
399
- constructor(props: LayoutGridFieldProps<T, S, F>);
400
- /** Generates an `onChange` handler for the field associated with the `dottedPath`. This handler will clone and update
401
- * the `formData` with the new `value` and the `errorSchema` if an `errSchema` is provided. After updating those two
402
- * elements, they will then be passed on to the `onChange` handler of the `LayoutFieldGrid`.
403
- *
404
- * @param dottedPath - The dotted-path to the field for which to generate the onChange handler
405
- * @returns - The `onChange` handling function for the `dottedPath` field
406
- */
407
- onFieldChange: (dottedPath: string) => (value: unknown, errSchema?: ErrorSchema<T>, id?: string) => void;
408
- /** Renders the `children` of the `GridType.CONDITION` if it passes. The `layoutGridSchema` for the
409
- * `GridType.CONDITION` is separated into the `children` and other `gridProps`. The `gridProps` are used to extract
410
- * the `operator`, `field` and `value` of the condition. If the condition matches, then all of the `children` are
411
- * rendered, otherwise null is returned.
412
- *
413
- * @param layoutGridSchema - The string or object that represents the configuration for the grid field
414
- * @returns - The rendered the children for the `GridType.CONDITION` or null
415
- */
416
- renderCondition(layoutGridSchema: GridSchemaType): import("react/jsx-runtime").JSX.Element[] | null;
417
- /** Renders a material-ui `GridTemplate` as an item. The `layoutGridSchema` for the `GridType.COLUMN` is separated
418
- * into the `children` and other `gridProps`. The `gridProps` will be spread onto the outer `GridTemplate`. Inside
419
- * the `GridTemplate` all the `children` are rendered.
420
- *
421
- * @param layoutGridSchema - The string or object that represents the configuration for the grid field
422
- * @returns - The rendered `GridTemplate` containing the children for the `GridType.COLUMN`
423
- */
424
- renderCol(layoutGridSchema: GridSchemaType): import("react/jsx-runtime").JSX.Element;
425
- /** Renders a material-ui `GridTemplate` as an item. The `layoutGridSchema` for the `GridType.COLUMNS` is separated
426
- * into the `children` and other `gridProps`. The `children` is iterated on and `gridProps` will be spread onto the
427
- * outer `GridTemplate`. Each child will have their own rendered `GridTemplate`.
428
- *
429
- * @param layoutGridSchema - The string or object that represents the configuration for the grid field
430
- * @returns - The rendered `GridTemplate` containing the children for the `GridType.COLUMNS`
431
- */
432
- renderColumns(layoutGridSchema: GridSchemaType): import("react/jsx-runtime").JSX.Element[];
433
- /** Renders a material-ui `GridTemplate` as a container. The
434
- * `layoutGridSchema` for the `GridType.ROW` is separated into the `children` and other `gridProps`. The `gridProps`
435
- * will be spread onto the outer `GridTemplate`. Inside of the `GridTemplate` all of the `children` are rendered.
436
- *
437
- * @param layoutGridSchema - The string or object that represents the configuration for the grid field
438
- * @returns - The rendered `GridTemplate` containing the children for the `GridType.ROW`
439
- */
440
- renderRow(layoutGridSchema: GridSchemaType): import("react/jsx-runtime").JSX.Element;
441
- /** Iterates through all the `childrenLayoutGridSchema`, rendering a nested `LayoutGridField` for each item in the
442
- * list, passing all the props for the current `LayoutGridField` along, updating the `schema` by calling
443
- * `retrieveSchema()` on it to resolve any `$ref`s. In addition to the updated `schema`, each item in
444
- * `childrenLayoutGridSchema` is passed as `layoutGridSchema`.
445
- *
446
- * @param childrenLayoutGridSchema - The list of strings or objects that represents the configurations for the
447
- * children fields
448
- * @returns - The nested `LayoutGridField`s
449
- */
450
- renderChildren(childrenLayoutGridSchema: LayoutGridSchemaType[]): import("react/jsx-runtime").JSX.Element[];
451
- /** Renders the field described by `gridSchema`. If `gridSchema` is not an object, then is will be assumed
452
- * to be the dotted-path to the field in the schema. Otherwise, we extract the `name`, and optional `render` and all
453
- * other props. If `name` does not exist and there is an optional `render`, we return the `render` component with only
454
- * specified props for that component. If `name` exists, we take the name, the initial & root schemas and the formData
455
- * and get the destination schema, is required state and optional oneOf/anyOf options for it. If the destination
456
- * schema was located along with oneOf/anyOf options then a `LayoutMultiSchemaField` will be rendered with the
457
- * `uiSchema`, `errorSchema`, `idSchema` and `formData` drilled down to the dotted-path field, spreading any other
458
- * props from `gridSchema` into the `ui:options`. If the destination schema located without any oneOf/anyOf options,
459
- * then a `SchemaField` will be rendered with the same props as mentioned in the previous sentence. If no destination
460
- * schema was located, but a custom render component was found, then it will be rendered with many of the non-event
461
- * handling props. If none of the previous render paths are valid, then a null is returned.
462
- *
463
- * @param gridSchema - The string or object that represents the configuration for the grid field
464
- * @returns - One of `LayoutMultiSchemaField`, `SchemaField`, a custom render component or null, depending
465
- */
466
- renderField(gridSchema?: ConfigObject | string): string | number | true | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
467
- /** Renders the `LayoutGridField`. If there isn't a `layoutGridSchema` prop defined, then try pulling it out of the
468
- * `uiSchema` via `ui:LayoutGridField`. If `layoutGridSchema` is an object, then check to see if any of the properties
469
- * match one of the `GridType`s. If so, call the appropriate render function for the type. Otherwise, just call the
470
- * generic `renderField()` function with the `layoutGridSchema`.
471
- *
472
- * @returns - the rendered `LayoutGridField`
473
- */
474
- render(): string | number | true | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[] | null;
395
+ declare function LayoutGridField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: LayoutGridFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
396
+ declare namespace LayoutGridField {
397
+ var TEST_IDS: import("@rjsf/utils").TestIdShape;
475
398
  }
476
- export {};
399
+ export default LayoutGridField;
477
400
  //# sourceMappingURL=LayoutGridField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutGridField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/LayoutGridField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAEL,WAAW,EACX,UAAU,EACV,eAAe,EACf,iBAAiB,EAOjB,QAAQ,EAMR,UAAU,EACV,QAAQ,EACR,eAAe,EACf,gBAAgB,EAGhB,QAAQ,EACT,MAAM,aAAa,CAAC;AAiBrB;GACG;AACH,oBAAY,QAAQ;IAClB,GAAG,WAAW;IACd,MAAM,WAAW;IACjB,OAAO,eAAe;IACtB,SAAS,iBAAiB;CAC3B;AAED;GACG;AACH,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,8DAA8D;AAC9D,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,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