@rjsf/core 6.0.0-alpha.0 → 6.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/dist/core.umd.js +1680 -809
  2. package/dist/index.esm.js +2166 -1198
  3. package/dist/index.esm.js.map +4 -4
  4. package/dist/index.js +2221 -1299
  5. package/dist/index.js.map +4 -4
  6. package/lib/components/Form.d.ts +22 -9
  7. package/lib/components/Form.d.ts.map +1 -0
  8. package/lib/components/Form.js +368 -312
  9. package/lib/components/RichDescription.d.ts +20 -0
  10. package/lib/components/RichDescription.d.ts.map +1 -0
  11. package/lib/components/RichDescription.js +17 -0
  12. package/lib/components/fields/ArrayField.d.ts +20 -9
  13. package/lib/components/fields/ArrayField.d.ts.map +1 -0
  14. package/lib/components/fields/ArrayField.js +212 -206
  15. package/lib/components/fields/BooleanField.d.ts +1 -0
  16. package/lib/components/fields/BooleanField.d.ts.map +1 -0
  17. package/lib/components/fields/BooleanField.js +6 -14
  18. package/lib/components/fields/LayoutGridField.d.ts +480 -0
  19. package/lib/components/fields/LayoutGridField.d.ts.map +1 -0
  20. package/lib/components/fields/LayoutGridField.js +711 -0
  21. package/lib/components/fields/LayoutHeaderField.d.ts +12 -0
  22. package/lib/components/fields/LayoutHeaderField.d.ts.map +1 -0
  23. package/lib/components/fields/LayoutHeaderField.js +23 -0
  24. package/lib/components/fields/LayoutMultiSchemaField.d.ts +28 -0
  25. package/lib/components/fields/LayoutMultiSchemaField.d.ts.map +1 -0
  26. package/lib/components/fields/LayoutMultiSchemaField.js +114 -0
  27. package/lib/components/fields/MultiSchemaField.d.ts +1 -0
  28. package/lib/components/fields/MultiSchemaField.d.ts.map +1 -0
  29. package/lib/components/fields/MultiSchemaField.js +31 -31
  30. package/lib/components/fields/NullField.d.ts +1 -0
  31. package/lib/components/fields/NullField.d.ts.map +1 -0
  32. package/lib/components/fields/NullField.js +0 -1
  33. package/lib/components/fields/NumberField.d.ts +1 -0
  34. package/lib/components/fields/NumberField.d.ts.map +1 -0
  35. package/lib/components/fields/NumberField.js +2 -3
  36. package/lib/components/fields/ObjectField.d.ts +1 -0
  37. package/lib/components/fields/ObjectField.d.ts.map +1 -0
  38. package/lib/components/fields/ObjectField.js +146 -141
  39. package/lib/components/fields/SchemaField.d.ts +1 -0
  40. package/lib/components/fields/SchemaField.d.ts.map +1 -0
  41. package/lib/components/fields/SchemaField.js +10 -20
  42. package/lib/components/fields/StringField.d.ts +1 -0
  43. package/lib/components/fields/StringField.d.ts.map +1 -0
  44. package/lib/components/fields/StringField.js +1 -3
  45. package/lib/components/fields/index.d.ts +1 -0
  46. package/lib/components/fields/index.d.ts.map +1 -0
  47. package/lib/components/fields/index.js +14 -9
  48. package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts +1 -0
  49. package/lib/components/templates/ArrayFieldDescriptionTemplate.d.ts.map +1 -0
  50. package/lib/components/templates/ArrayFieldDescriptionTemplate.js +0 -1
  51. package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts +8 -0
  52. package/lib/components/templates/ArrayFieldItemButtonsTemplate.d.ts.map +1 -0
  53. package/lib/components/templates/ArrayFieldItemButtonsTemplate.js +17 -0
  54. package/lib/components/templates/ArrayFieldItemTemplate.d.ts +4 -3
  55. package/lib/components/templates/ArrayFieldItemTemplate.d.ts.map +1 -0
  56. package/lib/components/templates/ArrayFieldItemTemplate.js +7 -6
  57. package/lib/components/templates/ArrayFieldTemplate.d.ts +2 -1
  58. package/lib/components/templates/ArrayFieldTemplate.d.ts.map +1 -0
  59. package/lib/components/templates/ArrayFieldTemplate.js +3 -4
  60. package/lib/components/templates/ArrayFieldTitleTemplate.d.ts +1 -0
  61. package/lib/components/templates/ArrayFieldTitleTemplate.d.ts.map +1 -0
  62. package/lib/components/templates/ArrayFieldTitleTemplate.js +0 -1
  63. package/lib/components/templates/BaseInputTemplate.d.ts +1 -0
  64. package/lib/components/templates/BaseInputTemplate.d.ts.map +1 -0
  65. package/lib/components/templates/BaseInputTemplate.js +0 -1
  66. package/lib/components/templates/ButtonTemplates/AddButton.d.ts +1 -0
  67. package/lib/components/templates/ButtonTemplates/AddButton.d.ts.map +1 -0
  68. package/lib/components/templates/ButtonTemplates/AddButton.js +1 -2
  69. package/lib/components/templates/ButtonTemplates/IconButton.d.ts +1 -0
  70. package/lib/components/templates/ButtonTemplates/IconButton.d.ts.map +1 -0
  71. package/lib/components/templates/ButtonTemplates/IconButton.js +4 -5
  72. package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts +1 -0
  73. package/lib/components/templates/ButtonTemplates/SubmitButton.d.ts.map +1 -0
  74. package/lib/components/templates/ButtonTemplates/SubmitButton.js +0 -1
  75. package/lib/components/templates/ButtonTemplates/index.d.ts +1 -0
  76. package/lib/components/templates/ButtonTemplates/index.d.ts.map +1 -0
  77. package/lib/components/templates/ButtonTemplates/index.js +3 -4
  78. package/lib/components/templates/DescriptionField.d.ts +1 -0
  79. package/lib/components/templates/DescriptionField.d.ts.map +1 -0
  80. package/lib/components/templates/DescriptionField.js +3 -8
  81. package/lib/components/templates/ErrorList.d.ts +1 -0
  82. package/lib/components/templates/ErrorList.d.ts.map +1 -0
  83. package/lib/components/templates/ErrorList.js +0 -1
  84. package/lib/components/templates/FieldErrorTemplate.d.ts +1 -0
  85. package/lib/components/templates/FieldErrorTemplate.d.ts.map +1 -0
  86. package/lib/components/templates/FieldErrorTemplate.js +0 -1
  87. package/lib/components/templates/FieldHelpTemplate.d.ts +1 -0
  88. package/lib/components/templates/FieldHelpTemplate.d.ts.map +1 -0
  89. package/lib/components/templates/FieldHelpTemplate.js +0 -1
  90. package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts +1 -0
  91. package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts.map +1 -0
  92. package/lib/components/templates/FieldTemplate/FieldTemplate.js +1 -2
  93. package/lib/components/templates/FieldTemplate/Label.d.ts +1 -0
  94. package/lib/components/templates/FieldTemplate/Label.d.ts.map +1 -0
  95. package/lib/components/templates/FieldTemplate/Label.js +0 -1
  96. package/lib/components/templates/FieldTemplate/index.d.ts +2 -1
  97. package/lib/components/templates/FieldTemplate/index.d.ts.map +1 -0
  98. package/lib/components/templates/FieldTemplate/index.js +1 -2
  99. package/lib/components/templates/GridTemplate.d.ts +8 -0
  100. package/lib/components/templates/GridTemplate.d.ts.map +1 -0
  101. package/lib/components/templates/GridTemplate.js +10 -0
  102. package/lib/components/templates/ObjectFieldTemplate.d.ts +1 -0
  103. package/lib/components/templates/ObjectFieldTemplate.d.ts.map +1 -0
  104. package/lib/components/templates/ObjectFieldTemplate.js +2 -3
  105. package/lib/components/templates/TitleField.d.ts +1 -0
  106. package/lib/components/templates/TitleField.d.ts.map +1 -0
  107. package/lib/components/templates/TitleField.js +0 -1
  108. package/lib/components/templates/UnsupportedField.d.ts +1 -0
  109. package/lib/components/templates/UnsupportedField.d.ts.map +1 -0
  110. package/lib/components/templates/UnsupportedField.js +0 -1
  111. package/lib/components/templates/WrapIfAdditionalTemplate.d.ts +1 -0
  112. package/lib/components/templates/WrapIfAdditionalTemplate.d.ts.map +1 -0
  113. package/lib/components/templates/WrapIfAdditionalTemplate.js +10 -6
  114. package/lib/components/templates/index.d.ts +1 -0
  115. package/lib/components/templates/index.d.ts.map +1 -0
  116. package/lib/components/templates/index.js +19 -16
  117. package/lib/components/widgets/AltDateTimeWidget.d.ts +1 -0
  118. package/lib/components/widgets/AltDateTimeWidget.d.ts.map +1 -0
  119. package/lib/components/widgets/AltDateTimeWidget.js +0 -1
  120. package/lib/components/widgets/AltDateWidget.d.ts +1 -0
  121. package/lib/components/widgets/AltDateWidget.d.ts.map +1 -0
  122. package/lib/components/widgets/AltDateWidget.js +0 -1
  123. package/lib/components/widgets/CheckboxWidget.d.ts +1 -0
  124. package/lib/components/widgets/CheckboxWidget.d.ts.map +1 -0
  125. package/lib/components/widgets/CheckboxWidget.js +2 -4
  126. package/lib/components/widgets/CheckboxesWidget.d.ts +1 -0
  127. package/lib/components/widgets/CheckboxesWidget.d.ts.map +1 -0
  128. package/lib/components/widgets/CheckboxesWidget.js +0 -1
  129. package/lib/components/widgets/ColorWidget.d.ts +1 -0
  130. package/lib/components/widgets/ColorWidget.d.ts.map +1 -0
  131. package/lib/components/widgets/ColorWidget.js +0 -1
  132. package/lib/components/widgets/DateTimeWidget.d.ts +1 -0
  133. package/lib/components/widgets/DateTimeWidget.d.ts.map +1 -0
  134. package/lib/components/widgets/DateTimeWidget.js +0 -1
  135. package/lib/components/widgets/DateWidget.d.ts +1 -0
  136. package/lib/components/widgets/DateWidget.d.ts.map +1 -0
  137. package/lib/components/widgets/DateWidget.js +0 -1
  138. package/lib/components/widgets/EmailWidget.d.ts +1 -0
  139. package/lib/components/widgets/EmailWidget.d.ts.map +1 -0
  140. package/lib/components/widgets/EmailWidget.js +0 -1
  141. package/lib/components/widgets/FileWidget.d.ts +1 -0
  142. package/lib/components/widgets/FileWidget.d.ts.map +1 -0
  143. package/lib/components/widgets/FileWidget.js +3 -5
  144. package/lib/components/widgets/HiddenWidget.d.ts +1 -0
  145. package/lib/components/widgets/HiddenWidget.d.ts.map +1 -0
  146. package/lib/components/widgets/HiddenWidget.js +0 -1
  147. package/lib/components/widgets/PasswordWidget.d.ts +1 -0
  148. package/lib/components/widgets/PasswordWidget.d.ts.map +1 -0
  149. package/lib/components/widgets/PasswordWidget.js +0 -1
  150. package/lib/components/widgets/RadioWidget.d.ts +1 -0
  151. package/lib/components/widgets/RadioWidget.d.ts.map +1 -0
  152. package/lib/components/widgets/RadioWidget.js +3 -4
  153. package/lib/components/widgets/RangeWidget.d.ts +1 -0
  154. package/lib/components/widgets/RangeWidget.d.ts.map +1 -0
  155. package/lib/components/widgets/RangeWidget.js +0 -1
  156. package/lib/components/widgets/RatingWidget.d.ts +15 -0
  157. package/lib/components/widgets/RatingWidget.d.ts.map +1 -0
  158. package/lib/components/widgets/RatingWidget.js +63 -0
  159. package/lib/components/widgets/SelectWidget.d.ts +1 -0
  160. package/lib/components/widgets/SelectWidget.d.ts.map +1 -0
  161. package/lib/components/widgets/SelectWidget.js +4 -5
  162. package/lib/components/widgets/TextWidget.d.ts +1 -0
  163. package/lib/components/widgets/TextWidget.d.ts.map +1 -0
  164. package/lib/components/widgets/TextWidget.js +0 -1
  165. package/lib/components/widgets/TextareaWidget.d.ts +1 -0
  166. package/lib/components/widgets/TextareaWidget.d.ts.map +1 -0
  167. package/lib/components/widgets/TextareaWidget.js +0 -1
  168. package/lib/components/widgets/TimeWidget.d.ts +1 -0
  169. package/lib/components/widgets/TimeWidget.d.ts.map +1 -0
  170. package/lib/components/widgets/TimeWidget.js +0 -1
  171. package/lib/components/widgets/URLWidget.d.ts +1 -0
  172. package/lib/components/widgets/URLWidget.d.ts.map +1 -0
  173. package/lib/components/widgets/URLWidget.js +0 -1
  174. package/lib/components/widgets/UpDownWidget.d.ts +1 -0
  175. package/lib/components/widgets/UpDownWidget.d.ts.map +1 -0
  176. package/lib/components/widgets/UpDownWidget.js +0 -1
  177. package/lib/components/widgets/index.d.ts +1 -0
  178. package/lib/components/widgets/index.d.ts.map +1 -0
  179. package/lib/components/widgets/index.js +21 -20
  180. package/lib/getDefaultRegistry.d.ts +1 -0
  181. package/lib/getDefaultRegistry.d.ts.map +1 -0
  182. package/lib/getDefaultRegistry.js +3 -4
  183. package/lib/index.d.ts +7 -5
  184. package/lib/index.d.ts.map +1 -0
  185. package/lib/index.js +5 -5
  186. package/lib/tsconfig.tsbuildinfo +1 -1
  187. package/lib/withTheme.d.ts +2 -1
  188. package/lib/withTheme.d.ts.map +1 -0
  189. package/lib/withTheme.js +7 -8
  190. package/package.json +46 -37
  191. package/src/components/Form.tsx +127 -41
  192. package/src/components/RichDescription.tsx +50 -0
  193. package/src/components/fields/ArrayField.tsx +34 -24
  194. package/src/components/fields/BooleanField.tsx +6 -14
  195. package/src/components/fields/LayoutGridField.tsx +967 -0
  196. package/src/components/fields/LayoutHeaderField.tsx +49 -0
  197. package/src/components/fields/LayoutMultiSchemaField.tsx +228 -0
  198. package/src/components/fields/MultiSchemaField.tsx +9 -4
  199. package/src/components/fields/NullField.tsx +1 -1
  200. package/src/components/fields/NumberField.tsx +5 -5
  201. package/src/components/fields/ObjectField.tsx +32 -24
  202. package/src/components/fields/SchemaField.tsx +17 -30
  203. package/src/components/fields/StringField.tsx +2 -2
  204. package/src/components/fields/index.ts +7 -1
  205. package/src/components/templates/ArrayFieldDescriptionTemplate.tsx +2 -2
  206. package/src/components/templates/ArrayFieldItemButtonsTemplate.tsx +85 -0
  207. package/src/components/templates/ArrayFieldItemTemplate.tsx +18 -57
  208. package/src/components/templates/ArrayFieldTemplate.tsx +10 -8
  209. package/src/components/templates/ArrayFieldTitleTemplate.tsx +2 -2
  210. package/src/components/templates/BaseInputTemplate.tsx +4 -4
  211. package/src/components/templates/ButtonTemplates/IconButton.tsx +9 -36
  212. package/src/components/templates/ButtonTemplates/SubmitButton.tsx +1 -1
  213. package/src/components/templates/ButtonTemplates/index.ts +1 -1
  214. package/src/components/templates/DescriptionField.tsx +9 -15
  215. package/src/components/templates/FieldErrorTemplate.tsx +1 -1
  216. package/src/components/templates/FieldHelpTemplate.tsx +1 -1
  217. package/src/components/templates/FieldTemplate/FieldTemplate.tsx +2 -2
  218. package/src/components/templates/GridTemplate.tsx +15 -0
  219. package/src/components/templates/ObjectFieldTemplate.tsx +5 -3
  220. package/src/components/templates/TitleField.tsx +1 -1
  221. package/src/components/templates/UnsupportedField.tsx +1 -1
  222. package/src/components/templates/WrapIfAdditionalTemplate.tsx +14 -4
  223. package/src/components/templates/index.ts +4 -0
  224. package/src/components/widgets/AltDateWidget.tsx +9 -6
  225. package/src/components/widgets/CheckboxWidget.tsx +5 -5
  226. package/src/components/widgets/CheckboxesWidget.tsx +2 -2
  227. package/src/components/widgets/ColorWidget.tsx +1 -1
  228. package/src/components/widgets/DateTimeWidget.tsx +1 -1
  229. package/src/components/widgets/DateWidget.tsx +1 -1
  230. package/src/components/widgets/EmailWidget.tsx +1 -1
  231. package/src/components/widgets/FileWidget.tsx +5 -5
  232. package/src/components/widgets/PasswordWidget.tsx +1 -1
  233. package/src/components/widgets/RadioWidget.tsx +3 -3
  234. package/src/components/widgets/RangeWidget.tsx +1 -1
  235. package/src/components/widgets/RatingWidget.tsx +129 -0
  236. package/src/components/widgets/SelectWidget.tsx +4 -3
  237. package/src/components/widgets/TextWidget.tsx +1 -1
  238. package/src/components/widgets/TextareaWidget.tsx +3 -3
  239. package/src/components/widgets/TimeWidget.tsx +1 -1
  240. package/src/components/widgets/URLWidget.tsx +1 -1
  241. package/src/components/widgets/UpDownWidget.tsx +1 -1
  242. package/src/components/widgets/index.ts +3 -1
  243. package/src/getDefaultRegistry.ts +1 -1
  244. package/src/index.ts +3 -2
  245. package/src/tsconfig.json +14 -6
  246. package/src/withTheme.tsx +4 -3
  247. package/LICENSE.md +0 -201
  248. package/lib/components/Form.js.map +0 -1
  249. package/lib/components/fields/ArrayField.js.map +0 -1
  250. package/lib/components/fields/BooleanField.js.map +0 -1
  251. package/lib/components/fields/MultiSchemaField.js.map +0 -1
  252. package/lib/components/fields/NullField.js.map +0 -1
  253. package/lib/components/fields/NumberField.js.map +0 -1
  254. package/lib/components/fields/ObjectField.js.map +0 -1
  255. package/lib/components/fields/SchemaField.js.map +0 -1
  256. package/lib/components/fields/StringField.js.map +0 -1
  257. package/lib/components/fields/index.js.map +0 -1
  258. package/lib/components/templates/ArrayFieldDescriptionTemplate.js.map +0 -1
  259. package/lib/components/templates/ArrayFieldItemTemplate.js.map +0 -1
  260. package/lib/components/templates/ArrayFieldTemplate.js.map +0 -1
  261. package/lib/components/templates/ArrayFieldTitleTemplate.js.map +0 -1
  262. package/lib/components/templates/BaseInputTemplate.js.map +0 -1
  263. package/lib/components/templates/ButtonTemplates/AddButton.js.map +0 -1
  264. package/lib/components/templates/ButtonTemplates/IconButton.js.map +0 -1
  265. package/lib/components/templates/ButtonTemplates/SubmitButton.js.map +0 -1
  266. package/lib/components/templates/ButtonTemplates/index.js.map +0 -1
  267. package/lib/components/templates/DescriptionField.js.map +0 -1
  268. package/lib/components/templates/ErrorList.js.map +0 -1
  269. package/lib/components/templates/FieldErrorTemplate.js.map +0 -1
  270. package/lib/components/templates/FieldHelpTemplate.js.map +0 -1
  271. package/lib/components/templates/FieldTemplate/FieldTemplate.js.map +0 -1
  272. package/lib/components/templates/FieldTemplate/Label.js.map +0 -1
  273. package/lib/components/templates/FieldTemplate/index.js.map +0 -1
  274. package/lib/components/templates/ObjectFieldTemplate.js.map +0 -1
  275. package/lib/components/templates/TitleField.js.map +0 -1
  276. package/lib/components/templates/UnsupportedField.js.map +0 -1
  277. package/lib/components/templates/WrapIfAdditionalTemplate.js.map +0 -1
  278. package/lib/components/templates/index.js.map +0 -1
  279. package/lib/components/widgets/AltDateTimeWidget.js.map +0 -1
  280. package/lib/components/widgets/AltDateWidget.js.map +0 -1
  281. package/lib/components/widgets/CheckboxWidget.js.map +0 -1
  282. package/lib/components/widgets/CheckboxesWidget.js.map +0 -1
  283. package/lib/components/widgets/ColorWidget.js.map +0 -1
  284. package/lib/components/widgets/DateTimeWidget.js.map +0 -1
  285. package/lib/components/widgets/DateWidget.js.map +0 -1
  286. package/lib/components/widgets/EmailWidget.js.map +0 -1
  287. package/lib/components/widgets/FileWidget.js.map +0 -1
  288. package/lib/components/widgets/HiddenWidget.js.map +0 -1
  289. package/lib/components/widgets/PasswordWidget.js.map +0 -1
  290. package/lib/components/widgets/RadioWidget.js.map +0 -1
  291. package/lib/components/widgets/RangeWidget.js.map +0 -1
  292. package/lib/components/widgets/SelectWidget.js.map +0 -1
  293. package/lib/components/widgets/TextWidget.js.map +0 -1
  294. package/lib/components/widgets/TextareaWidget.js.map +0 -1
  295. package/lib/components/widgets/TimeWidget.js.map +0 -1
  296. package/lib/components/widgets/URLWidget.js.map +0 -1
  297. package/lib/components/widgets/UpDownWidget.js.map +0 -1
  298. package/lib/components/widgets/index.js.map +0 -1
  299. package/lib/getDefaultRegistry.js.map +0 -1
  300. package/lib/index.js.map +0 -1
  301. package/lib/withTheme.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getTemplate, getUiOptions, } 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
