@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.11

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 (119) hide show
  1. package/browser/esm/0BWO0bLZ8Vm_dKd2.mjs +582 -0
  2. package/browser/esm/BAbq4-I5f5oUiNaF.mjs +141 -0
  3. package/browser/esm/BED6h6YAwCf1HEQJ.mjs +161 -0
  4. package/browser/esm/{CEvZe2cZK-voZTif.mjs → BXhNFzyEGokTF-BL.mjs} +5 -5
  5. package/browser/esm/BYE9gCDWKyx6mnVs.mjs +381 -0
  6. package/browser/esm/{DBtc4lku0uHVcqWn.mjs → BjvD_4t2KGsZP5V8.mjs} +3 -3
  7. package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BknfGJouygmnpFIU.mjs} +4 -4
  8. package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → BlE_8o8tO2AgAlaj.mjs} +19 -17
  9. package/browser/esm/BokqKEpU6TFgfRs6.mjs +252 -0
  10. package/browser/esm/{DHY19rkSiiRZxShC.mjs → Brsh5yscJ_4uKFXp.mjs} +3 -3
  11. package/browser/esm/Bujtz_Guj88d03vI.mjs +831 -0
  12. package/browser/esm/Buqcl7J75MJrhpVE.mjs +1379 -0
  13. package/browser/esm/BvhYPwX3GrRaO9CM.mjs +319 -0
  14. package/browser/esm/C0wlMAIn9iREPK6w.mjs +87 -0
  15. package/browser/esm/C8JU4KsMasmLvojI.mjs +103 -0
  16. package/browser/esm/{CjznclrKqJRi7u9O.mjs → C9pIZVACtl9unFOp.mjs} +2 -2
  17. package/browser/esm/CBD4RiRKbbZtSXV-.mjs +318 -0
  18. package/browser/esm/{Blaj2R5hYxtLAW__.mjs → CEtXsBzEjEKk9GOj.mjs} +6 -6
  19. package/browser/esm/{CIu1bjPJe_x31Oww.mjs → COlZu93LRwuBvjE-.mjs} +3 -3
  20. package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → CTjqDD-swFMZzI-Y.mjs} +2 -2
  21. package/browser/esm/CWkOgdL7mOKiTR62.mjs +975 -0
  22. package/browser/esm/ChSVxkPTIjgcC8PL.mjs +412 -0
  23. package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → ClBvNPeNCAhuVWrG.mjs} +1 -1
  24. package/browser/esm/CyLn6zOOp_biA3xU.mjs +335 -0
  25. package/browser/esm/CynTY0oNtyJnoaBq.mjs +14 -0
  26. package/browser/esm/{xKiLJKiLxto8SayF.mjs → D3rRUK4dIM5gUSmj.mjs} +2 -2
  27. package/browser/esm/D9ISy7VkaRRFJl46.mjs +515 -0
  28. package/browser/esm/{fb126BNj3F8URR19.mjs → DDc6rDuU9JAo1DH_.mjs} +3 -3
  29. package/browser/esm/DDczwkXhz_MHub4z.mjs +197 -0
  30. package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → DEv4pIEgYr5C7etm.mjs} +1 -1
  31. package/browser/esm/DG21x7RKDpge6zAE.mjs +31 -0
  32. package/browser/esm/DJOOed_OtB-XT7f3.mjs +437 -0
  33. package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → DKtJxrpN0axtuQ0l.mjs} +1 -1
  34. package/browser/esm/DRSCS6aLiYmPjUz1.mjs +1543 -0
  35. package/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → DTpRkgsTm_zYnWfW.mjs} +1 -1
  36. package/browser/esm/DV6i9RQZfJiKtEaJ.mjs +2552 -0
  37. package/browser/esm/DdcZrjMLWVukWcU5.mjs +7473 -0
  38. package/browser/esm/Di3BUxA0SqFWWgeg.mjs +94 -0
  39. package/browser/esm/DnGaP5F7mLwCGUYG.mjs +408 -0
  40. package/browser/esm/DpD4fg2WcyiKX_2K.mjs +414 -0
  41. package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → Ds3XRkne7HxcXD8J.mjs} +2 -2
  42. package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → DsoNMWDwHZP8UXQd.mjs} +1 -1
  43. package/browser/esm/G0Inqm6Eqw47dMpa.mjs +212 -0
  44. package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → HViD4Wfoi0mmqk9w.mjs} +1 -1
  45. package/browser/esm/LZoYSQAYV2wksnDv.mjs +386 -0
  46. package/browser/esm/{CtEFHbzYNvYjDYvi.mjs → QgaAIDUMmBQBsXP9.mjs} +8 -8
  47. package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → YThnrg3PadGs7B4j.mjs} +51 -51
  48. package/browser/esm/index.mjs +1028 -170
  49. package/browser/esm/ttjcNHcFn8O6hfnd.mjs +1288 -0
  50. package/browser/esm/{yZxC4qUENOlMhVUH.mjs → w_JrR69vEpvoyeMy.mjs} +1 -1
  51. package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → xFqkfN8QMCxvsetB.mjs} +1 -1
  52. package/browser/esm/{IQLeaAbtGTipUsOD.mjs → zqilJefihVd7At2T.mjs} +22 -21
  53. package/licenses/dependencies.txt +94 -94
  54. package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → 1bf4gn-2vld4BZ9u.mjs} +1 -1
  55. package/node/esm/{CKu1AtRgyltyEdEN.mjs → 3WghtBXAvCDwcVrq.mjs} +1 -1
  56. package/node/esm/{cqzp431iNSLWictb.mjs → 4HmLH0bPVJCZLgik.mjs} +22 -22
  57. package/node/esm/{BYVLi0md4AYuDsB_.mjs → B0bdb_6p7fQI_ivo.mjs} +28 -28
  58. package/node/esm/BIMkjQUwG4Ih-6Sh.mjs +142 -0
  59. package/node/esm/BNg4QQY0WAPLE0q7.mjs +141 -0
  60. package/node/esm/BPzcW4BejRqso338.mjs +72 -0
  61. package/node/esm/BR45ogAR-hY2bE60.mjs +318 -0
  62. package/node/esm/BlN7G0DVC24zauig.mjs +197 -0
  63. package/node/esm/{ah3CUg4-VmNstGk_.mjs → Bph-sR3l6AYWeuxK.mjs} +2 -2
  64. package/node/esm/CPq-MIdEnc-53JpF.mjs +319 -0
  65. package/node/esm/CSAnTp5rwId0DUb8.mjs +380 -0
  66. package/node/esm/CWcv7UVXF8IUB0PC.mjs +1379 -0
  67. package/node/esm/{D9rzScOA9pEYFrtz.mjs → CYIoK22I6Yvv12_x.mjs} +20 -20
  68. package/node/esm/CZyA9uD4SkTvqp_G.mjs +1283 -0
  69. package/node/esm/{ci8d-mF1H9wnYzix.mjs → CjC6s3RUJQNCF7mP.mjs} +1 -1
  70. package/node/esm/{D6oQL8knsPpgdXuk.mjs → CuMePia6i_8yfJ6S.mjs} +9 -9
  71. package/node/esm/CvRbu8JPxFarsSR-.mjs +412 -0
  72. package/node/esm/{DNSjK5DAH3M14Qbc.mjs → CyafafEgfmjLqE5O.mjs} +1 -1
  73. package/node/esm/D-xqQ5qOSd6WrzwJ.mjs +94 -0
  74. package/node/esm/DLqBHdFp6wvm6EGs.mjs +212 -0
  75. package/node/esm/{BcwMb6CyVfvEwbHn.mjs → DMXLxp3T0E0SRTQc.mjs} +1 -1
  76. package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DWqvf4H5F2wMnZ0L.mjs} +32 -30
  77. package/node/esm/DatM6eEYPpAtIMy-.mjs +405 -0
  78. package/node/esm/Db3dbaYLKUO66T9s.mjs +1689 -0
  79. package/node/esm/{B_jRGdwGFkudwmL-.mjs → DdEzhVqYTrGODXrz.mjs} +1 -1
  80. package/node/esm/DeZJlLk8WJ3BLtLs.mjs +975 -0
  81. package/node/esm/DfCuL8AUxMFoEG2s.mjs +519 -0
  82. package/node/esm/{Bb1sLMqXWKjdve23.mjs → Do-zCKziWhoG5eAv.mjs} +2 -2
  83. package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DpJ2gmZJioCyq8La.mjs} +67 -67
  84. package/node/esm/{ETK6T6G0SIcFXDe5.mjs → XEDcegsv5AGKBfu2.mjs} +40 -40
  85. package/node/esm/index.mjs +8941 -13558
  86. package/node/esm/yCUxQuqVuC4DHKPx.mjs +385 -0
  87. package/node/esm/zITjZ7R4raDqhP-n.mjs +515 -0
  88. package/package.json +9 -9
  89. package/resources/locales/de/ui.msg.json +97 -0
  90. package/resources/locales/en/ui.msg.json +97 -0
  91. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  92. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  93. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  94. package/types/src/anomalies/index.d.ts +3 -0
  95. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  96. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  97. package/types/src/chart/ChartPlugin.d.ts +6 -0
  98. package/types/src/chart/index.d.ts +3 -0
  99. package/types/src/comments/CommentCard.d.ts +2 -2
  100. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  101. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  102. package/types/src/format/BorderPreview.d.ts +11 -4
  103. package/types/src/format/useFormatSelection.d.ts +4 -4
  104. package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
  105. package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
  106. package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
  107. package/types/src/index.d.ts +15 -6
  108. package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
  109. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  110. package/types/src/protection/index.d.ts +1 -1
  111. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
  112. package/types/src/workbook/DefaultRenderers.d.ts +2 -2
  113. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  114. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
  115. package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
  116. package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
  117. package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
  118. package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
  119. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { A as e } from "./index.mjs";
