dynamic-mui 2.5.3 → 2.6.1

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 (252) hide show
  1. package/dist/accordion-BSh2h2a_.js +1 -0
  2. package/dist/accordion-Cqu-4mCj.mjs +22 -0
  3. package/dist/addressfield-BYisUY6y.mjs +242 -0
  4. package/dist/addressfield-CRd4lfdV.js +1 -0
  5. package/dist/ai/index.cjs +1 -1
  6. package/dist/ai/index.mjs +1 -14
  7. package/dist/ai/react/AIForm.d.ts +2 -1
  8. package/dist/ai/react/AIFormGenerator.d.ts +1 -1
  9. package/dist/ai/react/AISchemaReview.d.ts +1 -1
  10. package/dist/ai/react/AITextAssist.d.ts +1 -1
  11. package/dist/ai/react/AIVisionImport.d.ts +2 -1
  12. package/dist/ai-CXI0Rnu8.js +29 -0
  13. package/dist/ai-D6hkfd_f.mjs +4533 -0
  14. package/dist/asyncautocomplete-B1fK0nUW.js +1 -0
  15. package/dist/asyncautocomplete-D4oCW2B0.mjs +72 -0
  16. package/dist/bar-CgYZxXHl.js +1 -0
  17. package/dist/bar-LVtZP6Ui.mjs +4 -0
  18. package/dist/cascadeselect-CYzYzmqv.js +1 -0
  19. package/dist/cascadeselect-s-LY4P0l.mjs +66 -0
  20. package/dist/chartControl-IQafKpDk.mjs +29 -0
  21. package/dist/chartControl-ifHiG3nr.js +1 -0
  22. package/dist/collection-Ccj0OayP.js +1 -0
  23. package/dist/collection-DGq2rxDx.mjs +1692 -0
  24. package/dist/colorpicker-TDpxW59g.mjs +110 -0
  25. package/dist/colorpicker-q2FYP06A.js +1 -0
  26. package/dist/components/DynamicComponent.d.ts +2 -1
  27. package/dist/components/FormGenerator.d.ts +1 -1
  28. package/dist/components/charts/Bar/bar.d.ts +6 -2
  29. package/dist/components/charts/Line/line.d.ts +6 -2
  30. package/dist/components/charts/Mixchart/mixChart.d.ts +2 -1
  31. package/dist/components/charts/Pie/pie.d.ts +6 -2
  32. package/dist/components/charts/chartControl.d.ts +15 -0
  33. package/dist/components/controls/Accordion/accordion.d.ts +2 -1
  34. package/dist/components/controls/AddressField/addressfield.d.ts +2 -1
  35. package/dist/components/controls/Alert/alert.d.ts +1 -1
  36. package/dist/components/controls/AsyncAutocomplete/asyncautocomplete.d.ts +1 -1
  37. package/dist/components/controls/Autocomplete/autocomplete.d.ts +1 -1
  38. package/dist/components/controls/Button/button.d.ts +1 -1
  39. package/dist/components/controls/CascadeSelect/cascadeselect.d.ts +2 -1
  40. package/dist/components/controls/CheckBox/checkbox.d.ts +2 -2
  41. package/dist/components/controls/CheckBox/toggleInput.d.ts +25 -0
  42. package/dist/components/controls/Chip/chip.d.ts +1 -1
  43. package/dist/components/controls/ChipSelect/chipselect.d.ts +2 -1
  44. package/dist/components/controls/Collection/CollectionList.d.ts +1 -1
  45. package/dist/components/controls/Collection/ItemDialog.d.ts +1 -1
  46. package/dist/components/controls/Collection/collection.d.ts +1 -1
  47. package/dist/components/controls/Collection/parts.d.ts +6 -6
  48. package/dist/components/controls/ColorPicker/colorpicker.d.ts +2 -1
  49. package/dist/components/controls/Computed/computed.d.ts +1 -1
  50. package/dist/components/controls/ConsentField/consentfield.d.ts +2 -1
  51. package/dist/components/controls/CurrencyField/currencyfield.d.ts +1 -1
  52. package/dist/components/controls/DataTable/datatable.d.ts +2 -1
  53. package/dist/components/controls/DateRangePicker/daterangepicker.d.ts +1 -1
  54. package/dist/components/controls/DateTime/datetime.d.ts +15 -1
  55. package/dist/components/controls/DateTimePicker/datetimepicker.d.ts +6 -2
  56. package/dist/components/controls/Divider/divider.d.ts +1 -1
  57. package/dist/components/controls/EditableTable/editabletable.d.ts +1 -1
  58. package/dist/components/controls/FileUpload/fileupload.d.ts +1 -1
  59. package/dist/components/controls/FormRepeater/formrepeater.d.ts +1 -1
  60. package/dist/components/controls/FormWizard/formwizard.d.ts +1 -1
  61. package/dist/components/controls/GeoField/geofield.d.ts +1 -1
  62. package/dist/components/controls/Group/group.d.ts +2 -1
  63. package/dist/components/controls/Hyperlink/hyperlink.d.ts +1 -1
  64. package/dist/components/controls/ImageList/imagelist.d.ts +1 -1
  65. package/dist/components/controls/IntlPhone/intlphone.d.ts +2 -1
  66. package/dist/components/controls/KeyValueField/keyvaluefield.d.ts +2 -1
  67. package/dist/components/controls/LineItemList/lineitemlist.d.ts +1 -1
  68. package/dist/components/controls/List/list.d.ts +1 -1
  69. package/dist/components/controls/LocationField/locationfield.d.ts +1 -1
  70. package/dist/components/controls/MarkdownEditor/markdowneditor.d.ts +2 -1
  71. package/dist/components/controls/MatrixField/matrixfield.d.ts +2 -1
  72. package/dist/components/controls/MultiTextbox/multitextbox.d.ts +1 -1
  73. package/dist/components/controls/NpsScale/npsscale.d.ts +2 -1
  74. package/dist/components/controls/NumberField/numberfield.d.ts +2 -1
  75. package/dist/components/controls/NumberStepper/numberstepper.d.ts +1 -1
  76. package/dist/components/controls/OtpField/otpfield.d.ts +2 -1
  77. package/dist/components/controls/PasswordField/passwordfield.d.ts +2 -1
  78. package/dist/components/controls/PhoneField/phonefield.d.ts +1 -1
  79. package/dist/components/controls/Radio/radio.d.ts +2 -1
  80. package/dist/components/controls/Rating/rating.d.ts +2 -1
  81. package/dist/components/controls/RichTextEditor/richtexteditor.d.ts +2 -1
  82. package/dist/components/controls/Select/select.d.ts +2 -1
  83. package/dist/components/controls/Signature/signature.d.ts +1 -1
  84. package/dist/components/controls/Slider/slider.d.ts +1 -1
  85. package/dist/components/controls/Stepper/stepper.d.ts +1 -1
  86. package/dist/components/controls/SummaryField/summaryfield.d.ts +2 -1
  87. package/dist/components/controls/Switch/switch.d.ts +1 -1
  88. package/dist/components/controls/Tabs/tabs.d.ts +2 -1
  89. package/dist/components/controls/TagsInput/tagsinput.d.ts +1 -1
  90. package/dist/components/controls/TextField/textfield.d.ts +1 -1
  91. package/dist/components/controls/TextField/useTextInput.d.ts +18 -0
  92. package/dist/components/controls/TimePicker/timepicker.d.ts +6 -2
  93. package/dist/components/controls/ToggleButtons/togglebuttons.d.ts +1 -1
  94. package/dist/components/controls/Typography/typography.d.ts +1 -1
  95. package/dist/components/controls/index.d.ts +24 -9
  96. package/dist/consentfield-C0qlg4CV.js +1 -0
  97. package/dist/consentfield-D3eHFCZf.mjs +68 -0
  98. package/dist/datatable-CMjaTDPM.js +1 -0
  99. package/dist/datatable-lZIwHx6a.mjs +29 -0
  100. package/dist/dynamic-mui.cjs +1 -1
  101. package/dist/dynamic-mui.d.ts +1 -1
  102. package/dist/dynamic-mui.mjs +264 -204
  103. package/dist/editabletable-B3Cl38Qm.js +1 -0
  104. package/dist/editabletable-BEnZM9qt.mjs +117 -0
  105. package/dist/fileupload-BLH0wrc2.mjs +191 -0
  106. package/dist/fileupload-D0TsC9DF.js +1 -0
  107. package/dist/formrepeater-BEFYw5ly.js +1 -0
  108. package/dist/formrepeater-BvW1lZ2k.mjs +82 -0
  109. package/dist/formwizard-BWdnCsJz.js +1 -0
  110. package/dist/formwizard-I6M99opg.mjs +82 -0
  111. package/dist/geofield-CcbP9EtG.mjs +116 -0
  112. package/dist/geofield-HXXeV9Bm.js +1 -0
  113. package/dist/group-BCGjUNL2.mjs +30 -0
  114. package/dist/group-saCPFLuL.js +1 -0
  115. package/dist/imagelist-CNe1Dp_M.mjs +23 -0
  116. package/dist/imagelist-Wm5Qa6wA.js +1 -0
  117. package/dist/index.d.ts +1 -0
  118. package/dist/intlphone-Bj5nEUMa.mjs +341 -0
  119. package/dist/intlphone-D1V7m6MV.js +1 -0
  120. package/dist/keyvaluefield-ArJ4QM5z.js +1 -0
  121. package/dist/keyvaluefield-C-a0MGDM.mjs +128 -0
  122. package/dist/line-BGSi1tvf.js +1 -0
  123. package/dist/line-cK6taoCA.mjs +4 -0
  124. package/dist/lineitemlist-bmk7fEf9.mjs +169 -0
  125. package/dist/lineitemlist-mulPt3cO.js +1 -0
  126. package/dist/list-5wGZK7wa.js +1 -0
  127. package/dist/list-CIFEhaTq.mjs +20 -0
  128. package/dist/locationfield-DtWkxnX-.js +1 -0
  129. package/dist/locationfield-SPonkbMU.mjs +90 -0
  130. package/dist/markdowneditor-C0KQgAWY.js +2 -0
  131. package/dist/markdowneditor-C3l0_zuX.mjs +82 -0
  132. package/dist/matrixfield-BZ_3KcSk.js +1 -0
  133. package/dist/matrixfield-DQHet7LH.mjs +119 -0
  134. package/dist/mixChart-CSq7pQqJ.mjs +49 -0
  135. package/dist/mixChart-DoehYa8V.js +1 -0
  136. package/dist/muiX-BHOKpogF.mjs +12 -0
  137. package/dist/muiX-CG_D1XQ2.js +1 -0
  138. package/dist/multitextbox-Bsr8mHo5.mjs +96 -0
  139. package/dist/multitextbox-CkhPGI9i.js +1 -0
  140. package/dist/npsscale-BgU-fVZ4.mjs +111 -0
  141. package/dist/npsscale-CFtQ5Dkk.js +1 -0
  142. package/dist/numberstepper-B4ZS7GY_.js +1 -0
  143. package/dist/numberstepper-c0raw-fV.mjs +111 -0
  144. package/dist/pie-CueMspFX.js +1 -0
  145. package/dist/pie-DFO89j-z.mjs +4 -0
  146. package/dist/richtexteditor-B8NFysnM.js +1 -0
  147. package/dist/richtexteditor-aF2uky8O.mjs +178 -0
  148. package/dist/rolldown-runtime-5iZMYShA.js +1 -0
  149. package/dist/s3Upload-C3-wcrua.js +1 -0
  150. package/dist/s3Upload-HtE088XA.mjs +39 -0
  151. package/dist/signature-DjYfiNzq.js +3 -0
  152. package/dist/signature-HiL8FJ6C.mjs +1116 -0
  153. package/dist/stepper-BQB-Zpl2.js +1 -0
  154. package/dist/stepper-C8VaX9xu.mjs +166 -0
  155. package/dist/summaryfield-BN-NhzA6.mjs +65 -0
  156. package/dist/summaryfield-BqpfzvHe.js +1 -0
  157. package/dist/tabs-BBBpbfqk.js +1 -0
  158. package/dist/tabs-DvIbQ1qg.mjs +50 -0
  159. package/dist/tagsinput-CXmsu8K9.mjs +49 -0
  160. package/dist/tagsinput-CYoOBbY1.js +1 -0
  161. package/dist/useSyncedState-CzAO4D1o.mjs +17 -0
  162. package/dist/useSyncedState-DYNKkpDv.js +1 -0
  163. package/dist/useTextInput-Cm0_Ps2V.js +1 -0
  164. package/dist/useTextInput-Dr-ncTE8.mjs +1683 -0
  165. package/dist/useUpdateEffect-CNBo9hj8.js +1 -0
  166. package/dist/useUpdateEffect-CXAhttj7.mjs +14 -0
  167. package/dist/util/helper.d.ts +18 -1
  168. package/dist/util/muiVersion.d.ts +13 -0
  169. package/dist/util/stepperComponents.d.ts +1 -1
  170. package/dist/util/useSyncedState.d.ts +22 -0
  171. package/dist/util/validation.d.ts +40 -0
  172. package/dist/v4-Dyp-SQ1c.js +1 -0
  173. package/dist/v4-YCkfo8OR.mjs +27 -0
  174. package/dist/validation-B7DPZ218.js +7 -0
  175. package/dist/validation-BRcYhhsT.mjs +4991 -0
  176. package/package.json +35 -35
  177. package/dist/AIForm-D204ogdw.js +0 -44
  178. package/dist/AIForm-IafSvW2_.mjs +0 -12281
  179. package/dist/accordion-DA8VpkJ_.mjs +0 -23
  180. package/dist/accordion-yIxiSIl4.js +0 -1
  181. package/dist/addressfield-DCzPapIx.mjs +0 -164
  182. package/dist/addressfield-EFiWgeWB.js +0 -1
  183. package/dist/asyncautocomplete-5-8SXotM.mjs +0 -92
  184. package/dist/asyncautocomplete-BmHm-S4u.js +0 -1
  185. package/dist/bar-BvwjqB4v.mjs +0 -21
  186. package/dist/bar-DRjoPCtv.js +0 -1
  187. package/dist/cascadeselect-BEaoupK6.js +0 -1
  188. package/dist/cascadeselect-CzSf78Pg.mjs +0 -66
  189. package/dist/collection-CthMZ0Go.js +0 -1
  190. package/dist/collection-n9eBOioi.mjs +0 -1157
  191. package/dist/colorpicker-Bm9M38_c.mjs +0 -111
  192. package/dist/colorpicker-DHkdM8Q2.js +0 -1
  193. package/dist/consentfield-B2-UFm5n.mjs +0 -80
  194. package/dist/consentfield-DV8Gz0k9.js +0 -1
  195. package/dist/datatable-BVZFBd-8.mjs +0 -21
  196. package/dist/datatable-DnnyVWJm.js +0 -1
  197. package/dist/editabletable-B_JS4UZ9.js +0 -1
  198. package/dist/editabletable-BwvIvAt7.mjs +0 -128
  199. package/dist/fileupload-BHT7K0YT.mjs +0 -185
  200. package/dist/fileupload-CugVG3o3.js +0 -1
  201. package/dist/formrepeater-CaJMPo3Q.mjs +0 -75
  202. package/dist/formrepeater-DiKPaOfi.js +0 -1
  203. package/dist/formwizard-BzvdbvBY.js +0 -1
  204. package/dist/formwizard-C9fOIHQv.mjs +0 -83
  205. package/dist/geofield-BM4b5Zwx.js +0 -1
  206. package/dist/geofield-DYXx9K9o.mjs +0 -108
  207. package/dist/group-D5fMqJTx.mjs +0 -23
  208. package/dist/group-mwS8FSGJ.js +0 -1
  209. package/dist/imagelist-Bn9QhIv7.js +0 -1
  210. package/dist/imagelist-rqmJajHt.mjs +0 -18
  211. package/dist/intlphone-BQYytFWy.js +0 -1
  212. package/dist/intlphone-DHDwdBbm.mjs +0 -144
  213. package/dist/keyvaluefield-DM0eSfPF.mjs +0 -127
  214. package/dist/keyvaluefield-DXyuqDba.js +0 -1
  215. package/dist/line-Dst2QjuI.mjs +0 -21
  216. package/dist/line-hM3OgPH7.js +0 -1
  217. package/dist/lineitemlist-89hrdS0p.mjs +0 -170
  218. package/dist/lineitemlist-DfEjbNCH.js +0 -1
  219. package/dist/list-B8S2MrOx.js +0 -1
  220. package/dist/list-C97cCc78.mjs +0 -20
  221. package/dist/locationfield-BEMe22_x.mjs +0 -118
  222. package/dist/locationfield-DlgLvvdU.js +0 -1
  223. package/dist/markdowneditor-JoiWE-qO.js +0 -2
  224. package/dist/markdowneditor-K4TAKJ3s.mjs +0 -94
  225. package/dist/matrixfield-D4sHu6rU.mjs +0 -121
  226. package/dist/matrixfield-szah6uOP.js +0 -1
  227. package/dist/mixChart-Doq4lt7Z.mjs +0 -75
  228. package/dist/mixChart-rgyMCdnp.js +0 -1
  229. package/dist/multitextbox-CBChuyw9.js +0 -1
  230. package/dist/multitextbox-Cnrwie5U.mjs +0 -78
  231. package/dist/npsscale-Cc2eD9Nk.js +0 -1
  232. package/dist/npsscale-DgQPa1eH.mjs +0 -91
  233. package/dist/numberstepper-BcuSZHwZ.js +0 -1
  234. package/dist/numberstepper-BqINnIm7.mjs +0 -132
  235. package/dist/pie-B6dXjc4o.mjs +0 -21
  236. package/dist/pie-a_dhmBUq.js +0 -1
  237. package/dist/richtexteditor-Bs5-VQj3.js +0 -1
  238. package/dist/richtexteditor-CveBdsmJ.mjs +0 -143
  239. package/dist/s3Upload-B0JeoLkS.js +0 -1
  240. package/dist/s3Upload-dpioZ2c8.mjs +0 -51
  241. package/dist/signature-BRWAWqeA.mjs +0 -1227
  242. package/dist/signature-Bj9GDrvy.js +0 -2
  243. package/dist/stepper-B9sSsbQD.js +0 -1
  244. package/dist/stepper-DTMAP67o.mjs +0 -140
  245. package/dist/summaryfield-JKL3ZLl2.js +0 -1
  246. package/dist/summaryfield-xhr0Q4RL.mjs +0 -96
  247. package/dist/tabs-ClkmKlV8.mjs +0 -39
  248. package/dist/tabs-DmEP_QW0.js +0 -1
  249. package/dist/tagsinput-B0yVrYgB.mjs +0 -58
  250. package/dist/tagsinput-COKkxIxg.js +0 -1
  251. package/dist/v4-BysszJq8.mjs +0 -30
  252. package/dist/v4-CqdK_b8Y.js +0 -1