- * @param props - The `ArrayFieldTemplateItemType` props for the component
5
+ * @param props - The `ArrayFieldItemTemplateType` props for the component
6
6
  */
7
7
  export default function ArrayFieldTemplate(props) {
8
8
  const { canAdd, className, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title, } = props;
@@ -13,6 +13,5 @@ export default function ArrayFieldTemplate(props) {
13
13
  // Button templates are not overridden in the uiSchema
14
14
  const { ButtonTemplates: { AddButton }, } = registry.templates;
15
15
  return (_jsxs("fieldset", { className: className, id: idSchema.$id, children: [_jsx(ArrayFieldTitleTemplate, { idSchema: idSchema, title: uiOptions.title || title, required: required, schema: schema, uiSchema: uiSchema, registry: registry }), _jsx(ArrayFieldDescriptionTemplate, { idSchema: idSchema, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), _jsx("div", { className: 'row array-item-list', children: items &&
16
- items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key))) }), canAdd && (_jsx(AddButton, { className: 'array-item-add', onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
16
+ items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key))) }), canAdd && (_jsx(AddButton, { id: buttonId(idSchema, 'add'), className: 'rjsf-array-item-add', onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
17
17
  }
18
- //# sourceMappingURL=ArrayFieldTemplate.js.map
@@ -5,3 +5,4 @@ import { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } f
5
5
  * @param props - The `ArrayFieldTitleProps` for the component
6
6
  */
7
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;
8
+ //# sourceMappingURL=ArrayFieldTitleTemplate.d.ts.map
@@ -0,0 +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,kDAsBrC"}
@@ -15,4 +15,3 @@ export default function ArrayFieldTitleTemplate(props) {
15
15
  const TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, options);
16
16
  return (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry }));
17
17
  }
18
- //# sourceMappingURL=ArrayFieldTitleTemplate.js.map
@@ -6,3 +6,4 @@ import { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema }
6
6
  * @param props - The `WidgetProps` for this template
7
7
  */
8
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;
9
+ //# sourceMappingURL=BaseInputTemplate.d.ts.map
@@ -0,0 +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;AAErB;;;;;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,2CAmFvC"}
@@ -38,4 +38,3 @@ export default function BaseInputTemplate(props) {
38
38
  return _jsx("option", { value: example }, example);
39
39
  }) }, `datalist_${id}`))] }));
