@sheetxl/studio-mui 0.8.0-beta.14 → 0.8.0-beta.16

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 (120) hide show
  1. package/LICENSE.md +17 -7
  2. package/browser/esm/{DviYEVpPnQaWx-Tr.mjs → 2DGUEeY8au7Hbmze.mjs} +2 -2
  3. package/browser/esm/{D5ASCLEncVX6S3t7.mjs → 9V0gwYl3BcajPwBD.mjs} +2 -2
  4. package/browser/esm/B0mscuFChIInl6Mo.mjs +119 -0
  5. package/browser/esm/{cMMnySiLwLtz8_Zk.mjs → BGg5TSbhaUimavRf.mjs} +7 -7
  6. package/browser/esm/BL-h4RElQAdaeHPF.mjs +360 -0
  7. package/browser/esm/{XkkwDAFA6f5msXE4.mjs → BSrubs5qLEinR8Ew.mjs} +92 -87
  8. package/browser/esm/BUCQPr09aodgC88P.mjs +225 -0
  9. package/browser/esm/{BJn4i5eSKttOM7Va.mjs → Bg6bcIJsute7rxDL.mjs} +3 -3
  10. package/browser/esm/{b6OpGIOfqvVgPkpN.mjs → BjR7L3X6je3fXyQi.mjs} +2 -2
  11. package/browser/esm/{Cm7gnL7wtPzU7kH9.mjs → Bo_18UwXk7eK6QaM.mjs} +3 -3
  12. package/browser/esm/{C4-74xZS6PXqeP2-.mjs → Bp4rtdIKIFzTeJvr.mjs} +13 -9
  13. package/browser/esm/BxneVAXjYuQbCUQo.mjs +424 -0
  14. package/browser/esm/{BhurfBABcwf3sq1Y.mjs → C2V3kv29foh8dScC.mjs} +2 -2
  15. package/browser/esm/{4meV2QrzGwOTw-Wg.mjs → C8M4U_SswTd6auZd.mjs} +4 -4
  16. package/browser/esm/{DydtA0Kx0EIVeRVq.mjs → C9XRjC0yoGvS9Cm9.mjs} +3 -3
  17. package/browser/esm/{D1METLVOmQUWB2GY.mjs → CDgoQhayiKyo-7Br.mjs} +34 -33
  18. package/browser/esm/{DJytYYs6hwKzoGdK.mjs → CLgar8cakFC22X3w.mjs} +2 -2
  19. package/browser/esm/{DSMZVJXRlgHj6hnF.mjs → CUh56URLD9Vh5Ak9.mjs} +1807 -1200
  20. package/browser/esm/{D7SHK5F4crIKlHfX.mjs → CXgBRmauwDvHb3fQ.mjs} +2 -2
  21. package/browser/esm/{CM5uH7kPI6bp0Ynb.mjs → CYOaHHiaC7Ip5VLn.mjs} +2 -2
  22. package/browser/esm/C_qDBCzb8IHBlPhJ.mjs +294 -0
  23. package/browser/esm/{CouH7NfOLzq-7BFG.mjs → CfsYKmwU44jlvh2Y.mjs} +2 -2
  24. package/browser/esm/Ch1y4AkETfKCYDwf.mjs +106 -0
  25. package/browser/esm/{C7G22BSOh6ahi_YA.mjs → CnId_LC0EekuwaAF.mjs} +3 -3
  26. package/browser/esm/{DUMfNkupQUkMYbRX.mjs → CtVSJjciTocAi-ph.mjs} +3 -3
  27. package/browser/esm/{BSgsK2ctkA7acJ8B.mjs → CuQsEoKZJrSL989Q.mjs} +6 -6
  28. package/browser/esm/{B65gFGIGbaB2HJ7S.mjs → Cv99zJfRtzJQmM9a.mjs} +2 -2
  29. package/browser/esm/{9wRFUyQKqfHCPUiS.mjs → Cxk-oWZzE2jq5ul6.mjs} +3 -3
  30. package/browser/esm/{B0u4XScttbCbHUuj.mjs → D3XdTSymYMag6tor.mjs} +6 -6
  31. package/browser/esm/{BLWzmTXqRJp_rp2R.mjs → D4jGaUxHOgVc4qN0.mjs} +3 -3
  32. package/browser/esm/{D5ioZQTn_SJateKf.mjs → DAdhaGB933dfni3E.mjs} +3 -3
  33. package/browser/esm/{DYKsNTXsl78btQCN.mjs → DBx1Y3oFzB6gv-LQ.mjs} +3 -3
  34. package/browser/esm/{DROcTh8qOW1i6ktd.mjs → DIAnBUXPTvYAp5fm.mjs} +3 -3
  35. package/browser/esm/{CQmRcbXzQ2ZnzWkm.mjs → DIJh9jY37iVFn-tE.mjs} +2 -2
  36. package/browser/esm/{DC70OHr0cJy33grZ.mjs → DK1K-M9iJV-DK3lK.mjs} +2 -2
  37. package/browser/esm/{ATDkpSD6QYiZqoUd.mjs → DMhFcJsnKSKTDivl.mjs} +2 -2
  38. package/browser/esm/{C4UBegw-DrnYEN3U.mjs → DMj9kkIWw9chI5_u.mjs} +5 -5
  39. package/browser/esm/DUpW8HMoEhD3C9l6.mjs +235 -0
  40. package/browser/esm/{IF6KtCM-Yj_9GGEI.mjs → DVJ5AK0zcqSACGov.mjs} +9 -9
  41. package/browser/esm/{TJm3V2B1CMw1iZoU.mjs → DVaykBKx4eEsP4MI.mjs} +4 -4
  42. package/browser/esm/{Dh1o7OIOvCQaeaVN.mjs → Dex65RXS_A5CnMg3.mjs} +3 -3
  43. package/browser/esm/{DcF7yoU5XaD0TzDi.mjs → DfYtGsqDIMAG4Sp8.mjs} +2 -2
  44. package/browser/esm/{B2NGlVfdWvs2G_Fq.mjs → Dj0VEFe2ckEWgQjy.mjs} +5 -5
  45. package/browser/esm/{CSjn0SmASZfMzjJD.mjs → DjCDJhBfVI9O_Sq1.mjs} +6 -6
  46. package/browser/esm/DjjmLQLxU_U4JB3n.mjs +973 -0
  47. package/browser/esm/{dcZCjUD2UCAzFGTB.mjs → DmOrKFaiUUr5hlFl.mjs} +5 -4
  48. package/browser/esm/{BnRqW8S8uRFT1dsa.mjs → DoYSmj1LQHAAqt5b.mjs} +2 -2
  49. package/browser/esm/{DEu_fNm5LXqXGUqI.mjs → KhOxaZS8EeSaYFXZ.mjs} +2 -2
  50. package/browser/esm/{CqAaow0-s9wI-Zco.mjs → PvNtCGveCLbLAP3e.mjs} +14 -14
  51. package/browser/esm/{DGGNjWCfZChvgtCJ.mjs → ROOxAZY7YyHDmPcQ.mjs} +4 -4
  52. package/browser/esm/{C85QGz19eE9ggqzR.mjs → TfUaejwwWzu5qFVE.mjs} +3 -3
  53. package/browser/esm/{CeYt9oGNq5J48kA8.mjs → ZhI7zxDSTWb1DfaE.mjs} +3 -3
  54. package/browser/esm/{BPEGlembHUmOukt-.mjs → fqZt7Z0jR4illVKU.mjs} +5 -5
  55. package/browser/esm/index.mjs +278 -277
  56. package/browser/esm/{7GvHfNWduigxqNjI.mjs → r7bLyFzJfaGLKP_7.mjs} +2 -2
  57. package/browser/esm/{DGsTOxJVdwIgmFiF.mjs → tffjGixzP1Ze4DqB.mjs} +3 -3
  58. package/browser/esm/{CQ6F1l897Rr74YXa.mjs → tiC8hseLz66gO5BS.mjs} +804 -713
  59. package/licenses/dependencies.txt +33 -33
  60. package/node/esm/{CnHJuuebdiYB4hU1.mjs → -Il_piuBrbndDROB.mjs} +2 -2
  61. package/node/esm/0cm_0VYweOBWmzi7.mjs +972 -0
  62. package/node/esm/{Ua-hzH0IDC5UU7I1.mjs → 1gdwmt5CrQy4cGTH.mjs} +2 -2
  63. package/node/esm/{BXq4h4T2V5D0e0GE.mjs → 3Geel3fylTwbPuxf.mjs} +2 -2
  64. package/node/esm/{BPbOKZTCABQS1v4l.mjs → 4pRKBhUYhbbE6qVT.mjs} +2 -2
  65. package/node/esm/{DV7GtbZngmzKJkGC.mjs → 9qIZWfzxSaxNk6Cm.mjs} +16 -15
  66. package/node/esm/B9uLfbf5gMGnoUjH.mjs +224 -0
  67. package/node/esm/{C2ZhJJ6JogM32N6v.mjs → BFO2WxwRNbu-UmKe.mjs} +3 -3
  68. package/node/esm/{DrZYqa9k2cas_dpR.mjs → BIJXqUbAalnd-gXD.mjs} +2 -2
  69. package/node/esm/{DLa2dwTHx-TF9X28.mjs → BIviFvkWx6eP4dMd.mjs} +12 -12
  70. package/node/esm/{By9Y6KcwsjQGiP4W.mjs → BTOCej61y3MazK6r.mjs} +2 -2
  71. package/node/esm/{DNhFkzvStZYjYqlY.mjs → BV9hUarSGd3mWC8o.mjs} +3 -3
  72. package/node/esm/{ChAnZ_8BZXB8xGku.mjs → BX1cTEV3SpcqLcXx.mjs} +81 -80
  73. package/node/esm/{DINEK8QwAC2xbcJg.mjs → BZu-8gEXwIzW_YX9.mjs} +2 -2
  74. package/node/esm/{Dua4HsVMCVMOSuUP.mjs → B_jOG6MlKoiboP3D.mjs} +3 -3
  75. package/node/esm/{a4ksKvzRiZRS-LjD.mjs → BgObBW8ZUr50OufC.mjs} +8 -8
  76. package/node/esm/{BIbJ-RvwV7EKR1AK.mjs → BhiuBl2z87xThV1b.mjs} +2 -2
  77. package/node/esm/{Cv_gkzf1CvleEpGx.mjs → Bm054Lh36PSa5m1P.mjs} +2 -2
  78. package/node/esm/BtxNP8JWe16vSXAs.mjs +106 -0
  79. package/node/esm/BzT_zks-KORaryRo.mjs +118 -0
  80. package/node/esm/{DfRwTR3tR0Wx5I0U.mjs → C5dRM0ExMHpFgKd0.mjs} +3 -3
  81. package/node/esm/{DKJDmlxmNG0mVHmb.mjs → CQxu_KONf2yyKKnD.mjs} +2 -2
  82. package/node/esm/{D9neYUsRInmBz-7P.mjs → CdoFRzEug2L0LwNb.mjs} +7 -7
  83. package/node/esm/{Hp0ggyjuRLoV7Zkw.mjs → Ch7Ebxf0bFrlCJpW.mjs} +2 -2
  84. package/node/esm/{GkXvPmel2BbE1Yvo.mjs → CsQTJ4JQRxLcJDiZ.mjs} +2 -2
  85. package/node/esm/{D1RBCi056McbAuVe.mjs → CyKOmz26TaZSFxmi.mjs} +3 -3
  86. package/node/esm/D3TsBlOewIFj-VDW.mjs +294 -0
  87. package/node/esm/{rSq-rFZ2oBrx0daL.mjs → D4TlOO7hjvqTR2HX.mjs} +3 -3
  88. package/node/esm/{CLArZpAFWoKR9UXC.mjs → DYNM5HfUK0JbGHsx.mjs} +2 -2
  89. package/node/esm/{B74EJtfb07jNPG2i.mjs → DhPNzztIuq9WJwCz.mjs} +3 -3
  90. package/node/esm/{CMsWjZqAF2n3PniO.mjs → cl-bDkq8M4STBYJy.mjs} +2 -2
  91. package/node/esm/fazR-cWd-2-W82Nk.mjs +425 -0
  92. package/node/esm/index.mjs +3391 -2778
  93. package/node/esm/{CzQvRTTBIzvSAQWs.mjs → iyOc5Rm5x746Qd3R.mjs} +2 -2
  94. package/node/esm/{D3BoGAsVExHN5pzo.mjs → klLaIOeBuqaYuz_q.mjs} +2 -2
  95. package/node/esm/{0TWX9zLKXvPj1qMo.mjs → mmzQ-lse6yBavXnw.mjs} +603 -514
  96. package/node/esm/{C29ReEXb9EK4DP6E.mjs → rpHmm4X81z1orjHr.mjs} +3 -3
  97. package/node/esm/{Y0a0MfNj9jzVeoRQ.mjs → tRnEFhRlzQPziQif.mjs} +2 -2
  98. package/package.json +10 -10
  99. package/resources/locales/de/groups.cmd.json +3 -0
  100. package/resources/locales/de/ui.msg.json +41 -0
  101. package/resources/locales/en/groups.cmd.json +3 -0
  102. package/resources/locales/en/ui.msg.json +41 -0
  103. package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
  104. package/types/src/command/index.d.ts +1 -0
  105. package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
  106. package/types/src/filter/PivotMenu.d.ts +31 -0
  107. package/types/src/filter/index.d.ts +1 -0
  108. package/types/src/pivot/PivotChipMenu.d.ts +10 -0
  109. package/types/src/pivot/PivotPlugin.d.ts +3 -0
  110. package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
  111. package/types/src/pivot/PivotTableHeader.d.ts +12 -0
  112. package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
  113. package/types/src/pivot/_pivotSource.d.ts +7 -0
  114. package/types/src/table/_drawStyleSwatch.d.ts +25 -0
  115. package/types/src/workbook/DefaultRenderers.d.ts +10 -4
  116. package/browser/esm/BJPuzqf8wzAaSBCD.mjs +0 -1379
  117. package/browser/esm/CUBCWkB6A5HH4u5Q.mjs +0 -319
  118. package/browser/esm/DKnuzGrJHk4qI0Zi.mjs +0 -582
  119. package/node/esm/BbCPG2xTU1rpAM5l.mjs +0 -318
  120. package/node/esm/DtxnTVIKKE8mp6rU.mjs +0 -1379