7
+ import { D as e } from "./index.mjs";
8
8
  import { ReactUtils as t } from "@sheetxl/utils-react";
9
9
  import { Component as n, PureComponent as i, memo as s, useCallback as r, useLayoutEffect as o, useState as a } from "react";
10
10
  import { jsx as l, jsxs as h } from "react/jsx-runtime";
@@ -542,7 +542,7 @@ var g = class extends (i || n) {
542
542
  const { selectedColor: i, onColorChange: s, renderers: u, disableAlpha: b = !1, style: f = t.EmptyCssProperties, ...v } = n, y = d(), [C, L] = a(() => w(i)), [M, E] = a(C.hsl.h ?? 0), k = r((e) => {
543
543
  let t = w(e, M);
544
544
  return E(t.hsl.h ?? 0), L(t), t;
545
- }, [M]), R = r((e) => {
545
+ }, [M]), D = r((e) => {
546
546
  const t = k(e), n = `rgba(${t.rgb.r},${t.rgb.g},${t.rgb.b},${b ? 1 : t.rgb.a})`;
547
547
  s?.(n);
548
548
  }, [
@@ -553,7 +553,7 @@ var g = class extends (i || n) {
553
553
  o(() => {
554
554
  k(i);
555
555
  }, [i, k]);
556
- const S = l("div", {
556
+ const R = l("div", {
557
557
  style: {
558
558
  position: "relative",
559
559
  minHeight: "10px",
@@ -568,7 +568,7 @@ var g = class extends (i || n) {
568
568
  rgb: C.rgb,
569
569
  hsl: C.hsl,
570
570
  renderers: u,
571
- onChange: R
571
+ onChange: D
572
572
  })
573
573
  });
574
574
  return h("div", {
@@ -593,7 +593,7 @@ var g = class extends (i || n) {
593
593
  },
594
594
  hsl: C.hsl,
595
595
  hsv: C.hsv,
596
- onChange: R
596
+ onChange: D
597
597
  })
598
598
  }),
599
599
  h("div", {
@@ -623,9 +623,9 @@ var g = class extends (i || n) {
623
623
  shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"
624
624
  },
625
625
  hsl: C.hsl,
626
- onChange: R
626
+ onChange: D
627
627
  })
628
- }), b ? null : S]
628
+ }), b ? null : R]
629
629
  }), h("div", {
630
630
  style: {
631
631
  minWidth: "24px",
@@ -670,7 +670,7 @@ var g = class extends (i || n) {
670
670
  hsl: C.hsl,
671
671
  hex: C.hex,
672
672
  disableAlpha: b,
673
- onChange: R
673
+ onChange: D
674
674
  })
675
675
  })