40
40
  }
41
- //# sourceMappingURL=BaseInputTemplate.js.map
@@ -2,3 +2,4 @@ import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '
2
2
  /** The `AddButton` renders a button that represent the `Add` action on a form
3
3
  */
4
4
  export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ className, onClick, disabled, registry, }: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=AddButton.d.ts.map
@@ -0,0 +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,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAiB1B"}
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TranslatableString } from '@rjsf/utils';
3
- import IconButton from './IconButton';
3
+ import IconButton from './IconButton.js';
4
4
  /** The `AddButton` renders a button that represent the `Add` action on a form
5
5
  */
6
6
  export default function AddButton({ className, onClick, disabled, registry, }) {
7
7
  const { translateString } = registry;
8
8
  return (_jsx("div", { className: 'row', children: _jsx("p", { className: `col-xs-3 col-xs-offset-9 text-right ${className}`, children: _jsx(IconButton, { iconType: 'info', icon: 'plus', className: 'btn-add col-xs-12', title: translateString(TranslatableString.AddButton), onClick: onClick, disabled: disabled, registry: registry }) }) }));
9
9
  }
10
- //# sourceMappingURL=AddButton.js.map
@@ -4,3 +4,4 @@ export declare function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSch
4
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
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
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
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +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"}
@@ -6,18 +6,17 @@ export default function IconButton(props) {
6
6
  }