@@ -4,5 +4,5 @@ interface StepperProps extends ControlProps {
4
4
  currentStep?: number;
5
5
  patch?: Record<string, any>;
6
6
  }
7
- export default function Stepper({ attributes, onChange, onStepUpdate, currentStep, patch }: StepperProps): import("react/jsx-runtime").JSX.Element;
7
+ export default function Stepper({ attributes, onChange, onStepUpdate, currentStep, patch }: StepperProps): import('react').JSX.Element;
8
8
  export {};
@@ -1,7 +1,8 @@
1
+ import { default as React } from 'react';
1
2
  import { ControlProps } from '../../../types';
2
3
  /**
3
4
  * Read-only review panel that lists the current form's values as
4
5
  * label -> value rows. Reads live values from the shared FormGenerator store
5
6
  * via `guid`, or from an explicit `data` object (which takes precedence).
6
7
  */
7
- export default function SummaryField({ attributes }: ControlProps): import("react/jsx-runtime").JSX.Element;
8
+ export default function SummaryField({ attributes }: ControlProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { ControlProps } from '../../../types';
2
2
  /** Switch Component */
3
- export default function Switch({ attributes, rules, onChange, submitTick, messages }: ControlProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function Switch(props: ControlProps): import('react').JSX.Element;
@@ -1,2 +1,3 @@
1
+ import { default as React } from 'react';
1
2
  import { ControlProps } from '../../../types';
2
- export default function Tabs({ attributes, patch, onChange }: ControlProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function Tabs({ attributes, patch, onChange }: ControlProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { ControlProps } from '../../../types';
2
2
  /** TagsInput: free-solo, multi-value tag entry backed by MUI Autocomplete. */
3
- export default function TagsInput({ attributes, rules, onChange }: ControlProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function TagsInput({ attributes, rules, onChange }: ControlProps): import('react').JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ControlProps } from '../../../types';
2
- export default function TextField({ attributes, rules, onChange, submitTick, messages }: ControlProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function TextField({ attributes, rules, onChange, submitTick, messages }: ControlProps): import('react').JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ChangeEvent, FocusEvent } from 'react';
2
+ import { ControlProps } from '../../../types';
3
+ type TextData = {
4
+ value: any;
5
+ helperText: string;
6
+ error: boolean;
7
+ };
8
+ /**
9
+ * State for a text input control (TextField, LocationField): the value follows
10
+ * `attributes.value`, is validated on every keystroke, numeral-`format`ted and
11
+ * reported on blur, and re-validated on submit.
12
+ */
13
+ export declare function useTextInput({ attributes, rules, onChange, submitTick, messages }: ControlProps): {
14
+ textData: TextData;
15
+ handleOnChange: (e: ChangeEvent<HTMLInputElement>) => void;
16
+ handleOnBlur: (e: FocusEvent<HTMLInputElement>) => void;
17
+ };
18
+ export {};
@@ -1,2 +1,6 @@
1
- import { ControlProps } from '../../../types';
2
- export default function TimePicker({ attributes, rules, onChange }: ControlProps): import("react/jsx-runtime").JSX.Element;
1
+ /** TimePicker Control — the shared picker control, defaulting to MUI X's TimePicker. */
2
+ declare const TimePicker: {
3
+ ({ attributes, rules, onChange }: import('../../..').ControlProps): import('react').JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default TimePicker;
@@ -1,3 +1,3 @@
1
1
  import { ControlProps } from '../../../types';
2
2
  /** ToggleButtons: single- or multi-select toggle group backed by MUI. */
3
- export default function ToggleButtons({ attributes, rules, onChange }: ControlProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function ToggleButtons({ attributes, rules, onChange }: ControlProps): import('react').JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { ControlProps } from '../../../types';
2
2
  /** Typography Component */
3
- export default function Typography({ attributes }: ControlProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function Typography({ attributes }: ControlProps): import('react').JSX.Element;
@@ -10,9 +10,6 @@ import { default as Button } from './Button/button';
10
10
  import { default as Divider } from './Divider/divider';
11
11
  import { default as Computed } from './Computed/computed';
12
12
  import { default as Alert } from './Alert/alert';
13
- import { default as DateTime } from './DateTime/datetime';
14
- import { default as DateTimePicker } from './DateTimePicker/datetimepicker';
15
- import { default as TimePicker } from './TimePicker/timepicker';
16
13
  import { default as DateRangePicker } from './DateRangePicker/daterangepicker';
17
14
  import { default as Chip } from './Chip/chip';
18
15
  import { default as ChipSelect } from './ChipSelect/chipselect';
@@ -28,17 +25,35 @@ declare const Controls: {
28
25
  Typography: typeof Typography;
29
26
  TextField: typeof TextField;
30
27
  Table: import('react').LazyExoticComponent<typeof import('./DataTable/datatable').default>;
31
- DateTime: typeof DateTime;
32
- DateTimePicker: typeof DateTimePicker;
33
- TimePicker: typeof TimePicker;
28
+ DateTime: {
29
+ ({ attributes, rules, onChange }: import('../..').ControlProps): import('react').JSX.Element;
30
+ displayName: string;
31
+ };
32
+ DateTimePicker: {
33
+ ({ attributes, rules, onChange }: import('../..').ControlProps): import('react').JSX.Element;
34
+ displayName: string;
35
+ };
36
+ TimePicker: {
37
+ ({ attributes, rules, onChange }: import('../..').ControlProps): import('react').JSX.Element;
38
+ displayName: string;
39
+ };
34
40
  Select: typeof Select;
35
41
  CheckBox: typeof CheckBox;
36
42
  Switch: typeof Switch;
37
43
  Radio: typeof Radio;
38
44
  Stepper: import('react').LazyExoticComponent<typeof import('./Stepper/stepper').default>;
39
- Bar: import('react').LazyExoticComponent<typeof import('../charts/Bar/bar').default>;
40
- Line: import('react').LazyExoticComponent<typeof import('../charts/Line/line').default>;
41
- Pie: import('react').LazyExoticComponent<typeof import('../charts/Pie/pie').default>;
45
+ Bar: import('react').LazyExoticComponent<{
46
+ ({ attributes }: import('../..').ControlProps): import('react').JSX.Element;
47
+ displayName: string;
48
+ }>;
49
+ Line: import('react').LazyExoticComponent<{
50
+ ({ attributes }: import('../..').ControlProps): import('react').JSX.Element;
51
+ displayName: string;
52
+ }>;
53
+ Pie: import('react').LazyExoticComponent<{
54
+ ({ attributes }: import('../..').ControlProps): import('react').JSX.Element;
55
+ displayName: string;
56
+ }>;
42
57
  MixChart: import('react').LazyExoticComponent<typeof import('../charts/Mixchart/mixChart').default>;
43
58
  Divider: typeof Divider;
44
59
  Chip: typeof Chip;
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-5iZMYShA.js"),t=require("./ai-CXI0Rnu8.js"),n=require("./validation-B7DPZ218.js"),r=require("./useSyncedState-DYNKkpDv.js");let i=require("react");i=e.n(i);let a=require("@mui/material/styles"),o=require("react/jsx-runtime"),s=require("@mui/material/Checkbox");s=e.n(s);let c=require("@mui/material/FormControlLabel");c=e.n(c);let l=require("@mui/material/FormControl");l=e.n(l);let u=require("@mui/material/FormHelperText");u=e.n(u);let d=require("@mui/material/Box");d=e.n(d);function f({attributes:e={},rules:f={},onChange:p,messages:m}){let{MuiAttributes:h={},id:g=``,text:_=``,label:v=`I agree to the terms`,requireScroll:y=!0}=e,[b,x]=r.n(()=>!!e.value,[e.value]),[S,C]=i.default.useState(!y),[w,T]=i.default.useState(!1),[E,D]=i.default.useState(``),O=n.r(f),k=e=>n.a(f,!e,m),A=e=>{let t=e.currentTarget;t.scrollTop+t.clientHeight>=t.scrollHeight-4&&C(!0)},j=e=>{let t=e.target.checked;x(t);let n=k(t);T(!n.isValid),D(n.message),p?.({id:g,value:t})},M=y&&!S,{sx:N,...P}=h,F=O?(0,o.jsxs)(`span`,{children:[v,(0,o.jsx)(`span`,{"aria-hidden":`true`,style:{color:`#d32f2f`,marginLeft:2},children:`*`})]}):v;return(0,o.jsxs)(l.default,{required:O,error:w,component:`fieldset`,fullWidth:!0,children:[(0,o.jsx)(d.default,{"data-testid":`consent-terms`,onScroll:A,sx:t.B(t.W,{maxHeight:200,overflow:`auto`,p:2,mb:1,whiteSpace:`pre-wrap`,backgroundColor:e=>(0,a.alpha)(e.palette.background.paper,1)}),children:_}),(0,o.jsx)(c.default,{...P,sx:t.B(t.H,N),label:F,control:(0,o.jsx)(s.default,{checked:b,disabled:M,onChange:j,required:O,slotProps:{input:{"aria-label":`consent-agree`}}})}),E&&(0,o.jsx)(u.default,{children:E})]})}exports.default=f;
@@ -0,0 +1,68 @@
1
+ import { a as e, r as t } from "./validation-BRcYhhsT.mjs";
2
+ import { B as n, H as r, W as i } from "./ai-D6hkfd_f.mjs";
3
+ import { n as a } from "./useSyncedState-CzAO4D1o.mjs";
4
+ import o from "react";
5
+ import { alpha as s } from "@mui/material/styles";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import u from "@mui/material/Checkbox";
8
+ import d from "@mui/material/FormControlLabel";
9
+ import f from "@mui/material/FormControl";
10
+ import p from "@mui/material/FormHelperText";
11
+ import m from "@mui/material/Box";
12
+ // src/components/controls/ConsentField/consentfield.tsx
13
+ function h({ attributes: h = {}, rules: g = {}, onChange: _, messages: v }) {
14
+ let { MuiAttributes: y = {}, id: b = "", text: x = "", label: S = "I agree to the terms", requireScroll: C = !0 } = h, [w, T] = a(() => !!h.value, [h.value]), [E, D] = o.useState(!C), [O, k] = o.useState(!1), [A, j] = o.useState(""), M = t(g), N = (t) => e(g, !t, v), P = (e) => {
15
+ let t = e.currentTarget;
16
+ t.scrollTop + t.clientHeight >= t.scrollHeight - 4 && D(!0);
17
+ }, F = (e) => {
18
+ let t = e.target.checked;
19
+ T(t);
20
+ let n = N(t);
21
+ k(!n.isValid), j(n.message), _?.({
22
+ id: b,
23
+ value: t
24
+ });
25
+ }, I = C && !E, { sx: L, ...R } = y, z = M ? /* @__PURE__ */ l("span", { children: [S, /* @__PURE__ */ c("span", {
26
+ "aria-hidden": "true",
27
+ style: {
28
+ color: "#d32f2f",
29
+ marginLeft: 2
30
+ },
31
+ children: "*"
32
+ })] }) : S;
33
+ return /* @__PURE__ */ l(f, {
34
+ required: M,
35
+ error: O,
36
+ component: "fieldset",
37
+ fullWidth: !0,
38
+ children: [
39
+ /* @__PURE__ */ c(m, {
40
+ "data-testid": "consent-terms",
41
+ onScroll: P,
42
+ sx: n(i, {
43
+ maxHeight: 200,
44
+ overflow: "auto",
45
+ p: 2,
46
+ mb: 1,
47
+ whiteSpace: "pre-wrap",
48
+ backgroundColor: (e) => s(e.palette.background.paper, 1)
49
+ }),
50
+ children: x
51
+ }),
52
+ /* @__PURE__ */ c(d, {
53
+ ...R,
54
+ sx: n(r, L),
55
+ label: z,
56
+ control: /* @__PURE__ */ c(u, {
57
+ checked: w,
58
+ disabled: I,
59
+ onChange: F,
60
+ required: M,
61
+ slotProps: { input: { "aria-label": "consent-agree" } }
62
+ })
63
+ }),
64
+ A && /* @__PURE__ */ c(p, { children: A })
65
+ ]
66
+ });
67
+ }
68
+ export { h as default };
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-5iZMYShA.js"),t=require("./muiX-CG_D1XQ2.js");let n=require("react");n=e.n(n);let r=require("react/jsx-runtime"),i=require("@mui/material/Box");i=e.n(i);let a=require("@mui/material/CircularProgress");a=e.n(a);var o=n.default.lazy(()=>import(`@mui/x-data-grid`).then(e=>({default:e.DataGrid})));function s({attributes:e={}}){let{MuiAttributes:s={},container:c={}}=e,l=t.n(`DataGrid`)||o;return(0,r.jsx)(`div`,{...c,children:(0,r.jsx)(n.Suspense,{fallback:(0,r.jsx)(i.default,{sx:{display:`flex`,justifyContent:`center`,p:2},children:(0,r.jsx)(a.default,{})}),children:(0,r.jsx)(l,{rows:[],columns:[],...s})})})}exports.default=s;
@@ -0,0 +1,29 @@
1
+ import { n as e } from "./muiX-BHOKpogF.mjs";
2
+ import t, { Suspense as n } from "react";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ import i from "@mui/material/Box";
5
+ import a from "@mui/material/CircularProgress";
6
+ // src/components/controls/DataTable/datatable.tsx
7
+ var o = t.lazy(() => import("@mui/x-data-grid").then((e) => ({ default: e.DataGrid })));
8
+ function s({ attributes: t = {} }) {
9
+ let { MuiAttributes: s = {}, container: c = {} } = t, l = e("DataGrid") || o;
10
+ return /* @__PURE__ */ r("div", {
11
+ ...c,
12
+ children: /* @__PURE__ */ r(n, {
13
+ fallback: /* @__PURE__ */ r(i, {
14
+ sx: {
15
+ display: "flex",
16
+ justifyContent: "center",
17
+ p: 2
18
+ },
19
+ children: /* @__PURE__ */ r(a, {})
20
+ }),
21
+ children: /* @__PURE__ */ r(l, {
22
+ rows: [],
23
+ columns: [],
24
+ ...s
25
+ })
26
+ })
27
+ });
28
+ }
29
+ export { s as default };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./AIForm-D204ogdw.js"),g=require("react");function U(e){return r=>{const i=e.safeParse(r);return!i||i.success?[]:(i.error?.issues||i.error?.errors||[]).map(p=>({id:String(p?.path?.[0]??""),message:p?.message||"Invalid value",rule:p?.code||"zod"})).filter(p=>p.id)}}function H(e){return r=>{try{return e.validateSync(r,{abortEarly:!1}),[]}catch(i){return(i?.inner?.length?i.inner:i?[i]:[]).map(p=>({id:String(p?.path??""),message:p?.message||"Invalid value",rule:p?.type||"yup"})).filter(p=>p.id)}}}const R=["mandatory","mandatoryselect"],I=(e,r)=>{const i=[];return(e||[]).forEach(h=>{if(i.push(h),Array.isArray(h.subforms)&&h.subforms.length){const p=h?.id||h?.props?.id,u=p?r[p]:void 0;h.subforms.forEach(a=>{(Array.isArray(u)?u.includes(a.conditionValue):a.conditionValue===u)&&i.push(...I(a.data||[],r))})}}),i},E=e=>e?.id||e?.props?.id||"",W=(e,r)=>!e?.visibleWhen||o.evaluateRule(e.visibleWhen,r),J=(e,r)=>e?.optionsMap&&e?.dependsOn?e.optionsMap[r[e.dependsOn]]||[]:e?.props?.options;function K(e,r={}){const{resolver:i}=r,h=r.messages?.required||"This field is required",p=g.useMemo(()=>{const t={...r.initialValues||{}};return I(e,t).forEach(s=>{const f=E(s),d=s?.props?.value;f&&t[f]===void 0&&d!==void 0&&(t[f]=d)}),t},[]),[u,a]=g.useState(p),[l,C]=g.useState([]),v=g.useRef(p),A=g.useCallback(t=>{const s={...t};return I(e,s).forEach(d=>{const n=E(d);if(n&&d.visibleWhen&&!o.evaluateRule(d.visibleWhen,s)&&delete s[n],n&&d.optionsMap&&d.dependsOn){const b=(d.optionsMap[s[d.dependsOn]]||[]).map(y=>typeof y=="string"?y:y?.value),F=s[n];F!=null&&F!==""&&!b.includes(F)&&delete s[n]}}),(e||[]).forEach(d=>{if(!Array.isArray(d.subforms)||!d.subforms.length)return;const n=E(d),c=n?s[n]:void 0,b=new Set,F=new Set;d.subforms.forEach(y=>{const M=Array.isArray(c)?c.includes(y.conditionValue):y.conditionValue===c;(y.data||[]).forEach(O=>{const m=E(O);m&&(M?b:F).add(m)})}),F.forEach(y=>{b.has(y)||delete s[y]})}),I(e,s).forEach(d=>{const n=E(d);n&&d.formula&&(s[n]=o.computeFormula(d.formula,s))}),s},[e]),L=g.useCallback((t,s)=>{a(f=>A({...f,[t]:s}))},[A]),_=g.useCallback(t=>{a(s=>A({...s,...t||{}}))},[A]),w=g.useCallback(t=>{const s=I(e,t),f=[],d=new Set;if(s.forEach(n=>{const c=E(n);c&&!W(n,t)&&d.add(c)}),s.forEach(n=>{const c=E(n);if(!c||d.has(c))return;const b=[...n?.rules?.validation||[]],F=b.some(m=>R.includes(m.rule));if(n.requiredWhen&&!F&&o.evaluateRule(n.requiredWhen,t)&&b.push({rule:"mandatory",message:n.requiredMessage||h}),!b.length)return;const y=t[c],M=y==null?"":String(y),O=b.some(m=>R.includes(m.rule));b.forEach(m=>{const $=o.CROSS_FIELD_VALIDATORS[m.rule];if($){if(!M&&!O)return;const q=t[m.field??m.value],B=q==null?"":String(q);$(M,B)||f.push({id:c,rule:m.rule,message:m.message});return}const V=o.Validation[m.rule];if(typeof V!="function")return;const k=R.includes(m.rule);if(!M&&!k)return;V(k?y:M,m.value)||f.push({id:c,rule:m.rule,message:m.message||(k?h:"")})})}),i){let n=[];try{n=i(t)||[]}catch{n=[]}n.forEach(c=>{c&&c.id&&!d.has(c.id)&&f.push({id:c.id,rule:c.rule||"schema",message:c.message})})}return f},[e,i,h]),G=g.useCallback(()=>{const t=w(u);return C(t),t},[w,u]),z=g.useCallback(t=>{const s=w(u);return C(s),s.length===0&&t&&t({...u}),s},[w,u]),P=g.useCallback(()=>{a({...v.current}),C([])},[]),S=g.useMemo(()=>{const t=new Map;return l.forEach(s=>{s.id&&!t.has(s.id)&&t.set(s.id,s.message)}),I(e,u).map(s=>{const f=E(s),n=(s?.rules?.validation||[]).some(b=>R.includes(b.rule))||!!(s.requiredWhen&&o.evaluateRule(s.requiredWhen,u)),c=s.formula?o.computeFormula(s.formula,u):u[f];return{id:f,field:s,value:c,visible:W(s,u),disabled:!!(s.disabledWhen&&o.evaluateRule(s.disabledWhen,u)),required:n,options:J(s,u),error:t.get(f)}})},[e,u,l]),Y=g.useMemo(()=>S.filter(t=>t.visible),[S]),j=g.useCallback(t=>S.find(s=>s.id===t),[S]),N=g.useMemo(()=>!o.isEqual(u,v.current),[u]);return{values:u,errors:l,fields:S,visibleFields:Y,getFieldState:j,setValue:L,setValues:_,validate:G,isValid:l.length===0,isDirty:N,reset:P,submit:z}}const Q=new Set(["typography","divider","alert","image","imagelist","hyperlink","button"]),D=e=>e?.id||e?.props?.id,T=(e,r=new Set)=>((e||[]).forEach(i=>{const h=D(i);h&&r.add(h),Array.isArray(i?.subforms)&&i.subforms.forEach(p=>T(p?.data||[],r))}),r),X=e=>{if(!e||typeof e!="object")return[];if(typeof e.field=="string")return[e.field];const r=e.all||e.any||e.none;return Array.isArray(r)?r.flatMap(X):[]},Z=e=>(Array.isArray(e)?e:[]).map(r=>typeof r=="string"?r:r?.value);function x(e){const r=[],i=T(e),h=p=>{const u=new Set;(p||[]).forEach(a=>{const l=D(a),C=a?.type;if(!l&&!Q.has(C)&&r.push({level:"warning",code:"missing-id",message:`A "${C||"field"}" has no id; its value can't be captured.`}),l&&(u.has(l)&&r.push({level:"error",code:"duplicate-id",field:l,message:`Duplicate field id "${l}" among siblings — their values will collide.`}),u.add(l)),a?.dependsOn&&!a?.optionsMap&&r.push({level:"warning",code:"depends-without-options",field:l,message:`"${l}" has \`dependsOn\` but no \`optionsMap\`, so its options never change.`}),a?.optionsMap&&!a?.dependsOn&&r.push({level:"warning",code:"options-without-depends",field:l,message:`"${l}" has \`optionsMap\` but no \`dependsOn\`, so it can't pick a branch.`}),a?.dependsOn&&!i.has(a.dependsOn)&&r.push({level:"error",code:"unknown-depends-target",field:l,message:`"${l}" dependsOn "${a.dependsOn}", which is not a field in this schema.`}),["visibleWhen","disabledWhen","requiredWhen"].forEach(v=>{X(a?.[v]).forEach(A=>{i.has(A)||r.push({level:"error",code:"unknown-rule-field",field:l,message:`"${l}" ${v} references field "${A}", which does not exist.`})})}),(a?.rules?.validation||[]).forEach(v=>{v?.field&&/Field$/.test(v?.rule||"")&&!i.has(v.field)&&r.push({level:"error",code:"unknown-cross-field",field:l,message:`"${l}" rule "${v.rule}" compares against "${v.field}", which does not exist.`})}),Array.isArray(a?.subforms)&&a.subforms.length){const v=Z(a?.props?.options);v.length&&a.subforms.forEach(A=>{A?.conditionValue!==void 0&&!v.includes(A.conditionValue)&&r.push({level:"warning",code:"subform-condition-not-an-option",field:l,message:`"${l}" has a subform for value "${A.conditionValue}", which isn't one of its options.`})}),a.subforms.forEach(A=>h(A?.data||[]))}})};return h(e),r}function ee(e){return e}exports.AIFill=o.AIFill;exports.AIForm=o.AIForm;exports.AIFormGenerator=o.AIFormGenerator;exports.AISchemaReview=o.AISchemaReview;exports.AITextAssist=o.AITextAssist;exports.AIVisionImport=o.AIVisionImport;exports.ClearFormData=o.ClearFormData;exports.Controls=o.Controls_default;exports.DynamicComponent=o.DynamicComponent;exports.FormData=o.FormData;exports.FormGenerator=o.FormGenerator;exports.MuiConfig=o.mui;exports.configureMuiX=o.configureMuiX;exports.createAIClient=o.createAIClient;exports.formFieldsToSimple=o.formFieldsToSimple;exports.getMuiX=o.getMuiX;exports.getRegisteredControl=o.getRegisteredControl;exports.hasRegisteredControl=o.hasRegisteredControl;exports.registerControl=o.registerControl;exports.registerControls=o.registerControls;exports.registeredControlTypes=o.registeredControlTypes;exports.resetMuiX=o.resetMuiX;exports.simpleFieldsToFormFields=o.simpleFieldsToFormFields;exports.slug=o.slug;exports.unregisterControl=o.unregisterControl;exports.useAIAssist=o.useAIAssist;exports.useForm=o.useForm;exports.defineForm=ee;exports.useFormEngine=K;exports.validateSchema=x;exports.yupResolver=H;exports.zodResolver=U;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-5iZMYShA.js"),t=require("./useTextInput-Cm0_Ps2V.js"),n=require("./ai-CXI0Rnu8.js"),r=require("./muiX-CG_D1XQ2.js"),i=require("./validation-B7DPZ218.js");let a=require("react");function o(e){return t=>{let n=e.safeParse(t);return!n||n.success?[]:(n.error?.issues||n.error?.errors||[]).map(e=>({id:String(e?.path?.[0]??``),message:e?.message||`Invalid value`,rule:e?.code||`zod`})).filter(e=>e.id)}}function s(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),[]}catch(e){return(e?.inner?.length?e.inner:e?[e]:[]).map(e=>({id:String(e?.path??``),message:e?.message||`Invalid value`,rule:e?.type||`yup`})).filter(e=>e.id)}}}var c=e.n(n.K()),l=(e,t)=>{let n=[];return(e||[]).forEach(e=>{if(n.push(e),Array.isArray(e.subforms)&&e.subforms.length){let r=e?.id||e?.props?.id,i=r?t[r]:void 0;e.subforms.forEach(e=>{(Array.isArray(i)?i.includes(e.conditionValue):e.conditionValue===i)&&n.push(...l(e.data||[],t))})}}),n},u=e=>e?.id||e?.props?.id||``,d=(e,t)=>!e?.visibleWhen||n.k(e.visibleWhen,t),f=(e,t)=>e?.optionsMap&&e?.dependsOn?e.optionsMap[t[e.dependsOn]]||[]:e?.props?.options;function p(e,t={}){let{resolver:r}=t,o=t.messages?.required||`This field is required`,s=(0,a.useMemo)(()=>{let n={...t.initialValues||{}};return l(e,n).forEach(e=>{let t=u(e),r=e?.props?.value;t&&n[t]===void 0&&r!==void 0&&(n[t]=r)}),n},[]),[p,m]=(0,a.useState)(s),[h,g]=(0,a.useState)([]),_=(0,a.useRef)(s),v=(0,a.useCallback)(t=>{let r={...t};return l(e,r).forEach(e=>{let t=u(e);if(t&&e.visibleWhen&&!n.k(e.visibleWhen,r)&&delete r[t],t&&e.optionsMap&&e.dependsOn){let n=(e.optionsMap[r[e.dependsOn]]||[]).map(e=>typeof e==`string`?e:e?.value),i=r[t];i!=null&&i!==``&&!n.includes(i)&&delete r[t]}}),(e||[]).forEach(e=>{if(!Array.isArray(e.subforms)||!e.subforms.length)return;let t=u(e),n=t?r[t]:void 0,i=new Set,a=new Set;e.subforms.forEach(e=>{let t=Array.isArray(n)?n.includes(e.conditionValue):e.conditionValue===n;(e.data||[]).forEach(e=>{let n=u(e);n&&(t?i:a).add(n)})}),a.forEach(e=>{i.has(e)||delete r[e]})}),l(e,r).forEach(e=>{let t=u(e);t&&e.formula&&(r[t]=n.O(e.formula,r))}),r},[e]),y=(0,a.useCallback)((e,t)=>{m(n=>v({...n,[e]:t}))},[v]),b=(0,a.useCallback)(e=>{m(t=>v({...t,...e||{}}))},[v]),x=(0,a.useCallback)(t=>{let a=l(e,t),s=[],c=new Set;if(a.forEach(e=>{let n=u(e);n&&!d(e,t)&&c.add(n)}),a.forEach(e=>{let r=u(e);if(!r||c.has(r))return;let a=[...e?.rules?.validation||[]],l=a.some(e=>i.t.includes(e.rule));if(e.requiredWhen&&!l&&n.k(e.requiredWhen,t)&&a.push({rule:`mandatory`,message:e.requiredMessage||o}),!a.length)return;let d=t[r],f=d==null?``:String(d),p=a.some(e=>i.t.includes(e.rule));a.forEach(e=>{let a=n.D[e.rule];if(a){if(!f&&!p)return;let n=t[e.field??e.value];a(f,n==null?``:String(n))||s.push({id:r,rule:e.rule,message:e.message});return}let c=i.n[e.rule];if(typeof c!=`function`)return;let l=i.t.includes(e.rule);(f||l)&&(c(l?d:f,e.value)||s.push({id:r,rule:e.rule,message:e.message||(l?o:``)}))})}),r){let e=[];try{e=r(t)||[]}catch{e=[]}e.forEach(e=>{e&&e.id&&!c.has(e.id)&&s.push({id:e.id,rule:e.rule||`schema`,message:e.message})})}return s},[e,r,o]),S=(0,a.useCallback)(()=>{let e=x(p);return g(e),e},[x,p]),C=(0,a.useCallback)(e=>{let t=x(p);return g(t),t.length===0&&e&&e({...p}),t},[x,p]),w=(0,a.useCallback)(()=>{m({..._.current}),g([])},[]),T=(0,a.useMemo)(()=>{let t=new Map;return h.forEach(e=>{e.id&&!t.has(e.id)&&t.set(e.id,e.message)}),l(e,p).map(e=>{let r=u(e),a=(e?.rules?.validation||[]).some(e=>i.t.includes(e.rule))||!!(e.requiredWhen&&n.k(e.requiredWhen,p));return{id:r,field:e,value:e.formula?n.O(e.formula,p):p[r],visible:d(e,p),disabled:!!(e.disabledWhen&&n.k(e.disabledWhen,p)),required:a,options:f(e,p),error:t.get(r)}})},[e,p,h]),E=(0,a.useMemo)(()=>T.filter(e=>e.visible),[T]),D=(0,a.useCallback)(e=>T.find(t=>t.id===e),[T]),O=(0,a.useMemo)(()=>!(0,c.default)(p,_.current),[p]);return{values:p,errors:h,fields:T,visibleFields:E,getFieldState:D,setValue:y,setValues:b,validate:S,isValid:h.length===0,isDirty:O,reset:w,submit:C}}var m=new Set([`typography`,`divider`,`alert`,`image`,`imagelist`,`hyperlink`,`button`]),h=e=>e?.id||e?.props?.id,g=(e,t=new Set)=>((e||[]).forEach(e=>{let n=h(e);n&&t.add(n),Array.isArray(e?.subforms)&&e.subforms.forEach(e=>g(e?.data||[],t))}),t),_=e=>{if(!e||typeof e!=`object`)return[];if(typeof e.field==`string`)return[e.field];let t=e.all||e.any||e.none;return Array.isArray(t)?t.flatMap(_):[]},v=e=>(Array.isArray(e)?e:[]).map(e=>typeof e==`string`?e:e?.value);function y(e){let t=[],n=g(e),r=e=>{let i=new Set;(e||[]).forEach(e=>{let a=h(e),o=e?.type;if(!a&&!m.has(o)&&t.push({level:`warning`,code:`missing-id`,message:`A "${o||`field`}" has no id; its value can't be captured.`}),a&&(i.has(a)&&t.push({level:`error`,code:`duplicate-id`,field:a,message:`Duplicate field id "${a}" among siblings — their values will collide.`}),i.add(a)),e?.dependsOn&&!e?.optionsMap&&t.push({level:`warning`,code:`depends-without-options`,field:a,message:`"${a}" has \`dependsOn\` but no \`optionsMap\`, so its options never change.`}),e?.optionsMap&&!e?.dependsOn&&t.push({level:`warning`,code:`options-without-depends`,field:a,message:`"${a}" has \`optionsMap\` but no \`dependsOn\`, so it can't pick a branch.`}),e?.dependsOn&&!n.has(e.dependsOn)&&t.push({level:`error`,code:`unknown-depends-target`,field:a,message:`"${a}" dependsOn "${e.dependsOn}", which is not a field in this schema.`}),[`visibleWhen`,`disabledWhen`,`requiredWhen`].forEach(r=>{_(e?.[r]).forEach(e=>{n.has(e)||t.push({level:`error`,code:`unknown-rule-field`,field:a,message:`"${a}" ${r} references field "${e}", which does not exist.`})})}),(e?.rules?.validation||[]).forEach(e=>{e?.field&&/Field$/.test(e?.rule||``)&&!n.has(e.field)&&t.push({level:`error`,code:`unknown-cross-field`,field:a,message:`"${a}" rule "${e.rule}" compares against "${e.field}", which does not exist.`})}),Array.isArray(e?.subforms)&&e.subforms.length){let n=v(e?.props?.options);n.length&&e.subforms.forEach(e=>{e?.conditionValue!==void 0&&!n.includes(e.conditionValue)&&t.push({level:`warning`,code:`subform-condition-not-an-option`,field:a,message:`"${a}" has a subform for value "${e.conditionValue}", which isn't one of its options.`})}),e.subforms.forEach(e=>r(e?.data||[]))}})};return r(e),t}function b(e){return e}exports.AIFill=n.o,exports.AIForm=n.t,exports.AIFormGenerator=n.s,exports.AISchemaReview=n.r,exports.AITextAssist=n.i,exports.AIVisionImport=n.n,exports.ClearFormData=n.f,exports.Controls=n.L,exports.DynamicComponent=n.A,exports.FormData=n.p,exports.FormGenerator=n.m,exports.MuiConfig=n.G,exports.configureMuiX=r.t,exports.createAIClient=n.c,exports.defineForm=b,exports.formFieldsToSimple=n.l,exports.getMuiX=r.n,exports.getRegisteredControl=n.j,exports.hasRegisteredControl=n.M,exports.migrateFormData=t.l,exports.migrateFormField=t.u,exports.registerControl=n.N,exports.registerControls=n.P,exports.registeredControlTypes=n.F,exports.resetMuiX=r.r,exports.simpleFieldsToFormFields=n.u,exports.slug=n.d,exports.unregisterControl=n.I,exports.useAIAssist=n.a,exports.useForm=n.h,exports.useFormEngine=p,exports.validateSchema=y,exports.yupResolver=s,exports.zodResolver=o;
@@ -1,2 +1,2 @@
1
- export * from './index'
1
+ export * from './index.js'
2
2
  export {}