@sheetxl/studio-mui 1.0.4 → 1.0.6
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.
- package/browser/esm/{N5L4wQxRGEOH_wbp.mjs → 6wAcMpoIZS1ffzqR.mjs} +3 -3
- package/browser/esm/{DHmh3sMFGq4sRPhh.mjs → AVMBYVWPe170RO8d.mjs} +20 -20
- package/browser/esm/{D_r8MdiauI15ds00.mjs → B2k09pbNHOie-ZPU.mjs} +5 -5
- package/browser/esm/B5hj7BR72rs3Xx2-.mjs +40 -0
- package/browser/esm/{jDqohhLNEI6wqjo7.mjs → BK0H9A2QjD4YqPxq.mjs} +2 -2
- package/browser/esm/{CHfzSl32Bs6LVY3G.mjs → BMtR4PaoNnEhVh2U.mjs} +243 -245
- package/browser/esm/{DZngQvRDu3Qh7_uy.mjs → BVQX7HEZNPIvf0Bg.mjs} +1 -1
- package/browser/esm/BZWyHJnsP5yHfByl.mjs +461 -0
- package/browser/esm/{n1z1c9np4M3gMGCX.mjs → BaYDGaXi_5fNEPo1.mjs} +1 -1
- package/browser/esm/{B4vVBfkY4Oq6M196.mjs → BgOevzKxdIm3FqSz.mjs} +4 -4
- package/browser/esm/{BH1Qj4pv8pPWZVhO.mjs → BgvcXlX-fe99mlfa.mjs} +1 -1
- package/browser/esm/{BDSYU5nx_6eGxAa4.mjs → BmJRmCarQ2Y_DhcS.mjs} +6 -6
- package/browser/esm/{Cf6bsmEPyPpiNtxU.mjs → BnIfAdE8Qnu8RF3t.mjs} +1 -1
- package/browser/esm/{B130jd-PqNgY2pV8.mjs → Bu4IunF89gqzLc6A.mjs} +2 -2
- package/browser/esm/{B4EWee1CcAHS5vAA.mjs → BvvD5BVF5uSL-2Ow.mjs} +2 -2
- package/browser/esm/{CzWXYarhfF4mF8fj.mjs → Bzr0CzpORAOD9X-l.mjs} +1 -1
- package/browser/esm/{CEvJVwoVP9nscIcl.mjs → C-lKdgOAbn4Ycu7e.mjs} +2 -2
- package/browser/esm/{CFiyY-_XmW7G0_9y.mjs → C211u9yUXa4149g9.mjs} +1 -1
- package/browser/esm/{DoJ8N6FhUY0kYz9u.mjs → C7RPgX_8hKN1Umxm.mjs} +2 -2
- package/browser/esm/{DqP1sKmMsG0tKwmV.mjs → C9cBnewCaYFf2JV6.mjs} +21 -22
- package/browser/esm/{Cx1r__xbzz-5zZgw.mjs → CA42_0vpQwF292tA.mjs} +1 -1
- package/browser/esm/{D1WSqegx9Zbjc-cL.mjs → CAbY1N8X3Iryy2XC.mjs} +4 -4
- package/browser/esm/{k0bdGBFIHCTGANHW.mjs → CD6iCHysAki3ui3u.mjs} +4 -4
- package/browser/esm/{DVQZtsBbf_Fsh-B6.mjs → CFUur1yDoVOJMuo5.mjs} +1 -1
- package/browser/esm/{npsX_Rztx4_7rCGP.mjs → CHb2gapathcPfhdM.mjs} +5 -5
- package/browser/esm/{94_olh2OyEbGAcNw.mjs → CIZh3NmE8QG5ZkiA.mjs} +2 -2
- package/browser/esm/{BBNFlngSL8Y3242O.mjs → CImvd-NxbJGZOozE.mjs} +1 -1
- package/browser/esm/{Me9wSTkBepRyMDHH.mjs → CO-AxUDR6qjjgpyK.mjs} +2 -2
- package/browser/esm/CQ1ArTuEvBmc7W5I.mjs +695 -0
- package/browser/esm/{uV_YgeJoyPa9SdGV.mjs → CVNzlTdizLlhU05M.mjs} +2 -2
- package/browser/esm/{D2YXkXpEcP-NqHMv.mjs → CXwkm9x8MkCxPz74.mjs} +1 -1
- package/browser/esm/{WQaRUnIjMCkaRwsb.mjs → CZIV7UuyM5VGNrJT.mjs} +4 -4
- package/browser/esm/{BQTUWwRUxgqg4s6Y.mjs → CdK1lF_PdSw6YfAo.mjs} +1 -1
- package/browser/esm/{DoYGmNZ_X3Kvxx3K.mjs → CpgoYQ3P-S7njA7p.mjs} +2 -2
- package/browser/esm/{ph1FP1S-yYM0I269.mjs → CqEyDFDlQ75w1c41.mjs} +2 -2
- package/browser/esm/{BYUokd7Q6y5Xw36U.mjs → CqIX3rp_vI2S2KbN.mjs} +2 -2
- package/browser/esm/{NSuxs1P3kFsoLIMa.mjs → Csmz2j1S5pk-J0B3.mjs} +2 -2
- package/browser/esm/{B0q0gHDAexrBB16B.mjs → CsuFocZfRucugR3q.mjs} +1153 -922
- package/browser/esm/{SHaQophNZjobC_4f.mjs → Cw6wZyiZkwn9DPZn.mjs} +193 -105
- package/browser/esm/{m5mPoZGqgwOCQQOs.mjs → D91G6sYfKgwC24dQ.mjs} +1 -1
- package/browser/esm/{B1SDDlETvGUJ2Ipu.mjs → DF_ssRdRHuBueJgX.mjs} +89 -102
- package/browser/esm/{CWgz8hWLf3OzuMyZ.mjs → DJaMl_5NGyq62zwW.mjs} +1 -1
- package/browser/esm/DLixDE7fzzurotzQ.mjs +826 -0
- package/browser/esm/{dlNcqumPfehZG2ai.mjs → DM86XhEF4qmUnjuK.mjs} +4 -4
- package/browser/esm/{BrFq6SNq-qx1PYZO.mjs → DNXDqUO4_S_N8sSC.mjs} +2 -2
- package/browser/esm/{BMIfZN_dgjS_p-pF.mjs → DfrMUwmPoZFEFJFk.mjs} +1 -1
- package/browser/esm/{BESsacbR41SalUJv.mjs → Dn3ur1I_S9SlR8vu.mjs} +1 -1
- package/browser/esm/{CbCTAkfOjIThF31A.mjs → IUt6EgxYCpZe9iCH.mjs} +2 -2
- package/browser/esm/{a7OD-X4Jjp810Y6v.mjs → JNoXh3IYri5h1W3Y.mjs} +1 -1
- package/browser/esm/{1JW5qOuAMlejsOrm.mjs → LZ2X5C1kjiwUCDGz.mjs} +2 -2
- package/browser/esm/{DlZoddGNGipM3S72.mjs → MSkt-6o2ZLEiAbDl.mjs} +1 -1
- package/browser/esm/{MR6LXUjaCV0DShNi.mjs → bQOt-2VGBciMnvp_.mjs} +3 -3
- package/browser/esm/{CbC8ObddTe-7ix6F.mjs → drMcpHj_xCQ0KxuA.mjs} +4 -4
- package/browser/esm/{DGz8aGpEm8yfccoW.mjs → g-ScvvLFu66BzoGI.mjs} +2 -2
- package/browser/esm/index.mjs +299 -299
- package/browser/esm/{dikVMLRWr5g6T0E7.mjs → j6NYTR7qK3Ra-ctk.mjs} +2 -2
- package/browser/esm/qSdXw8S3Pv-_PPNl.mjs +210 -0
- package/browser/esm/{Bz6OaRkDOpj807bi.mjs → r8gxfS-mY5qhTMtJ.mjs} +2 -2
- package/browser/esm/{DVXQrjSOGoB23arZ.mjs → ro5VSIHWH1Nehr75.mjs} +1 -1
- package/browser/esm/tfUleloRF2hBRjjZ.mjs +996 -0
- package/browser/esm/vTlYAw0bvWP8B4jg.mjs +103 -0
- package/browser/esm/{D8RzgRnl0S1-W_Tx.mjs → vzJavAz2onbnB0zm.mjs} +1183 -1204
- package/browser/esm/{wwSpRKFXL9eeyQND.mjs → xaG6CESboBdgd5SL.mjs} +3 -3
- package/browser/esm/{B0ymykpoTxxHQosi.mjs → ze358yTiZmVH9_vX.mjs} +6 -4
- package/licenses/dependencies.txt +33 -33
- package/node/esm/5WNL9ztJdLI0VLJ7.mjs +997 -0
- package/node/esm/{B_7rer9pnurpMB9J.mjs → 8aFKkKyEL5n7sJAn.mjs} +12 -12
- package/node/esm/{DGieA81teTm8uNPr.mjs → 9Yzu2QTWzvPBNvc4.mjs} +1 -1
- package/node/esm/{DF5w_ZBWiRtITKLQ.mjs → BDGax8JuzpXDLe1U.mjs} +1 -1
- package/node/esm/{BedAzhQqTjs4BBb4.mjs → BMuPM5U4Q2kQVYTt.mjs} +251 -253
- package/node/esm/B_XE-SYyFRwWgVyQ.mjs +2070 -0
- package/node/esm/{C4esZkRHnb4HEK3k.mjs → Bap-XMVZ0X80-MNV.mjs} +2 -2
- package/node/esm/{DHrxhle3aK3XU-Jz.mjs → BghhH54dXAqciBpw.mjs} +2 -2
- package/node/esm/{Diu9L9DJzZCMtFb4.mjs → Bgsi1G5RDBa4Rnmh.mjs} +1 -1
- package/node/esm/{mHNl4j2rIZTqcQqb.mjs → Bj6wKB1N--BJ0A7u.mjs} +1 -1
- package/node/esm/{BBRSP-QRw-F0qQdJ.mjs → Bp6DyaGr7Ah4mCbj.mjs} +2 -2
- package/node/esm/BxIw0JqQD7Ibk44S.mjs +103 -0
- package/node/esm/{BRICG2VkglJJKy0X.mjs → C6J3DXYnvgXi5m4u.mjs} +1 -1
- package/node/esm/{Cr94rxP9x4CWSBhF.mjs → CAXzH3lCFKI5mhsY.mjs} +2 -2
- package/node/esm/CBpG1x4pS6pNfRR1.mjs +461 -0
- package/node/esm/{qYIPGp0bxwW5i6Tn.mjs → CDx7cgKCqLflEubV.mjs} +1 -1
- package/node/esm/{vTyr2di6cTC3sA1F.mjs → CFL1BiUsTE9X1-c8.mjs} +24 -24
- package/node/esm/{BRpSVGr1A8w4AG_c.mjs → CHBfOuyPAMiTojvS.mjs} +97 -110
- package/node/esm/{B1CcqB7Ue-EPkdE-.mjs → CJIgRvLMiUJG79DB.mjs} +1 -1
- package/node/esm/{Bwtmjq_jln0eMEMe.mjs → CcbjmWOlODDY8gGF.mjs} +1 -1
- package/node/esm/CdrSmZ9WDzkEGAXL.mjs +695 -0
- package/node/esm/{MNdDR5PA6J1YEtyL.mjs → Ck0jN6hnefC5Hbsk.mjs} +22 -22
- package/node/esm/{D13aAzbfNwj50sqn.mjs → CkGQNbOwGQPWEcUf.mjs} +2 -2
- package/node/esm/{4mAgDExCti1oMAez.mjs → D283LXrMqi3exI_l.mjs} +1 -1
- package/node/esm/DH0tw27cVxmy7-AI.mjs +40 -0
- package/node/esm/{CBes_pLI-7rJsre4.mjs → DJ4lhPXDGigmgQ-y.mjs} +2 -2
- package/node/esm/{CJszsuCXRBPNuT1A.mjs → DUZYSELfaHMSnDU2.mjs} +1 -1
- package/node/esm/{Bm31UyWMCsJ7z4wJ.mjs → DZYzjxDF58TKD0xV.mjs} +2 -2
- package/node/esm/{Bz0uw5YbQGvhlPhZ.mjs → Debl1EJrMSlRwGcN.mjs} +2 -2
- package/node/esm/{D2eYMCx5eAEJsfP6.mjs → Dga-nEOi0B5TjgH6.mjs} +148 -148
- package/node/esm/{BSZ0bAJn4ODpGusx.mjs → Diszdr1X5yDuuIzT.mjs} +1 -1
- package/node/esm/{suDXa2UiBKJB4nsR.mjs → Dms4poPA6WOC4jyK.mjs} +1 -1
- package/node/esm/{pm_LpeNYjo6Aahu3.mjs → DnjxhVMqfBhfsNHj.mjs} +14 -14
- package/node/esm/{D__UzirlxQlq32Rm.mjs → DsoWGkhZNfvhmpK-.mjs} +2 -2
- package/node/esm/DyKgKDqbquskgXEA.mjs +828 -0
- package/node/esm/{DlSfkSNLCwzofCfS.mjs → DzZb-LzjScchWCpk.mjs} +66 -67
- package/node/esm/{C1y7Z0K9Ougef8dU.mjs → MvXs13X1leYt7rBb.mjs} +2 -2
- package/node/esm/{DXQFo_r4CCCvIubP.mjs → SBp59gHxCkFpvNwi.mjs} +1 -1
- package/node/esm/{n5-pWzwq4pDS4adG.mjs → iJrkLXWLGxVhCmtE.mjs} +1 -1
- package/node/esm/index.mjs +3294 -3031
- package/node/esm/{B7_-3nxcN-ZSDQVT.mjs → l0liY9jxGCFXsxNX.mjs} +1 -1
- package/node/esm/{DvlZnGlon5gwQBxU.mjs → mhPcr4NaFejGRG5p.mjs} +1 -1
- package/node/esm/{9e9_OZYxc0ATDkNI.mjs → vfgV7wwOvzh9iYjc.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +4 -6
- package/resources/locales/de/ui.msg.json +164 -3
- package/resources/locales/en/groups.cmd.json +4 -6
- package/resources/locales/en/ui.msg.json +164 -3
- package/types/src/anomalies/AnomaliesCommands.d.ts +1 -1
- package/types/src/chart/ChartDetailsPanel.d.ts +34 -0
- package/types/src/chart/ChartDetailsTaskPane.d.ts +9 -0
- package/types/src/chart/ChartFormatPanel.d.ts +12 -14
- package/types/src/chart/command/ChartColorsCommandButton.d.ts +54 -0
- package/types/src/chart/command/ChartStyleCommandButton.d.ts +64 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +15 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/chart/format/ChartElementFormat.d.ts +54 -0
- package/types/src/chart/pane/ChartPaneModel.d.ts +134 -0
- package/types/src/chart/pane/ChartPaneRow.d.ts +77 -0
- package/types/src/color/ColorSetSwatch.d.ts +34 -0
- package/types/src/color/index.d.ts +1 -0
- package/types/src/command/NumberFormatQuickButtons.d.ts +1 -1
- package/types/src/format/FillPanel.d.ts +1 -3
- package/types/src/format/FormatPanelParts.d.ts +2 -2
- package/types/src/format/FormatPlugin.d.ts +2 -2
- package/types/src/format/FormatTaskPane.d.ts +4 -10
- package/types/src/format/LinePanel.d.ts +0 -2
- package/types/src/format/editor/FormatEditor.d.ts +36 -0
- package/types/src/format/editor/FormatField.d.ts +97 -0
- package/types/src/format/editor/FormatFields.d.ts +20 -0
- package/types/src/format/editor/index.d.ts +4 -0
- package/types/src/format/index.d.ts +1 -0
- package/types/src/format/useFormatSelection.d.ts +0 -2
- package/types/src/index.d.ts +1 -1
- package/types/src/shape/ShapeFormatPanel.d.ts +3 -7
- package/types/src/workbook/DefaultRenderers.d.ts +7 -1
- package/browser/esm/39iN4gKrFnhPhM1Z.mjs +0 -517
- package/browser/esm/BWXXi0teArfwa70E.mjs +0 -72
- package/browser/esm/J519wp1_d0QjzPfN.mjs +0 -516
- package/node/esm/Bc2iZ6Qs3kHdsECK.mjs +0 -1831
- package/node/esm/BvKg2K2J7Us2czkC.mjs +0 -519
- package/node/esm/CwQPIQaC6CcVGkD2.mjs +0 -73
- package/node/esm/CyQekcyEfM7Engbk.mjs +0 -516
- package/types/src/studio/StudioSplitPane.d.ts +0 -60
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { r as e, t } from "./
|
|
8
|
-
import { t as n } from "./
|
|
9
|
-
import { t as r } from "./
|
|
10
|
-
import { n as i, r as a, t as o } from "./
|
|
11
|
-
import { i as s, n as c, o as l, r as u, t as d } from "./
|
|
12
|
-
import { t as f } from "./
|
|
13
|
-
import { n as p, t as m } from "./
|
|
7
|
+
import { r as e, t } from "./Cw6wZyiZkwn9DPZn.mjs";
|
|
8
|
+
import { t as n } from "./DJaMl_5NGyq62zwW.mjs";
|
|
9
|
+
import { t as r } from "./CFUur1yDoVOJMuo5.mjs";
|
|
10
|
+
import { n as i, r as a, t as o } from "./CAbY1N8X3Iryy2XC.mjs";
|
|
11
|
+
import { i as s, n as c, o as l, r as u, t as d } from "./CImvd-NxbJGZOozE.mjs";
|
|
12
|
+
import { t as f } from "./CZIV7UuyM5VGNrJT.mjs";
|
|
13
|
+
import { n as p, t as m } from "./C9cBnewCaYFf2JV6.mjs";
|
|
14
14
|
import { IBorders as h, IRange as g, NumberFormat as _ } from "@sheetxl/sdk";
|
|
15
|
-
import { StaticBorderRenderer as v, StaticCellRenderer as y,
|
|
16
|
-
import { DynamicIcon as
|
|
17
|
-
import { memo as
|
|
18
|
-
import { CommandButton as
|
|
19
|
-
import { jsx as
|
|
20
|
-
import { Box as
|
|
21
|
-
import { messageKey as
|
|
22
|
-
var
|
|
15
|
+
import { StaticBorderRenderer as v, StaticCellRenderer as y, TaskPaneEmpty as b, useGridColorScheme as x, useModelListener as S, useModelSync as ee } from "@sheetxl/react";
|
|
16
|
+
import { DynamicIcon as te, useCallbackRef as C, useCommands as w, usePersistentState as T, useTranslator as E } from "@sheetxl/utils-react";
|
|
17
|
+
import { memo as D, useCallback as O, useEffect as k, useMemo as ne, useReducer as re, useRef as A, useState as j } from "react";
|
|
18
|
+
import { CommandButton as M, ExhibitIconButton as ie, PopupButtonType as ae } from "@sheetxl/utils-mui";
|
|
19
|
+
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
20
|
+
import { Box as F, Paper as I, Tab as L, Tabs as R, Typography as oe, alpha as z } from "@mui/material";
|
|
21
|
+
import { messageKey as B } from "@sheetxl/utils";
|
|
22
|
+
var se = {
|
|
23
23
|
autoFocus: !1,
|
|
24
24
|
scrollIntoView: !1
|
|
25
|
-
},
|
|
26
|
-
let { selection: t, height: n = 46, maxWidth: r = 260, ...i } = e, a =
|
|
25
|
+
}, V = D((e) => {
|
|
26
|
+
let { selection: t, height: n = 46, maxWidth: r = 260, ...i } = e, a = E(), { cell: o, createCell: s, disabled: c } = t, l = ne(() => typeof o.getValue() == "number" ? o : s({
|
|
27
27
|
value: 1234.56,
|
|
28
28
|
style: o.getStyle()
|
|
29
29
|
}), [o, s]);
|
|
30
|
-
return
|
|
30
|
+
return P(F, {
|
|
31
31
|
sx: {
|
|
32
32
|
display: "flex",
|
|
33
33
|
flexDirection: "column",
|
|
34
34
|
gap: .5
|
|
35
35
|
},
|
|
36
36
|
...i,
|
|
37
|
-
children: [
|
|
37
|
+
children: [N(oe, {
|
|
38
38
|
variant: "caption",
|
|
39
39
|
component: "div",
|
|
40
40
|
children: a("format.preview")
|
|
41
|
-
}),
|
|
41
|
+
}), N(y, {
|
|
42
42
|
cell: l,
|
|
43
43
|
disabled: c,
|
|
44
44
|
style: {
|
|
@@ -55,79 +55,79 @@ var R = {
|
|
|
55
55
|
})]
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
var
|
|
58
|
+
V.displayName = "FormatCellPreview";
|
|
59
|
+
var H = {
|
|
60
60
|
axes: g.AxisSelection.Column,
|
|
61
61
|
expandOnly: !0,
|
|
62
62
|
skipCustomSize: !0
|
|
63
|
-
},
|
|
63
|
+
}, U = (e) => e > 180 ? e - 360 : e, W = (e) => {
|
|
64
64
|
let t = Math.max(-90, Math.min(90, Math.round(e)));
|
|
65
65
|
return t < 0 ? t + 360 : t;
|
|
66
|
-
},
|
|
67
|
-
let { selection: t, disabled: n, className: i, ...a } = e, o =
|
|
68
|
-
p({ alignment: { indent: e } },
|
|
66
|
+
}, G = D((e) => {
|
|
67
|
+
let { selection: t, disabled: n, className: i, ...a } = e, o = E(), { style: f, applyStyle: p } = t, m = n || t.disabled, h = f.getAlignment(), g = h.getIndent(), _ = h.getStacked(), v = _ ? 0 : h.getRotation(), y = C((e) => {
|
|
68
|
+
p({ alignment: { indent: e } }, B("op.setAlignment"), H);
|
|
69
69
|
}, [p]), b = C((e) => {
|
|
70
|
-
p({ alignment: { rotation:
|
|
70
|
+
p({ alignment: { rotation: W(e) } }, B("op.setAlignment"));
|
|
71
71
|
}, [p]);
|
|
72
|
-
return
|
|
72
|
+
return P(F, {
|
|
73
73
|
className: r("sxl-format-alignment-panel", i),
|
|
74
74
|
sx: l,
|
|
75
75
|
...a,
|
|
76
76
|
children: [
|
|
77
|
-
|
|
77
|
+
N(s, {
|
|
78
78
|
label: o("format.horizontalAlignment"),
|
|
79
|
-
children:
|
|
80
|
-
|
|
79
|
+
children: N(u, { children: P(d, { children: [
|
|
80
|
+
N(M, {
|
|
81
81
|
commandKey: "formatAlignLeftToggle",
|
|
82
82
|
groupKey: "horizontalAlignOptions",
|
|
83
83
|
disabled: m
|
|
84
84
|
}),
|
|
85
|
-
|
|
85
|
+
N(M, {
|
|
86
86
|
commandKey: "formatAlignCenterToggle",
|
|
87
87
|
groupKey: "horizontalAlignOptions",
|
|
88
88
|
disabled: m
|
|
89
89
|
}),
|
|
90
|
-
|
|
90
|
+
N(M, {
|
|
91
91
|
commandKey: "formatAlignRightToggle",
|
|
92
92
|
groupKey: "horizontalAlignOptions",
|
|
93
93
|
disabled: m
|
|
94
94
|
}),
|
|
95
|
-
|
|
95
|
+
N(M, {
|
|
96
96
|
commandKey: "formatAlignJustifyToggle",
|
|
97
97
|
groupKey: "horizontalAlignOptions",
|
|
98
98
|
disabled: m
|
|
99
99
|
}),
|
|
100
|
-
|
|
100
|
+
N(M, {
|
|
101
101
|
commandKey: "formatAlignDistributedHorizontalToggle",
|
|
102
102
|
groupKey: "horizontalAlignOptions",
|
|
103
103
|
disabled: m
|
|
104
104
|
}),
|
|
105
|
-
|
|
105
|
+
N(M, {
|
|
106
106
|
commandKey: "formatAlignCenterContinuousToggle",
|
|
107
107
|
groupKey: "horizontalAlignOptions",
|
|
108
108
|
disabled: m
|
|
109
109
|
}),
|
|
110
|
-
|
|
110
|
+
N(M, {
|
|
111
111
|
commandKey: "formatAlignFillToggle",
|
|
112
112
|
groupKey: "horizontalAlignOptions",
|
|
113
113
|
disabled: m
|
|
114
114
|
})
|
|
115
115
|
] }) })
|
|
116
116
|
}),
|
|
117
|
-
|
|
117
|
+
N(s, {
|
|
118
118
|
label: o("format.indent"),
|
|
119
|
-
children:
|
|
120
|
-
|
|
119
|
+
children: P(u, { children: [
|
|
120
|
+
N(M, {
|
|
121
121
|
commandKey: "formatIndentDecrease",
|
|
122
122
|
groupKey: "horizontalAlignOptions",
|
|
123
123
|
disabled: m
|
|
124
124
|
}),
|
|
125
|
-
|
|
125
|
+
N(M, {
|
|
126
126
|
commandKey: "formatIndentIncrease",
|
|
127
127
|
groupKey: "horizontalAlignOptions",
|
|
128
128
|
disabled: m
|
|
129
129
|
}),
|
|
130
|
-
|
|
130
|
+
N(c, {
|
|
131
131
|
label: o("format.indentUnit"),
|
|
132
132
|
disabled: m,
|
|
133
133
|
value: g,
|
|
@@ -138,123 +138,123 @@ var B = {
|
|
|
138
138
|
})
|
|
139
139
|
] })
|
|
140
140
|
}),
|
|
141
|
-
|
|
141
|
+
N(s, {
|
|
142
142
|
label: o("format.verticalAlignment"),
|
|
143
|
-
children:
|
|
144
|
-
|
|
143
|
+
children: P(d, { children: [
|
|
144
|
+
N(M, {
|
|
145
145
|
commandKey: "formatAlignTopToggle",
|
|
146
146
|
groupKey: "verticalAlignOptions",
|
|
147
147
|
disabled: m
|
|
148
148
|
}),
|
|
149
|
-
|
|
149
|
+
N(M, {
|
|
150
150
|
commandKey: "formatAlignMiddleToggle",
|
|
151
151
|
groupKey: "verticalAlignOptions",
|
|
152
152
|
disabled: m
|
|
153
153
|
}),
|
|
154
|
-
|
|
154
|
+
N(M, {
|
|
155
155
|
commandKey: "formatAlignBottomToggle",
|
|
156
156
|
groupKey: "verticalAlignOptions",
|
|
157
157
|
disabled: m
|
|
158
158
|
}),
|
|
159
|
-
|
|
159
|
+
N(M, {
|
|
160
160
|
commandKey: "formatAlignJustifyVerticalToggle",
|
|
161
161
|
groupKey: "verticalAlignOptions",
|
|
162
162
|
disabled: m
|
|
163
163
|
}),
|
|
164
|
-
|
|
164
|
+
N(M, {
|
|
165
165
|
commandKey: "formatAlignDistributedVerticalToggle",
|
|
166
166
|
groupKey: "verticalAlignOptions",
|
|
167
167
|
disabled: m
|
|
168
168
|
})
|
|
169
169
|
] })
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
N(s, {
|
|
172
172
|
label: o("format.overflow"),
|
|
173
|
-
children:
|
|
174
|
-
|
|
173
|
+
children: P(d, { children: [
|
|
174
|
+
N(M, {
|
|
175
175
|
commandKey: "formatTextOverflowWrapToggle",
|
|
176
176
|
groupKey: "textOverflowOptions",
|
|
177
177
|
disabled: m
|
|
178
178
|
}),
|
|
179
|
-
|
|
179
|
+
N(M, {
|
|
180
180
|
commandKey: "formatTextOverflowShrinkToggle",
|
|
181
181
|
groupKey: "textOverflowOptions",
|
|
182
182
|
disabled: m
|
|
183
183
|
}),
|
|
184
|
-
|
|
184
|
+
N(M, {
|
|
185
185
|
commandKey: "formatTextOverflowClipToggle",
|
|
186
186
|
groupKey: "textOverflowOptions",
|
|
187
187
|
disabled: m
|
|
188
188
|
}),
|
|
189
|
-
|
|
189
|
+
N(M, {
|
|
190
190
|
commandKey: "formatTextOverflowVisibleToggle",
|
|
191
191
|
groupKey: "textOverflowOptions",
|
|
192
192
|
disabled: m
|
|
193
193
|
})
|
|
194
194
|
] })
|
|
195
195
|
}),
|
|
196
|
-
|
|
196
|
+
N(s, {
|
|
197
197
|
label: o("format.merge"),
|
|
198
|
-
children:
|
|
199
|
-
|
|
198
|
+
children: P(d, { children: [
|
|
199
|
+
N(M, {
|
|
200
200
|
commandKey: "mergeToggle",
|
|
201
201
|
groupKey: "mergeOptions",
|
|
202
202
|
disabled: m
|
|
203
203
|
}),
|
|
204
|
-
|
|
204
|
+
N(M, {
|
|
205
205
|
commandKey: "mergeHorizontal",
|
|
206
206
|
groupKey: "mergeOptions",
|
|
207
207
|
disabled: m
|
|
208
208
|
}),
|
|
209
|
-
|
|
209
|
+
N(M, {
|
|
210
210
|
commandKey: "mergeVertical",
|
|
211
211
|
groupKey: "mergeOptions",
|
|
212
212
|
disabled: m
|
|
213
213
|
}),
|
|
214
|
-
|
|
214
|
+
N(M, {
|
|
215
215
|
commandKey: "unmerge",
|
|
216
216
|
groupKey: "mergeOptions",
|
|
217
217
|
disabled: m
|
|
218
218
|
})
|
|
219
219
|
] })
|
|
220
220
|
}),
|
|
221
|
-
|
|
221
|
+
N(s, {
|
|
222
222
|
label: o("format.orientation"),
|
|
223
|
-
children:
|
|
224
|
-
|
|
223
|
+
children: P(u, { children: [P(d, { children: [
|
|
224
|
+
N(M, {
|
|
225
225
|
commandKey: "formatTextRotate0",
|
|
226
226
|
groupKey: "textRotateOptions",
|
|
227
227
|
disabled: m
|
|
228
228
|
}),
|
|
229
|
-
|
|
229
|
+
N(M, {
|
|
230
230
|
commandKey: "formatTextRotate45",
|
|
231
231
|
groupKey: "textRotateOptions",
|
|
232
232
|
disabled: m
|
|
233
233
|
}),
|
|
234
|
-
|
|
234
|
+
N(M, {
|
|
235
235
|
commandKey: "formatTextRotate315",
|
|
236
236
|
groupKey: "textRotateOptions",
|
|
237
237
|
disabled: m
|
|
238
238
|
}),
|
|
239
|
-
|
|
239
|
+
N(M, {
|
|
240
240
|
commandKey: "formatTextRotate90",
|
|
241
241
|
groupKey: "textRotateOptions",
|
|
242
242
|
disabled: m
|
|
243
243
|
}),
|
|
244
|
-
|
|
244
|
+
N(M, {
|
|
245
245
|
commandKey: "formatTextRotateVertical",
|
|
246
246
|
groupKey: "textRotateOptions",
|
|
247
247
|
disabled: m
|
|
248
248
|
}),
|
|
249
|
-
|
|
249
|
+
N(M, {
|
|
250
250
|
commandKey: "formatTextRotate270",
|
|
251
251
|
groupKey: "textRotateOptions",
|
|
252
252
|
disabled: m
|
|
253
253
|
})
|
|
254
|
-
] }),
|
|
254
|
+
] }), N(c, {
|
|
255
255
|
label: o("format.degrees"),
|
|
256
256
|
disabled: m || _,
|
|
257
|
-
value:
|
|
257
|
+
value: U(v),
|
|
258
258
|
min: -90,
|
|
259
259
|
max: 90,
|
|
260
260
|
step: 5,
|
|
@@ -265,90 +265,90 @@ var B = {
|
|
|
265
265
|
]
|
|
266
266
|
});
|
|
267
267
|
});
|
|
268
|
-
|
|
269
|
-
var
|
|
270
|
-
let { selection: t, disabled: n, className: c, ...f } = e, p =
|
|
271
|
-
return
|
|
268
|
+
G.displayName = "AlignmentPanel";
|
|
269
|
+
var ce = D((e) => {
|
|
270
|
+
let { selection: t, disabled: n, className: c, ...f } = e, p = E(), m = n || t.disabled;
|
|
271
|
+
return P(F, {
|
|
272
272
|
className: r("sxl-format-font-panel", c),
|
|
273
273
|
sx: l,
|
|
274
274
|
...f,
|
|
275
275
|
children: [
|
|
276
|
-
|
|
276
|
+
N(s, {
|
|
277
277
|
label: p("format.fontFamily"),
|
|
278
|
-
children:
|
|
278
|
+
children: N(o, {
|
|
279
279
|
commandKey: "formatFontFamily",
|
|
280
280
|
disabled: m,
|
|
281
281
|
sx: { width: "100%" }
|
|
282
282
|
})
|
|
283
283
|
}),
|
|
284
|
-
|
|
284
|
+
N(s, {
|
|
285
285
|
label: p("format.fontSize"),
|
|
286
|
-
children:
|
|
287
|
-
|
|
286
|
+
children: P(u, { children: [
|
|
287
|
+
N(a, {
|
|
288
288
|
commandKey: "formatFontSize",
|
|
289
289
|
disabled: m,
|
|
290
290
|
sx: { width: 96 }
|
|
291
291
|
}),
|
|
292
|
-
|
|
292
|
+
N(M, {
|
|
293
293
|
commandKey: "formatFontSizeIncrease",
|
|
294
294
|
disabled: m
|
|
295
295
|
}),
|
|
296
|
-
|
|
296
|
+
N(M, {
|
|
297
297
|
commandKey: "formatFontSizeDecrease",
|
|
298
298
|
disabled: m
|
|
299
299
|
})
|
|
300
300
|
] })
|
|
301
301
|
}),
|
|
302
|
-
|
|
302
|
+
N(s, {
|
|
303
303
|
label: p("format.color"),
|
|
304
|
-
children:
|
|
304
|
+
children: N(u, { children: N(i, {
|
|
305
305
|
commandKey: "formatFontColor",
|
|
306
306
|
disabled: m
|
|
307
307
|
}) })
|
|
308
308
|
}),
|
|
309
|
-
|
|
309
|
+
N(s, {
|
|
310
310
|
label: p("format.effects"),
|
|
311
|
-
children:
|
|
312
|
-
|
|
311
|
+
children: P(d, { children: [
|
|
312
|
+
N(M, {
|
|
313
313
|
commandKey: "formatBoldToggle",
|
|
314
314
|
disabled: m
|
|
315
315
|
}),
|
|
316
|
-
|
|
316
|
+
N(M, {
|
|
317
317
|
commandKey: "formatItalicToggle",
|
|
318
318
|
disabled: m
|
|
319
319
|
}),
|
|
320
|
-
|
|
320
|
+
N(M, {
|
|
321
321
|
commandKey: "formatUnderlinedToggle",
|
|
322
322
|
groupKey: "underlineOptions",
|
|
323
323
|
disabled: m
|
|
324
324
|
}),
|
|
325
|
-
|
|
325
|
+
N(M, {
|
|
326
326
|
commandKey: "formatUnderlinedDoubleToggle",
|
|
327
327
|
groupKey: "underlineOptions",
|
|
328
328
|
disabled: m
|
|
329
329
|
}),
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
N(F, { sx: { width: "8px" } }),
|
|
331
|
+
N(M, {
|
|
332
332
|
commandKey: "formatStrikeThroughToggle",
|
|
333
333
|
disabled: m
|
|
334
334
|
}),
|
|
335
|
-
|
|
335
|
+
N(M, {
|
|
336
336
|
commandKey: "formatSuperscriptToggle",
|
|
337
337
|
disabled: m
|
|
338
338
|
}),
|
|
339
|
-
|
|
339
|
+
N(M, {
|
|
340
340
|
commandKey: "formatSubscriptToggle",
|
|
341
341
|
disabled: m
|
|
342
342
|
})
|
|
343
343
|
] })
|
|
344
344
|
}),
|
|
345
|
-
|
|
345
|
+
N(s, {
|
|
346
346
|
label: p("format.accountingUnderline"),
|
|
347
|
-
children:
|
|
347
|
+
children: P(d, { children: [N(M, {
|
|
348
348
|
commandKey: "formatUnderlinedAccountingToggle",
|
|
349
349
|
groupKey: "underlineOptions",
|
|
350
350
|
disabled: m
|
|
351
|
-
}),
|
|
351
|
+
}), N(M, {
|
|
352
352
|
commandKey: "formatUnderlinedAccountingDoubleToggle",
|
|
353
353
|
groupKey: "underlineOptions",
|
|
354
354
|
disabled: m
|
|
@@ -357,20 +357,20 @@ var W = E((e) => {
|
|
|
357
357
|
]
|
|
358
358
|
});
|
|
359
359
|
});
|
|
360
|
-
|
|
361
|
-
var
|
|
360
|
+
ce.displayName = "FontPanel";
|
|
361
|
+
var K = Object.freeze([
|
|
362
362
|
h.Edge.Top,
|
|
363
363
|
h.Edge.Bottom,
|
|
364
364
|
h.Edge.Left,
|
|
365
365
|
h.Edge.Right,
|
|
366
366
|
h.Edge.Horizontal,
|
|
367
367
|
h.Edge.Vertical
|
|
368
|
-
]),
|
|
369
|
-
...
|
|
368
|
+
]), q = Object.freeze([]), le = Object.freeze([h.Edge.Horizontal, h.Edge.Vertical]), J = new Map([
|
|
369
|
+
...K,
|
|
370
370
|
h.Edge.DiagonalUp,
|
|
371
371
|
h.Edge.DiagonalDown
|
|
372
|
-
].map((e) => [e, Object.freeze([e])])),
|
|
373
|
-
function
|
|
372
|
+
].map((e) => [e, Object.freeze([e])])), Y = (e) => e === h.Edge.DiagonalUp || e === h.Edge.DiagonalDown;
|
|
373
|
+
function X(e, t) {
|
|
374
374
|
switch (t) {
|
|
375
375
|
case h.Edge.Top: return e("border.top");
|
|
376
376
|
case h.Edge.Left: return e("border.left");
|
|
@@ -423,7 +423,7 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
423
423
|
default: return 1;
|
|
424
424
|
}
|
|
425
425
|
}, me = (e) => {
|
|
426
|
-
let { edges: t, createBorder: n, onToggleEdges: i, omittedEdges: a, disabled: o = !1, height: s = 104, className: c, ...l } = e, u =
|
|
426
|
+
let { edges: t, createBorder: n, onToggleEdges: i, omittedEdges: a, disabled: o = !1, height: s = 104, className: c, ...l } = e, u = E(), d = A(null), [f, p] = j(q), m = O((e) => !a?.includes(e), [a]), g = O((e) => !o && m(e), [o, m]), _ = m(h.Edge.Horizontal) ? 2 : 1, y = m(h.Edge.Vertical) ? 2 : 1, b = O((e) => n({
|
|
427
427
|
top: e.rowIndex === 0 ? t.top : t.horizontal,
|
|
428
428
|
bottom: e.rowIndex === _ - 1 ? t.bottom : t.horizontal,
|
|
429
429
|
left: e.colIndex === 0 ? t.left : t.vertical,
|
|
@@ -435,33 +435,33 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
435
435
|
n,
|
|
436
436
|
_,
|
|
437
437
|
y
|
|
438
|
-
]), x =
|
|
438
|
+
]), x = O((e) => {
|
|
439
439
|
let t = d.current;
|
|
440
|
-
if (!t) return
|
|
440
|
+
if (!t) return q;
|
|
441
441
|
let n = t.getBoundingClientRect();
|
|
442
442
|
return function(e, t, n, r, i) {
|
|
443
|
-
if (n <= 0 || r <= 0) return
|
|
443
|
+
if (n <= 0 || r <= 0) return q;
|
|
444
444
|
let a = Math.min(10, n / 5, r / 5);
|
|
445
445
|
if (le.every(i) && Math.abs(e - n / 2) <= a && Math.abs(t - r / 2) <= a) return le;
|
|
446
446
|
let o = Math.abs(e) <= a, s = Math.abs(e - n) <= a, c = Math.abs(t) <= a, l = Math.abs(t - r) <= a;
|
|
447
447
|
if ((o || s) && (c || l)) {
|
|
448
448
|
let e = o === c ? h.Edge.DiagonalDown : h.Edge.DiagonalUp;
|
|
449
|
-
if (i(e)) return
|
|
449
|
+
if (i(e)) return J.get(e);
|
|
450
450
|
}
|
|
451
451
|
let u = null, d = Infinity;
|
|
452
|
-
for (let a of
|
|
452
|
+
for (let a of K) {
|
|
453
453
|
if (!i(a)) continue;
|
|
454
454
|
let o = fe(a), s = o ? r : n, c = o ? t : e, l = Math.max(0, -c, c - s), f = (o ? e : t) - pe(a) * (o ? n : r), p = Math.hypot(l, f);
|
|
455
455
|
p < d && (d = p, u = a);
|
|
456
456
|
}
|
|
457
|
-
return u && d <= a ?
|
|
457
|
+
return u && d <= a ? J.get(u) : q;
|
|
458
458
|
}(e.clientX - n.left, e.clientY - n.top, n.width, n.height, g);
|
|
459
459
|
}, [g]);
|
|
460
|
-
return
|
|
460
|
+
return N(F, {
|
|
461
461
|
className: r("sxl-border-preview", c),
|
|
462
462
|
...l,
|
|
463
463
|
onPointerMove: (e) => p(x(e)),
|
|
464
|
-
onPointerLeave: () => p(
|
|
464
|
+
onPointerLeave: () => p(q),
|
|
465
465
|
onClick: (e) => {
|
|
466
466
|
let t = x(e);
|
|
467
467
|
t.length > 0 && i(t);
|
|
@@ -477,7 +477,7 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
477
477
|
border: (e) => `1px solid ${e.palette.divider}`,
|
|
478
478
|
opacity: o ? .6 : 1
|
|
479
479
|
},
|
|
480
|
-
children:
|
|
480
|
+
children: P(F, {
|
|
481
481
|
ref: d,
|
|
482
482
|
sx: {
|
|
483
483
|
position: "relative",
|
|
@@ -485,7 +485,7 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
485
485
|
height: "100%"
|
|
486
486
|
},
|
|
487
487
|
children: [
|
|
488
|
-
|
|
488
|
+
N(F, {
|
|
489
489
|
"aria-hidden": "true",
|
|
490
490
|
sx: {
|
|
491
491
|
position: "absolute",
|
|
@@ -495,11 +495,11 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
495
495
|
gridTemplateRows: `repeat(${_}, 1fr)`,
|
|
496
496
|
gap: "2px",
|
|
497
497
|
pointerEvents: "none",
|
|
498
|
-
"& > div": { backgroundColor: (e) =>
|
|
498
|
+
"& > div": { backgroundColor: (e) => z(e.palette.text.primary, .05) }
|
|
499
499
|
},
|
|
500
|
-
children: Array.from({ length: _ * y }, (e, t) =>
|
|
500
|
+
children: Array.from({ length: _ * y }, (e, t) => N("div", {}, t))
|
|
501
501
|
}),
|
|
502
|
-
|
|
502
|
+
N(F, {
|
|
503
503
|
"aria-hidden": "true",
|
|
504
504
|
sx: {
|
|
505
505
|
position: "absolute",
|
|
@@ -510,9 +510,9 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
510
510
|
backgroundColor: (e) => e.palette.text.secondary
|
|
511
511
|
}
|
|
512
512
|
},
|
|
513
|
-
children: de(_, y).map((e, t) =>
|
|
513
|
+
children: de(_, y).map((e, t) => N("div", { style: e }, t))
|
|
514
514
|
}),
|
|
515
|
-
f.length > 0 ?
|
|
515
|
+
f.length > 0 ? P(F, {
|
|
516
516
|
"aria-hidden": "true",
|
|
517
517
|
sx: {
|
|
518
518
|
position: "absolute",
|
|
@@ -526,7 +526,7 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
526
526
|
},
|
|
527
527
|
"& line": { stroke: (e) => e.palette.text.primary }
|
|
528
528
|
},
|
|
529
|
-
children: [f.filter((e) => !
|
|
529
|
+
children: [f.filter((e) => !Y(e)).map((e) => N("div", { style: he(e) }, e)), f.some(Y) ? N("svg", {
|
|
530
530
|
viewBox: "0 0 100 100",
|
|
531
531
|
preserveAspectRatio: "none",
|
|
532
532
|
style: {
|
|
@@ -536,11 +536,11 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
536
536
|
height: "100%",
|
|
537
537
|
overflow: "visible"
|
|
538
538
|
},
|
|
539
|
-
children: f.filter(
|
|
539
|
+
children: f.filter(Y).flatMap((e) => function(e, t, n) {
|
|
540
540
|
let r = [];
|
|
541
541
|
for (let i = 0; i < t; i++) for (let a = 0; a < n; a++) {
|
|
542
542
|
let o = a / n * 100, s = (a + 1) / n * 100, c = i / t * 100, l = (i + 1) / t * 100, u = e === h.Edge.DiagonalDown;
|
|
543
|
-
r.push(
|
|
543
|
+
r.push(N("line", {
|
|
544
544
|
x1: o,
|
|
545
545
|
y1: u ? c : l,
|
|
546
546
|
x2: s,
|
|
@@ -554,7 +554,7 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
554
554
|
}(e, _, y))
|
|
555
555
|
}) : null]
|
|
556
556
|
}) : null,
|
|
557
|
-
|
|
557
|
+
N(v, {
|
|
558
558
|
getBorderAt: b,
|
|
559
559
|
rowCount: _,
|
|
560
560
|
columnCount: y,
|
|
@@ -565,15 +565,15 @@ var ue = (e) => e === 0 ? "0px" : e === 1 ? "calc(100% - 1px)" : `calc(${100 * e
|
|
|
565
565
|
width: "100%"
|
|
566
566
|
}
|
|
567
567
|
}),
|
|
568
|
-
|
|
568
|
+
K.filter(m).map((e) => N(F, {
|
|
569
569
|
component: "button",
|
|
570
570
|
type: "button",
|
|
571
|
-
"aria-label":
|
|
571
|
+
"aria-label": X(u, e),
|
|
572
572
|
"aria-pressed": !!t[e],
|
|
573
|
-
title:
|
|
573
|
+
title: X(u, e),
|
|
574
574
|
disabled: !g(e),
|
|
575
575
|
onClick: (t) => {
|
|
576
|
-
t.stopPropagation(), i(
|
|
576
|
+
t.stopPropagation(), i(J.get(e));
|
|
577
577
|
},
|
|
578
578
|
sx: {
|
|
579
579
|
position: "absolute",
|
|
@@ -606,69 +606,69 @@ function he(e) {
|
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
me.displayName = "BorderPreview";
|
|
609
|
-
var ge = h.StrokeStyle.Thin,
|
|
609
|
+
var ge = h.StrokeStyle.Thin, _e = Object.freeze([
|
|
610
610
|
h.Edge.Left,
|
|
611
611
|
h.Edge.Top,
|
|
612
612
|
h.Edge.Right,
|
|
613
613
|
h.Edge.Bottom
|
|
614
|
-
]),
|
|
614
|
+
]), ve = Object.freeze([h.Edge.Horizontal, h.Edge.Vertical]), Z = Object.freeze([..._e, ...ve]), ye = Object.freeze([h.Edge.DiagonalUp, h.Edge.DiagonalDown]), be = Object.freeze([...Z, ...ye]), xe = (e, t, n) => {
|
|
615
615
|
let r = {
|
|
616
616
|
style: t,
|
|
617
617
|
color: n?.toString()
|
|
618
618
|
}, i = {};
|
|
619
619
|
for (let t of e) i[t] = r;
|
|
620
620
|
return i;
|
|
621
|
-
},
|
|
621
|
+
}, Se = (e) => {
|
|
622
622
|
let t = {};
|
|
623
623
|
for (let n of e) t[n] = null;
|
|
624
624
|
return t;
|
|
625
|
-
},
|
|
626
|
-
let { selection: a, disabled: o, className: c, ...f } = i, p =
|
|
625
|
+
}, Ce = (e) => e ? e.toString() : null, we = D((i) => {
|
|
626
|
+
let { selection: a, disabled: o, className: c, ...f } = i, p = E(), { getEdgeStroke: m, createBorder: g, applyStyle: _, styles: v, autoColor: y, darkMode: b, hasInnerHorizontal: x, hasInnerVertical: S } = a, ee = v.schemeLookup(), w = o || a.disabled, T = C((e) => e === h.Edge.Horizontal ? !x : e === h.Edge.Vertical && !S, [x, S]), [D, O] = j(() => {
|
|
627
627
|
let e = m(h.Edge.Bottom)?.getStyle();
|
|
628
628
|
return e && e !== h.StrokeStyle.None ? e : ge;
|
|
629
|
-
}), [
|
|
629
|
+
}), [k, ne] = j(() => {
|
|
630
630
|
let e = m(h.Edge.Bottom);
|
|
631
631
|
return !e || e.isNone() ? null : e.getProperties().color ? e.getColor() : null;
|
|
632
|
-
}),
|
|
633
|
-
_({ borders: e },
|
|
634
|
-
}, [_]),
|
|
635
|
-
e.length !== 0 && _([{ borders:
|
|
632
|
+
}), re = C(() => v.recentColors(), [v]), A = C((e) => {
|
|
633
|
+
_({ borders: e }, B("op.setBorders"));
|
|
634
|
+
}, [_]), M = C((e) => {
|
|
635
|
+
e.length !== 0 && _([{ borders: Se(e) }, { borders: xe(e, D, k) }], B("op.setBorders"));
|
|
636
636
|
}, [
|
|
637
637
|
_,
|
|
638
638
|
D,
|
|
639
|
-
|
|
640
|
-
]),
|
|
641
|
-
e.length !== 0 && A(
|
|
642
|
-
}, [A]),
|
|
643
|
-
|
|
644
|
-
}, [
|
|
645
|
-
for (let e of
|
|
639
|
+
k
|
|
640
|
+
]), I = C((e) => {
|
|
641
|
+
e.length !== 0 && A(xe(e, h.StrokeStyle.None, null));
|
|
642
|
+
}, [A]), L = C((e) => {
|
|
643
|
+
M(e.filter((e) => !T(e)));
|
|
644
|
+
}, [M, T]), R = {};
|
|
645
|
+
for (let e of be) {
|
|
646
646
|
let t = m(e);
|
|
647
|
-
t && !t.isNone() && (
|
|
647
|
+
t && !t.isNone() && (R[e] = t.getProperties());
|
|
648
648
|
}
|
|
649
|
-
let
|
|
650
|
-
let t =
|
|
651
|
-
return (t?.style ?? h.StrokeStyle.None) === D &&
|
|
649
|
+
let z = C((e) => {
|
|
650
|
+
let t = R[e];
|
|
651
|
+
return (t?.style ?? h.StrokeStyle.None) === D && Ce(t?.color) === Ce(k);
|
|
652
652
|
}, [
|
|
653
|
-
|
|
653
|
+
R,
|
|
654
654
|
D,
|
|
655
|
-
|
|
656
|
-
]),
|
|
657
|
-
let t = e.filter((e) => !
|
|
658
|
-
return t.length > 0 && t.every(
|
|
659
|
-
},
|
|
660
|
-
let t = e.filter((e) => !
|
|
661
|
-
D === h.StrokeStyle.None || t.every(
|
|
655
|
+
k
|
|
656
|
+
]), se = (e) => {
|
|
657
|
+
let t = e.filter((e) => !T(e));
|
|
658
|
+
return t.length > 0 && t.every(z);
|
|
659
|
+
}, V = C((e) => {
|
|
660
|
+
let t = e.filter((e) => !T(e));
|
|
661
|
+
D === h.StrokeStyle.None || t.every(z) ? I(t) : M(t);
|
|
662
662
|
}, [
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
663
|
+
I,
|
|
664
|
+
M,
|
|
665
|
+
z,
|
|
666
|
+
T,
|
|
667
667
|
D
|
|
668
|
-
]),
|
|
668
|
+
]), H = (e) => xe(e, D, k), U = (e, t, r) => N(ie, {
|
|
669
669
|
disabled: w,
|
|
670
|
-
icon:
|
|
671
|
-
border: e.length > 0 ?
|
|
670
|
+
icon: N(n, {
|
|
671
|
+
border: e.length > 0 ? H(e) : null,
|
|
672
672
|
createBorder: g
|
|
673
673
|
}),
|
|
674
674
|
propsTooltip: {
|
|
@@ -676,59 +676,59 @@ var ge = h.StrokeStyle.Thin, X = Object.freeze([
|
|
|
676
676
|
simple: !0
|
|
677
677
|
},
|
|
678
678
|
onClick: r
|
|
679
|
-
}),
|
|
680
|
-
let r = w || e.every(
|
|
681
|
-
return
|
|
679
|
+
}), W = (e, t) => {
|
|
680
|
+
let r = w || e.every(T);
|
|
681
|
+
return N(ie, {
|
|
682
682
|
disabled: r,
|
|
683
|
-
selected: !r && D !== h.StrokeStyle.None &&
|
|
684
|
-
icon:
|
|
685
|
-
border:
|
|
683
|
+
selected: !r && D !== h.StrokeStyle.None && se(e),
|
|
684
|
+
icon: N(n, {
|
|
685
|
+
border: H(e),
|
|
686
686
|
createBorder: g
|
|
687
687
|
}),
|
|
688
688
|
propsTooltip: {
|
|
689
689
|
label: t,
|
|
690
690
|
simple: !0
|
|
691
691
|
},
|
|
692
|
-
onClick: () =>
|
|
692
|
+
onClick: () => V(e)
|
|
693
693
|
});
|
|
694
|
-
},
|
|
695
|
-
return
|
|
694
|
+
}, G = (e) => W([e], X(p, e));
|
|
695
|
+
return P(F, {
|
|
696
696
|
className: r("sxl-format-border-panel", c),
|
|
697
697
|
sx: l,
|
|
698
698
|
...f,
|
|
699
699
|
children: [
|
|
700
|
-
|
|
700
|
+
P(u, { children: [N(e, {
|
|
701
701
|
disabled: w || D === h.StrokeStyle.None,
|
|
702
|
-
darkMode:
|
|
703
|
-
icon:
|
|
702
|
+
darkMode: b,
|
|
703
|
+
icon: N(te, { iconKey: "stroke.colored" }),
|
|
704
704
|
tooltip: p("border.colorTooltip"),
|
|
705
|
-
selectedColor:
|
|
706
|
-
onSelectColor: (e) =>
|
|
705
|
+
selectedColor: k,
|
|
706
|
+
onSelectColor: (e) => ne(e),
|
|
707
707
|
propsPanel: {
|
|
708
708
|
disableAlpha: !0,
|
|
709
|
-
schemeLookup:
|
|
710
|
-
recentColors:
|
|
711
|
-
autoColor:
|
|
709
|
+
schemeLookup: ee,
|
|
710
|
+
recentColors: re,
|
|
711
|
+
autoColor: y
|
|
712
712
|
}
|
|
713
|
-
}),
|
|
713
|
+
}), N(t, {
|
|
714
714
|
disabled: w,
|
|
715
|
-
darkMode:
|
|
715
|
+
darkMode: b,
|
|
716
716
|
selectedStyle: D,
|
|
717
|
-
styleColor:
|
|
718
|
-
variant:
|
|
719
|
-
onSelectStyle: (e) =>
|
|
717
|
+
styleColor: k,
|
|
718
|
+
variant: ae.Toolbar,
|
|
719
|
+
onSelectStyle: (e) => O(e ?? h.StrokeStyle.None)
|
|
720
720
|
})] }),
|
|
721
|
-
|
|
721
|
+
P(d, {
|
|
722
722
|
sx: { justifyContent: "center" },
|
|
723
723
|
children: [
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
724
|
+
U(Z, p("border.all"), () => L(Z)),
|
|
725
|
+
U(_e, p("border.outside"), () => L(_e)),
|
|
726
|
+
U([], p("border.none"), () => A(null))
|
|
727
727
|
]
|
|
728
728
|
}),
|
|
729
|
-
|
|
729
|
+
P(s, {
|
|
730
730
|
sx: { px: 1.5 },
|
|
731
|
-
children: [
|
|
731
|
+
children: [P(F, {
|
|
732
732
|
sx: {
|
|
733
733
|
display: "grid",
|
|
734
734
|
gridTemplateColumns: "auto minmax(0, 156px) auto",
|
|
@@ -738,7 +738,7 @@ var ge = h.StrokeStyle.Thin, X = Object.freeze([
|
|
|
738
738
|
minWidth: 0
|
|
739
739
|
},
|
|
740
740
|
children: [
|
|
741
|
-
|
|
741
|
+
P(F, {
|
|
742
742
|
sx: {
|
|
743
743
|
display: "flex",
|
|
744
744
|
flexDirection: "column",
|
|
@@ -746,42 +746,42 @@ var ge = h.StrokeStyle.Thin, X = Object.freeze([
|
|
|
746
746
|
height: "104px"
|
|
747
747
|
},
|
|
748
748
|
children: [
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
749
|
+
G(h.Edge.Top),
|
|
750
|
+
G(h.Edge.Horizontal),
|
|
751
|
+
G(h.Edge.Bottom)
|
|
752
752
|
]
|
|
753
753
|
}),
|
|
754
|
-
|
|
755
|
-
edges:
|
|
754
|
+
N(me, {
|
|
755
|
+
edges: R,
|
|
756
756
|
createBorder: g,
|
|
757
757
|
disabled: w,
|
|
758
758
|
height: 104,
|
|
759
|
-
omittedEdges: Z.filter(
|
|
760
|
-
onToggleEdges:
|
|
759
|
+
omittedEdges: Z.filter(T),
|
|
760
|
+
onToggleEdges: V
|
|
761
761
|
}),
|
|
762
|
-
|
|
762
|
+
N(F, {
|
|
763
763
|
sx: {
|
|
764
764
|
display: "flex",
|
|
765
765
|
alignItems: "center"
|
|
766
766
|
},
|
|
767
|
-
children:
|
|
767
|
+
children: W(ve, p("border.inner"))
|
|
768
768
|
}),
|
|
769
|
-
|
|
770
|
-
|
|
769
|
+
G(h.Edge.DiagonalUp),
|
|
770
|
+
P(F, {
|
|
771
771
|
sx: {
|
|
772
772
|
display: "flex",
|
|
773
773
|
justifyContent: "space-between",
|
|
774
774
|
minWidth: 0
|
|
775
775
|
},
|
|
776
776
|
children: [
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
777
|
+
G(h.Edge.Left),
|
|
778
|
+
G(h.Edge.Vertical),
|
|
779
|
+
G(h.Edge.Right)
|
|
780
780
|
]
|
|
781
781
|
}),
|
|
782
|
-
|
|
782
|
+
G(h.Edge.DiagonalDown)
|
|
783
783
|
]
|
|
784
|
-
}),
|
|
784
|
+
}), N(oe, {
|
|
785
785
|
variant: "caption",
|
|
786
786
|
component: "div",
|
|
787
787
|
sx: {
|
|
@@ -795,58 +795,57 @@ var ge = h.StrokeStyle.Thin, X = Object.freeze([
|
|
|
795
795
|
]
|
|
796
796
|
});
|
|
797
797
|
});
|
|
798
|
-
|
|
798
|
+
we.displayName = "BorderPanel";
|
|
799
799
|
var Q = {
|
|
800
800
|
Number: "number",
|
|
801
801
|
Alignment: "alignment",
|
|
802
802
|
Font: "font",
|
|
803
803
|
Border: "border",
|
|
804
804
|
Fill: "fill"
|
|
805
|
-
},
|
|
805
|
+
}, Te = "format.tab", Ee = Object.freeze([
|
|
806
806
|
Q.Number,
|
|
807
807
|
Q.Alignment,
|
|
808
808
|
Q.Font,
|
|
809
809
|
Q.Border,
|
|
810
810
|
Q.Fill
|
|
811
|
-
]), $ =
|
|
812
|
-
let t = e.model, n =
|
|
813
|
-
|
|
811
|
+
]), $ = D((e) => {
|
|
812
|
+
let t = e.model, n = E();
|
|
813
|
+
ee(t, "onSelectedSheetChange");
|
|
814
814
|
let r = t.getSelectedWorksheet();
|
|
815
815
|
if (!r) {
|
|
816
816
|
let { model: t, args: r, entryKey: i, frame: a, ref: o, ...s } = e;
|
|
817
|
-
return
|
|
817
|
+
return N(I, {
|
|
818
818
|
square: !0,
|
|
819
819
|
ref: o,
|
|
820
820
|
sx: {
|
|
821
821
|
display: "flex",
|
|
822
|
-
flex: "1 1 auto"
|
|
823
|
-
padding: (e) => e.spacing(2, 2)
|
|
822
|
+
flex: "1 1 auto"
|
|
824
823
|
},
|
|
825
824
|
...s,
|
|
826
|
-
children: n("format.noWorksheet")
|
|
825
|
+
children: N(b, { children: n("format.noWorksheet") })
|
|
827
826
|
});
|
|
828
827
|
}
|
|
829
|
-
return
|
|
828
|
+
return N(De, {
|
|
830
829
|
...e,
|
|
831
830
|
sheet: r
|
|
832
831
|
});
|
|
833
832
|
});
|
|
834
833
|
$.displayName = "FormatTaskPane";
|
|
835
|
-
var
|
|
836
|
-
let { model: t, sheet: n, args: r, entryKey: i, frame: a, ref: o, ...s } = e, c =
|
|
834
|
+
var De = D((e) => {
|
|
835
|
+
let { model: t, sheet: n, args: r, entryKey: i, frame: a, ref: o, ...s } = e, c = E(), l = ((e) => {
|
|
837
836
|
let [, t] = re((e) => e + 1, 0);
|
|
838
|
-
|
|
837
|
+
S(e, {
|
|
839
838
|
onSelectionChange: () => t(),
|
|
840
839
|
onStyleChange: () => t()
|
|
841
840
|
});
|
|
842
|
-
let [n] =
|
|
841
|
+
let [n] = w(["formatBoldToggle"]), r = x(), i = e.getSelectedCell(), a = e.getStyles(), o = e.getSelectedRanges(), s = C((t, n, r) => {
|
|
843
842
|
let i = Array.isArray(t) ? t : [t];
|
|
844
843
|
e.doBatch(() => {
|
|
845
844
|
for (let t of i) e.getSelectedRanges().getStyle().update(t, {
|
|
846
|
-
autoSelect:
|
|
845
|
+
autoSelect: se,
|
|
847
846
|
autoFit: r ?? !0
|
|
848
847
|
});
|
|
849
|
-
}, { description: n ??
|
|
848
|
+
}, { description: n ?? B("op.updateStyle") });
|
|
850
849
|
}, [e]), c = C((t) => e.createCell(t), [e]), l = C((e) => a.getNormal().createStyle({ borders: e }).getBorders(), [a]), u = o.getCoords()[0], d = C((t) => {
|
|
851
850
|
if (!u) return null;
|
|
852
851
|
let n = (t, n) => e.getCell({
|
|
@@ -870,7 +869,6 @@ var Ee = E((e) => {
|
|
|
870
869
|
cell: i,
|
|
871
870
|
style: i.getStyle(),
|
|
872
871
|
styles: a,
|
|
873
|
-
schemeLookup: a.schemeLookup(),
|
|
874
872
|
autoColor: a.getNormal().getFont().getColor(),
|
|
875
873
|
darkMode: r === "dark",
|
|
876
874
|
disabled: n?.disabled() ?? !1,
|
|
@@ -881,13 +879,13 @@ var Ee = E((e) => {
|
|
|
881
879
|
hasInnerHorizontal: o.getRowCount() > 1,
|
|
882
880
|
hasInnerVertical: o.getColumnCount() > 1
|
|
883
881
|
};
|
|
884
|
-
})(n), [u, d] =
|
|
885
|
-
|
|
882
|
+
})(n), [u, d] = T(Te, Q.Number), g = Ee.includes(u) ? u : Q.Number;
|
|
883
|
+
k(() => {
|
|
886
884
|
let e = r?.tab;
|
|
887
|
-
e && d(e);
|
|
885
|
+
e && Ee.includes(e) && d(e);
|
|
888
886
|
}, [r]);
|
|
889
887
|
let v = l.style.getNumberFormat(), y = typeof v == "number" ? _.resolve(v) : v ?? "General";
|
|
890
|
-
return
|
|
888
|
+
return P(I, {
|
|
891
889
|
square: !0,
|
|
892
890
|
ref: o,
|
|
893
891
|
sx: {
|
|
@@ -901,14 +899,14 @@ var Ee = E((e) => {
|
|
|
901
899
|
},
|
|
902
900
|
...s,
|
|
903
901
|
children: [
|
|
904
|
-
|
|
902
|
+
N(F, {
|
|
905
903
|
sx: {
|
|
906
904
|
flexShrink: 0,
|
|
907
905
|
padding: (e) => e.spacing(1.5, 2)
|
|
908
906
|
},
|
|
909
|
-
children:
|
|
907
|
+
children: N(V, { selection: l })
|
|
910
908
|
}),
|
|
911
|
-
|
|
909
|
+
N(R, {
|
|
912
910
|
value: g,
|
|
913
911
|
onChange: (e, t) => d(t),
|
|
914
912
|
variant: "scrollable",
|
|
@@ -927,12 +925,12 @@ var Ee = E((e) => {
|
|
|
927
925
|
padding: "8px 4px"
|
|
928
926
|
}
|
|
929
927
|
},
|
|
930
|
-
children:
|
|
928
|
+
children: Ee.map((e) => N(L, {
|
|
931
929
|
value: e,
|
|
932
|
-
label:
|
|
930
|
+
label: Oe(c, e)
|
|
933
931
|
}, e))
|
|
934
932
|
}),
|
|
935
|
-
|
|
933
|
+
P(F, {
|
|
936
934
|
sx: {
|
|
937
935
|
flex: "1 1 auto",
|
|
938
936
|
minHeight: 0,
|
|
@@ -940,26 +938,26 @@ var Ee = E((e) => {
|
|
|
940
938
|
padding: (e) => e.spacing(2.5, 2)
|
|
941
939
|
},
|
|
942
940
|
children: [
|
|
943
|
-
g === Q.Number ?
|
|
941
|
+
g === Q.Number ? N(f, {
|
|
944
942
|
hideSample: !0,
|
|
945
943
|
showQuickFormats: !0,
|
|
946
944
|
value: y,
|
|
947
945
|
disabled: l.disabled,
|
|
948
946
|
context: () => l.cell,
|
|
949
947
|
onChange: (e) => {
|
|
950
|
-
l.applyStyle({ numberFormat: e },
|
|
948
|
+
l.applyStyle({ numberFormat: e }, B("op.setNumberFormat"));
|
|
951
949
|
}
|
|
952
950
|
}) : null,
|
|
953
|
-
g === Q.Alignment ?
|
|
954
|
-
g === Q.Font ?
|
|
955
|
-
g === Q.Fill ?
|
|
956
|
-
g === Q.Border ?
|
|
951
|
+
g === Q.Alignment ? N(G, { selection: l }) : null,
|
|
952
|
+
g === Q.Font ? N(ce, { selection: l }) : null,
|
|
953
|
+
g === Q.Fill ? N(m, { selection: p(l) }) : null,
|
|
954
|
+
g === Q.Border ? N(we, { selection: l }) : null
|
|
957
955
|
]
|
|
958
956
|
})
|
|
959
957
|
]
|
|
960
958
|
});
|
|
961
959
|
});
|
|
962
|
-
function
|
|
960
|
+
function Oe(e, t) {
|
|
963
961
|
switch (t) {
|
|
964
962
|
case Q.Number: return e("format.tabNumber");
|
|
965
963
|
case Q.Alignment: return e("format.tabAlignment");
|
|
@@ -969,5 +967,5 @@ function De(e, t) {
|
|
|
969
967
|
default: return t;
|
|
970
968
|
}
|
|
971
969
|
}
|
|
972
|
-
|
|
973
|
-
export {
|
|
970
|
+
De.displayName = "FormatTaskPaneBody";
|
|
971
|
+
export { Te as FORMAT_TAB_KEY, Q as FormatTab, $ as FormatTaskPane, $ as default };
|