7
7
  export function CopyButton(props) {
8
8
  const { registry: { translateString }, } = props;
9
- return (_jsx(IconButton, { title: translateString(TranslatableString.CopyButton), className: 'array-item-copy', ...props, icon: 'copy' }));
9
+ return _jsx(IconButton, { title: translateString(TranslatableString.CopyButton), ...props, icon: 'copy' });
10
10
  }
11
11
  export function MoveDownButton(props) {
12
12
  const { registry: { translateString }, } = props;
13
- return (_jsx(IconButton, { title: translateString(TranslatableString.MoveDownButton), className: 'array-item-move-down', ...props, icon: 'arrow-down' }));
13
+ return _jsx(IconButton, { title: translateString(TranslatableString.MoveDownButton), ...props, icon: 'arrow-down' });
14
14
  }
15
15
  export function MoveUpButton(props) {
16
16
  const { registry: { translateString }, } = props;
17
- return (_jsx(IconButton, { title: translateString(TranslatableString.MoveUpButton), className: 'array-item-move-up', ...props, icon: 'arrow-up' }));
17
+ return _jsx(IconButton, { title: translateString(TranslatableString.MoveUpButton), ...props, icon: 'arrow-up' });
18
18
  }
19
19
  export function RemoveButton(props) {
20
20
  const { registry: { translateString }, } = props;
21
- return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), className: 'array-item-remove', ...props, iconType: 'danger', icon: 'remove' }));
21
+ return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), ...props, iconType: 'danger', icon: 'remove' }));
22
22
  }
