dynamic-mui 2.4.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/{AIForm-DtRl0WdY.mjs → AIForm-Czsvpf7g.mjs} +578 -563
  2. package/dist/AIForm-LoeI18mO.js +43 -0
  3. package/dist/{accordion-BaiGxDcw.js → accordion-8p1FoyfL.js} +1 -1
  4. package/dist/{accordion-xg_TxxYS.mjs → accordion-CQ4Vldth.mjs} +1 -1
  5. package/dist/{addressfield-BvQEHdEk.mjs → addressfield-N7DifI3i.mjs} +52 -40
  6. package/dist/addressfield-T4e_d87q.js +1 -0
  7. package/dist/ai/index.cjs +1 -1
  8. package/dist/ai/index.mjs +1 -1
  9. package/dist/asyncautocomplete-BB_MyjIj.mjs +92 -0
  10. package/dist/asyncautocomplete-CpO6EO3W.js +1 -0
  11. package/dist/{bar-BiIzbOC3.js → bar-BOse0ZkP.js} +1 -1
  12. package/dist/{bar-DNc7TMKj.mjs → bar-CbpJ-MEV.mjs} +1 -1
  13. package/dist/cascadeselect-C30RVgmc.js +1 -0
  14. package/dist/cascadeselect-PzCw6JHX.mjs +66 -0
  15. package/dist/colorpicker-CMhVJNQT.mjs +111 -0
  16. package/dist/{colorpicker-DpLvK1WR.js → colorpicker-DoNrfUY7.js} +1 -1
  17. package/dist/{consentfield-B21l9tGo.js → consentfield-Bp1dXs7L.js} +1 -1
  18. package/dist/{consentfield-CGT98YbR.mjs → consentfield-DIa3sXrr.mjs} +13 -11
  19. package/dist/{datatable-B_6wXh2g.mjs → datatable-CO0Iv6R6.mjs} +1 -1
  20. package/dist/{datatable-Bv0Q37Zy.js → datatable-CyfyY3Wh.js} +1 -1
  21. package/dist/dynamic-mui.cjs +1 -1
  22. package/dist/dynamic-mui.mjs +2 -2
  23. package/dist/editabletable-CCDJ2BPB.js +1 -0
  24. package/dist/{editabletable-YaFqdLvf.mjs → editabletable-C_MA7QEb.mjs} +19 -17
  25. package/dist/{fileupload-ZBi72f1R.mjs → fileupload-DX3dxKFN.mjs} +16 -3
  26. package/dist/{fileupload--KzSGb5a.js → fileupload-WV5shCIK.js} +1 -1
  27. package/dist/{formrepeater-BhUEa4BI.js → formrepeater-Cxu8Dk8P.js} +1 -1
  28. package/dist/{formrepeater-Cwgtvz1c.mjs → formrepeater-D5K8qgAA.mjs} +25 -21
  29. package/dist/{formwizard-CYcgf5jL.mjs → formwizard-B-HCfrnp.mjs} +1 -1
  30. package/dist/{formwizard-BlozHDc_.js → formwizard-HRF3hTyF.js} +1 -1
  31. package/dist/geofield-0k7PkHRa.js +1 -0
  32. package/dist/{geofield-xqZy_DAY.mjs → geofield-DlqMZ_hl.mjs} +28 -24
  33. package/dist/{group-DmLN-b09.mjs → group-BFDXdAfg.mjs} +1 -1
  34. package/dist/{group-Dtju1rHQ.js → group-mONe185y.js} +1 -1
  35. package/dist/{intlphone-CXUQP9Gp.mjs → intlphone-Bbk2UF9T.mjs} +12 -8
  36. package/dist/{intlphone-BeHXAcFi.js → intlphone-zZ0xd-DG.js} +1 -1
  37. package/dist/{keyvaluefield-BZQDG0l5.js → keyvaluefield-B6oRZzic.js} +1 -1
  38. package/dist/{keyvaluefield-BJoEbe4I.mjs → keyvaluefield-BynOkgTq.mjs} +4 -2
  39. package/dist/{line-tIm99vYW.js → line-ChQNdVfl.js} +1 -1
  40. package/dist/{line-B3CAbZOo.mjs → line-DebtzkF3.mjs} +1 -1
  41. package/dist/lineitemlist-CI0LwIUz.js +1 -0
  42. package/dist/{lineitemlist-CBSqoC9g.mjs → lineitemlist-CjFNpqI5.mjs} +23 -19
  43. package/dist/{list-C8QMpJOJ.mjs → list-B5wBsflP.mjs} +1 -1
  44. package/dist/{list-D_cawpPI.js → list-CJFKxKyN.js} +1 -1
  45. package/dist/locationfield-CrOMF7jt.js +1 -0
  46. package/dist/locationfield-DQj3yDCa.mjs +118 -0
  47. package/dist/markdowneditor-Jaz7uTyZ.js +2 -0
  48. package/dist/{markdowneditor-DFOgRmdL.mjs → markdowneditor-emqJhQV7.mjs} +15 -11
  49. package/dist/{matrixfield-nWt6Cug5.js → matrixfield-BPJsawGk.js} +1 -1
  50. package/dist/{matrixfield-0lnuaEks.mjs → matrixfield-j5mf9lh5.mjs} +34 -30
  51. package/dist/{mixChart-ISf3Kbr-.mjs → mixChart-Doq4lt7Z.mjs} +2 -2
  52. package/dist/mixChart-rgyMCdnp.js +1 -0
  53. package/dist/{multitextbox-DmAWV163.mjs → multitextbox-CyZiTd_E.mjs} +1 -1
  54. package/dist/{multitextbox-oEgl2F8-.js → multitextbox-DQbcEqkM.js} +1 -1
  55. package/dist/{npsscale-CdTEwERY.mjs → npsscale-BIkJMD4Z.mjs} +7 -3
  56. package/dist/{npsscale-DW4sxcLz.js → npsscale-oUUyPdxP.js} +1 -1
  57. package/dist/{numberstepper-cDosevJb.js → numberstepper-DRIvgtcH.js} +1 -1
  58. package/dist/{numberstepper-BwQ5coLc.mjs → numberstepper-thjufBMI.mjs} +6 -2
  59. package/dist/{pie-CBRckgd4.mjs → pie-4SHUYmRs.mjs} +1 -1
  60. package/dist/{pie-gAfuDR1F.js → pie-COA-uozf.js} +1 -1
  61. package/dist/richtexteditor-BSV7hG6d.js +1 -0
  62. package/dist/{richtexteditor-xrbv8PXZ.mjs → richtexteditor-CvZ3Y7X1.mjs} +4 -2
  63. package/dist/{signature-FM6L60nk.js → signature-6QvVbfkT.js} +2 -2
  64. package/dist/{signature-CP_lA_Yh.mjs → signature-DeDxnc8U.mjs} +4 -2
  65. package/dist/{stepper-CjGNFyBz.js → stepper-CDsErlLH.js} +1 -1
  66. package/dist/{stepper-BprezTzX.mjs → stepper-Sx3SWXTM.mjs} +1 -1
  67. package/dist/{summaryfield-5mJRwVZ4.mjs → summaryfield-CAJjGmE2.mjs} +1 -1
  68. package/dist/{summaryfield-C3xmqZQp.js → summaryfield-DxzQ3g6Z.js} +1 -1
  69. package/dist/{tabs-B4P59kHX.js → tabs-CnDP2ngC.js} +1 -1
  70. package/dist/{tabs-By-Mm8vm.mjs → tabs-CvHNZU5o.mjs} +1 -1
  71. package/dist/tagsinput-DZcLPuX1.js +1 -0
  72. package/dist/tagsinput-bWU3Mem0.mjs +58 -0
  73. package/package.json +11 -11
  74. package/dist/AIForm-Dv8ahXyE.js +0 -43
  75. package/dist/addressfield-vVizrbZP.js +0 -1
  76. package/dist/asyncautocomplete-AmSRs7PY.mjs +0 -89
  77. package/dist/asyncautocomplete-Dtmxh4l1.js +0 -1
  78. package/dist/cascadeselect-BlznIKS6.mjs +0 -64
  79. package/dist/cascadeselect-DqLtG-W9.js +0 -1
  80. package/dist/colorpicker-hP3b7teC.mjs +0 -98
  81. package/dist/editabletable-D3c3DJxX.js +0 -1
  82. package/dist/geofield-BynrTSVm.js +0 -1
  83. package/dist/lineitemlist-RqStjYB-.js +0 -1
  84. package/dist/locationfield-BiLy-c09.js +0 -1
  85. package/dist/locationfield-KBbu-98L.mjs +0 -119
  86. package/dist/markdowneditor-Dy7Q01FM.js +0 -2
  87. package/dist/mixChart-C3o184UT.js +0 -1
  88. package/dist/richtexteditor-DI-h5Efn.js +0 -1
  89. package/dist/tagsinput-BwM3NYK_.js +0 -1
  90. package/dist/tagsinput-Ce4EWy4i.mjs +0 -58
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),g=require("react"),a=require("@mui/material"),T=require("./AIForm-LoeI18mO.js");function k(t,o){if(Array.isArray(t)&&t.length>0){const l=t[0],c=Object.keys(l).find(d=>d!=="fee");if(c)return c.replace(/\d+$/,"")}return o}function v(t,o){return Array.isArray(t)&&t.length>0?t.map((l,c)=>{const{fee:d=0,...f}=l,u=Object.keys(f)[0]||`${o}${c+1}`;return{key:u,description:String(f[u]??""),fee:Number(d)||0}}):[{key:`${o}1`,description:"",fee:0}]}function W(t){return t.map(o=>({fee:o.fee,[o.key]:o.description}))}function F({attributes:t={},rules:o={},onChange:l}){const{id:c="",keyPrefix:d="item",showRowBadge:f=!0,readOnly:u=!1,showActions:I=!0,MuiAttributes:j={}}=t,w=I&&!u,{row:P={},rowBadge:b={},description:A={},fee:B={},addButton:S={},removeButton:C={}}=j,h=o?.validation?.some(e=>e.rule==="mandatory")||!1,m=k(t.value,d),[s,p]=g.useState(()=>v(t.value,m));T.useUpdateEffect(()=>{const e=k(t.value,d),n=v(t.value,e);JSON.stringify(n)!==JSON.stringify(s)&&p(n)},[t.value]),g.useEffect(()=>{l&&l({id:c,value:W(s)})},[s,c]);const $=()=>{const e=s.length+1;p([...s,{key:`${m}${e}`,description:"",fee:0}])},R=e=>{const r=s.filter((x,y)=>y!==e).map((x,y)=>({...x,key:`${m}${y+1}`}));p(r)},q=(e,n)=>{const r=[...s];r[e]={...r[e],description:n},p(r)},O=(e,n)=>{const r=[...s];r[e]={...r[e],fee:Number(n)||0},p(r)};return i.jsx(a.Stack,{spacing:1.5,sx:{width:"100%"},children:s.map((e,n)=>i.jsxs(a.Box,{sx:{display:"flex",gap:1,alignItems:"flex-start",p:1.5,border:"1px solid",borderColor:"divider",borderRadius:1,backgroundColor:"background.paper"},...P,children:[f&&i.jsx(a.Typography,{variant:"caption",sx:{minWidth:24,height:24,borderRadius:"50%",backgroundColor:"primary.main",color:"primary.contrastText",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,flexShrink:0,mt:.75},...b,children:n+1}),i.jsx(a.TextField,{fullWidth:!0,size:"small",label:"Description",required:h,error:h&&!e.description,helperText:h&&!e.description?"Required":"",value:e.description,onChange:r=>q(n,r.target.value),...A,slotProps:{input:{readOnly:u}}}),i.jsx(a.TextField,{size:"small",label:"Fee",type:"number",sx:{minWidth:120},required:h,value:e.fee,onChange:r=>O(n,r.target.value),onWheel:r=>r.target.blur(),...B,slotProps:{input:{readOnly:u,startAdornment:i.jsx(a.InputAdornment,{position:"start",children:"$"})},htmlInput:{min:0,step:.01}}}),w&&(n===s.length-1?i.jsx(a.Button,{variant:"contained",color:"primary",onClick:$,sx:{minWidth:40,px:1,height:40,flexShrink:0},title:"Add row",...S,children:i.jsx(a.Icon,{children:"add"})}):i.jsx(a.IconButton,{color:"error",onClick:()=>R(n),sx:{height:40,flexShrink:0},title:"Remove row",...C,children:i.jsx(a.Icon,{children:"delete"})}))]},e.key))})}exports.default=F;
@@ -1,10 +1,10 @@
1
1
  import { jsx as s, jsxs as O } from "react/jsx-runtime";
