@sheetxl/studio-vanilla 0.3.18 → 0.3.20
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/{M2DWfdK0ctQctT7T.cjs → B-9AKoIXEd-ulFuY.cjs} +2 -2
- package/browser/cjs/{CfnTR1Qy-WVFzRhw.cjs → BPdcMei67VVXsIlT.cjs} +4 -4
- package/browser/cjs/{Da9leDv0BrMDcAmM.cjs → BRJqic9ew--MKBtM.cjs} +1 -1
- package/browser/cjs/{S1ymoLlv7Uf-qfRz.cjs → BVX0aBbb7I-Kr9jc.cjs} +48 -48
- package/browser/cjs/BWmDn9V2sxtBmc6p.cjs +6 -0
- package/browser/cjs/{DRPysX3BgTyOtc_X.cjs → BpecyHhrGjCZE4te.cjs} +1 -1
- package/browser/cjs/{DvjIxJUC4K8kmZsN.cjs → BwGmOm-0YbK8wfol.cjs} +2 -2
- package/browser/cjs/{DAGAHrQyWku5BzOx.cjs → BzXx3M5W6subztPb.cjs} +2 -2
- package/browser/cjs/{C7S-2ysc4XzmIGIC.cjs → C0LJ0bF3u-3P9xS-.cjs} +2 -2
- package/browser/cjs/{DcKGSA3SMuEvjd87.cjs → C6t8cCjO4T_Spvjd.cjs} +1 -1
- package/browser/cjs/{_ziVh-PPWxWmEGfz.cjs → C9RhDco7MuSv11tm.cjs} +3 -3
- package/browser/cjs/{D_yi3Bmt7QylbNjX.cjs → CIERBNfPNBXwwSjF.cjs} +2 -2
- package/browser/cjs/{DWmar9vh-C0GMWUE.cjs → CLkZVJrhqrGRT7EY.cjs} +1 -1
- package/browser/cjs/{DU5bkZX7g1nGYiyr.cjs → CXwshmt0OewyJfbd.cjs} +2 -2
- package/browser/cjs/CcLVF4EIHey434Rb.cjs +6 -0
- package/browser/cjs/{BYKCnVVe-UC0DLAg.cjs → CgnC4fGFEo3MyV2x.cjs} +1 -1
- package/browser/cjs/{BQDBBqqYeHWRLSmz.cjs → Cl0cEDzKsPIVTFUl.cjs} +5 -5
- package/browser/cjs/{fkUUKUigUVeizJCn.cjs → DIonFfSsVgz-APZ5.cjs} +6 -6
- package/browser/cjs/{Cyis9v9OePqed0Dh.cjs → DV7nfhw95uXOc3j5.cjs} +2 -2
- package/browser/cjs/{DWRHniG382TBBpFz.cjs → D_m11V6SqD8ZwpMI.cjs} +3 -3
- package/browser/cjs/{DqW0_yEVBgywVFtY.cjs → DrepEMxM-QaJ8YDx.cjs} +1 -1
- package/browser/cjs/{DtIlU_avOLio9EiE.cjs → DtOzJ-WMg99faUjm.cjs} +1 -1
- package/browser/cjs/DttPtqkuFAJyEAN3.cjs +12 -0
- package/browser/cjs/{BqsLsLOIcCoQLkFG.cjs → Ggiiir_7aP_cXY_b.cjs} +2 -2
- package/browser/cjs/{asqh4V32TzlgSg5e.cjs → Vz5CvuEA-X08grjB.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/qZ6Vl_sLywkC5RaU.cjs +6 -0
- package/{cdn/assets/B048AhsMgarmATbo.js → browser/esm/2zQv7N1BLM5b5SIm.mjs} +9 -9
- package/browser/esm/{CxpsUomBmsPdQKN7.mjs → 3KBcYITgi01N4TNv.mjs} +7 -7
- package/{cdn/assets/B8PLUmI-u31BZVd6.js → browser/esm/8_OfjXQ6fzbtH-9u.mjs} +1 -1
- package/browser/esm/{Z1hTdWF7Gnd7lwEi.mjs → B6bM984q736FqYsz.mjs} +1 -1
- package/browser/esm/B7jQrPqkaYVNv-as.mjs +84 -0
- package/{cdn/assets/Dp2nf7t-XHCeT9z1.js → browser/esm/B8-YcyfsXmJeuMiP.mjs} +2 -2
- package/browser/esm/{DXfVp9l0_p8tTvaN.mjs → BHNhgRX5eU1xhun6.mjs} +3622 -3530
- package/browser/esm/{DyhSx6j-hlOPAYJZ.mjs → BJ7YCFsebpVSTx7u.mjs} +2 -2
- package/{cdn/assets/CMIrbndkU0UVjjQ_.js → browser/esm/BJQKOvL-x79vdFAs.mjs} +1 -1
- package/{cdn/assets/Dctd5ghWrESGG3Co.js → browser/esm/Bah4Gz0wMfZQ-d68.mjs} +1 -1
- package/browser/esm/Bas7osg_0v4Pzo34.mjs +41 -0
- package/browser/esm/{Ds9ulL0El--2XZxz.mjs → Bh-yYlNifjJSLSUP.mjs} +47 -47
- package/browser/esm/{CEM1UbNtZh6zUcI4.mjs → Bi5JEwcdCUy1Scr4.mjs} +3 -3
- package/browser/esm/{B_lXgGve4BaGb9VP.mjs → BoWW29GsMFycnCgj.mjs} +5 -5
- package/browser/esm/{vsshjgK_uLUMXLx1.mjs → CABW-eWs3Z1wU1vK.mjs} +90 -90
- package/browser/esm/{Dao0wUfvplQebarN.mjs → Cla5lXoGQSxvUMVw.mjs} +4 -4
- package/browser/esm/{yBjDi6dOfUg5E0mg.mjs → D0qgtKFnSobrHC2F.mjs} +5 -5
- package/browser/esm/{vO-cPppKuuwM-ZbD.mjs → D8bW70p6OB7P1DpI.mjs} +1 -1
- package/{cdn/assets/D0Cgu7sUw30-mnqB.js → browser/esm/DB1WsS0LRj2NPsFd.mjs} +7 -7
- package/browser/esm/{CCGl8RxWO4yKms9p.mjs → DgDZxwvfJyTly9Uu.mjs} +1 -1
- package/{cdn/assets/Cx5_1Ld9VgK4afkO.js → browser/esm/DmE1sCvAX5Z9Ia15.mjs} +1 -1
- package/browser/esm/HGUzGKrEwqYcdKbM.mjs +46 -0
- package/{cdn/assets/Bwmetegu2MJ05lq3.js → browser/esm/UPoO_Vlq41Hmj-Ku.mjs} +8 -8
- package/browser/esm/{Bu74cvcXGNxQ6eQO.mjs → dQ66kiennyNr0dND.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DscLpbq31HrJWVSt.mjs → pptIDlmrkAbz6i1c.mjs} +17 -17
- package/browser/esm/{DmdaLSunj1pIaeEo.mjs → x6PmuzLfP5nqS_eQ.mjs} +4 -4
- package/cdn/assets/{b5siqWNPQWp_hlIg.js → 0vZqExkLfT4asC9K.js} +2 -2
- package/cdn/assets/{DXZHEN_G41ARU9aP.js → 1ASZw9IfvnArDaCZ.js} +4 -4
- package/{browser/esm/B8PLUmI-u31BZVd6.mjs → cdn/assets/8_OfjXQ6fzbtH-9u.js} +1 -1
- package/cdn/assets/{IXjjn0b7hP-r-rz5.js → B5zelATPrbDla2Iy.js} +90 -90
- package/cdn/assets/{Z1hTdWF7Gnd7lwEi.js → B6bM984q736FqYsz.js} +1 -1
- package/cdn/assets/B7jQrPqkaYVNv-as.js +84 -0
- package/{browser/esm/CMIrbndkU0UVjjQ_.mjs → cdn/assets/BJQKOvL-x79vdFAs.js} +1 -1
- package/cdn/assets/{DpXpV2Nd-U9CeW99.js → BSsHFJzgfxmp5r7_.js} +4 -4
- package/{browser/esm/Dctd5ghWrESGG3Co.mjs → cdn/assets/Bah4Gz0wMfZQ-d68.js} +1 -1
- package/cdn/assets/{DcwFhmc6DauSay_m.js → BziPRQRGrFtCnyRv.js} +7 -7
- package/{browser/esm/xQa55VzyxKLtju1P.mjs → cdn/assets/C6y3ZvDtBqiKjmQR.js} +7 -7
- package/cdn/assets/CP2hI6uxS16oQXqQ.js +41 -0
- package/{browser/esm/xCvG1lefZTf09iDX.mjs → cdn/assets/CYXS2N-s5O4VNSpQ.js} +2 -2
- package/cdn/assets/{BfCDUWippQ188QJ_.js → CbXEnmr2CeR0TImv.js} +5 -5
- package/cdn/assets/{CXyKsX-Rk4hkAgns.js → CyUSCTdWkG7ZxVra.js} +3610 -3518
- package/cdn/assets/{DXkBcCCoCQhFBFpQ.js → D0NB6zWEw5Rdh0kS.js} +3 -3
- package/cdn/assets/{vO-cPppKuuwM-ZbD.js → D8bW70p6OB7P1DpI.js} +1 -1
- package/cdn/assets/{JWXHlKikGyP_aFCO.js → DYYGpOI8W9jNCrTX.js} +17 -17
- package/cdn/assets/{CCGl8RxWO4yKms9p.js → DgDZxwvfJyTly9Uu.js} +1 -1
- package/cdn/assets/{B5Xa0YYj-Y9Ob5he.js → Dj4FGU0a8x6XVJsN.js} +47 -47
- package/{browser/esm/Cx5_1Ld9VgK4afkO.mjs → cdn/assets/DmE1sCvAX5Z9Ia15.js} +1 -1
- package/cdn/assets/DresaRXt2fvt83HL.js +46 -0
- package/{browser/esm/5KE3eJeALYas2fJL.mjs → cdn/assets/TLsARwdDVPeqjguR.js} +9 -9
- package/cdn/assets/{Bu74cvcXGNxQ6eQO.js → dQ66kiennyNr0dND.js} +1 -1
- package/cdn/assets/{BKj70d8kss8lWQ5j.js → pgLOdNAK0tTv9jW5.js} +5 -5
- package/{browser/esm/BElryNS11jWM5tq7.mjs → cdn/assets/zMYtuFnY5e4kuvlC.js} +8 -8
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/types/index.d.ts +1 -1
- package/browser/cjs/BYQV2q8HPKlf74j3.cjs +0 -6
- package/browser/cjs/ClYi27L-BwfwOane.cjs +0 -6
- package/browser/cjs/DvCk-FEyF55Ifc2r.cjs +0 -6
- package/browser/cjs/hRorav-Vugk2j14d.cjs +0 -12
- package/browser/esm/CATPGvRDTTOuHtl8.mjs +0 -46
- package/browser/esm/DT7M18T3_fx1cPVf.mjs +0 -80
- package/browser/esm/Dmp9Rj_xUISYWU8A.mjs +0 -41
- package/cdn/assets/DBZHYaXm5oENOlcW.js +0 -41
- package/cdn/assets/DT7M18T3_fx1cPVf.js +0 -80
- package/cdn/assets/c46EuNJ8AHDaEf22.js +0 -46
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { memo as G, useState as x, useCallback as O, useEffect as H, useMemo as w } from "react";
|
|
3
3
|
import { NumberFormat as n } from "@sheetxl/sdk";
|
|
4
|
-
import {
|
|
4
|
+
import { v as l, av as K, b as q, B as P, F as S, aw as A, ax as J, a as p, ay as c, T as Q, $, az as U } from "./BHNhgRX5eU1xhun6.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
7
7
|
*
|
|
8
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
12
|
-
const { initialValue: I, context: h, onOption: b, onValidateOption: u, onInputOption: C, onDone: d, options: v =
|
|
11
|
+
const X = ["Ok", "Cancel"], ea = G((D) => {
|
|
12
|
+
const { initialValue: I, context: h, onOption: b, onValidateOption: u, onInputOption: C, onDone: d, options: v = X, defaultOption: r = v?.[0], cancelOption: m = "Cancel", sx: N, ...V } = D, [e, T] = x(I), [j, z] = x(!1), g = O(async (a, o) => !0, []), y = l(async (a) => {
|
|
13
13
|
C?.(e, a), b?.(a, a === m, a === r), d?.();
|
|
14
14
|
}, [e, C, d, b, m, r]), B = l(async (a) => {
|
|
15
15
|
a.keyCode === K.Enter && await g?.(e, null) !== !1 && y(r);
|
|
@@ -27,7 +27,7 @@ const U = ["Ok", "Cancel"], ea = G(($) => {
|
|
|
27
27
|
F(n.Styles.lookupStyle(e).formatType ?? n.Type.Custom);
|
|
28
28
|
}, [e]);
|
|
29
29
|
const L = w(() => {
|
|
30
|
-
const a = n.Styles.lookupPrimary(), o = (i) => t(
|
|
30
|
+
const a = n.Styles.lookupPrimary(), o = (i) => t(U, { value: i, children: i }, i), s = Object.keys(a).map((i) => o(a[i].formatType));
|
|
31
31
|
return s.push(o(n.Type.Custom)), s;
|
|
32
32
|
}, []), R = O((a) => {
|
|
33
33
|
const o = a.target.value;
|
|
@@ -38,11 +38,11 @@ const U = ["Ok", "Cancel"], ea = G(($) => {
|
|
|
38
38
|
const a = h();
|
|
39
39
|
return a.createTemporaryCell({ value: a.getValue() ?? 12345, style: { numberFormat: e } });
|
|
40
40
|
}, [k, e, h]);
|
|
41
|
-
return t(
|
|
41
|
+
return t(q, { title: "Number Format", options: v, onDone: d, onOption: (a) => y(a), onValidateOption: E, defaultOption: r, cancelOption: m, autoFocusSel: ".autoFocus", sx: { width: "580px", ...N }, ...V, children: f(P, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0), rowGap: (a) => a.spacing(1), display: "flex", flexDirection: "column" }, children: [f(S, { sx: { minWidth: 135 }, size: "small", children: [t(A, { children: "Category" }), t(J, { value: k, label: "Category", onChange: R, sx: { backgroundImage: `linear-gradient(${p("#fff", c(5))}, ${p("#fff", c(5))})` }, children: L })] }), t(S, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(Q, { label: "Code", onFocus: (a) => {
|
|
42
42
|
j || a.target?.select(), z(!0);
|
|
43
43
|
}, sx: { "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", c(5))}, ${p("#fff", c(5))})` } } }, value: e, onChange: M, onKeyDown: B, onContextMenu: (a) => {
|
|
44
44
|
a.stopPropagation();
|
|
45
|
-
} }) }), f(P, { children: [t(
|
|
45
|
+
} }) }), f(P, { children: [t($, { variant: "caption", component: "div", sx: { paddingLeft: (a) => a.spacing(2) }, children: "Preview" }), t($, { variant: "body2", component: "div", sx: { borderRadius: (a) => `${a.shape.borderRadius}px`, padding: (a) => a.spacing(1), border: (a) => `1px solid ${a.palette.grey[400]}` }, children: W.getNumberFormat().displayText || "(empty)" })] })] }) });
|
|
46
46
|
});
|
|
47
47
|
export {
|
|
48
48
|
ea as NumberFormatDialog,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Je from "react";
|
|
2
2
|
import { createElement as $r, forwardRef as Ya, useRef as Xa, useImperativeHandle as Wa, useEffect as Ha } from "react";
|
|
3
3
|
/**
|
|
4
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
4
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
5
5
|
*
|
|
6
6
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
7
7
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as o, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { memo as E, useMemo as b, useState as g, useCallback as O } from "react";
|
|
3
|
+
import { v as f, b as S, B as U, F as P, T as D, a as l, ay as p } from "./BHNhgRX5eU1xhun6.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
6
|
+
*
|
|
7
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
|
+
*/
|
|
10
|
+
const V = ["Ok", "Cancel"], J = E((F) => {
|
|
11
|
+
const { initialHyperlink: n = null, initialDisplay: v = null, onUpdateHyperlink: m, context: s, onOption: x, onValidateOption: r, onDone: d, options: h = V, defaultOption: c = h?.[0], cancelOption: i = "Cancel", sx: H, ...I } = F, w = b(() => (n ?? s?.()?.getHyperlink()) !== null, []), y = b(() => {
|
|
12
|
+
let a = null, t = null;
|
|
13
|
+
n && (typeof n == "string" ? t = n : a = n);
|
|
14
|
+
const C = a ?? s?.()?.getHyperlink();
|
|
15
|
+
return { address: t ?? C?.getAddress() ?? "", textToDisplay: C?.getDisplayText() ?? "" };
|
|
16
|
+
}, [n, s]), [e, M] = g(y.address), [u, B] = g(() => {
|
|
17
|
+
const a = s?.().toTextUnformatted() ?? v;
|
|
18
|
+
return a === y.address ? "" : a;
|
|
19
|
+
}), [$, k] = g(!1), L = O((a) => {
|
|
20
|
+
B(a.target.value);
|
|
21
|
+
}, []), T = O(async (a, t) => null, []), W = f(async (a) => {
|
|
22
|
+
a !== i && m?.(e === "" ? null : { address: e }, u), x?.(a, a === i, a === c), d?.();
|
|
23
|
+
}, [e, u, m, d, x, c, i]), j = f((a) => {
|
|
24
|
+
M(a.target.value), T(a.target.value, null);
|
|
25
|
+
}, [r]), z = f(async (a) => {
|
|
26
|
+
let t = await Promise.resolve(r?.(a));
|
|
27
|
+
try {
|
|
28
|
+
t !== !1 && (t = await T(e, a));
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
return t ?? !0;
|
|
32
|
+
}, [r]);
|
|
33
|
+
return o(S, { title: (w ? "Edit" : "Insert") + " Link", options: h, onDone: d, onOption: (a) => W(a), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...H }, ...I, children: A(U, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0), rowGap: (a) => a.spacing(1), display: "flex", flexDirection: "column" }, children: [o(P, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (a) => {
|
|
34
|
+
$ || a.target?.select(), k(!0);
|
|
35
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: e, onChange: j, onContextMenu: (a) => {
|
|
36
|
+
a.stopPropagation();
|
|
37
|
+
} }) }), o(P, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Display Text", placeholder: e?.startsWith("#") ? e.substring(1) : e, onFocus: () => {
|
|
38
|
+
k(!0);
|
|
39
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: u, onChange: L, onContextMenu: (a) => {
|
|
40
|
+
a.stopPropagation();
|
|
41
|
+
} }) })] }) });
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
J as HyperlinkDialog,
|
|
45
|
+
J as default
|
|
46
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, useState as i, useCallback as k } from "react";
|
|
3
|
+
import { v, b as w, B as j, aP as y, at as B, au as F } from "./BHNhgRX5eU1xhun6.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
6
6
|
*
|
|
7
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
9
|
*/
|
|
10
|
-
const H = ["Ok", "Cancel"], A =
|
|
11
|
-
const { tableOptions: e, context: p, onOption: c, onValidateOption: I, onDone: r, options: d = H, defaultOption: t = d?.[0], cancelOption: s = "Cancel", sx: m, ...b } = u, [h, x] = i(!1), [n, O] = i(() => e?.hasHeader ?? !1), [l, f] = i(() => e?.ranges ?? null), C =
|
|
10
|
+
const H = ["Ok", "Cancel"], A = T((u) => {
|
|
11
|
+
const { tableOptions: e, context: p, onOption: c, onValidateOption: I, onDone: r, options: d = H, defaultOption: t = d?.[0], cancelOption: s = "Cancel", sx: m, ...b } = u, [h, x] = i(!1), [n, O] = i(() => e?.hasHeader ?? !1), [l, f] = i(() => e?.ranges ?? null), C = v((a) => {
|
|
12
12
|
const g = { ...e, hasHeader: n, ranges: l };
|
|
13
13
|
c?.(a, a === s, a === t), r?.({ option: a, tableOptions: g });
|
|
14
|
-
}, [r, c, t, s, n, l, e]),
|
|
15
|
-
return o(
|
|
14
|
+
}, [r, c, t, s, n, l, e]), D = k(async (a, g) => null, []);
|
|
15
|
+
return o(w, { title: "Insert Table", options: d, onDone: C, onValidateOption: D, defaultOption: t, cancelOption: s, autoFocusSel: ".range-input input", sx: { width: "360px", ...m }, ...b, children: N(j, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0), rowGap: (a) => a.spacing(1), display: "flex", flexDirection: "column" }, children: [o(y, { formName: "range", value: l, onChangeInput: (a) => f(a), resolvedAddress: p.getNames().getRanges.bind(p.getNames()), onFocus: (a) => {
|
|
16
16
|
h || a.target?.select(), x(!0);
|
|
17
17
|
} }), o(B, { control: o(F, { checked: n, onChange: () => O(!n) }), label: "Table has headers", labelPlacement: "end" })] }) });
|
|
18
18
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
package/browser/esm/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react-dom/client";
|
|
4
|
-
import { b6 as i } from "./
|
|
4
|
+
import { b6 as i } from "./BHNhgRX5eU1xhun6.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
7
7
|
*
|
|
8
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { memo as oe, useRef as C, useState as b, useEffect as L, useLayoutEffect as pe, useMemo as de } from "react";
|
|
3
3
|
import { ICell as c, IRange as R } from "@sheetxl/sdk";
|
|
4
|
-
import { t as D,
|
|
5
|
-
import { C as ee } from "./
|
|
4
|
+
import { t as D, v as H, av as ue, V as fe, aA as ge, aB as me, B as O, aC as m, ah as x, aD as xe, a8 as y, aE as he, T as _, a as k, aF as Oe, aG as Ce, aH as ye, aI as be, ay as w, aJ as ve, aK as Te, ak as Re, az as ke, F as we, aw as Ee, ax as Fe } from "./BHNhgRX5eU1xhun6.mjs";
|
|
5
|
+
import { C as ee } from "./CABW-eWs3Z1wU1vK.mjs";
|
|
6
6
|
/**
|
|
7
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
7
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
8
8
|
*
|
|
9
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -27,23 +27,23 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
|
27
27
|
if (h[d] === E) return d;
|
|
28
28
|
}
|
|
29
29
|
}, ze = oe((E) => {
|
|
30
|
-
const { replace: h = !1, findText: r, replaceText: a, findOptions: d, replaceOptions: v, title: A, onHide: K, onFindOrReplace: T, ...P } = E, s = C(null), u = C(null),
|
|
30
|
+
const { replace: h = !1, findText: r, replaceText: a, findOptions: d, replaceOptions: v, title: A, onHide: K, onFindOrReplace: T, ...P } = E, s = C(null), u = C(null), $ = C(null), W = C(null), j = C(null), N = C(null), G = (e, t) => {
|
|
31
31
|
t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
|
|
32
|
-
}, [J, I] = b(!1), [
|
|
32
|
+
}, [J, I] = b(!1), [V, le] = b(!1), [f, B] = b(h), [U, M] = b(!1), [X, q] = b(!1), [o, l] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: te.Sheet }), F = H(async (e, t, n, S) => {
|
|
33
33
|
if (!T) return;
|
|
34
34
|
const g = { ...o };
|
|
35
35
|
g.replaceOptions = { ...g.replaceOptions }, g.findOptions = { ...g.findOptions }, g.replaceOptions.maxCount = n ? void 0 : 1, g.replace = t, t && o.findOptions.fields?.[0] === c.Content.Values && (g.findOptions.fields = [c.Content.Formulas]), g.findOptions.reverse = !e;
|
|
36
36
|
const ce = await T({ autoFocus: S, ...g });
|
|
37
|
-
|
|
37
|
+
M(ce === 0);
|
|
38
38
|
}, [o, T]);
|
|
39
39
|
L(() => {
|
|
40
|
-
|
|
41
|
-
}, [o,
|
|
40
|
+
M(!1);
|
|
41
|
+
}, [o, V, f]);
|
|
42
42
|
const Q = H((e, t) => {
|
|
43
43
|
if (e.keyCode === ue.Enter) {
|
|
44
44
|
if (!o.findText) return;
|
|
45
45
|
let n = !0, S = !1;
|
|
46
|
-
e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (S = !0), G(e, S ? N.current : j.current)) : G(e, n ?
|
|
46
|
+
e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (S = !0), G(e, S ? N.current : j.current)) : G(e, n ? W.current : $.current), F(n, t, S, !1);
|
|
47
47
|
}
|
|
48
48
|
}, [o]), Y = C(null);
|
|
49
49
|
pe(() => {
|
|
@@ -51,7 +51,7 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
|
51
51
|
const t = { ...e };
|
|
52
52
|
t.findText = r && r.length > 0 ? r : e.findText ?? "", I(!0), a !== void 0 && (t.replaceText = a), d && (t.findOptions = { ...t.findOptions, ...d }), t.replaceText || (t.replaceText = ""), t.replaceOptions && (t.replaceOptions = { ...t.replaceOptions }), v && (t.replaceOptions = { ...t.replaceOptions, ...v }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
|
|
53
53
|
const n = !(!v && a === void 0);
|
|
54
|
-
return n &&
|
|
54
|
+
return n && B(n), t;
|
|
55
55
|
}), X || Y.current?.focus();
|
|
56
56
|
}, [r, a, d, v]), L(() => {
|
|
57
57
|
f ? (o.findOptions.fields[0], c.Content.Values) : I(!0);
|
|
@@ -62,9 +62,9 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
|
62
62
|
}, [J, o]);
|
|
63
63
|
const [re, { width: Z }] = fe();
|
|
64
64
|
return i(ge, { title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", refWindow: Y, onHide: K, onFocus: () => q(!0), onBlur: () => {
|
|
65
|
-
q(!1),
|
|
65
|
+
q(!1), M(!1);
|
|
66
66
|
}, PaperProps: { elevation: X ? 3 : 1 }, ...P, children: p(me, { dividers: !0, ref: re, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
|
|
67
|
-
if (e.key === "h" && e.ctrlKey)
|
|
67
|
+
if (e.key === "h" && e.ctrlKey) B(!0), s.current?.contains(document.activeElement) && u.current?.focus();
|
|
68
68
|
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
69
69
|
else if (e.key === "c" && e.altKey) l((t) => {
|
|
70
70
|
const n = { ...t };
|
|
@@ -82,10 +82,10 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
e.preventDefault();
|
|
85
|
-
}, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected:
|
|
85
|
+
}, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected: V, onSelectToggle: (e) => {
|
|
86
86
|
le(e);
|
|
87
87
|
}, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(xe, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
|
|
88
|
-
|
|
88
|
+
B(e);
|
|
89
89
|
}, preventFocus: !0, label: "Toggle Replace", icon: x(i(he, {})), shortcut: { key: f ? "F" : "H", modifiers: [y.Ctrl] } })] }), p(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(_, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Z > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${k("#fff", w(5))}, ${k("#fff", w(5))})` }, inputProps: { draggable: !1, ref: s, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } }, endAdornment: i(Oe, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [i(m, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
|
|
90
90
|
l((t) => {
|
|
91
91
|
const n = { ...t };
|
|
@@ -110,9 +110,9 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
|
110
110
|
e.stopPropagation();
|
|
111
111
|
} }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
112
112
|
F(!1, !1);
|
|
113
|
-
}, touchRippleRef:
|
|
113
|
+
}, touchRippleRef: $, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Se, {}) : i(De, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
114
114
|
F(!0, !1);
|
|
115
|
-
}, touchRippleRef:
|
|
115
|
+
}, touchRippleRef: W, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Le, {}) : i(Ie, {})), disabled: !o.findText })] }), i(ee, { in: f, timeout: ne, onExit: () => {
|
|
116
116
|
s.current?.focus();
|
|
117
117
|
}, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(_, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${k("#fff", w(5))}, ${k("#fff", w(5))})` }, inputProps: { ref: u, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
|
|
118
118
|
l((t) => {
|
|
@@ -125,7 +125,7 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
|
125
125
|
F(!0, !0);
|
|
126
126
|
}, touchRippleRef: j, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(ve, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
|
|
127
127
|
F(!0, !0, !0);
|
|
128
|
-
}, touchRippleRef: N, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Te, {})), disabled: !o.findText })] }) })] })] }), i(ee, { in:
|
|
128
|
+
}, touchRippleRef: N, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Te, {})), disabled: !o.findText })] }) })] })] }), i(ee, { in: V, timeout: ne, onExit: () => {
|
|
129
129
|
s.current?.focus();
|
|
130
130
|
}, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(Re, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Z >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i(z, { label: "Within", value: o.scope, options: te, onSelect: (e) => {
|
|
131
131
|
l((t) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as H, jsxs as We } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { d as to, g as oo, u as no, s as ro, m as io, aT as Q, n as lo, p as so, aU as ao, aV as co, a as Z, aA as uo, aB as ho, av as wt, J as fo, B as he, T as po, aF as mo, a0 as go, a2 as vo, ay as fe, at as _o, au as So, $ as yo, aW as wo, aX as Co, aY as De, aZ as xo, a_ as Ro, a$ as bo, H as ye, b0 as To, b1 as zo, b2 as K, b3 as Io, b4 as V, b5 as Po } from "./BHNhgRX5eU1xhun6.mjs";
|
|
3
3
|
import * as x from "react";
|
|
4
4
|
import Ct, { useState as pe, useMemo as ko, useEffect as je, cloneElement as Oo } from "react";
|
|
5
|
-
import { f as N } from "./
|
|
5
|
+
import { f as N } from "./CABW-eWs3Z1wU1vK.mjs";
|
|
6
6
|
/**
|
|
7
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
7
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
8
8
|
*
|
|
9
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -2147,7 +2147,7 @@ function an(o) {
|
|
|
2147
2147
|
return v;
|
|
2148
2148
|
}, [n, e]), [s, c] = pe(null);
|
|
2149
2149
|
je(() => {
|
|
2150
|
-
import("./
|
|
2150
|
+
import("./8_OfjXQ6fzbtH-9u.mjs").then((u) => {
|
|
2151
2151
|
c(new u.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
|
|
2152
2152
|
});
|
|
2153
2153
|
}, [a]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -13,7 +13,7 @@ const i = { reactUrl: "https://esm.sh/react@19.1.0", reactJsxTransform: "https:/
|
|
|
13
13
|
e.type = "importmap", e.textContent = JSON.stringify({ imports: { react: n, "react/jsx-runtime": a, "react-dom": s, "react-dom/client": c } }), document.head.appendChild(e), console.log("SheetXL: Import map injected:", e.textContent);
|
|
14
14
|
}
|
|
15
15
|
await new Promise((e) => setTimeout(e, 0));
|
|
16
|
-
const o = await Promise.all([import("react"), import("react/jsx-runtime"), import("react-dom"), import("react-dom/client"), import("./
|
|
16
|
+
const o = await Promise.all([import("react"), import("react/jsx-runtime"), import("react-dom"), import("react-dom/client"), import("./CyUSCTdWkG7ZxVra.js").then((e) => e.b6)]);
|
|
17
17
|
return console.log("SheetXL: Dependencies resolved:", o), { React: o[0], ReactJSXTransform: o[1], ReactDOM: o[2], ReactDOMClient: o[3], StudioMUI: o[4] };
|
|
18
18
|
})(), r));
|
|
19
19
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Workbook as y, IRange as C } from "@sheetxl/sdk";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
3
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
7
|
*/
|
|
8
8
|
const k = async (a, p) => {
|
|
9
|
-
const { trimLeadingBlankRow: i = !0, trimLeadingBlankColumn: u = !0, excludeHidden: h = !1, sheetKey: r = null, papaParseConfig: m = {} } = p || {}, f = await import("./
|
|
9
|
+
const { trimLeadingBlankRow: i = !0, trimLeadingBlankColumn: u = !0, excludeHidden: h = !1, sheetKey: r = null, papaParseConfig: m = {} } = p || {}, f = await import("./DgDZxwvfJyTly9Uu.js").then((s) => s.p);
|
|
10
10
|
if (!a) throw new Error("workbook must be specified");
|
|
11
11
|
let t = null;
|
|
12
12
|
if (r === null ? t = a.getSelectedSheet() : typeof r == "number" ? t = a.getSheets().search()[r] : typeof r == "string" && (t = a.getSheets().getByName(r)), !t) throw new Error("invalid sheetKey specified");
|
|
@@ -25,9 +25,9 @@ const k = async (a, p) => {
|
|
|
25
25
|
e.push(S);
|
|
26
26
|
}, { includeEmpty: !0, address: null }), e && d.push(e);
|
|
27
27
|
const o = { ...m }, g = f.unparse(d, o);
|
|
28
|
-
return new TextEncoder().encode(g);
|
|
28
|
+
return new TextEncoder().encode(g).buffer;
|
|
29
29
|
}, R = async (a, p) => {
|
|
30
|
-
const { papaParseConfig: i, setValuesOptions: u, constructorOptions: h } = p ?? {}, r = await import("./
|
|
30
|
+
const { papaParseConfig: i, setValuesOptions: u, constructorOptions: h } = p ?? {}, r = await import("./DgDZxwvfJyTly9Uu.js").then((o) => o.p), m = new TextDecoder().decode(a);
|
|
31
31
|
let f = -1;
|
|
32
32
|
const t = new y(h), c = t.getSelectedSheet().getEntireRange().startIncrementalUpdates({ orientation: C.Orientation.Row }), d = p?.onProgress;
|
|
33
33
|
let e = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.20
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|