23
- //# sourceMappingURL=IconButton.js.map
@@ -2,3 +2,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from
2
2
  /** The `SubmitButton` renders a button that represent the `Submit` action on a form
3
3
  */
4
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;
5
+ //# sourceMappingURL=SubmitButton.d.ts.map
@@ -0,0 +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"}
@@ -9,4 +9,3 @@ export default function SubmitButton({ uiSchema }) {
9
9
  }
10
10
  return (_jsx("div", { children: _jsx("button", { type: 'submit', ...submitButtonProps, className: `btn btn-info ${submitButtonProps.className || ''}`, children: submitText }) }));
11
11
  }
12
- //# sourceMappingURL=SubmitButton.js.map
@@ -1,3 +1,4 @@
1
1
  import { 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
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,CAS7C;AAED,eAAe,eAAe,CAAC"}
@@ -1,6 +1,6 @@
1
- import SubmitButton from './SubmitButton';
2
- import AddButton from './AddButton';
3
- import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton';
1
+ import SubmitButton from './SubmitButton.js';
2
+ import AddButton from './AddButton.js';
3
+ import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton.js';
4
4
  function buttonTemplates() {
5
5
  return {
6
6
  SubmitButton,
@@ -12,4 +12,3 @@ function buttonTemplates() {
12
12
  };
13
13
  }
14
14
  export default buttonTemplates;
15
- //# sourceMappingURL=index.js.map
@@ -4,3 +4,4 @@ import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema }
4
4
  * @param props - The `DescriptionFieldProps` for this component
5
5
  */
6
6
  export default function DescriptionField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: DescriptionFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
7
+ //# sourceMappingURL=DescriptionField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionField.d.ts","sourceRoot":"","sources":["../../../src/components/templates/DescriptionField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAInG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAUtC"}
@@ -1,18 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import RichDescription from '../RichDescription.js';
2
3
  /** The `DescriptionField` is the template to use to render the description of a field
3
4
  *
4
5
  * @param props - The `DescriptionFieldProps` for this component
5
6
  */
6
7
  export default function DescriptionField(props) {
7
- const { id, description } = props;
8
+ const { id, description, registry, uiSchema } = props;
8
9
  if (!description) {
9
10
  return null;
10
11
  }
11
- if (typeof description === 'string') {
12
- return (_jsx("p", { id: id, className: 'field-description', children: description }));
13
- }
14
- else {
15
- return (_jsx("div", { id: id, className: 'field-description', children: description }));
16
- }
12
+ return (_jsx("div", { id: id, className: 'field-description', children: _jsx(RichDescription, { description: description, registry: registry, uiSchema: uiSchema }) }));
17
13
  }
18
- //# sourceMappingURL=DescriptionField.js.map
@@ -4,3 +4,4 @@ import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@
4
4
  * @param props - The `ErrorListProps` for this component
5
5
  */
6
6
  export default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ errors, registry, }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=ErrorList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorList.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ErrorList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EAEf,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACnH,MAAM,EACN,QAAQ,GACT,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAkBzB"}
@@ -10,4 +10,3 @@ export default function ErrorList({ errors, registry, }) {
10
10
  return (_jsx("li", { className: 'list-group-item text-danger', children: error.stack }, i));
11
11
  }) })] }));
12
12
  }
13
- //# sourceMappingURL=ErrorList.js.map
@@ -4,3 +4,4 @@ import { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '
4
4
  * @param props - The `FieldErrorProps` for the errors being rendered
5
5
  */
6
6
  export default function FieldErrorTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
7
+ //# sourceMappingURL=FieldErrorTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldErrorTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/FieldErrorTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEtG;;;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,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAsBhC"}
@@ -16,4 +16,3 @@ export default function FieldErrorTemplate(props) {
16
16
  return (_jsx("li", { className: 'text-danger', children: error }, index));
17
17
  }) }) }));
18
18
  }
19
- //# sourceMappingURL=FieldErrorTemplate.js.map
@@ -4,3 +4,4 @@ import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@
4
4
  * @param props - The `FieldHelpProps` to be rendered
5
5
  */
6
6
  export default function FieldHelpTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldHelpProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
7
+ //# sourceMappingURL=FieldHelpTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldHelpTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/FieldHelpTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpG;;;GAGG;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,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAkB/B"}
@@ -15,4 +15,3 @@ export default function FieldHelpTemplate(props) {
15
15
  }
16
16
  return (_jsx("div", { id: id, className: 'help-block', children: help }));
17
17
  }
18
- //# sourceMappingURL=FieldHelpTemplate.js.map
@@ -5,3 +5,4 @@ import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } fro
5
5
  * @param props - The `FieldTemplateProps` for this component