2
2
  import { useState as N, useEffect as T } from "react";
3
3
  import { Stack as q, Box as z, Typography as E, TextField as g, InputAdornment as F, Button as D, Icon as x, IconButton as J } from "@mui/material";
4
- import { j as L } from "./AIForm-DtRl0WdY.mjs";
4
+ import { j as L } from "./AIForm-Czsvpf7g.mjs";
5
5
  function k(r, o) {
6
6
  if (Array.isArray(r) && r.length > 0) {
7
- const c = r[0], a = Object.keys(c).find((d) => d !== "fee");
7
+ const c = r[0], a = Object.keys(c).find((l) => l !== "fee");
8
8
  if (a)
9
9
  return a.replace(/\d+$/, "");
10
10
  }
@@ -12,11 +12,11 @@ function k(r, o) {
12
12
  }
13
13
  function v(r, o) {
14
14
  return Array.isArray(r) && r.length > 0 ? r.map((c, a) => {
15
- const { fee: d = 0, ...f } = c, l = Object.keys(f)[0] || `${o}${a + 1}`;
15
+ const { fee: l = 0, ...f } = c, d = Object.keys(f)[0] || `${o}${a + 1}`;
16
16
  return {
17
- key: l,
18
- description: String(f[l] ?? ""),
19
- fee: Number(d) || 0
17
+ key: d,
18
+ description: String(f[d] ?? ""),
19
+ fee: Number(l) || 0
20
20
  };
21
21
  }) : [{ key: `${o}1`, description: "", fee: 0 }];
22
22
  }
@@ -29,24 +29,24 @@ function M(r) {
29
29
  function H({ attributes: r = {}, rules: o = {}, onChange: c }) {
30
30
  const {
31
31
  id: a = "",
32
- keyPrefix: d = "item",
32
+ keyPrefix: l = "item",
33
33
  /** Set to false to hide the row number badge. Defaults to true. */
34
34
  showRowBadge: f = !0,
35
35
  /** Set to true to render the Description/Fee fields as read-only and hide the Add/Remove buttons. */
36
- readOnly: l = !1,
36
+ readOnly: d = !1,
37
37
  /** Set to false to hide the Add/Remove buttons while keeping fields editable. Defaults to true. */
38
38
  showActions: w = !0,
39
39
  MuiAttributes: I = {}
40
- } = r, P = w && !l, {
40
+ } = r, P = w && !d, {
41
41
  row: b = {},
42
42
  rowBadge: A = {},
43
43
  description: B = {},
44
44
  fee: C = {},
45
45
  addButton: $ = {},
46
46
  removeButton: S = {}
47
- } = I, u = o?.validation?.some((e) => e.rule === "mandatory") || !1, h = k(r.value, d), [i, p] = N(() => v(r.value, h));
47
+ } = I, u = o?.validation?.some((e) => e.rule === "mandatory") || !1, h = k(r.value, l), [i, p] = N(() => v(r.value, h));
48
48
  L(() => {
49
- const e = k(r.value, d), n = v(r.value, e);
49
+ const e = k(r.value, l), n = v(r.value, e);
50
50
  JSON.stringify(n) !== JSON.stringify(i) && p(n);
51
51
  }, [r.value]), T(() => {
52
52
  c && c({ id: a, value: M(i) });
@@ -111,8 +111,10 @@ function H({ attributes: r = {}, rules: o = {}, onChange: c }) {
111
111
  helperText: u && !e.description ? "Required" : "",
112
112
  value: e.description,
113
113
  onChange: (t) => W(n, t.target.value),
114
- InputProps: { readOnly: l },
115
- ...B
114
+ ...B,
115
+ slotProps: {
116
+ input: { readOnly: d }
117
+ }
116
118
  }
117
119
  ),
118
120
  /* @__PURE__ */ s(
@@ -125,13 +127,15 @@ function H({ attributes: r = {}, rules: o = {}, onChange: c }) {
125
127
  required: u,
126
128
  value: e.fee,
127
129
  onChange: (t) => K(n, t.target.value),
128
- InputProps: {
129
- readOnly: l,
130
- startAdornment: /* @__PURE__ */ s(F, { position: "start", children: "$" })
131
- },
132
- inputProps: { min: 0, step: 0.01 },
133
130
  onWheel: (t) => t.target.blur(),
134
- ...C
131
+ ...C,
132
+ slotProps: {
133
+ input: {
134
+ readOnly: d,
135
+ startAdornment: /* @__PURE__ */ s(F, { position: "start", children: "$" })
136
+ },
137
+ htmlInput: { min: 0, step: 0.01 }
138
+ }
135
139
  }
136
140
  ),
137
141
  P && (n === i.length - 1 ? /* @__PURE__ */ s(
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
2
  import { List as a, ListItem as u, ListItemIcon as x, Icon as L, ListItemText as p } from "@mui/material";
3
- import { m as d, l } from "./AIForm-DtRl0WdY.mjs";
3
+ import { m as d, l } from "./AIForm-Czsvpf7g.mjs";
4
4
  function A({ attributes: i = {} }) {
5
5
  const { MuiAttributes: e = {}, items: s = [] } = i, { sx: o, ...n } = e;
6
6
  return /* @__PURE__ */ r(a, { ...n, sx: d(l, o), children: (Array.isArray(s) ? s : []).map((t, c) => /* @__PURE__ */ m(u, { ...t.MuiListItemAttributes, children: [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("@mui/material"),i=require("./AIForm-Dv8ahXyE.js");function x({attributes:n={}}){const{MuiAttributes:c={},items:s=[]}=n,{sx:u,...o}=c;return r.jsx(e.List,{...o,sx:i.mergeSx(i.premiumSurfaceSx,u),children:(Array.isArray(s)?s:[]).map((t,a)=>r.jsxs(e.ListItem,{...t.MuiListItemAttributes,children:[t.icon&&r.jsx(e.ListItemIcon,{children:r.jsx(e.Icon,{children:t.icon})}),r.jsx(e.ListItemText,{primary:t.primary,secondary:t.secondary,...t.MuiListItemTextAttributes})]},a))})}exports.default=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("@mui/material"),i=require("./AIForm-LoeI18mO.js");function x({attributes:n={}}){const{MuiAttributes:c={},items:s=[]}=n,{sx:u,...o}=c;return r.jsx(e.List,{...o,sx:i.mergeSx(i.premiumSurfaceSx,u),children:(Array.isArray(s)?s:[]).map((t,a)=>r.jsxs(e.ListItem,{...t.MuiListItemAttributes,children:[t.icon&&r.jsx(e.ListItemIcon,{children:r.jsx(e.Icon,{children:t.icon})}),r.jsx(e.ListItemText,{primary:t.primary,secondary:t.secondary,...t.MuiListItemTextAttributes})]},a))})}exports.default=x;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),V=require("react"),d=require("./AIForm-LoeI18mO.js"),C=require("@mui/material/TextField"),H=require("@mui/material/Button"),m=require("@mui/material/Box"),L=require("@mui/material");function R({attributes:l={},rules:h={},onChange:i,submitTick:v,messages:B}){const{id:p="",MuiAttributes:s={},InputProps:F={},format:x="",buttonText:g="Update Location",buttonIcon:S="location_on",buttonDisplay:b="both",MuiButtonAttributes:P={},disabled:I=!1}=l,[a,u]=V.useState({value:l.value!==void 0?l.value:"",helperText:s.helperText||"",error:!1});V.useEffect(()=>{l.value!==void 0&&l.value!==a.value&&u(e=>({...e,value:l.value}))},[l.value]);const w=e=>x?d.numeral(e).format(x):e,f=e=>{const{validation:t}=h;if(t)for(let n=0;n<t.length;n+=1){const r=t[n],j=d.Validation[r.rule];if(!(typeof j=="function"?j(e,r.value):!0)){const _=r.rule==="mandatory"?B?.required||"This field is required":"";return{isValid:!1,message:r.message||_}}}return{isValid:!0,message:""}};d.useUpdateEffect(()=>{if(v){const e=f(a.value);u(t=>({...t,helperText:e.message,error:!e.isValid}))}},[v]);const A=e=>{const{value:t}=e.target,n=f(t);u({value:t,helperText:n.message,error:!n.isValid})},M=e=>{const{value:t}=e.target,n=w(t),r=f(n);u({value:n,helperText:r.message,error:!r.isValid}),typeof i=="function"&&i({id:p,value:n})},k=()=>{i&&i({id:p,value:a.value,option:"location_update_request"})},z=()=>{const e=b,t=o.jsx(L.Icon,{children:S});switch(e){case"icon":return t;case"text":return o.jsx(o.Fragment,{children:g});default:return o.jsxs(o.Fragment,{children:[t,o.jsx(m,{component:"span",sx:{ml:.5},children:g})]})}},D=h?.validation?.some(e=>e.rule==="mandatory")||!1,c={...s},q=s.inputProps||s.slotProps?.htmlInput||{},y={...s.InputProps||s.slotProps?.input||{},...d.getInputProps(F)},E={...s.slotProps||{},input:y,htmlInput:q};delete c.slotProps,delete c.inputProps,delete c.InputProps;const O=s.variant||"outlined",T=s.size||"medium",W=T==="small"?O==="outlined"?40:48:56;return o.jsxs(m,{sx:{display:"flex",gap:1,alignItems:"flex-start",width:"100%"},children:[o.jsx(m,{sx:{flex:1,minWidth:0},children:o.jsx(C,{fullWidth:!0,...c,id:p,required:D,slotProps:E,inputProps:q,InputProps:y,onChange:A,onBlur:M,value:a.value,error:a.error,helperText:a.helperText,disabled:I})}),o.jsx(H,{variant:"outlined",color:"primary",size:T==="small"?"small":"medium",onClick:k,disabled:I,...P,sx:{whiteSpace:"nowrap",minWidth:"auto",height:W,flexShrink:0,...P?.sx},children:z()})]})}exports.default=R;
@@ -0,0 +1,118 @@
1
+ import { jsxs as B, jsx as s, Fragment as q } from "react/jsx-runtime";
2
+ import w from "react";
3
+ import { j as L, t as O, V as U, v as R } from "./AIForm-Czsvpf7g.mjs";
4
+ import G from "@mui/material/TextField";
5
+ import J from "@mui/material/Button";
6
+ import f from "@mui/material/Box";
7
+ import { Icon as K } from "@mui/material";
8
+ function ot({ attributes: l = {}, rules: m = {}, onChange: i, submitTick: h, messages: F }) {
9
+ const {
10
+ id: c = "",
11
+ MuiAttributes: a = {},
12
+ InputProps: S = {},
13
+ format: v = "",
14
+ buttonText: x = "Update Location",
15
+ buttonIcon: b = "location_on",
16
+ buttonDisplay: j = "both",
17
+ MuiButtonAttributes: g = {},
18
+ disabled: P = !1
19
+ } = l, [r, u] = w.useState({
20
+ value: l.value !== void 0 ? l.value : "",
21
+ helperText: a.helperText || "",
22
+ error: !1
23
+ });
24
+ w.useEffect(() => {
25
+ l.value !== void 0 && l.value !== r.value && u((t) => ({ ...t, value: l.value }));
26
+ }, [l.value]);
27
+ const k = (t) => v ? R(t).format(v) : t, p = (t) => {
28
+ const { validation: e } = m;
29
+ if (e)
30
+ for (let o = 0; o < e.length; o += 1) {
31
+ const n = e[o], y = U[n.rule];
32
+ if (!(typeof y == "function" ? y(t, n.value) : !0)) {
33
+ const H = n.rule === "mandatory" ? F?.required || "This field is required" : "";
34
+ return { isValid: !1, message: n.message || H };
35
+ }
36
+ }
37
+ return { isValid: !0, message: "" };
38
+ };
39
+ L(() => {
40
+ if (h) {
41
+ const t = p(r.value);
42
+ u((e) => ({ ...e, helperText: t.message, error: !t.isValid }));
43
+ }
44
+ }, [h]);
45
+ const z = (t) => {
46
+ const { value: e } = t.target, o = p(e);
47
+ u({ value: e, helperText: o.message, error: !o.isValid });
48
+ }, A = (t) => {
49
+ const { value: e } = t.target, o = k(e), n = p(o);
50
+ u({ value: o, helperText: n.message, error: !n.isValid }), typeof i == "function" && i({ id: c, value: o });
51
+ }, D = () => {
52
+ i && i({ id: c, value: r.value, option: "location_update_request" });
53
+ }, E = () => {
54
+ const t = j, e = /* @__PURE__ */ s(K, { children: b });
55
+ switch (t) {
56
+ case "icon":
57
+ return e;
58
+ case "text":
59
+ return /* @__PURE__ */ s(q, { children: x });
60
+ default:
61
+ return /* @__PURE__ */ B(q, { children: [
62
+ e,
63
+ /* @__PURE__ */ s(f, { component: "span", sx: { ml: 0.5 }, children: x })
64
+ ] });
65
+ }
66
+ }, M = m?.validation?.some((t) => t.rule === "mandatory") || !1, d = { ...a }, I = a.inputProps || a.slotProps?.htmlInput || {}, V = {
67
+ ...a.InputProps || a.slotProps?.input || {},
68
+ ...O(S)
69
+ }, W = {
70
+ ...a.slotProps || {},
71
+ input: V,
72
+ htmlInput: I
73
+ };
74
+ delete d.slotProps, delete d.inputProps, delete d.InputProps;
75
+ const _ = a.variant || "outlined", T = a.size || "medium", C = T === "small" ? _ === "outlined" ? 40 : 48 : 56;
76
+ return /* @__PURE__ */ B(f, { sx: { display: "flex", gap: 1, alignItems: "flex-start", width: "100%" }, children: [
77
+ /* @__PURE__ */ s(f, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ s(
78
+ G,
79
+ {
80
+ fullWidth: !0,
81
+ ...d,
82
+ id: c,
83
+ required: M,
84
+ slotProps: W,
85
+ inputProps: I,
86
+ InputProps: V,
87
+ onChange: z,
88
+ onBlur: A,
89
+ value: r.value,
90
+ error: r.error,
91
+ helperText: r.helperText,
92
+ disabled: P
93
+ }
94
+ ) }),
95
+ /* @__PURE__ */ s(
96
+ J,
97
+ {
98
+ variant: "outlined",
99
+ color: "primary",
100
+ size: T === "small" ? "small" : "medium",
101
+ onClick: D,
102
+ disabled: P,
103
+ ...g,
104
+ sx: {
105
+ whiteSpace: "nowrap",
106
+ minWidth: "auto",
107
+ height: C,
108
+ flexShrink: 0,
109
+ ...g?.sx
110
+ },
111
+ children: E()
112
+ }
113
+ )
114
+ ] });
115
+ }
116
+ export {
117
+ ot as default
118
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),v=require("@mui/material/Box"),w=require("@mui/material/Stack"),j=require("@mui/material/Button"),q=require("@mui/material/TextField"),y=require("@mui/material/FormControl"),k=require("@mui/material/FormLabel"),S=require("@mui/material/styles"),a=require("./AIForm-LoeI18mO.js");function C(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function M(r){let e=C(r||"");return e=e.replace(/^###\s+(.*)$/gm,"<h3>$1</h3>"),e=e.replace(/^##\s+(.*)$/gm,"<h2>$1</h2>"),e=e.replace(/^#\s+(.*)$/gm,"<h1>$1</h1>"),e=e.replace(/(?:^-\s+.*(?:\n|$))+/gm,o=>`<ul>${o.trimEnd().split(`
2
+ `).map(s=>s.replace(/^-\s+(.*)$/,"<li>$1</li>")).join("")}</ul>`),e=e.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,'<a href="$2">$1</a>'),e=e.replace(/`([^`]+)`/g,"<code>$1</code>"),e=e.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),e=e.replace(/\*([^*]+)\*/g,"<em>$1</em>"),e=e.split(/\n{2,}/).map(o=>{const n=o.trim();return n?/^<(h1|h2|h3|ul|pre)/.test(n)?n:`<p>${n.replace(/\n/g,"<br />")}</p>`:""}).join(""),e}function I({attributes:r={},rules:e={},onChange:o}){const{id:n="",label:s,rows:i=6,MuiAttributes:g={}}=r,{sx:h,...x}=g,[u,c]=p.useState(r.value||""),[d,f]=p.useState(!1);a.useUpdateEffect(()=>{c(r.value||"")},[r.value]);const $=e?.validation?.some(t=>t.rule==="mandatory"||t.rule==="mandatoryselect")||!1,b=t=>{const m=t.target.value;c(m),o?.({id:n,value:m})};return l.jsxs(y,{required:$,component:"fieldset",fullWidth:!0,children:[l.jsxs(w,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",mb:1},children:[s?l.jsx(k,{component:"legend",children:s}):l.jsx("span",{}),l.jsx(j,{size:"small",variant:"outlined",onClick:()=>f(t=>!t),sx:{borderRadius:"10px",textTransform:"none"},children:d?"Write":"Preview"})]}),d?l.jsx(v,{"data-testid":"markdown-preview",dangerouslySetInnerHTML:{__html:M(u)},sx:{minHeight:t=>t.spacing(i*3),p:2,borderRadius:"10px",border:t=>`1px solid ${S.alpha(t.palette.text.primary,.12)}`,backgroundColor:t=>t.palette.background.paper,"& :first-of-type":{mt:0},"& :last-child":{mb:0}}}):l.jsx(q,{id:n||void 0,value:u,onChange:b,multiline:!0,minRows:i,fullWidth:!0,placeholder:"Write markdown…",...x,sx:a.mergeSx(a.premiumInputSx,h),slotProps:{htmlInput:{"aria-label":s||"markdown editor"}}})]})}exports.default=I;
@@ -7,12 +7,12 @@ import k from "@mui/material/TextField";
7
7
  import y from "@mui/material/FormControl";
8
8
  import C from "@mui/material/FormLabel";
9
9
  import { alpha as S } from "@mui/material/styles";
10
- import { j, m as M, k as H } from "./AIForm-DtRl0WdY.mjs";
11
- function R(t) {
10
+ import { j, m as M, k as H } from "./AIForm-Czsvpf7g.mjs";
11
+ function I(t) {
12
12
  return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
13
13
  }
14
- function T(t) {
15
- let e = R(t || "");
14
+ function R(t) {
15
+ let e = I(t || "");
16
16
  return e = e.replace(/^###\s+(.*)$/gm, "<h3>$1</h3>"), e = e.replace(/^##\s+(.*)$/gm, "<h2>$1</h2>"), e = e.replace(/^#\s+(.*)$/gm, "<h1>$1</h1>"), e = e.replace(/(?:^-\s+.*(?:\n|$))+/gm, (a) => `<ul>${a.trimEnd().split(`
17
17
  `).map((n) => n.replace(/^-\s+(.*)$/, "<li>$1</li>")).join("")}</ul>`), e = e.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, '<a href="$2">$1</a>'), e = e.replace(/`([^`]+)`/g, "<code>$1</code>"), e = e.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>"), e = e.replace(/\*([^*]+)\*/g, "<em>$1</em>"), e = e.split(/\n{2,}/).map((a) => {
18
18
  const o = a.trim();
@@ -20,7 +20,7 @@ function T(t) {
20
20
  }).join(""), e;
21
21
  }
22
22
  function U({ attributes: t = {}, rules: e = {}, onChange: a }) {
23
- const { id: o = "", label: n, rows: i = 6, MuiAttributes: f = {} } = t, { sx: h, ...g } = f, [m, s] = u.useState(t.value || ""), [p, x] = u.useState(!1);
23
+ const { id: o = "", label: n, rows: i = 6, MuiAttributes: h = {} } = t, { sx: f, ...g } = h, [m, s] = u.useState(t.value || ""), [p, x] = u.useState(!1);
24
24
  j(() => {
25
25
  s(t.value || "");
26
26
  }, [t.value]);
@@ -32,9 +32,11 @@ function U({ attributes: t = {}, rules: e = {}, onChange: a }) {
32
32
  v,
33
33
  {
34
34
  direction: "row",
35
- justifyContent: "space-between",
36
- alignItems: "center",
37
- sx: { mb: 1 },
35
+ sx: {
36
+ justifyContent: "space-between",
37
+ alignItems: "center",
38
+ mb: 1
39
+ },
38
40
  children: [
39
41
  n ? /* @__PURE__ */ l(C, { component: "legend", children: n }) : /* @__PURE__ */ l("span", {}),
40
42
  /* @__PURE__ */ l(
@@ -54,7 +56,7 @@ function U({ attributes: t = {}, rules: e = {}, onChange: a }) {
54
56
  w,
55
57
  {
56
58
  "data-testid": "markdown-preview",
57
- dangerouslySetInnerHTML: { __html: T(m) },
59
+ dangerouslySetInnerHTML: { __html: R(m) },
58
60
  sx: {
59
61
  minHeight: (r) => r.spacing(i * 3),
60
62
  p: 2,
@@ -78,9 +80,11 @@ function U({ attributes: t = {}, rules: e = {}, onChange: a }) {
78
80
  minRows: i,
79
81
  fullWidth: !0,
80
82
  placeholder: "Write markdown…",
81
- inputProps: { "aria-label": n || "markdown editor" },
82
83
  ...g,
83
- sx: M(H, h)
84
+ sx: M(H, f),
85
+ slotProps: {
86
+ htmlInput: { "aria-label": n || "markdown editor" }
87
+ }
84
88
  }
85
89
  )
86
90
  ] });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),w=require("@mui/material/Table"),B=require("@mui/material/TableBody"),c=require("@mui/material/TableCell"),L=require("@mui/material/TableContainer"),O=require("@mui/material/TableHead"),A=require("@mui/material/TableRow"),U=require("@mui/material/Radio"),D=require("@mui/material/Checkbox"),G=require("@mui/material/FormControl"),J=require("@mui/material/FormLabel"),K=require("@mui/material/FormHelperText"),M=require("@mui/material/styles"),x=require("./AIForm-Dv8ahXyE.js"),N=l=>(l||[]).map(s=>typeof s=="string"?{id:s,label:s}:{id:String(s.id),label:s.label??String(s.id)}),Q=l=>(l||[]).map(s=>typeof s=="string"?{value:s,label:s}:{value:String(s.value),label:s.label??String(s.value)});function V({attributes:l={},rules:s={},onChange:k}){const{MuiAttributes:R={},id:b="",rows:p=[],columns:g=[],multiple:d=!1,label:v=""}=l,f=o.useMemo(()=>N(p),[p]),y=o.useMemo(()=>Q(g),[g]),[i,q]=o.useState(l.value||{}),[j,F]=o.useState(!1),[S,$]=o.useState("");x.useUpdateEffect(()=>{q(l.value||{})},[l.value]);const m=s?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1,W=e=>{let r=!0,n="";return m&&(f.every(u=>{const a=e[u.id];return d?Array.isArray(a)&&a.length>0:a!=null&&a!==""})||(r=!1,n=s?.validation?.find(a=>a.rule==="mandatory"||a.rule==="mandatoryselect")?.message||"Required")),{isValid:r,message:n}},C=e=>{q(e);const r=W(e);F(!r.isValid),$(r.message),k?.({id:b,value:e,option:e})},z=(e,r)=>{C({...i,[e]:r})},H=(e,r,n)=>{const h=Array.isArray(i[e])?i[e]:[],u=n?[...h,r]:h.filter(a=>a!==r);C({...i,[e]:u})},T=(e,r)=>{const n=i[e];return d?Array.isArray(n)&&n.includes(r):n===r},{sx:P,...E}=R;return t.jsxs(G,{required:m,error:j,component:"fieldset",fullWidth:!0,children:[v&&t.jsx(J,{required:m,error:j,sx:{mb:1,fontWeight:600},children:v}),t.jsx(L,{sx:x.mergeSx(x.premiumSurfaceSx,{width:"100%"}),children:t.jsxs(w,{size:"small",...E,sx:P,children:[t.jsx(O,{children:t.jsxs(A,{sx:e=>({backgroundColor:M.alpha(e.palette.primary.main,.06)}),children:[t.jsx(c,{sx:{fontWeight:700}}),y.map(e=>t.jsx(c,{align:"center",sx:{fontWeight:700},children:e.label},e.value))]})}),t.jsx(B,{children:f.map(e=>t.jsxs(A,{hover:!0,sx:r=>({transition:"background-color .18s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{backgroundColor:M.alpha(r.palette.primary.main,.04)}}),children:[t.jsx(c,{component:"th",scope:"row",sx:{fontWeight:500},children:e.label}),y.map(r=>t.jsx(c,{align:"center",padding:"checkbox",children:d?t.jsx(D,{checked:T(e.id,r.value),onChange:n=>H(e.id,r.value,n.target.checked),inputProps:{"aria-label":`${e.label} ${r.label}`}}):t.jsx(U,{name:`matrix-${b}-${e.id}`,checked:T(e.id,r.value),onChange:()=>z(e.id,r.value),inputProps:{"aria-label":`${e.label} ${r.label}`}})},r.value))]},e.id))})]})}),S&&t.jsx(K,{children:S})]})}exports.default=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),w=require("@mui/material/Table"),B=require("@mui/material/TableBody"),c=require("@mui/material/TableCell"),L=require("@mui/material/TableContainer"),O=require("@mui/material/TableHead"),A=require("@mui/material/TableRow"),U=require("@mui/material/Radio"),D=require("@mui/material/Checkbox"),G=require("@mui/material/FormControl"),J=require("@mui/material/FormLabel"),K=require("@mui/material/FormHelperText"),M=require("@mui/material/styles"),x=require("./AIForm-LoeI18mO.js"),N=a=>(a||[]).map(s=>typeof s=="string"?{id:s,label:s}:{id:String(s.id),label:s.label??String(s.id)}),Q=a=>(a||[]).map(s=>typeof s=="string"?{value:s,label:s}:{value:String(s.value),label:s.label??String(s.value)});function V({attributes:a={},rules:s={},onChange:k}){const{MuiAttributes:R={},id:b="",rows:p=[],columns:g=[],multiple:d=!1,label:v=""}=a,f=o.useMemo(()=>N(p),[p]),y=o.useMemo(()=>Q(g),[g]),[i,q]=o.useState(a.value||{}),[j,F]=o.useState(!1),[S,$]=o.useState("");x.useUpdateEffect(()=>{q(a.value||{})},[a.value]);const m=s?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1,W=e=>{let r=!0,n="";return m&&(f.every(u=>{const l=e[u.id];return d?Array.isArray(l)&&l.length>0:l!=null&&l!==""})||(r=!1,n=s?.validation?.find(l=>l.rule==="mandatory"||l.rule==="mandatoryselect")?.message||"Required")),{isValid:r,message:n}},C=e=>{q(e);const r=W(e);F(!r.isValid),$(r.message),k?.({id:b,value:e,option:e})},z=(e,r)=>{C({...i,[e]:r})},H=(e,r,n)=>{const h=Array.isArray(i[e])?i[e]:[],u=n?[...h,r]:h.filter(l=>l!==r);C({...i,[e]:u})},T=(e,r)=>{const n=i[e];return d?Array.isArray(n)&&n.includes(r):n===r},{sx:P,...E}=R;return t.jsxs(G,{required:m,error:j,component:"fieldset",fullWidth:!0,children:[v&&t.jsx(J,{required:m,error:j,sx:{mb:1,fontWeight:600},children:v}),t.jsx(L,{sx:x.mergeSx(x.premiumSurfaceSx,{width:"100%"}),children:t.jsxs(w,{size:"small",...E,sx:P,children:[t.jsx(O,{children:t.jsxs(A,{sx:e=>({backgroundColor:M.alpha(e.palette.primary.main,.06)}),children:[t.jsx(c,{sx:{fontWeight:700}}),y.map(e=>t.jsx(c,{align:"center",sx:{fontWeight:700},children:e.label},e.value))]})}),t.jsx(B,{children:f.map(e=>t.jsxs(A,{hover:!0,sx:r=>({transition:"background-color .18s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{backgroundColor:M.alpha(r.palette.primary.main,.04)}}),children:[t.jsx(c,{component:"th",scope:"row",sx:{fontWeight:500},children:e.label}),y.map(r=>t.jsx(c,{align:"center",padding:"checkbox",children:d?t.jsx(D,{checked:T(e.id,r.value),onChange:n=>H(e.id,r.value,n.target.checked),slotProps:{input:{"aria-label":`${e.label} ${r.label}`}}}):t.jsx(U,{name:`matrix-${b}-${e.id}`,checked:T(e.id,r.value),onChange:()=>z(e.id,r.value),slotProps:{input:{"aria-label":`${e.label} ${r.label}`}}})},r.value))]},e.id))})]})}),S&&t.jsx(K,{children:S})]})}exports.default=V;
@@ -1,4 +1,4 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
2
  import s from "react";
3
3
  import w from "@mui/material/Table";
4
4
  import B from "@mui/material/TableBody";
@@ -12,13 +12,13 @@ import J from "@mui/material/FormControl";
12
12
  import K from "@mui/material/FormLabel";
13
13
  import N from "@mui/material/FormHelperText";
14
14
  import { alpha as R } from "@mui/material/styles";
15
- import { j as O, m as Q, l as V } from "./AIForm-DtRl0WdY.mjs";
16
- const X = (n) => (n || []).map(
17
- (a) => typeof a == "string" ? { id: a, label: a } : { id: String(a.id), label: a.label ?? String(a.id) }
18
- ), Y = (n) => (n || []).map(
19
- (a) => typeof a == "string" ? { value: a, label: a } : { value: String(a.value), label: a.label ?? String(a.value) }
15
+ import { j as O, m as Q, l as V } from "./AIForm-Czsvpf7g.mjs";
16
+ const X = (o) => (o || []).map(
17
+ (t) => typeof t == "string" ? { id: t, label: t } : { id: String(t.id), label: t.label ?? String(t.id) }
18
+ ), Y = (o) => (o || []).map(
19
+ (t) => typeof t == "string" ? { value: t, label: t } : { value: String(t.value), label: t.label ?? String(t.value) }
20
20
  );
21
- function ce({ attributes: n = {}, rules: a = {}, onChange: $ }) {
21
+ function ce({ attributes: o = {}, rules: t = {}, onChange: $ }) {
22
22
  const {
23
23
  MuiAttributes: F = {},
24
24
  id: h = "",
@@ -26,16 +26,16 @@ function ce({ attributes: n = {}, rules: a = {}, onChange: $ }) {
26
26
  columns: g = [],
27
27
  multiple: c = !1,
28
28
  label: v = ""
29
- } = n, x = s.useMemo(() => X(b), [b]), y = s.useMemo(() => Y(g), [g]), [o, S] = s.useState(n.value || {}), [C, W] = s.useState(!1), [T, z] = s.useState("");
29
+ } = o, x = s.useMemo(() => X(b), [b]), y = s.useMemo(() => Y(g), [g]), [n, S] = s.useState(o.value || {}), [C, W] = s.useState(!1), [T, z] = s.useState("");
30
30
  O(() => {
31
- S(n.value || {});
32
- }, [n.value]);
33
- const p = a?.validation?.some((e) => e.rule === "mandatory" || e.rule === "mandatoryselect") || !1, j = (e) => {
31
+ S(o.value || {});
32
+ }, [o.value]);
33
+ const p = t?.validation?.some((e) => e.rule === "mandatory" || e.rule === "mandatoryselect") || !1, j = (e) => {
34
34
  let r = !0, l = "";
35
35
  return p && (x.every((m) => {
36
36
  const i = e[m.id];
37
37
  return c ? Array.isArray(i) && i.length > 0 : i != null && i !== "";
38
- }) || (r = !1, l = a?.validation?.find(
38
+ }) || (r = !1, l = t?.validation?.find(
39
39
  (i) => i.rule === "mandatory" || i.rule === "mandatoryselect"
40
40
  )?.message || "Required")), { isValid: r, message: l };
41
41
  }, k = (e) => {
@@ -43,34 +43,34 @@ function ce({ attributes: n = {}, rules: a = {}, onChange: $ }) {
43
43
  const r = j(e);
44
44
  W(!r.isValid), z(r.message), $?.({ id: h, value: e, option: e });
45
45
  }, q = (e, r) => {
46
- k({ ...o, [e]: r });
46
+ k({ ...n, [e]: r });
47
47
  }, H = (e, r, l) => {
48
- const f = Array.isArray(o[e]) ? o[e] : [], m = l ? [...f, r] : f.filter((i) => i !== r);
49
- k({ ...o, [e]: m });
48
+ const f = Array.isArray(n[e]) ? n[e] : [], m = l ? [...f, r] : f.filter((i) => i !== r);
49
+ k({ ...n, [e]: m });
50
50
  }, A = (e, r) => {
51
- const l = o[e];
51
+ const l = n[e];
52
52
  return c ? Array.isArray(l) && l.includes(r) : l === r;
53
53
  }, { sx: E, ...P } = F;
54
54
  return /* @__PURE__ */ d(J, { required: p, error: C, component: "fieldset", fullWidth: !0, children: [
55
- v && /* @__PURE__ */ t(K, { required: p, error: C, sx: { mb: 1, fontWeight: 600 }, children: v }),
56
- /* @__PURE__ */ t(
55
+ v && /* @__PURE__ */ a(K, { required: p, error: C, sx: { mb: 1, fontWeight: 600 }, children: v }),
56
+ /* @__PURE__ */ a(
57
57
  L,
58
58
  {
59
59
  sx: Q(V, { width: "100%" }),
60
60
  children: /* @__PURE__ */ d(w, { size: "small", ...P, sx: E, children: [
61
- /* @__PURE__ */ t(U, { children: /* @__PURE__ */ d(
61
+ /* @__PURE__ */ a(U, { children: /* @__PURE__ */ d(
62
62
  M,
63
63
  {
64
64
  sx: (e) => ({
65
65
  backgroundColor: R(e.palette.primary.main, 0.06)
66
66
  }),
67
67
  children: [
68
- /* @__PURE__ */ t(u, { sx: { fontWeight: 700 } }),
69
- y.map((e) => /* @__PURE__ */ t(u, { align: "center", sx: { fontWeight: 700 }, children: e.label }, e.value))
68
+ /* @__PURE__ */ a(u, { sx: { fontWeight: 700 } }),
69
+ y.map((e) => /* @__PURE__ */ a(u, { align: "center", sx: { fontWeight: 700 }, children: e.label }, e.value))
70
70
  ]
71
71
  }
72
72
  ) }),
73
- /* @__PURE__ */ t(B, { children: x.map((e) => /* @__PURE__ */ d(
73
+ /* @__PURE__ */ a(B, { children: x.map((e) => /* @__PURE__ */ d(
74
74
  M,
75
75
  {
76
76
  hover: !0,
@@ -81,24 +81,28 @@ function ce({ attributes: n = {}, rules: a = {}, onChange: $ }) {
81
81
  }
82
82
  }),
83
83
  children: [
84
- /* @__PURE__ */ t(u, { component: "th", scope: "row", sx: { fontWeight: 500 }, children: e.label }),
85
- y.map((r) => /* @__PURE__ */ t(u, { align: "center", padding: "checkbox", children: c ? /* @__PURE__ */ t(
84
+ /* @__PURE__ */ a(u, { component: "th", scope: "row", sx: { fontWeight: 500 }, children: e.label }),
85
+ y.map((r) => /* @__PURE__ */ a(u, { align: "center", padding: "checkbox", children: c ? /* @__PURE__ */ a(
86
86
  G,
87
87
  {
88
88
  checked: A(e.id, r.value),
89
89
  onChange: (l) => H(e.id, r.value, l.target.checked),
90
- inputProps: {
91
- "aria-label": `${e.label} ${r.label}`
90
+ slotProps: {
91
+ input: {
92
+ "aria-label": `${e.label} ${r.label}`
93
+ }
92
94
  }
93
95
  }
94
- ) : /* @__PURE__ */ t(
96
+ ) : /* @__PURE__ */ a(
95
97
  D,
96
98
  {
97
99
  name: `matrix-${h}-${e.id}`,
98
100
  checked: A(e.id, r.value),
99
101
  onChange: () => q(e.id, r.value),
100
- inputProps: {
101
- "aria-label": `${e.label} ${r.label}`
102
+ slotProps: {
103
+ input: {
104
+ "aria-label": `${e.label} ${r.label}`
105
+ }
102
106
  }
103
107
  }
104
108
  ) }, r.value))
@@ -109,7 +113,7 @@ function ce({ attributes: n = {}, rules: a = {}, onChange: $ }) {
109
113
  ] })
110
114
  }
111
115
  ),
112
- T && /* @__PURE__ */ t(N, { children: T })
116
+ T && /* @__PURE__ */ a(N, { children: T })
113
117
  ] });
114
118
  }
115
119
  export {
@@ -4,14 +4,14 @@ import l from "@mui/material/Box";
4
4
  import f from "@mui/material/CircularProgress";
5
5
  const d = c.lazy(async () => {
6
6
  const [
7
- { ChartContainer: i },
7
+ { ChartsContainer: i },
8
8
  { LinePlot: s },
9
9
  { BarPlot: a },
10
10
  { ChartsXAxis: e },
11
11
  { ChartsYAxis: n },
12
12
  { axisClasses: r }
13
13
  ] = await Promise.all([
14
- import("@mui/x-charts/ChartContainer"),
14
+ import("@mui/x-charts/ChartsContainer"),
15
15
  import("@mui/x-charts/LineChart"),
16
16
  import("@mui/x-charts/BarChart"),
17
17
  import("@mui/x-charts/ChartsXAxis"),
@@ -0,0 +1 @@
1
+ "use strict";var m=Object.create;var x=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var M=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of f(r))!A.call(t,i)&&i!==e&&x(t,i,{get:()=>r[i],enumerable:!(n=p(r,i))||n.enumerable});return t};var o=(t,r,e)=>(e=t!=null?m(b(t)):{},M(r||!t||!t.__esModule?x(e,"default",{value:t,enumerable:!0}):e,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("react"),u=require("@mui/material/Box"),y=require("@mui/material/CircularProgress"),P=c.lazy(async()=>{const[{ChartsContainer:t},{LinePlot:r},{BarPlot:e},{ChartsXAxis:n},{ChartsYAxis:i},{axisClasses:a}]=await Promise.all([import("@mui/x-charts/ChartsContainer"),import("@mui/x-charts/LineChart"),import("@mui/x-charts/BarChart"),import("@mui/x-charts/ChartsXAxis"),import("@mui/x-charts/ChartsYAxis"),import("@mui/x-charts/ChartsAxis")]);return{default:({MuiChartContainerAttributes:h={},MuiChartXAxisAttributes:C={},MuiChartYAxisAttributes:j={},MuiChartSX:d={}})=>s.jsxs(t,{sx:{[`.${a.left} .${a.label}`]:{transform:"translate(-25px, 0)"},[`.${a.right} .${a.label}`]:{transform:"translate(30px, 0)"},...d},...h,children:[s.jsx(e,{}),s.jsx(r,{}),s.jsx(n,{...C}),s.jsx(i,{...j})]})}});function g({attributes:t={}}){const{id:r,MuiBoxAttributes:e={},MuiChartContainerAttributes:n={},MuiChartXAxisAttributes:i={},MuiChartYAxisAttributes:a={},MuiChartSX:l={}}=t;return s.jsx(u,{sx:{width:"100%",maxWidth:600},...e,children:s.jsx(c.Suspense,{fallback:s.jsx(u,{sx:{display:"flex",justifyContent:"center",p:2},children:s.jsx(y,{})}),children:s.jsx(P,{MuiChartContainerAttributes:n,MuiChartXAxisAttributes:i,MuiChartYAxisAttributes:a,MuiChartSX:l})})},r)}exports.default=g;
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, jsxs as k } from "react/jsx-runtime";
2
2
  import { useRef as j, useState as S, useEffect as R } from "react";
3
3
  import { Stack as q, Box as w, TextField as O, Button as $, Icon as d, IconButton as B } from "@mui/material";
4
- import { j as v, k as C } from "./AIForm-DtRl0WdY.mjs";
4
+ import { j as v, k as C } from "./AIForm-Czsvpf7g.mjs";
5
5
  function T({ attributes: r = {}, rules: p = {}, onChange: i, submitTick: c, messages: m }) {
6
6
  const { id: s = "" } = r, h = m?.required || "Required", f = j(null), [t, a] = S(() => {
7
7
  if (r.value && typeof r.value == "object") {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),a=require("@mui/material"),d=require("./AIForm-Dv8ahXyE.js");function k({attributes:r={},rules:h={},onChange:f,submitTick:v,messages:m}){const{id:o=""}=r,x=m?.required||"Required",p=i.useRef(null),[l,u]=i.useState(()=>{if(r.value&&typeof r.value=="object"){const e=Object.entries(r.value).map(([n,t])=>({key:n,value:String(t)}));if(e.length>0)return e}return[{key:"t1",value:""}]}),c=h?.validation?.some(e=>e.rule==="mandatory")||!1;d.useUpdateEffect(()=>{v&&c&&!l[0]?.value&&p.current?.focus()},[v]),d.useUpdateEffect(()=>{if(r.value&&typeof r.value=="object"){const e=Object.entries(r.value).map(([n,t])=>({key:n,value:String(t)}));JSON.stringify(e)!==JSON.stringify(l)&&u(e.length>0?e:[{key:"t1",value:""}])}else r.value||u([{key:"t1",value:""}])},[r.value]),i.useEffect(()=>{const e=l.reduce((n,t)=>(n[t.key]=t.value,n),{});f&&f({id:o,value:e})},[l,o]);const y=()=>{const e=l.length+1;u([...l,{key:`t${e}`,value:""}])},g=e=>{const n=l.filter((t,I)=>I!==e);u(n)},j=(e,n)=>{const t=[...l];t[e].value=n,u(t)};return s.jsx(a.Stack,{spacing:2,sx:{width:"100%"},children:l.map((e,n)=>s.jsxs(a.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[s.jsx(a.TextField,{fullWidth:!0,id:n===0?o:`${o}_${e.key}`,inputRef:n===0?p:void 0,required:c,error:c&&!e.value,helperText:c&&!e.value?x:"",label:`Value ${e.key}`,value:e.value,onChange:t=>j(n,t.target.value),size:"small",sx:d.premiumInputSx}),n===l.length-1?s.jsx(a.Button,{variant:"contained",color:"primary",onClick:y,sx:{minWidth:"40px",p:1},children:s.jsx(a.Icon,{children:"add"})}):s.jsx(a.IconButton,{color:"error",onClick:()=>g(n),children:s.jsx(a.Icon,{children:"remove"})})]},n))})}exports.default=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),a=require("@mui/material"),d=require("./AIForm-LoeI18mO.js");function k({attributes:r={},rules:h={},onChange:f,submitTick:v,messages:m}){const{id:o=""}=r,x=m?.required||"Required",p=i.useRef(null),[l,u]=i.useState(()=>{if(r.value&&typeof r.value=="object"){const e=Object.entries(r.value).map(([n,t])=>({key:n,value:String(t)}));if(e.length>0)return e}return[{key:"t1",value:""}]}),c=h?.validation?.some(e=>e.rule==="mandatory")||!1;d.useUpdateEffect(()=>{v&&c&&!l[0]?.value&&p.current?.focus()},[v]),d.useUpdateEffect(()=>{if(r.value&&typeof r.value=="object"){const e=Object.entries(r.value).map(([n,t])=>({key:n,value:String(t)}));JSON.stringify(e)!==JSON.stringify(l)&&u(e.length>0?e:[{key:"t1",value:""}])}else r.value||u([{key:"t1",value:""}])},[r.value]),i.useEffect(()=>{const e=l.reduce((n,t)=>(n[t.key]=t.value,n),{});f&&f({id:o,value:e})},[l,o]);const y=()=>{const e=l.length+1;u([...l,{key:`t${e}`,value:""}])},g=e=>{const n=l.filter((t,I)=>I!==e);u(n)},j=(e,n)=>{const t=[...l];t[e].value=n,u(t)};return s.jsx(a.Stack,{spacing:2,sx:{width:"100%"},children:l.map((e,n)=>s.jsxs(a.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[s.jsx(a.TextField,{fullWidth:!0,id:n===0?o:`${o}_${e.key}`,inputRef:n===0?p:void 0,required:c,error:c&&!e.value,helperText:c&&!e.value?x:"",label:`Value ${e.key}`,value:e.value,onChange:t=>j(n,t.target.value),size:"small",sx:d.premiumInputSx}),n===l.length-1?s.jsx(a.Button,{variant:"contained",color:"primary",onClick:y,sx:{minWidth:"40px",p:1},children:s.jsx(a.Icon,{children:"add"})}):s.jsx(a.IconButton,{color:"error",onClick:()=>g(n),children:s.jsx(a.Icon,{children:"remove"})})]},n))})}exports.default=k;
@@ -7,7 +7,7 @@ import A from "@mui/material/FormControl";
7
7
  import F from "@mui/material/FormLabel";
8
8
  import L from "@mui/material/FormHelperText";
9
9
  import { alpha as l } from "@mui/material/styles";
10
- import { j as V, P as s, o as N } from "./AIForm-DtRl0WdY.mjs";
10
+ import { j as V, P as s, o as N } from "./AIForm-Czsvpf7g.mjs";
11
11
  function K({ attributes: a = {}, rules: p = {}, onChange: k, submitTick: m, messages: M }) {
12
12
  const {
13
13
  id: d = "",
@@ -76,8 +76,12 @@ function K({ attributes: a = {}, rules: p = {}, onChange: k, submitTick: m, mess
76
76
  );
77
77
  }) }),
78
78
  /* @__PURE__ */ S(C, { sx: { display: "flex", justifyContent: "space-between", mt: 0.75 }, children: [
79
- /* @__PURE__ */ t(w, { variant: "caption", color: "text.secondary", children: E }),
80
- /* @__PURE__ */ t(w, { variant: "caption", color: "text.secondary", children: j })
79
+ /* @__PURE__ */ t(w, { variant: "caption", sx: {
80
+ color: "text.secondary"
81
+ }, children: E }),
82
+ /* @__PURE__ */ t(w, { variant: "caption", sx: {
83
+ color: "text.secondary"
84
+ }, children: j })
81
85
  ] }),
82
86
  y && /* @__PURE__ */ t(L, { children: y })
83
87
  ] });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),q=require("@mui/material/Box"),k=require("@mui/material/Button"),S=require("@mui/material/Typography"),A=require("@mui/material/FormControl"),$=require("@mui/material/FormLabel"),N=require("@mui/material/FormHelperText"),s=require("@mui/material/styles"),l=require("./AIForm-Dv8ahXyE.js");function P({attributes:t={},rules:c={},onChange:j,submitTick:d,messages:M}){const{id:p="",label:n,min:E=0,max:I=10,lowLabel:R="Not likely",highLabel:C="Very likely",MuiAttributes:u={}}=t,w=typeof t.value=="number"?t.value:"",[m,x]=i.useState(w),[U,y]=i.useState(!1),[f,h]=i.useState("");l.useUpdateEffect(()=>{x(typeof t.value=="number"?t.value:"")},[t.value]);const g=c?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1,b=e=>g?typeof e!="number"?{isValid:!1,message:c?.validation?.find(r=>r.rule==="mandatory"||r.rule==="mandatoryselect")?.message||M?.required||"Required"}:{isValid:!0,message:""}:{isValid:!0,message:""};l.useUpdateEffect(()=>{if(d){const e=b(m);y(!e.isValid),h(e.message)}},[d]);const V=e=>{x(e);const a=b(e);y(!a.isValid),h(a.message),j?.({id:p,value:e})},v=[];for(let e=E;e<=I;e+=1)v.push(e);return o.jsxs(A,{id:p,required:g,error:U,component:"fieldset",sx:{width:"100%"},children:[n&&o.jsx($,{sx:{mb:1,fontWeight:500},component:"legend",children:n}),o.jsx(q,{role:"radiogroup","aria-label":n||"nps scale",sx:{display:"flex",flexWrap:"wrap",gap:.75},children:v.map(e=>{const a=m===e;return o.jsx(k,{role:"radio","aria-checked":a,variant:a?"contained":"outlined",color:"primary",onClick:()=>V(e),...u,sx:r=>({minWidth:44,height:44,px:0,fontWeight:600,borderRadius:`${l.PREMIUM_RADIUS}px`,transition:`transform .18s ${l.PREMIUM_EASING}, box-shadow .18s ${l.PREMIUM_EASING}, background-color .18s ${l.PREMIUM_EASING}`,...a?{boxShadow:`0 4px 12px ${s.alpha(r.palette.primary.main,.35)}`}:{borderColor:s.alpha(r.palette.text.primary,.2),"&:hover":{borderColor:r.palette.primary.main,backgroundColor:s.alpha(r.palette.primary.main,.06)}},"&:hover":{transform:"translateY(-1px)",...a?{boxShadow:`0 6px 16px ${s.alpha(r.palette.primary.main,.4)}`}:{borderColor:r.palette.primary.main,backgroundColor:s.alpha(r.palette.primary.main,.06)}},...u.sx||{}}),children:e},e)})}),o.jsxs(q,{sx:{display:"flex",justifyContent:"space-between",mt:.75},children:[o.jsx(S,{variant:"caption",color:"text.secondary",children:R}),o.jsx(S,{variant:"caption",color:"text.secondary",children:C})]}),f&&o.jsx(N,{children:f})]})}exports.default=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),q=require("@mui/material/Box"),k=require("@mui/material/Button"),S=require("@mui/material/Typography"),A=require("@mui/material/FormControl"),$=require("@mui/material/FormLabel"),N=require("@mui/material/FormHelperText"),s=require("@mui/material/styles"),l=require("./AIForm-LoeI18mO.js");function P({attributes:t={},rules:c={},onChange:j,submitTick:d,messages:M}){const{id:p="",label:n,min:E=0,max:I=10,lowLabel:R="Not likely",highLabel:C="Very likely",MuiAttributes:u={}}=t,w=typeof t.value=="number"?t.value:"",[m,x]=i.useState(w),[U,y]=i.useState(!1),[f,h]=i.useState("");l.useUpdateEffect(()=>{x(typeof t.value=="number"?t.value:"")},[t.value]);const g=c?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1,b=e=>g?typeof e!="number"?{isValid:!1,message:c?.validation?.find(r=>r.rule==="mandatory"||r.rule==="mandatoryselect")?.message||M?.required||"Required"}:{isValid:!0,message:""}:{isValid:!0,message:""};l.useUpdateEffect(()=>{if(d){const e=b(m);y(!e.isValid),h(e.message)}},[d]);const V=e=>{x(e);const a=b(e);y(!a.isValid),h(a.message),j?.({id:p,value:e})},v=[];for(let e=E;e<=I;e+=1)v.push(e);return o.jsxs(A,{id:p,required:g,error:U,component:"fieldset",sx:{width:"100%"},children:[n&&o.jsx($,{sx:{mb:1,fontWeight:500},component:"legend",children:n}),o.jsx(q,{role:"radiogroup","aria-label":n||"nps scale",sx:{display:"flex",flexWrap:"wrap",gap:.75},children:v.map(e=>{const a=m===e;return o.jsx(k,{role:"radio","aria-checked":a,variant:a?"contained":"outlined",color:"primary",onClick:()=>V(e),...u,sx:r=>({minWidth:44,height:44,px:0,fontWeight:600,borderRadius:`${l.PREMIUM_RADIUS}px`,transition:`transform .18s ${l.PREMIUM_EASING}, box-shadow .18s ${l.PREMIUM_EASING}, background-color .18s ${l.PREMIUM_EASING}`,...a?{boxShadow:`0 4px 12px ${s.alpha(r.palette.primary.main,.35)}`}:{borderColor:s.alpha(r.palette.text.primary,.2),"&:hover":{borderColor:r.palette.primary.main,backgroundColor:s.alpha(r.palette.primary.main,.06)}},"&:hover":{transform:"translateY(-1px)",...a?{boxShadow:`0 6px 16px ${s.alpha(r.palette.primary.main,.4)}`}:{borderColor:r.palette.primary.main,backgroundColor:s.alpha(r.palette.primary.main,.06)}},...u.sx||{}}),children:e},e)})}),o.jsxs(q,{sx:{display:"flex",justifyContent:"space-between",mt:.75},children:[o.jsx(S,{variant:"caption",sx:{color:"text.secondary"},children:R}),o.jsx(S,{variant:"caption",sx:{color:"text.secondary"},children:C})]}),f&&o.jsx(N,{children:f})]})}exports.default=P;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),C=require("react"),N=require("@mui/material/Stack"),T=require("@mui/material/InputBase"),k=require("@mui/material/IconButton"),P=require("@mui/material/FormControl"),$=require("@mui/material/FormLabel"),D=require("@mui/material/FormHelperText"),E=require("@mui/icons-material/Remove"),H=require("@mui/icons-material/Add"),c=require("@mui/material/styles"),w=require("./AIForm-Dv8ahXyE.js"),n=(o,u=0)=>{const i=Number(o);return Number.isFinite(i)?i:u};function L({attributes:o={},rules:u={},onChange:i}){const{MuiAttributes:I={},id:b="",min:s,max:l,step:h=1,label:d}=o,{sx:A,...F}=I,f=s!=null,g=l!=null,m=e=>{let t=e;return f&&(t=Math.max(t,n(s))),g&&(t=Math.min(t,n(l))),t},[a,v]=C.useState(()=>m(n(o.value,0))),[y,x]=C.useState(String(a)),S=u?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1;w.useUpdateEffect(()=>{const e=m(n(o.value,0));v(e),x(String(e))},[o.value]);const p=e=>{const t=m(e);v(t),x(String(t)),i?.({id:b,value:t})},q=f&&a<=n(s),M=g&&a>=n(l),R=()=>{q||p(a-n(h,1))},z=()=>{M||p(a+n(h,1))},B=()=>{p(n(y,a))},j={borderRadius:0,px:1.25,color:"text.primary",transition:"background-color .18s","&:hover":e=>({backgroundColor:c.alpha(e.palette.primary.main,.08)}),"&.Mui-disabled":{color:"text.disabled"}};return r.jsxs(P,{component:"fieldset",error:!1,children:[d&&r.jsx($,{component:"legend",required:S,sx:{mb:1},children:d}),r.jsxs(N,{direction:"row",alignItems:"center",sx:w.mergeSx(e=>({display:"inline-flex",width:"fit-content",borderRadius:"10px",overflow:"hidden",border:`1px solid ${c.alpha(e.palette.text.primary,.16)}`,backgroundColor:e.palette.background.paper,transition:"box-shadow .2s, border-color .2s","&:hover":{borderColor:c.alpha(e.palette.primary.main,.5)},"&:focus-within":{borderColor:e.palette.primary.main,boxShadow:`0 0 0 3px ${c.alpha(e.palette.primary.main,.16)}`}}),A),children:[r.jsx(k,{"aria-label":"decrement",onClick:R,disabled:q,size:"small",sx:j,children:r.jsx(E,{fontSize:"small"})}),r.jsx(T,{...F,value:y,inputProps:{"aria-label":d||b||"value",inputMode:"numeric",style:{textAlign:"center",width:56}},onChange:e=>x(e.target.value),onBlur:B,sx:{"& input":{py:.75}}}),r.jsx(k,{"aria-label":"increment",onClick:z,disabled:M,size:"small",sx:j,children:r.jsx(H,{fontSize:"small"})})]}),S&&r.jsx(D,{sx:{mx:0},children:""})]})}exports.default=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),C=require("react"),N=require("@mui/material/Stack"),T=require("@mui/material/InputBase"),k=require("@mui/material/IconButton"),P=require("@mui/material/FormControl"),$=require("@mui/material/FormLabel"),D=require("@mui/material/FormHelperText"),E=require("@mui/icons-material/Remove"),H=require("@mui/icons-material/Add"),c=require("@mui/material/styles"),w=require("./AIForm-LoeI18mO.js"),n=(o,u=0)=>{const i=Number(o);return Number.isFinite(i)?i:u};function L({attributes:o={},rules:u={},onChange:i}){const{MuiAttributes:I={},id:b="",min:s,max:l,step:h=1,label:d}=o,{sx:A,...F}=I,f=s!=null,g=l!=null,m=e=>{let t=e;return f&&(t=Math.max(t,n(s))),g&&(t=Math.min(t,n(l))),t},[a,v]=C.useState(()=>m(n(o.value,0))),[y,x]=C.useState(String(a)),S=u?.validation?.some(e=>e.rule==="mandatory"||e.rule==="mandatoryselect")||!1;w.useUpdateEffect(()=>{const e=m(n(o.value,0));v(e),x(String(e))},[o.value]);const p=e=>{const t=m(e);v(t),x(String(t)),i?.({id:b,value:t})},q=f&&a<=n(s),M=g&&a>=n(l),R=()=>{q||p(a-n(h,1))},z=()=>{M||p(a+n(h,1))},B=()=>{p(n(y,a))},j={borderRadius:0,px:1.25,color:"text.primary",transition:"background-color .18s","&:hover":e=>({backgroundColor:c.alpha(e.palette.primary.main,.08)}),"&.Mui-disabled":{color:"text.disabled"}};return r.jsxs(P,{component:"fieldset",error:!1,children:[d&&r.jsx($,{component:"legend",required:S,sx:{mb:1},children:d}),r.jsxs(N,{direction:"row",sx:w.mergeSx(e=>({alignItems:"center",display:"inline-flex",width:"fit-content",borderRadius:"10px",overflow:"hidden",border:`1px solid ${c.alpha(e.palette.text.primary,.16)}`,backgroundColor:e.palette.background.paper,transition:"box-shadow .2s, border-color .2s","&:hover":{borderColor:c.alpha(e.palette.primary.main,.5)},"&:focus-within":{borderColor:e.palette.primary.main,boxShadow:`0 0 0 3px ${c.alpha(e.palette.primary.main,.16)}`}}),A),children:[r.jsx(k,{"aria-label":"decrement",onClick:R,disabled:q,size:"small",sx:j,children:r.jsx(E,{fontSize:"small"})}),r.jsx(T,{...F,value:y,inputProps:{"aria-label":d||b||"value",inputMode:"numeric",style:{textAlign:"center",width:56}},onChange:e=>x(e.target.value),onBlur:B,sx:{"& input":{py:.75}}}),r.jsx(k,{"aria-label":"increment",onClick:z,disabled:M,size:"small",sx:j,children:r.jsx(H,{fontSize:"small"})})]}),S&&r.jsx(D,{sx:{mx:0},children:""})]})}exports.default=L;
@@ -9,7 +9,7 @@ import E from "@mui/material/FormHelperText";
9
9
  import H from "@mui/icons-material/Remove";
10
10
  import L from "@mui/icons-material/Add";
11
11
  import { alpha as m } from "@mui/material/styles";
12
- import { j as P, m as U } from "./AIForm-DtRl0WdY.mjs";
12
+ import { j as P, m as U } from "./AIForm-Czsvpf7g.mjs";
13
13
  const t = (n, c = 0) => {
14
14
  const i = Number(n);
15
15
  return Number.isFinite(i) ? i : c;
@@ -57,9 +57,13 @@ function re({ attributes: n = {}, rules: c = {}, onChange: i }) {
57
57
  T,
58
58
  {
59
59
  direction: "row",
60
- alignItems: "center",
61
60
  sx: U(
62
61
  (e) => ({
62
+ // `alignItems` was a Stack system prop before v9. Folded
63
+ // into the base style object rather than left in an sx
64
+ // array — mergeSx already returns SxProps, and SxProps
65
+ // arrays cannot be nested inside another sx array.
66
+ alignItems: "center",
63
67
  display: "inline-flex",
64
68
  width: "fit-content",
65
69
  borderRadius: "10px",
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import a, { Suspense as s } from "react";
3
3
  import n from "@mui/material/Box";
4
4
  import f from "@mui/material/CircularProgress";
5
- import { i as m } from "./AIForm-DtRl0WdY.mjs";
5
+ import { i as m } from "./AIForm-Czsvpf7g.mjs";
6
6
  const c = a.lazy(
7
7
  () => import("@mui/x-charts/PieChart").then((r) => ({ default: r.PieChart }))
8
8
  );
@@ -1 +1 @@
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,s)=>{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:!(s=a(t,i))||s.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 n=require("react/jsx-runtime"),o=require("react"),j=require("@mui/material/Box"),C=require("@mui/material/CircularProgress"),y=require("./AIForm-Dv8ahXyE.js"),P=o.lazy(()=>import("@mui/x-charts/PieChart").then(e=>({default:e.PieChart})));function g({attributes:e={}}){const{MuiChartAttributes:t={},id:r=""}=e,s=y.getMuiX("PieChart")||P;return n.jsx(o.Suspense,{fallback:n.jsx(j,{sx:{display:"flex",justifyContent:"center",p:2},children:n.jsx(C,{})}),children:n.jsx(s,{height:300,...t},r)})}exports.default=g;
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,s)=>{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:!(s=a(t,i))||s.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 n=require("react/jsx-runtime"),o=require("react"),j=require("@mui/material/Box"),C=require("@mui/material/CircularProgress"),y=require("./AIForm-LoeI18mO.js"),P=o.lazy(()=>import("@mui/x-charts/PieChart").then(e=>({default:e.PieChart})));function g({attributes:e={}}){const{MuiChartAttributes:t={},id:r=""}=e,s=y.getMuiX("PieChart")||P;return n.jsx(o.Suspense,{fallback:n.jsx(j,{sx:{display:"flex",justifyContent:"center",p:2},children:n.jsx(C,{})}),children:n.jsx(s,{height:300,...t},r)})}exports.default=g;