@rjsf/core 6.6.1 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/LICENSE.md +201 -0
  2. package/dist/core.umd.js +694 -584
  3. package/dist/index.cjs +1191 -1071
  4. package/dist/index.cjs.map +4 -4
  5. package/dist/index.esm.js +1030 -984
  6. package/dist/index.esm.js.map +4 -4
  7. package/lib/components/Form.d.ts +16 -13
  8. package/lib/components/Form.d.ts.map +1 -1
  9. package/lib/components/Form.js +126 -76
  10. package/lib/components/RichDescription.d.ts +3 -3
  11. package/lib/components/RichDescription.d.ts.map +1 -1
  12. package/lib/components/RichDescription.js +1 -1
  13. package/lib/components/RichHelp.d.ts +3 -3
  14. package/lib/components/RichHelp.d.ts.map +1 -1
  15. package/lib/components/RichHelp.js +1 -1
  16. package/lib/components/SchemaExamples.d.ts +2 -2
  17. package/lib/components/SchemaExamples.d.ts.map +1 -1
  18. package/lib/components/SchemaExamples.js +1 -3
  19. package/lib/components/fields/ArrayField.d.ts +2 -2
  20. package/lib/components/fields/ArrayField.d.ts.map +1 -1
  21. package/lib/components/fields/ArrayField.js +87 -88
  22. package/lib/components/fields/BooleanField.d.ts +2 -2
  23. package/lib/components/fields/BooleanField.d.ts.map +1 -1
  24. package/lib/components/fields/BooleanField.js +2 -5
  25. package/lib/components/fields/CyclicSchemaField.d.ts +8 -0
  26. package/lib/components/fields/CyclicSchemaField.d.ts.map +1 -0
  27. package/lib/components/fields/CyclicSchemaField.js +21 -0
  28. package/lib/components/fields/FallbackField.d.ts +2 -2
  29. package/lib/components/fields/FallbackField.d.ts.map +1 -1
  30. package/lib/components/fields/FallbackField.js +2 -2
  31. package/lib/components/fields/LayoutGridField.d.ts +8 -10
  32. package/lib/components/fields/LayoutGridField.d.ts.map +1 -1
  33. package/lib/components/fields/LayoutGridField.js +5 -4
  34. package/lib/components/fields/LayoutHeaderField.d.ts +2 -2
  35. package/lib/components/fields/LayoutHeaderField.d.ts.map +1 -1
  36. package/lib/components/fields/LayoutHeaderField.js +1 -1
  37. package/lib/components/fields/LayoutMultiSchemaField.d.ts +2 -2
  38. package/lib/components/fields/LayoutMultiSchemaField.d.ts.map +1 -1
  39. package/lib/components/fields/LayoutMultiSchemaField.js +4 -1
  40. package/lib/components/fields/MultiSchemaField.d.ts +2 -41
  41. package/lib/components/fields/MultiSchemaField.d.ts.map +1 -1
  42. package/lib/components/fields/MultiSchemaField.js +116 -122
  43. package/lib/components/fields/NullField.d.ts +1 -1
  44. package/lib/components/fields/NullField.d.ts.map +1 -1
  45. package/lib/components/fields/NumberField.d.ts +2 -2
  46. package/lib/components/fields/NumberField.d.ts.map +1 -1
  47. package/lib/components/fields/NumberField.js +7 -9
  48. package/lib/components/fields/ObjectField.d.ts +2 -2
  49. package/lib/components/fields/ObjectField.d.ts.map +1 -1
  50. package/lib/components/fields/ObjectField.js +28 -26
  51. package/lib/components/fields/OptionalDataControlsField.d.ts +2 -2
  52. package/lib/components/fields/OptionalDataControlsField.d.ts.map +1 -1
  53. package/lib/components/fields/SchemaField.d.ts +14 -8
  54. package/lib/components/fields/SchemaField.d.ts.map +1 -1
  55. package/lib/components/fields/SchemaField.js +43 -30
  56. package/lib/components/fields/StringField.d.ts +2 -2
  57. package/lib/components/fields/StringField.d.ts.map +1 -1
  58. package/lib/components/fields/StringField.js +2 -5
  59. package/lib/components/fields/index.d.ts +1 -1
  60. package/lib/components/fields/index.d.ts.map +1 -1
  61. package/lib/components/fields/index.js +2 -0
  62. package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts +2 -2
  63. package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts.map +1 -1
  64. package/lib/components/templates/ArrayFieldDescriptionTemplate.js +1 -1
  65. package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts +2 -2
  66. package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts.map +1 -1
  67. package/lib/components/templates/ArrayFieldItemButtonsTemplate.js +1 -1
  68. package/lib/components/templates/ArrayFieldItemTemplate.d.ts +2 -2
  69. package/lib/components/templates/ArrayFieldItemTemplate.d.ts.map +1 -1
  70. package/lib/components/templates/ArrayFieldItemTemplate.js +1 -1
  71. package/lib/components/templates/ArrayFieldTemplate.d.ts +2 -2
  72. package/lib/components/templates/ArrayFieldTemplate.d.ts.map +1 -1
  73. package/lib/components/templates/ArrayFieldTemplate.js +1 -1
  74. package/lib/components/templates/ArrayFieldTitleTemplate.d.ts +2 -2
  75. package/lib/components/templates/ArrayFieldTitleTemplate.d.ts.map +1 -1
  76. package/lib/components/templates/ArrayFieldTitleTemplate.js +1 -1
  77. package/lib/components/templates/BaseInputTemplate.d.ts +2 -2
  78. package/lib/components/templates/BaseInputTemplate.d.ts.map +1 -1
  79. package/lib/components/templates/BaseInputTemplate.js +7 -6
  80. package/lib/components/templates/ButtonTemplates/AddButton.d.ts +2 -2
  81. package/lib/components/templates/ButtonTemplates/AddButton.d.ts.map +1 -1
  82. package/lib/components/templates/ButtonTemplates/IconButton.d.ts +14 -7
  83. package/lib/components/templates/ButtonTemplates/IconButton.d.ts.map +1 -1
  84. package/lib/components/templates/ButtonTemplates/IconButton.js +14 -6
  85. package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts +2 -2
  86. package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts.map +1 -1
  87. package/lib/components/templates/ButtonTemplates/index.d.ts +1 -1
  88. package/lib/components/templates/ButtonTemplates/index.d.ts.map +1 -1
  89. package/lib/components/templates/CyclicSchemaExpandTemplate.d.ts +7 -0
  90. package/lib/components/templates/CyclicSchemaExpandTemplate.d.ts.map +1 -0
  91. package/lib/components/templates/CyclicSchemaExpandTemplate.js +12 -0
  92. package/lib/components/templates/DescriptionField.d.ts +2 -2
  93. package/lib/components/templates/DescriptionField.d.ts.map +1 -1
  94. package/lib/components/templates/ErrorList.d.ts +2 -2
  95. package/lib/components/templates/ErrorList.d.ts.map +1 -1
  96. package/lib/components/templates/ErrorList.js +2 -4
  97. package/lib/components/templates/FallbackFieldTemplate.d.ts +2 -2
  98. package/lib/components/templates/FallbackFieldTemplate.d.ts.map +1 -1
  99. package/lib/components/templates/FieldErrorTemplate.d.ts +2 -2
  100. package/lib/components/templates/FieldErrorTemplate.d.ts.map +1 -1
  101. package/lib/components/templates/FieldErrorTemplate.js +1 -3
  102. package/lib/components/templates/FieldHelpTemplate.d.ts +2 -2
  103. package/lib/components/templates/FieldHelpTemplate.d.ts.map +1 -1
  104. package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts +2 -2
  105. package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts.map +1 -1
  106. package/lib/components/templates/FieldTemplate/FieldTemplate.js +1 -1
  107. package/lib/components/templates/FieldTemplate/Label.d.ts +3 -3
  108. package/lib/components/templates/FieldTemplate/Label.d.ts.map +1 -1
  109. package/lib/components/templates/GridTemplate.d.ts +2 -2
  110. package/lib/components/templates/GridTemplate.d.ts.map +1 -1
  111. package/lib/components/templates/MultiSchemaFieldTemplate.d.ts +2 -2
  112. package/lib/components/templates/MultiSchemaFieldTemplate.d.ts.map +1 -1
  113. package/lib/components/templates/ObjectFieldTemplate.d.ts +2 -2
  114. package/lib/components/templates/ObjectFieldTemplate.d.ts.map +1 -1
  115. package/lib/components/templates/ObjectFieldTemplate.js +1 -1
  116. package/lib/components/templates/OptionalDataControlsTemplate.d.ts +2 -2
  117. package/lib/components/templates/OptionalDataControlsTemplate.d.ts.map +1 -1
  118. package/lib/components/templates/OptionalDataControlsTemplate.js +1 -1
  119. package/lib/components/templates/TitleField.d.ts +2 -2
  120. package/lib/components/templates/TitleField.d.ts.map +1 -1
  121. package/lib/components/templates/UnsupportedField.d.ts +2 -2
  122. package/lib/components/templates/UnsupportedField.d.ts.map +1 -1
  123. package/lib/components/templates/UnsupportedField.js +2 -2
  124. package/lib/components/templates/WrapIfAdditionalTemplate.d.ts +2 -2
  125. package/lib/components/templates/WrapIfAdditionalTemplate.d.ts.map +1 -1
  126. package/lib/components/templates/WrapIfAdditionalTemplate.js +1 -1
  127. package/lib/components/templates/index.d.ts +1 -1
  128. package/lib/components/templates/index.d.ts.map +1 -1
  129. package/lib/components/templates/index.js +2 -0
  130. package/lib/components/widgets/AltDateTimeWidget.d.ts +2 -2
  131. package/lib/components/widgets/AltDateTimeWidget.d.ts.map +1 -1
  132. package/lib/components/widgets/AltDateWidget.d.ts +2 -2
  133. package/lib/components/widgets/AltDateWidget.d.ts.map +1 -1
  134. package/lib/components/widgets/AltDateWidget.js +2 -2
  135. package/lib/components/widgets/CheckboxWidget.d.ts +2 -2
  136. package/lib/components/widgets/CheckboxWidget.d.ts.map +1 -1
  137. package/lib/components/widgets/CheckboxesWidget.d.ts +2 -2
  138. package/lib/components/widgets/CheckboxesWidget.d.ts.map +1 -1
  139. package/lib/components/widgets/CheckboxesWidget.js +4 -4
  140. package/lib/components/widgets/ColorWidget.d.ts +2 -2
  141. package/lib/components/widgets/ColorWidget.d.ts.map +1 -1
  142. package/lib/components/widgets/DateTimeWidget.d.ts +2 -2
  143. package/lib/components/widgets/DateTimeWidget.d.ts.map +1 -1
  144. package/lib/components/widgets/DateTimeWidget.js +2 -2
  145. package/lib/components/widgets/DateWidget.d.ts +2 -2
  146. package/lib/components/widgets/DateWidget.d.ts.map +1 -1
  147. package/lib/components/widgets/EmailWidget.d.ts +2 -2
  148. package/lib/components/widgets/EmailWidget.d.ts.map +1 -1
  149. package/lib/components/widgets/FileWidget.d.ts +2 -2
  150. package/lib/components/widgets/FileWidget.d.ts.map +1 -1
  151. package/lib/components/widgets/FileWidget.js +6 -4
  152. package/lib/components/widgets/HiddenWidget.d.ts +2 -2
  153. package/lib/components/widgets/HiddenWidget.d.ts.map +1 -1
  154. package/lib/components/widgets/PasswordWidget.d.ts +2 -2
  155. package/lib/components/widgets/PasswordWidget.d.ts.map +1 -1
  156. package/lib/components/widgets/RadioWidget.d.ts +2 -2
  157. package/lib/components/widgets/RadioWidget.d.ts.map +1 -1
  158. package/lib/components/widgets/RadioWidget.js +4 -4
  159. package/lib/components/widgets/RangeWidget.d.ts +2 -2
  160. package/lib/components/widgets/RangeWidget.d.ts.map +1 -1
  161. package/lib/components/widgets/RatingWidget.d.ts +2 -2
  162. package/lib/components/widgets/RatingWidget.d.ts.map +1 -1
  163. package/lib/components/widgets/RatingWidget.js +15 -15
  164. package/lib/components/widgets/SelectWidget.d.ts +2 -2
  165. package/lib/components/widgets/SelectWidget.d.ts.map +1 -1
  166. package/lib/components/widgets/SelectWidget.js +9 -8
  167. package/lib/components/widgets/TextWidget.d.ts +2 -2
  168. package/lib/components/widgets/TextWidget.d.ts.map +1 -1
  169. package/lib/components/widgets/TextareaWidget.d.ts +2 -2
  170. package/lib/components/widgets/TextareaWidget.d.ts.map +1 -1
  171. package/lib/components/widgets/TextareaWidget.js +5 -5
  172. package/lib/components/widgets/TimeWidget.d.ts +2 -2
  173. package/lib/components/widgets/TimeWidget.d.ts.map +1 -1
  174. package/lib/components/widgets/URLWidget.d.ts +2 -2
  175. package/lib/components/widgets/URLWidget.d.ts.map +1 -1
  176. package/lib/components/widgets/UpDownWidget.d.ts +2 -2
  177. package/lib/components/widgets/UpDownWidget.d.ts.map +1 -1
  178. package/lib/components/widgets/index.d.ts +1 -1
  179. package/lib/components/widgets/index.d.ts.map +1 -1
  180. package/lib/getDefaultRegistry.d.ts +1 -1
  181. package/lib/getDefaultRegistry.d.ts.map +1 -1
  182. package/lib/getDefaultRegistry.js +1 -1
  183. package/lib/getTestRegistry.d.ts +1 -1
  184. package/lib/getTestRegistry.d.ts.map +1 -1
  185. package/lib/getTestRegistry.js +1 -1
  186. package/lib/index.d.ts +10 -5
  187. package/lib/index.d.ts.map +1 -1
  188. package/lib/tsconfig.tsbuildinfo +1 -1
  189. package/lib/withTheme.d.ts +3 -3
  190. package/lib/withTheme.d.ts.map +1 -1
  191. package/lib/withTheme.js +6 -6
  192. package/package.json +28 -28
  193. package/src/components/Form.tsx +197 -111
  194. package/src/components/RichDescription.tsx +3 -10
  195. package/src/components/RichHelp.tsx +3 -10
  196. package/src/components/SchemaExamples.tsx +6 -4
  197. package/src/components/fields/ArrayField.tsx +122 -108
  198. package/src/components/fields/BooleanField.tsx +4 -9
  199. package/src/components/fields/CyclicSchemaField.tsx +40 -0
  200. package/src/components/fields/FallbackField.tsx +4 -8
  201. package/src/components/fields/LayoutGridField.tsx +21 -19
  202. package/src/components/fields/LayoutHeaderField.tsx +2 -10
  203. package/src/components/fields/LayoutMultiSchemaField.tsx +15 -10
  204. package/src/components/fields/MultiSchemaField.tsx +202 -218
  205. package/src/components/fields/NullField.tsx +1 -1
  206. package/src/components/fields/NumberField.tsx +8 -10
  207. package/src/components/fields/ObjectField.tsx +52 -40
  208. package/src/components/fields/OptionalDataControlsField.tsx +6 -4
  209. package/src/components/fields/SchemaField.tsx +66 -51
  210. package/src/components/fields/StringField.tsx +4 -15
  211. package/src/components/fields/index.ts +3 -1
  212. package/src/components/templates/ArrayFieldDescriptionTemplate.tsx +2 -9
  213. package/src/components/templates/ArrayFieldItemButtonsTemplate.tsx +2 -7
  214. package/src/components/templates/ArrayFieldItemTemplate.tsx +3 -9
  215. package/src/components/templates/ArrayFieldTemplate.tsx +2 -9
  216. package/src/components/templates/ArrayFieldTitleTemplate.tsx +2 -10
  217. package/src/components/templates/BaseInputTemplate.tsx +16 -23
  218. package/src/components/templates/ButtonTemplates/AddButton.tsx +2 -1
  219. package/src/components/templates/ButtonTemplates/IconButton.tsx +16 -7
  220. package/src/components/templates/ButtonTemplates/SubmitButton.tsx +2 -1
  221. package/src/components/templates/ButtonTemplates/index.ts +1 -1
  222. package/src/components/templates/CyclicSchemaExpandTemplate.tsx +31 -0
  223. package/src/components/templates/DescriptionField.tsx +1 -1
  224. package/src/components/templates/ErrorList.tsx +8 -15
  225. package/src/components/templates/FallbackFieldTemplate.tsx +2 -1
  226. package/src/components/templates/FieldErrorTemplate.tsx +8 -8
  227. package/src/components/templates/FieldHelpTemplate.tsx +2 -1
  228. package/src/components/templates/FieldTemplate/FieldTemplate.tsx +2 -8
  229. package/src/components/templates/FieldTemplate/Label.tsx +2 -2
  230. package/src/components/templates/GridTemplate.tsx +1 -1
  231. package/src/components/templates/MultiSchemaFieldTemplate.tsx +1 -1
  232. package/src/components/templates/ObjectFieldTemplate.tsx +2 -7
  233. package/src/components/templates/OptionalDataControlsTemplate.tsx +3 -2
  234. package/src/components/templates/TitleField.tsx +1 -1
  235. package/src/components/templates/UnsupportedField.tsx +4 -3
  236. package/src/components/templates/WrapIfAdditionalTemplate.tsx +2 -9
  237. package/src/components/templates/index.ts +3 -1
  238. package/src/components/widgets/AltDateTimeWidget.tsx +1 -1
  239. package/src/components/widgets/AltDateWidget.tsx +7 -13
  240. package/src/components/widgets/CheckboxWidget.tsx +3 -5
  241. package/src/components/widgets/CheckboxesWidget.tsx +8 -10
  242. package/src/components/widgets/ColorWidget.tsx +2 -1
  243. package/src/components/widgets/DateTimeWidget.tsx +3 -10
  244. package/src/components/widgets/DateWidget.tsx +2 -1
  245. package/src/components/widgets/EmailWidget.tsx +2 -1
  246. package/src/components/widgets/FileWidget.tsx +9 -8
  247. package/src/components/widgets/HiddenWidget.tsx +1 -1
  248. package/src/components/widgets/PasswordWidget.tsx +2 -1
  249. package/src/components/widgets/RadioWidget.tsx +8 -10
  250. package/src/components/widgets/RangeWidget.tsx +1 -1
  251. package/src/components/widgets/RatingWidget.tsx +48 -47
  252. package/src/components/widgets/SelectWidget.tsx +48 -31
  253. package/src/components/widgets/TextWidget.tsx +2 -1
  254. package/src/components/widgets/TextareaWidget.tsx +10 -7
  255. package/src/components/widgets/TimeWidget.tsx +2 -1
  256. package/src/components/widgets/URLWidget.tsx +2 -1
  257. package/src/components/widgets/UpDownWidget.tsx +2 -1
  258. package/src/components/widgets/index.ts +1 -1
  259. package/src/getDefaultRegistry.ts +2 -9
  260. package/src/getTestRegistry.tsx +2 -7
  261. package/src/index.ts +10 -5
  262. package/src/withTheme.tsx +14 -9
