@sheetxl/studio-mui 0.7.28-beta.3 → 0.8.0-beta.1
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/cjs/Bte6P3MhSjajJmmY.cjs +7 -0
- package/browser/cjs/CYxc8vnRi8dNpDPk.cjs +1 -0
- package/browser/cjs/{DBJLJGiCGXesx5n6.cjs → Cm1APq2MraYNNhyI.cjs} +1 -1
- package/browser/cjs/{ByIEqNsvj52sihT9.cjs → DO8V31Z1ewgMA1di.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +11 -0
- package/browser/esm/{BkyDtDdvSl_AV9Gt.mjs → 3ydDykDMtDYbfVVn.mjs} +2 -2
- package/browser/esm/{CmORsa6FH_sUlG09.mjs → BUGepznywvV0tUjW.mjs} +2 -2
- package/browser/esm/{kwpr8OkbF3lZEN1T.mjs → BZBJG2tDdD3-VujP.mjs} +2 -2
- package/browser/esm/{_1Rr-Es6ahuX7Qhz.mjs → BoLxSRdEWt-Yg2RI.mjs} +2 -2
- package/browser/esm/{CA-Mxp0a5qYu-eQC.mjs → BuY3uV47Bwbqpasq.mjs} +1 -1
- package/browser/esm/{BwGPqPTphFbyCgv1.mjs → Bz5LiUe3SZ8g42Ia.mjs} +1 -1
- package/browser/esm/{DqyGltio8npJVndh.mjs → CAs1MWvJTcRfJy26.mjs} +2 -2
- package/browser/esm/{FInOepzy3-iT5cjT.mjs → CBU3LgLYmqtQjJbu.mjs} +1 -1
- package/browser/esm/{D_YPZjHwcGU0e_CU.mjs → CDU0rqpLNVtMLI-f.mjs} +1 -1
- package/browser/esm/{CEQHdobx2heqC_xT.mjs → CVBub6pgTsJzCc5m.mjs} +1458 -1420
- package/browser/esm/{DgBl7UkteQ4zL4kL.mjs → CVfuCNRpODUw04IH.mjs} +1 -1
- package/browser/esm/{B5C5eyh4pBM5mSve.mjs → C_XvSsQ9BVdHffCO.mjs} +2 -2
- package/browser/esm/{DEEXBFwk1sZkiUlr.mjs → Cd6n1XUgF0VItpkH.mjs} +1 -1
- package/browser/esm/{CTXaV5uwcruyrMp0.mjs → ChwS_ougBsogOEsP.mjs} +2 -2
- package/browser/esm/{JyGi5nNsg4qKS5j4.mjs → Cj2pgCNqBCGl4rTX.mjs} +9 -5
- package/browser/esm/{CTaMCLRdYJ1uFxE2.mjs → DMLXV4EKl1NCp_jk.mjs} +2 -2
- package/browser/esm/{DnXdm8bvu4pg43G2.mjs → DNDrQKMTzKzNMjl-.mjs} +1 -1
- package/browser/esm/{B7brtmmNB6T3RNY2.mjs → FT29q8yNwsEpVZjt.mjs} +2057 -1677
- package/browser/esm/{C6TVYNeH2nr88ReK.mjs → Hb1rlHT4tE5hLcjM.mjs} +2 -2
- package/browser/esm/{gpMEXsQ5UNiXgQmz.mjs → UJOXCQv6KrG1gY3l.mjs} +1 -1
- package/browser/esm/index.mjs +22 -22
- package/browser/esm/rU8xNPVQtDSnujM-.mjs +236 -0
- package/browser/esm/{CKuKgvw5RwhXSGSf.mjs → s46El7mT6oKLSnYB.mjs} +2 -2
- package/browser/esm/{DuidI13hr0XjasSY.mjs → zWTZ8BvT4hjgC2ua.mjs} +2 -2
- package/licenses/dependencies.txt +34 -34
- package/node/esm/{0cz-6oYBrKiMBZM1.mjs → 9FY82fj1R1c-AczW.mjs} +1 -1
- package/node/esm/{CljT532ykR37FgiC.mjs → BA7VzUQ2sKRLTZ5c.mjs} +1 -1
- package/node/esm/{DvpO4eBfsgfawgqe.mjs → BhqI3pQFkV8K_612.mjs} +1 -1
- package/node/esm/{BKcg--YNK_xm5fas.mjs → BwZcoHDBmLPIVOT5.mjs} +1 -1
- package/node/esm/{OXH7uXxF8tahBwbJ.mjs → C-boHCnJditFzng3.mjs} +1 -1
- package/node/esm/{un1nvQ0PuZGhfCXp.mjs → CHi3AuWEwEPOg9IZ.mjs} +1 -1
- package/node/esm/{Dod4GwzFr8dcXjc0.mjs → CUMKTjYv6VTkcWYi.mjs} +1 -1
- package/node/esm/DM7K7-284z-PczVz.mjs +236 -0
- package/node/esm/{CA8JibkMn3a6soxi.mjs → DXZrzWee8K5FPOW1.mjs} +2 -2
- package/node/esm/DxXM8qHi0Oz4Zovl.mjs +4575 -0
- package/node/esm/{dLsmdAQ-_LdY1aTA.mjs → Qpuqm6xBr_da38Ht.mjs} +45 -45
- package/node/esm/index.mjs +2645 -2261
- package/node/esm/{TQrOnEDWuUSuD-8n.mjs → sQt2wWGTRLzqeJdG.mjs} +1 -1
- package/node/esm/{AndURfUyGlsYwOhZ.mjs → yCHAZKxJR7qY_ySy.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +5 -0
- package/resources/locales/de/ui.msg.json +8 -2
- package/resources/locales/en/groups.cmd.json +5 -0
- package/resources/locales/en/ui.msg.json +56 -2
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +1 -1
- package/types/src/command/CalculationOptionsCommandButton.d.ts +22 -0
- package/types/src/command/index.d.ts +1 -0
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +27 -0
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +10 -8
- package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +30 -2
- package/types/src/conditionalFormat/RulePreview.d.ts +1 -1
- package/types/src/conditionalFormat/ScaleStopRow.d.ts +8 -2
- package/types/src/conditionalFormat/iconSetMessages.d.ts +9 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +7 -0
- package/types/src/statusBar/CalculationRequiredStatus.d.ts +21 -0
- package/types/src/statusBar/CircularReferenceStatus.d.ts +23 -0
- package/types/src/statusBar/index.d.ts +2 -0
- package/browser/cjs/B1OGLm0sOXRWoOqW.cjs +0 -7
- package/browser/cjs/C3moehR3VOd0LnmM.cjs +0 -1
- package/browser/cjs/fNAtMntE00ehero6.cjs +0 -11
- package/browser/esm/CX2cBzzCg_tfihaC.mjs +0 -191
- package/node/esm/54CtbSkcZ9yo4h42.mjs +0 -190
- package/node/esm/DFkg2JcjAxeK_RNA.mjs +0 -4536
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.1
|
|
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 f, InputLabel as y, 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 = "mailto:", I = (e) => e.length >= 7 && e.substring(0, 7).toLowerCase() === v, F = (e) => {
|
|
15
|
+
if (!I(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
|
+
}, O = s((s) => {
|
|
30
|
+
const { initialValue: O = null, context: D, onInput: P, onOption: j, onValidateOption: w, onDone: M, options: $ = T, defaultOption: E = $?.[0], cancelOption: R = "Cancel", sx: W, ...S } = s, A = r(), H = i(() => null !== (O ?? D?.()?.getHyperlink()), []), L = i(() => {
|
|
31
|
+
let e = null, t = null;
|
|
32
|
+
O && ("string" == typeof O ? t = O : e = O);
|
|
33
|
+
const n = e ? null : D?.()?.getHyperlink();
|
|
34
|
+
return {
|
|
35
|
+
address: t ?? e?.address ?? n?.getAddress() ?? "",
|
|
36
|
+
textToDisplay: e?.textToDisplay ?? n?.getTextToDisplay() ?? ""
|
|
37
|
+
};
|
|
38
|
+
}, [O, D]), V = L.address.startsWith("#"), z = i(() => F(L.address), [L.address]), [B, N] = d(V ? "document" : z ? "email" : "url"), [U, q] = d(V || z ? "" : L.address), [G, J] = d(z?.address ?? ""), [K, Q] = d(z?.subject ?? ""), [X, Y] = d(() => V && L.address.substring(1) || null), [Z, _] = d(V ? L.address.substring(1) : ""), [ee, te] = d(null), [ne, le] = d(() => {
|
|
39
|
+
const e = D?.().getText({ useFormattingCategory: !0 }) ?? L.textToDisplay;
|
|
40
|
+
return e === L.address || z && e === z.address ? "" : e;
|
|
41
|
+
}), [re, se] = d(!1), oe = a(), ae = u(null), ie = u(null), ue = l(() => {
|
|
42
|
+
ae.current?.querySelector("input.autoFocus")?.focus(), ie.current?.engage();
|
|
43
|
+
}, []), de = u(B);
|
|
44
|
+
o(() => {
|
|
45
|
+
de.current !== B && (de.current = B, ue());
|
|
46
|
+
}, [B]);
|
|
47
|
+
const pe = i(() => {
|
|
48
|
+
const e = D?.()?.getSheet()?.getName();
|
|
49
|
+
return e ? { scope: e } : void 0;
|
|
50
|
+
}, [D]), ce = "point" === n().getMode()?.mode, me = l((e) => {
|
|
51
|
+
le(e.target.value);
|
|
52
|
+
}, []), ge = l(() => {
|
|
53
|
+
if ("document" === B) {
|
|
54
|
+
if ("string" == typeof X) {
|
|
55
|
+
const e = X.trim();
|
|
56
|
+
return e ? `#${e}` : null;
|
|
57
|
+
}
|
|
58
|
+
const e = X?.getReferences()?.getAddress();
|
|
59
|
+
return e ? `#${e}` : null;
|
|
60
|
+
}
|
|
61
|
+
return "email" === B ? ((e, t) => {
|
|
62
|
+
let n = e.trim();
|
|
63
|
+
if (I(n) && (n = n.substring(7)), !n) return null;
|
|
64
|
+
const l = t.trim();
|
|
65
|
+
return `${v}${n}${l ? `?subject=${encodeURIComponent(l)}` : ""}`;
|
|
66
|
+
})(G, K) : "" === U ? null : U;
|
|
67
|
+
}, [
|
|
68
|
+
B,
|
|
69
|
+
X,
|
|
70
|
+
U,
|
|
71
|
+
G,
|
|
72
|
+
K
|
|
73
|
+
]), he = l(async (e) => {
|
|
74
|
+
const t = e === R;
|
|
75
|
+
if (!t) {
|
|
76
|
+
const e = ge();
|
|
77
|
+
let t = e;
|
|
78
|
+
e?.startsWith("#") ? t = e.substring(1) : "email" === B && e && (t = F(e)?.address ?? e), P?.({
|
|
79
|
+
address: e,
|
|
80
|
+
textToDisplay: ("" === ne ? t : ne) ?? null
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
j?.(e, t, e === E), M?.();
|
|
84
|
+
}, [
|
|
85
|
+
ge,
|
|
86
|
+
B,
|
|
87
|
+
ne,
|
|
88
|
+
P,
|
|
89
|
+
M,
|
|
90
|
+
j,
|
|
91
|
+
E,
|
|
92
|
+
R
|
|
93
|
+
]), fe = l(async (e) => !1 !== await Promise.resolve(w?.(e)) && ("document" !== B || !ee), [
|
|
94
|
+
w,
|
|
95
|
+
B,
|
|
96
|
+
ee
|
|
97
|
+
]), ye = "document" === B ? Z : "email" === B ? G : U;
|
|
98
|
+
return m(p, {
|
|
99
|
+
title: A(H ? "hyperlink.titleEdit" : "hyperlink.titleInsert"),
|
|
100
|
+
options: $,
|
|
101
|
+
onDone: M,
|
|
102
|
+
onOption: (e) => he(e),
|
|
103
|
+
onValidateOption: fe,
|
|
104
|
+
defaultOption: E,
|
|
105
|
+
cancelOption: R,
|
|
106
|
+
autoFocusSel: ".autoFocus",
|
|
107
|
+
suspendModal: ce,
|
|
108
|
+
sx: {
|
|
109
|
+
width: "480px",
|
|
110
|
+
...W
|
|
111
|
+
},
|
|
112
|
+
...S,
|
|
113
|
+
children: g(h, {
|
|
114
|
+
ref: ae,
|
|
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(f, {
|
|
124
|
+
sx: {
|
|
125
|
+
minWidth: 135,
|
|
126
|
+
width: "100%"
|
|
127
|
+
},
|
|
128
|
+
size: "small",
|
|
129
|
+
children: [m(y, {
|
|
130
|
+
id: oe,
|
|
131
|
+
children: A("hyperlink.linkTo")
|
|
132
|
+
}), g(b, {
|
|
133
|
+
labelId: oe,
|
|
134
|
+
value: B,
|
|
135
|
+
label: A("hyperlink.linkTo"),
|
|
136
|
+
MenuProps: {
|
|
137
|
+
disableRestoreFocus: !0,
|
|
138
|
+
slotProps: { transition: { onExited: ue } },
|
|
139
|
+
container: () => document.fullscreenElement
|
|
140
|
+
},
|
|
141
|
+
onChange: (e) => {
|
|
142
|
+
N(e.target.value);
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
m(x, {
|
|
146
|
+
value: "url",
|
|
147
|
+
children: A("hyperlink.typeWebPage")
|
|
148
|
+
}),
|
|
149
|
+
m(x, {
|
|
150
|
+
value: "document",
|
|
151
|
+
children: A("hyperlink.typeInDocument")
|
|
152
|
+
}),
|
|
153
|
+
m(x, {
|
|
154
|
+
value: "email",
|
|
155
|
+
children: A("hyperlink.typeEmail")
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
})]
|
|
159
|
+
}),
|
|
160
|
+
"email" === B ? g(c, { children: [m(t, {
|
|
161
|
+
sx: C,
|
|
162
|
+
label: A("hyperlink.emailAddress"),
|
|
163
|
+
defaultInput: A("hyperlink.emailPlaceholder"),
|
|
164
|
+
value: G,
|
|
165
|
+
onChangeInput: (e) => J(e),
|
|
166
|
+
onFocus: (e) => {
|
|
167
|
+
re || e.target?.select?.(), se(!0);
|
|
168
|
+
}
|
|
169
|
+
}), m(t, {
|
|
170
|
+
label: A("hyperlink.subject"),
|
|
171
|
+
defaultInput: "",
|
|
172
|
+
value: K,
|
|
173
|
+
onChangeInput: (e) => Q(e),
|
|
174
|
+
onFocus: () => se(!0)
|
|
175
|
+
})] }) : "document" === B ? m(e, {
|
|
176
|
+
sx: C,
|
|
177
|
+
grammar: "reference",
|
|
178
|
+
apiRef: ie,
|
|
179
|
+
classNameInput: "autoFocus",
|
|
180
|
+
label: A("hyperlink.reference"),
|
|
181
|
+
value: X,
|
|
182
|
+
allowMulti: !1,
|
|
183
|
+
home: pe,
|
|
184
|
+
onChangeInput: (e) => Y(e),
|
|
185
|
+
onChangeText: (e) => _(e),
|
|
186
|
+
onChangeError: (e) => te(e),
|
|
187
|
+
onFocus: (e) => {
|
|
188
|
+
re || e.target?.select?.(), se(!0);
|
|
189
|
+
}
|
|
190
|
+
}) : m(t, {
|
|
191
|
+
sx: C,
|
|
192
|
+
label: A("hyperlink.address"),
|
|
193
|
+
defaultInput: A("hyperlink.addressPlaceholder"),
|
|
194
|
+
value: U,
|
|
195
|
+
onChangeInput: (e) => q(e),
|
|
196
|
+
onFocus: (e) => {
|
|
197
|
+
re || e.target?.select?.(), se(!0);
|
|
198
|
+
}
|
|
199
|
+
}),
|
|
200
|
+
m(f, {
|
|
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: A("hyperlink.displayText"),
|
|
209
|
+
placeholder: ye,
|
|
210
|
+
onFocus: () => {
|
|
211
|
+
se(!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: ne,
|
|
226
|
+
onChange: me,
|
|
227
|
+
onContextMenu: (e) => {
|
|
228
|
+
e.stopPropagation();
|
|
229
|
+
}
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
export { O as HyperlinkDialog, O as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.1
|
|
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.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { w as e } from "./index.mjs";
|
|
8
8
|
import { ReactUtils as t } from "@sheetxl/utils-react";
|
|
9
9
|
import { Component as n, PureComponent as i, memo as s, useCallback as r, useLayoutEffect as o, useState as a } from "react";
|
|
10
10
|
import { jsx as l, jsxs as h } from "react/jsx-runtime";
|