@@ -0,0 +1,425 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.16
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: MIT
6
+ */
7
+ import { NumberFormatOption as e, S as r, numberFormatCategoryLabel as t } from "./index.mjs";
8
+ import { a, i as n, n as o } from "./BtxNP8JWe16vSXAs.mjs";
9
+ import { NumberFormat as i } from "@sheetxl/sdk";
10
+ import { useCallbackRef as l, useTranslator as s } from "@sheetxl/utils-react";
11
+ import { forwardRef as c, memo as d, useEffect as u, useState as p } from "react";
12
+ import { ExhibitMenuItem as b, ExhibitPopupIconButton as h, SelectedIcon as f, defaultRenderPopupPanel as x } from "@sheetxl/utils-mui";
13
+ import { Fragment as g, jsx as y, jsxs as F } from "react/jsx-runtime";
14
+ import { Box as S, Checkbox as v, FormControl as k, FormControlLabel as E, InputLabel as T, List as C, ListItemButton as w, ListItemText as P, MenuItem as D, Select as R, TextField as I, Typography as M } from "@mui/material";
15
+ import N from "clsx";
16
+ var { Builder: A } = i, H = {
17
+ py: "2px",
18
+ px: 1,
19
+ minHeight: 0,
20
+ "& .MuiListItemText-root": { my: 0 },
21
+ "& .MuiListItemText-primary": {
22
+ fontSize: "0.8125rem",
23
+ lineHeight: 1.5
24
+ },
25
+ "& .MuiListItemText-secondary": {
26
+ fontSize: "0.7rem",
27
+ lineHeight: 1.3
28
+ }
29
+ }, L = {
30
+ border: (e) => `1px solid ${e.palette.divider}`,
31
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
32
+ overflow: "auto",
33
+ maxHeight: 260
34
+ };
35
+ function _(e, r, t) {
36
+ switch (r) {
37
+ case "minus": return e("numberFormat.negMinus");
38
+ case "red": return e("numberFormat.negRed");
39
+ case "parens": return e("numberFormat.negParens");
40
+ case "redParens": return e("numberFormat.negRedParens");
41
+ default: return t;
42
+ }
43
+ }
44
+ function z(e, r, t) {
45
+ const a = r?.getValue();
46
+ return "Text" === e ? "string" == typeof a ? a : t : "Date" === e || "Time" === e ? "number" == typeof a ? a : 45658.625 : "number" == typeof a ? a : 1234.56;
47
+ }
48
+ function O(e, r, t) {
49
+ try {
50
+ return t ? t.createCell({
51
+ value: r,
52
+ style: { numberFormat: e }
53
+ }).getNumberFormat().displayText || "" : i.getEngine().format(e, r, {}).text ?? "";
54
+ } catch {
55
+ return "";
56
+ }
57
+ }
58
+ var V = d(c((m, c) => {
59
+ const { value: d, onChange: V, context: W, onCommit: $, hideSample: B = !1, showQuickFormats: K = !1, disabled: j = !1, className: G, onKeyDown: Y, ...U } = m, Q = s(), [Z, q] = p(() => A.parse(d));
60
+ u(() => {
61
+ A.build(Z) !== d && q(A.parse(d));
62
+ }, [d]);
63
+ const J = W?.() ?? null, X = l((e) => {
64
+ q(e), V(A.build(e));
65
+ }, [V]), ee = l((e) => {
66
+ X({
67
+ ...Z,
68
+ ...e
69
+ });
70
+ }, [Z, X]), re = l(() => {
71
+ V(d);
72
+ }, [V, d]), te = l((e) => {
73
+ if (e === Z.category) return;
74
+ const r = A.defaultCodeForCategory(e), t = A.isParametricCategory(e) ? A.parse(r) : {
75
+ category: e,
76
+ code: r
77
+ };
78
+ X(t);
79
+ }, [Z.category, X]), ae = l((e) => {
80
+ if (Y?.(e), "Enter" === e.key) {
81
+ if (e.target.closest("[role=\"combobox\"], [role=\"menuitem\"]")) return;
82
+ e.preventDefault(), e.stopPropagation(), $?.();
83
+ }
84
+ }, [Y, $]), ne = (e, r, t) => (a) => {
85
+ let n = r;
86
+ switch (a.key) {
87
+ case "ArrowDown":
88
+ n = Math.min(e - 1, r + 1);
89
+ break;
90
+ case "ArrowUp":
91
+ n = Math.max(0, r - 1);
92
+ break;
93
+ case "Home":
94
+ n = 0;
95
+ break;
96
+ case "End":
97
+ n = e - 1;
98
+ break;
99
+ default: return;
100
+ }
101
+ a.preventDefault(), n !== r && n >= 0 && t(n), a.currentTarget.querySelectorAll(".MuiListItemButton-root")[n]?.focus();
102
+ }, oe = Z.category, ie = z(oe, J, Q("numberFormat.sampleText")), le = O(d, ie, J), se = y(o, {
103
+ label: Q("numberFormat.decimalPlaces"),
104
+ disabled: j,
105
+ value: Z.decimalPlaces ?? 0,
106
+ min: 0,
107
+ max: 30,
108
+ width: 140,
109
+ onChange: (e) => ee({ decimalPlaces: e })
110
+ }), me = Z.currencySymbol ?? "$", ce = F(k, {
111
+ size: "small",
112
+ sx: { width: 140 },
113
+ children: [y(T, {
114
+ shrink: !0,
115
+ children: Q("numberFormat.symbol")
116
+ }), y(R, {
117
+ label: Q("numberFormat.symbol"),
118
+ notched: !0,
119
+ disabled: j,
120
+ value: me,
121
+ onChange: (e) => ee({ currencySymbol: e.target.value }),
122
+ children: A.CURRENCY_SYMBOLS.map((e) => y(D, {
123
+ value: e,
124
+ onClick: a(me, e, re),
125
+ children: e
126
+ }, e))
127
+ })]
128
+ }), de = y(E, {
129
+ sx: { alignSelf: "center" },
130
+ control: y(v, {
131
+ size: "small",
132
+ disabled: j,
133
+ checked: !!Z.useSeparator,
134
+ onChange: (e) => ee({ useSeparator: e.target.checked })
135
+ }),
136
+ label: Q("numberFormat.useSeparator")
137
+ }), ue = F(S, {
138
+ sx: {
139
+ display: "flex",
140
+ flexDirection: "column",
141
+ minHeight: 0,
142
+ flex: "1 1 auto"
143
+ },
144
+ children: [y(M, {
145
+ variant: "caption",
146
+ component: "div",
147
+ sx: { mb: .5 },
148
+ children: Q("numberFormat.negativeNumbers")
149
+ }), y(C, {
150
+ dense: !0,
151
+ disablePadding: !0,
152
+ sx: {
153
+ ...L,
154
+ flex: "1 1 auto"
155
+ },
156
+ onKeyDown: ne(A.NEGATIVE_STYLES.length, Z.negativeStyle ?? 0, (e) => ee({ negativeStyle: e })),
157
+ children: A.NEGATIVE_STYLES.map((e, r) => {
158
+ const t = O(A.build({
159
+ ...Z,
160
+ negativeStyle: r
161
+ }), -function(e) {
162
+ return "number" == typeof e ? Math.abs(e) : 1234.56;
163
+ }(ie), J);
164
+ return y(w, {
165
+ disabled: j,
166
+ selected: (Z.negativeStyle ?? 0) === r,
167
+ onClick: () => ee({ negativeStyle: r }),
168
+ sx: H,
169
+ children: y(P, {
170
+ primary: t || _(Q, e.key, e.label),
171
+ slotProps: { primary: {
172
+ noWrap: !0,
173
+ sx: {
174
+ color: e.red ? "error.main" : void 0,
175
+ fontVariantNumeric: "tabular-nums"
176
+ }
177
+ } }
178
+ })
179
+ }, e.key);
180
+ })
181
+ })]
182
+ }), pe = (e, r) => y(C, {
183
+ dense: !0,
184
+ disablePadding: !0,
185
+ sx: {
186
+ ...L,
187
+ flex: "1 1 auto"
188
+ },
189
+ onKeyDown: ne(e.length, e.indexOf(d), (r) => X({
190
+ category: oe,
191
+ code: e[r]
192
+ })),
193
+ children: e.map((e) => y(w, {
194
+ disabled: j,
195
+ selected: d === e,
196
+ onClick: () => X({
197
+ category: oe,
198
+ code: e
199
+ }),
200
+ sx: H,
201
+ children: y(P, {
202
+ primary: r?.[e] ?? O(e, ie, J) ?? e,
203
+ secondary: r ? e : void 0,
204
+ slotProps: {
205
+ primary: { noWrap: !0 },
206
+ secondary: { noWrap: !0 }
207
+ }
208
+ })
209
+ }, e))
210
+ }), be = y(I, {
211
+ label: Q("numberFormat.typeCode"),
212
+ size: "small",
213
+ fullWidth: !0,
214
+ disabled: j,
215
+ value: d,
216
+ error: !!d && !i.Parser.isValidFormat(d),
217
+ helperText: d && !i.Parser.isValidFormat(d) ? Q("numberFormat.invalidCode") : " ",
218
+ onChange: (e) => X({
219
+ category: "Custom",
220
+ code: e.target.value
221
+ }),
222
+ slotProps: {
223
+ inputLabel: { shrink: !0 },
224
+ htmlInput: {
225
+ spellCheck: !1,
226
+ autoComplete: "off"
227
+ }
228
+ }
229
+ }), he = (e) => y(S, {
230
+ sx: {
231
+ display: "flex",
232
+ flexWrap: "wrap",
233
+ gap: 1.5,
234
+ alignItems: "flex-start"
235
+ },
236
+ children: e
237
+ });
238
+ let fe;
239
+ switch (oe) {
240
+ case "General":
241
+ fe = y(M, {
242
+ variant: "body2",
243
+ children: Q("numberFormat.generalInfo")
244
+ });
245
+ break;
246
+ case "Number":
247
+ fe = F(g, { children: [he(F(g, { children: [se, de] })), ue] });
248
+ break;
249
+ case "Currency":
250
+ fe = F(g, { children: [he(F(g, { children: [se, ce] })), ue] });
251
+ break;
252
+ case "Accounting":
253
+ fe = F(g, { children: [he(F(g, { children: [se, ce] })), y(M, {
254
+ variant: "caption",
255
+ color: "text.secondary",
256
+ children: Q("numberFormat.accountingInfo")
257
+ })] });
258
+ break;
259
+ case "Percentage":
260
+ case "Scientific":
261
+ fe = se;
262
+ break;
263
+ case "Date":
264
+ fe = pe(A.DATE_PRESETS);
265
+ break;
266
+ case "Time":
267
+ fe = pe(A.TIME_PRESETS);
268
+ break;
269
+ case "Fraction":
270
+ fe = pe(A.FRACTION_PRESETS, ((e) => ({
271
+ "# ?/?": e("numberFormat.fractionOneDigit"),
272
+ "# ??/??": e("numberFormat.fractionTwoDigits"),
273
+ "# ???/???": e("numberFormat.fractionThreeDigits"),
274
+ "# ?/2": e("numberFormat.fractionHalves"),
275
+ "# ?/4": e("numberFormat.fractionQuarters"),
276
+ "# ?/8": e("numberFormat.fractionEighths"),
277
+ "# ??/16": e("numberFormat.fractionSixteenths"),
278
+ "# ?/10": e("numberFormat.fractionTenths"),
279
+ "# ??/100": e("numberFormat.fractionHundredths")
280
+ }))(Q));
281
+ break;
282
+ case "Special":
283
+ fe = pe(A.SPECIAL_PRESETS, ((e) => ({
284
+ "00000": e("numberFormat.specialZip"),
285
+ "00000-0000": e("numberFormat.specialZip4"),
286
+ "[<=9999999]###-####;(###) ###-####": e("numberFormat.specialPhone"),
287
+ "000-00-0000": e("numberFormat.specialSsn")
288
+ }))(Q));
289
+ break;
290
+ case "Text":
291
+ fe = y(M, {
292
+ variant: "body2",
293
+ children: Q("numberFormat.textInfo")
294
+ });
295
+ break;
296
+ case "Custom":
297
+ fe = F(g, { children: [be, pe(A.DATE_PRESETS.concat(A.TIME_PRESETS))] });
298
+ break;
299
+ default: fe = null;
300
+ }
301
+ return F(S, {
302
+ ref: c,
303
+ className: N("sxl-number-format-panel", G),
304
+ onKeyDown: ae,
305
+ sx: {
306
+ display: "flex",
307
+ flexDirection: "column",
308
+ gap: 1.25
309
+ },
310
+ ...U,
311
+ children: [
312
+ B ? null : F(S, { children: [y(M, {
313
+ variant: "caption",
314
+ component: "div",
315
+ sx: { pl: .5 },
316
+ children: Q("numberFormat.sample")
317
+ }), y(M, {
318
+ variant: "body1",
319
+ component: "div",
320
+ sx: {
321
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
322
+ padding: (e) => e.spacing(1),
323
+ border: (e) => `1px solid ${e.palette.divider}`,
324
+ minHeight: "1.6em",
325
+ fontVariantNumeric: "tabular-nums",
326
+ overflow: "hidden",
327
+ textOverflow: "ellipsis",
328
+ whiteSpace: "nowrap"
329
+ },
330
+ children: le || " "
331
+ })] }),
332
+ K ? y(r, {
333
+ disabled: j,
334
+ sx: {
335
+ justifyContent: "flex-start",
336
+ paddingBottom: 1
337
+ }
338
+ }) : null,
339
+ y(n, {
340
+ label: Q("numberFormat.category"),
341
+ sx: { marginBottom: .5 },
342
+ children: y(h, {
343
+ outlined: !0,
344
+ disabled: j,
345
+ sx: { width: "100%" },
346
+ renderPopupPanel: (r) => {
347
+ const { closeFloatAll: a } = r, n = A.CATEGORIES.map((r) => {
348
+ const n = r === oe, o = () => {
349
+ ((e) => {
350
+ e === oe ? re() : te(e);
351
+ })(r), a?.();
352
+ };
353
+ return y(b, {
354
+ selected: n,
355
+ icon: y(f, {
356
+ selected: n,
357
+ children: n ? void 0 : null
358
+ }),
359
+ sx: { display: "flex" },
360
+ onMouseDown: (e) => {
361
+ 0 === e.button && e.preventDefault();
362
+ },
363
+ onMouseUp: (e) => {
364
+ 0 === e.button && o();
365
+ },
366
+ onKeyDown: (e) => {
367
+ "Enter" !== e.key && " " !== e.key || o();
368
+ },
369
+ children: y(e, {
370
+ label: t(Q, r),
371
+ sample: (i = r, "Custom" === i && i !== oe ? "" : O(i === oe ? d : A.defaultCodeForCategory(i), z(i, J, Q("numberFormat.sampleText")), J))
372
+ })
373
+ }, r);
374
+ var i;
375
+ });
376
+ return x({
377
+ ...r,
378
+ children: y(S, {
379
+ sx: {
380
+ overflow: "auto",
381
+ flex: "1 1 100%"
382
+ },
383
+ children: n
384
+ })
385
+ });
386
+ },
387
+ icon: y(S, {
388
+ sx: {
389
+ display: "flex",
390
+ flex: "1 1 100%",
391
+ minWidth: 0,
392
+ paddingLeft: "4px",
393
+ paddingRight: "4px",
394
+ fontSize: (e) => `${Math.round(e.typography.fontSize)}px`,
395
+ lineHeight: 1.2,
396
+ fontFamily: (e) => e.typography.fontFamily,
397
+ color: (e) => e.palette.text.secondary
398
+ },
399
+ children: y(S, {
400
+ sx: {
401
+ overflow: "hidden",
402
+ textOverflow: "ellipsis",
403
+ whiteSpace: "pre"
404
+ },
405
+ children: t(Q, oe)
406
+ })
407
+ })
408
+ })
409
+ }),
410
+ y(S, {
411
+ sx: {
412
+ display: "flex",
413
+ flexDirection: "column",
414
+ gap: 1.25,
415
+ flex: "1 1 auto",
416
+ minWidth: 0,
417
+ minHeight: 0
418
+ },
419
+ children: fe
420
+ })
421
+ ]
422
+ });
423
+ }));
424
+ V.displayName = "NumberFormatPanel";
425
+ export { V as t };