@@ -1,8 +1,8 @@
1
- import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `OptionalDataControlsField` component is used to render the optional data controls for the field associated
3
3
  * with the given props.
4
4
  *
5
5
  * @param props - The `FieldProps` for this template
6
6
  */
7
- export default function OptionalDataControlsField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldProps<T, S, F>): "" | import("react/jsx-runtime").JSX.Element | undefined;
7
+ export default function OptionalDataControlsField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldProps<T, S, F>): "" | import("react").JSX.Element | undefined;
8
8
  //# sourceMappingURL=OptionalDataControlsField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OptionalDataControlsField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/OptionalDataControlsField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EAOf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,4DA4D3B"}
1
+ {"version":3,"file":"OptionalDataControlsField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/OptionalDataControlsField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EAEf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAUrB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,gDA4D3B"}
@@ -1,11 +1,17 @@
1
- import { Component } from 'react';
2
- import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
3
- /** The `SchemaField` component determines whether it is necessary to rerender the component based on any props changes
4
- * and if so, calls the `SchemaFieldRender` component with the props.
1
+ import type { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `SchemaFieldRender` component is the work-horse of react-jsonschema-form, determining what kind of real field to
3
+ * render based on the `schema`, `uiSchema` and all the other props. It also deals with rendering the `anyOf` and
4
+ * `oneOf` fields.
5
+ *
6
+ * @param props - The `FieldProps` for this component
5
7
  */
