@sheetxl/studio-mui 0.8.0-beta.15 → 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 (119) hide show
  1. package/LICENSE.md +17 -7
  2. package/browser/esm/{CJWnWqGPw17cp9P3.mjs → 2DGUEeY8au7Hbmze.mjs} +2 -2
  3. package/browser/esm/{OmA1ClZ36ZMFrZe7.mjs → 9V0gwYl3BcajPwBD.mjs} +2 -2
  4. package/browser/esm/B0mscuFChIInl6Mo.mjs +119 -0
  5. package/browser/esm/{EFtp_C3sBnP3Nrns.mjs → BGg5TSbhaUimavRf.mjs} +7 -7
  6. package/browser/esm/BL-h4RElQAdaeHPF.mjs +360 -0
  7. package/browser/esm/{DOWfcHx0MO0J50de.mjs → BSrubs5qLEinR8Ew.mjs} +92 -87
  8. package/browser/esm/BUCQPr09aodgC88P.mjs +225 -0
  9. package/browser/esm/{BvpzsprI7cmVLuQn.mjs → Bg6bcIJsute7rxDL.mjs} +3 -3
  10. package/browser/esm/{CV-q-xCHVuNFhqEF.mjs → BjR7L3X6je3fXyQi.mjs} +2 -2
  11. package/browser/esm/{DMDi2lOps0veJKsM.mjs → Bo_18UwXk7eK6QaM.mjs} +3 -3
  12. package/browser/esm/{BfPTOOKhwUojRTef.mjs → Bp4rtdIKIFzTeJvr.mjs} +13 -9
  13. package/browser/esm/BxneVAXjYuQbCUQo.mjs +424 -0
  14. package/browser/esm/{BojGnpAWoIm5yCd8.mjs → C2V3kv29foh8dScC.mjs} +2 -2
  15. package/browser/esm/{BkxJY_YjMAEvhmuy.mjs → C8M4U_SswTd6auZd.mjs} +4 -4
  16. package/browser/esm/{BR51amBhaaHPBhpd.mjs → C9XRjC0yoGvS9Cm9.mjs} +3 -3
  17. package/browser/esm/{ghfcAaGu2CuZGdhi.mjs → CDgoQhayiKyo-7Br.mjs} +34 -33
  18. package/browser/esm/{Buzx8_zQYPX4DR7v.mjs → CLgar8cakFC22X3w.mjs} +2 -2
  19. package/browser/esm/{6SL2j-85OXrKJNZ5.mjs → CUh56URLD9Vh5Ak9.mjs} +1807 -1200
  20. package/browser/esm/{DLe9DT0DSurLSgiQ.mjs → CXgBRmauwDvHb3fQ.mjs} +2 -2
  21. package/browser/esm/{Bqba-3J9i8HsmusR.mjs → CYOaHHiaC7Ip5VLn.mjs} +2 -2
  22. package/browser/esm/C_qDBCzb8IHBlPhJ.mjs +294 -0
  23. package/browser/esm/{Cbkg5y4fYjLylYHF.mjs → CfsYKmwU44jlvh2Y.mjs} +2 -2
  24. package/browser/esm/Ch1y4AkETfKCYDwf.mjs +106 -0
  25. package/browser/esm/{By1IJOkvZJSlXs5f.mjs → CnId_LC0EekuwaAF.mjs} +3 -3
  26. package/browser/esm/{BsAoK_t2sn8IHtAO.mjs → CtVSJjciTocAi-ph.mjs} +3 -3
  27. package/browser/esm/{C8tci3dfo5lzeoK-.mjs → CuQsEoKZJrSL989Q.mjs} +6 -6
  28. package/browser/esm/{Cl_OUigCV04_zrRy.mjs → Cv99zJfRtzJQmM9a.mjs} +2 -2
  29. package/browser/esm/{BCDAnHFMvOd9XS8K.mjs → Cxk-oWZzE2jq5ul6.mjs} +3 -3
  30. package/browser/esm/{CcJHwg-rLMcCymSD.mjs → D3XdTSymYMag6tor.mjs} +6 -6
  31. package/browser/esm/{BH4eDAxZdwheO7d_.mjs → D4jGaUxHOgVc4qN0.mjs} +3 -3
  32. package/browser/esm/{BvbN9V67wFhTfq1-.mjs → DAdhaGB933dfni3E.mjs} +3 -3
  33. package/browser/esm/{DpAlQza0e5h3GGHC.mjs → DBx1Y3oFzB6gv-LQ.mjs} +3 -3
  34. package/browser/esm/{DJVpra0HoPH-4P7P.mjs → DIAnBUXPTvYAp5fm.mjs} +3 -3
  35. package/browser/esm/{idh3Y0jksygPSI3A.mjs → DIJh9jY37iVFn-tE.mjs} +2 -2
  36. package/browser/esm/{Ci74yk0whfoAP1TL.mjs → DK1K-M9iJV-DK3lK.mjs} +2 -2
  37. package/browser/esm/{BNas8wZuvrN45dRi.mjs → DMhFcJsnKSKTDivl.mjs} +2 -2
  38. package/browser/esm/{BWdpv2xf6GCyd4Te.mjs → DMj9kkIWw9chI5_u.mjs} +5 -5
  39. package/browser/esm/DUpW8HMoEhD3C9l6.mjs +235 -0
  40. package/browser/esm/{DzATG8XMcG6mmYbx.mjs → DVJ5AK0zcqSACGov.mjs} +9 -9
  41. package/browser/esm/{DYDnkmllpYTwfWir.mjs → DVaykBKx4eEsP4MI.mjs} +4 -4
  42. package/browser/esm/{C67SLDHwhVlVIMo0.mjs → Dex65RXS_A5CnMg3.mjs} +3 -3
  43. package/browser/esm/{BYnzaHXySiV-sc6w.mjs → DfYtGsqDIMAG4Sp8.mjs} +2 -2
  44. package/browser/esm/{IlX2PgLxvyTQu4Fh.mjs → Dj0VEFe2ckEWgQjy.mjs} +5 -5
  45. package/browser/esm/{DKkKac2vbeui2lDy.mjs → DjCDJhBfVI9O_Sq1.mjs} +6 -6
  46. package/browser/esm/DjjmLQLxU_U4JB3n.mjs +973 -0
  47. package/browser/esm/{CutWdrVA-c3x8IkL.mjs → DmOrKFaiUUr5hlFl.mjs} +5 -4
  48. package/browser/esm/{Bvq5aZyp5E79JB-s.mjs → DoYSmj1LQHAAqt5b.mjs} +2 -2
  49. package/browser/esm/{Dz20q7S5vmDWlO0p.mjs → KhOxaZS8EeSaYFXZ.mjs} +2 -2
  50. package/browser/esm/{DAYPqhHN3aQ2StjU.mjs → PvNtCGveCLbLAP3e.mjs} +14 -14
  51. package/browser/esm/{DfI4-5XM6AbILSti.mjs → ROOxAZY7YyHDmPcQ.mjs} +4 -4
  52. package/browser/esm/{DFAphWcDUw-gVtAl.mjs → TfUaejwwWzu5qFVE.mjs} +3 -3
  53. package/browser/esm/{DsM-NpB32hloRRR8.mjs → ZhI7zxDSTWb1DfaE.mjs} +3 -3
  54. package/browser/esm/{DY_EGsyx-zNiJS_0.mjs → fqZt7Z0jR4illVKU.mjs} +5 -5
  55. package/browser/esm/index.mjs +278 -277
  56. package/browser/esm/{OHvsc940xI-m_8cc.mjs → r7bLyFzJfaGLKP_7.mjs} +2 -2
  57. package/browser/esm/{DR9y7k4jB7stGPaZ.mjs → tffjGixzP1Ze4DqB.mjs} +3 -3
  58. package/browser/esm/{D90Bb0GPEwqYkf6R.mjs → tiC8hseLz66gO5BS.mjs} +804 -713
  59. package/node/esm/{-Adgw5-ltK-rfp33.mjs → -Il_piuBrbndDROB.mjs} +2 -2
  60. package/node/esm/0cm_0VYweOBWmzi7.mjs +972 -0
  61. package/node/esm/{CexPhV2NPh5ZGHus.mjs → 1gdwmt5CrQy4cGTH.mjs} +2 -2
  62. package/node/esm/{dUUbrmGMCILl8EOr.mjs → 3Geel3fylTwbPuxf.mjs} +2 -2
  63. package/node/esm/{CFi_Yls-gurU_CX3.mjs → 4pRKBhUYhbbE6qVT.mjs} +2 -2
  64. package/node/esm/{jGsHbOHP90nnx_hJ.mjs → 9qIZWfzxSaxNk6Cm.mjs} +16 -15
  65. package/node/esm/B9uLfbf5gMGnoUjH.mjs +224 -0
  66. package/node/esm/{BxIyViNSP0STSrfA.mjs → BFO2WxwRNbu-UmKe.mjs} +3 -3
  67. package/node/esm/{q2Byx8RdDnHk8YyG.mjs → BIJXqUbAalnd-gXD.mjs} +2 -2
  68. package/node/esm/{C4eVfVm_Omyt6NbE.mjs → BIviFvkWx6eP4dMd.mjs} +12 -12
  69. package/node/esm/{Cx4tBEsm3SjAafcw.mjs → BTOCej61y3MazK6r.mjs} +2 -2
  70. package/node/esm/{5etzEfk-28CCELyT.mjs → BV9hUarSGd3mWC8o.mjs} +3 -3
  71. package/node/esm/{DGtbmp72kfRXLtDu.mjs → BX1cTEV3SpcqLcXx.mjs} +81 -80
  72. package/node/esm/{DOuASwH2Lf83hMLe.mjs → BZu-8gEXwIzW_YX9.mjs} +2 -2
  73. package/node/esm/{CX13ASkhdJ0ZSAY4.mjs → B_jOG6MlKoiboP3D.mjs} +3 -3
  74. package/node/esm/{DwA7rfXJgzoNvjax.mjs → BgObBW8ZUr50OufC.mjs} +8 -8
  75. package/node/esm/{BKCNFVrdc_gTnOoS.mjs → BhiuBl2z87xThV1b.mjs} +2 -2
  76. package/node/esm/{B26ot2vO6Hd47uH0.mjs → Bm054Lh36PSa5m1P.mjs} +2 -2
  77. package/node/esm/BtxNP8JWe16vSXAs.mjs +106 -0
  78. package/node/esm/BzT_zks-KORaryRo.mjs +118 -0
  79. package/node/esm/{Bg3Yu66oJr6mNvAR.mjs → C5dRM0ExMHpFgKd0.mjs} +3 -3
  80. package/node/esm/{BZK6UksX7r-GgRms.mjs → CQxu_KONf2yyKKnD.mjs} +2 -2
  81. package/node/esm/{BaFRVcYZjcLoMQtk.mjs → CdoFRzEug2L0LwNb.mjs} +7 -7
  82. package/node/esm/{DybPyX8U-EqXKarV.mjs → Ch7Ebxf0bFrlCJpW.mjs} +2 -2
  83. package/node/esm/{CzKFdVrPSDYOUdWI.mjs → CsQTJ4JQRxLcJDiZ.mjs} +2 -2
  84. package/node/esm/{BFv2GzY6NjmJggAg.mjs → CyKOmz26TaZSFxmi.mjs} +3 -3
  85. package/node/esm/D3TsBlOewIFj-VDW.mjs +294 -0
  86. package/node/esm/{Ca31PUiJBGowHeob.mjs → D4TlOO7hjvqTR2HX.mjs} +3 -3
  87. package/node/esm/{TgwnKYh-WPxEgmyr.mjs → DYNM5HfUK0JbGHsx.mjs} +2 -2
  88. package/node/esm/{B7vbn_dO_cZnGyGM.mjs → DhPNzztIuq9WJwCz.mjs} +3 -3
  89. package/node/esm/{ISBEql8s7AnELTpd.mjs → cl-bDkq8M4STBYJy.mjs} +2 -2
  90. package/node/esm/fazR-cWd-2-W82Nk.mjs +425 -0
  91. package/node/esm/index.mjs +3391 -2778
  92. package/node/esm/{D9Ga7FFJDOO3Dpfu.mjs → iyOc5Rm5x746Qd3R.mjs} +2 -2
  93. package/node/esm/{CORxK68HpwPUYA6O.mjs → klLaIOeBuqaYuz_q.mjs} +2 -2
  94. package/node/esm/{D_JpopAVQopM26cb.mjs → mmzQ-lse6yBavXnw.mjs} +603 -514
  95. package/node/esm/{CkW8xNdW45Xg7jy7.mjs → rpHmm4X81z1orjHr.mjs} +3 -3
  96. package/node/esm/{HlNuwtpYoOARa894.mjs → tRnEFhRlzQPziQif.mjs} +2 -2
  97. package/package.json +10 -10
  98. package/resources/locales/de/groups.cmd.json +3 -0
  99. package/resources/locales/de/ui.msg.json +41 -0
  100. package/resources/locales/en/groups.cmd.json +3 -0
  101. package/resources/locales/en/ui.msg.json +41 -0
  102. package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
  103. package/types/src/command/index.d.ts +1 -0
  104. package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
  105. package/types/src/filter/PivotMenu.d.ts +31 -0
  106. package/types/src/filter/index.d.ts +1 -0
  107. package/types/src/pivot/PivotChipMenu.d.ts +10 -0
  108. package/types/src/pivot/PivotPlugin.d.ts +3 -0
  109. package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
  110. package/types/src/pivot/PivotTableHeader.d.ts +12 -0
  111. package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
  112. package/types/src/pivot/_pivotSource.d.ts +7 -0
  113. package/types/src/table/_drawStyleSwatch.d.ts +25 -0
  114. package/types/src/workbook/DefaultRenderers.d.ts +10 -4
  115. package/browser/esm/C4ir9dn7q0RUoOm_.mjs +0 -319
  116. package/browser/esm/DEUzUShfyJLvgd6_.mjs +0 -1379
  117. package/browser/esm/xe1B8ohea8qfZlFg.mjs +0 -582
  118. package/node/esm/CKtnUYKjsTf7dYKS.mjs +0 -318
  119. package/node/esm/vf5X26EJO7Q1b8Ln.mjs +0 -1379
