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
@@ -1,83 +0,0 @@
1
- import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
- import { useState as G, useRef as w, useMemo as B, useCallback as S } from "react";
3
- import { Box as l, Stepper as U, Step as j, StepLabel as C, Button as v } from "@mui/material";
4
- import { P as c, F as E, m as M, o as N } from "./AIForm-IafSvW2_.mjs";
5
- import { v as P } from "./v4-BysszJq8.mjs";
6
- function T({ attributes: $ = {}, onChange: n }) {
7
- const {
8
- id: r = "",
9
- guid: A,
10
- steps: p = [],
11
- patch: R = {},
12
- finishLabel: g = "Finish",
13
- // Opt-in: block Next / Finish until the current step passes validation
14
- // (invalid fields are highlighted). Defaults to the old free navigation.
15
- validateSteps: d = !1,
16
- MuiAttributes: I = {}
17
- } = $, [t, u] = G(0), o = w(null), m = B(() => A || `${r}-${P()}`, []), s = Array.isArray(p) ? p : [], i = Math.max(s.length - 1, 0), L = t >= i, k = t <= 0, x = `${m}-step-${t}`, y = S(() => {
18
- u((e) => Math.max(e - 1, 0));
19
- }, []), F = S(() => {
20
- if (!(d && o.current && !o.current.validate())) {
21
- if (t >= i) {
22
- n?.({ id: r, value: "complete", option: t });
23
- return;
24
- }
25
- u((e) => Math.min(e + 1, i));
26
- }
27
- }, [t, i, r, n, d]), f = ((e) => ({
28
- borderRadius: `${N + 8}px`,
29
- textTransform: "none",
30
- fontWeight: 600,
31
- px: 3,
32
- transition: `box-shadow .18s ${c}, transform .18s ${c}`,
33
- "&:hover": {
34
- transform: "translateY(-1px)",
35
- boxShadow: `0 4px 12px ${e.palette.primary.main}22`
36
- }
37
- }));
38
- return /* @__PURE__ */ b(l, { sx: { width: "100%" }, ...I, children: [
39
- /* @__PURE__ */ a(
40
- U,
41
- {
42
- activeStep: t,
43
- alternativeLabel: !0,
44
- sx: {
45
- mb: 3,
46
- "& .MuiStepLabel-label": { fontWeight: 500 },
47
- "& .MuiStepIcon-root.Mui-active": { transition: `color .2s ${c}` }
48
- },
49
- children: s.map((e, h) => /* @__PURE__ */ a(j, { children: /* @__PURE__ */ a(C, { children: e?.label ?? `Step ${h + 1}` }) }, `${m}-label-${h}`))
50
- }
51
- ),
52
- /* @__PURE__ */ a(l, { sx: { mb: 3 }, children: s[t] && /* @__PURE__ */ a(
53
- E,
54
- {
55
- guid: x,
56
- data: s[t].fields ?? [],
57
- patch: R,
58
- persistOnUnmount: !0,
59
- apiRef: o,
60
- onChange: (e) => {
61
- n?.(e);
62
- }
63
- },
64
- x
65
- ) }),
66
- /* @__PURE__ */ b(l, { sx: { display: "flex", justifyContent: "space-between", gap: 2 }, children: [
67
- /* @__PURE__ */ a(
68
- v,
69
- {
70
- variant: "outlined",
71
- onClick: y,
72
- disabled: k,
73
- sx: M(f),
74
- children: "Back"
75
- }
76
- ),
77
- /* @__PURE__ */ a(v, { variant: "contained", onClick: F, sx: M(f), children: L ? g : "Next" })
78
- ] })
79
- ] });
80
- }
81
- export {
82
- T as default
83
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),S=require("react"),i=require("@mui/material/Box"),$=require("@mui/material/Link"),x=require("@mui/material/TextField"),w=require("@mui/material/Typography"),o=require("./AIForm-D204ogdw.js"),h=t=>{if(t&&typeof t=="object")return{lat:t.lat!==void 0&&t.lat!==null?String(t.lat):"",lng:t.lng!==void 0&&t.lng!==null?String(t.lng):""};if(typeof t=="string"&&t.includes(",")){const[c="",a=""]=t.split(",");return{lat:c.trim(),lng:a.trim()}}return{lat:"",lng:""}};function q({attributes:t={},onChange:c}){const{id:a="",label:g="",showMap:b=!1,MuiAttributes:p={}}=t,[n,u]=S.useState(()=>h(t.value));o.useUpdateEffect(()=>{u(h(t.value))},[t.value]);const f=e=>{c?.({id:a,value:{lat:e.lat,lng:e.lng},option:`${e.lat},${e.lng}`})},d=e=>s=>{const r={...n,[e]:s.target.value};u(r),f(r)},y=n.lat!==""&&n.lng!=="",m=o.mergeSx(o.premiumInputSx,p.sx),j=()=>{const e=parseFloat(n.lat),s=parseFloat(n.lng),r=.01;return`https://www.openstreetmap.org/export/embed.html?bbox=${`${s-r},${e-r},${s+r},${e+r}`}&marker=${e},${s}`};return l.jsxs(i,{id:a,children:[g?l.jsx(w,{variant:"body2",sx:{mb:.75,fontWeight:500},children:g}):null,l.jsxs(i,{sx:{display:"flex",gap:1.5,flexWrap:"wrap"},children:[l.jsx(x,{type:"number",...p,label:"Latitude",value:n.lat,onChange:d("lat"),sx:m,slotProps:{htmlInput:{"aria-label":"Latitude",step:"any"}}}),l.jsx(x,{type:"number",...p,label:"Longitude",value:n.lng,onChange:d("lng"),sx:m,slotProps:{htmlInput:{"aria-label":"Longitude",step:"any"}}})]}),l.jsx(i,{sx:{mt:1},children:l.jsx($,{href:`https://www.google.com/maps?q=${n.lat},${n.lng}`,target:"_blank",rel:"noreferrer",variant:"body2",children:"Open in Maps"})}),b&&y?l.jsx(i,{sx:o.mergeSx(e=>({...o.premiumSurfaceSx(e),mt:1.5})),children:l.jsx("iframe",{title:"map",width:"100%",height:"240",style:{border:0,display:"block"},src:j()})}):null]})}exports.default=q;
@@ -1,108 +0,0 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import S from "react";
3
- import s from "@mui/material/Box";
4
- import k from "@mui/material/Link";
5
- import h from "@mui/material/TextField";
6
- import L from "@mui/material/Typography";
7
- import { j, m as f, k as C, l as F } from "./AIForm-IafSvW2_.mjs";
8
- const b = (t) => {
9
- if (t && typeof t == "object")
10
- return {
11
- lat: t.lat !== void 0 && t.lat !== null ? String(t.lat) : "",
12
- lng: t.lng !== void 0 && t.lng !== null ? String(t.lng) : ""
13
- };
14
- if (typeof t == "string" && t.includes(",")) {
15
- const [i = "", a = ""] = t.split(",");
16
- return { lat: i.trim(), lng: a.trim() };
17
- }
18
- return { lat: "", lng: "" };
19
- };
20
- function v({ attributes: t = {}, onChange: i }) {
21
- const {
22
- id: a = "",
23
- label: m = "",
24
- showMap: x = !1,
25
- MuiAttributes: p = {}
26
- } = t, [e, g] = S.useState(() => b(t.value));
27
- j(() => {
28
- g(b(t.value));
29
- }, [t.value]);
30
- const y = (l) => {
31
- i?.({
32
- id: a,
33
- value: { lat: l.lat, lng: l.lng },
34
- option: `${l.lat},${l.lng}`
35
- });
36
- }, c = (l) => (o) => {
37
- const n = { ...e, [l]: o.target.value };
38
- g(n), y(n);
39
- }, $ = e.lat !== "" && e.lng !== "", d = f(C, p.sx), w = () => {
40
- const l = parseFloat(e.lat), o = parseFloat(e.lng), n = 0.01;
41
- return `https://www.openstreetmap.org/export/embed.html?bbox=${`${o - n},${l - n},${o + n},${l + n}`}&marker=${l},${o}`;
42
- };
43
- return /* @__PURE__ */ u(s, { id: a, children: [
44
- m ? /* @__PURE__ */ r(L, { variant: "body2", sx: { mb: 0.75, fontWeight: 500 }, children: m }) : null,
45
- /* @__PURE__ */ u(s, { sx: { display: "flex", gap: 1.5, flexWrap: "wrap" }, children: [
46
- /* @__PURE__ */ r(
47
- h,
48
- {
49
- type: "number",
50
- ...p,
51
- label: "Latitude",
52
- value: e.lat,
53
- onChange: c("lat"),
54
- sx: d,
55
- slotProps: {
56
- htmlInput: { "aria-label": "Latitude", step: "any" }
57
- }
58
- }
59
- ),
60
- /* @__PURE__ */ r(
61
- h,
62
- {
63
- type: "number",
64
- ...p,
65
- label: "Longitude",
66
- value: e.lng,
67
- onChange: c("lng"),
68
- sx: d,
69
- slotProps: {
70
- htmlInput: { "aria-label": "Longitude", step: "any" }
71
- }
72
- }
73
- )
74
- ] }),
75
- /* @__PURE__ */ r(s, { sx: { mt: 1 }, children: /* @__PURE__ */ r(
76
- k,
77
- {
78
- href: `https://www.google.com/maps?q=${e.lat},${e.lng}`,
79
- target: "_blank",
80
- rel: "noreferrer",
81
- variant: "body2",
82
- children: "Open in Maps"
83
- }
84
- ) }),
85
- x && $ ? /* @__PURE__ */ r(
86
- s,
87
- {
88
- sx: f((l) => ({
89
- ...F(l),
90
- mt: 1.5
91
- })),
92
- children: /* @__PURE__ */ r(
93
- "iframe",
94
- {
95
- title: "map",
96
- width: "100%",
97
- height: "240",
98
- style: { border: 0, display: "block" },
99
- src: w()
100
- }
101
- )
102
- }
103
- ) : null
104
- ] });
105
- }
106
- export {
107
- v as default
108
- };
@@ -1,23 +0,0 @@
1
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
- import n from "react";
3
- import { Paper as p, Typography as l, Box as f } from "@mui/material";
4
- import { F as c } from "./AIForm-IafSvW2_.mjs";
5
- import { v as d } from "./v4-BysszJq8.mjs";
6
- function F({ attributes: o = {}, patch: e, onChange: i }) {
7
- const { MuiAttributes: r = {}, label: s = "Group", subFields: a = [] } = o, m = n.useMemo(() => d(), []);
8
- return /* @__PURE__ */ u(p, { elevation: 1, sx: { p: 2, mb: 2, ...r.sx }, ...r, children: [
9
- /* @__PURE__ */ t(l, { variant: "subtitle1", gutterBottom: !0, sx: { fontWeight: 600 }, children: s }),
10
- /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
11
- c,
12
- {
13
- guid: m,
14
- data: a,
15
- patch: e,
16
- onChange: i
17
- }
18
- ) })
19
- ] });
20
- }
21
- export {
22
- F as default
23
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),t=require("@mui/material"),l=require("./AIForm-D204ogdw.js"),d=require("./v4-CqdK_b8Y.js");function x({attributes:o={},patch:s,onChange:i}){const{MuiAttributes:r={},label:u="Group",subFields:n=[]}=o,a=c.useMemo(()=>d.v4(),[]);return e.jsxs(t.Paper,{elevation:1,sx:{p:2,mb:2,...r.sx},...r,children:[e.jsx(t.Typography,{variant:"subtitle1",gutterBottom:!0,sx:{fontWeight:600},children:u}),e.jsx(t.Box,{children:e.jsx(l.FormGenerator,{guid:a,data:n,patch:s,onChange:i})})]})}exports.default=x;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("@mui/material/ImageList"),g=require("@mui/material/ImageListItem");function l({attributes:s={}}){const{MuiAttributes:o={},items:e=[],width:a=500,height:c=450,cols:u=3,rowHeight:t=164}=s;return i.jsx(n,{sx:{width:a,height:c},cols:u,rowHeight:t,...o,children:(Array.isArray(e)?e:[]).map(r=>i.jsx(g,{children:i.jsx("img",{srcSet:`${r.img}?w=${t}&h=${t}&fit=crop&auto=format&dpr=2 2x`,src:`${r.img}?w=${t}&h=${t}&fit=crop&auto=format`,alt:r.title,loading:"lazy"})},r.img))})}exports.default=l;
@@ -1,18 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import c from "@mui/material/ImageList";
3
- import f from "@mui/material/ImageListItem";
4
- function n({ attributes: m = {} }) {
5
- const { MuiAttributes: a = {}, items: o = [], width: s = 500, height: e = 450, cols: g = 3, rowHeight: t = 164 } = m;
6
- return /* @__PURE__ */ i(c, { sx: { width: s, height: e }, cols: g, rowHeight: t, ...a, children: (Array.isArray(o) ? o : []).map((r) => /* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(
7
- "img",
8
- {
9
- srcSet: `${r.img}?w=${t}&h=${t}&fit=crop&auto=format&dpr=2 2x`,
10
- src: `${r.img}?w=${t}&h=${t}&fit=crop&auto=format`,
11
- alt: r.title,
12
- loading: "lazy"
13
- }
14
- ) }, r.img)) });
15
- }
16
- export {
17
- n as default
18
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("react"),t=require("./AIForm-D204ogdw.js"),U=require("@mui/material/Stack"),I=require("@mui/material/TextField"),M=require("@mui/material/MenuItem"),T=require("@mui/material/FormControl"),j=require("@mui/material/FormLabel"),n=[{code:"US",name:"United States",dial:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dial:"+44",flag:"🇬🇧"},{code:"IN",name:"India",dial:"+91",flag:"🇮🇳"},{code:"CA",name:"Canada",dial:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dial:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dial:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dial:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dial:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dial:"+34",flag:"🇪🇸"},{code:"BR",name:"Brazil",dial:"+55",flag:"🇧🇷"},{code:"MX",name:"Mexico",dial:"+52",flag:"🇲🇽"},{code:"JP",name:"Japan",dial:"+81",flag:"🇯🇵"},{code:"CN",name:"China",dial:"+86",flag:"🇨🇳"},{code:"RU",name:"Russia",dial:"+7",flag:"🇷🇺"},{code:"ZA",name:"South Africa",dial:"+27",flag:"🇿🇦"},{code:"NG",name:"Nigeria",dial:"+234",flag:"🇳🇬"},{code:"KE",name:"Kenya",dial:"+254",flag:"🇰🇪"},{code:"AE",name:"United Arab Emirates",dial:"+971",flag:"🇦🇪"},{code:"SA",name:"Saudi Arabia",dial:"+966",flag:"🇸🇦"},{code:"SG",name:"Singapore",dial:"+65",flag:"🇸🇬"},{code:"MY",name:"Malaysia",dial:"+60",flag:"🇲🇾"},{code:"ID",name:"Indonesia",dial:"+62",flag:"🇮🇩"},{code:"PH",name:"Philippines",dial:"+63",flag:"🇵🇭"},{code:"TH",name:"Thailand",dial:"+66",flag:"🇹🇭"},{code:"VN",name:"Vietnam",dial:"+84",flag:"🇻🇳"},{code:"KR",name:"South Korea",dial:"+82",flag:"🇰🇷"},{code:"NZ",name:"New Zealand",dial:"+64",flag:"🇳🇿"},{code:"IE",name:"Ireland",dial:"+353",flag:"🇮🇪"},{code:"NL",name:"Netherlands",dial:"+31",flag:"🇳🇱"},{code:"SE",name:"Sweden",dial:"+46",flag:"🇸🇪"},{code:"NO",name:"Norway",dial:"+47",flag:"🇳🇴"},{code:"DK",name:"Denmark",dial:"+45",flag:"🇩🇰"},{code:"CH",name:"Switzerland",dial:"+41",flag:"🇨🇭"},{code:"PL",name:"Poland",dial:"+48",flag:"🇵🇱"},{code:"PT",name:"Portugal",dial:"+351",flag:"🇵🇹"},{code:"GR",name:"Greece",dial:"+30",flag:"🇬🇷"},{code:"TR",name:"Turkey",dial:"+90",flag:"🇹🇷"},{code:"EG",name:"Egypt",dial:"+20",flag:"🇪🇬"},{code:"AR",name:"Argentina",dial:"+54",flag:"🇦🇷"},{code:"CL",name:"Chile",dial:"+56",flag:"🇨🇱"}];function A(a,m){if(typeof a=="string"&&a.trim()){const d=[...n].sort((i,c)=>c.dial.length-i.dial.length).find(i=>a.startsWith(i.dial));if(d)return{code:d.code,number:a.slice(d.dial.length).trim()}}return{code:m,number:""}}function v({attributes:a={},rules:m={},onChange:s}){const{id:d="",defaultCountry:i="US",label:c,MuiAttributes:N={}}=a,{sx:u,...P}=N,f=n.some(e=>e.code===i)?i:"US",g=A(a.value,f),[h,S]=C.useState(g.code),[p,x]=C.useState(g.number);t.useUpdateEffect(()=>{const e=A(a.value,f);S(e.code),x(e.number)},[a.value]);const b=m?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1,y=(e,l)=>{const r=n.find(q=>q.code===e)||n[0];s?.({id:d,value:`${r.dial} ${l}`.trim(),option:{country:r.code,dial:r.dial,number:l}})},E=e=>{const l=e.target.value;S(l),y(l,p)},R=e=>{x(e.value),y(h,e.value)};return o.jsxs(T,{component:"fieldset",fullWidth:!0,children:[c&&o.jsx(j,{component:"legend",required:b,sx:{mb:1},children:c}),o.jsxs(U,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[o.jsx(I,{select:!0,value:h,onChange:E,size:"small",label:"Country","aria-label":"Country dial code",sx:t.mergeSx(t.premiumInputSx,{minWidth:120,flexShrink:0,...u}),slotProps:{select:{renderValue:e=>{const l=n.find(r=>r.code===e)||n[0];return`${l.flag} ${l.dial}`}}},children:n.map(e=>o.jsxs(M,{value:e.code,children:[e.flag," ",e.name," (",e.dial,")"]},e.code))}),o.jsx(t.PatternFormat,{customInput:I,format:"### ### ####",mask:"_",value:p,onValueChange:R,fullWidth:!0,required:b,label:"Phone number",id:d,name:"intlphone",...P,sx:t.mergeSx(t.premiumInputSx,u)})]})]})}exports.default=v;
@@ -1,144 +0,0 @@
1
- import { jsxs as m, jsx as c } from "react/jsx-runtime";
2
- import x from "react";
3
- import { j as k, m as I, k as A, r as G } from "./AIForm-IafSvW2_.mjs";
4
- import v from "@mui/material/Stack";
5
- import N from "@mui/material/TextField";
6
- import F from "@mui/material/MenuItem";
7
- import K from "@mui/material/FormControl";
8
- import w from "@mui/material/FormLabel";
9
- const n = [
10
- { code: "US", name: "United States", dial: "+1", flag: "🇺🇸" },
11
- { code: "GB", name: "United Kingdom", dial: "+44", flag: "🇬🇧" },
12
- { code: "IN", name: "India", dial: "+91", flag: "🇮🇳" },
13
- { code: "CA", name: "Canada", dial: "+1", flag: "🇨🇦" },
14
- { code: "AU", name: "Australia", dial: "+61", flag: "🇦🇺" },
15
- { code: "DE", name: "Germany", dial: "+49", flag: "🇩🇪" },
16
- { code: "FR", name: "France", dial: "+33", flag: "🇫🇷" },
17
- { code: "IT", name: "Italy", dial: "+39", flag: "🇮🇹" },
18
- { code: "ES", name: "Spain", dial: "+34", flag: "🇪🇸" },
19
- { code: "BR", name: "Brazil", dial: "+55", flag: "🇧🇷" },
20
- { code: "MX", name: "Mexico", dial: "+52", flag: "🇲🇽" },
21
- { code: "JP", name: "Japan", dial: "+81", flag: "🇯🇵" },
22
- { code: "CN", name: "China", dial: "+86", flag: "🇨🇳" },
23
- { code: "RU", name: "Russia", dial: "+7", flag: "🇷🇺" },
24
- { code: "ZA", name: "South Africa", dial: "+27", flag: "🇿🇦" },
25
- { code: "NG", name: "Nigeria", dial: "+234", flag: "🇳🇬" },
26
- { code: "KE", name: "Kenya", dial: "+254", flag: "🇰🇪" },
27
- { code: "AE", name: "United Arab Emirates", dial: "+971", flag: "🇦🇪" },
28
- { code: "SA", name: "Saudi Arabia", dial: "+966", flag: "🇸🇦" },
29
- { code: "SG", name: "Singapore", dial: "+65", flag: "🇸🇬" },
30
- { code: "MY", name: "Malaysia", dial: "+60", flag: "🇲🇾" },
31
- { code: "ID", name: "Indonesia", dial: "+62", flag: "🇮🇩" },
32
- { code: "PH", name: "Philippines", dial: "+63", flag: "🇵🇭" },
33
- { code: "TH", name: "Thailand", dial: "+66", flag: "🇹🇭" },
34
- { code: "VN", name: "Vietnam", dial: "+84", flag: "🇻🇳" },
35
- { code: "KR", name: "South Korea", dial: "+82", flag: "🇰🇷" },
36
- { code: "NZ", name: "New Zealand", dial: "+64", flag: "🇳🇿" },
37
- { code: "IE", name: "Ireland", dial: "+353", flag: "🇮🇪" },
38
- { code: "NL", name: "Netherlands", dial: "+31", flag: "🇳🇱" },
39
- { code: "SE", name: "Sweden", dial: "+46", flag: "🇸🇪" },
40
- { code: "NO", name: "Norway", dial: "+47", flag: "🇳🇴" },
41
- { code: "DK", name: "Denmark", dial: "+45", flag: "🇩🇰" },
42
- { code: "CH", name: "Switzerland", dial: "+41", flag: "🇨🇭" },
43
- { code: "PL", name: "Poland", dial: "+48", flag: "🇵🇱" },
44
- { code: "PT", name: "Portugal", dial: "+351", flag: "🇵🇹" },
45
- { code: "GR", name: "Greece", dial: "+30", flag: "🇬🇷" },
46
- { code: "TR", name: "Turkey", dial: "+90", flag: "🇹🇷" },
47
- { code: "EG", name: "Egypt", dial: "+20", flag: "🇪🇬" },
48
- { code: "AR", name: "Argentina", dial: "+54", flag: "🇦🇷" },
49
- { code: "CL", name: "Chile", dial: "+56", flag: "🇨🇱" }
50
- ];
51
- function E(e, r) {
52
- if (typeof e == "string" && e.trim()) {
53
- const d = [...n].sort((o, t) => t.dial.length - o.dial.length).find((o) => e.startsWith(o.dial));
54
- if (d)
55
- return { code: d.code, number: e.slice(d.dial.length).trim() };
56
- }
57
- return { code: r, number: "" };
58
- }
59
- function H({ attributes: e = {}, rules: r = {}, onChange: f }) {
60
- const {
61
- id: d = "",
62
- defaultCountry: o = "US",
63
- label: t,
64
- MuiAttributes: P = {}
65
- } = e, { sx: s, ...R } = P, g = n.some((a) => a.code === o) ? o : "US", u = E(e.value, g), [p, h] = x.useState(u.code), [S, b] = x.useState(u.number);
66
- k(() => {
67
- const a = E(e.value, g);
68
- h(a.code), b(a.number);
69
- }, [e.value]);
70
- const y = r?.validation?.some(
71
- (a) => a.rule === "mandatory" || a.rule === "mandatoryselect"
72
- ) || !1, C = (a, l) => {
73
- const i = n.find((T) => T.code === a) || n[0];
74
- f?.({
75
- id: d,
76
- value: `${i.dial} ${l}`.trim(),
77
- option: { country: i.code, dial: i.dial, number: l }
78
- });
79
- }, U = (a) => {
80
- const l = a.target.value;
81
- h(l), C(l, S);
82
- }, M = (a) => {
83
- b(a.value), C(p, a.value);
84
- };
85
- return /* @__PURE__ */ m(K, { component: "fieldset", fullWidth: !0, children: [
86
- t && /* @__PURE__ */ c(w, { component: "legend", required: y, sx: { mb: 1 }, children: t }),
87
- /* @__PURE__ */ m(v, { direction: "row", spacing: 1, sx: {
88
- alignItems: "flex-start"
89
- }, children: [
90
- /* @__PURE__ */ c(
91
- N,
92
- {
93
- select: !0,
94
- value: p,
95
- onChange: U,
96
- size: "small",
97
- label: "Country",
98
- "aria-label": "Country dial code",
99
- sx: I(A, {
100
- minWidth: 120,
101
- flexShrink: 0,
102
- ...s
103
- }),
104
- slotProps: {
105
- select: {
106
- renderValue: (a) => {
107
- const l = n.find((i) => i.code === a) || n[0];
108
- return `${l.flag} ${l.dial}`;
109
- }
110
- }
111
- },
112
- children: n.map((a) => /* @__PURE__ */ m(F, { value: a.code, children: [
113
- a.flag,
114
- " ",
115
- a.name,
116
- " (",
117
- a.dial,
118
- ")"
119
- ] }, a.code))
120
- }
121
- ),
122
- /* @__PURE__ */ c(
123
- G,
124
- {
125
- customInput: N,
126
- format: "### ### ####",
127
- mask: "_",
128
- value: S,
129
- onValueChange: M,
130
- fullWidth: !0,
131
- required: y,
132
- label: "Phone number",
133
- id: d,
134
- name: "intlphone",
135
- ...R,
136
- sx: I(A, s)
137
- }
138
- )
139
- ] })
140
- ] });
141
- }
142
- export {
143
- H as default
144
- };
@@ -1,127 +0,0 @@
1
- import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
- import W from "react";
3
- import k from "@mui/material/Stack";
4
- import v from "@mui/material/TextField";
5
- import E from "@mui/material/IconButton";
6
- import L from "@mui/material/Button";
7
- import T from "@mui/material/FormControl";
8
- import q from "@mui/material/FormLabel";
9
- import w from "@mui/material/FormHelperText";
10
- import B from "@mui/icons-material/Add";
11
- import K from "@mui/icons-material/Close";
12
- import { j as V, m as b, k as A } from "./AIForm-IafSvW2_.mjs";
13
- function C(t) {
14
- return Array.isArray(t) ? t.map((r) => ({
15
- key: r?.key ?? "",
16
- value: r?.value ?? ""
17
- })) : t && typeof t == "object" ? Object.keys(t).map((r) => ({ key: r, value: String(t[r] ?? "") })) : [];
18
- }
19
- function H(t) {
20
- const r = {};
21
- return t.forEach((n) => {
22
- n.key !== "" && (r[n.key] = n.value);
23
- }), r;
24
- }
25
- function Z({ attributes: t = {}, rules: r = {}, onChange: n }) {
26
- const {
27
- MuiAttributes: S = {},
28
- id: I = "",
29
- keyLabel: R = "Key",
30
- valueLabel: j = "Value",
31
- label: u
32
- } = t, { sx: d, ...f } = S, [i, s] = W.useState(() => C(t.value)), p = r?.validation?.some(
33
- (e) => e.rule === "mandatory" || e.rule === "mandatoryselect"
34
- ) || !1;
35
- V(() => {
36
- s(C(t.value));
37
- }, [t.value]);
38
- const c = (e) => {
39
- n?.({ id: I, value: H(e), option: e });
40
- }, y = (e, o, l) => {
41
- const m = i.map((x, M) => M === e ? { ...x, [o]: l } : x);
42
- s(m), c(m);
43
- }, z = () => {
44
- const e = [...i, { key: "", value: "" }];
45
- s(e), c(e);
46
- }, F = (e) => {
47
- const o = i.filter((l, m) => m !== e);
48
- s(o), c(o);
49
- }, h = p && i.filter((e) => e.key !== "").length === 0;
50
- return /* @__PURE__ */ g(T, { component: "fieldset", error: h, fullWidth: !0, children: [
51
- u && /* @__PURE__ */ a(q, { component: "legend", required: p, sx: { mb: 1 }, children: u }),
52
- /* @__PURE__ */ a(k, { spacing: 1.25, children: i.map((e, o) => /* @__PURE__ */ g(
53
- k,
54
- {
55
- direction: "row",
56
- spacing: 1,
57
- sx: {
58
- alignItems: "center"
59
- },
60
- children: [
61
- /* @__PURE__ */ a(
62
- v,
63
- {
64
- ...f,
65
- label: R,
66
- value: e.key,
67
- onChange: (l) => y(o, "key", l.target.value),
68
- size: "small",
69
- fullWidth: !0,
70
- sx: b(A, d)
71
- }
72
- ),
73
- /* @__PURE__ */ a(
74
- v,
75
- {
76
- ...f,
77
- label: j,
78
- value: e.value,
79
- onChange: (l) => y(o, "value", l.target.value),
80
- size: "small",
81
- fullWidth: !0,
82
- sx: b(A, d)
83
- }
84
- ),
85
- /* @__PURE__ */ a(
86
- E,
87
- {
88
- "aria-label": `Remove ${e.key || "row"}`,
89
- onClick: () => F(o),
90
- size: "small",
91
- sx: {
92
- borderRadius: 2,
93
- color: "text.secondary",
94
- "&:hover": { color: "error.main" }
95
- },
96
- children: /* @__PURE__ */ a(K, { fontSize: "small" })
97
- }
98
- )
99
- ]
100
- },
101
- o
102
- )) }),
103
- /* @__PURE__ */ a(
104
- L,
105
- {
106
- onClick: z,
107
- startIcon: /* @__PURE__ */ a(B, {}),
108
- size: "small",
109
- variant: "text",
110
- sx: {
111
- alignSelf: "flex-start",
112
- mt: 1,
113
- borderRadius: 2,
114
- textTransform: "none",
115
- fontWeight: 600
116
- },
117
- children: "Add"
118
- }
119
- ),
120
- h && /* @__PURE__ */ a(w, { children: r?.validation?.find(
121
- (e) => e.rule === "mandatory" || e.rule === "mandatoryselect"
122
- )?.message || "At least one entry is required" })
123
- ] });
124
- }
125
- export {
126
- Z as default
127
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),F=require("react"),v=require("@mui/material/Stack"),j=require("@mui/material/TextField"),z=require("@mui/material/IconButton"),M=require("@mui/material/Button"),T=require("@mui/material/FormControl"),W=require("@mui/material/FormLabel"),E=require("@mui/material/FormHelperText"),L=require("@mui/icons-material/Add"),w=require("@mui/icons-material/Close"),i=require("./AIForm-D204ogdw.js");function k(t){return Array.isArray(t)?t.map(r=>({key:r?.key??"",value:r?.value??""})):t&&typeof t=="object"?Object.keys(t).map(r=>({key:r,value:String(t[r]??"")})):[]}function B(t){const r={};return t.forEach(l=>{l.key!==""&&(r[l.key]=l.value)}),r}function K({attributes:t={},rules:r={},onChange:l}){const{MuiAttributes:q={},id:b="",keyLabel:S="Key",valueLabel:A="Value",label:m}=t,{sx:x,...y}=q,[a,u]=F.useState(()=>k(t.value)),f=r?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1;i.useUpdateEffect(()=>{u(k(t.value))},[t.value]);const d=e=>{l?.({id:b,value:B(e),option:e})},h=(e,o,s)=>{const c=a.map((g,R)=>R===e?{...g,[o]:s}:g);u(c),d(c)},C=()=>{const e=[...a,{key:"",value:""}];u(e),d(e)},I=e=>{const o=a.filter((s,c)=>c!==e);u(o),d(o)},p=f&&a.filter(e=>e.key!=="").length===0;return n.jsxs(T,{component:"fieldset",error:p,fullWidth:!0,children:[m&&n.jsx(W,{component:"legend",required:f,sx:{mb:1},children:m}),n.jsx(v,{spacing:1.25,children:a.map((e,o)=>n.jsxs(v,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[n.jsx(j,{...y,label:S,value:e.key,onChange:s=>h(o,"key",s.target.value),size:"small",fullWidth:!0,sx:i.mergeSx(i.premiumInputSx,x)}),n.jsx(j,{...y,label:A,value:e.value,onChange:s=>h(o,"value",s.target.value),size:"small",fullWidth:!0,sx:i.mergeSx(i.premiumInputSx,x)}),n.jsx(z,{"aria-label":`Remove ${e.key||"row"}`,onClick:()=>I(o),size:"small",sx:{borderRadius:2,color:"text.secondary","&:hover":{color:"error.main"}},children:n.jsx(w,{fontSize:"small"})})]},o))}),n.jsx(M,{onClick:C,startIcon:n.jsx(L,{}),size:"small",variant:"text",sx:{alignSelf:"flex-start",mt:1,borderRadius:2,textTransform:"none",fontWeight:600},children:"Add"}),p&&n.jsx(E,{children:r?.validation?.find(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")?.message||"At least one entry is required"})]})}exports.default=K;
@@ -1,21 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import n, { Suspense as a } from "react";
3
- import s from "@mui/material/Box";
4
- import f from "@mui/material/CircularProgress";
5
- import { i as m } from "./AIForm-IafSvW2_.mjs";
6
- const c = n.lazy(
7
- () => import("@mui/x-charts/LineChart").then((r) => ({ default: r.LineChart }))
8
- );
9
- function d({ attributes: r = {} }) {
10
- const { MuiChartAttributes: e = {}, id: i = "" } = r, o = m("LineChart") || c;
11
- return /* @__PURE__ */ t(
12
- a,
13
- {
14
- fallback: /* @__PURE__ */ t(s, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ t(f, {}) }),
15
- children: /* @__PURE__ */ t(o, { height: 300, ...e }, i)
16
- }
17
- );
18
- }
19
- export {
20
- d as default
21
- };
@@ -1 +0,0 @@
1
- "use strict";var c=Object.create;var u=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var x=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of l(t))!d.call(e,i)&&i!==r&&u(e,i,{get:()=>t[i],enumerable:!(n=a(t,i))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?c(h(e)):{},x(t||!e||!e.__esModule?u(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("react"),j=require("@mui/material/Box"),C=require("@mui/material/CircularProgress"),y=require("./AIForm-D204ogdw.js"),g=o.lazy(()=>import("@mui/x-charts/LineChart").then(e=>({default:e.LineChart})));function p({attributes:e={}}){const{MuiChartAttributes:t={},id:r=""}=e,n=y.getMuiX("LineChart")||g;return s.jsx(o.Suspense,{fallback:s.jsx(j,{sx:{display:"flex",justifyContent:"center",p:2},children:s.jsx(C,{})}),children:s.jsx(n,{height:300,...t},r)})}exports.default=p;