6
6
  */
7
7
  export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=FieldTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AAIrB;;;;GAIG;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,2CAoBnC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getTemplate, getUiOptions, } from '@rjsf/utils';
3
- import Label from './Label';
3
+ import Label from './Label.js';
4
4
  /** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
5
5
  * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.
6
6
  *
@@ -15,4 +15,3 @@ export default function FieldTemplate(props) {
15
15
  }
16
16
  return (_jsxs(WrapIfAdditionalTemplate, { ...props, children: [displayLabel && _jsx(Label, { label: label, required: required, id: id }), displayLabel && description ? description : null, children, errors, help] }));
17
17
  }
18
- //# sourceMappingURL=FieldTemplate.js.map
@@ -11,3 +11,4 @@ export type LabelProps = {
11
11
  * @param props - The `LabelProps` for this component
12
12
  */
13
13
  export default function Label(props: LabelProps): import("react/jsx-runtime").JSX.Element | null;
14
+ //# sourceMappingURL=Label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/FieldTemplate/Label.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,kDAW9C"}
@@ -11,4 +11,3 @@ export default function Label(props) {
11
11
  }
12
12
  return (_jsxs("label", { className: 'control-label', htmlFor: id, children: [label, required && _jsx("span", { className: 'required', children: REQUIRED_FIELD_SYMBOL })] }));
13
13
  }
14
- //# sourceMappingURL=Label.js.map
@@ -1,2 +1,3 @@
1
- import FieldTemplate from './FieldTemplate';
1
+ import FieldTemplate from './FieldTemplate.js';
2
2
  export default FieldTemplate;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/FieldTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,eAAe,aAAa,CAAC"}
@@ -1,3 +1,2 @@
1
- import FieldTemplate from './FieldTemplate';
1
+ import FieldTemplate from './FieldTemplate.js';
2
2
  export default FieldTemplate;
3
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,8 @@
1
+ import { GridTemplateProps } from '@rjsf/utils';
2
+ /** Renders a `GridTemplate` for bootstrap 3, which is expecting the column information coming in via the `className`
3
+ * prop. Also spreads all the other props provided by the user directly on the div.
4
+ *
5
+ * @param props - The GridTemplateProps, including the expected className for the bootstrap 3 grid behavior
6
+ */
7
+ export default function GridTemplate(props: GridTemplateProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=GridTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/GridTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAO5D"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /** Renders a `GridTemplate` for bootstrap 3, which is expecting the column information coming in via the `className`
3
+ * prop. Also spreads all the other props provided by the user directly on the div.
4
+ *
5
+ * @param props - The GridTemplateProps, including the expected className for the bootstrap 3 grid behavior
6
+ */
7
+ export default function GridTemplate(props) {
8
+ const { children, column, className, ...rest } = props;
9
+ return (_jsx("div", { className: className, ...rest, children: children }));
10
+ }
@@ -6,3 +6,4 @@ import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema
6
6
  * @param props - The `ObjectFieldTemplateProps` for this component
7
7
  */
8
8
  export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=ObjectFieldTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectFieldTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/ObjectFieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAOjB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA4DzC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { canExpand, descriptionId, getTemplate, getUiOptions, titleId, } from '@rjsf/utils';
2
+ import { canExpand, descriptionId, getTemplate, getUiOptions, titleId, buttonId, } from '@rjsf/utils';
3
3
  /** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
4
4
  * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
5
5
  * the properties.
@@ -13,6 +13,5 @@ export default function ObjectFieldTemplate(props) {
13
13
  const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options);
14
14
  // Button templates are not overridden in the uiSchema
15
15
  const { ButtonTemplates: { AddButton }, } = registry.templates;
16
- return (_jsxs("fieldset", { id: idSchema.$id, children: [title && (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), properties.map((prop) => prop.content), canExpand(schema, uiSchema, formData) && (_jsx(AddButton, { className: 'object-property-expand', onClick: onAddClick(schema), disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
16
+ return (_jsxs("fieldset", { id: idSchema.$id, children: [title && (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), properties.map((prop) => prop.content), canExpand(schema, uiSchema, formData) && (_jsx(AddButton, { id: buttonId(idSchema, 'add'), className: 'rjsf-object-property-expand', onClick: onAddClick(schema), disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }))] }));
17
17
  }
18
- //# sourceMappingURL=ObjectFieldTemplate.js.map
@@ -4,3 +4,4 @@ import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '
4
4
  * @param props - The `TitleFieldProps` for this component
5
5
  */
6
6
  export default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: TitleFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=TitleField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleField.d.ts","sourceRoot":"","sources":["../../../src/components/templates/TitleField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI7F;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAClH,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAShC"}
@@ -8,4 +8,3 @@ export default function TitleField(props) {
8
8
  const { id, title, required } = props;
9
9
  return (_jsxs("legend", { id: id, children: [title, required && _jsx("span", { className: 'required', children: REQUIRED_FIELD_SYMBOL })] }));
10
10
  }
11
- //# sourceMappingURL=TitleField.js.map
@@ -6,3 +6,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, UnsupportedFieldProps }
6
6
  */
7
7
  declare function UnsupportedField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: UnsupportedFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
8
  export default UnsupportedField;
9
+ //# sourceMappingURL=UnsupportedField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsupportedField.d.ts","sourceRoot":"","sources":["../../../src/components/templates/UnsupportedField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAsB,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGvH;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACzG,KAAK,EAAE,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAyBtC;AAED,eAAe,gBAAgB,CAAC"}
@@ -25,4 +25,3 @@ function UnsupportedField(props) {
25
25
  return (_jsxs("div", { className: 'unsupported-field', children: [_jsx("p", { children: _jsx(Markdown, { options: { disableParsingRawHTML: true }, children: translateString(translateEnum, translateParams) }) }), schema && _jsx("pre", { children: JSON.stringify(schema, null, 2) })] }));
26
26
  }
27
27
  export default UnsupportedField;
28
- //# sourceMappingURL=UnsupportedField.js.map
@@ -5,3 +5,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WrapIfAdditionalTemplate
5
5
  * @param props - The `WrapIfAdditionalProps` for this component
6
6
  */
7
7
  export default function WrapIfAdditionalTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: WrapIfAdditionalTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=WrapIfAdditionalTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WrapIfAdditionalTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/WrapIfAdditionalTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,UAAU,EACV,gBAAgB,EAEhB,6BAA6B,EAC9B,MAAM,aAAa,CAAC;AAIrB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAoE9C"}