676
676
  ]
@@ -0,0 +1,412 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { PresetChip as a, c as e, f as t, o as i, s as l } from "./index.mjs";
8
+ import { n as o, t as n } from "./BNg4QQY0WAPLE0q7.mjs";
9
+ import { ICondition as r, IDataValidation as d } from "@sheetxl/sdk";
10
+ import { useModelSync as s } from "@sheetxl/react";
11
+ import { DynamicIcon as p, useTranslator as m } from "@sheetxl/utils-react";
12
+ import { forwardRef as g, memo as c, useState as u } from "react";
13
+ import { Fragment as h, jsx as x, jsxs as V } from "react/jsx-runtime";
14
+ import { Box as y, Checkbox as b, FormControl as f, FormControlLabel as v, InputLabel as C, MenuItem as S, Paper as w, Select as D, Tab as k, Tabs as A, TextField as I, Typography as N } from "@mui/material";
15
+ import { messageKey as P } from "@sheetxl/utils";
16
+ var T = r.BuiltInSelectorNames, M = {
17
+ [T.Whole]: "FormulaMathTrig",
18
+ [T.Number]: "IncreaseDecimal",
19
+ [T.Date]: "FormulaDateTime",
20
+ [T.DateTime]: "FormulaDateTime",
21
+ [T.Time]: "FormulaDateTime",
22
+ [T.TextLength]: "FormulaText"
23
+ }, W = (a) => {
24
+ const e = a.getCondition();
25
+ if (!e) return "DataValidation";
26
+ const t = e.toJSON();
27
+ return t.operator === r.BuiltInOperatorNames.Expression ? "FormulaCustom" : t.selector || t.operator !== r.BuiltInOperatorNames.InSet ? "string" == typeof t.selector && M[t.selector] || "DataValidation" : "Menu";
28
+ }, z = c(({ dataValidation: e, size: t = 28 }) => (s(e, "onAnyChange"), x(a, {
29
+ className: "sxl-dv-icon",
30
+ sx: {
31
+ width: "auto",
32
+ minWidth: 1.7 * t + "px",
33
+ height: `${t}px`
34
+ },
35
+ children: x(p, {
36
+ iconKey: W(e),
37
+ size: Math.round(.6 * t),
38
+ ariaHidden: !0
39
+ })
40
+ })));
41
+ z.displayName = "DataValidationIcon";
42
+ var B = (a, e) => {
43
+ const t = a.getCondition();
44
+ if (!t) return e("dataValidation.anyValue");
45
+ const i = t.toJSON();
46
+ if (i.operator === r.BuiltInOperatorNames.Expression && "string" == typeof i.param) return e("dataValidation.titleCustom", { formula: i.param });
47
+ if (!i.selector && i.operator === r.BuiltInOperatorNames.InSet) {
48
+ const a = i.param, t = a?.source;
49
+ if ("string" == typeof t && t.length > 0) return e("dataValidation.titleListFrom", { source: t });
50
+ const l = (a?.items ?? []).map((a) => String(a ?? "")).concat((a?.additions ?? []).map((a) => a.trimStart()));
51
+ return e("dataValidation.titleList", {
52
+ items: l.slice(0, 3).join(", "),
53
+ more: Math.max(0, l.length - 3)
54
+ });
55
+ }
56
+ return t.toString();
57
+ }, R = {
58
+ [d.AlertStyle.Stop]: "ValidationStop",
59
+ [d.AlertStyle.Warning]: "ValidationWarning",
60
+ [d.AlertStyle.Information]: "ValidationInformation"
61
+ }, H = "none", O = {
62
+ width: 18,
63
+ height: 18,
64
+ flex: "0 0 auto"
65
+ }, L = {
66
+ [d.AlertStyle.Stop]: P("dataValidation.alertStop"),
67
+ [d.AlertStyle.Warning]: P("dataValidation.alertWarning"),
68
+ [d.AlertStyle.Information]: P("dataValidation.alertInformation")
69
+ }, F = c((a) => {
70
+ const { dataValidation: o } = a, r = m();
71
+ s(o, "onAnyChange");
72
+ const d = o.isProtected(), g = o.getRenderHints().includes("list"), [c, P] = u("rule"), T = V(w, {
73
+ tabIndex: 0,
74
+ className: t["editor-panel"],
75
+ sx: {
76
+ gap: (a) => a.spacing(1),
77
+ paddingTop: (a) => a.spacing(1.25),
78
+ paddingBottom: (a) => a.spacing(2),
79
+ paddingLeft: (a) => a.spacing(1.5),
80
+ paddingRight: (a) => a.spacing(1.5),
81
+ border: (a) => `1px solid ${a.palette.divider}`,
82
+ borderRadius: (a) => a.spacing(1.25),
83
+ overflow: "auto"
84
+ },
85
+ children: [
86
+ V(y, {
87
+ sx: {
88
+ display: "flex",
89
+ flexDirection: "column",
90
+ gap: (a) => a.spacing(1.75),
91
+ margin: (a) => a.spacing(1.25),
92
+ marginBottom: 0
93
+ },
94
+ children: [V(y, {
95
+ sx: {
96
+ display: "flex",
97
+ alignItems: "center",
98
+ gap: (a) => a.spacing(1.5)
99
+ },
100
+ children: [x(z, {
101
+ dataValidation: o,
102
+ size: 48
103
+ }), x(N, {
104
+ variant: "body2",
105
+ sx: {
106
+ minWidth: 0,
107
+ wordBreak: "break-word"
108
+ },
109
+ children: B(o, r)
110
+ })]
111
+ }), x(n, {
112
+ item: o,
113
+ label: r("dataValidation.applyTo")
114
+ })]
115
+ }),
116
+ V(A, {
117
+ value: c,
118
+ onChange: (a, e) => P(e),
119
+ sx: {
120
+ minHeight: "36px",
121
+ borderBottom: 1,
122
+ borderColor: "divider",
123
+ "& .MuiTab-root": {
124
+ minHeight: "36px",
125
+ textTransform: "none",
126
+ pt: .5,
127
+ pb: .5,
128
+ px: 1.5,
129
+ minWidth: 0
130
+ }
131
+ },
132
+ children: [x(k, {
133
+ value: "rule",
134
+ label: r("dataValidation.tabRule")
135
+ }), x(k, {
136
+ value: "prompt",
137
+ label: r("dataValidation.prompt")
138
+ })]
139
+ }),
140
+ "prompt" === c ? V(y, {
141
+ sx: {
142
+ display: "flex",
143
+ flexDirection: "column",
144
+ gap: 2
145
+ },
146
+ children: [
147
+ x(v, {
148
+ control: x(b, {
149
+ checked: o.isShowPromptMessage(),
150
+ disabled: d,
151
+ onChange: (a) => o.setShowPromptMessage(a.target.checked)
152
+ }),
153
+ label: r("dataValidation.showPrompt"),
154
+ sx: {
155
+ ml: 0,
156
+ pl: .5
157
+ }
158
+ }),
159
+ x(I, {
160
+ size: "small",
161
+ label: r("dataValidation.title"),
162
+ value: o.getPromptTitle(),
163
+ onChange: (a) => o.setPromptTitle(a.target.value),
164
+ disabled: d,
165
+ fullWidth: !0,
166
+ slotProps: { htmlInput: { maxLength: 32 } },
167
+ sx: { backgroundColor: "background.paper" }
168
+ }),
169
+ x(I, {
170
+ size: "small",
171
+ label: r("dataValidation.message"),
172
+ value: o.getPromptMessage(),
173
+ onChange: (a) => o.setPromptMessage(a.target.value),
174
+ disabled: d,
175
+ multiline: !0,
176
+ rows: 2,
177
+ fullWidth: !0,
178
+ slotProps: { htmlInput: { maxLength: 254 } },
179
+ sx: { backgroundColor: "background.paper" }
180
+ })
181
+ ]
182
+ }) : V(h, { children: [x(i, {
183
+ sx: {
184
+ ...l,
185
+ p: 2,
186
+ pb: 0
187
+ },
188
+ selectorTitle: r("dataValidation.allow"),
189
+ condition: o.getCondition(),
190
+ ranges: o.getRanges(),
191
+ readOnly: d,
192
+ onConditionChange: (a) => {
193
+ const e = !o.getCondition() && a ? {
194
+ ...a,
195
+ includeBlanks: !0
196
+ } : a;
197
+ o.setCondition(e);
198
+ },
199
+ qualifiers: g ? x(v, {
200
+ control: x(b, {
201
+ size: "small",
202
+ checked: !o.isHideDropdown(),
203
+ disabled: d,
204
+ onChange: (a) => o.setHideDropdown(!a.target.checked)
205
+ }),
206
+ label: r("dataValidation.inCellDropdown")
207
+ }) : null
208
+ }), V(y, {
209
+ sx: {
210
+ display: "flex",
211
+ flexDirection: "column",
212
+ gap: 2,
213
+ p: 2,
214
+ border: 1,
215
+ borderColor: "divider",
216
+ borderRadius: 1
217
+ },
218
+ children: [V(f, {
219
+ fullWidth: !0,
220
+ size: "small",
221
+ disabled: d,
222
+ sx: { backgroundColor: "background.paper" },
223
+ children: [x(C, { children: r("dataValidation.onInvalid") }), V(D, {
224
+ className: "on-invalid",
225
+ value: o.isShowAlertMessage() ? o.getAlertStyle() : H,
226
+ label: r("dataValidation.onInvalid"),
227
+ onChange: (a) => {
228
+ const e = a.target.value;
229
+ e !== H ? (o.setAlertStyle(e), o.setShowAlertMessage(!0)) : o.setShowAlertMessage(!1);
230
+ },
231
+ renderValue: (a) => V(y, {
232
+ sx: {
233
+ display: "flex",
234
+ alignItems: "center",
235
+ gap: 1
236
+ },
237
+ children: [a === H ? x(y, { sx: O }) : x(p, {
238
+ iconKey: R[a],
239
+ size: 18,
240
+ ariaHidden: !0
241
+ }), r(a === H ? "dataValidation.alertNone" : L[a])]
242
+ }),
243
+ children: [Object.keys(R).map((a) => V(S, {
244
+ value: a,
245
+ sx: { gap: 1 },
246
+ children: [x(p, {
247
+ iconKey: R[a],
248
+ size: 18,
249
+ ariaHidden: !0
250
+ }), r(L[a])]
251
+ }, a)), V(S, {
252
+ value: H,
253
+ sx: { gap: 1 },
254
+ children: [x(y, { sx: O }), r("dataValidation.alertNone")]
255
+ }, H)]
256
+ })]
257
+ }), o.isShowAlertMessage() ? V(h, { children: [x(I, {
258
+ size: "small",
259
+ label: r("dataValidation.title"),
260
+ value: o.getAlertTitle(),
261
+ onChange: (a) => o.setAlertTitle(a.target.value),
262
+ disabled: d,
263
+ fullWidth: !0,
264
+ slotProps: { htmlInput: { maxLength: 32 } },
265
+ sx: { backgroundColor: "background.paper" }
266
+ }), x(I, {
267
+ size: "small",
268
+ label: r("dataValidation.message"),
269
+ value: o.getAlertMessage(),
270
+ onChange: (a) => o.setAlertMessage(a.target.value),
271
+ disabled: d,
272
+ multiline: !0,
273
+ rows: 2,
274
+ fullWidth: !0,
275
+ slotProps: { htmlInput: { maxLength: 225 } },
276
+ sx: { backgroundColor: "background.paper" }
277
+ })] }) : null]
278
+ })] })
279
+ ]
280
+ });
281
+ return x(e.Provider, {
282
+ value: o,
283
+ children: T
284
+ });
285
+ });
286
+ F.displayName = "DataValidationEditorPanel";
287
+ var K = ({ icon: a, title: e, children: t }) => V(y, {
288
+ className: "validation-badge",
289
+ title: e,
290
+ "aria-label": e,
291
+ sx: {
292
+ display: "inline-flex",
293
+ alignItems: "center",
294
+ gap: .5,
295
+ px: .75,
296
+ py: .25,
297
+ border: 1,
298
+ borderColor: "divider",
299
+ borderRadius: 1,
300
+ color: "text.secondary"
301
+ },
302
+ children: [x(p, {
303
+ iconKey: a,
304
+ size: 14,
305
+ ariaHidden: !0
306
+ }), t ? x(N, {
307
+ variant: "caption",
308
+ children: t
309
+ }) : null]
310
+ }), j = {
311
+ [d.AlertStyle.Stop]: "dataValidation.alertStop",
312
+ [d.AlertStyle.Warning]: "dataValidation.alertWarning",
313
+ [d.AlertStyle.Information]: "dataValidation.alertInformation"
314
+ }, E = c(({ item: a }) => {
315
+ const e = m();
316
+ s(a, "onAnyChange");
317
+ const t = [];
318
+ if (a.isShowPromptMessage() && t.push(x(K, {
319
+ icon: "NoteInsert",
320
+ title: e("dataValidation.prompt"),
321
+ children: a.getPromptTitle() || null
322
+ }, "prompt")), a.getCondition() && a.isShowAlertMessage()) {
323
+ const i = a.getAlertStyle();
324
+ t.push(x(K, {
325
+ icon: R[i],
326
+ title: `${e("dataValidation.alert")}: ${e(j[i])}`
327
+ }, "alert"));
328
+ }
329
+ return !a.isHideDropdown() && a.getRenderHints().includes("list") && t.push(x(K, {
330
+ icon: "ArrowDownOutline",
331
+ title: e("dataValidation.inCellDropdown")
332
+ }, "dropdown")), 0 === t.length ? null : x(y, {
333
+ sx: {
334
+ display: "flex",
335
+ flexWrap: "wrap",
336
+ gap: .5
337
+ },
338
+ children: t
339
+ });
340
+ });
341
+ E.displayName = "DataValidationCardBody";
342
+ var $ = c(({ item: a }) => {
343
+ const e = m();
344
+ return x(n, {
345
+ item: a,
346
+ label: e("dataValidation.applyTo"),
347
+ helperText: null
348
+ });
349
+ });
350
+ $.displayName = "DataValidationCardRanges";
351
+ var U = {
352
+ key: "data-validation",
353
+ messageKeys: {
354
+ none: P("dataValidation.none"),
355
+ addPrompt: P("dataValidation.addPrompt"),
356
+ heading: P("dataValidation.heading"),
357
+ insert: P("dataValidation.insert"),
358
+ new: P("dataValidation.new"),
359
+ moveUp: P("dataValidation.moveUp"),
360
+ moveDown: P("dataValidation.moveDown"),
361
+ edit: P("dataValidation.edit"),
362
+ duplicate: P("dataValidation.duplicate"),
363
+ delete: P("dataValidation.delete"),
364
+ cancel: P("dataValidation.cancel"),
365
+ save: P("dataValidation.save")
366
+ },
367
+ getCollection: (a) => a.getDataValidations(),
368
+ changeEvents: ["onDataValidationsChange"],
369
+ isReadOnly: (a) => a.getProtection().isLocked() || a.getProtection().isReadOnly(),
370
+ applyUpdate: (a, e) => {
371
+ a.update(e);
372
+ },
373
+ validate: (a) => a.getCondition()?.validate() ?? null,
374
+ applyNewDefaults: (a) => {
375
+ a.update({
376
+ alertStyle: d.AlertStyle.Stop,
377
+ showAlertMessage: !0
378
+ });
379
+ },
380
+ applySeed: (a, e) => {
381
+ a.update(e);
382
+ },
383
+ getCardTitle: B,
384
+ CardMedia: ({ item: a }) => x(z, {
385
+ dataValidation: a,
386
+ size: 32
387
+ }),
388
+ CardSubtitle: $,
389
+ CardBody: E,
390
+ EditorBody: ({ item: a }) => x(F, { dataValidation: a })
391
+ }, J = c(g((a, e) => {
392
+ const { workbook: t, args: i, ...l } = a;
393
+ return x(o, {
394
+ ref: e,
395
+ workbook: t,
396
+ descriptor: U,
397
+ args: i,
398
+ dragReorder: !0,
399
+ ...l
400
+ });
401
+ }));
402
+ J.displayName = "DataValidationDetailsPanel";
403
+ var q = (a) => {
404
+ const { model: e, entryKey: t, frame: i, args: l, ref: o, ...n } = a;
405
+ return x(J, {
406
+ ref: o,
407
+ workbook: e,
408
+ args: l,
409
+ ...n
410
+ });
411
+ };
412
+ export { q as DataValidationDetailsTaskPane };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { useTranslator as e } from "@sheetxl/utils-react";
8
+ import { useState as t } from "react";
9
+ import { OptionsDialog as o } from "@sheetxl/utils-mui";
10
+ import { jsx as r, jsxs as a } from "react/jsx-runtime";
11
+ import { Box as l, TextField as s, Typography as p } from "@mui/material";
12
+ var n = (n) => {
13
+ const i = e(), { description: u, requireCurrent: c = !1, onApply: d, title: m, sx: h, ...w } = n, [C, x] = t(""), [f, g] = t(""), [v, k] = t(""), [b, y] = t(!1), O = "" === f, F = v !== f, z = !O && !F;
14
+ return r(o, {
15
+ title: m ?? i(c ? "password.titleChange" : "password.title"),
16
+ options: ["Ok", "Cancel"],
17
+ defaultOption: "Ok",
18
+ cancelOption: "Cancel",
19
+ autoFocusSel: ".autoFocus",
20
+ sx: {
21
+ width: "380px",
22
+ ...h
23
+ },
24
+ onValidateOption: (e) => "Cancel" === e || (y(!0), z),
25
+ onOption: (e, t) => {
26
+ if (!t && "Ok" === e) return d(f, c ? C : void 0);
27
+ },
28
+ ...w,
29
+ children: a(l, {
30
+ sx: {
31
+ display: "flex",
32
+ flexDirection: "column",
33
+ gap: (e) => e.spacing(2),
34
+ paddingTop: (e) => e.spacing(1)
35
+ },
36
+ children: [
37
+ u ? r(p, {
38
+ variant: "body2",
39
+ sx: { color: "text.secondary" },
40
+ children: u
41
+ }) : null,
42
+ c ? r(s, {
43
+ type: "password",
44
+ size: "small",
45
+ label: i("password.current"),
46
+ value: C,
47
+ onChange: (e) => x(e.target.value),
48
+ slotProps: {
49
+ inputLabel: { shrink: !0 },
50
+ htmlInput: {
51
+ className: "autoFocus",
52
+ autoComplete: "current-password",
53
+ spellCheck: !1
54
+ }
55
+ }
56
+ }) : null,
57
+ r(s, {
58
+ type: "password",
59
+ size: "small",
60
+ label: i(c ? "password.new" : "password.label"),
61
+ value: f,
62
+ error: b && O,
63
+ helperText: b && O ? i("password.required") : " ",
64
+ onChange: (e) => g(e.target.value),
65
+ slotProps: {
66
+ inputLabel: { shrink: !0 },
67
+ htmlInput: {
68
+ className: c ? void 0 : "autoFocus",
69
+ autoComplete: "new-password",
70
+ spellCheck: !1
71
+ }
72
+ }
73
+ }),
74
+ r(s, {
75
+ type: "password",
76
+ size: "small",
77
+ label: i("protection.passwordConfirm"),
78
+ value: v,
79
+ error: b && !O && F,
80
+ helperText: b && !O && F ? i("protection.passwordMismatch") : " ",
81
+ onChange: (e) => k(e.target.value),
82
+ slotProps: {
83
+ inputLabel: { shrink: !0 },
84
+ htmlInput: {
85
+ autoComplete: "new-password",
86
+ spellCheck: !1
87
+ }
88
+ }
89
+ })
90
+ ]
91
+ })
92
+ });
93
+ };
94
+ export { n as PasswordDialog, n as default };