@@ -0,0 +1,972 @@
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 { BorderStylePopupButton as e, BorderTemplateIcon as t, ColorCommandButton as o, ColorPopupButton as r, FontFamilyCommandButton as n, FontSizeCommandButton as l } from "./index.mjs";
8
+ import { i as a, n as i, o as d, r as s, t as g } from "./BtxNP8JWe16vSXAs.mjs";
9
+ import { t as c } from "./fazR-cWd-2-W82Nk.mjs";
10
+ import { n as m, t as p } from "./B9uLfbf5gMGnoUjH.mjs";
11
+ import { IBorders as u, IRange as h, NumberFormat as f } from "@sheetxl/sdk";
12
+ import { StaticBorderRenderer as b, StaticCellRenderer as y, useGridColorScheme as x, useModelListener as E, useModelSync as K } from "@sheetxl/react";
13
+ import { DynamicIcon as S, useCallbackRef as w, useCommands as v, usePersistentState as T, useTranslator as O } from "@sheetxl/utils-react";
14
+ import { memo as C, useCallback as A, useEffect as k, useMemo as z, useReducer as D, useRef as N, useState as B } from "react";
15
+ import { CommandButton as R, ExhibitIconButton as F, PopupButtonType as I } from "@sheetxl/utils-mui";
16
+ import { jsx as M, jsxs as V } from "react/jsx-runtime";
17
+ import { Box as j, Paper as H, Tab as U, Tabs as L, Typography as P, alpha as $ } from "@mui/material";
18
+ import { messageKey as W } from "@sheetxl/utils";
19
+ import G from "clsx";
20
+ var q = {
21
+ autoFocus: !1,
22
+ scrollIntoView: !1
23
+ }, J = C((e) => {
24
+ const { selection: t, height: o = 46, maxWidth: r = 260, ...n } = e, l = O(), { cell: a, createCell: i, disabled: d } = t, s = z(() => "number" == typeof a.getValue() ? a : i({
25
+ value: 1234.56,
26
+ style: a.getStyle()
27
+ }), [a, i]);
28
+ return V(j, {
29
+ sx: {
30
+ display: "flex",
31
+ flexDirection: "column",
32
+ gap: .5
33
+ },
34
+ ...n,
35
+ children: [M(P, {
36
+ variant: "caption",
37
+ component: "div",
38
+ children: l("format.preview")
39
+ }), M(y, {
40
+ cell: s,
41
+ disabled: d,
42
+ style: {
43
+ width: "100%",
44
+ maxWidth: `${r}px`,
45
+ height: `${o}px`,
46
+ flex: "0 0 auto",
47
+ border: "1px solid var(--sxl-color-base-300, rgb(224, 224, 224))"
48
+ },
49
+ propsBorder: { style: {
50
+ height: "100%",
51
+ width: "100%"
52
+ } }
53
+ })]
54
+ });
55
+ });
56
+ J.displayName = "FormatCellPreview";
57
+ var Y = {
58
+ axes: h.AxisSelection.Column,
59
+ expandOnly: !0,
60
+ skipCustomSize: !0
61
+ }, Q = (e) => e > 180 ? e - 360 : e, X = (e) => {
62
+ const t = Math.max(-90, Math.min(90, Math.round(e)));
63
+ return t < 0 ? t + 360 : t;
64
+ }, _ = C((e) => {
65
+ const { selection: t, disabled: o, className: r, ...n } = e, l = O(), { style: c, applyStyle: m } = t, p = o || t.disabled, u = c.getAlignment(), h = u.getIndent(), f = u.getStacked(), b = f ? 0 : u.getRotation(), y = w((e) => {
66
+ m({ alignment: { indent: e } }, W("op.setAlignment"), Y);
67
+ }, [m]), x = w((e) => {
68
+ m({ alignment: { rotation: X(e) } }, W("op.setAlignment"));
69
+ }, [m]);
70
+ return V(j, {
71
+ className: G("sxl-format-alignment-panel", r),
72
+ sx: d,
73
+ ...n,
74
+ children: [
75
+ M(a, {
76
+ label: l("format.horizontalAlignment"),
77
+ children: M(s, { children: V(g, { children: [
78
+ M(R, {
79
+ commandKey: "formatAlignLeftToggle",
80
+ groupKey: "horizontalAlignOptions",
81
+ disabled: p
82
+ }),
83
+ M(R, {
84
+ commandKey: "formatAlignCenterToggle",
85
+ groupKey: "horizontalAlignOptions",
86
+ disabled: p
87
+ }),
88
+ M(R, {
89
+ commandKey: "formatAlignRightToggle",
90
+ groupKey: "horizontalAlignOptions",
91
+ disabled: p
92
+ }),
93
+ M(R, {
94
+ commandKey: "formatAlignJustifyToggle",
95
+ groupKey: "horizontalAlignOptions",
96
+ disabled: p
97
+ }),
98
+ M(R, {
99
+ commandKey: "formatAlignDistributedHorizontalToggle",
100
+ groupKey: "horizontalAlignOptions",
101
+ disabled: p
102
+ }),
103
+ M(R, {
104
+ commandKey: "formatAlignCenterContinuousToggle",
105
+ groupKey: "horizontalAlignOptions",
106
+ disabled: p
107
+ }),
108
+ M(R, {
109
+ commandKey: "formatAlignFillToggle",
110
+ groupKey: "horizontalAlignOptions",
111
+ disabled: p
112
+ })
113
+ ] }) })
114
+ }),
115
+ M(a, {
116
+ label: l("format.indent"),
117
+ children: V(s, { children: [
118
+ M(R, {
119
+ commandKey: "formatIndentDecrease",
120
+ groupKey: "horizontalAlignOptions",
121
+ disabled: p
122
+ }),
123
+ M(R, {
124
+ commandKey: "formatIndentIncrease",
125
+ groupKey: "horizontalAlignOptions",
126
+ disabled: p
127
+ }),
128
+ M(i, {
129
+ label: l("format.indentUnit"),
130
+ disabled: p,
131
+ value: h,
132
+ min: 0,
133
+ max: 250,
134
+ width: 104,
135
+ onChange: y
136
+ })
137
+ ] })
138
+ }),
139
+ M(a, {
140
+ label: l("format.verticalAlignment"),
141
+ children: V(g, { children: [
142
+ M(R, {
143
+ commandKey: "formatAlignTopToggle",
144
+ groupKey: "verticalAlignOptions",
145
+ disabled: p
146
+ }),
147
+ M(R, {
148
+ commandKey: "formatAlignMiddleToggle",
149
+ groupKey: "verticalAlignOptions",
150
+ disabled: p
151
+ }),
152
+ M(R, {
153
+ commandKey: "formatAlignBottomToggle",
154
+ groupKey: "verticalAlignOptions",
155
+ disabled: p
156
+ }),
157
+ M(R, {
158
+ commandKey: "formatAlignJustifyVerticalToggle",
159
+ groupKey: "verticalAlignOptions",
160
+ disabled: p
161
+ }),
162
+ M(R, {
163
+ commandKey: "formatAlignDistributedVerticalToggle",
164
+ groupKey: "verticalAlignOptions",
165
+ disabled: p
166
+ })
167
+ ] })
168
+ }),
169
+ M(a, {
170
+ label: l("format.overflow"),
171
+ children: V(g, { children: [
172
+ M(R, {
173
+ commandKey: "formatTextOverflowWrapToggle",
174
+ groupKey: "textOverflowOptions",
175
+ disabled: p
176
+ }),
177
+ M(R, {
178
+ commandKey: "formatTextOverflowShrinkToggle",
179
+ groupKey: "textOverflowOptions",
180
+ disabled: p
181
+ }),
182
+ M(R, {
183
+ commandKey: "formatTextOverflowClipToggle",
184
+ groupKey: "textOverflowOptions",
185
+ disabled: p
186
+ }),
187
+ M(R, {
188
+ commandKey: "formatTextOverflowVisibleToggle",
189
+ groupKey: "textOverflowOptions",
190
+ disabled: p
191
+ })
192
+ ] })
193
+ }),
194
+ M(a, {
195
+ label: l("format.merge"),
196
+ children: V(g, { children: [
197
+ M(R, {
198
+ commandKey: "mergeToggle",
199
+ groupKey: "mergeOptions",
200
+ disabled: p
201
+ }),
202
+ M(R, {
203
+ commandKey: "mergeHorizontal",
204
+ groupKey: "mergeOptions",
205
+ disabled: p
206
+ }),
207
+ M(R, {
208
+ commandKey: "mergeVertical",
209
+ groupKey: "mergeOptions",
210
+ disabled: p
211
+ }),
212
+ M(R, {
213
+ commandKey: "unmerge",
214
+ groupKey: "mergeOptions",
215
+ disabled: p
216
+ })
217
+ ] })
218
+ }),
219
+ M(a, {
220
+ label: l("format.orientation"),
221
+ children: V(s, { children: [V(g, { children: [
222
+ M(R, {
223
+ commandKey: "formatTextRotate0",
224
+ groupKey: "textRotateOptions",
225
+ disabled: p
226
+ }),
227
+ M(R, {
228
+ commandKey: "formatTextRotate45",
229
+ groupKey: "textRotateOptions",
230
+ disabled: p
231
+ }),
232
+ M(R, {
233
+ commandKey: "formatTextRotate315",
234
+ groupKey: "textRotateOptions",
235
+ disabled: p
236
+ }),
237
+ M(R, {
238
+ commandKey: "formatTextRotate90",
239
+ groupKey: "textRotateOptions",
240
+ disabled: p
241
+ }),
242
+ M(R, {
243
+ commandKey: "formatTextRotateVertical",
244
+ groupKey: "textRotateOptions",
245
+ disabled: p
246
+ }),
247
+ M(R, {
248
+ commandKey: "formatTextRotate270",
249
+ groupKey: "textRotateOptions",
250
+ disabled: p
251
+ })
252
+ ] }), M(i, {
253
+ label: l("format.degrees"),
254
+ disabled: p || f,
255
+ value: Q(b),
256
+ min: -90,
257
+ max: 90,
258
+ step: 5,
259
+ width: 104,
260
+ onChange: x
261
+ })] })
262
+ })
263
+ ]
264
+ });
265
+ });
266
+ _.displayName = "AlignmentPanel";
267
+ var Z = C((e) => {
268
+ const { selection: t, disabled: r, className: i, ...c } = e, m = O(), p = r || t.disabled;
269
+ return V(j, {
270
+ className: G("sxl-format-font-panel", i),
271
+ sx: d,
272
+ ...c,
273
+ children: [
274
+ M(a, {
275
+ label: m("format.fontFamily"),
276
+ children: M(n, {
277
+ commandKey: "formatFontFamily",
278
+ disabled: p,
279
+ sx: { width: "100%" }
280
+ })
281
+ }),
282
+ M(a, {
283
+ label: m("format.fontSize"),
284
+ children: V(s, { children: [
285
+ M(l, {
286
+ commandKey: "formatFontSize",
287
+ disabled: p,
288
+ sx: { width: 96 }
289
+ }),
290
+ M(R, {
291
+ commandKey: "formatFontSizeIncrease",
292
+ disabled: p
293
+ }),
294
+ M(R, {
295
+ commandKey: "formatFontSizeDecrease",
296
+ disabled: p
297
+ })
298
+ ] })
299
+ }),
300
+ M(a, {
301
+ label: m("format.color"),
302
+ children: M(s, { children: M(o, {
303
+ commandKey: "formatFontColor",
304
+ disabled: p
305
+ }) })
306
+ }),
307
+ M(a, {
308
+ label: m("format.effects"),
309
+ children: V(g, { children: [
310
+ M(R, {
311
+ commandKey: "formatBoldToggle",
312
+ disabled: p
313
+ }),
314
+ M(R, {
315
+ commandKey: "formatItalicToggle",
316
+ disabled: p
317
+ }),
318
+ M(R, {
319
+ commandKey: "formatUnderlinedToggle",
320
+ groupKey: "underlineOptions",
321
+ disabled: p
322
+ }),
323
+ M(R, {
324
+ commandKey: "formatUnderlinedDoubleToggle",
325
+ groupKey: "underlineOptions",
326
+ disabled: p
327
+ }),
328
+ M(j, { sx: { width: "8px" } }),
329
+ M(R, {
330
+ commandKey: "formatStrikeThroughToggle",
331
+ disabled: p
332
+ }),
333
+ M(R, {
334
+ commandKey: "formatSuperscriptToggle",
335
+ disabled: p
336
+ }),
337
+ M(R, {
338
+ commandKey: "formatSubscriptToggle",
339
+ disabled: p
340
+ })
341
+ ] })
342
+ }),
343
+ M(a, {
344
+ label: m("format.accountingUnderline"),
345
+ children: V(g, { children: [M(R, {
346
+ commandKey: "formatUnderlinedAccountingToggle",
347
+ groupKey: "underlineOptions",
348
+ disabled: p
349
+ }), M(R, {
350
+ commandKey: "formatUnderlinedAccountingDoubleToggle",
351
+ groupKey: "underlineOptions",
352
+ disabled: p
353
+ })] })
354
+ })
355
+ ]
356
+ });
357
+ });
358
+ Z.displayName = "FontPanel";
359
+ var ee = Object.freeze([
360
+ u.Edge.Top,
361
+ u.Edge.Bottom,
362
+ u.Edge.Left,
363
+ u.Edge.Right,
364
+ u.Edge.Horizontal,
365
+ u.Edge.Vertical
366
+ ]), te = Object.freeze([]), oe = Object.freeze([u.Edge.Horizontal, u.Edge.Vertical]), re = new Map([
367
+ ...ee,
368
+ u.Edge.DiagonalUp,
369
+ u.Edge.DiagonalDown
370
+ ].map((e) => [e, Object.freeze([e])])), ne = (e) => e === u.Edge.DiagonalUp || e === u.Edge.DiagonalDown;
371
+ function le(e, t) {
372
+ switch (t) {
373
+ case u.Edge.Top: return e("border.top");
374
+ case u.Edge.Left: return e("border.left");
375
+ case u.Edge.Right: return e("border.right");
376
+ case u.Edge.Bottom: return e("border.bottom");
377
+ case u.Edge.Horizontal: return e("border.insideHorizontal");
378
+ case u.Edge.Vertical: return e("border.insideVertical");
379
+ case u.Edge.DiagonalUp: return e("border.diagonalUp");
380
+ case u.Edge.DiagonalDown: return e("border.diagonalDown");
381
+ default: return t;
382
+ }
383
+ }
384
+ var ae = (e) => 0 === e ? "0px" : 1 === e ? "calc(100% - 1px)" : `calc(${100 * e}% - 0.5px)`, ie = (e, t) => {
385
+ const o = "-7px", r = [];
386
+ for (let e = 0; e <= t; e++) {
387
+ const n = ae(e / t);
388
+ r.push({
389
+ left: n,
390
+ top: o,
391
+ width: "1px",
392
+ height: "5px"
393
+ }), r.push({
394
+ left: n,
395
+ bottom: o,
396
+ width: "1px",
397
+ height: "5px"
398
+ });
399
+ }
400
+ for (let t = 0; t <= e; t++) {
401
+ const n = ae(t / e);
402
+ r.push({
403
+ top: n,
404
+ left: o,
405
+ height: "1px",
406
+ width: "5px"
407
+ }), r.push({
408
+ top: n,
409
+ right: o,
410
+ height: "1px",
411
+ width: "5px"
412
+ });
413
+ }
414
+ return r;
415
+ }, de = (e) => e === u.Edge.Left || e === u.Edge.Vertical || e === u.Edge.Right, se = (e) => {
416
+ switch (e) {
417
+ case u.Edge.Top:
418
+ case u.Edge.Left: return 0;
419
+ case u.Edge.Horizontal:
420
+ case u.Edge.Vertical: return .5;
421
+ default: return 1;
422
+ }
423
+ };
424
+ var ge = (e) => {
425
+ const { edges: t, createBorder: o, onToggleEdges: r, omittedEdges: n, disabled: l = !1, height: a = 104, className: i, ...d } = e, s = O(), g = N(null), [c, m] = B(te), p = A((e) => !n?.includes(e), [n]), h = A((e) => !l && p(e), [l, p]), f = p(u.Edge.Horizontal) ? 2 : 1, y = p(u.Edge.Vertical) ? 2 : 1, x = A((e) => o({
426
+ top: 0 === e.rowIndex ? t.top : t.horizontal,
427
+ bottom: e.rowIndex === f - 1 ? t.bottom : t.horizontal,
428
+ left: 0 === e.colIndex ? t.left : t.vertical,
429
+ right: e.colIndex === y - 1 ? t.right : t.vertical,
430
+ diagonalUp: t.diagonalUp,
431
+ diagonalDown: t.diagonalDown
432
+ }), [
433
+ t,
434
+ o,
435
+ f,
436
+ y
437
+ ]), E = A((e) => {
438
+ const t = g.current;
439
+ if (!t) return te;
440
+ const o = t.getBoundingClientRect();
441
+ return function(e, t, o, r, n) {
442
+ if (o <= 0 || r <= 0) return te;
443
+ const l = Math.min(10, o / 5, r / 5);
444
+ if (oe.every(n) && Math.abs(e - o / 2) <= l && Math.abs(t - r / 2) <= l) return oe;
445
+ const a = Math.abs(e) <= l, i = Math.abs(e - o) <= l, d = Math.abs(t) <= l, s = Math.abs(t - r) <= l;
446
+ if ((a || i) && (d || s)) {
447
+ const e = a === d ? u.Edge.DiagonalDown : u.Edge.DiagonalUp;
448
+ if (n(e)) return re.get(e);
449
+ }
450
+ let g = null, c = Number.POSITIVE_INFINITY;
451
+ for (const l of ee) {
452
+ if (!n(l)) continue;
453
+ const a = de(l), i = a ? r : o, d = a ? t : e, s = Math.max(0, -d, d - i), m = (a ? e : t) - se(l) * (a ? o : r), p = Math.hypot(s, m);
454
+ p < c && (c = p, g = l);
455
+ }
456
+ return g && c <= l ? re.get(g) : te;
457
+ }(e.clientX - o.left, e.clientY - o.top, o.width, o.height, h);
458
+ }, [h]);
459
+ return M(j, {
460
+ className: G("sxl-border-preview", i),
461
+ ...d,
462
+ onPointerMove: (e) => m(E(e)),
463
+ onPointerLeave: () => m(te),
464
+ onClick: (e) => {
465
+ const t = E(e);
466
+ t.length > 0 && r(t);
467
+ },
468
+ sx: {
469
+ position: "relative",
470
+ boxSizing: "border-box",
471
+ height: `${a}px`,
472
+ width: "100%",
473
+ padding: "10px",
474
+ cursor: c.length > 0 ? "pointer" : "default",
475
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
476
+ border: (e) => `1px solid ${e.palette.divider}`,
477
+ opacity: l ? .6 : 1
478
+ },
479
+ children: V(j, {
480
+ ref: g,
481
+ sx: {
482
+ position: "relative",
483
+ width: "100%",
484
+ height: "100%"
485
+ },
486
+ children: [
487
+ M(j, {
488
+ "aria-hidden": "true",
489
+ sx: {
490
+ position: "absolute",
491
+ inset: 0,
492
+ display: "grid",
493
+ gridTemplateColumns: `repeat(${y}, 1fr)`,
494
+ gridTemplateRows: `repeat(${f}, 1fr)`,
495
+ gap: "2px",
496
+ pointerEvents: "none",
497
+ "& > div": { backgroundColor: (e) => $(e.palette.text.primary, .05) }
498
+ },
499
+ children: Array.from({ length: f * y }, (e, t) => M("div", {}, t))
500
+ }),
501
+ M(j, {
502
+ "aria-hidden": "true",
503
+ sx: {
504
+ position: "absolute",
505
+ inset: 0,
506
+ pointerEvents: "none",
507
+ "& > div": {
508
+ position: "absolute",
509
+ backgroundColor: (e) => e.palette.text.secondary
510
+ }
511
+ },
512
+ children: ie(f, y).map((e, t) => M("div", { style: e }, t))
513
+ }),
514
+ c.length > 0 ? V(j, {
515
+ "aria-hidden": "true",
516
+ sx: {
517
+ position: "absolute",
518
+ inset: 0,
519
+ pointerEvents: "none",
520
+ opacity: .22,
521
+ "& > div": {
522
+ position: "absolute",
523
+ borderRadius: "3px",
524
+ backgroundColor: (e) => e.palette.text.primary
525
+ },
526
+ "& line": { stroke: (e) => e.palette.text.primary }
527
+ },
528
+ children: [c.filter((e) => !ne(e)).map((e) => M("div", { style: ce(e) }, e)), c.some(ne) ? M("svg", {
529
+ viewBox: "0 0 100 100",
530
+ preserveAspectRatio: "none",
531
+ style: {
532
+ position: "absolute",
533
+ inset: 0,
534
+ width: "100%",
535
+ height: "100%",
536
+ overflow: "visible"
537
+ },
538
+ children: c.filter(ne).flatMap((e) => function(e, t, o) {
539
+ const r = [];
540
+ for (let n = 0; n < t; n++) for (let l = 0; l < o; l++) {
541
+ const a = l / o * 100, i = (l + 1) / o * 100, d = n / t * 100, s = (n + 1) / t * 100, g = e === u.Edge.DiagonalDown;
542
+ r.push(M("line", {
543
+ x1: a,
544
+ y1: g ? d : s,
545
+ x2: i,
546
+ y2: g ? s : d,
547
+ strokeWidth: 6,
548
+ strokeLinecap: "round",
549
+ vectorEffect: "non-scaling-stroke"
550
+ }, `${e}:${n}:${l}`));
551
+ }
552
+ return r;
553
+ }(e, f, y))
554
+ }) : null]
555
+ }) : null,
556
+ M(b, {
557
+ getBorderAt: x,
558
+ rowCount: f,
559
+ columnCount: y,
560
+ style: {
561
+ position: "absolute",
562
+ inset: 0,
563
+ height: "100%",
564
+ width: "100%"
565
+ }
566
+ }),
567
+ ee.filter(p).map((e) => M(j, {
568
+ component: "button",
569
+ type: "button",
570
+ "aria-label": le(s, e),
571
+ "aria-pressed": !!t[e],
572
+ title: le(s, e),
573
+ disabled: !h(e),
574
+ onClick: (t) => {
575
+ t.stopPropagation(), r(re.get(e));
576
+ },
577
+ sx: {
578
+ position: "absolute",
579
+ appearance: "none",
580
+ background: "transparent",
581
+ border: "none",
582
+ padding: 0,
583
+ pointerEvents: "none",
584
+ borderRadius: "3px",
585
+ "&:focus-visible": { outline: (e) => `2px solid ${e.palette.primary.main}` },
586
+ ...ce(e)
587
+ }
588
+ }, e))
589
+ ]
590
+ })
591
+ });
592
+ };
593
+ function ce(e) {
594
+ const t = `calc(${100 * se(e)}% - 3px)`;
595
+ return de(e) ? {
596
+ top: 0,
597
+ bottom: 0,
598
+ left: t,
599
+ width: "6px"
600
+ } : {
601
+ left: 0,
602
+ right: 0,
603
+ top: t,
604
+ height: "6px"
605
+ };
606
+ }
607
+ ge.displayName = "BorderPreview";
608
+ var me = u.StrokeStyle.Thin, pe = Object.freeze([
609
+ u.Edge.Left,
610
+ u.Edge.Top,
611
+ u.Edge.Right,
612
+ u.Edge.Bottom
613
+ ]), ue = Object.freeze([u.Edge.Horizontal, u.Edge.Vertical]), he = Object.freeze([...pe, ...ue]), fe = Object.freeze([u.Edge.DiagonalUp, u.Edge.DiagonalDown]), be = Object.freeze([...he, ...fe]), ye = (e, t, o) => {
614
+ const r = {
615
+ style: t,
616
+ color: o?.toString()
617
+ }, n = {};
618
+ for (const t of e) n[t] = r;
619
+ return n;
620
+ }, xe = (e) => {
621
+ const t = {};
622
+ for (const o of e) t[o] = null;
623
+ return t;
624
+ }, Ee = (e) => e ? e.toString() : null, Ke = C((o) => {
625
+ const { selection: n, disabled: l, className: i, ...c } = o, m = O(), { getEdgeStroke: p, createBorder: h, applyStyle: f, styles: b, schemeLookup: y, autoColor: x, darkMode: E, hasInnerHorizontal: K, hasInnerVertical: v } = n, T = l || n.disabled, C = w((e) => e === u.Edge.Horizontal ? !K : e === u.Edge.Vertical && !v, [K, v]), [A, k] = B(() => {
626
+ const e = p(u.Edge.Bottom)?.getStyle();
627
+ return e && e !== u.StrokeStyle.None ? e : me;
628
+ }), [z, D] = B(() => {
629
+ const e = p(u.Edge.Bottom);
630
+ return !e || e.isNone() ? null : e.getProperties().color ? e.getColor() : null;
631
+ }), N = w(() => b.recentColors(), [b]), R = w((e) => {
632
+ f({ borders: e }, W("op.setBorders"));
633
+ }, [f]), H = w((e) => {
634
+ 0 !== e.length && f([{ borders: xe(e) }, { borders: ye(e, A, z) }], W("op.setBorders"));
635
+ }, [
636
+ f,
637
+ A,
638
+ z
639
+ ]), U = w((e) => {
640
+ 0 !== e.length && R(ye(e, u.StrokeStyle.None, null));
641
+ }, [R]), L = w((e) => {
642
+ H(e.filter((e) => !C(e)));
643
+ }, [H, C]), $ = {};
644
+ for (const e of be) {
645
+ const t = p(e);
646
+ t && !t.isNone() && ($[e] = t.getProperties());
647
+ }
648
+ const q = w((e) => {
649
+ const t = $[e];
650
+ return (t?.style ?? u.StrokeStyle.None) === A && Ee(t?.color) === Ee(z);
651
+ }, [
652
+ $,
653
+ A,
654
+ z
655
+ ]), J = (e) => {
656
+ const t = e.filter((e) => !C(e));
657
+ return t.length > 0 && t.every(q);
658
+ }, Y = w((e) => {
659
+ const t = e.filter((e) => !C(e));
660
+ A === u.StrokeStyle.None || t.every(q) ? U(t) : H(t);
661
+ }, [
662
+ U,
663
+ H,
664
+ q,
665
+ C,
666
+ A
667
+ ]), Q = (e) => ye(e, A, z), X = (e, o, r) => M(F, {
668
+ disabled: T,
669
+ icon: M(t, {
670
+ border: e.length > 0 ? Q(e) : null,
671
+ createBorder: h
672
+ }),
673
+ propsTooltip: {
674
+ label: o,
675
+ simple: !0
676
+ },
677
+ onClick: r
678
+ }), _ = (e, o) => {
679
+ const r = T || e.every(C);
680
+ return M(F, {
681
+ disabled: r,
682
+ selected: !r && A !== u.StrokeStyle.None && J(e),
683
+ icon: M(t, {
684
+ border: Q(e),
685
+ createBorder: h
686
+ }),
687
+ propsTooltip: {
688
+ label: o,
689
+ simple: !0
690
+ },
691
+ onClick: () => Y(e)
692
+ });
693
+ }, Z = (e) => _([e], le(m, e));
694
+ return V(j, {
695
+ className: G("sxl-format-border-panel", i),
696
+ sx: d,
697
+ ...c,
698
+ children: [
699
+ V(s, { children: [M(r, {
700
+ disabled: T || A === u.StrokeStyle.None,
701
+ darkMode: E,
702
+ icon: M(S, { iconKey: "stroke.colored" }),
703
+ tooltip: m("border.colorTooltip"),
704
+ selectedColor: z,
705
+ onSelectColor: (e) => D(e),
706
+ propsPanel: {
707
+ disableAlpha: !0,
708
+ schemeLookup: y,
709
+ recentColors: N,
710
+ autoColor: x
711
+ }
712
+ }), M(e, {
713
+ disabled: T,
714
+ darkMode: E,
715
+ selectedStyle: A,
716
+ styleColor: z,
717
+ variant: I.Toolbar,
718
+ onSelectStyle: (e) => k(e ?? u.StrokeStyle.None)
719
+ })] }),
720
+ V(g, {
721
+ sx: { justifyContent: "center" },
722
+ children: [
723
+ X(he, m("border.all"), () => L(he)),
724
+ X(pe, m("border.outside"), () => L(pe)),
725
+ X([], m("border.none"), () => R(null))
726
+ ]
727
+ }),
728
+ V(a, {
729
+ sx: { px: 1.5 },
730
+ children: [V(j, {
731
+ sx: {
732
+ display: "grid",
733
+ gridTemplateColumns: "auto minmax(0, 156px) auto",
734
+ justifyContent: "center",
735
+ columnGap: .5,
736
+ rowGap: .25,
737
+ minWidth: 0
738
+ },
739
+ children: [
740
+ V(j, {
741
+ sx: {
742
+ display: "flex",
743
+ flexDirection: "column",
744
+ justifyContent: "space-between",
745
+ height: "104px"
746
+ },
747
+ children: [
748
+ Z(u.Edge.Top),
749
+ Z(u.Edge.Horizontal),
750
+ Z(u.Edge.Bottom)
751
+ ]
752
+ }),
753
+ M(ge, {
754
+ edges: $,
755
+ createBorder: h,
756
+ disabled: T,
757
+ height: 104,
758
+ omittedEdges: he.filter(C),
759
+ onToggleEdges: Y
760
+ }),
761
+ M(j, {
762
+ sx: {
763
+ display: "flex",
764
+ alignItems: "center"
765
+ },
766
+ children: _(ue, m("border.inner"))
767
+ }),
768
+ Z(u.Edge.DiagonalUp),
769
+ V(j, {
770
+ sx: {
771
+ display: "flex",
772
+ justifyContent: "space-between",
773
+ minWidth: 0
774
+ },
775
+ children: [
776
+ Z(u.Edge.Left),
777
+ Z(u.Edge.Vertical),
778
+ Z(u.Edge.Right)
779
+ ]
780
+ }),
781
+ Z(u.Edge.DiagonalDown)
782
+ ]
783
+ }), M(P, {
784
+ variant: "caption",
785
+ component: "div",
786
+ sx: {
787
+ color: "text.secondary",
788
+ lineHeight: 1.4,
789
+ textAlign: "center"
790
+ },
791
+ children: m("format.borderDiagram")
792
+ })]
793
+ })
794
+ ]
795
+ });
796
+ });
797
+ Ke.displayName = "BorderPanel";
798
+ var Se = {
799
+ Number: "number",
800
+ Alignment: "alignment",
801
+ Font: "font",
802
+ Border: "border",
803
+ Fill: "fill"
804
+ }, we = "format.tab", ve = Object.freeze([
805
+ Se.Number,
806
+ Se.Alignment,
807
+ Se.Font,
808
+ Se.Border,
809
+ Se.Fill
810
+ ]), Te = C((e) => {
811
+ const t = e.model, o = O();
812
+ K(t, "onSelectedSheetChange");
813
+ const r = t.getSelectedWorksheet();
814
+ if (!r) {
815
+ const { model: t, args: r, entryKey: n, frame: l, ref: a, ...i } = e;
816
+ return M(H, {
817
+ square: !0,
818
+ ref: a,
819
+ sx: {
820
+ display: "flex",
821
+ flex: "1 1 auto",
822
+ padding: (e) => e.spacing(2, 2)
823
+ },
824
+ ...i,
825
+ children: o("format.noWorksheet")
826
+ });
827
+ }
828
+ return M(Oe, {
829
+ ...e,
830
+ sheet: r
831
+ });
832
+ });
833
+ Te.displayName = "FormatTaskPane";
834
+ var Oe = C((e) => {
835
+ const { model: t, sheet: o, args: r, entryKey: n, frame: l, ref: a, ...i } = e, d = O(), s = ((e) => {
836
+ const [, t] = D((e) => e + 1, 0);
837
+ E(e, {
838
+ onSelectionChange: () => t(),
839
+ onStyleChange: () => t()
840
+ });
841
+ const [o] = v(["formatBoldToggle"]), r = x(), n = e.getSelectedCell(), l = e.getStyles(), a = e.getSelectedRanges(), i = w((t, o, r) => {
842
+ const n = Array.isArray(t) ? t : [t];
843
+ e.doBatch(() => {
844
+ for (const t of n) e.getSelectedRanges().getStyle().update(t, {
845
+ autoSelect: q,
846
+ autoFit: r ?? !0
847
+ });
848
+ }, { description: o ?? W("op.updateStyle") });
849
+ }, [e]), d = w((t) => e.createCell(t), [e]), s = w((e) => l.getNormal().createStyle({ borders: e }).getBorders(), [l]), g = a.getCoords()[0], c = w((t) => {
850
+ if (!g) return null;
851
+ const o = (t, o) => e.getCell({
852
+ rowIndex: t,
853
+ colIndex: o
854
+ }).getStyle(!0).getBorders();
855
+ switch (t) {
856
+ case u.Edge.Top: return o(g.rowStart, g.colStart).getTop();
857
+ case u.Edge.Left: return o(g.rowStart, g.colStart).getLeft();
858
+ case u.Edge.Bottom: return o(g.rowEnd, g.colEnd).getBottom();
859
+ case u.Edge.Right: return o(g.rowEnd, g.colEnd).getRight();
860
+ case u.Edge.Horizontal: return g.rowEnd <= g.rowStart ? null : o(g.rowStart + 1, g.colStart).getTop();
861
+ case u.Edge.Vertical: return g.colEnd <= g.colStart ? null : o(g.rowStart, g.colStart + 1).getLeft();
862
+ case u.Edge.DiagonalUp: return o(g.rowStart, g.colStart).getDiagonalUp();
863
+ case u.Edge.DiagonalDown: return o(g.rowStart, g.colStart).getDiagonalDown();
864
+ default: return null;
865
+ }
866
+ }, [e, g]);
867
+ return {
868
+ sheet: e,
869
+ cell: n,
870
+ style: n.getStyle(),
871
+ styles: l,
872
+ schemeLookup: l.schemeLookup(),
873
+ autoColor: l.getNormal().getFont().getColor(),
874
+ darkMode: "dark" === r,
875
+ disabled: o?.disabled() ?? !1,
876
+ applyStyle: i,
877
+ createCell: d,
878
+ createBorder: s,
879
+ getEdgeStroke: c,
880
+ hasInnerHorizontal: a.getRowCount() > 1,
881
+ hasInnerVertical: a.getColumnCount() > 1
882
+ };
883
+ })(o), [g, h] = T(we, Se.Number), b = ve.includes(g) ? g : Se.Number;
884
+ k(() => {
885
+ const e = r?.tab;
886
+ e && h(e);
887
+ }, [r]);
888
+ const y = s.style.getNumberFormat(), K = "number" == typeof y ? f.resolve(y) : y ?? "General";
889
+ return V(H, {
890
+ square: !0,
891
+ ref: a,
892
+ sx: {
893
+ display: "flex",
894
+ flexDirection: "column",
895
+ flex: "1 1 auto",
896
+ width: "100%",
897
+ height: "100%",
898
+ minHeight: 0,
899
+ overflow: "hidden"
900
+ },
901
+ ...i,
902
+ children: [
903
+ M(j, {
904
+ sx: {
905
+ flexShrink: 0,
906
+ padding: (e) => e.spacing(1.5, 2)
907
+ },
908
+ children: M(J, { selection: s })
909
+ }),
910
+ M(L, {
911
+ value: b,
912
+ onChange: (e, t) => h(t),
913
+ variant: "scrollable",
914
+ scrollButtons: "auto",
915
+ allowScrollButtonsMobile: !0,
916
+ sx: {
917
+ minHeight: 0,
918
+ flexShrink: 0,
919
+ borderBottom: (e) => `1px solid ${e.palette.divider}`,
920
+ "& .MuiTab-root": {
921
+ textTransform: "none",
922
+ whiteSpace: "nowrap",
923
+ minHeight: 0,
924
+ minWidth: 0,
925
+ flex: "1 0 auto",
926
+ padding: "8px 4px"
927
+ }
928
+ },
929
+ children: ve.map((e) => M(U, {
930
+ value: e,
931
+ label: Ce(d, e)
932
+ }, e))
933
+ }),
934
+ V(j, {
935
+ sx: {
936
+ flex: "1 1 auto",
937
+ minHeight: 0,
938
+ overflow: "auto",
939
+ padding: (e) => e.spacing(2.5, 2)
940
+ },
941
+ children: [
942
+ b === Se.Number ? M(c, {
943
+ hideSample: !0,
944
+ showQuickFormats: !0,
945
+ value: K,
946
+ disabled: s.disabled,
947
+ context: () => s.cell,
948
+ onChange: (e) => {
949
+ s.applyStyle({ numberFormat: e }, W("op.setNumberFormat"));
950
+ }
951
+ }) : null,
952
+ b === Se.Alignment ? M(_, { selection: s }) : null,
953
+ b === Se.Font ? M(Z, { selection: s }) : null,
954
+ b === Se.Fill ? M(p, { selection: m(s) }) : null,
955
+ b === Se.Border ? M(Ke, { selection: s }) : null
956
+ ]
957
+ })
958
+ ]
959
+ });
960
+ });
961
+ function Ce(e, t) {
962
+ switch (t) {
963
+ case Se.Number: return e("format.tabNumber");
964
+ case Se.Alignment: return e("format.tabAlignment");
965
+ case Se.Font: return e("format.tabFont");
966
+ case Se.Fill: return e("format.tabFill");
967
+ case Se.Border: return e("format.tabBorder");
968
+ default: return t;
969
+ }
970
+ }
971
+ Oe.displayName = "FormatTaskPaneBody";
972
+ export { we as FORMAT_TAB_KEY, Se as FormatTab, Te as FormatTaskPane, Te as default };