@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.12
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/{ByeL_BZuJ2kl8gtf.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
- package/browser/esm/2nRxqrNYbmEn8fS8.mjs +386 -0
- package/browser/esm/{fb126BNj3F8URR19.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
- package/browser/esm/BAzhmMX4Fk_qnUTp.mjs +414 -0
- package/browser/esm/BGL3x0W74D7qZXlf.mjs +318 -0
- package/browser/esm/BHGr2gsFofTdAFxq.mjs +515 -0
- package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BKhcJI-G15D3kGap.mjs} +4 -4
- package/browser/esm/BNbub9weuqm3mcoF.mjs +335 -0
- package/browser/esm/BSv9MVJaz1DVEffm.mjs +975 -0
- package/browser/esm/BWfLpYmd3cSgJ0C6.mjs +141 -0
- package/browser/esm/BZqwbIE8qzjSOYcJ.mjs +582 -0
- package/browser/esm/BZy9xUrYpAtnKeji.mjs +1288 -0
- package/browser/esm/{CIu1bjPJe_x31Oww.mjs → BnkwC5rsg9LZyhoP.mjs} +3 -3
- package/browser/esm/BpJsBv413cNQpyg0.mjs +319 -0
- package/browser/esm/BpVrgbVISiTDyFR3.mjs +197 -0
- package/browser/esm/BsngRDhvVYGVBJeK.mjs +1546 -0
- package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → C29TKq47CbXs652l.mjs} +2 -2
- package/browser/esm/{CEvZe2cZK-voZTif.mjs → C8p2iMad_NNCwGI_.mjs} +5 -5
- package/browser/esm/CBzXksWnb-1gGEWZ.mjs +212 -0
- package/browser/esm/{IQLeaAbtGTipUsOD.mjs → CFIAWgpU3UyepLBn.mjs} +25 -24
- package/browser/esm/CJD4jF4m9cBGHzr_.mjs +31 -0
- package/browser/esm/{CjznclrKqJRi7u9O.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
- package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
- package/browser/esm/CeF35ZeFP28Do5Zx.mjs +1379 -0
- package/browser/esm/{xKiLJKiLxto8SayF.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
- package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → Cq82lvdjyBvlJ8xJ.mjs} +19 -17
- package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
- package/browser/esm/Cvk2yY90hpgXWMAt.mjs +103 -0
- package/browser/esm/D0slJycx3nq53qmf.mjs +14 -0
- package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
- package/browser/esm/D5Fn0Hqllwv5HY6i.mjs +7581 -0
- package/browser/esm/D5N4nGaZsXtrHAOh.mjs +831 -0
- package/browser/esm/D7AqPfyhMiuda5l5.mjs +412 -0
- package/browser/esm/DHZA48ZMCETvHmeP.mjs +161 -0
- package/browser/esm/DX2_vf7WX6uRLaOZ.mjs +94 -0
- package/browser/esm/DaxpbAF1ShkT7hNU.mjs +490 -0
- package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → Db3oHfXiRtcH015t.mjs} +162 -156
- package/browser/esm/Dt47Huh1l3C4_5_w.mjs +87 -0
- package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
- package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
- package/browser/esm/{DHY19rkSiiRZxShC.mjs → DuuyN4-7K6_io2Py.mjs} +3 -3
- package/browser/esm/{yZxC4qUENOlMhVUH.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
- package/browser/esm/PY3Br5Bo_TxcCnCU.mjs +252 -0
- package/browser/esm/WIhvQtBkGiw-oFUs.mjs +2566 -0
- package/browser/esm/WgIvwAENeO8LANax.mjs +437 -0
- package/browser/esm/{DBtc4lku0uHVcqWn.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
- package/browser/esm/index.mjs +1053 -192
- package/browser/esm/jFRFCWlkD7Dsrhkh.mjs +236 -0
- package/browser/esm/lKXEDVt2ow1NlWJj.mjs +392 -0
- package/browser/esm/{Blaj2R5hYxtLAW__.mjs → oC0OwOddhOD0OoCJ.mjs} +6 -6
- package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
- package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → u84rSnESjxqB6gay.mjs} +1 -1
- package/licenses/dependencies.txt +94 -94
- package/node/esm/{BcwMb6CyVfvEwbHn.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
- package/node/esm/{CKu1AtRgyltyEdEN.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
- package/node/esm/{ETK6T6G0SIcFXDe5.mjs → BBGoyqs2L_ccSH1e.mjs} +40 -40
- package/node/esm/BLv99aovW4R3C5PE.mjs +515 -0
- package/node/esm/BUGU_5lUtnCRlp3n.mjs +519 -0
- package/node/esm/BalROFG_oa9PFs9Q.mjs +141 -0
- package/node/esm/{ah3CUg4-VmNstGk_.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
- package/node/esm/C3FCh9xju2SccUIE.mjs +1283 -0
- package/node/esm/{Bb1sLMqXWKjdve23.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
- package/node/esm/CKWeipCqqpLnLE5e.mjs +391 -0
- package/node/esm/CTnVNfz4eqFnM92M.mjs +212 -0
- package/node/esm/Cfi_ly8fBDZZdiZT.mjs +72 -0
- package/node/esm/CgKa6JuyJ1tTodev.mjs +1703 -0
- package/node/esm/{cqzp431iNSLWictb.mjs → Cq53M7bAUSXMNq1f.mjs} +22 -22
- package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
- package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
- package/node/esm/D72CupF9mfy2D1Xa.mjs +94 -0
- package/node/esm/{DNSjK5DAH3M14Qbc.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
- package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DJFkALt4XrwkMbnU.mjs} +163 -157
- package/node/esm/DJpwI8PlKBI2rk0r.mjs +319 -0
- package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DQaGPUYbgL4Y5YZW.mjs} +32 -30
- package/node/esm/{D9rzScOA9pEYFrtz.mjs → DsNYnq4NtYBxPmeA.mjs} +20 -20
- package/node/esm/DygDgOpa9sJ6YFVS.mjs +385 -0
- package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
- package/node/esm/M7YxvRPGCuxuk9aK.mjs +142 -0
- package/node/esm/QNjtpX8rIpqGGLEJ.mjs +1379 -0
- package/node/esm/{B_jRGdwGFkudwmL-.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
- package/node/esm/{ci8d-mF1H9wnYzix.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
- package/node/esm/dm8dmEaTIqfmgyeL.mjs +412 -0
- package/node/esm/{D6oQL8knsPpgdXuk.mjs → fmya3XQnTGyQisvT.mjs} +2 -2
- package/node/esm/gPYAb_A0T5ZwcQ1E.mjs +318 -0
- package/node/esm/index.mjs +8915 -13417
- package/node/esm/wB8xMpyJ_NvE16yG.mjs +975 -0
- package/node/esm/zGAcd4Jr7wkvXDBS.mjs +197 -0
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +4 -0
- package/resources/locales/de/ui.msg.json +100 -1
- package/resources/locales/en/groups.cmd.json +4 -0
- package/resources/locales/en/ui.msg.json +100 -1
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
- package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/border/BorderTemplateIcon.d.ts +6 -1
- package/types/src/chart/ChartFormatPanel.d.ts +20 -0
- package/types/src/chart/ChartPlugin.d.ts +6 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/index.d.ts +1 -0
- package/types/src/comments/CommentCard.d.ts +2 -2
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
- package/types/src/conditions/ConditionEditor.d.ts +1 -1
- package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +2 -2
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/format/BorderPreview.d.ts +11 -4
- package/types/src/format/useFormatSelection.d.ts +4 -4
- package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
- package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
- package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
- package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
- package/types/src/index.d.ts +15 -6
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
- package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
- package/types/src/protection/index.d.ts +1 -1
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/StudioProps.d.ts +10 -10
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
- package/types/src/workbook/DefaultRenderers.d.ts +31 -19
- package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
- package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
- package/browser/esm/CtEFHbzYNvYjDYvi.mjs +0 -236
- package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
- package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
- package/node/esm/BYVLi0md4AYuDsB_.mjs +0 -236
- package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
- package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
|
@@ -1,5 +1,5 @@
|
|
|
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.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -12,22 +12,22 @@ import { OptionsDialog as c } from "@sheetxl/utils-mui";
|
|
|
12
12
|
import { jsx as m, jsxs as p } from "react/jsx-runtime";
|
|
13
13
|
import { Box as u, Checkbox as d, FormControlLabel as g } from "@mui/material";
|
|
14
14
|
var f = ["Ok", "Cancel"], h = "table.defaultName", x = r((r) => {
|
|
15
|
-
const { onInput: x, onOption: N, onValidateOption: O, onDone: b, options: v = f, defaultOption: w = v?.[0], cancelOption: C = "Cancel", sx: F, initialValue: V, context: y, ...I } = r, T = o(), [
|
|
15
|
+
const { onInput: x, onOption: N, onValidateOption: O, onDone: b, options: v = f, defaultOption: w = v?.[0], cancelOption: C = "Cancel", sx: F, initialValue: V, context: y, ...I } = r, T = o(), [k, D] = s(!1), [H, M] = s(() => V?.hasHeader ?? !1), [j, B] = s(() => V?.ranges ?? null), S = y?.()?.getNames, [G, P] = s(() => {
|
|
16
16
|
if (V?.name) return V.name;
|
|
17
17
|
const e = T(h, { n: 1 }), t = e === h ? "Table1" : e;
|
|
18
18
|
try {
|
|
19
|
-
return
|
|
19
|
+
return S?.().findValidName(t) ?? t;
|
|
20
20
|
} catch {
|
|
21
21
|
return t;
|
|
22
22
|
}
|
|
23
23
|
}), R = i(() => {
|
|
24
|
-
const e = V?.ranges?.
|
|
24
|
+
const e = V?.ranges?.getWorksheet?.()?.getName();
|
|
25
25
|
return e ? { scope: e } : void 0;
|
|
26
|
-
}, [V]),
|
|
26
|
+
}, [V]), W = "point" === a().getMode()?.mode, q = n((e) => {
|
|
27
27
|
const t = j ? {
|
|
28
28
|
...V,
|
|
29
29
|
name: G,
|
|
30
|
-
hasHeader:
|
|
30
|
+
hasHeader: H,
|
|
31
31
|
ranges: j
|
|
32
32
|
} : null, a = e === C || !e;
|
|
33
33
|
x?.(!a && t ? t : void 0), N?.(e ?? C, a, e === w), b?.({
|
|
@@ -40,30 +40,30 @@ var f = ["Ok", "Cancel"], h = "table.defaultName", x = r((r) => {
|
|
|
40
40
|
w,
|
|
41
41
|
C,
|
|
42
42
|
G,
|
|
43
|
-
|
|
43
|
+
H,
|
|
44
44
|
j,
|
|
45
45
|
V
|
|
46
|
-
]),
|
|
47
|
-
|
|
48
|
-
}, [
|
|
46
|
+
]), z = n((e) => {
|
|
47
|
+
S?.().validateName(e);
|
|
48
|
+
}, [S]), A = l(async (e, t) => {
|
|
49
49
|
try {
|
|
50
|
-
|
|
50
|
+
z(G);
|
|
51
51
|
} catch {
|
|
52
52
|
return !1;
|
|
53
53
|
}
|
|
54
54
|
return !0;
|
|
55
|
-
}, [
|
|
56
|
-
|
|
55
|
+
}, [z, G]), E = (e) => {
|
|
56
|
+
k || e.target?.select(), D(!0);
|
|
57
57
|
};
|
|
58
58
|
return m(c, {
|
|
59
59
|
title: T("tableNew.title"),
|
|
60
60
|
options: v,
|
|
61
|
-
onDone:
|
|
62
|
-
onValidateOption:
|
|
61
|
+
onDone: q,
|
|
62
|
+
onValidateOption: A,
|
|
63
63
|
defaultOption: w,
|
|
64
64
|
cancelOption: C,
|
|
65
65
|
autoFocusSel: ".autoFocus",
|
|
66
|
-
suspendModal:
|
|
66
|
+
suspendModal: W,
|
|
67
67
|
sx: {
|
|
68
68
|
width: "360px",
|
|
69
69
|
...F
|
|
@@ -82,8 +82,8 @@ var f = ["Ok", "Cancel"], h = "table.defaultName", x = r((r) => {
|
|
|
82
82
|
formName: "name",
|
|
83
83
|
value: G,
|
|
84
84
|
onChangeInput: P,
|
|
85
|
-
onValidate:
|
|
86
|
-
onFocus:
|
|
85
|
+
onValidate: z,
|
|
86
|
+
onFocus: E
|
|
87
87
|
}),
|
|
88
88
|
m(e, {
|
|
89
89
|
grammar: "reference",
|
|
@@ -93,14 +93,14 @@ var f = ["Ok", "Cancel"], h = "table.defaultName", x = r((r) => {
|
|
|
93
93
|
allowMulti: !1,
|
|
94
94
|
allowCrossSheet: !1,
|
|
95
95
|
home: R,
|
|
96
|
-
onChangeInput: (e) =>
|
|
97
|
-
onFocus:
|
|
96
|
+
onChangeInput: (e) => B(e?.getReferences() ?? null),
|
|
97
|
+
onFocus: E
|
|
98
98
|
}),
|
|
99
99
|
m(g, {
|
|
100
100
|
sx: { marginTop: (e) => e.spacing(-1) },
|
|
101
101
|
control: m(d, {
|
|
102
|
-
checked:
|
|
103
|
-
onChange: () =>
|
|
102
|
+
checked: H,
|
|
103
|
+
onChange: () => M(!H),
|
|
104
104
|
sx: {
|
|
105
105
|
paddingTop: .5,
|
|
106
106
|
paddingBottom: .5
|
|
@@ -1,5 +1,5 @@
|
|
|
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.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { FormulaField as e, InputField as t } from "./index.mjs";
|
|
8
|
+
import { useReferenceMode as n } from "@sheetxl/react";
|
|
9
|
+
import { useCallbackRef as l, useTranslator as r } from "@sheetxl/utils-react";
|
|
10
|
+
import { memo as s, useEffect as o, useId as a, useMemo as i, useRef as u, useState as d } from "react";
|
|
11
|
+
import { OptionsDialog as p } from "@sheetxl/utils-mui";
|
|
12
|
+
import { Fragment as c, jsx as m, jsxs as g } from "react/jsx-runtime";
|
|
13
|
+
import { Box as h, FormControl as y, InputLabel as f, MenuItem as x, Select as b, TextField as k } from "@mui/material";
|
|
14
|
+
var T = ["Ok", "Cancel"], C = { paddingTop: (e) => e.spacing(1.5) }, v = (e) => e?.isReadOnly() ? null : e, I = "mailto:", F = (e) => e.length >= 7 && e.substring(0, 7).toLowerCase() === I, O = (e) => {
|
|
15
|
+
if (!F(e)) return null;
|
|
16
|
+
const t = e.substring(7), n = t.indexOf("?");
|
|
17
|
+
if (-1 === n) return {
|
|
18
|
+
address: t,
|
|
19
|
+
subject: ""
|
|
20
|
+
};
|
|
21
|
+
let l = "";
|
|
22
|
+
try {
|
|
23
|
+
l = new URLSearchParams(t.substring(n + 1)).get("subject") ?? "";
|
|
24
|
+
} catch {}
|
|
25
|
+
return {
|
|
26
|
+
address: t.substring(0, n),
|
|
27
|
+
subject: l
|
|
28
|
+
};
|
|
29
|
+
}, D = s((s) => {
|
|
30
|
+
const { initialValue: D = null, context: P, onInput: j, onOption: w, onValidateOption: M, onDone: R, options: W = T, defaultOption: $ = W?.[0], cancelOption: E = "Cancel", sx: A, ...H } = s, L = r(), S = i(() => null !== (D ?? v(P?.()?.getHyperlink())), []), V = i(() => {
|
|
31
|
+
let e = null, t = null;
|
|
32
|
+
D && ("string" == typeof D ? t = D : e = D);
|
|
33
|
+
const n = e ? null : v(P?.()?.getHyperlink());
|
|
34
|
+
return {
|
|
35
|
+
address: t ?? e?.address ?? n?.getAddress() ?? "",
|
|
36
|
+
textToDisplay: e?.textToDisplay ?? n?.getTextToDisplay() ?? ""
|
|
37
|
+
};
|
|
38
|
+
}, [D, P]), z = V.address.startsWith("#"), B = i(() => O(V.address), [V.address]), [N, U] = d(z ? "document" : B ? "email" : "url"), [q, G] = d(z || B ? "" : V.address), [J, K] = d(B?.address ?? ""), [Q, X] = d(B?.subject ?? ""), [Y, Z] = d(() => z && V.address.substring(1) || null), [_, ee] = d(z ? V.address.substring(1) : ""), [te, ne] = d(null), [le, re] = d(() => {
|
|
39
|
+
const e = P?.().getText({ useFormattingCategory: !0 }) ?? V.textToDisplay;
|
|
40
|
+
return e === V.address || B && e === B.address ? "" : e;
|
|
41
|
+
}), [se, oe] = d(!1), ae = a(), ie = u(null), ue = u(null), de = l(() => {
|
|
42
|
+
ie.current?.querySelector("input.autoFocus")?.focus(), ue.current?.engage();
|
|
43
|
+
}, []), pe = u(N);
|
|
44
|
+
o(() => {
|
|
45
|
+
pe.current !== N && (pe.current = N, de());
|
|
46
|
+
}, [N]);
|
|
47
|
+
const ce = i(() => {
|
|
48
|
+
const e = P?.()?.getWorksheet()?.getName();
|
|
49
|
+
return e ? { scope: e } : void 0;
|
|
50
|
+
}, [P]), me = "point" === n().getMode()?.mode, ge = l((e) => {
|
|
51
|
+
re(e.target.value);
|
|
52
|
+
}, []), he = l(() => {
|
|
53
|
+
if ("document" === N) {
|
|
54
|
+
if ("string" == typeof Y) {
|
|
55
|
+
const e = Y.trim();
|
|
56
|
+
return e ? `#${e}` : null;
|
|
57
|
+
}
|
|
58
|
+
const e = Y?.getReferences()?.getAddress();
|
|
59
|
+
return e ? `#${e}` : null;
|
|
60
|
+
}
|
|
61
|
+
return "email" === N ? ((e, t) => {
|
|
62
|
+
let n = e.trim();
|
|
63
|
+
if (F(n) && (n = n.substring(7)), !n) return null;
|
|
64
|
+
const l = t.trim();
|
|
65
|
+
return `${I}${n}${l ? `?subject=${encodeURIComponent(l)}` : ""}`;
|
|
66
|
+
})(J, Q) : "" === q ? null : q;
|
|
67
|
+
}, [
|
|
68
|
+
N,
|
|
69
|
+
Y,
|
|
70
|
+
q,
|
|
71
|
+
J,
|
|
72
|
+
Q
|
|
73
|
+
]), ye = l(async (e) => {
|
|
74
|
+
const t = e === E;
|
|
75
|
+
if (!t) {
|
|
76
|
+
const e = he();
|
|
77
|
+
let t = e;
|
|
78
|
+
e?.startsWith("#") ? t = e.substring(1) : "email" === N && e && (t = O(e)?.address ?? e), j?.({
|
|
79
|
+
address: e,
|
|
80
|
+
textToDisplay: ("" === le ? t : le) ?? null
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
w?.(e, t, e === $), R?.();
|
|
84
|
+
}, [
|
|
85
|
+
he,
|
|
86
|
+
N,
|
|
87
|
+
le,
|
|
88
|
+
j,
|
|
89
|
+
R,
|
|
90
|
+
w,
|
|
91
|
+
$,
|
|
92
|
+
E
|
|
93
|
+
]), fe = l(async (e) => !1 !== await Promise.resolve(M?.(e)) && ("document" !== N || !te), [
|
|
94
|
+
M,
|
|
95
|
+
N,
|
|
96
|
+
te
|
|
97
|
+
]), xe = "document" === N ? _ : "email" === N ? J : q;
|
|
98
|
+
return m(p, {
|
|
99
|
+
title: L(S ? "hyperlink.titleEdit" : "hyperlink.titleInsert"),
|
|
100
|
+
options: W,
|
|
101
|
+
onDone: R,
|
|
102
|
+
onOption: (e) => ye(e),
|
|
103
|
+
onValidateOption: fe,
|
|
104
|
+
defaultOption: $,
|
|
105
|
+
cancelOption: E,
|
|
106
|
+
autoFocusSel: ".autoFocus",
|
|
107
|
+
suspendModal: me,
|
|
108
|
+
sx: {
|
|
109
|
+
width: "480px",
|
|
110
|
+
...A
|
|
111
|
+
},
|
|
112
|
+
...H,
|
|
113
|
+
children: g(h, {
|
|
114
|
+
ref: ie,
|
|
115
|
+
sx: {
|
|
116
|
+
paddingTop: (e) => e.spacing(1),
|
|
117
|
+
paddingBottom: (e) => e.spacing(0),
|
|
118
|
+
rowGap: (e) => e.spacing(1),
|
|
119
|
+
display: "flex",
|
|
120
|
+
flexDirection: "column"
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
g(y, {
|
|
124
|
+
sx: {
|
|
125
|
+
minWidth: 135,
|
|
126
|
+
width: "100%"
|
|
127
|
+
},
|
|
128
|
+
size: "small",
|
|
129
|
+
children: [m(f, {
|
|
130
|
+
id: ae,
|
|
131
|
+
children: L("hyperlink.linkTo")
|
|
132
|
+
}), g(b, {
|
|
133
|
+
labelId: ae,
|
|
134
|
+
value: N,
|
|
135
|
+
label: L("hyperlink.linkTo"),
|
|
136
|
+
MenuProps: {
|
|
137
|
+
disableRestoreFocus: !0,
|
|
138
|
+
slotProps: { transition: { onExited: de } },
|
|
139
|
+
container: () => document.fullscreenElement
|
|
140
|
+
},
|
|
141
|
+
onChange: (e) => {
|
|
142
|
+
U(e.target.value);
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
m(x, {
|
|
146
|
+
value: "url",
|
|
147
|
+
children: L("hyperlink.typeWebPage")
|
|
148
|
+
}),
|
|
149
|
+
m(x, {
|
|
150
|
+
value: "document",
|
|
151
|
+
children: L("hyperlink.typeInDocument")
|
|
152
|
+
}),
|
|
153
|
+
m(x, {
|
|
154
|
+
value: "email",
|
|
155
|
+
children: L("hyperlink.typeEmail")
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
})]
|
|
159
|
+
}),
|
|
160
|
+
"email" === N ? g(c, { children: [m(t, {
|
|
161
|
+
sx: C,
|
|
162
|
+
label: L("hyperlink.emailAddress"),
|
|
163
|
+
defaultInput: L("hyperlink.emailPlaceholder"),
|
|
164
|
+
value: J,
|
|
165
|
+
onChangeInput: (e) => K(e),
|
|
166
|
+
onFocus: (e) => {
|
|
167
|
+
se || e.target?.select?.(), oe(!0);
|
|
168
|
+
}
|
|
169
|
+
}), m(t, {
|
|
170
|
+
label: L("hyperlink.subject"),
|
|
171
|
+
defaultInput: "",
|
|
172
|
+
value: Q,
|
|
173
|
+
onChangeInput: (e) => X(e),
|
|
174
|
+
onFocus: () => oe(!0)
|
|
175
|
+
})] }) : "document" === N ? m(e, {
|
|
176
|
+
sx: C,
|
|
177
|
+
grammar: "reference",
|
|
178
|
+
apiRef: ue,
|
|
179
|
+
classNameInput: "autoFocus",
|
|
180
|
+
label: L("hyperlink.reference"),
|
|
181
|
+
value: Y,
|
|
182
|
+
allowMulti: !1,
|
|
183
|
+
home: ce,
|
|
184
|
+
onChangeInput: (e) => Z(e),
|
|
185
|
+
onChangeText: (e) => ee(e),
|
|
186
|
+
onChangeError: (e) => ne(e),
|
|
187
|
+
onFocus: (e) => {
|
|
188
|
+
se || e.target?.select?.(), oe(!0);
|
|
189
|
+
}
|
|
190
|
+
}) : m(t, {
|
|
191
|
+
sx: C,
|
|
192
|
+
label: L("hyperlink.address"),
|
|
193
|
+
defaultInput: L("hyperlink.addressPlaceholder"),
|
|
194
|
+
value: q,
|
|
195
|
+
onChangeInput: (e) => G(e),
|
|
196
|
+
onFocus: (e) => {
|
|
197
|
+
se || e.target?.select?.(), oe(!0);
|
|
198
|
+
}
|
|
199
|
+
}),
|
|
200
|
+
m(y, {
|
|
201
|
+
sx: {
|
|
202
|
+
paddingTop: (e) => e.spacing(1.5),
|
|
203
|
+
minWidth: 135,
|
|
204
|
+
width: "100%"
|
|
205
|
+
},
|
|
206
|
+
size: "small",
|
|
207
|
+
children: m(k, {
|
|
208
|
+
label: L("hyperlink.displayText"),
|
|
209
|
+
placeholder: xe,
|
|
210
|
+
onFocus: () => {
|
|
211
|
+
oe(!0);
|
|
212
|
+
},
|
|
213
|
+
sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
|
|
214
|
+
slotProps: {
|
|
215
|
+
inputLabel: { shrink: !0 },
|
|
216
|
+
htmlInput: {
|
|
217
|
+
spellCheck: !1,
|
|
218
|
+
autoComplete: "off",
|
|
219
|
+
sx: {
|
|
220
|
+
paddingTop: (e) => e.spacing(1.25),
|
|
221
|
+
paddingBottom: (e) => e.spacing(.75)
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
value: le,
|
|
226
|
+
onChange: ge,
|
|
227
|
+
onContextMenu: (e) => {
|
|
228
|
+
e.stopPropagation();
|
|
229
|
+
}
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
export { D as HyperlinkDialog, D as default };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { useTranslator as e } from "@sheetxl/utils-react";
|
|
8
|
+
import { useState as t } from "react";
|
|
9
|
+
import { OptionsDialog as o } from "@sheetxl/utils-mui";
|
|
10
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
11
|
+
import { Box as l, TextField as s, Typography as p } from "@mui/material";
|
|
12
|
+
var n = (n) => {
|
|
13
|
+
const i = e(), { description: u, requireCurrent: c = !1, onApply: d, title: m, sx: h, ...w } = n, [C, x] = t(""), [f, g] = t(""), [v, k] = t(""), [b, y] = t(!1), O = "" === f, F = v !== f, z = !O && !F;
|
|
14
|
+
return r(o, {
|
|
15
|
+
title: m ?? i(c ? "password.titleChange" : "password.title"),
|
|
16
|
+
options: ["Ok", "Cancel"],
|
|
17
|
+
defaultOption: "Ok",
|
|
18
|
+
cancelOption: "Cancel",
|
|
19
|
+
autoFocusSel: ".autoFocus",
|
|
20
|
+
sx: {
|
|
21
|
+
width: "380px",
|
|
22
|
+
...h
|
|
23
|
+
},
|
|
24
|
+
onValidateOption: (e) => "Cancel" === e || (y(!0), z),
|
|
25
|
+
onOption: (e, t) => {
|
|
26
|
+
if (!t && "Ok" === e) return d(f, c ? C : void 0);
|
|
27
|
+
},
|
|
28
|
+
...w,
|
|
29
|
+
children: a(l, {
|
|
30
|
+
sx: {
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
gap: (e) => e.spacing(2),
|
|
34
|
+
paddingTop: (e) => e.spacing(1)
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
u ? r(p, {
|
|
38
|
+
variant: "body2",
|
|
39
|
+
sx: { color: "text.secondary" },
|
|
40
|
+
children: u
|
|
41
|
+
}) : null,
|
|
42
|
+
c ? r(s, {
|
|
43
|
+
type: "password",
|
|
44
|
+
size: "small",
|
|
45
|
+
label: i("password.current"),
|
|
46
|
+
value: C,
|
|
47
|
+
onChange: (e) => x(e.target.value),
|
|
48
|
+
slotProps: {
|
|
49
|
+
inputLabel: { shrink: !0 },
|
|
50
|
+
htmlInput: {
|
|
51
|
+
className: "autoFocus",
|
|
52
|
+
autoComplete: "current-password",
|
|
53
|
+
spellCheck: !1
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}) : null,
|
|
57
|
+
r(s, {
|
|
58
|
+
type: "password",
|
|
59
|
+
size: "small",
|
|
60
|
+
label: i(c ? "password.new" : "password.label"),
|
|
61
|
+
value: f,
|
|
62
|
+
error: b && O,
|
|
63
|
+
helperText: b && O ? i("password.required") : " ",
|
|
64
|
+
onChange: (e) => g(e.target.value),
|
|
65
|
+
slotProps: {
|
|
66
|
+
inputLabel: { shrink: !0 },
|
|
67
|
+
htmlInput: {
|
|
68
|
+
className: c ? void 0 : "autoFocus",
|
|
69
|
+
autoComplete: "new-password",
|
|
70
|
+
spellCheck: !1
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
r(s, {
|
|
75
|
+
type: "password",
|
|
76
|
+
size: "small",
|
|
77
|
+
label: i("protection.passwordConfirm"),
|
|
78
|
+
value: v,
|
|
79
|
+
error: b && !O && F,
|
|
80
|
+
helperText: b && !O && F ? i("protection.passwordMismatch") : " ",
|
|
81
|
+
onChange: (e) => k(e.target.value),
|
|
82
|
+
slotProps: {
|
|
83
|
+
inputLabel: { shrink: !0 },
|
|
84
|
+
htmlInput: {
|
|
85
|
+
autoComplete: "new-password",
|
|
86
|
+
spellCheck: !1
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
export { n as PasswordDialog, n as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
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.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|