@sheetxl/studio-mui 0.8.0-beta.18 → 0.8.0-beta.19
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/{D2ujgcJO_g-Wz6tL.mjs → 3pGM81cqNJ8DDWp_.mjs} +2 -2
- package/browser/esm/{C7BnTVpLGgX_kcmJ.mjs → 8nIjNjh3EYKTlgnw.mjs} +8 -8
- package/browser/esm/{BJcmwuzslRchDgSF.mjs → B0NC2aGu9jgdelTz.mjs} +2 -2
- package/browser/esm/{C7X9krI43CU4eg6-.mjs → B2nWe09MDoBLwo_k.mjs} +1 -1
- package/browser/esm/{DDv_r6PgL9U5-R5y.mjs → B45dW1aZ8s9mufl_.mjs} +2 -2
- package/browser/esm/{1i2GOCzP_uwuwLU5.mjs → B83kgckQsC0aY0NE.mjs} +5 -5
- package/browser/esm/{oBc8AkyrAEssabOC.mjs → B95vnhVq0KnbcA_Y.mjs} +1 -1
- package/browser/esm/{8bZUXEWSZi9k_S1E.mjs → BBbQjMATTPG16Lr9.mjs} +1 -1
- package/browser/esm/{fC6MZtheeHoJmQaQ.mjs → BC0b8N0c-Yenu46_.mjs} +5 -5
- package/browser/esm/{B2a4wwMYmYAKCzxQ.mjs → BCJ3o3M62lsBKbae.mjs} +1 -1
- package/browser/esm/{D5UYA-ocaqXccOz9.mjs → BJY1GNwcHIjXI6Dy.mjs} +1 -1
- package/browser/esm/{D_pfOujnkunwUDXo.mjs → BLZvY9XJL32hg1F-.mjs} +1 -1
- package/browser/esm/{CihxkgnUf8nPi34_.mjs → BMfZqSxbgNWsKjqY.mjs} +2 -2
- package/browser/esm/{DbOR86fbiNhrRKf7.mjs → BQjxD6zW8juryZHL.mjs} +2 -2
- package/browser/esm/{BZR-NXwIGzPYWmXd.mjs → BRfhOI9RpekZBcrO.mjs} +6 -6
- package/browser/esm/{yH10EsR9eo9Zthsc.mjs → BSmY1OUM8_F-moJ0.mjs} +4 -4
- package/browser/esm/{iQrP_vhW_sp4s71r.mjs → BUr5VGHQCYpQeran.mjs} +5 -5
- package/browser/esm/{BBxxJZF2EJ8Ir8C8.mjs → B_Vk87a5g9DxCz2O.mjs} +5 -5
- package/browser/esm/{BoH6LxJaD65sFjEK.mjs → Bece9zSczcJRj6iF.mjs} +2 -2
- package/browser/esm/{B3Nt_WBc1l3GCBgv.mjs → BgxFFejwP2YXqYGy.mjs} +2 -2
- package/browser/esm/{B6vJepS5vmDS-6yI.mjs → BhHlzIhnBJqfHSKP.mjs} +1649 -1554
- package/browser/esm/{C6uAkVUP0yIq5row.mjs → Bik5wGC75z2BvotX.mjs} +3 -3
- package/browser/esm/{Bzmdnbpbcxg0R51k.mjs → BjdZOM-UvDoJaYFo.mjs} +2 -2
- package/browser/esm/{BSCHqmWtrxi7hodH.mjs → Bkw1PteOYKjHz41s.mjs} +3 -3
- package/browser/esm/{BDrrR6bEk1vxHbzj.mjs → BlE9-hSf71ZoAM0M.mjs} +1 -1
- package/browser/esm/{YJgzYYp1xMzxkAHE.mjs → BsBeOKW7EhSZ9E5v.mjs} +4 -4
- package/browser/esm/{DhlfJNOvN7zFLViZ.mjs → Bscb3ZfordY8Cyzo.mjs} +2 -2
- package/browser/esm/{DLal4rukkujtOXW1.mjs → C8FnFcYHBHv7mRsK.mjs} +3 -3
- package/browser/esm/{Djn6orQ4oXLrHTGI.mjs → C8sDMsI-mfPVArSI.mjs} +2 -2
- package/browser/esm/{C7TqRPMpJZbA_OOn.mjs → CDuVmLEi65HzZ-mo.mjs} +2 -2
- package/browser/esm/{CH8ePenim5VvX--K.mjs → CEjud4n-8EggO2Im.mjs} +1 -1
- package/browser/esm/{CB5nX8EbOct6degp.mjs → CLVbEJee8eD3qMJR.mjs} +8 -8
- package/browser/esm/{D9f2rU9s6eWjt1U6.mjs → CMEIC_DYikQRzC9L.mjs} +256 -255
- package/browser/esm/{DqzQr8LRt193aj1o.mjs → CUi2AR-pqVbpTLq4.mjs} +1 -1
- package/browser/esm/{C8nsVSKrp_GHhYr3.mjs → CdFz-uXCDYgv_iOM.mjs} +1 -1
- package/browser/esm/{CDQnDyN5NoiSHowu.mjs → Cmm97cKH5IugcalW.mjs} +1 -1
- package/browser/esm/{BFlxgpwpozp1m6o7.mjs → Cp6H28QXgHRfTJ_n.mjs} +4 -4
- package/browser/esm/{D6S-Dg65OHGNEHcb.mjs → CtJpnIXloxW2qFGC.mjs} +4 -4
- package/browser/esm/{CQMlZxOt24bgmvvv.mjs → CzGACZ7X-3Z7pXxH.mjs} +2 -2
- package/browser/esm/D1EKHirhjR-MmeXo.mjs +8 -0
- package/browser/esm/{CuDRQ-pNBc-ktVy_.mjs → D3mfQHjRbA8iPLtv.mjs} +2 -2
- package/browser/esm/{BPzHePn2CiBErUXC.mjs → D4LGe9Sxrf-egOPN.mjs} +1 -1
- package/browser/esm/{CTvpV8rf9fcWohYU.mjs → D5fCoDA2NoOFViRy.mjs} +4 -4
- package/browser/esm/{C3HntWkKAjnyC3CV.mjs → D9ObD_aKgMWUPN0P.mjs} +4 -4
- package/browser/esm/{Cjy-cHM-DR-Gqk-n.mjs → DApXGOAXNdSZdYbT.mjs} +2 -2
- package/browser/esm/{DG_arYvuGh2bHE-N.mjs → DIC6M937GziE0_9l.mjs} +2 -2
- package/browser/esm/{BHlHoZ7Bg-knm5oa.mjs → DJTesgYNvoQv2Obl.mjs} +4 -4
- package/browser/esm/{lip_SyDs4iBRTs_8.mjs → DM9uGmTSDdyoRyRM.mjs} +3 -3
- package/browser/esm/{ZHTi6N8OUU6QO1QU.mjs → DMWgj1E1kYrTdAnf.mjs} +3 -3
- package/browser/esm/{By3lLqidoNB3DjVD.mjs → DeJenn9MUICppyMl.mjs} +2 -2
- package/browser/esm/{BmLvGcUzmP-znGgq.mjs → DhXTTl8_kMjearig.mjs} +1 -1
- package/browser/esm/Dp2cNfLOjOTs8V8x.mjs +267 -0
- package/browser/esm/{06WRKaJNHc_txDxr.mjs → Dvjjsols1lZ1qITL.mjs} +1 -1
- package/browser/esm/{fYmulvJHp8Wp0wmY.mjs → M-Rp0gM6kZb12Kim.mjs} +1 -1
- package/browser/esm/index.mjs +1074 -299
- package/browser/esm/{DYji4vVp9fnHsk9m.mjs → mBFrzCJis1-EVKL7.mjs} +1 -1
- package/browser/esm/{DXlf0PkvZgV_b6uG.mjs → p4Q_TpZ_s60_L7Ux.mjs} +1 -1
- package/browser/esm/{Cz5qKECCbacDmibP.mjs → s1DZ7iQHOb3R9G7m.mjs} +2 -2
- package/browser/esm/{CM6VmN79n4MRjipP.mjs → v2EnJ1fOZEXqAVlO.mjs} +2 -2
- package/browser/esm/{C2NKwzWjiJFJGukV.mjs → z7Sn4ncaTwiv23Fv.mjs} +4 -4
- package/node/esm/{DSmg7M3yRDDZkUBB.mjs → 9pdLzab-4aEax8pG.mjs} +3 -3
- package/node/esm/{DGv981h_d8G1Z3Zs.mjs → B16pFUEecGy6x7Sf.mjs} +2 -2
- package/node/esm/{DyRNwCwOwz60vRGA.mjs → B47JoJYzEtS6ivoC.mjs} +1 -1
- package/node/esm/{By_evGE-PBrgdKI6.mjs → B90Z94PB2O0Upt5h.mjs} +1 -1
- package/node/esm/{fX-2Y2Fd273TLPO2.mjs → BB5L5Y9qCXXDTqg-.mjs} +1 -1
- package/node/esm/{CpQlurB0oZqjuhgj.mjs → BUzCcr3jpBtj-9vH.mjs} +13 -13
- package/node/esm/{reyCfp4xOOgMNc9U.mjs → BdiSsEIgA0Pvd6bN.mjs} +1 -1
- package/node/esm/{Da-N8ynNfqk6THYD.mjs → BjEZxA3zF89uf47R.mjs} +188 -188
- package/node/esm/{Cs1GzAp4rTyQafpi.mjs → BjwbCQEJ3tllXtIc.mjs} +134 -130
- package/node/esm/{CLEK4zGd0mIKhiKV.mjs → Bkeg-KR5CHgIgCHZ.mjs} +1 -1
- package/node/esm/{oE4HsQTQ_4VVSUwb.mjs → BpJ0H2dpKtg21Mtw.mjs} +3 -3
- package/node/esm/{C7fI-BqM4p4WJS0l.mjs → BulNRuKygH0oLixF.mjs} +1 -1
- package/node/esm/{CFjes3wFNTOeB90c.mjs → CASMs7A6E_qrcIMk.mjs} +1 -1
- package/node/esm/{CBQ1hoazyQvlpJyI.mjs → CDbGB8TtNQhkBXqI.mjs} +1 -1
- package/node/esm/{DVc_bJM9diK0winM.mjs → CF7peiUJfmOOPRFn.mjs} +1 -1
- package/node/esm/{B9duSJ-i0VqTO5_t.mjs → CGZ_p4-_DZzlvhMG.mjs} +2 -2
- package/node/esm/{t1e3-saAZc_bj152.mjs → CHaPiJTvsCR2Z3sC.mjs} +4 -4
- package/node/esm/{DVgkD5LxGRgOyKQ6.mjs → CIAX0QoWY_xslYfv.mjs} +2 -2
- package/node/esm/{JOrOb7X9oZ8Xv7Gx.mjs → CPHJFMyFxjErRLvR.mjs} +2 -2
- package/node/esm/{Bi6LOMeX3-44pU1z.mjs → CY-1AXXWawiEXRDw.mjs} +3 -3
- package/node/esm/{FutOJu4AGdDHpujk.mjs → CYP_F_suVtfwdtBl.mjs} +2 -2
- package/node/esm/{2J7fdwNic7JOS8e6.mjs → ClDMRc2s0BBAKhHL.mjs} +5 -5
- package/node/esm/{DZYhnjts845P5iUY.mjs → D7-QWEykZGrgV_xs.mjs} +2 -2
- package/node/esm/{Djcn2kxMw3dUSbB7.mjs → D9Wle8u7Cs7tigPT.mjs} +4 -4
- package/node/esm/{D4g9aG5XNbSgg-3C.mjs → DCDqfmTkvT0D2Z5h.mjs} +2 -2
- package/node/esm/{CUtSgTUW09Qh72ST.mjs → DGzJYFzo02DBhqYC.mjs} +2 -2
- package/node/esm/DN7uFaCytRrXMJpu.mjs +267 -0
- package/node/esm/{DefzzmrMXN21wmmy.mjs → DSAtnDj1sXUS0LYj.mjs} +1 -1
- package/node/esm/{CIjBJgRnP7WbRBnA.mjs → DV5zGC0IZiv_lqwa.mjs} +1 -1
- package/node/esm/{CqYMLDeBPC2rGTWV.mjs → DhKvwk063hs0qEKD.mjs} +1 -1
- package/node/esm/{DiAOxoMTibKoi4gs.mjs → DiCErpAUUdV9xdwZ.mjs} +1 -1
- package/node/esm/{rLsP_BPGB2QEWTs8.mjs → Dp-aLdsFlu4Aw1Li.mjs} +4 -4
- package/node/esm/{5ifD6QRZEd3huWYb.mjs → DqZ4g3pHAK7bKVvG.mjs} +1 -1
- package/node/esm/{B4sLVPEb397EGucl.mjs → DssxcB0PnN-PgzzK.mjs} +1 -1
- package/node/esm/{CNZKUMbD_hGSw6do.mjs → DzwUDrXp4uuQ6bv0.mjs} +2 -2
- package/node/esm/{CUPV64pU0m9AaOfx.mjs → _gNQ05R589In7vSm.mjs} +3 -3
- package/node/esm/{NoB9LePsgjsq24TO.mjs → e_kM3nD2aaiphEoS.mjs} +2 -2
- package/node/esm/{DIqIt8CBVGmlUOmQ.mjs → i0R7voLYNUjkbop2.mjs} +1 -1
- package/node/esm/index.mjs +4586 -3716
- package/node/esm/{HLmlUPOPJh0q9Uym.mjs → viu5OtK-dXOIQdlG.mjs} +1 -1
- package/package.json +9 -9
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/groups.cmd.json +12 -0
- package/resources/locales/de/ui.msg.json +44 -0
- package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
- package/resources/locales/en/groups.cmd.json +12 -0
- package/resources/locales/en/ui.msg.json +44 -0
- package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
- package/types/src/anomalies/AnomaliesCommands.d.ts +8 -0
- package/types/src/anomalies/AnomaliesMessages.d.ts +30 -0
- package/types/src/anomalies/AnomaliesPlugin.d.ts +9 -2
- package/types/src/anomalies/_source.d.ts +7 -0
- package/types/src/chart/ChartPlugin.d.ts +1 -1
- package/types/src/comments/CommentsPlugin.d.ts +1 -1
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +1 -1
- package/types/src/dataValidation/DataValidationPlugin.d.ts +1 -1
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +1 -1
- package/types/src/format/FormatPlugin.d.ts +1 -6
- package/types/src/index.d.ts +1 -0
- package/types/src/named/NamedPlugin.d.ts +1 -1
- package/types/src/picture/PicturePlugin.d.ts +1 -1
- package/types/src/pivot/PivotPlugin.d.ts +1 -1
- package/types/src/presence/PresenceOverlay.d.ts +14 -0
- package/types/src/presence/PresencePlugin.d.ts +31 -0
- package/types/src/presence/PresenceStrip.d.ts +22 -0
- package/types/src/presence/PresenceTaskPane.d.ts +13 -0
- package/types/src/presence/Timeline.d.ts +29 -0
- package/types/src/presence/index.d.ts +5 -0
- package/types/src/protection/ProtectionPlugin.d.ts +1 -1
- package/types/src/shape/ShapePlugin.d.ts +1 -1
- package/types/src/slicer/SlicerPlugin.d.ts +1 -1
- package/types/src/table/TablePlugin.d.ts +1 -1
- package/browser/esm/UZFY5qdFE4QR1Agm.mjs +0 -212
- package/node/esm/DmjwVOK5INfbJZkW.mjs +0 -212
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.19
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { AutoColorPosition as e, BorderPopupButton as o, ColorPopupButton as l, FormulaField as t, PresetChip as n,
|
|
8
|
-
import { n as S, t as F } from "./
|
|
7
|
+
import { AutoColorPosition as e, BorderPopupButton as o, ColorPopupButton as l, FormulaField as t, PresetChip as n, S as a, _ as r, a as i, b as d, d as s, f as c, g as p, h as u, i as m, l as g, m as h, n as y, p as x, r as C, v as f, x as v, y as b } from "./index.mjs";
|
|
8
|
+
import { n as S, t as F } from "./9pdLzab-4aEax8pG.mjs";
|
|
9
9
|
import { Color as T, CommonUtils as k, ICellStyle as w, ICondition as P, IConditionalFormat as I, IFill as N, IFont as M } from "@sheetxl/sdk";
|
|
10
10
|
import { COLOR_SCALE_PRESETS as B, DATA_BAR_PRESETS as O, ICON_CATALOG as z, IconSetGlyphs as A, NO_CELL_ICON as R, STYLE_PRESETS as D, defaultColorScale as j, defaultDataBar as W, defaultIconSet as $, defaultIconStops as K, getConditionalIconSet as E, iconSetSize as U, resolveIconSetIcons as L, useModelSync as _, withIconOverride as G } from "@sheetxl/react";
|
|
11
11
|
import { DynamicIcon as V, useTranslator as H } from "@sheetxl/utils-react";
|
|
@@ -41,27 +41,27 @@ var ve = new T("transparent"), be = {
|
|
|
41
41
|
lightRedFill: Ce("conditionalFormat.preset.lightRedFill"),
|
|
42
42
|
redText: Ce("conditionalFormat.preset.redText"),
|
|
43
43
|
redBorder: Ce("conditionalFormat.preset.redBorder")
|
|
44
|
-
}, Se = (e) => e ? "string" == typeof e ? e : e.type === N.Type.None ? null : e.color ?? e.foreground ?? null : null, Fe = (e, o) => "auto" === e ? null :
|
|
45
|
-
const { format:
|
|
46
|
-
const o = { ...
|
|
44
|
+
}, Se = (e) => e ? "string" == typeof e ? e : e.type === N.Type.None ? null : e.color ?? e.foreground ?? null : null, Fe = (e, o) => "auto" === e ? null : v(e, o), Te = q((t) => {
|
|
45
|
+
const { format: r, onFormatChange: i, readOnly: d, ...s } = t, c = H(), { workbook: p, schemeLookup: u, themeKey: m, darkMode: g, propsColorPanel: h } = a(), y = r?.font ?? null, x = (y?.weight ?? 400) >= 600, C = y?.style === M.Style.Italic, f = !!y?.underline && y.underline !== M.UnderlineStyle.None, v = !!y?.strike && y.strike !== M.StrikeStyle.None, b = (e) => {
|
|
46
|
+
const o = { ...y };
|
|
47
47
|
for (const [l, t] of Object.entries(e)) void 0 === t ? delete o[l] : o[l] = t;
|
|
48
|
-
const l = { ...
|
|
49
|
-
0 === Object.keys(o).length ? delete l.font : l.font = o,
|
|
50
|
-
}, S = Q(() =>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
]), T = Q(() => Fe(Se(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
const l = { ...r };
|
|
49
|
+
0 === Object.keys(o).length ? delete l.font : l.font = o, i(0 === Object.keys(l).length ? null : l);
|
|
50
|
+
}, S = Q(() => p?.getStyles().getNormal().getFont().getColor(), [p, m]), F = Q(() => Fe(y?.color, p), [
|
|
51
|
+
y?.color,
|
|
52
|
+
p,
|
|
53
|
+
m
|
|
54
|
+
]), T = Q(() => Fe(Se(r?.fill), p), [
|
|
55
|
+
r?.fill,
|
|
56
|
+
p,
|
|
57
|
+
m
|
|
58
58
|
]), k = {
|
|
59
59
|
padding: "4px",
|
|
60
60
|
border: "none",
|
|
61
61
|
borderRadius: 1
|
|
62
62
|
};
|
|
63
63
|
return te(fe, {
|
|
64
|
-
...
|
|
64
|
+
...s,
|
|
65
65
|
children: [te(ne, {
|
|
66
66
|
sx: {
|
|
67
67
|
display: "flex",
|
|
@@ -77,12 +77,12 @@ var ve = new T("transparent"), be = {
|
|
|
77
77
|
flexWrap: "wrap"
|
|
78
78
|
},
|
|
79
79
|
children: D.map((e, o) => {
|
|
80
|
-
const l = Fe(Se(e.style.fill),
|
|
80
|
+
const l = Fe(Se(e.style.fill), p), t = Fe(e.style.font?.color, p), a = e.style.borders ? Fe(Object.values(e.style.borders)[0]?.color, p) : null;
|
|
81
81
|
return le(n, {
|
|
82
82
|
sheet: !0,
|
|
83
|
-
title:
|
|
84
|
-
disabled:
|
|
85
|
-
onClick: () =>
|
|
83
|
+
title: c(be[e.key] ?? e.key),
|
|
84
|
+
disabled: d,
|
|
85
|
+
onClick: () => i(structuredClone(e.style)),
|
|
86
86
|
sx: {
|
|
87
87
|
backgroundColor: l?.toCSS("adaptive") ?? void 0,
|
|
88
88
|
color: t?.toCSS("adaptive") ?? void 0,
|
|
@@ -93,9 +93,9 @@ var ve = new T("transparent"), be = {
|
|
|
93
93
|
}, o);
|
|
94
94
|
})
|
|
95
95
|
}), le(n, {
|
|
96
|
-
title:
|
|
97
|
-
disabled:
|
|
98
|
-
onClick: () =>
|
|
96
|
+
title: c("conditionalFormat.clearStyle"),
|
|
97
|
+
disabled: d || !r,
|
|
98
|
+
onClick: () => i(null),
|
|
99
99
|
sx: {
|
|
100
100
|
color: "text.secondary",
|
|
101
101
|
"&:disabled": { opacity: .4 }
|
|
@@ -116,83 +116,83 @@ var ve = new T("transparent"), be = {
|
|
|
116
116
|
value: "bold",
|
|
117
117
|
size: "small",
|
|
118
118
|
sx: k,
|
|
119
|
-
selected:
|
|
120
|
-
disabled:
|
|
121
|
-
onChange: () => b({ weight:
|
|
119
|
+
selected: x,
|
|
120
|
+
disabled: d,
|
|
121
|
+
onChange: () => b({ weight: x ? void 0 : 700 }),
|
|
122
122
|
children: le(V, { iconKey: "TextBold" })
|
|
123
123
|
}),
|
|
124
124
|
le(he, {
|
|
125
125
|
value: "italic",
|
|
126
126
|
size: "small",
|
|
127
127
|
sx: k,
|
|
128
|
-
selected:
|
|
129
|
-
disabled:
|
|
130
|
-
onChange: () => b({ style:
|
|
128
|
+
selected: C,
|
|
129
|
+
disabled: d,
|
|
130
|
+
onChange: () => b({ style: C ? void 0 : M.Style.Italic }),
|
|
131
131
|
children: le(V, { iconKey: "TextItalic" })
|
|
132
132
|
}),
|
|
133
133
|
le(he, {
|
|
134
134
|
value: "underline",
|
|
135
135
|
size: "small",
|
|
136
136
|
sx: k,
|
|
137
|
-
selected:
|
|
138
|
-
disabled:
|
|
139
|
-
onChange: () => b({ underline:
|
|
137
|
+
selected: f,
|
|
138
|
+
disabled: d,
|
|
139
|
+
onChange: () => b({ underline: f ? void 0 : M.UnderlineStyle.Single }),
|
|
140
140
|
children: le(V, { iconKey: "TextUnderline" })
|
|
141
141
|
}),
|
|
142
142
|
le(he, {
|
|
143
143
|
value: "strike",
|
|
144
144
|
size: "small",
|
|
145
145
|
sx: k,
|
|
146
|
-
selected:
|
|
147
|
-
disabled:
|
|
148
|
-
onChange: () => b({ strike:
|
|
146
|
+
selected: v,
|
|
147
|
+
disabled: d,
|
|
148
|
+
onChange: () => b({ strike: v ? void 0 : M.StrikeStyle.Single }),
|
|
149
149
|
children: le(V, { iconKey: "TextStrike" })
|
|
150
150
|
}),
|
|
151
|
-
|
|
152
|
-
tooltip:
|
|
153
|
-
selectedBorder:
|
|
154
|
-
createBorder: (e) =>
|
|
155
|
-
schemeLookup:
|
|
151
|
+
p && le(o, {
|
|
152
|
+
tooltip: c("conditionalFormat.border"),
|
|
153
|
+
selectedBorder: r?.borders,
|
|
154
|
+
createBorder: (e) => p.getStyles().getNormal().createStyle({ borders: e }).getBorders(),
|
|
155
|
+
schemeLookup: u,
|
|
156
156
|
autoColor: S,
|
|
157
|
-
darkMode:
|
|
158
|
-
disabled:
|
|
157
|
+
darkMode: g,
|
|
158
|
+
disabled: d,
|
|
159
159
|
onSelectBorder: (e) => ((e) => {
|
|
160
|
-
const o = { ...
|
|
161
|
-
e && 0 !== Object.keys(e).length ? o.borders = e : delete o.borders,
|
|
160
|
+
const o = { ...r };
|
|
161
|
+
e && 0 !== Object.keys(e).length ? o.borders = e : delete o.borders, i(0 === Object.keys(o).length ? null : o);
|
|
162
162
|
})(e)
|
|
163
163
|
}),
|
|
164
164
|
le(l, {
|
|
165
165
|
icon: "fill.colored",
|
|
166
|
-
tooltip:
|
|
166
|
+
tooltip: c("conditionalFormat.fillColor"),
|
|
167
167
|
selectedColor: T,
|
|
168
|
-
disabled:
|
|
168
|
+
disabled: d,
|
|
169
169
|
onSelectColor: (e) => ((e) => {
|
|
170
|
-
const o = { ...
|
|
170
|
+
const o = { ...r };
|
|
171
171
|
e ? o.fill = {
|
|
172
172
|
type: N.Type.Solid,
|
|
173
173
|
color: e.toString()
|
|
174
|
-
} : delete o.fill,
|
|
174
|
+
} : delete o.fill, i(0 === Object.keys(o).length ? null : o);
|
|
175
175
|
})(e),
|
|
176
|
-
darkMode:
|
|
176
|
+
darkMode: g,
|
|
177
177
|
propsPanel: {
|
|
178
178
|
disableAlpha: !0,
|
|
179
179
|
autoColor: ve,
|
|
180
180
|
autoColorLabelKey: Ce("color.noFill"),
|
|
181
181
|
autoColorPosition: e.End,
|
|
182
|
-
...
|
|
182
|
+
...h
|
|
183
183
|
}
|
|
184
184
|
}),
|
|
185
185
|
le(l, {
|
|
186
186
|
icon: "text.colored",
|
|
187
|
-
tooltip:
|
|
187
|
+
tooltip: c("conditionalFormat.fontColor"),
|
|
188
188
|
selectedColor: F,
|
|
189
|
-
disabled:
|
|
189
|
+
disabled: d,
|
|
190
190
|
onSelectColor: (e) => b({ color: e ? e.toString() : void 0 }),
|
|
191
|
-
darkMode:
|
|
191
|
+
darkMode: g,
|
|
192
192
|
propsPanel: {
|
|
193
193
|
disableAlpha: !0,
|
|
194
194
|
autoColor: S,
|
|
195
|
-
...
|
|
195
|
+
...h
|
|
196
196
|
}
|
|
197
197
|
})
|
|
198
198
|
]
|
|
@@ -215,14 +215,14 @@ var ke = {
|
|
|
215
215
|
I.ColorStopType.Min,
|
|
216
216
|
I.ColorStopType.Max
|
|
217
217
|
]), Pe = q((e) => {
|
|
218
|
-
const { label: o, stop: n, onStopChange:
|
|
218
|
+
const { label: o, stop: n, onStopChange: r, allowedTypes: d, showColor: s = !1, leading: c, showExclusive: p = !1, readOnly: u, ...m } = e, g = H(), { darkMode: h, toColor: y, propsColorPanel: x } = a(), C = i(), f = n.type ?? I.ColorStopType.Num, v = !we.has(f), b = u || !v, S = f === I.ColorStopType.Formula, F = n.value?.isIFormula ? n.value : null, T = n.color, k = s ? y(T) : null;
|
|
219
219
|
return te(ne, {
|
|
220
220
|
sx: {
|
|
221
221
|
display: "flex",
|
|
222
222
|
alignItems: "center",
|
|
223
223
|
gap: .5
|
|
224
224
|
},
|
|
225
|
-
...
|
|
225
|
+
...m,
|
|
226
226
|
children: [
|
|
227
227
|
void 0 !== o && le(xe, {
|
|
228
228
|
variant: "caption",
|
|
@@ -235,30 +235,30 @@ var ke = {
|
|
|
235
235
|
},
|
|
236
236
|
children: o
|
|
237
237
|
}),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
tooltip:
|
|
238
|
+
c,
|
|
239
|
+
s && le(l, {
|
|
240
|
+
tooltip: g("conditionalFormat.stopColor"),
|
|
241
241
|
selectedColor: k,
|
|
242
|
-
disabled:
|
|
242
|
+
disabled: u,
|
|
243
243
|
onSelectColor: (e) => {
|
|
244
|
-
e &&
|
|
244
|
+
e && r({
|
|
245
245
|
...n,
|
|
246
246
|
color: e.toString()
|
|
247
247
|
});
|
|
248
248
|
},
|
|
249
|
-
darkMode:
|
|
249
|
+
darkMode: h,
|
|
250
250
|
propsPanel: {
|
|
251
251
|
disableAlpha: !0,
|
|
252
|
-
...
|
|
252
|
+
...x
|
|
253
253
|
}
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
p && te(pe, {
|
|
256
256
|
size: "small",
|
|
257
257
|
value: n.exclusive ? "gt" : "gte",
|
|
258
|
-
disabled:
|
|
258
|
+
disabled: u,
|
|
259
259
|
onChange: (e) => {
|
|
260
260
|
const o = { ...n };
|
|
261
|
-
"gt" === e.target.value ? o.exclusive = !0 : delete o.exclusive,
|
|
261
|
+
"gt" === e.target.value ? o.exclusive = !0 : delete o.exclusive, r(o);
|
|
262
262
|
},
|
|
263
263
|
sx: {
|
|
264
264
|
flex: "0 0 auto",
|
|
@@ -274,8 +274,8 @@ var ke = {
|
|
|
274
274
|
}),
|
|
275
275
|
le(pe, {
|
|
276
276
|
size: "small",
|
|
277
|
-
value:
|
|
278
|
-
disabled:
|
|
277
|
+
value: f,
|
|
278
|
+
disabled: u,
|
|
279
279
|
onChange: (e) => ((e) => {
|
|
280
280
|
const o = {
|
|
281
281
|
...n,
|
|
@@ -287,29 +287,29 @@ var ke = {
|
|
|
287
287
|
const e = "string" == typeof o.value ? Number(o.value) : NaN;
|
|
288
288
|
o.value = Number.isFinite(e) ? e : 0;
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
r(o);
|
|
291
291
|
})(e.target.value),
|
|
292
292
|
sx: {
|
|
293
293
|
flex: "1 1 40%",
|
|
294
294
|
minWidth: 0,
|
|
295
295
|
backgroundColor: "background.paper"
|
|
296
296
|
},
|
|
297
|
-
children:
|
|
297
|
+
children: d.map((e) => le(se, {
|
|
298
298
|
value: e,
|
|
299
|
-
children:
|
|
299
|
+
children: g(ke[e])
|
|
300
300
|
}, e))
|
|
301
301
|
}),
|
|
302
302
|
S ? le(t, {
|
|
303
303
|
size: "small",
|
|
304
|
-
home:
|
|
305
|
-
value: F ?
|
|
304
|
+
home: C.home,
|
|
305
|
+
value: F ? C.display(F) : `${n.value ?? ""}`,
|
|
306
306
|
onChangeText: (e) => {
|
|
307
|
-
|
|
307
|
+
r({
|
|
308
308
|
...n,
|
|
309
|
-
value: e.trim().length > 0 ?
|
|
309
|
+
value: e.trim().length > 0 ? C.compile(e) : e
|
|
310
310
|
});
|
|
311
311
|
},
|
|
312
|
-
placeholder:
|
|
312
|
+
placeholder: g("conditionalFormat.enterFormula"),
|
|
313
313
|
disabled: b,
|
|
314
314
|
equals: "bare",
|
|
315
315
|
pickAs: "absolute",
|
|
@@ -324,12 +324,12 @@ var ke = {
|
|
|
324
324
|
}) : le(ge, {
|
|
325
325
|
size: "small",
|
|
326
326
|
type: "number",
|
|
327
|
-
placeholder:
|
|
328
|
-
value:
|
|
327
|
+
placeholder: v ? void 0 : g("conditionalFormat.stopFromData"),
|
|
328
|
+
value: v ? `${n.value ?? ""}` : "",
|
|
329
329
|
disabled: b,
|
|
330
330
|
onChange: (e) => {
|
|
331
331
|
const o = e.target.value;
|
|
332
|
-
|
|
332
|
+
r({
|
|
333
333
|
...n,
|
|
334
334
|
value: "" === o ? 0 : Number(o)
|
|
335
335
|
});
|
|
@@ -356,7 +356,7 @@ var Ie = [
|
|
|
356
356
|
I.ColorStopType.Percentile,
|
|
357
357
|
I.ColorStopType.Formula
|
|
358
358
|
], Ne = q((e) => {
|
|
359
|
-
const { scale: o, onScaleChange: l, readOnly: t, ...r } = e, i = H(), { workbook: d, toColor: s } =
|
|
359
|
+
const { scale: o, onScaleChange: l, readOnly: t, ...r } = e, i = H(), { workbook: d, toColor: s } = a(), c = o.stops ?? [], p = 2 === c.length ? [Ce("conditionalFormat.stop.minimum"), Ce("conditionalFormat.stop.maximum")] : [
|
|
360
360
|
Ce("conditionalFormat.stop.minimum"),
|
|
361
361
|
Ce("conditionalFormat.stop.midpoint"),
|
|
362
362
|
Ce("conditionalFormat.stop.maximum")
|
|
@@ -386,7 +386,7 @@ var Ie = [
|
|
|
386
386
|
sheet: !0,
|
|
387
387
|
disabled: t,
|
|
388
388
|
onClick: () => l(structuredClone(e)),
|
|
389
|
-
children: le(
|
|
389
|
+
children: le(f, { rows: b(e.stops ?? [], u, d) })
|
|
390
390
|
}, o))
|
|
391
391
|
}), te(ye, {
|
|
392
392
|
exclusive: !0,
|
|
@@ -470,11 +470,11 @@ var Me = [
|
|
|
470
470
|
I.ColorStopType.Percentile,
|
|
471
471
|
I.ColorStopType.Formula
|
|
472
472
|
], Oe = "__auto__", ze = q((e) => {
|
|
473
|
-
const { scale: o, onScaleChange: t, readOnly: r, ...i } = e,
|
|
473
|
+
const { scale: o, onScaleChange: t, readOnly: r, ...i } = e, s = H(), { darkMode: c, toColor: p, propsColorPanel: u } = a(), m = o.stops ?? [], g = p(o.color), h = p(o.negativeFillColor), y = p(o.borderColor), x = p(o.negativeBorderColor), C = o.gradient ?? !1, v = (e) => {
|
|
474
474
|
const l = { ...o };
|
|
475
475
|
for (const [o, t] of Object.entries(e)) void 0 === t ? delete l[o] : l[o] = t;
|
|
476
476
|
t(l);
|
|
477
|
-
},
|
|
477
|
+
}, b = { backgroundColor: "background.paper" };
|
|
478
478
|
return te(ne, {
|
|
479
479
|
sx: {
|
|
480
480
|
display: "flex",
|
|
@@ -497,23 +497,23 @@ var Me = [
|
|
|
497
497
|
gap: .5,
|
|
498
498
|
flexWrap: "wrap"
|
|
499
499
|
},
|
|
500
|
-
children: O.filter((e) => (e.gradient ?? !1) ===
|
|
500
|
+
children: O.filter((e) => (e.gradient ?? !1) === C).map((e, o) => le(n, {
|
|
501
501
|
sheet: !0,
|
|
502
502
|
disabled: r,
|
|
503
|
-
onClick: () =>
|
|
503
|
+
onClick: () => v({
|
|
504
504
|
color: e.color,
|
|
505
505
|
gradient: e.gradient,
|
|
506
506
|
borderColor: e.borderColor
|
|
507
507
|
}),
|
|
508
|
-
children: le(
|
|
508
|
+
children: le(f, { rows: d(e, p(e.color)?.toCSS("adaptive") ?? "var(--sxl-color-primary, rgb(33, 115, 70))") })
|
|
509
509
|
}, o))
|
|
510
510
|
}), te(ye, {
|
|
511
511
|
exclusive: !0,
|
|
512
512
|
size: "small",
|
|
513
|
-
value:
|
|
513
|
+
value: C,
|
|
514
514
|
disabled: r,
|
|
515
515
|
onChange: (e, o) => {
|
|
516
|
-
null !== o &&
|
|
516
|
+
null !== o && v({ gradient: !!o || void 0 });
|
|
517
517
|
},
|
|
518
518
|
sx: { flex: "0 0 auto" },
|
|
519
519
|
children: [le(he, {
|
|
@@ -523,7 +523,7 @@ var Me = [
|
|
|
523
523
|
pt: .25,
|
|
524
524
|
pb: .25
|
|
525
525
|
},
|
|
526
|
-
children:
|
|
526
|
+
children: s("conditionalFormat.solidFill")
|
|
527
527
|
}), le(he, {
|
|
528
528
|
value: !0,
|
|
529
529
|
sx: {
|
|
@@ -531,7 +531,7 @@ var Me = [
|
|
|
531
531
|
pt: .25,
|
|
532
532
|
pb: .25
|
|
533
533
|
},
|
|
534
|
-
children:
|
|
534
|
+
children: s("conditionalFormat.gradientFill")
|
|
535
535
|
})]
|
|
536
536
|
})]
|
|
537
537
|
}),
|
|
@@ -540,11 +540,11 @@ var Me = [
|
|
|
540
540
|
size: "small",
|
|
541
541
|
checked: !1 === o.showValue,
|
|
542
542
|
disabled: r,
|
|
543
|
-
onChange: (e) =>
|
|
543
|
+
onChange: (e) => v({ showValue: !e.target.checked && void 0 })
|
|
544
544
|
}),
|
|
545
545
|
label: le(xe, {
|
|
546
546
|
variant: "body2",
|
|
547
|
-
children:
|
|
547
|
+
children: s("conditionalFormat.showBarsOnly")
|
|
548
548
|
})
|
|
549
549
|
}),
|
|
550
550
|
te(ne, {
|
|
@@ -560,30 +560,30 @@ var Me = [
|
|
|
560
560
|
color: "text.secondary",
|
|
561
561
|
flex: "0 0 62px"
|
|
562
562
|
},
|
|
563
|
-
children:
|
|
563
|
+
children: s("conditionalFormat.bar")
|
|
564
564
|
}),
|
|
565
565
|
le(l, {
|
|
566
566
|
icon: "fill.colored",
|
|
567
|
-
tooltip:
|
|
568
|
-
selectedColor:
|
|
567
|
+
tooltip: s("conditionalFormat.barColor"),
|
|
568
|
+
selectedColor: g,
|
|
569
569
|
disabled: r,
|
|
570
|
-
onSelectColor: (e) =>
|
|
571
|
-
darkMode:
|
|
570
|
+
onSelectColor: (e) => v({ color: e ? e.toString() : void 0 }),
|
|
571
|
+
darkMode: c,
|
|
572
572
|
propsPanel: {
|
|
573
573
|
disableAlpha: !0,
|
|
574
|
-
...
|
|
574
|
+
...u
|
|
575
575
|
}
|
|
576
576
|
}),
|
|
577
577
|
le(l, {
|
|
578
578
|
icon: "stroke.colored",
|
|
579
|
-
tooltip:
|
|
580
|
-
selectedColor:
|
|
579
|
+
tooltip: s("conditionalFormat.barBorderColor"),
|
|
580
|
+
selectedColor: y,
|
|
581
581
|
disabled: r,
|
|
582
|
-
onSelectColor: (e) =>
|
|
583
|
-
darkMode:
|
|
582
|
+
onSelectColor: (e) => v({ borderColor: e ? e.toString() : void 0 }),
|
|
583
|
+
darkMode: c,
|
|
584
584
|
propsPanel: {
|
|
585
585
|
disableAlpha: !0,
|
|
586
|
-
...
|
|
586
|
+
...u
|
|
587
587
|
}
|
|
588
588
|
})
|
|
589
589
|
]
|
|
@@ -601,36 +601,36 @@ var Me = [
|
|
|
601
601
|
color: "text.secondary",
|
|
602
602
|
flex: "0 0 62px"
|
|
603
603
|
},
|
|
604
|
-
children:
|
|
604
|
+
children: s("conditionalFormat.negative")
|
|
605
605
|
}),
|
|
606
606
|
le(l, {
|
|
607
607
|
icon: "fill.colored",
|
|
608
|
-
tooltip:
|
|
609
|
-
selectedColor:
|
|
608
|
+
tooltip: s("conditionalFormat.negativeColor"),
|
|
609
|
+
selectedColor: h ?? g,
|
|
610
610
|
disabled: r,
|
|
611
|
-
onSelectColor: (e) =>
|
|
612
|
-
darkMode:
|
|
611
|
+
onSelectColor: (e) => v({ negativeFillColor: e ? e.toString() : void 0 }),
|
|
612
|
+
darkMode: c,
|
|
613
613
|
propsPanel: {
|
|
614
614
|
disableAlpha: !0,
|
|
615
|
-
...
|
|
615
|
+
...u
|
|
616
616
|
}
|
|
617
617
|
}),
|
|
618
618
|
le(l, {
|
|
619
619
|
icon: "stroke.colored",
|
|
620
|
-
tooltip:
|
|
621
|
-
selectedColor:
|
|
620
|
+
tooltip: s("conditionalFormat.negativeBorderColor"),
|
|
621
|
+
selectedColor: x ?? y,
|
|
622
622
|
disabled: r,
|
|
623
|
-
onSelectColor: (e) =>
|
|
624
|
-
darkMode:
|
|
623
|
+
onSelectColor: (e) => v({ negativeBorderColor: e ? e.toString() : void 0 }),
|
|
624
|
+
darkMode: c,
|
|
625
625
|
propsPanel: {
|
|
626
626
|
disableAlpha: !0,
|
|
627
|
-
...
|
|
627
|
+
...u
|
|
628
628
|
}
|
|
629
629
|
}),
|
|
630
630
|
le(n, {
|
|
631
|
-
title:
|
|
631
|
+
title: s("conditionalFormat.sameAsPositive"),
|
|
632
632
|
disabled: r || !o.negativeFillColor && !o.negativeBorderColor,
|
|
633
|
-
onClick: () =>
|
|
633
|
+
onClick: () => v({
|
|
634
634
|
negativeFillColor: void 0,
|
|
635
635
|
negativeBorderColor: void 0
|
|
636
636
|
}),
|
|
@@ -657,27 +657,27 @@ var Me = [
|
|
|
657
657
|
flex: 1,
|
|
658
658
|
minWidth: 0
|
|
659
659
|
},
|
|
660
|
-
children: [le(de, { children:
|
|
661
|
-
label:
|
|
660
|
+
children: [le(de, { children: s("conditionalFormat.axis") }), te(pe, {
|
|
661
|
+
label: s("conditionalFormat.axis"),
|
|
662
662
|
value: o.axisPosition ?? Oe,
|
|
663
663
|
disabled: r,
|
|
664
|
-
sx:
|
|
664
|
+
sx: b,
|
|
665
665
|
onChange: (e) => {
|
|
666
666
|
const o = e.target.value;
|
|
667
|
-
|
|
667
|
+
v({ axisPosition: o === Oe ? void 0 : o });
|
|
668
668
|
},
|
|
669
669
|
children: [
|
|
670
670
|
le(se, {
|
|
671
671
|
value: Oe,
|
|
672
|
-
children:
|
|
672
|
+
children: s("conditionalFormat.automatic")
|
|
673
673
|
}),
|
|
674
674
|
le(se, {
|
|
675
675
|
value: "middle",
|
|
676
|
-
children:
|
|
676
|
+
children: s("conditionalFormat.axisMiddle")
|
|
677
677
|
}),
|
|
678
678
|
le(se, {
|
|
679
679
|
value: "none",
|
|
680
|
-
children:
|
|
680
|
+
children: s("conditionalFormat.axisNone")
|
|
681
681
|
})
|
|
682
682
|
]
|
|
683
683
|
})]
|
|
@@ -687,27 +687,27 @@ var Me = [
|
|
|
687
687
|
flex: 1,
|
|
688
688
|
minWidth: 0
|
|
689
689
|
},
|
|
690
|
-
children: [le(de, { children:
|
|
691
|
-
label:
|
|
690
|
+
children: [le(de, { children: s("conditionalFormat.direction") }), te(pe, {
|
|
691
|
+
label: s("conditionalFormat.direction"),
|
|
692
692
|
value: o.direction ?? Oe,
|
|
693
693
|
disabled: r,
|
|
694
|
-
sx:
|
|
694
|
+
sx: b,
|
|
695
695
|
onChange: (e) => {
|
|
696
696
|
const o = e.target.value;
|
|
697
|
-
|
|
697
|
+
v({ direction: o === Oe ? void 0 : o });
|
|
698
698
|
},
|
|
699
699
|
children: [
|
|
700
700
|
le(se, {
|
|
701
701
|
value: Oe,
|
|
702
|
-
children:
|
|
702
|
+
children: s("conditionalFormat.automatic")
|
|
703
703
|
}),
|
|
704
704
|
le(se, {
|
|
705
705
|
value: "leftToRight",
|
|
706
|
-
children:
|
|
706
|
+
children: s("conditionalFormat.leftToRight")
|
|
707
707
|
}),
|
|
708
708
|
le(se, {
|
|
709
709
|
value: "rightToLeft",
|
|
710
|
-
children:
|
|
710
|
+
children: s("conditionalFormat.rightToLeft")
|
|
711
711
|
})
|
|
712
712
|
]
|
|
713
713
|
})]
|
|
@@ -716,23 +716,23 @@ var Me = [
|
|
|
716
716
|
] }), te(fe, {
|
|
717
717
|
variant: "config",
|
|
718
718
|
children: [le(Pe, {
|
|
719
|
-
label:
|
|
720
|
-
stop:
|
|
719
|
+
label: s("conditionalFormat.stop.minimum"),
|
|
720
|
+
stop: m[0] ?? { type: I.ColorStopType.AutoMin },
|
|
721
721
|
allowedTypes: Me,
|
|
722
722
|
readOnly: r,
|
|
723
723
|
onStopChange: (e) => {
|
|
724
|
-
const o =
|
|
725
|
-
o[0] = e,
|
|
724
|
+
const o = m.slice();
|
|
725
|
+
o[0] = e, v({ stops: o });
|
|
726
726
|
}
|
|
727
727
|
}), le(Pe, {
|
|
728
|
-
label:
|
|
729
|
-
stop:
|
|
728
|
+
label: s("conditionalFormat.stop.maximum"),
|
|
729
|
+
stop: m[1] ?? { type: I.ColorStopType.AutoMax },
|
|
730
730
|
allowedTypes: Be,
|
|
731
731
|
readOnly: r,
|
|
732
732
|
onStopChange: (e) => {
|
|
733
|
-
const o =
|
|
733
|
+
const o = m.slice();
|
|
734
734
|
for (; o.length < 2;) o.push({ type: I.ColorStopType.AutoMax });
|
|
735
|
-
o[1] = e,
|
|
735
|
+
o[1] = e, v({ stops: o });
|
|
736
736
|
}
|
|
737
737
|
})]
|
|
738
738
|
})]
|
|
@@ -781,7 +781,7 @@ var Ae = Ce("conditionalFormat.noCellIcon"), Re = Ce("conditionalFormat.cellIcon
|
|
|
781
781
|
var r, i;
|
|
782
782
|
return le(n, {
|
|
783
783
|
sheet: !0,
|
|
784
|
-
title:
|
|
784
|
+
title: x(t, e.spec),
|
|
785
785
|
"aria-pressed": a,
|
|
786
786
|
sx: {
|
|
787
787
|
...je,
|
|
@@ -835,20 +835,20 @@ var Ke = [
|
|
|
835
835
|
I.ColorStopType.Percentile,
|
|
836
836
|
I.ColorStopType.Formula
|
|
837
837
|
], Ee = q((e) => {
|
|
838
|
-
const { scale: o, onScaleChange: l, readOnly: t, ...n } = e, a = H(), r = o.iconSet ?? w.IconSet.TrafficLights3, i = 0 === E(r).length, d = o.stops ?? [],
|
|
838
|
+
const { scale: o, onScaleChange: l, readOnly: t, ...n } = e, a = H(), r = o.iconSet ?? w.IconSet.TrafficLights3, i = 0 === E(r).length, d = o.stops ?? [], p = d.length, u = L(o), m = (e) => {
|
|
839
839
|
const t = { ...o };
|
|
840
840
|
for (const [o, l] of Object.entries(e)) void 0 === l ? delete t[o] : t[o] = l;
|
|
841
841
|
l(t);
|
|
842
|
-
},
|
|
843
|
-
const { closeFloat: o } = e, l = le(
|
|
844
|
-
groups:
|
|
842
|
+
}, g = J((e) => {
|
|
843
|
+
const { closeFloat: o } = e, l = le(c, {
|
|
844
|
+
groups: s,
|
|
845
845
|
disabled: t,
|
|
846
846
|
onPick: (e) => {
|
|
847
847
|
o?.(), e.type === I.ScaleType.IconSet && e.iconSet && ((e) => {
|
|
848
848
|
if (e === r) return;
|
|
849
849
|
const o = U(e);
|
|
850
850
|
let l = d;
|
|
851
|
-
o !== d.length && (l = K(o)),
|
|
851
|
+
o !== d.length && (l = K(o)), m({
|
|
852
852
|
iconSet: e,
|
|
853
853
|
stops: l,
|
|
854
854
|
icon: void 0
|
|
@@ -860,7 +860,7 @@ var Ke = [
|
|
|
860
860
|
...e,
|
|
861
861
|
children: l
|
|
862
862
|
});
|
|
863
|
-
}, [t, o]),
|
|
863
|
+
}, [t, o]), h = k.camelToPrettyCase(r);
|
|
864
864
|
return te(ne, {
|
|
865
865
|
sx: {
|
|
866
866
|
display: "flex",
|
|
@@ -878,8 +878,8 @@ var Ke = [
|
|
|
878
878
|
children: le(Z, {
|
|
879
879
|
outlined: !0,
|
|
880
880
|
disabled: t,
|
|
881
|
-
label:
|
|
882
|
-
tooltip:
|
|
881
|
+
label: h,
|
|
882
|
+
tooltip: h,
|
|
883
883
|
icon: le(ne, {
|
|
884
884
|
sx: {
|
|
885
885
|
width: "82px",
|
|
@@ -889,7 +889,7 @@ var Ke = [
|
|
|
889
889
|
children: i ? le(xe, {
|
|
890
890
|
variant: "caption",
|
|
891
891
|
noWrap: !0,
|
|
892
|
-
children:
|
|
892
|
+
children: h
|
|
893
893
|
}) : le(A, {
|
|
894
894
|
icons: E(r),
|
|
895
895
|
order: "descending",
|
|
@@ -897,7 +897,7 @@ var Ke = [
|
|
|
897
897
|
gap: 3
|
|
898
898
|
})
|
|
899
899
|
}),
|
|
900
|
-
renderPopupPanel:
|
|
900
|
+
renderPopupPanel: g
|
|
901
901
|
})
|
|
902
902
|
}),
|
|
903
903
|
i && le(xe, {
|
|
@@ -915,7 +915,7 @@ var Ke = [
|
|
|
915
915
|
size: "small",
|
|
916
916
|
checked: !1 === o.showValue,
|
|
917
917
|
disabled: t,
|
|
918
|
-
onChange: (e) =>
|
|
918
|
+
onChange: (e) => m({ showValue: !e.target.checked && void 0 })
|
|
919
919
|
}),
|
|
920
920
|
label: le(xe, {
|
|
921
921
|
variant: "body2",
|
|
@@ -926,7 +926,7 @@ var Ke = [
|
|
|
926
926
|
size: "small",
|
|
927
927
|
checked: o.reverse ?? !1,
|
|
928
928
|
disabled: t,
|
|
929
|
-
onChange: (e) =>
|
|
929
|
+
onChange: (e) => m({ reverse: !!e.target.checked || void 0 })
|
|
930
930
|
}),
|
|
931
931
|
label: le(xe, {
|
|
932
932
|
variant: "body2",
|
|
@@ -937,20 +937,20 @@ var Ke = [
|
|
|
937
937
|
] }), le(fe, {
|
|
938
938
|
variant: "config",
|
|
939
939
|
children: d.map((e, n) => {
|
|
940
|
-
const a = o.reverse ?
|
|
940
|
+
const a = o.reverse ? p - 1 - n : n;
|
|
941
941
|
return le(Pe, {
|
|
942
942
|
stop: e,
|
|
943
943
|
allowedTypes: Ke,
|
|
944
944
|
showExclusive: !0,
|
|
945
945
|
readOnly: t || 0 === n,
|
|
946
946
|
leading: le($e, {
|
|
947
|
-
icon:
|
|
947
|
+
icon: u[n] ?? null,
|
|
948
948
|
disabled: t || i,
|
|
949
949
|
onPick: (e) => l(G(o, a, e))
|
|
950
950
|
}),
|
|
951
951
|
onStopChange: (e) => {
|
|
952
952
|
const o = d.slice();
|
|
953
|
-
o[n] = e,
|
|
953
|
+
o[n] = e, m({ stops: o });
|
|
954
954
|
}
|
|
955
955
|
}, n);
|
|
956
956
|
})
|
|
@@ -958,25 +958,25 @@ var Ke = [
|
|
|
958
958
|
});
|
|
959
959
|
});
|
|
960
960
|
Ee.displayName = "IconSetRulePanel";
|
|
961
|
-
var Ue = (e, o, l) =>
|
|
961
|
+
var Ue = (e, o, l) => v(e, o)?.toCSS("adaptive") ?? l, Le = (e, o, l) => {
|
|
962
962
|
if (!e) return l;
|
|
963
963
|
if ("string" == typeof e) return Ue(e, o, l);
|
|
964
964
|
if (e.type === N.Type.None) return l;
|
|
965
965
|
const t = e, n = e;
|
|
966
966
|
return Ue(n.foreground ?? t.color ?? n.background, o, l);
|
|
967
967
|
}, _e = q((e) => {
|
|
968
|
-
const { conditionalFormat: o, size: l = 28, ...t } = e, { workbook:
|
|
968
|
+
const { conditionalFormat: o, size: l = 28, ...t } = e, { workbook: i, themeKey: s } = a();
|
|
969
969
|
_(o, "onAnyChange");
|
|
970
|
-
const
|
|
970
|
+
const c = o.getScale(), m = o.getStyle(), g = Q(() => {
|
|
971
971
|
try {
|
|
972
|
-
return
|
|
972
|
+
return i?.getStyles().getNormal().getFont().toCSS("adaptive") ?? {};
|
|
973
973
|
} catch {
|
|
974
974
|
return {};
|
|
975
975
|
}
|
|
976
|
-
}, [
|
|
977
|
-
if (
|
|
978
|
-
if (
|
|
979
|
-
if (
|
|
976
|
+
}, [i, s]), y = Q(() => {
|
|
977
|
+
if (c?.type === I.ScaleType.ColorScale) return le(f, { rows: b(c.stops ?? [], u, i) });
|
|
978
|
+
if (c?.type === I.ScaleType.DataBar) return le(f, { rows: d(c, Ue(c.color, i, h), c.borderColor ? Ue(c.borderColor, i, h) : void 0) });
|
|
979
|
+
if (c?.type === I.ScaleType.IconSet) return le(ne, {
|
|
980
980
|
sx: {
|
|
981
981
|
display: "flex",
|
|
982
982
|
alignItems: "center",
|
|
@@ -986,13 +986,13 @@ var Ue = (e, o, l) => i(e, o)?.toCSS("adaptive") ?? l, Le = (e, o, l) => {
|
|
|
986
986
|
px: .5
|
|
987
987
|
},
|
|
988
988
|
children: le(A, {
|
|
989
|
-
icons: L(
|
|
989
|
+
icons: L(c),
|
|
990
990
|
order: "descending",
|
|
991
991
|
size: 14,
|
|
992
992
|
gap: 3
|
|
993
993
|
})
|
|
994
994
|
});
|
|
995
|
-
const e =
|
|
995
|
+
const e = m?.font, o = e?.underline && e.underline !== M.UnderlineStyle.None;
|
|
996
996
|
return le(ne, {
|
|
997
997
|
sx: {
|
|
998
998
|
width: "100%",
|
|
@@ -1000,26 +1000,26 @@ var Ue = (e, o, l) => i(e, o)?.toCSS("adaptive") ?? l, Le = (e, o, l) => {
|
|
|
1000
1000
|
display: "flex",
|
|
1001
1001
|
alignItems: "center",
|
|
1002
1002
|
justifyContent: "center",
|
|
1003
|
-
...
|
|
1004
|
-
backgroundColor: Le(
|
|
1005
|
-
...e?.color && "auto" !== e.color ? { color: Ue(e.color,
|
|
1003
|
+
...g,
|
|
1004
|
+
backgroundColor: Le(m?.fill, i, "transparent"),
|
|
1005
|
+
...e?.color && "auto" !== e.color ? { color: Ue(e.color, i, r) } : null,
|
|
1006
1006
|
...e?.weight ? { fontWeight: e.weight } : null,
|
|
1007
1007
|
...e?.style ? { fontStyle: e.style } : null,
|
|
1008
1008
|
textDecoration: [o ? "underline" : "", e?.strike ? "line-through" : ""].join(" ").trim() || "none",
|
|
1009
1009
|
fontSize: `${Math.round(.5 * l)}px`,
|
|
1010
1010
|
lineHeight: 1,
|
|
1011
|
-
outline:
|
|
1011
|
+
outline: m?.borders ? `1px solid ${Ue(Object.values(m.borders)[0]?.color, i, p)}` : void 0,
|
|
1012
1012
|
outlineOffset: "-3px"
|
|
1013
1013
|
},
|
|
1014
1014
|
children: "Aa"
|
|
1015
1015
|
});
|
|
1016
1016
|
}, [
|
|
1017
|
-
d,
|
|
1018
|
-
s,
|
|
1019
|
-
l,
|
|
1020
1017
|
c,
|
|
1021
|
-
|
|
1022
|
-
|
|
1018
|
+
m,
|
|
1019
|
+
l,
|
|
1020
|
+
g,
|
|
1021
|
+
i,
|
|
1022
|
+
s
|
|
1023
1023
|
]);
|
|
1024
1024
|
return le(n, {
|
|
1025
1025
|
sheet: !0,
|
|
@@ -1030,7 +1030,7 @@ var Ue = (e, o, l) => i(e, o)?.toCSS("adaptive") ?? l, Le = (e, o, l) => {
|
|
|
1030
1030
|
height: `${l}px`
|
|
1031
1031
|
},
|
|
1032
1032
|
...t,
|
|
1033
|
-
children:
|
|
1033
|
+
children: y
|
|
1034
1034
|
});
|
|
1035
1035
|
});
|
|
1036
1036
|
_e.displayName = "RulePreview";
|
|
@@ -1047,11 +1047,11 @@ var Ge = (e, o) => {
|
|
|
1047
1047
|
}, He = q((e) => {
|
|
1048
1048
|
const { conditionalFormat: o } = e, l = H();
|
|
1049
1049
|
_(o, "onAnyChange");
|
|
1050
|
-
const t = o.getScale(), n = o.getCondition(), a = o.getStyle(), r = o.isProtected(), i = t?.type ?? "classic",
|
|
1050
|
+
const t = o.getScale(), n = o.getCondition(), a = o.getStyle(), r = o.isProtected(), i = t?.type ?? "classic", d = X({ scales: {} }), s = (e) => {
|
|
1051
1051
|
o.update({ scale: e });
|
|
1052
|
-
},
|
|
1052
|
+
}, c = te(ce, {
|
|
1053
1053
|
tabIndex: 0,
|
|
1054
|
-
className:
|
|
1054
|
+
className: g["editor-panel"],
|
|
1055
1055
|
sx: {
|
|
1056
1056
|
gap: (e) => e.spacing(1),
|
|
1057
1057
|
paddingTop: (e) => e.spacing(1.25),
|
|
@@ -1097,16 +1097,16 @@ var Ge = (e, o) => {
|
|
|
1097
1097
|
value: i,
|
|
1098
1098
|
onChange: (e, l) => {
|
|
1099
1099
|
r || ((e) => {
|
|
1100
|
-
if (e !== i) if ("classic" === i ? (
|
|
1101
|
-
condition:
|
|
1100
|
+
if (e !== i) if ("classic" === i ? (d.current.condition = n?.toJSON() ?? null, d.current.style = a) : t && (d.current.scales[t.type] = t), "classic" === e) o.update({
|
|
1101
|
+
condition: d.current.condition ?? {
|
|
1102
1102
|
operator: P.BuiltInOperatorNames.Between,
|
|
1103
1103
|
param: null
|
|
1104
1104
|
},
|
|
1105
|
-
style:
|
|
1105
|
+
style: d.current.style ?? null,
|
|
1106
1106
|
scale: null
|
|
1107
1107
|
});
|
|
1108
1108
|
else {
|
|
1109
|
-
const l =
|
|
1109
|
+
const l = d.current.scales[e] ?? (e === I.ScaleType.ColorScale ? j() : e === I.ScaleType.DataBar ? W() : $());
|
|
1110
1110
|
o.update({
|
|
1111
1111
|
scale: l,
|
|
1112
1112
|
condition: null,
|
|
@@ -1138,9 +1138,9 @@ var Ge = (e, o) => {
|
|
|
1138
1138
|
format: a,
|
|
1139
1139
|
readOnly: r,
|
|
1140
1140
|
onFormatChange: (e) => o.update({ style: e })
|
|
1141
|
-
}), le(
|
|
1141
|
+
}), le(y, {
|
|
1142
1142
|
sx: {
|
|
1143
|
-
...
|
|
1143
|
+
...C,
|
|
1144
1144
|
p: 2,
|
|
1145
1145
|
pb: 1
|
|
1146
1146
|
},
|
|
@@ -1152,17 +1152,17 @@ var Ge = (e, o) => {
|
|
|
1152
1152
|
})] }),
|
|
1153
1153
|
t?.type === I.ScaleType.ColorScale && le(Ne, {
|
|
1154
1154
|
scale: t,
|
|
1155
|
-
onScaleChange:
|
|
1155
|
+
onScaleChange: s,
|
|
1156
1156
|
readOnly: r
|
|
1157
1157
|
}),
|
|
1158
1158
|
t?.type === I.ScaleType.DataBar && le(ze, {
|
|
1159
1159
|
scale: t,
|
|
1160
|
-
onScaleChange:
|
|
1160
|
+
onScaleChange: s,
|
|
1161
1161
|
readOnly: r
|
|
1162
1162
|
}),
|
|
1163
1163
|
t?.type === I.ScaleType.IconSet && le(Ee, {
|
|
1164
1164
|
scale: t,
|
|
1165
|
-
onScaleChange:
|
|
1165
|
+
onScaleChange: s,
|
|
1166
1166
|
readOnly: r
|
|
1167
1167
|
}),
|
|
1168
1168
|
"classic" === i && le(ne, {
|
|
@@ -1186,7 +1186,7 @@ var Ge = (e, o) => {
|
|
|
1186
1186
|
});
|
|
1187
1187
|
return le(m.Provider, {
|
|
1188
1188
|
value: o,
|
|
1189
|
-
children:
|
|
1189
|
+
children: c
|
|
1190
1190
|
});
|
|
1191
1191
|
});
|
|
1192
1192
|
He.displayName = "ConditionalFormatEditorPanel";
|