@@ -1,21 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ADDITIONAL_PROPERTY_FLAG, TranslatableString, } from '@rjsf/utils';
3
- import Label from './FieldTemplate/Label';
2
+ import { ADDITIONAL_PROPERTY_FLAG, buttonId, TranslatableString, } from '@rjsf/utils';
3
+ import Label from './FieldTemplate/Label.js';
4
4
  /** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are
5
5
  * part of an `additionalProperties` part of a schema.
6
6
  *
7
7
  * @param props - The `WrapIfAdditionalProps` for this component
8
8
  */
9
9
  export default function WrapIfAdditionalTemplate(props) {
10
- const { id, classNames, style, disabled, label, onKeyChange, onDropPropertyClick, readonly, required, schema, children, uiSchema, registry, } = props;
10
+ const { id, classNames, style, disabled, label, onKeyChange, onDropPropertyClick, readonly, required, schema, hideError, rawErrors, children, uiSchema, registry, } = props;
11
11
  const { templates, translateString } = registry;
12
12
  // Button templates are not overridden in the uiSchema
13
13
  const { RemoveButton } = templates.ButtonTemplates;
14
14
  const keyLabel = translateString(TranslatableString.KeyLabel, [label]);
15
15
  const additional = ADDITIONAL_PROPERTY_FLAG in schema;
16
+ const classNamesList = ['form-group', classNames];
17
+ if (!hideError && rawErrors && rawErrors.length > 0) {
18
+ classNamesList.push('has-error has-danger');
19
+ }
20
+ const uiClassNames = classNamesList.join(' ').trim();
16
21
  if (!additional) {
17
- return (_jsx("div", { className: classNames, style: style, children: children }));
22
+ return (_jsx("div", { className: uiClassNames, style: style, children: children }));
18
23
  }
19
- return (_jsx("div", { className: classNames, style: style, children: _jsxs("div", { className: 'row', children: [_jsx("div", { className: 'col-xs-5 form-additional', children: _jsxs("div", { className: 'form-group', children: [_jsx(Label, { label: keyLabel, required: required, id: `${id}-key` }), _jsx("input", { className: 'form-control', type: 'text', id: `${id}-key`, onBlur: ({ target }) => onKeyChange(target && target.value), defaultValue: label })] }) }), _jsx("div", { className: 'form-additional form-group col-xs-5', children: children }), _jsx("div", { className: 'col-xs-2', children: _jsx(RemoveButton, { className: 'array-item-remove btn-block', style: { border: '0' }, disabled: disabled || readonly, onClick: onDropPropertyClick(label), uiSchema: uiSchema, registry: registry }) })] }) }));
24
+ return (_jsx("div", { className: uiClassNames, style: style, children: _jsxs("div", { className: 'row', children: [_jsx("div", { className: 'col-xs-5 form-additional', children: _jsxs("div", { className: 'form-group', children: [_jsx(Label, { label: keyLabel, required: required, id: `${id}-key` }), _jsx("input", { className: 'form-control', type: 'text', id: `${id}-key`, onBlur: ({ target }) => onKeyChange(target && target.value), defaultValue: label })] }) }), _jsx("div", { className: 'form-additional form-group col-xs-5', children: children }), _jsx("div", { className: 'col-xs-2', children: _jsx(RemoveButton, { id: buttonId(id, 'remove'), className: 'rjsf-object-property-remove btn-block', style: { border: '0' }, disabled: disabled || readonly, onClick: onDropPropertyClick(label), uiSchema: uiSchema, registry: registry }) })] }) }));
20
25
  }
21
- //# sourceMappingURL=WrapIfAdditionalTemplate.js.map
@@ -1,3 +1,4 @@
1
1
  import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
2
2
  declare function templates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<T, S, F>;
3
3
  export default templates;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAoB3F,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,KAAK,aAAa,CACpH,CAAC,EACD,CAAC,EACD,CAAC,CACF,CAoBA;AAED,eAAe,SAAS,CAAC"}