6
- declare class SchemaField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<FieldProps<T, S, F>> {
7
- shouldComponentUpdate(nextProps: Readonly<FieldProps<T, S, F>>): boolean;
8
- render(): import("react/jsx-runtime").JSX.Element;
9
- }
8
+ declare function SchemaFieldRender<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldProps<T, S, F>): import("react").JSX.Element | null;
9
+ /** The `SchemaField` component wraps `SchemaFieldRender` with a custom memoization comparator that determines whether it is necessary to rerender the component based on any props changes
10
+ * using `experimental_componentUpdateStrategy`.
11
+ *
12
+ * The cast to `typeof SchemaFieldRender` preserves the generic type signature (<T, S, F>) for consumers,
13
+ * since React.memo's return type erases generic parameters.
14
+ */
15
+ declare const SchemaField: typeof SchemaFieldRender;
10
16
  export default SchemaField;
11
17
  //# sourceMappingURL=SchemaField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAiB,MAAM,OAAO,CAAC;AAC9D,OAAO,EAQL,UAAU,EAEV,eAAe,EASf,UAAU,EAGV,gBAAgB,EAKjB,MAAM,aAAa,CAAC;AA0SrB;;GAEG;AACH,cAAM,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,CAAE,SAAQ,SAAS,CACpH,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CACpB;IACC,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAS9D,MAAM;CAGP;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/SchemaField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAKV,UAAU,EAEV,eAAe,EAGf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAgFrB;;;;;GAKG;AACH,iBAAS,iBAAiB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC1G,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,sCA+O3B;AAED;;;;;GAKG;AACH,QAAA,MAAM,WAAW,EAUA,OAAO,iBAAiB,CAAC;AAE1C,eAAe,WAAW,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, Component } from 'react';
