@sheetxl/studio-vanilla 0.4.9 → 0.4.11
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/README.md +1 -1
- package/browser/cjs/B0rdyyttE2Aibsag.cjs +7 -0
- package/browser/cjs/B2e7dDI-zKoqXpIW.cjs +107 -0
- package/browser/cjs/BAyEOOtO-9sHQQRW.cjs +7 -0
- package/browser/cjs/BPTHTRDvNOVkUJGa.cjs +7 -0
- package/browser/cjs/BlSFY6zLlebuejdV.cjs +7 -0
- package/browser/cjs/BplA5pDzOJpfTZuA.cjs +7 -0
- package/browser/cjs/BshvMtUxTJHj3JQN.cjs +7 -0
- package/browser/cjs/BuWtGFX0HiBezGjw.cjs +7 -0
- package/browser/cjs/C5FXOMLhAu_KTjVe.cjs +7 -0
- package/browser/cjs/C7EZCTczsC-gkRcq.cjs +7 -0
- package/browser/cjs/CFcjX5-nVsgzdZ4F.cjs +7 -0
- package/browser/cjs/CjZbhk41S1qO_74G.cjs +7 -0
- package/browser/cjs/CuTW2Pt-L5n-hNxV.cjs +7 -0
- package/browser/cjs/D3iOk-Q2tRdUeTcn.cjs +7 -0
- package/browser/cjs/DFspSkki779xN-Ey.cjs +7 -0
- package/browser/cjs/DFtyXc7YFh9dIp74.cjs +7 -0
- package/browser/cjs/Db_Ew1r6yOMYylvA.cjs +7 -0
- package/browser/cjs/DgBn3aW39yjgm0X_.cjs +7 -0
- package/browser/cjs/DiBy6-IxLscyMW2y.cjs +7 -0
- package/browser/cjs/DrlS1oz9Nea8Pm3j.cjs +7 -0
- package/browser/cjs/Dx-jp_LJxWbAScyA.cjs +7 -0
- package/browser/cjs/SzxJv7OUs5ojl8gx.cjs +7 -0
- package/browser/cjs/T4SHYo66xDT3l9JN.cjs +7 -0
- package/browser/cjs/index.cjs +4 -3
- package/browser/cjs/vfUix5Di0Ro8tEID.cjs +7 -0
- package/browser/esm/B5kkStdEkTczERyM.mjs +7 -0
- package/browser/esm/B905wKzTtod-jbsD.mjs +7 -0
- package/browser/esm/BALnKy2Fp7fyk-lc.mjs +7 -0
- package/browser/esm/BDVJ7eOPpW5FnEAP.mjs +7 -0
- package/browser/esm/BGpv6Kq7eBlJy43T.mjs +7 -0
- package/browser/esm/BUSR_OK5Qi6hRPfw.mjs +7 -0
- package/browser/esm/BXUGsC1Mo3FP8vnW.mjs +7 -0
- package/browser/esm/BlGoi1_x9rUMpWMd.mjs +7 -0
- package/browser/esm/Bo_ZPRrOQrqOVHAF.mjs +7 -0
- package/browser/esm/BuURCm92KsyGHG9e.mjs +7 -0
- package/browser/esm/CFFC0SNc24a0Dxnh.mjs +7 -0
- package/browser/esm/CGZ5MX7afzMxDkCe.mjs +7 -0
- package/browser/esm/Cc_VWd0wF5-39LsI.mjs +7 -0
- package/browser/esm/Cq8D_M0jeHLcnRjg.mjs +7 -0
- package/browser/esm/CzmNwV9tfFYUp_gS.mjs +7 -0
- package/browser/esm/De6RPxc4p_jXLlT5.mjs +7 -0
- package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +7 -0
- package/browser/esm/DqXxZP6yKF4U1YfY.mjs +7 -0
- package/browser/esm/DtmE60AvstK9u0Ta.mjs +107 -0
- package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +7 -0
- package/browser/esm/PS0cqYnlMVEGOQpI.mjs +7 -0
- package/browser/esm/QBGUD1XS5_pysBLL.mjs +7 -0
- package/browser/esm/index.mjs +2 -8
- package/browser/esm/tFhROdVSw9KLQfUN.mjs +7 -0
- package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +7 -0
- package/cdn/index.js +40 -44
- package/cdn/loader.js +1 -1
- package/package.json +5 -5
- package/types/index.d.ts +9 -9
- package/browser/cjs/3GhIDU8JK1oBJrCA.cjs +0 -6
- package/browser/cjs/5hPVyVAXmITQCRAG.cjs +0 -6
- package/browser/cjs/7PlrLPQx1lct0mdN.cjs +0 -6
- package/browser/cjs/B4K6KuggSdXj-V8g.cjs +0 -6
- package/browser/cjs/B5Qc3gXLEhscRsFm.cjs +0 -12
- package/browser/cjs/B7eW1GQgFvphlLGY.cjs +0 -6
- package/browser/cjs/BQPFxJ77OaD_sBIX.cjs +0 -6
- package/browser/cjs/Ba3O1f0NYbzEwNAd.cjs +0 -6
- package/browser/cjs/BoojmbbjqixMVu2H.cjs +0 -6
- package/browser/cjs/CSGVl8EBCRhxcFm1.cjs +0 -15
- package/browser/cjs/CalnqtYH48_x2rcI.cjs +0 -301
- package/browser/cjs/CjDsO4sQWUHbIX1N.cjs +0 -6
- package/browser/cjs/CsCaFaiySArzEfdH.cjs +0 -7
- package/browser/cjs/D6AUUY9awlTRjjqd.cjs +0 -11
- package/browser/cjs/D8lN5Mv3J4SwSpLP.cjs +0 -161
- package/browser/cjs/D9RQ5oYv7U38wSI7.cjs +0 -11
- package/browser/cjs/DCd2rPNFkSHDaRcM.cjs +0 -7
- package/browser/cjs/DGQrcBvjSGwwoZEv.cjs +0 -6
- package/browser/cjs/DIXyMJKaeCGuWxjZ.cjs +0 -12
- package/browser/cjs/Dmw7xaaV85s72QZe.cjs +0 -145
- package/browser/cjs/DzCXPcqV1oKbCcLO.cjs +0 -16
- package/browser/cjs/EoaX6dPoS-Mb-ITO.cjs +0 -42
- package/browser/cjs/Y6OgkWqbIB761o5q.cjs +0 -6
- package/browser/cjs/gbABnN2zW1kHo3_I.cjs +0 -19
- package/browser/cjs/kfV5Cli9oE9IsCtx.cjs +0 -6
- package/browser/cjs/nURb18uhj9rScsHa.cjs +0 -6
- package/browser/esm/2NQDbhor1Nuzndgq.mjs +0 -3756
- package/browser/esm/4aC35Q2XPOwifBRR.mjs +0 -1365
- package/browser/esm/5zFDFBAgT-aPgQQ0.mjs +0 -1665
- package/browser/esm/B3I_TrFN_pAK5Mdh.mjs +0 -2346
- package/browser/esm/BD9GKsR-k4aEK2tx.mjs +0 -421
- package/browser/esm/BQpsMTJvguy6LMIq.mjs +0 -43
- package/browser/esm/BfCWogOnq8R-c3dD.mjs +0 -21
- package/browser/esm/BkGQPKMRPIVUVTLO.mjs +0 -944
- package/browser/esm/C81J50HcankGTOIj.mjs +0 -390
- package/browser/esm/CO_s27056nua6qzN.mjs +0 -1346
- package/browser/esm/CPEjlDUTxckVS1rp.mjs +0 -50
- package/browser/esm/CY7astxzrfb7uZqy.mjs +0 -2178
- package/browser/esm/CZVzRhflTpwAAl1o.mjs +0 -22
- package/browser/esm/CaWZXQsmKl4hTNq5.mjs +0 -46
- package/browser/esm/CxcLNXXaxyFyUzyb.mjs +0 -633
- package/browser/esm/D0icxW0WVNoeVRLH.mjs +0 -58
- package/browser/esm/DFQvqk5r1uf_z0h_.mjs +0 -24994
- package/browser/esm/DRL5s4S0fIXi1aU7.mjs +0 -84
- package/browser/esm/DRmeb1VC4YCzKKWd.mjs +0 -13208
- package/browser/esm/DTwhl4v5YnZrUSgI.mjs +0 -24
- package/browser/esm/DmpPAs6w-XNWGTIN.mjs +0 -1703
- package/browser/esm/Dx-GS3XDBkRaMNG-.mjs +0 -151
- package/browser/esm/V5CA7xqGOB7-Qx4Y.mjs +0 -1467
- package/browser/esm/gsfI5CGYr7LCQxRx.mjs +0 -41
- package/browser/esm/tOBqasyBAnd7O4qE.mjs +0 -46
- package/browser/esm/tPrnEcHW_czJDZOT.mjs +0 -50
- package/cdn/assets/2NQDbhor1Nuzndgq.js +0 -3756
- package/cdn/assets/4aC35Q2XPOwifBRR.js +0 -1365
- package/cdn/assets/5zFDFBAgT-aPgQQ0.js +0 -1665
- package/cdn/assets/B0w_moB3pDJd-a6V.js +0 -24
- package/cdn/assets/BD9GKsR-k4aEK2tx.js +0 -421
- package/cdn/assets/BJVOhUH_XL03H6ZD.js +0 -22
- package/cdn/assets/BWJOkXXB6Tr-jYUS.js +0 -46
- package/cdn/assets/BapFqJyAb3cblvJM.js +0 -50
- package/cdn/assets/Bg88bG-JM9EHeyYX.js +0 -41
- package/cdn/assets/C81J50HcankGTOIj.js +0 -390
- package/cdn/assets/CO_s27056nua6qzN.js +0 -1346
- package/cdn/assets/CXa9u-7w14dyPYxk.js +0 -1703
- package/cdn/assets/CkcETdiKdTsZAzma.js +0 -1467
- package/cdn/assets/CxcLNXXaxyFyUzyb.js +0 -633
- package/cdn/assets/D0PaU6F-TNaTWj-a.js +0 -43
- package/cdn/assets/D4hoypx6_sZbvrC_.js +0 -2346
- package/cdn/assets/D5exf1RvCqvUoJ3X.js +0 -2178
- package/cdn/assets/DKLitAhDj5Ibh2cc.js +0 -24841
- package/cdn/assets/DRL5s4S0fIXi1aU7.js +0 -84
- package/cdn/assets/DRmeb1VC4YCzKKWd.js +0 -13208
- package/cdn/assets/DYkBvlMlZjOASUJs.js +0 -58
- package/cdn/assets/ON5--a75QdEU99y_.js +0 -151
- package/cdn/assets/PIZDjyqIbvmHXs1T.js +0 -46
- package/cdn/assets/TOkIJFYhNg78FdJa.js +0 -21
- package/cdn/assets/b9dlFmoFz8tJhV0Z.js +0 -50
- package/cdn/assets/d1PG-QPA1GcQ_RuH.js +0 -944
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { memo as O, useState as r, useRef as M, useReducer as A, useMemo as E } from "react";
|
|
3
|
-
import { aL as Q, Q as W, aM as k, aN as V, w as x, aA as q, aB as G, B as n, aO as J, aP as K, ak as f, aQ as U, aR as X, ag as y, ah as b, ai as w, aS as S } from "./DKLitAhDj5Ibh2cc.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.9
|
|
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 te = O((C) => {
|
|
11
|
-
const { title: N, onHide: R, autoFocusSel: v = ".range-input input", context: T, notifier: l = Q, command: c, commands: d, ...D } = C, [F, g] = r(!1), [m, p] = r(!1), h = M(null), [Y, B] = A((e) => e + 1, 0), [H, { width: Z }] = W();
|
|
12
|
-
k(c);
|
|
13
|
-
const o = T ?? c.context(), t = o.table(), [P, I] = r(() => t ? o.getNames().getRanges(t.getRange()) : null), j = E(() => t?.getName() ?? "", [t]);
|
|
14
|
-
V(o.table(), { onAnchorCoordsChange(e) {
|
|
15
|
-
I(o.getNames().getRanges(e.getRange()));
|
|
16
|
-
}, onProtectedChange(e) {
|
|
17
|
-
B();
|
|
18
|
-
} });
|
|
19
|
-
const L = x((e) => {
|
|
20
|
-
o?.table().setName(e);
|
|
21
|
-
}, [o]), z = x((e) => {
|
|
22
|
-
o?.table().resize(e.at(0));
|
|
23
|
-
}, [o]);
|
|
24
|
-
let u = null;
|
|
25
|
-
return o.table() || (u = a("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", opacity: 1, display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center", boxSizing: "border-box" }, children: a("div", { children: "No table selected" }) })), a(q, { ref: h, title: N ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: v, onHide: R, onFocus: () => g(!0), onBlur: (e) => {
|
|
26
|
-
h?.current?.contains(e.relatedTarget) || g(!1);
|
|
27
|
-
}, PaperProps: { elevation: F ? 3 : 1 }, ...D, children: s(G, { dividers: !0, ref: H, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, children: [s(n, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: o.table() ? 1 : 0 }, children: [a(n, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: a(n, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e) => e.spacing(2), paddingRight: (e) => e.spacing(2) }, children: s(n, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [a(J, { formName: "name", defaultInput: j, value: t?.getName() ?? "No table", onChangeInput: L, onValidate: (e) => {
|
|
28
|
-
t && t.getName().toLowerCase() === e.toLowerCase() || o?.getNames().validateName(e);
|
|
29
|
-
}, disabled: t?.isProtected() ?? !0, onFocus: (e) => {
|
|
30
|
-
m || e.target?.select(), p(!0);
|
|
31
|
-
} }), a(K, { formName: "range", value: P, onChangeInput: z, resolvedAddress: o.getNames().getRanges.bind(o.getNames()), disabled: t?.isProtected() ?? !0, onFocus: (e) => {
|
|
32
|
-
m || e.target?.select(), p(!0);
|
|
33
|
-
} })] }) }) }), s(n, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [a(f, { orientation: "horizontal", sx: { marginTop: (e) => e.spacing(1.5), marginBottom: (e) => e.spacing(0.75) } }), a(U, { disabled: t?.isProtected(), styleOptions: t?.getStyleOptions() ?? null, onStyleOptionsChange: (e) => {
|
|
34
|
-
t.updateStyleOptions(e);
|
|
35
|
-
}, showHeaderRow: t?.getShowHeaders(), onShowHeaderRowChange: (e) => {
|
|
36
|
-
try {
|
|
37
|
-
t.setShowHeaders(e);
|
|
38
|
-
} catch (i) {
|
|
39
|
-
l.showError(i);
|
|
40
|
-
}
|
|
41
|
-
}, showTotalRow: t?.getShowTotals(), onShowTotalRowChange: (e) => {
|
|
42
|
-
try {
|
|
43
|
-
t.setShowTotals(e);
|
|
44
|
-
} catch (i) {
|
|
45
|
-
l.showError(i);
|
|
46
|
-
}
|
|
47
|
-
}, showFilterButton: t?.getFilter() ? t.getShowFilterButton() : null, onShowFilterButtonChange: (e) => {
|
|
48
|
-
try {
|
|
49
|
-
t.setShowFilterButton(e);
|
|
50
|
-
} catch (i) {
|
|
51
|
-
l.showError(i);
|
|
52
|
-
}
|
|
53
|
-
} }), a(n, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e) => e.spacing(2), marginBottom: (e) => e.spacing(1) }, children: a(X, { table: t, styles: o.styles(), bodyStyle: o.bodyStyle(), cellHeight: 30, isLive: !0 }) }), a(f, { orientation: "horizontal" }), s(n, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [a(y, { variant: w.Menuitem, command: d.getCommand("convertTableToRange"), commandState: t, icon: b(a(S, {})) }), a(y, { variant: w.Menuitem, commandState: t, command: d.getCommand("deleteTable"), icon: b(a(S, {})) })] })] })] }), u] }) });
|
|
54
|
-
});
|
|
55
|
-
export {
|
|
56
|
-
te as TableDetailsWindow,
|
|
57
|
-
te as default
|
|
58
|
-
};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { memo as oe, useRef as C, useState as b, useEffect as L, useLayoutEffect as pe, useMemo as de } from "react";
|
|
3
|
-
import { ICell as c, IRange as R } from "@sheetxl/sdk";
|
|
4
|
-
import { v as D, w as H, av as ue, Q 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 "./DKLitAhDj5Ibh2cc.js";
|
|
5
|
-
import { C as ee } from "./d1PG-QPA1GcQ_RuH.js";
|
|
6
|
-
/**
|
|
7
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.9
|
|
8
|
-
*
|
|
9
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
|
-
*/
|
|
12
|
-
const Se = D(i("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z" }), "ArrowBack"), Ie = D(i("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"), Le = D(i("path", { d: "m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" }), "ArrowForward"), De = D(i("path", { d: "m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z" }), "ArrowUpward"), z = oe((E) => {
|
|
13
|
-
const { label: h, value: r, options: a, onSelect: d, tabIndex: v = 0, ...A } = E, [K, T] = b(() => ie(r, a));
|
|
14
|
-
L(() => {
|
|
15
|
-
T(ie(r, a));
|
|
16
|
-
}, [r, a]);
|
|
17
|
-
const P = H((u) => {
|
|
18
|
-
T(u.target.value), d?.(a[u.target.value]);
|
|
19
|
-
}, [d, a]), s = de(() => Object.keys(a).map((u) => i(ke, { value: u, children: u }, u)), [a]);
|
|
20
|
-
return p(we, { sx: { minWidth: 135 }, size: "small", children: [i(Ee, { children: h }), i(Fe, { inputProps: { tabIndex: v }, value: K, label: h, onChange: P, sx: { backgroundImage: `linear-gradient(${k("#fff", w(5))}, ${k("#fff", w(5))})` }, ...A, children: s })] });
|
|
21
|
-
}), te = { Workbook: "workbook", Sheet: "sheet" }, ne = { enter: 140, exit: 140 }, ae = { Formulas: c.Content.Formulas, Values: c.Content.Values, Notes: c.Content.Notes, Comments: c.Content.Comments }, se = { ...ae };
|
|
22
|
-
delete se.Values;
|
|
23
|
-
const Ae = { "By Rows": !0, "By Columns": !1 }, ie = (E, h) => {
|
|
24
|
-
const r = Object.keys(h);
|
|
25
|
-
for (let a = 0; a < r.length; a++) {
|
|
26
|
-
const d = r[a];
|
|
27
|
-
if (h[d] === E) return d;
|
|
28
|
-
}
|
|
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), $ = C(null), W = C(null), j = C(null), N = C(null), G = (e, t) => {
|
|
31
|
-
t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
|
|
32
|
-
}, [J, I] = b(!1), [B, le] = b(!1), [f, M] = b(h), [Q, V] = b(!1), [U, X] = 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
|
-
if (!T) return;
|
|
34
|
-
const g = { ...o };
|
|
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
|
-
const ce = await T({ autoFocus: S, ...g });
|
|
37
|
-
V(ce === 0);
|
|
38
|
-
}, [o, T]);
|
|
39
|
-
L(() => {
|
|
40
|
-
V(!1);
|
|
41
|
-
}, [o, B, f]);
|
|
42
|
-
const q = H((e, t) => {
|
|
43
|
-
if (e.keyCode === ue.Enter) {
|
|
44
|
-
if (!o.findText) return;
|
|
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 ? W.current : $.current), F(n, t, S, !1);
|
|
47
|
-
}
|
|
48
|
-
}, [o]), Y = C(null);
|
|
49
|
-
pe(() => {
|
|
50
|
-
l((e) => {
|
|
51
|
-
const t = { ...e };
|
|
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
|
-
const n = !(!v && a === void 0);
|
|
54
|
-
return n && M(n), t;
|
|
55
|
-
}), U || Y.current?.focus();
|
|
56
|
-
}, [r, a, d, v]), L(() => {
|
|
57
|
-
f ? (o.findOptions.fields[0], c.Content.Values) : I(!0);
|
|
58
|
-
}, [f]), L(() => {
|
|
59
|
-
if (J && s.current && o.findText === s.current.value) return s.current === document.activeElement || s.current.contains(document.activeElement) ? (s.current?.select(), void I(!1)) : void s.current.addEventListener("focus", () => {
|
|
60
|
-
s.current?.select(), I(!1);
|
|
61
|
-
}, { once: !0 });
|
|
62
|
-
}, [J, o]);
|
|
63
|
-
const [re, { width: Z }] = fe();
|
|
64
|
-
return i(ge, { ref: Y, title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: K, onFocus: () => X(!0), onBlur: () => {
|
|
65
|
-
X(!1), V(!1);
|
|
66
|
-
}, PaperProps: { elevation: U ? 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) M(!0), s.current?.contains(document.activeElement) && u.current?.focus();
|
|
68
|
-
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
69
|
-
else if (e.key === "c" && e.altKey) l((t) => {
|
|
70
|
-
const n = { ...t };
|
|
71
|
-
return n.findOptions.matchCase = !t.findOptions.matchCase, n;
|
|
72
|
-
});
|
|
73
|
-
else if (e.key === "e" && e.altKey) l((t) => {
|
|
74
|
-
const n = { ...t };
|
|
75
|
-
return n.findOptions.matchEntireCell = !t.findOptions.matchEntireCell, n;
|
|
76
|
-
});
|
|
77
|
-
else {
|
|
78
|
-
if (e.key !== "r" || !e.altKey) return;
|
|
79
|
-
l((t) => {
|
|
80
|
-
const n = { ...t };
|
|
81
|
-
return n.findOptions.useRegex = !t.findOptions.useRegex, n;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
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: B, onSelectToggle: (e) => {
|
|
86
|
-
le(e);
|
|
87
|
-
}, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(xe, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
|
|
88
|
-
M(e);
|
|
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
|
-
l((t) => {
|
|
91
|
-
const n = { ...t };
|
|
92
|
-
return n.findOptions.matchCase = e, n;
|
|
93
|
-
});
|
|
94
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [y.Alt] }, icon: x(i(Ce, {})) }), i(m, { selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
|
|
95
|
-
l((t) => {
|
|
96
|
-
const n = { ...t };
|
|
97
|
-
return n.findOptions.matchEntireCell = e, n;
|
|
98
|
-
});
|
|
99
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(ye, {})) }), i(m, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
100
|
-
l((t) => {
|
|
101
|
-
const n = { ...t };
|
|
102
|
-
return n.findOptions.useRegex = e, n;
|
|
103
|
-
});
|
|
104
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(be, {})) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Q ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => Q ? `${e.palette.error.main} !important` : void 0 } }, value: o.findText ?? "", onChange: (e) => {
|
|
105
|
-
l((t) => {
|
|
106
|
-
const n = { ...t };
|
|
107
|
-
return n.findText = e.target.value, n;
|
|
108
|
-
});
|
|
109
|
-
}, onKeyDown: (e) => q(e, !1), onContextMenu: (e) => {
|
|
110
|
-
e.stopPropagation();
|
|
111
|
-
} }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
112
|
-
F(!1, !1);
|
|
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
|
-
F(!0, !1);
|
|
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
|
-
s.current?.focus();
|
|
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
|
-
l((t) => {
|
|
119
|
-
const n = { ...t };
|
|
120
|
-
return n.replaceText = e.target.value, n;
|
|
121
|
-
});
|
|
122
|
-
}, onKeyDown: (e) => q(e, !0), onContextMenu: (e) => {
|
|
123
|
-
e.stopPropagation();
|
|
124
|
-
} }), i(m, { onSelectToggle: (e) => {
|
|
125
|
-
F(!0, !0);
|
|
126
|
-
}, touchRippleRef: j, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(ve, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
|
|
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: B, timeout: ne, onExit: () => {
|
|
129
|
-
s.current?.focus();
|
|
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
|
-
l((t) => {
|
|
132
|
-
const n = { ...t };
|
|
133
|
-
return n.scope = e, n;
|
|
134
|
-
});
|
|
135
|
-
} }), i(z, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: Ae, onSelect: (e) => {
|
|
136
|
-
l((t) => {
|
|
137
|
-
const n = { ...t };
|
|
138
|
-
return n.findOptions.orientation = e ? R.Orientation.Row : R.Orientation.Column, n;
|
|
139
|
-
});
|
|
140
|
-
} }), i(z, { label: "Look in", value: f && o.findOptions.fields?.[0] === c.Content.Values ? c.Content.Formulas : o.findOptions.fields?.[0], options: f ? se : ae, onSelect: (e) => {
|
|
141
|
-
l((t) => {
|
|
142
|
-
const n = { ...t };
|
|
143
|
-
return n.findOptions.fields = [e], n;
|
|
144
|
-
});
|
|
145
|
-
} })] })] }) })] }) });
|
|
146
|
-
});
|
|
147
|
-
export {
|
|
148
|
-
ze as FindReplaceWindow,
|
|
149
|
-
te as ScopeOptions,
|
|
150
|
-
ze as default
|
|
151
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
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 { w as f, b as S, B as U, F as P, T as D, a as l, ay as p } from "./DKLitAhDj5Ibh2cc.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.9
|
|
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: w = 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, v = 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() ?? w;
|
|
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: (v ? "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,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.9
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
let r = null;
|
|
8
|
-
const i = { reactUrl: "https://esm.sh/react@19.1.0", reactJsxTransform: "https://esm.sh/react@19.1.0/jsx-runtime", reactDomUrl: "https://esm.sh/react-dom@19.1.0", reactDomUrlClient: "https://esm.sh/react-dom@19.1.0/client" }, m = (t) => (t = { ...t, ...i }, r || (console.log("SheetXL: Resolving dependencies with:", t), r = (async () => {
|
|
9
|
-
const n = t.reactUrl, s = t.reactDomUrl, c = t.reactDomUrlClient, a = t.reactJsxTransform;
|
|
10
|
-
if (document.querySelector('script[type="importmap"]')) console.warn("SheetXL: Import map already exists. Skipping injection.");
|
|
11
|
-
else {
|
|
12
|
-
const e = document.createElement("script");
|
|
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
|
-
}
|
|
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("./DKLitAhDj5Ibh2cc.js").then((e) => e.b6)]);
|
|
17
|
-
return console.log("SheetXL: Dependencies resolved:", o), { React: o[0], ReactJSXTransform: o[1], ReactDOM: o[2], ReactDOMClient: o[3], StudioMUI: o[4] };
|
|
18
|
-
})(), r));
|
|
19
|
-
export {
|
|
20
|
-
m as resolveDependencies
|
|
21
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as E, useMemo as M, useState as x, useCallback as j } from "react";
|
|
3
|
-
import { w as r, b as S, B as V, F as $, T as z, a as h, ay as C } from "./DKLitAhDj5Ibh2cc.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.9
|
|
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 G = ["Ok", "Cancel"], U = E((O) => {
|
|
11
|
-
const { initialComments: w = null, onUpdateComments: m, context: y, onOption: u, onValidateOption: l, onDone: p, options: d = G, defaultOption: c = d?.[0], cancelOption: s = "Cancel", sx: F, ...T } = O, g = M(() => {
|
|
12
|
-
const n = w ?? y?.()?.getComments();
|
|
13
|
-
let t = "";
|
|
14
|
-
if (n && n.content && n.content.runs) {
|
|
15
|
-
const a = n.content.runs;
|
|
16
|
-
for (let o = 0; o < a.length; o++) {
|
|
17
|
-
const B = a[o];
|
|
18
|
-
t += B?.text;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
}, []), [e, b] = x(g), [k, P] = x(!1), f = j(async (n, t) => null, []), v = r(async (n) => {
|
|
23
|
-
const t = e === "" ? [] : e.split(`
|
|
24
|
-
`);
|
|
25
|
-
if (n !== s) {
|
|
26
|
-
const a = [];
|
|
27
|
-
for (let o = 0; o < t.length; o++) a.push({ text: t[o] });
|
|
28
|
-
m?.({ content: { runs: a } });
|
|
29
|
-
}
|
|
30
|
-
u?.(n, n === s, n === c), p?.();
|
|
31
|
-
}, [e, m, p, u, c, s]), D = r((n) => {
|
|
32
|
-
b(n.target.value), f(n.target.value, null);
|
|
33
|
-
}, [l]), I = r(async (n) => {
|
|
34
|
-
let t = await Promise.resolve(l?.(n));
|
|
35
|
-
try {
|
|
36
|
-
t !== !1 && (t = await f(e, n));
|
|
37
|
-
} catch {
|
|
38
|
-
}
|
|
39
|
-
return t ?? !0;
|
|
40
|
-
}, [l, e]);
|
|
41
|
-
return i(S, { title: (g ? "Edit" : "Insert") + " Comments", options: d, onDone: p, onOption: (n) => v(n), onValidateOption: I, defaultOption: c, cancelOption: s, autoFocusSel: ".autoFocus", sx: { width: "480px", ...F }, ...T, children: i(V, { sx: { paddingTop: (n) => n.spacing(1), paddingBottom: (n) => n.spacing(0), rowGap: (n) => n.spacing(1), display: "flex", flexDirection: "column" }, children: i($, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(z, { label: "Comments", placeholder: "Enter a comment.", onFocus: (n) => {
|
|
42
|
-
k || n.target?.select(), P(!0);
|
|
43
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${h("#fff", C(5))}, ${h("#fff", C(5))})` } } }, value: e, onChange: D, onContextMenu: (n) => {
|
|
44
|
-
n.stopPropagation();
|
|
45
|
-
} }) }) }) });
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
U as CommentsDialog,
|
|
49
|
-
U as default
|
|
50
|
-
};
|