@@ -1,22 +1,25 @@
1
- import ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate';
2
- import ArrayFieldItemTemplate from './ArrayFieldItemTemplate';
3
- import ArrayFieldTemplate from './ArrayFieldTemplate';
4
- import ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate';
5
- import BaseInputTemplate from './BaseInputTemplate';
6
- import ButtonTemplates from './ButtonTemplates';
7
- import DescriptionField from './DescriptionField';
8
- import ErrorList from './ErrorList';
9
- import FieldTemplate from './FieldTemplate';
10
- import FieldErrorTemplate from './FieldErrorTemplate';
11
- import FieldHelpTemplate from './FieldHelpTemplate';
12
- import ObjectFieldTemplate from './ObjectFieldTemplate';
13
- import TitleField from './TitleField';
14
- import UnsupportedField from './UnsupportedField';
15
- import WrapIfAdditionalTemplate from './WrapIfAdditionalTemplate';
1
+ import ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate.js';
2
+ import ArrayFieldItemTemplate from './ArrayFieldItemTemplate.js';
3
+ import ArrayFieldItemButtonsTemplate from './ArrayFieldItemButtonsTemplate.js';
4
+ import ArrayFieldTemplate from './ArrayFieldTemplate.js';
5
+ import ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate.js';
6
+ import BaseInputTemplate from './BaseInputTemplate.js';
7
+ import ButtonTemplates from './ButtonTemplates/index.js';
8
+ import DescriptionField from './DescriptionField.js';
9
+ import ErrorList from './ErrorList.js';
10
+ import FieldTemplate from './FieldTemplate/index.js';
11
+ import FieldErrorTemplate from './FieldErrorTemplate.js';
12
+ import FieldHelpTemplate from './FieldHelpTemplate.js';
13
+ import GridTemplate from './GridTemplate.js';
14
+ import ObjectFieldTemplate from './ObjectFieldTemplate.js';
15
+ import TitleField from './TitleField.js';
16
+ import UnsupportedField from './UnsupportedField.js';
17
+ import WrapIfAdditionalTemplate from './WrapIfAdditionalTemplate.js';
16
18
  function templates() {
17
19
  return {
18
20
  ArrayFieldDescriptionTemplate,
19
21
  ArrayFieldItemTemplate,
22
+ ArrayFieldItemButtonsTemplate,
20
23
  ArrayFieldTemplate,
21
24
  ArrayFieldTitleTemplate,
22
25
  ButtonTemplates: ButtonTemplates(),
@@ -26,6 +29,7 @@ function templates() {
26
29
  FieldTemplate,
27
30
  FieldErrorTemplate,
28
31
  FieldHelpTemplate,
32
+ GridTemplate,
29
33
  ObjectFieldTemplate,
30
34
  TitleFieldTemplate: TitleField,
31
35
  UnsupportedFieldTemplate: UnsupportedField,
@@ -33,4 +37,3 @@ function templates() {
33
37
  };
34
38
  }
35
39
  export default templates;
36
- //# sourceMappingURL=index.js.map
@@ -6,3 +6,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjs
6
6
  */
7
7
  declare function AltDateTimeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ time, ...props }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
8
  export default AltDateTimeWidget;
9
+ //# sourceMappingURL=AltDateTimeWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AltDateTimeWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/AltDateTimeWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzF;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EAC5G,IAAW,EACX,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAGtB;AAED,eAAe,iBAAiB,CAAC"}
@@ -9,4 +9,3 @@ function AltDateTimeWidget({ time = true, ...props }) {
9
9
  return _jsx(AltDateWidget, { time: time, ...props });
10
10
  }
11
11
  export default AltDateTimeWidget;
12
- //# sourceMappingURL=AltDateTimeWidget.js.map
@@ -4,3 +4,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjs
4
4
  */
5
5
  declare function AltDateWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ time, disabled, readonly, autofocus, options, id, name, registry, onBlur, onFocus, onChange, value, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
6
6
  export default AltDateWidget;
7
+ //# sourceMappingURL=AltDateWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AltDateWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/AltDateWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,eAAe,EACf,UAAU,EACV,gBAAgB,EAEhB,WAAW,EAEZ,MAAM,aAAa,CAAC;AAsDrB;;GAEG;AACH,iBAAS,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACxG,IAAY,EACZ,QAAgB,EAChB,QAAgB,EAChB,SAAiB,EACjB,OAAO,EACP,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAwFtB;AAED,eAAe,aAAa,CAAC"}
@@ -51,4 +51,3 @@ function AltDateWidget({ time = false, disabled = false, readonly = false, autof
51
51
  return (_jsxs("ul", { className: 'list-inline', children: [getDateElementProps(state, time, options.yearsRange, options.format).map((elemProps, i) => (_jsx("li", { className: 'list-inline-item', children: _jsx(DateElement, { rootId: id, name: name, select: handleChange, ...elemProps, disabled: disabled, readonly: readonly, registry: registry, onBlur: onBlur, onFocus: onFocus, autofocus: autofocus && i === 0 }) }, i))), (options.hideNowButton !== 'undefined' ? !options.hideNowButton : true) && (_jsx("li", { className: 'list-inline-item', children: _jsx("a", { href: '#', className: 'btn btn-info btn-now', onClick: handleSetNow, children: translateString(TranslatableString.NowLabel) }) })), (options.hideClearButton !== 'undefined' ? !options.hideClearButton : true) && (_jsx("li", { className: 'list-inline-item', children: _jsx("a", { href: '#', className: 'btn btn-warning btn-clear', onClick: handleClear, children: translateString(TranslatableString.ClearLabel) }) }))] }));
52
52
  }
53
53
  export default AltDateWidget;
54
- //# sourceMappingURL=AltDateWidget.js.map
@@ -6,3 +6,4 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjs
6
6
  */
7
7
  declare function CheckboxWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ schema, uiSchema, options, id, value, disabled, readonly, label, hideLabel, autofocus, onBlur, onFocus, onChange, registry, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
8
  export default CheckboxWidget;
9
+ //# sourceMappingURL=CheckboxWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/CheckboxWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,iBAAS,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EACzG,MAAM,EACN,QAAQ,EACR,OAAO,EACP,EAAE,EACF,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAwDtB;AAED,eAAe,cAAc,CAAC"}
@@ -7,7 +7,6 @@ import { ariaDescribedByIds, descriptionId, getTemplate, labelValue, schemaRequi
7
7
  * @param props - The `WidgetProps` for this component
8
8
  */
9
9
  function CheckboxWidget({ schema, uiSchema, options, id, value, disabled, readonly, label, hideLabel, autofocus = false, onBlur, onFocus, onChange, registry, }) {
10
- var _a;
11
10
  const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options);
12
11
  // Because an unchecked checkbox will cause html5 validation to fail, only add
13
12
  // the "required" attribute if the field value must be "true", due to the
@@ -16,8 +15,7 @@ function CheckboxWidget({ schema, uiSchema, options, id, value, disabled, readon
16
15
  const handleChange = useCallback((event) => onChange(event.target.checked), [onChange]);
17
16
  const handleBlur = useCallback((event) => onBlur(id, event.target.checked), [onBlur, id]);
18
17
  const handleFocus = useCallback((event) => onFocus(id, event.target.checked), [onFocus, id]);
19
- const description = (_a = options.description) !== null && _a !== void 0 ? _a : schema.description;
20
- return (_jsxs("div", { className: `checkbox ${disabled || readonly ? 'disabled' : ''}`, children: [!hideLabel && !!description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs("label", { children: [_jsx("input", { type: 'checkbox', id: id, name: id, checked: typeof value === 'undefined' ? false : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id) }), labelValue(_jsx("span", { children: label }), hideLabel)] })] }));
18
+ const description = options.description ?? schema.description;
19
+ return (_jsxs("div", { className: `checkbox ${disabled || readonly ? 'disabled' : ''}`, children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs("label", { children: [_jsx("input", { type: 'checkbox', id: id, name: id, checked: typeof value === 'undefined' ? false : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id) }), labelValue(_jsx("span", { children: label }), hideLabel)] })] }));
21
20
  }
22
21
  export default CheckboxWidget;
23
- //# sourceMappingURL=CheckboxWidget.js.map
@@ -6,3 +6,4 @@ import { FormContextType, WidgetProps, RJSFSchema, StrictRJSFSchema } from '@rjs
6
6
  */
7
7
  declare function CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, disabled, options: { inline, enumOptions, enumDisabled, emptyValue }, value, autofocus, readonly, onChange, onBlur, onFocus, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
8
  export default CheckboxesWidget;
9
+ //# sourceMappingURL=CheckboxesWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxesWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/CheckboxesWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,eAAe,EACf,WAAW,EACX,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAAE,EAC3G,EAAE,EACF,QAAQ,EACR,OAAO,EAAE,EAAE,MAAc,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,EAClE,KAAK,EACL,SAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA4DtB;AAED,eAAe,gBAAgB,CAAC"}