3
- import { ADDITIONAL_PROPERTY_FLAG, ANY_OF_KEY, descriptionId, getSchemaType, getTemplate, getUiOptions, ID_KEY, isFormDataAvailable, ONE_OF_KEY, resolveUiSchema, shouldRender, shouldRenderOptionalField, toFieldPathId, TranslatableString, UI_OPTIONS_KEY, } from '@rjsf/utils';
2
+ import { useCallback, memo } from 'react';
3
+ import { ADDITIONAL_PROPERTY_FLAG, ANY_OF_KEY, deepEquals, descriptionId, getSchemaType, getTemplate, getUiOptions, ID_KEY, isFormDataAvailable, ONE_OF_KEY, resolveUiSchema, RJSF_REF_CYCLE_KEY, shallowEquals, shouldRenderOptionalField, toFieldPathId, TranslatableString, UI_OPTIONS_KEY, } from '@rjsf/utils';
4
4
  import isObject from 'lodash-es/isObject.js';
5
5
  import omit from 'lodash-es/omit.js';
6
6
  /** The map of component type to FieldName */
@@ -23,8 +23,8 @@ const COMPONENT_TYPES = {
23
23
  * @returns - The `Field` component that is used to render the actual field data
24
24
  */
25
25
  function getFieldComponent(schema, uiOptions, registry) {
26
- const field = uiOptions.field;
27
- const { fields } = registry;
26
+ const { field } = uiOptions;
27
+ const { fields, schemaUtils } = registry;
28
28
  if (typeof field === 'function') {
29
29
  return field;
30
30
  }
@@ -38,12 +38,16 @@ function getFieldComponent(schema, uiOptions, registry) {
38
38
  if (schemaId && schemaId in fields) {
39
39
  componentName = schemaId;
40
40
  }
41
- // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't
42
- // render a field and let the MultiSchemaField component handle the form display
43
- if (!componentName && (schema.anyOf || schema.oneOf)) {
41
+ // If the schema uses 'anyOf' or 'oneOf' and is not a pure select (all-constant options),
42
+ // let the MultiSchemaField component handle the form display entirely.
43
+ // ObjectField is excluded: it renders shared properties (defined at the parent schema
44
+ // level) alongside the XxxOfField option selector.
45
+ // All other field types — including primitives and arrays — have no shared renderable
46
+ // properties, so the outer FieldComponent would only produce a spurious duplicate input.
47
+ if ((schema.anyOf || schema.oneOf) && !schemaUtils.isSelect(schema) && componentName !== 'ObjectField') {
44
48
  return () => null;
45
49
  }
46
- return componentName in fields ? fields[componentName] : fields['FallbackField'];
50
+ return componentName in fields ? fields[componentName] : fields.FallbackField;
47
51
  }
48
52
  /** The `SchemaFieldRender` component is the work-horse of react-jsonschema-form, determining what kind of real field to
49
53
  * render based on the `schema`, `uiSchema` and all the other props. It also deals with rendering the `anyOf` and
@@ -54,7 +58,20 @@ function getFieldComponent(schema, uiOptions, registry) {
54
58
  function SchemaFieldRender(props) {
55
59
  const { schema: _schema, fieldPathId, uiSchema: _uiSchema, formData, errorSchema, name, onChange, onKeyRename, onKeyRenameBlur, onRemoveProperty, required = false, registry, wasPropertyKeyModified = false, } = props;
56
60
  const { schemaUtils, globalFormOptions, globalUiOptions, fields } = registry;
57
- const { AnyOfField: _AnyOfField, OneOfField: _OneOfField } = fields;
61
+ const { AnyOfField: _AnyOfField, OneOfField: _OneOfField, CyclicSchemaField } = fields;
62
+ const fieldId = fieldPathId[ID_KEY];
63
+ /** Intermediary `onChange` handler for field components that will inject the `id` of the current field into the
64
+ * `onChange` chain if it is not already being provided from a deeper level in the hierarchy
65
+ */
66
+ const handleFieldComponentChange = useCallback((newFormData, path, newErrorSchema, id) => {
67
+ const theId = id || fieldId;
68
+ return onChange(newFormData, path, newErrorSchema, theId);
69
+ }, [fieldId, onChange]);
70
+ // Stop $ref cycles: when resolveAllReferences detects a repeated property $ref it tags the schema with this flag.
71
+ // The check must come after all hook calls to satisfy React's rules of hooks.
72
+ if (_schema[RJSF_REF_CYCLE_KEY]) {
73
+ return _jsx(CyclicSchemaField, { ...props });
74
+ }
58
75
  const uiSchema = resolveUiSchema(_schema, _uiSchema, registry);
59
76
  const uiOptions = getUiOptions(uiSchema, globalUiOptions);
60
77
  const FieldTemplate = getTemplate('FieldTemplate', registry, uiOptions);
@@ -62,14 +79,6 @@ function SchemaFieldRender(props) {
62
79
  const FieldHelpTemplate = getTemplate('FieldHelpTemplate', registry, uiOptions);
63
80
  const FieldErrorTemplate = getTemplate('FieldErrorTemplate', registry, uiOptions);
64
81
  const schema = schemaUtils.retrieveSchema(_schema, formData);
65
- const fieldId = fieldPathId[ID_KEY];
66
- /** Intermediary `onChange` handler for field components that will inject the `id` of the current field into the
67
- * `onChange` chain if it is not already being provided from a deeper level in the hierarchy
68
- */
69
- const handleFieldComponentChange = useCallback((formData, path, newErrorSchema, id) => {
70
- const theId = id || fieldId;
71
- return onChange(formData, path, newErrorSchema, theId);
72
- }, [fieldId, onChange]);
73
82
  const FieldComponent = getFieldComponent(schema, uiOptions, registry);
74
83
  const isDeprecated = Boolean(schema.deprecated);
75
84
  const deprecatedHandling = isDeprecated ? (uiOptions.deprecatedHandling ?? 'label') : undefined;
@@ -95,11 +104,11 @@ function SchemaFieldRender(props) {
95
104
  if ((ANY_OF_KEY in schema || ONE_OF_KEY in schema) && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema)) {
96
105
  if (schema[ANY_OF_KEY]) {
97
106
  XxxOfField = _AnyOfField;
98
- XxxOfOptions = schema[ANY_OF_KEY].map((_schema) => schemaUtils.retrieveSchema(isObject(_schema) ? _schema : {}, formData));
107
+ XxxOfOptions = schema[ANY_OF_KEY].map((xxxOfSchema) => schemaUtils.retrieveSchema(isObject(xxxOfSchema) ? xxxOfSchema : {}, formData));
99
108
  }
100
109
  else if (schema[ONE_OF_KEY]) {
101
110
  XxxOfField = _OneOfField;
102
- XxxOfOptions = schema[ONE_OF_KEY].map((_schema) => schemaUtils.retrieveSchema(isObject(_schema) ? _schema : {}, formData));
111
+ XxxOfOptions = schema[ONE_OF_KEY].map((xxxOfSchema) => schemaUtils.retrieveSchema(isObject(xxxOfSchema) ? xxxOfSchema : {}, formData));
103
112
  }
104
113
  // When the anyOf/oneOf is an optional data control render AND it does not have form data, hide the label
105
114
  const isOptionalRender = shouldRenderOptionalField(registry, schema, required, uiSchema);
@@ -135,7 +144,7 @@ function SchemaFieldRender(props) {
135
144
  label = registry.translateString(TranslatableString.DeprecatedLabel, [label]);
136
145
  }
137
146
  const description = uiOptions.description || props.schema.description || schema.description || '';
138
- const help = uiOptions.help;
147
+ const { help } = uiOptions;
139
148
  const hidden = uiOptions.widget === 'hidden' || deprecatedHandling === 'hide';
140
149
  const classNames = ['rjsf-field', `rjsf-field-${getSchemaType(schema)}`];
141
150
  if (!hideError && __errors && __errors.length > 0) {
@@ -179,17 +188,21 @@ function SchemaFieldRender(props) {
179
188
  };
180
189
  return (_jsx(FieldTemplate, { ...fieldProps, children: _jsxs(_Fragment, { children: [field, XxxOfField && (_jsx(XxxOfField, { name: name, disabled: disabled, readonly: readonly, hideError: hideError, errorSchema: errorSchema, formData: formData, fieldPathId: fieldPathId, onBlur: props.onBlur, onChange: props.onChange, onFocus: props.onFocus, options: XxxOfOptions, registry: registry, required: required, schema: schema, uiSchema: uiSchema }))] }) }));
181
190
  }
182
- /** The `SchemaField` component determines whether it is necessary to rerender the component based on any props changes
183
- * and if so, calls the `SchemaFieldRender` component with the props.
191
+ /** The `SchemaField` component wraps `SchemaFieldRender` with a custom memoization comparator that determines whether it is necessary to rerender the component based on any props changes
192
+ * using `experimental_componentUpdateStrategy`.
193
+ *
194
+ * The cast to `typeof SchemaFieldRender` preserves the generic type signature (<T, S, F>) for consumers,
195
+ * since React.memo's return type erases generic parameters.
184
196
  */
185
- class SchemaField extends Component {
186
- shouldComponentUpdate(nextProps) {
187
- const { registry: { globalFormOptions }, } = this.props;
188
- const { experimental_componentUpdateStrategy = 'customDeep' } = globalFormOptions;
189
- return shouldRender(this, nextProps, this.state, experimental_componentUpdateStrategy);
197
+ const SchemaField = memo(SchemaFieldRender, (prevProps, nextProps) => {
198
+ const { experimental_componentUpdateStrategy = 'customDeep' } = nextProps.registry.globalFormOptions;
199
+ if (experimental_componentUpdateStrategy === 'always') {
200
+ return false; // always re-render never consider props equal
190
201
  }
191
- render() {
192
- return _jsx(SchemaFieldRender, { ...this.props });
202
+ if (experimental_componentUpdateStrategy === 'shallow') {
203
+ return shallowEquals(prevProps, nextProps);
193
204
  }
194
- }
205
+ // default: 'customDeep'
206
+ return deepEquals(prevProps, nextProps);
207
+ });
195
208
  export default SchemaField;
@@ -1,8 +1,8 @@
1
- import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `StringField` component is used to render a schema field that represents a string type
3
3
  *
4
4
  * @param props - The `FieldProps` for this template
5
5
  */
6
- declare function StringField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
6
+ declare function StringField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldProps<T, S, F>): import("react").JSX.Element;
7
7
  export default StringField;
8
8
  //# sourceMappingURL=StringField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/StringField.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,UAAU,EACV,eAAe,EACf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,iBAAS,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACpG,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA8D3B;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"StringField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/StringField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAG1G;;;GAGG;AACH,iBAAS,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACpG,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BA4D3B;AAED,eAAe,WAAW,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useCallback } from 'react';
3
- import { getWidget, getUiOptions, optionsList, hasWidget, } from '@rjsf/utils';
3
+ import { getWidget, getUiOptions, optionsList, hasWidget } from '@rjsf/utils';
4
4
  /** The `StringField` component is used to render a schema field that represents a string type
5
5
  *
6
6
  * @param props - The `FieldProps` for this template
@@ -18,10 +18,7 @@ function StringField(props) {
18
18
  const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);
19
19
  const label = uiTitle ?? title ?? schemaTitle ?? name;
20
20
  const Widget = getWidget(schema, widget, widgets);
21
- const onWidgetChange = useCallback((value, errorSchema, id) => {
22
- // String field change passes an empty path array to the parent field which adds the appropriate path
23
- return onChange(value, fieldPathId.path, errorSchema, id);
24
- }, [onChange, fieldPathId]);
21
+ const onWidgetChange = useCallback((value, errorSchema, id) => onChange(value, fieldPathId.path, errorSchema, id), [onChange, fieldPathId]);
25
22
  return (_jsx(Widget, { options: { ...options, enumOptions }, schema: schema, uiSchema: uiSchema, id: fieldPathId.$id, name: name, label: label, hideLabel: !displayLabel, hideError: hideError, value: formData, onChange: onWidgetChange, onBlur: onBlur, onFocus: onFocus, required: required, disabled: disabled, readonly: readonly, autofocus: autofocus, registry: registry, placeholder: placeholder, rawErrors: rawErrors, htmlName: fieldPathId.name }));
26
23
  }
27
24
  export default StringField;
@@ -1,4 +1,4 @@
1
- import { FormContextType, RegistryFieldsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { FormContextType, RegistryFieldsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  declare function fields<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): RegistryFieldsType<T, S, F>;
3
3
  export default fields;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBvG,iBAAS,MAAM,CACb,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAkB/B;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiB5G,iBAAS,MAAM,CACb,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAmB/B;AAED,eAAe,MAAM,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import ArrayField from './ArrayField.js';
2
2
  import BooleanField from './BooleanField.js';
3
+ import CyclicSchemaField from './CyclicSchemaField.js';
3
4
  import FallbackField from './FallbackField.js';
4
5
  import LayoutGridField from './LayoutGridField.js';
5
6
  import LayoutHeaderField from './LayoutHeaderField.js';
@@ -17,6 +18,7 @@ function fields() {
17
18
  ArrayField: ArrayField,
18
19
  // ArrayField falls back to SchemaField if ArraySchemaField is not defined, which it isn't by default
19
20
  BooleanField,
21
+ CyclicSchemaField,
20
22
  FallbackField,
21
23
  LayoutGridField,
22
24
  LayoutHeaderField,
@@ -1,8 +1,8 @@
1
- import { ArrayFieldDescriptionProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldDescriptionProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldDescriptionTemplate` component renders a `DescriptionFieldTemplate` with an `id` derived from
3
3
  * the `fieldPathId`.
4
4
  *
5
5
  * @param props - The `ArrayFieldDescriptionProps` for the component
6
6
  */
7
- export default function ArrayFieldDescriptionTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldDescriptionProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
7
+ export default function ArrayFieldDescriptionTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldDescriptionProps<T, S, F>): import("react").JSX.Element | null;
8
8
  //# sourceMappingURL=ArrayFieldDescriptionTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldDescriptionTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldDescriptionTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,0BAA0B,EAC1B,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACnD,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,0BAA0B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAqB3C"}
1
+ {"version":3,"file":"ArrayFieldDescriptionTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldDescriptionTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG7G;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACnD,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,0BAA0B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,sCAqB3C"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { descriptionId, getTemplate, getUiOptions, } from '@rjsf/utils';
2
+ import { descriptionId, getTemplate, getUiOptions } from '@rjsf/utils';
3
3
  /** The `ArrayFieldDescriptionTemplate` component renders a `DescriptionFieldTemplate` with an `id` derived from
4
4
  * the `fieldPathId`.
5
5
  *
@@ -1,8 +1,8 @@
1
- import { ArrayFieldItemButtonsTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldItemButtonsTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldTemplateItemButtons` component is the template used to render the buttons associate3d with items of
3
3
  * an array.
4
4
  *
5
5
  * @param props - The `ArrayFieldItemButtonsTemplateProps` props for the component
6
6
  */
7
- export default function ArrayFieldItemButtonsTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemButtonsTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
7
+ export default function ArrayFieldItemButtonsTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemButtonsTemplateProps<T, S, F>): import("react").JSX.Element;
8
8
  //# sourceMappingURL=ArrayFieldItemButtonsTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldItemButtonsTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldItemButtonsTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAElC,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACnD,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,kCAAkC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA8DnD"}
1
+ {"version":3,"file":"ArrayFieldItemButtonsTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldItemButtonsTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGrH;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACnD,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,kCAAkC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BA8DnD"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { buttonId, } from '@rjsf/utils';
2
+ import { buttonId } from '@rjsf/utils';
3
3
  /** The `ArrayFieldTemplateItemButtons` component is the template used to render the buttons associate3d with items of
4
4
  * an array.
5
5
  *
@@ -1,7 +1,7 @@
1
- import { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
3
3
  *
4
4
  * @param props - The `ArrayFieldItemTemplateProps` props for the component
5
5
  */
6
- export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
6
+ export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemTemplateProps<T, S, F>): import("react").JSX.Element;
7
7
  //# sourceMappingURL=ArrayFieldItemTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldItemTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,eAAe,EAGf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA6B5C"}
1
+ {"version":3,"file":"ArrayFieldItemTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG9G;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BA6B5C"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getTemplate, getUiOptions, } from '@rjsf/utils';
2
+ import { getTemplate, getUiOptions } from '@rjsf/utils';
3
3
  /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
4
4
  *
5
5
  * @param props - The `ArrayFieldItemTemplateProps` props for the component
@@ -1,7 +1,7 @@
1
- import { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
3
3
  *
4
4
  * @param props - The `ArrayFieldTemplateProps` props for the component
5
5
  */
6
- export default function ArrayFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
6
+ export default function ArrayFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTemplateProps<T, S, F>): import("react").JSX.Element;
7
7
  //# sourceMappingURL=ArrayFieldTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAgExC"}
1
+ {"version":3,"file":"ArrayFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG1G;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAgExC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getTemplate, getUiOptions, buttonId, } from '@rjsf/utils';
2
+ import { getTemplate, getUiOptions, buttonId } from '@rjsf/utils';
3
3
  /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
4
4
  *
5
5
  * @param props - The `ArrayFieldTemplateProps` props for the component
@@ -1,8 +1,8 @@
1
- import { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from
3
3
  * the `fieldPathId`.
4
4
  *
5
5
  * @param props - The `ArrayFieldTitleProps` for the component
6
6
  */
7
- export default function ArrayFieldTitleTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTitleProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
7
+ export default function ArrayFieldTitleTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTitleProps<T, S, F>): import("react").JSX.Element | null;
8
8
  //# sourceMappingURL=ArrayFieldTitleTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldTitleTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAuBrC"}
1
+ {"version":3,"file":"ArrayFieldTitleTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAiB,MAAM,aAAa,CAAC;AAGtH;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,sCAuBrC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getTemplate, getUiOptions, titleId, } from '@rjsf/utils';
2
+ import { getTemplate, getUiOptions, titleId } from '@rjsf/utils';
3
3
  /** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from
4
4
  * the `fieldPathId`.
5
5
  *
@@ -1,9 +1,9 @@
1
- import { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
3
3
  * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
4
4
  * It can be customized/overridden for other themes or individual implementations as needed.
5
5
  *
6
6
  * @param props - The `WidgetProps` for this template
7
7
  */
8
- export default function BaseInputTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
+ export default function BaseInputTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BaseInputTemplateProps<T, S, F>): import("react").JSX.Element;
9
9
  //# sourceMappingURL=BaseInputTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInputTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/BaseInputTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,sBAAsB,EAGtB,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAIrB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAuFvC"}
1
+ {"version":3,"file":"BaseInputTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/BaseInputTemplate.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKzG;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAsFvC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback } from 'react';
3
- import { ariaDescribedByIds, examplesId, getInputProps, } from '@rjsf/utils';
3
+ import { ariaDescribedByIds, examplesId, getInputProps } from '@rjsf/utils';
4
4
  import SchemaExamples from '../SchemaExamples.js';
5
5
  /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
6
6
  * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
@@ -17,6 +17,7 @@ export default function BaseInputTemplate(props) {
17
17
  // Note: since React 15.2.0 we can't forward unknown element attributes, so we
18
18
  // exclude the "options" and "schema" ones here.
19
19
  if (!id) {
20
+ // oxlint-disable-next-line no-console
20
21
  console.log('No id for', props);
21
22
  throw new Error(`no id for props ${JSON.stringify(props)}`);
22
23
  }
@@ -31,13 +32,13 @@ export default function BaseInputTemplate(props) {
31
32
  else {
32
33
  inputValue = value == null ? '' : value;
33
34
  }
34
- const _onChange = useCallback(({ target: { value } }) => onChange(value === '' ? options.emptyValue : value), [onChange, options]);
35
- const _onBlur = useCallback(({ target }) => onBlur(id, target && target.value), [onBlur, id]);
36
- const _onFocus = useCallback(({ target }) => onFocus(id, target && target.value), [onFocus, id]);
37
- const _onClear = useCallback((e) => {
35
+ const handleChange = useCallback(({ target: { value: newValue } }) => onChange(newValue === '' ? options.emptyValue : newValue), [onChange, options]);
36
+ const handleBlur = useCallback(({ target }) => onBlur(id, target?.value), [onBlur, id]);
37
+ const handleFocus = useCallback(({ target }) => onFocus(id, target?.value), [onFocus, id]);
38
+ const handleClear = useCallback((e) => {
38
39
  e.preventDefault();
39
40
  e.stopPropagation();
40
41
  onChange(options.emptyValue ?? '');
41
42
  }, [onChange, options.emptyValue]);
42
- return (_jsxs(_Fragment, { children: [_jsx("input", { id: id, name: htmlName || id, className: 'form-control', readOnly: readonly, disabled: disabled, autoFocus: autofocus, value: inputValue, ...inputProps, list: schema.examples ? examplesId(id) : undefined, onChange: onChangeOverride || _onChange, onBlur: _onBlur, onFocus: _onFocus, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }), options.allowClearTextInputs && !readonly && !disabled && inputValue && (_jsx(ClearButton, { registry: registry, onClick: _onClear })), _jsx(SchemaExamples, { id: id, schema: schema })] }));
43
+ return (_jsxs(_Fragment, { children: [_jsx("input", { id: id, name: htmlName || id, className: 'form-control', readOnly: readonly, disabled: disabled, autoFocus: autofocus, value: inputValue, ...inputProps, list: schema.examples ? examplesId(id) : undefined, onChange: onChangeOverride || handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }), options.allowClearTextInputs && !readonly && !disabled && inputValue && (_jsx(ClearButton, { registry: registry, onClick: handleClear })), _jsx(SchemaExamples, { id: id, schema: schema })] }));
43
44
  }
@@ -1,5 +1,5 @@
1
- import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `AddButton` renders a button that represent the `Add` action on a form
3
3
  */
4
- export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, className, onClick, disabled, registry, }: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
4
+ export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, className, onClick, disabled, registry, }: IconButtonProps<T, S, F>): import("react").JSX.Element;
5
5
  //# sourceMappingURL=AddButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/AddButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AAIjH;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACnH,EAAE,EACF,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAoB1B"}
1
+ {"version":3,"file":"AddButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/AddButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKlG;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACnH,EAAE,EACF,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAoB1B"}
@@ -1,8 +1,15 @@
1
- import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
- export default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
3
- export declare function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
4
- export declare function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
5
- export declare function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
6
- export declare function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
7
- export declare function ClearButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, className, onClick, disabled, registry, ...props }: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
1
+ import type { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ declare function IconButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react").JSX.Element;
3
+ declare const IconButton: typeof IconButtonFn;
4
+ export default IconButton;
5
+ declare function CopyButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react").JSX.Element;
6
+ export declare const CopyButton: typeof CopyButtonFn;
7
+ declare function MoveDownButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react").JSX.Element;
8
+ export declare const MoveDownButton: typeof MoveDownButtonFn;
9
+ declare function MoveUpButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react").JSX.Element;
10
+ export declare const MoveUpButton: typeof MoveUpButtonFn;
11
+ declare function RemoveButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react").JSX.Element;
12
+ export declare const RemoveButton: typeof RemoveButtonFn;
13
+ declare function ClearButtonFn<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, className, onClick, disabled, registry, ...props }: IconButtonProps<T, S, F>): import("react").JSX.Element;
14
+ export declare const ClearButton: typeof ClearButtonFn;
8
15
  //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AAEjH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAClH,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAQhC;AAED,wBAAgB,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC1G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAMhC;AAED,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC9G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAMhC;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC5G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAMhC;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAC5G,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAQhC;AAED,wBAAgB,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EAC7G,EAAE,EACF,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAe1B"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGlG,iBAAS,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACrG,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAQhC;AACD,QAAA,MAAM,UAAU,EAAyB,OAAO,YAAY,CAAC;AAC7D,eAAe,UAAU,CAAC;AAE1B,iBAAS,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACrG,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAMhC;AACD,eAAO,MAAM,UAAU,EAAyB,OAAO,YAAY,CAAC;AAEpE,iBAAS,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACzG,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAMhC;AACD,eAAO,MAAM,cAAc,EAA6B,OAAO,gBAAgB,CAAC;AAEhF,iBAAS,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACvG,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAMhC;AACD,eAAO,MAAM,YAAY,EAA2B,OAAO,cAAc,CAAC;AAE1E,iBAAS,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACvG,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAQhC;AACD,eAAO,MAAM,YAAY,EAA2B,OAAO,cAAc,CAAC;AAE1E,iBAAS,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACxG,EAAE,EACF,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAe1B;AACD,eAAO,MAAM,WAAW,EAA0B,OAAO,aAAa,CAAC"}
@@ -1,26 +1,34 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
2
3
  import { TranslatableString } from '@rjsf/utils';
3
- export default function IconButton(props) {
4
+ function IconButtonFn(props) {
4
5
  const { iconType = 'default', icon, className, uiSchema, registry, ...otherProps } = props;
5
6
  return (_jsx("button", { type: 'button', className: `btn btn-${iconType} ${className}`, ...otherProps, children: _jsx("i", { className: `glyphicon glyphicon-${icon}` }) }));
6
7
  }
7
- export function CopyButton(props) {
8
+ const IconButton = memo(IconButtonFn);
9
+ export default IconButton;
10
+ function CopyButtonFn(props) {
8
11
  const { registry: { translateString }, } = props;
9
12
  return _jsx(IconButton, { title: translateString(TranslatableString.CopyButton), ...props, icon: 'copy' });
10
13
  }
11
- export function MoveDownButton(props) {
14
+ export const CopyButton = memo(CopyButtonFn);
15
+ function MoveDownButtonFn(props) {
12
16
  const { registry: { translateString }, } = props;
13
17
  return _jsx(IconButton, { title: translateString(TranslatableString.MoveDownButton), ...props, icon: 'arrow-down' });
14
18
  }
15
- export function MoveUpButton(props) {
19
+ export const MoveDownButton = memo(MoveDownButtonFn);
20
+ function MoveUpButtonFn(props) {
16
21
  const { registry: { translateString }, } = props;
17
22
  return _jsx(IconButton, { title: translateString(TranslatableString.MoveUpButton), ...props, icon: 'arrow-up' });
18
23
  }
19
- export function RemoveButton(props) {
24
+ export const MoveUpButton = memo(MoveUpButtonFn);
25
+ function RemoveButtonFn(props) {
20
26
  const { registry: { translateString }, } = props;
21
27
  return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), ...props, iconType: 'danger', icon: 'remove' }));
22
28
  }
23
- export function ClearButton({ id, className, onClick, disabled, registry, ...props }) {
29
+ export const RemoveButton = memo(RemoveButtonFn);
30
+ function ClearButtonFn({ id, className, onClick, disabled, registry, ...props }) {
24
31
  const { translateString } = registry;
25
32
  return (_jsx(IconButton, { id: id, iconType: 'default', icon: 'remove', className: 'btn-clear col-xs-12', title: translateString(TranslatableString.ClearButton), onClick: onClick, disabled: disabled, registry: registry, ...props }));
26
33
  }
34
+ export const ClearButton = memo(ClearButtonFn);
@@ -1,5 +1,5 @@
1
- import { FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';
1
+ import type { FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';
2
2
  /** The `SubmitButton` renders a button that represent the `Submit` action on a form
3
3
  */
4
- export default function SubmitButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ uiSchema }: SubmitButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
4
+ export default function SubmitButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ uiSchema }: SubmitButtonProps<T, S, F>): import("react").JSX.Element | null;
5
5
  //# sourceMappingURL=SubmitButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEvH;GACG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAYzC"}
1
+ {"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGpG;GACG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,sCAYzC"}
@@ -1,4 +1,4 @@
1
- import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
1
+ import type { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
2
2
  declare function buttonTemplates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<T, S, F>['ButtonTemplates'];
3
3
  export default buttonTemplates;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM3F,iBAAS,eAAe,CACtB,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAU7C;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/ButtonTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMhG,iBAAS,eAAe,CACtB,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,KAC5B,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAU7C;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CyclicSchemaExpandProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `CyclicSchemaExpandTemplate` is the template to use to render the cyclic schema expand message and controls
3
+ *
4
+ * @param props - The `DescriptionFieldProps` for this component
5
+ */
6
+ export default function CyclicSchemaExpandTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: CyclicSchemaExpandProps<T, S, F>): import("react").JSX.Element;
7
+ //# sourceMappingURL=CyclicSchemaExpandTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CyclicSchemaExpandTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/CyclicSchemaExpandTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG1G;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAChD,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,+BAmBxC"}