@sheetxl/studio-mui 0.8.0-beta.15 → 0.8.0-beta.17
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/LICENSE.md +17 -7
- package/browser/esm/{DJVpra0HoPH-4P7P.mjs → 0FLmtunmoRFjO-dk.mjs} +3 -3
- package/browser/esm/{6SL2j-85OXrKJNZ5.mjs → B2LvYLt27hzoarA9.mjs} +1807 -1200
- package/browser/esm/{D90Bb0GPEwqYkf6R.mjs → BBGsto_-YGhTouc9.mjs} +804 -713
- package/browser/esm/{BR51amBhaaHPBhpd.mjs → BEIcp6BzAg3H6JBB.mjs} +3 -3
- package/browser/esm/{EFtp_C3sBnP3Nrns.mjs → BFN88LECqMerqLYN.mjs} +7 -7
- package/browser/esm/{ghfcAaGu2CuZGdhi.mjs → BGNhe08mdWf8dIuk.mjs} +34 -33
- package/browser/esm/BNfIFd07bhGqs-U9.mjs +235 -0
- package/browser/esm/{CcJHwg-rLMcCymSD.mjs → BTb_Djaoxz3G27t-.mjs} +6 -6
- package/browser/esm/{Cl_OUigCV04_zrRy.mjs → BXhWCOPioL48V_9k.mjs} +2 -2
- package/browser/esm/{DsM-NpB32hloRRR8.mjs → Bh1YkrKuSZs-xdlw.mjs} +3 -3
- package/browser/esm/{CV-q-xCHVuNFhqEF.mjs → BkABsPS9qbyYS2i7.mjs} +2 -2
- package/browser/esm/{Buzx8_zQYPX4DR7v.mjs → BnLdmQ91UIGs0zyR.mjs} +2 -2
- package/browser/esm/BnMZSJdWZzdK-AXs.mjs +119 -0
- package/browser/esm/BoXCzcrUFER3B585.mjs +225 -0
- package/browser/esm/{BNas8wZuvrN45dRi.mjs → BxHaU8-LCw4IHrDn.mjs} +2 -2
- package/browser/esm/C2ZbV5cXpGPYeqM1.mjs +106 -0
- package/browser/esm/C8kveDS4xm6D2Aaq.mjs +294 -0
- package/browser/esm/{OHvsc940xI-m_8cc.mjs → CHm8-sLarqD1--If.mjs} +2 -2
- package/browser/esm/{DOWfcHx0MO0J50de.mjs → CMIM0wPs_KvfwLEl.mjs} +92 -87
- package/browser/esm/{DY_EGsyx-zNiJS_0.mjs → CP-c6sUINCv0Nf4P.mjs} +5 -5
- package/browser/esm/{BCDAnHFMvOd9XS8K.mjs → CaI0Mfu6ECDIzCpr.mjs} +3 -3
- package/browser/esm/{Bvq5aZyp5E79JB-s.mjs → Cb3HSSD7snyRPNh8.mjs} +2 -2
- package/browser/esm/{BsAoK_t2sn8IHtAO.mjs → Cf855AHLcB7WuFr3.mjs} +3 -3
- package/browser/esm/{Bqba-3J9i8HsmusR.mjs → ChORBNItvZW0e8Nb.mjs} +2 -2
- package/browser/esm/{DfI4-5XM6AbILSti.mjs → CmMD76_yBG4xmsEr.mjs} +4 -4
- package/browser/esm/{idh3Y0jksygPSI3A.mjs → CuysyoZ-rmDHwaJJ.mjs} +2 -2
- package/browser/esm/{DMDi2lOps0veJKsM.mjs → Cvbms6f8QMP1ubyI.mjs} +3 -3
- package/browser/esm/{DKkKac2vbeui2lDy.mjs → CvzzESAZRMWQ4cGq.mjs} +6 -6
- package/browser/esm/{DFAphWcDUw-gVtAl.mjs → D078ssKRI39FdHNq.mjs} +3 -3
- package/browser/esm/{BvpzsprI7cmVLuQn.mjs → D1_8p15KJ7DSZEis.mjs} +3 -3
- package/browser/esm/{Dz20q7S5vmDWlO0p.mjs → D2Kz08pq5zPz2n3y.mjs} +2 -2
- package/browser/esm/{BojGnpAWoIm5yCd8.mjs → D4FRExfK7RsdS08S.mjs} +2 -2
- package/browser/esm/{CJWnWqGPw17cp9P3.mjs → D9ija-5d57x-qUQv.mjs} +2 -2
- package/browser/esm/{DAYPqhHN3aQ2StjU.mjs → DGkQsCJP29nZteu8.mjs} +14 -14
- package/browser/esm/{DR9y7k4jB7stGPaZ.mjs → DK39s_Fn9M22RfJm.mjs} +3 -3
- package/browser/esm/{CutWdrVA-c3x8IkL.mjs → DL0r5MrPx8CkL_r_.mjs} +5 -4
- package/browser/esm/{IlX2PgLxvyTQu4Fh.mjs → DQjJFUPHg_aU2BDi.mjs} +5 -5
- package/browser/esm/{OmA1ClZ36ZMFrZe7.mjs → DcUtMgA17fh_UJlQ.mjs} +2 -2
- package/browser/esm/{BfPTOOKhwUojRTef.mjs → Dd6iR6EeV81idc-J.mjs} +13 -9
- package/browser/esm/{DLe9DT0DSurLSgiQ.mjs → Dd8j9U2Vlvrue2LA.mjs} +2 -2
- package/browser/esm/{BkxJY_YjMAEvhmuy.mjs → DmBu6kgMNT26tmsZ.mjs} +4 -4
- package/browser/esm/{DpAlQza0e5h3GGHC.mjs → DrtEkQTJM7oPvC9v.mjs} +3 -3
- package/browser/esm/DwiKIdqmaBk2pTBp.mjs +973 -0
- package/browser/esm/{C67SLDHwhVlVIMo0.mjs → Dx0ymWD1uI_Q63eZ.mjs} +3 -3
- package/browser/esm/{Ci74yk0whfoAP1TL.mjs → DxFw-07oIjr7GRb3.mjs} +2 -2
- package/browser/esm/{BH4eDAxZdwheO7d_.mjs → GqSAEzE_2tOJlvNG.mjs} +3 -3
- package/browser/esm/{By1IJOkvZJSlXs5f.mjs → JqMZ95e5lhq09vm6.mjs} +3 -3
- package/browser/esm/{DzATG8XMcG6mmYbx.mjs → LaC0D0C9yJ8y_l6X.mjs} +9 -9
- package/browser/esm/{BYnzaHXySiV-sc6w.mjs → NQzIcNkm0QxNuzx9.mjs} +2 -2
- package/browser/esm/{DYDnkmllpYTwfWir.mjs → W5Rvml-3G4XekwoR.mjs} +4 -4
- package/browser/esm/_PlChb18jQMPAKJX.mjs +360 -0
- package/browser/esm/{BWdpv2xf6GCyd4Te.mjs → cNsbq0TIia7SdBHP.mjs} +5 -5
- package/browser/esm/{Cbkg5y4fYjLylYHF.mjs → fSCwNKAcSc0mr2Ec.mjs} +2 -2
- package/browser/esm/g_bvg4HpyaF6f_JY.mjs +424 -0
- package/browser/esm/index.mjs +278 -277
- package/browser/esm/{C8tci3dfo5lzeoK-.mjs → mP32LfcEodsaGDPi.mjs} +6 -6
- package/browser/esm/{BvbN9V67wFhTfq1-.mjs → sjJ2Yb_cf_KL--Cl.mjs} +3 -3
- package/licenses/dependencies.txt +33 -33
- package/node/esm/{DybPyX8U-EqXKarV.mjs → 5Kkr-d9gc7GsfmI5.mjs} +2 -2
- package/node/esm/B6YmbuWU-fHrjOnB.mjs +106 -0
- package/node/esm/{DwA7rfXJgzoNvjax.mjs → BGWb71anMM4S4UTg.mjs} +8 -8
- package/node/esm/{C4eVfVm_Omyt6NbE.mjs → BINV_bzMi8YLqzor.mjs} +12 -12
- package/node/esm/{DGtbmp72kfRXLtDu.mjs → BWl0RjNZfoJvRX_2.mjs} +81 -80
- package/node/esm/{-Adgw5-ltK-rfp33.mjs → BiVdQ27eA1Rs9liu.mjs} +2 -2
- package/node/esm/{CkW8xNdW45Xg7jy7.mjs → Bp6WSG8tmXefxSlk.mjs} +3 -3
- package/node/esm/BrHbeFtSmaPq19cu.mjs +224 -0
- package/node/esm/BySbwlaepgugcINA.mjs +972 -0
- package/node/esm/{q2Byx8RdDnHk8YyG.mjs → BzLnWJ1JhLnookTH.mjs} +2 -2
- package/node/esm/{Bg3Yu66oJr6mNvAR.mjs → C-Y0ELSBNT5h6V0l.mjs} +3 -3
- package/node/esm/{TgwnKYh-WPxEgmyr.mjs → CA2iwgwOkAwRJU9j.mjs} +2 -2
- package/node/esm/{CzKFdVrPSDYOUdWI.mjs → CCy_wcDWd9xbQnyM.mjs} +2 -2
- package/node/esm/{D9Ga7FFJDOO3Dpfu.mjs → CD-S0_rfDY5u82_A.mjs} +2 -2
- package/node/esm/{Cx4tBEsm3SjAafcw.mjs → CQd5k9d0BWpU8yCQ.mjs} +2 -2
- package/node/esm/{BZK6UksX7r-GgRms.mjs → Cb0TicO5Utg9e5Qy.mjs} +2 -2
- package/node/esm/{DOuASwH2Lf83hMLe.mjs → ClwmPxZc7Uh4nRcr.mjs} +2 -2
- package/node/esm/{dUUbrmGMCILl8EOr.mjs → CyxhIZwqwx_Kt70P.mjs} +2 -2
- package/node/esm/D1XvISMVj1HimOTS.mjs +425 -0
- package/node/esm/{B26ot2vO6Hd47uH0.mjs → D2ZUCui3Xosjj66H.mjs} +2 -2
- package/node/esm/{BaFRVcYZjcLoMQtk.mjs → D71TbUFABfTixyiQ.mjs} +7 -7
- package/node/esm/{ISBEql8s7AnELTpd.mjs → D7__y1LhVOR38yxz.mjs} +2 -2
- package/node/esm/{Ca31PUiJBGowHeob.mjs → D9jTg0iWTubkisDB.mjs} +3 -3
- package/node/esm/{5etzEfk-28CCELyT.mjs → DHiJ5D_q7YVsClMf.mjs} +3 -3
- package/node/esm/{BxIyViNSP0STSrfA.mjs → DJuEU0TbZXyTnThP.mjs} +3 -3
- package/node/esm/{D_JpopAVQopM26cb.mjs → DMfK0wa8UHeJyxii.mjs} +603 -514
- package/node/esm/{CFi_Yls-gurU_CX3.mjs → DN2KKVrC1ye0mldi.mjs} +2 -2
- package/node/esm/{HlNuwtpYoOARa894.mjs → DYRV7b1ZSbxrjcuA.mjs} +2 -2
- package/node/esm/Dm-skjfQUaumyQPp.mjs +118 -0
- package/node/esm/{jGsHbOHP90nnx_hJ.mjs → DvN4Z2Hx4Es0sdaK.mjs} +16 -15
- package/node/esm/{CORxK68HpwPUYA6O.mjs → Jp--thwzf0FSnHTH.mjs} +2 -2
- package/node/esm/{BKCNFVrdc_gTnOoS.mjs → a69xG_vSg2OC9_22.mjs} +2 -2
- package/node/esm/{CX13ASkhdJ0ZSAY4.mjs → akKdwInE4KLNjHQu.mjs} +3 -3
- package/node/esm/axzlGUKK8euccdja.mjs +294 -0
- package/node/esm/index.mjs +3391 -2778
- package/node/esm/{B7vbn_dO_cZnGyGM.mjs → lhMHEjzlz63h_qU0.mjs} +3 -3
- package/node/esm/{CexPhV2NPh5ZGHus.mjs → r8bpi-MSpulvmozZ.mjs} +2 -2
- package/node/esm/{BFv2GzY6NjmJggAg.mjs → sHdUrEwlYxyLkkL6.mjs} +3 -3
- package/package.json +10 -10
- package/resources/locales/de/groups.cmd.json +3 -0
- package/resources/locales/de/ui.msg.json +41 -0
- package/resources/locales/en/groups.cmd.json +3 -0
- package/resources/locales/en/ui.msg.json +41 -0
- package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
- package/types/src/command/index.d.ts +1 -0
- package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
- package/types/src/filter/PivotMenu.d.ts +31 -0
- package/types/src/filter/index.d.ts +1 -0
- package/types/src/pivot/PivotChipMenu.d.ts +10 -0
- package/types/src/pivot/PivotPlugin.d.ts +3 -0
- package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
- package/types/src/pivot/PivotTableHeader.d.ts +12 -0
- package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
- package/types/src/pivot/_pivotSource.d.ts +7 -0
- package/types/src/table/_drawStyleSwatch.d.ts +25 -0
- package/types/src/workbook/DefaultRenderers.d.ts +10 -4
- package/browser/esm/C4ir9dn7q0RUoOm_.mjs +0 -319
- package/browser/esm/DEUzUShfyJLvgd6_.mjs +0 -1379
- package/browser/esm/xe1B8ohea8qfZlFg.mjs +0 -582
- package/node/esm/CKtnUYKjsTf7dYKS.mjs +0 -318
- package/node/esm/vf5X26EJO7Q1b8Ln.mjs +0 -1379
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { n as e } from "./
|
|
7
|
+
import { n as e } from "./W5Rvml-3G4XekwoR.mjs";
|
|
8
8
|
import { InputField as t } from "./index.mjs";
|
|
9
9
|
import { useReferenceMode as n } from "@sheetxl/react";
|
|
10
10
|
import { useCallbackRef as r, useTranslator as i } from "@sheetxl/utils-react";
|
|
@@ -1,14 +1,14 @@
|
|
|
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.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
8
|
-
import { n as t } from "./
|
|
9
|
-
import { i as n, n as r, t as i } from "./
|
|
10
|
-
import { t as a } from "./
|
|
11
|
-
import { n as o, r as s, t as c } from "./
|
|
7
|
+
import { t as e } from "./BxHaU8-LCw4IHrDn.mjs";
|
|
8
|
+
import { n as t } from "./DcUtMgA17fh_UJlQ.mjs";
|
|
9
|
+
import { i as n, n as r, t as i } from "./DK39s_Fn9M22RfJm.mjs";
|
|
10
|
+
import { t as a } from "./Cb3HSSD7snyRPNh8.mjs";
|
|
11
|
+
import { n as o, r as s, t as c } from "./Cf855AHLcB7WuFr3.mjs";
|
|
12
12
|
import { DynamicIcon as l, NotifierType as u, useNotifier as d, useTranslator as f } from "@sheetxl/utils-react";
|
|
13
13
|
import { forwardRef as p, memo as m, useCallback as h, useEffect as g, useMemo as _, useReducer as ee, useRef as v, useState as y } from "react";
|
|
14
14
|
import { SimpleTooltip as te } from "@sheetxl/utils-mui";
|
|
@@ -1,12 +1,13 @@
|
|
|
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.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { r as e } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
7
|
+
import { r as e } from "./DmBu6kgMNT26tmsZ.mjs";
|
|
8
|
+
import { i as t, n, o as r, r as i } from "./C2ZbV5cXpGPYeqM1.mjs";
|
|
9
|
+
import { t as a } from "./BoXCzcrUFER3B585.mjs";
|
|
10
|
+
import { t as o } from "./DGkQsCJP29nZteu8.mjs";
|
|
10
11
|
import { IFill as s } from "@sheetxl/sdk";
|
|
11
12
|
import { useGridColorScheme as c } from "@sheetxl/react";
|
|
12
13
|
import { useCallbackRef as l, useTranslator as u } from "@sheetxl/utils-react";
|
|
@@ -134,21 +135,21 @@ var D = (e) => g(E, {
|
|
|
134
135
|
"none",
|
|
135
136
|
"single",
|
|
136
137
|
"double"
|
|
137
|
-
], I = (
|
|
138
|
-
let { font: a, styles: o, disabled: s, run: d } =
|
|
138
|
+
], I = (r) => {
|
|
139
|
+
let { font: a, styles: o, disabled: s, run: d } = r, f = u(), p = c() === "dark", m = l(() => o.recentColors(), [o]), v = a.getColor(), y = {
|
|
139
140
|
none: f("chart.pane.text.lineNone"),
|
|
140
141
|
single: f("chart.pane.text.lineSingle"),
|
|
141
142
|
double: f("chart.pane.text.lineDouble")
|
|
142
143
|
};
|
|
143
144
|
return _(h, { children: [
|
|
144
145
|
g(D, { children: f("chart.pane.text") }),
|
|
145
|
-
g(
|
|
146
|
+
g(t, { children: g(N, {
|
|
146
147
|
label: f("format.fontFamily"),
|
|
147
148
|
value: a.getFamily(),
|
|
148
149
|
disabled: s,
|
|
149
150
|
onCommit: (e) => d(() => a.setFamily(e || null))
|
|
150
151
|
}) }),
|
|
151
|
-
g(
|
|
152
|
+
g(t, { children: _(i, { children: [g(n, {
|
|
152
153
|
label: f("format.fontSize"),
|
|
153
154
|
value: a.getSize(),
|
|
154
155
|
min: 1,
|
|
@@ -173,7 +174,7 @@ var D = (e) => g(E, {
|
|
|
173
174
|
recentColors: m
|
|
174
175
|
}
|
|
175
176
|
})] }) }),
|
|
176
|
-
g(
|
|
177
|
+
g(t, { children: _(i, { children: [g(M, {
|
|
177
178
|
label: f("chart.pane.text.bold"),
|
|
178
179
|
checked: a.getBold(),
|
|
179
180
|
disabled: s,
|
|
@@ -184,7 +185,7 @@ var D = (e) => g(E, {
|
|
|
184
185
|
disabled: s,
|
|
185
186
|
onChange: (e) => d(() => a.setItalic(e))
|
|
186
187
|
})] }) }),
|
|
187
|
-
g(
|
|
188
|
+
g(t, { children: _(i, { children: [g(j, {
|
|
188
189
|
label: f("chart.pane.text.underline"),
|
|
189
190
|
value: P.includes(a.getUnderline()) ? a.getUnderline() : "single",
|
|
190
191
|
options: P,
|
|
@@ -233,13 +234,13 @@ var D = (e) => g(E, {
|
|
|
233
234
|
"plusValues",
|
|
234
235
|
"minusValues"
|
|
235
236
|
], H = (e) => {
|
|
236
|
-
let { element:
|
|
237
|
+
let { element: t, disabled: a, run: o } = e, s = u(), c = (e, t, n) => g(M, {
|
|
237
238
|
label: e,
|
|
238
239
|
checked: t,
|
|
239
240
|
disabled: a,
|
|
240
241
|
onChange: (e) => o(() => n(e))
|
|
241
|
-
}), l = [], d = () =>
|
|
242
|
-
switch (
|
|
242
|
+
}), l = [], d = () => t;
|
|
243
|
+
switch (t.getElementType()) {
|
|
243
244
|
case "chartArea": {
|
|
244
245
|
let e = d();
|
|
245
246
|
l.push(c(s("chart.pane.roundedCorners"), e.getRoundedCorners(), (t) => e.setRoundedCorners(t)));
|
|
@@ -277,7 +278,7 @@ var D = (e) => g(E, {
|
|
|
277
278
|
case "axis": {
|
|
278
279
|
let e = d();
|
|
279
280
|
if (l.push(c(s("chart.pane.visible"), e.getVisible(), (t) => e.setVisible(t))), l.push(c(s("chart.pane.reverse"), e.getReversePlotOrder(), (t) => e.setReversePlotOrder(t))), e.getKind() === "value") {
|
|
280
|
-
let
|
|
281
|
+
let t = (e, t, r) => g(n, {
|
|
281
282
|
label: e,
|
|
282
283
|
value: t ?? 0,
|
|
283
284
|
min: -0x38d7ea4c68000,
|
|
@@ -285,9 +286,9 @@ var D = (e) => g(E, {
|
|
|
285
286
|
decimals: !0,
|
|
286
287
|
width: 120,
|
|
287
288
|
disabled: a,
|
|
288
|
-
onChange: (e) => o(() =>
|
|
289
|
+
onChange: (e) => o(() => r(e))
|
|
289
290
|
}, e);
|
|
290
|
-
l.push(_(
|
|
291
|
+
l.push(_(i, { children: [t(s("chart.pane.minimum"), e.getMinimum(), (t) => e.setMinimum(t)), t(s("chart.pane.maximum"), e.getMaximum(), (t) => e.setMaximum(t))] }, "bounds")), l.push(g(N, {
|
|
291
292
|
label: s("chart.pane.numberFormat"),
|
|
292
293
|
value: e.getNumberFormat() ?? "",
|
|
293
294
|
disabled: a,
|
|
@@ -308,18 +309,18 @@ var D = (e) => g(E, {
|
|
|
308
309
|
case "series": {
|
|
309
310
|
let e = d();
|
|
310
311
|
l.push(c(s("chart.pane.secondaryAxis"), e.getAxisGroup() === "secondary", (t) => e.setAxisGroup(t ? "secondary" : "primary")));
|
|
311
|
-
let
|
|
312
|
-
|
|
312
|
+
let t = e.getGapWidth(), r = e.getOverlap();
|
|
313
|
+
t === null && r === null || l.push(_(i, { children: [r === null ? null : g(n, {
|
|
313
314
|
label: s("chart.pane.overlap"),
|
|
314
|
-
value:
|
|
315
|
+
value: r,
|
|
315
316
|
min: -100,
|
|
316
317
|
max: 100,
|
|
317
318
|
width: 96,
|
|
318
319
|
disabled: a,
|
|
319
320
|
onChange: (t) => o(() => e.setOverlap(t))
|
|
320
|
-
}),
|
|
321
|
+
}), t === null ? null : g(n, {
|
|
321
322
|
label: s("chart.pane.gapWidth"),
|
|
322
|
-
value:
|
|
323
|
+
value: t,
|
|
323
324
|
min: 0,
|
|
324
325
|
max: 500,
|
|
325
326
|
width: 96,
|
|
@@ -367,7 +368,7 @@ var D = (e) => g(E, {
|
|
|
367
368
|
movingAverage: s("chart.pane.trendline.movingAverage")
|
|
368
369
|
},
|
|
369
370
|
onChange: (t) => o(() => e.setType(t))
|
|
370
|
-
}, "type")), l.push(c(s("chart.pane.trendline.equation"), e.getShowEquation(), (t) => e.setShowEquation(t))), l.push(c(s("chart.pane.trendline.rSquared"), e.getShowRSquared(), (t) => e.setShowRSquared(t))), l.push(_(
|
|
371
|
+
}, "type")), l.push(c(s("chart.pane.trendline.equation"), e.getShowEquation(), (t) => e.setShowEquation(t))), l.push(c(s("chart.pane.trendline.rSquared"), e.getShowRSquared(), (t) => e.setShowRSquared(t))), l.push(_(i, { children: [g(n, {
|
|
371
372
|
label: s("chart.pane.trendline.forward"),
|
|
372
373
|
value: e.getForwardPeriod(),
|
|
373
374
|
min: 0,
|
|
@@ -376,7 +377,7 @@ var D = (e) => g(E, {
|
|
|
376
377
|
width: 96,
|
|
377
378
|
disabled: a,
|
|
378
379
|
onChange: (t) => o(() => e.setForwardPeriod(t))
|
|
379
|
-
}), g(
|
|
380
|
+
}), g(n, {
|
|
380
381
|
label: s("chart.pane.trendline.backward"),
|
|
381
382
|
value: e.getBackwardPeriod(),
|
|
382
383
|
min: 0,
|
|
@@ -404,7 +405,7 @@ var D = (e) => g(E, {
|
|
|
404
405
|
onChange: (t) => o(() => e.setType(t))
|
|
405
406
|
}, "type"));
|
|
406
407
|
let t = e.getAmount();
|
|
407
|
-
t !== null && l.push(g(
|
|
408
|
+
t !== null && l.push(g(n, {
|
|
408
409
|
label: s("chart.pane.errorBars.amount"),
|
|
409
410
|
value: t,
|
|
410
411
|
min: 0,
|
|
@@ -435,15 +436,15 @@ var D = (e) => g(E, {
|
|
|
435
436
|
}
|
|
436
437
|
return l.length === 0 ? null : _(h, { children: [g(D, { children: s("chart.pane.options") }), g(v, {
|
|
437
438
|
sx: {
|
|
438
|
-
...
|
|
439
|
+
...r,
|
|
439
440
|
gap: 1
|
|
440
441
|
},
|
|
441
442
|
children: l.map((e, t) => g(v, { children: e }, t))
|
|
442
443
|
})] });
|
|
443
444
|
}, U = d((e) => {
|
|
444
|
-
let { movable: t, sheet:
|
|
445
|
+
let { movable: t, sheet: n } = e, i = u(), a = t.getContent(), [, o] = p((e) => e + 1, 0);
|
|
445
446
|
f(() => a.addListeners({ onAnyChange: o }), [a]);
|
|
446
|
-
let s =
|
|
447
|
+
let s = n.getView().getChartElementSelection();
|
|
447
448
|
f(() => s.addListeners({ onChange: o }), [s]);
|
|
448
449
|
let [c, d] = m("chartArea"), [y, x] = m(null), T = (s.getChart() === a ? s.getActive() : null) ?? a.getElement(c) ?? a.getChartArea(), D = a.getElements(), k = D.includes(T) ? D : [...D, T], j = a.isReadOnly(), M = l((e) => {
|
|
449
450
|
try {
|
|
@@ -454,7 +455,7 @@ var D = (e) => g(E, {
|
|
|
454
455
|
}, []), N = T.getStyle?.(), P = N?.isITextBoxStyle ? N.getFont() : null, F = T.getElementType() === "legendEntry" ? null : N, L = T.getElementType() === "upDownBars" ? T : null;
|
|
455
456
|
return _(v, {
|
|
456
457
|
sx: {
|
|
457
|
-
...
|
|
458
|
+
...r,
|
|
458
459
|
gap: 2,
|
|
459
460
|
paddingTop: (e) => e.spacing(1)
|
|
460
461
|
},
|
|
@@ -488,23 +489,23 @@ var D = (e) => g(E, {
|
|
|
488
489
|
}, `options:${T.getPath()}`),
|
|
489
490
|
P ? g(I, {
|
|
490
491
|
font: P,
|
|
491
|
-
styles:
|
|
492
|
+
styles: n.getStyles(),
|
|
492
493
|
disabled: j,
|
|
493
494
|
run: M
|
|
494
495
|
}, `text:${T.getPath()}`) : null,
|
|
495
496
|
F ? g(A, {
|
|
496
497
|
style: F,
|
|
497
|
-
sheet:
|
|
498
|
+
sheet: n,
|
|
498
499
|
disabled: j
|
|
499
500
|
}, `style:${T.getPath()}`) : null,
|
|
500
501
|
L ? _(h, { children: [g(A, {
|
|
501
502
|
style: L.getUpBarsStyle(),
|
|
502
|
-
sheet:
|
|
503
|
+
sheet: n,
|
|
503
504
|
disabled: j,
|
|
504
505
|
label: i("chart.pane.upBars")
|
|
505
506
|
}, "up"), g(A, {
|
|
506
507
|
style: L.getDownBarsStyle(),
|
|
507
|
-
sheet:
|
|
508
|
+
sheet: n,
|
|
508
509
|
disabled: j,
|
|
509
510
|
label: i("chart.pane.downBars")
|
|
510
511
|
}, "down")] }) : null
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { NumberFormat as e } from "@sheetxl/sdk";
|
|
8
|
+
import { DynamicIcon as t, KeyCodes as n, useCommands as r, useLanguage as i, useTranslator as a } from "@sheetxl/utils-react";
|
|
9
|
+
import { forwardRef as o, memo as s, useCallback as c } from "react";
|
|
10
|
+
import { CommandButton as l, CommandPopupButton as u, ExhibitDivider as d, ExhibitMenuItem as f, ExhibitTooltip as p, defaultRenderPopupPanel as m } from "@sheetxl/utils-mui";
|
|
11
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
+
import { Box as _, Typography as v } from "@mui/material";
|
|
13
|
+
import { alpha as y } from "@mui/system";
|
|
14
|
+
var b = s((e) => {
|
|
15
|
+
let { label: t, sample: n, sx: r, ...i } = e, a = !!n && n.length > 0;
|
|
16
|
+
return g(_, {
|
|
17
|
+
sx: {
|
|
18
|
+
display: "flex",
|
|
19
|
+
flex: "1 1 100%",
|
|
20
|
+
flexDirection: "column",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
"*": { lineHeight: "1.4" },
|
|
23
|
+
...r
|
|
24
|
+
},
|
|
25
|
+
...i,
|
|
26
|
+
children: [h(v, {
|
|
27
|
+
component: "div",
|
|
28
|
+
children: t
|
|
29
|
+
}), h(v, {
|
|
30
|
+
variant: "caption",
|
|
31
|
+
component: "div",
|
|
32
|
+
sx: {
|
|
33
|
+
color: (e) => y(e.palette.text.primary, .6),
|
|
34
|
+
paddingTop: a ? "1px" : void 0,
|
|
35
|
+
overflow: "hidden",
|
|
36
|
+
textOverflow: "ellipsis"
|
|
37
|
+
},
|
|
38
|
+
children: a ? n : " "
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
b.displayName = "NumberFormatOption";
|
|
43
|
+
var x = (t, n) => {
|
|
44
|
+
switch (n) {
|
|
45
|
+
case e.Type.General: return t("numberFormat.catGeneral");
|
|
46
|
+
case e.Type.Number: return t("numberFormat.catNumber");
|
|
47
|
+
case e.Type.Currency: return t("numberFormat.catCurrency");
|
|
48
|
+
case e.Type.Accounting: return t("numberFormat.catAccounting");
|
|
49
|
+
case e.Type.ShortDate: return t("numberFormat.typeShortDate");
|
|
50
|
+
case e.Type.MediumDate: return t("numberFormat.typeMediumDate");
|
|
51
|
+
case e.Type.LongDate: return t("numberFormat.typeLongDate");
|
|
52
|
+
case e.Type.ShortTime: return t("numberFormat.typeShortTime");
|
|
53
|
+
case e.Type.MediumTime: return t("numberFormat.typeMediumTime");
|
|
54
|
+
case e.Type.LongTime: return t("numberFormat.typeLongTime");
|
|
55
|
+
case e.Type.Comma: return t("numberFormat.typeComma");
|
|
56
|
+
case e.Type.Percentage: return t("numberFormat.catPercentage");
|
|
57
|
+
case e.Type.Fraction: return t("numberFormat.catFraction");
|
|
58
|
+
case e.Type.Scientific: return t("numberFormat.catScientific");
|
|
59
|
+
case e.Type.Text: return t("numberFormat.catText");
|
|
60
|
+
case e.Type.Special: return t("numberFormat.catSpecial");
|
|
61
|
+
case e.Type.Custom: return t("numberFormat.catCustom");
|
|
62
|
+
default: return n;
|
|
63
|
+
}
|
|
64
|
+
}, S = (e, t) => {
|
|
65
|
+
switch (t) {
|
|
66
|
+
case "General": return e("numberFormat.catGeneral");
|
|
67
|
+
case "Number": return e("numberFormat.catNumber");
|
|
68
|
+
case "Currency": return e("numberFormat.catCurrency");
|
|
69
|
+
case "Accounting": return e("numberFormat.catAccounting");
|
|
70
|
+
case "Date": return e("numberFormat.catDate");
|
|
71
|
+
case "Time": return e("numberFormat.catTime");
|
|
72
|
+
case "Percentage": return e("numberFormat.catPercentage");
|
|
73
|
+
case "Fraction": return e("numberFormat.catFraction");
|
|
74
|
+
case "Scientific": return e("numberFormat.catScientific");
|
|
75
|
+
case "Text": return e("numberFormat.catText");
|
|
76
|
+
case "Special": return e("numberFormat.catSpecial");
|
|
77
|
+
case "Custom": return e("numberFormat.catCustom");
|
|
78
|
+
default: return t;
|
|
79
|
+
}
|
|
80
|
+
}, { Builder: C } = e, w = /* @__PURE__ */ "USD.EUR.JPY.GBP.CNY.AUD.CAD.CHF.HKD.SGD.SEK.NOK.DKK.NZD.KRW.INR.BRL.RUB.ZAR.MXN.TRY.PLN.THB.IDR.ILS.AED.SAR.CZK.HUF.PHP.MYR.TWD".split("."), T = s(o((e, o) => {
|
|
81
|
+
let { sx: s, disabled: l, groupKey: y, ...b } = e, x = a(), S = i(), [T] = r(["formatNumberFormatAccountingStyle"]), D = l ?? (!T || T.disabled()), O = c((e) => {
|
|
82
|
+
let t = (t) => {
|
|
83
|
+
e.closeFloat?.(), T?.execute(t ?? void 0);
|
|
84
|
+
}, r = (e) => ({
|
|
85
|
+
disabled: D,
|
|
86
|
+
sx: {
|
|
87
|
+
display: "flex",
|
|
88
|
+
paddingTop: "4px",
|
|
89
|
+
paddingBottom: "4px",
|
|
90
|
+
flex: "none"
|
|
91
|
+
},
|
|
92
|
+
onMouseUp: (t) => {
|
|
93
|
+
t.button === 0 && e();
|
|
94
|
+
},
|
|
95
|
+
onMouseDown: (e) => {
|
|
96
|
+
e.button === 0 && e.preventDefault();
|
|
97
|
+
},
|
|
98
|
+
onKeyDown: (t) => {
|
|
99
|
+
t.keyCode !== n.Enter && t.keyCode !== n.Space || e();
|
|
100
|
+
}
|
|
101
|
+
}), i = (e) => h(_, {
|
|
102
|
+
sx: {
|
|
103
|
+
display: "flex",
|
|
104
|
+
flex: "1 1 100%",
|
|
105
|
+
flexDirection: "column",
|
|
106
|
+
overflow: "hidden"
|
|
107
|
+
},
|
|
108
|
+
children: h(v, {
|
|
109
|
+
component: "div",
|
|
110
|
+
sx: {
|
|
111
|
+
whiteSpace: "nowrap",
|
|
112
|
+
overflow: "hidden",
|
|
113
|
+
textOverflow: "ellipsis"
|
|
114
|
+
},
|
|
115
|
+
children: e
|
|
116
|
+
})
|
|
117
|
+
}), a = [...w].sort((e, t) => E(e, S).localeCompare(E(t, S))).map((e) => {
|
|
118
|
+
let n = function(e) {
|
|
119
|
+
try {
|
|
120
|
+
return new Intl.NumberFormat("en", {
|
|
121
|
+
style: "currency",
|
|
122
|
+
currency: e,
|
|
123
|
+
currencyDisplay: "narrowSymbol"
|
|
124
|
+
}).formatToParts(0).find((e) => e.type === "currency")?.value ?? e;
|
|
125
|
+
} catch {
|
|
126
|
+
return e;
|
|
127
|
+
}
|
|
128
|
+
}(e);
|
|
129
|
+
return h(f, {
|
|
130
|
+
...r(() => t(function(e) {
|
|
131
|
+
let t = C.parse(C.defaultCodeForCategory("Accounting"));
|
|
132
|
+
return C.build({
|
|
133
|
+
...t,
|
|
134
|
+
currencySymbol: e
|
|
135
|
+
});
|
|
136
|
+
}(n))),
|
|
137
|
+
children: i(`${n} ${E(e, S)} (${e})`)
|
|
138
|
+
}, e);
|
|
139
|
+
});
|
|
140
|
+
return m({
|
|
141
|
+
...e,
|
|
142
|
+
children: g(_, {
|
|
143
|
+
sx: {
|
|
144
|
+
display: "flex",
|
|
145
|
+
flexDirection: "column",
|
|
146
|
+
flex: "1 1 100%",
|
|
147
|
+
overflow: "hidden"
|
|
148
|
+
},
|
|
149
|
+
children: [g(_, {
|
|
150
|
+
sx: { flex: "none" },
|
|
151
|
+
children: [h(f, {
|
|
152
|
+
...r(() => t()),
|
|
153
|
+
children: i(x("numberFormat.accountingDefault"))
|
|
154
|
+
}, "default-currency"), h(d, { orientation: "horizontal" })]
|
|
155
|
+
}), h(_, {
|
|
156
|
+
sx: {
|
|
157
|
+
overflow: "auto",
|
|
158
|
+
flex: "1 1 100%"
|
|
159
|
+
},
|
|
160
|
+
children: a
|
|
161
|
+
})]
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}, [
|
|
165
|
+
T,
|
|
166
|
+
D,
|
|
167
|
+
x,
|
|
168
|
+
S
|
|
169
|
+
]);
|
|
170
|
+
return h(u, {
|
|
171
|
+
ref: o,
|
|
172
|
+
sx: { ...s },
|
|
173
|
+
disabled: D,
|
|
174
|
+
quickCommand: "formatNumberFormatAccountingStyle",
|
|
175
|
+
renderPopupPanel: O,
|
|
176
|
+
renderTooltip: ({ children: e, disabled: t }) => h(p, {
|
|
177
|
+
label: T?.getLabel?.(y),
|
|
178
|
+
description: T?.getDescription?.(y),
|
|
179
|
+
disabled: t,
|
|
180
|
+
children: e
|
|
181
|
+
}),
|
|
182
|
+
icon: h(t, { iconKey: "CurrencyDollar" }),
|
|
183
|
+
label: T?.getLabel?.(y),
|
|
184
|
+
...b
|
|
185
|
+
});
|
|
186
|
+
}));
|
|
187
|
+
function E(e, t) {
|
|
188
|
+
try {
|
|
189
|
+
return new Intl.DisplayNames([t ?? "en"], { type: "currency" }).of(e) ?? e;
|
|
190
|
+
} catch {
|
|
191
|
+
return e;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
var D = "numberFormatOptions", O = s(o((e, t) => {
|
|
195
|
+
let { groupKey: n = D, disabled: r, sx: i, ...a } = e;
|
|
196
|
+
return g(_, {
|
|
197
|
+
ref: t,
|
|
198
|
+
className: "quick-buttons",
|
|
199
|
+
sx: {
|
|
200
|
+
display: "flex",
|
|
201
|
+
alignItems: "center",
|
|
202
|
+
justifyContent: "center",
|
|
203
|
+
...i
|
|
204
|
+
},
|
|
205
|
+
...a,
|
|
206
|
+
children: [
|
|
207
|
+
h(T, {
|
|
208
|
+
groupKey: n,
|
|
209
|
+
disabled: r
|
|
210
|
+
}),
|
|
211
|
+
h(l, {
|
|
212
|
+
commandKey: "formatNumberFormatPercentStyle",
|
|
213
|
+
groupKey: n,
|
|
214
|
+
disabled: r
|
|
215
|
+
}),
|
|
216
|
+
h(l, {
|
|
217
|
+
commandKey: "formatNumberFormatCommaStyle",
|
|
218
|
+
groupKey: n,
|
|
219
|
+
disabled: r
|
|
220
|
+
}),
|
|
221
|
+
h(l, {
|
|
222
|
+
commandKey: "formatNumberFormatIncreaseDecimal",
|
|
223
|
+
groupKey: n,
|
|
224
|
+
disabled: r
|
|
225
|
+
}),
|
|
226
|
+
h(l, {
|
|
227
|
+
commandKey: "formatNumberFormatDecreaseDecimal",
|
|
228
|
+
groupKey: n,
|
|
229
|
+
disabled: r
|
|
230
|
+
})
|
|
231
|
+
]
|
|
232
|
+
});
|
|
233
|
+
}));
|
|
234
|
+
O.displayName = "NumberFormatQuickButtons";
|
|
235
|
+
export { x as a, S as i, O as n, b as r, D as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
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.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
8
|
-
import { i as t } from "./
|
|
9
|
-
import { i as n, n as r, t as i } from "./
|
|
10
|
-
import { n as a, t as o } from "./
|
|
7
|
+
import { t as e } from "./DxFw-07oIjr7GRb3.mjs";
|
|
8
|
+
import { i as t } from "./DK39s_Fn9M22RfJm.mjs";
|
|
9
|
+
import { i as n, n as r, t as i } from "./Dd6iR6EeV81idc-J.mjs";
|
|
10
|
+
import { n as a, t as o } from "./CP-c6sUINCv0Nf4P.mjs";
|
|
11
11
|
import { ICondition as s, IDataValidation as c } from "@sheetxl/sdk";
|
|
12
12
|
import { useModelSync as l } from "@sheetxl/react";
|
|
13
13
|
import { DynamicIcon as u, useTranslator as d } from "@sheetxl/utils-react";
|
|
@@ -1,8 +1,8 @@
|
|
|
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.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
import { DynamicIcon as e, KeyCodes as t, KeyModifiers as n, ReactUtils as r, keyEventCanonicals as i, keyStrokeToCanonical as a, useTranslator as o } from "@sheetxl/utils-react";
|
|
8
8
|
import s, { useCallback as c, useEffect as l, useMemo as u, useRef as ee, useState as d } from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./BxHaU8-LCw4IHrDn.mjs";
|
|
8
8
|
import { formatCommentTime as t, getPersonInitials as n, useCommentThread as r } from "@sheetxl/react";
|
|
9
9
|
import { DynamicIcon as i, floatThemeScopeProps as a, useFloatSurface as o, useLanguage as s, useNotifier as c, useTranslator as l } from "@sheetxl/utils-react";
|
|
10
10
|
import { memo as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
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.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
import e from "react";
|
|
8
8
|
var t = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
@@ -1,8 +1,8 @@
|
|
|
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.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
import { ReactUtils as e } from "@sheetxl/utils-react";
|
|
8
8
|
import { cloneElement as t, isValidElement as n, memo as r, useMemo as i } from "react";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { n as e } from "./W5Rvml-3G4XekwoR.mjs";
|
|
8
|
+
import { InputField as t } from "./index.mjs";
|
|
9
|
+
import { n } from "./BBGsto_-YGhTouc9.mjs";
|
|
10
|
+
import { useReferenceMode as r, useWorkbook as i } from "@sheetxl/react";
|
|
11
|
+
import { useCallbackRef as a, useTranslator as o } from "@sheetxl/utils-react";
|
|
12
|
+
import { memo as s, useCallback as c, useMemo as l, useState as u } from "react";
|
|
13
|
+
import { OptionsDialog as d } from "@sheetxl/utils-mui";
|
|
14
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
|
+
import { Box as m } from "@mui/material";
|
|
16
|
+
var h = ["Ok", "Cancel"], g = s((s) => {
|
|
17
|
+
let { onInput: g, onOption: _, onValidateOption: v, onDone: y, options: b = h, defaultOption: x = b?.[0], cancelOption: S = "Cancel", sx: C, initialValue: w, context: T, ...E } = s, D = o(), [O, k] = u(!1), [A, j] = u(() => w?.name ?? ""), [M, N] = u(() => w?.source ?? null), [P, F] = u(() => w?.location ?? null), I = T?.(), L = l(() => {
|
|
18
|
+
let e = w?.source, t = e && typeof e != "string" ? e.getWorksheet?.()?.getName() : void 0;
|
|
19
|
+
return t ? { scope: t } : void 0;
|
|
20
|
+
}, [w]), R = i(), [z] = u(() => {
|
|
21
|
+
let e = R?.getSelectedWorksheet()?.getName();
|
|
22
|
+
return e ? { scope: e } : void 0;
|
|
23
|
+
}), B = r().getMode()?.mode === "point", V = l(() => P ? I?.checkLocation(P) ?? null : null, [P, I]), H = a((e) => {
|
|
24
|
+
I?.validateName(e, P);
|
|
25
|
+
}, [I, P]), U = a((e) => {
|
|
26
|
+
let t = M && P ? {
|
|
27
|
+
...w,
|
|
28
|
+
name: A,
|
|
29
|
+
source: M,
|
|
30
|
+
location: P
|
|
31
|
+
} : null, n = e === S || !e;
|
|
32
|
+
g?.(!n && t ? t : void 0), _?.(e ?? S, n, e === x), y?.({
|
|
33
|
+
option: e,
|
|
34
|
+
value: t
|
|
35
|
+
});
|
|
36
|
+
}, [
|
|
37
|
+
y,
|
|
38
|
+
_,
|
|
39
|
+
x,
|
|
40
|
+
S,
|
|
41
|
+
A,
|
|
42
|
+
M,
|
|
43
|
+
P,
|
|
44
|
+
w
|
|
45
|
+
]), W = c(async (e, t) => {
|
|
46
|
+
if (!M || !P || V) return !1;
|
|
47
|
+
try {
|
|
48
|
+
H(A);
|
|
49
|
+
} catch {
|
|
50
|
+
return !1;
|
|
51
|
+
}
|
|
52
|
+
return !0;
|
|
53
|
+
}, [
|
|
54
|
+
H,
|
|
55
|
+
A,
|
|
56
|
+
M,
|
|
57
|
+
P,
|
|
58
|
+
V
|
|
59
|
+
]), G = (e) => {
|
|
60
|
+
O || e.target?.select(), k(!0);
|
|
61
|
+
};
|
|
62
|
+
return f(d, {
|
|
63
|
+
title: D("pivotTableNew.title"),
|
|
64
|
+
options: b,
|
|
65
|
+
onDone: U,
|
|
66
|
+
onValidateOption: W,
|
|
67
|
+
defaultOption: x,
|
|
68
|
+
cancelOption: S,
|
|
69
|
+
autoFocusSel: ".autoFocus",
|
|
70
|
+
suspendModal: B,
|
|
71
|
+
sx: {
|
|
72
|
+
width: "360px",
|
|
73
|
+
...C
|
|
74
|
+
},
|
|
75
|
+
...E,
|
|
76
|
+
children: p(m, {
|
|
77
|
+
sx: {
|
|
78
|
+
paddingTop: (e) => e.spacing(1),
|
|
79
|
+
paddingBottom: (e) => e.spacing(0),
|
|
80
|
+
rowGap: (e) => e.spacing(1),
|
|
81
|
+
display: "flex",
|
|
82
|
+
flexDirection: "column"
|
|
83
|
+
},
|
|
84
|
+
children: [
|
|
85
|
+
f(t, {
|
|
86
|
+
formName: "name",
|
|
87
|
+
value: A,
|
|
88
|
+
onChangeInput: j,
|
|
89
|
+
onValidate: H,
|
|
90
|
+
onFocus: G
|
|
91
|
+
}),
|
|
92
|
+
f(e, {
|
|
93
|
+
grammar: "reference",
|
|
94
|
+
classNameInput: "autoFocus",
|
|
95
|
+
formName: "source",
|
|
96
|
+
label: D("pivotTableNew.source"),
|
|
97
|
+
value: M,
|
|
98
|
+
allowMulti: !1,
|
|
99
|
+
home: L,
|
|
100
|
+
pickAs: "absolute",
|
|
101
|
+
onChangeInput: (e) => N(n(e)),
|
|
102
|
+
onFocus: G
|
|
103
|
+
}),
|
|
104
|
+
f(e, {
|
|
105
|
+
grammar: "reference",
|
|
106
|
+
formName: "location",
|
|
107
|
+
label: D("pivotTableNew.location"),
|
|
108
|
+
value: P,
|
|
109
|
+
allowMulti: !1,
|
|
110
|
+
home: z,
|
|
111
|
+
validationError: V,
|
|
112
|
+
onChangeInput: (e) => F(e?.getReferences() ?? null),
|
|
113
|
+
onFocus: G
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
export { g as PivotTableNewDialog, g as default };
|