@sheetxl/studio-vanilla 0.4.8 → 0.4.10
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/{CHSE1pa8SMApg4BM.cjs → B1UGqZP_7Z0Ewpog.cjs} +2 -2
- package/browser/cjs/{Cqymi9AOXO_JYvY4.cjs → B6m9VXoFseD4zuZ5.cjs} +2 -2
- package/browser/cjs/{oNi7wirDlZ81Lm0Z.cjs → BKePSaEpM6Z063z-.cjs} +1 -1
- package/browser/cjs/{3nTDo2EiTknjadbt.cjs → Bqn0ZeP_srNfL9rG.cjs} +1 -1
- package/browser/cjs/{6Wu3sLyx-7NM6CXS.cjs → C-izbj62pQuZjOrT.cjs} +62 -59
- package/browser/cjs/{C2B3wbeahcHlbOBZ.cjs → C-w-GX8N54TxTjjf.cjs} +2 -2
- package/browser/cjs/{euAV1pPrNOIb6DV4.cjs → C1QGdcqJ-9sdGTQR.cjs} +2 -2
- package/browser/cjs/{C6nZKAevPqj8zJY-.cjs → C38aiRglHLxZ8KRY.cjs} +2 -2
- package/browser/cjs/{BCnlTOmUDmizyvVV.cjs → C4JMn_hMnlOnDpQO.cjs} +2 -2
- package/browser/cjs/{D6pPBbRPLTNFSXuO.cjs → CApEj4LhhPUvQjIG.cjs} +1 -1
- package/browser/cjs/{B11W4AIKbkJQG6ug.cjs → CFcJbmmXjWjl6fQH.cjs} +2 -2
- package/browser/cjs/{Dds58NEqJ0OalWH3.cjs → CKiDbCZ6rGgXK7yN.cjs} +4 -4
- package/browser/cjs/CM8btXQsJbnFKXUm.cjs +6 -0
- package/browser/cjs/{CE5NVYltiso41NzK.cjs → Cb0K3Wzp7BAa4zni.cjs} +1 -1
- package/browser/cjs/{BIPxYhhi1F-y0gSm.cjs → CiAUhPU7v1BK-8Bb.cjs} +3 -3
- package/browser/cjs/{Dy4SB47It0LGbh2I.cjs → CsXS-EN0N5SZHTnQ.cjs} +1 -1
- package/browser/cjs/{CD_HItzF2RneMAER.cjs → Cu2eUomoF0HToa4l.cjs} +2 -2
- package/browser/cjs/{VJLb1uMfbKAUW1QF.cjs → Cy7ii9B_Vqx94pbu.cjs} +8 -8
- package/browser/cjs/{DWTMnPR33rKK87Xt.cjs → CzI4ZcsmzsyPBpWN.cjs} +5 -5
- package/browser/cjs/{BqLDj2GlSzX8ZN3l.cjs → DKHzUx2gKXwboKy1.cjs} +1 -1
- package/browser/cjs/{CTXKzcsm-W1ujL_U.cjs → DKc8wAq8dwbDddQn.cjs} +5 -5
- package/browser/cjs/{z1aNSOtWsEE21p2H.cjs → DMyKApbUVRtNYC4e.cjs} +2 -2
- package/browser/cjs/{bHWvGntvmuk8t7sX.cjs → DROR08HMGyg7rizQ.cjs} +2 -2
- package/browser/cjs/{i0D2haODisHW8uGg.cjs → DfGDZlbFVknGyu_X.cjs} +1 -1
- package/browser/cjs/{CcQjGGiCx6Qz7yJ4.cjs → OQdqVM_6m78kE5Aj.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{DMUSzq5n2k0WNFw6.cjs → v4OEtYXaUw_GeiXM.cjs} +1 -1
- package/{cdn/assets/CuG5WoZ4OOj9RCsv.js → browser/esm/4uEr84M4w57AMyDg.mjs} +3 -3
- package/{cdn/assets/CPi83FXApMlTaVbs.js → browser/esm/B8Ja5DlyKAy8xfQD.mjs} +1 -1
- package/{cdn/assets/O1XID2whLDb1cTWS.js → browser/esm/B9bN60uAvy62vnwt.mjs} +6 -6
- package/{cdn/assets/DppHXtCDGzttFdS4.js → browser/esm/BAOzSQdzHl43K9Hd.mjs} +6 -6
- package/browser/esm/{eXQ_1uhRMyN-hfDZ.mjs → BQYSD5Nb35y0WeeV.mjs} +1 -1
- package/browser/esm/{h4NbNvV8KCL9Tl1v.mjs → BVcaNvORp_uKPQgJ.mjs} +3 -3
- package/browser/esm/{D_FC0zteMRPriWTD.mjs → BqXO_cQhrMJu7JoQ.mjs} +1 -1
- package/{cdn/assets/Dbd0AFDlzQDW0tOg.js → browser/esm/C18A_DcIEHNYBDvR.mjs} +9 -9
- package/browser/esm/{EUFvcP5R4HFDLn2V.mjs → C7FoKZbSzjvuY3UB.mjs} +8 -8
- package/{cdn/assets/CjVsKZEPAncg5mIk.js → browser/esm/CCIJpHSbFPjTEF8S.mjs} +1 -1
- package/browser/esm/{2RGq163l1wYJKGsa.mjs → CHNPjJxb0GY_naLa.mjs} +6889 -6858
- package/browser/esm/{DnWiOUNTPvi_llPT.mjs → CKHsU9LUNYowimxS.mjs} +1 -1
- package/browser/esm/{DQ0Li3WfKbZxSFuB.mjs → C_Zx1tYjI3n7KKZH.mjs} +2 -2
- package/browser/esm/{B7qUiL1xPnzfOHZw.mjs → Cm-m3bZh0V44y0li.mjs} +1 -1
- package/browser/esm/{B1CYiJmSpyx4TD5r.mjs → D1e_ccSgcNXvWHgy.mjs} +16 -16
- package/browser/esm/{BP8kNG31HYSkk1VW.mjs → D47D26mVYSAdb5C8.mjs} +26 -26
- package/browser/esm/{CDkmbShJijwq4EBo.mjs → D9CdO3PtV12RnK8K.mjs} +59 -59
- package/browser/esm/{cSe92c0HnvbRwiVM.mjs → D9x-Q8y57gePf-tE.mjs} +98 -98
- package/{cdn/assets/CLA1BGtRbWm0K0U0.js → browser/esm/DHhXutXh7b5LsU1m.mjs} +2 -2
- package/{cdn/assets/xlL3Ai-ka9qMVeua.js → browser/esm/DIGFi66CQPMV3HsL.mjs} +1 -1
- package/{cdn/assets/DTvvMKZZfsVRhbow.js → browser/esm/DamiTeQsSMP2Cwld.mjs} +9 -9
- package/browser/esm/{DyUvHYGMNA9W2zL6.mjs → DhD48oFrbrnZ6Zg5.mjs} +1 -1
- package/browser/esm/{CA_DRvBOFOlhezCt.mjs → Ln2ZalJgj1CiJJue.mjs} +6 -6
- package/{cdn/assets/BEFQcBJ71bA297Zu.js → browser/esm/S9fgUO7h8YgZxoKH.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DXyJaUwHLq39-Jfa.mjs → qVAHcpq07IhtAaQc.mjs} +5 -5
- package/browser/esm/{ClXspoNrNV-A8BaL.mjs → xrzJ8ILZHb118Oyt.mjs} +17 -17
- package/cdn/assets/{B2hDWpWSEoChxhVY.js → 2-xJlw77WsCoyz09.js} +5071 -5040
- package/cdn/assets/{Bvy1txLm7c3LbPL7.js → B-9FcTf3xBEVGdjV.js} +59 -59
- package/cdn/assets/{BXBP2rNGQxrgUPvU.js → B-p1i2SNRMunPXCF.js} +8 -8
- package/cdn/assets/{C1x5-f1q8NeSwRA2.js → B3J6oAmsS7oLNFPd.js} +3 -3
- package/{browser/esm/CPi83FXApMlTaVbs.mjs → cdn/assets/B8Ja5DlyKAy8xfQD.js} +1 -1
- package/{browser/esm/BM74iVi-iQkHbrfo.mjs → cdn/assets/BG3YTMAzNKPRGoLs.js} +6 -6
- package/cdn/assets/{eXQ_1uhRMyN-hfDZ.js → BQYSD5Nb35y0WeeV.js} +1 -1
- package/{browser/esm/Ckz080o58XOgRhqj.mjs → cdn/assets/BbzUpvQOkxsN-yIH.js} +2 -2
- package/cdn/assets/{D_FC0zteMRPriWTD.js → BqXO_cQhrMJu7JoQ.js} +1 -1
- package/{browser/esm/BEIn7yNWsHNJisB6.mjs → cdn/assets/Bt1JSlSpWXDOBfq3.js} +3 -3
- package/{browser/esm/CjVsKZEPAncg5mIk.mjs → cdn/assets/CCIJpHSbFPjTEF8S.js} +1 -1
- package/cdn/assets/{DnWiOUNTPvi_llPT.js → CKHsU9LUNYowimxS.js} +1 -1
- package/{browser/esm/C_hRuPoaT857EnC1.mjs → cdn/assets/CWLJZwD2GVXljoWG.js} +9 -9
- package/cdn/assets/{B7qUiL1xPnzfOHZw.js → Cm-m3bZh0V44y0li.js} +1 -1
- package/cdn/assets/{BgChN-ZVYUOMDX9_.js → CtQlXGkNWgI-vtGy.js} +26 -26
- package/{browser/esm/xlL3Ai-ka9qMVeua.mjs → cdn/assets/DIGFi66CQPMV3HsL.js} +1 -1
- package/{browser/esm/4C7Rg83L5RYFoOvl.mjs → cdn/assets/DK4S0DbayChkfTD6.js} +9 -9
- package/cdn/assets/{g4FhlroGKmJM7Utd.js → DQvsBz9F1GS_S7r9.js} +6 -6
- package/cdn/assets/{C5NMOq74C3Sme49x.js → DTOgv_zwXSur-yCq.js} +16 -16
- package/cdn/assets/{tJI1G_FjDgqWo3rJ.js → DYZjOnD8WWQkCYuH.js} +98 -98
- package/cdn/assets/{DyUvHYGMNA9W2zL6.js → DhD48oFrbrnZ6Zg5.js} +1 -1
- package/cdn/assets/{DuU1-7vd87A1wfGJ.js → DhyAyTCDkMBf392P.js} +2 -2
- package/cdn/assets/{CtDntnnwJW1rZ3sM.js → P7HeVw5SHROLSWBz.js} +5 -5
- package/{browser/esm/6KgR81NK4yzANTBT.mjs → cdn/assets/S4Z0SN8x6EltjsHT.js} +6 -6
- package/{browser/esm/BEFQcBJ71bA297Zu.mjs → cdn/assets/S9fgUO7h8YgZxoKH.js} +1 -1
- package/cdn/assets/{CpVan9KpuEGXgwIK.js → guYe4C_6pE93QsDV.js} +17 -17
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/types/index.d.ts +9 -9
- package/browser/cjs/BYhOQCFEzewgsKDn.cjs +0 -6
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { memo as O, useState as r, useRef as M, useReducer as A, useMemo as E } from "react";
|
|
3
|
-
import { aL as
|
|
3
|
+
import { aL as W, U as k, aM as Q, aN as U, w as x, aA as V, aB as q, B as n, aO as G, aP as J, ak as f, aQ as K, aR as X, ag as y, ah as b, ai as w, aS as S } from "./CHNPjJxb0GY_naLa.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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
10
|
const te = O((C) => {
|
|
11
|
-
const { title: N, onHide: R, autoFocusSel: v = ".range-input input", context: T, notifier: l =
|
|
12
|
-
|
|
11
|
+
const { title: N, onHide: R, autoFocusSel: v = ".range-input input", context: T, notifier: l = W, 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 }] = k();
|
|
12
|
+
Q(c);
|
|
13
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
|
-
|
|
14
|
+
U(o.table(), { onAnchorCoordsChange(e) {
|
|
15
15
|
I(o.getNames().getRanges(e.getRange()));
|
|
16
16
|
}, onProtectedChange(e) {
|
|
17
17
|
B();
|
|
@@ -22,15 +22,15 @@ const te = O((C) => {
|
|
|
22
22
|
o?.table().resize(e.at(0));
|
|
23
23
|
}, [o]);
|
|
24
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(
|
|
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(V, { ref: h, title: N ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: v, onHide: R, onFocus: () => g(!0), onBlur: (e) => {
|
|
26
26
|
h?.current?.contains(e.relatedTarget) || g(!1);
|
|
27
|
-
}, PaperProps: { elevation: F ? 3 : 1 }, ...D, children: s(
|
|
27
|
+
}, PaperProps: { elevation: F ? 3 : 1 }, ...D, children: s(q, { 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(G, { formName: "name", defaultInput: j, value: t?.getName() ?? "No table", onChangeInput: L, onValidate: (e) => {
|
|
28
28
|
t && t.getName().toLowerCase() === e.toLowerCase() || o?.getNames().validateName(e);
|
|
29
29
|
}, disabled: t?.isProtected() ?? !0, onFocus: (e) => {
|
|
30
30
|
m || e.target?.select(), p(!0);
|
|
31
|
-
} }), a(
|
|
31
|
+
} }), a(J, { formName: "range", value: P, onChangeInput: z, resolvedAddress: o.getNames().getRanges.bind(o.getNames()), disabled: t?.isProtected() ?? !0, onFocus: (e) => {
|
|
32
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(
|
|
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(K, { disabled: t?.isProtected(), styleOptions: t?.getStyleOptions() ?? null, onStyleOptionsChange: (e) => {
|
|
34
34
|
t.updateStyleOptions(e);
|
|
35
35
|
}, showHeaderRow: t?.getShowHeaders(), onShowHeaderRowChange: (e) => {
|
|
36
36
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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,8 +1,8 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as M, useState as x, useCallback as j } from "react";
|
|
3
|
-
import { w as r,
|
|
3
|
+
import { w as r, v as S, B as V, F as $, T as z, a as h, ay as C } from "./CHNPjJxb0GY_naLa.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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.
|
|
@@ -19,7 +19,7 @@ const G = ["Ok", "Cancel"], U = E((O) => {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
|
-
}, []), [e,
|
|
22
|
+
}, []), [e, k] = x(g), [v, P] = x(!1), f = j(async (n, t) => null, []), b = r(async (n) => {
|
|
23
23
|
const t = e === "" ? [] : e.split(`
|
|
24
24
|
`);
|
|
25
25
|
if (n !== s) {
|
|
@@ -29,7 +29,7 @@ const G = ["Ok", "Cancel"], U = E((O) => {
|
|
|
29
29
|
}
|
|
30
30
|
u?.(n, n === s, n === c), p?.();
|
|
31
31
|
}, [e, m, p, u, c, s]), D = r((n) => {
|
|
32
|
-
|
|
32
|
+
k(n.target.value), f(n.target.value, null);
|
|
33
33
|
}, [l]), I = r(async (n) => {
|
|
34
34
|
let t = await Promise.resolve(l?.(n));
|
|
35
35
|
try {
|
|
@@ -38,8 +38,8 @@ const G = ["Ok", "Cancel"], U = E((O) => {
|
|
|
38
38
|
}
|
|
39
39
|
return t ?? !0;
|
|
40
40
|
}, [l, e]);
|
|
41
|
-
return i(S, { title: (g ? "Edit" : "Insert") + " Comments", options: d, onDone: p, onOption: (n) =>
|
|
42
|
-
|
|
41
|
+
return i(S, { title: (g ? "Edit" : "Insert") + " Comments", options: d, onDone: p, onOption: (n) => b(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
|
+
v || n.target?.select(), P(!0);
|
|
43
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
44
|
n.stopPropagation();
|
|
45
45
|
} }) }) }) });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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 "./CHNPjJxb0GY_naLa.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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,19 +1,19 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { useState as C } from "react";
|
|
3
3
|
import { Sort as a, IRange as r } from "@sheetxl/sdk";
|
|
4
|
-
import { w as O,
|
|
4
|
+
import { w as O, v as S, B as g, at as s, au as l } from "./CHNPjJxb0GY_naLa.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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 D = ({ range: p, options: c, cell: u, onDone: d, ...
|
|
12
|
-
const [t, o] = C(c ?? a.DefaultRangeOptions),
|
|
11
|
+
const D = ({ range: p, options: c, cell: u, onDone: d, ...v }) => {
|
|
12
|
+
const [t, o] = C(c ?? a.DefaultRangeOptions), m = O((e) => {
|
|
13
13
|
let i = null;
|
|
14
14
|
e === "Sort" && (i = { ...c, options: t }), d?.(i);
|
|
15
15
|
}, [t, d, c]);
|
|
16
|
-
return n(S, { title: "Sort", options: ["Sort", "Cancel"], onDone:
|
|
16
|
+
return n(S, { title: "Sort", options: ["Sort", "Cancel"], onDone: m, ...v, children: h(g, { sx: { display: "flex", flexDirection: "column" }, children: [n(s, { control: n(l, { checked: !t.reverse, onChange: () => o((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.hasHeader, onChange: () => o((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.collatorOptions?.sensitivity === a.CaseSensitiveOptions.sensitivity, onChange: () => o((e) => ({ ...e, collatorOptions: t.collatorOptions?.sensitivity === a.CaseSensitiveOptions.sensitivity ? a.CaseInsensitiveOptions : a.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.orientation === r.Orientation.Row, onChange: () => o((e) => {
|
|
17
17
|
const i = e.orientation === r.Orientation.Row ? r.Orientation.Column : r.Orientation.Row;
|
|
18
18
|
return { ...p.getDefaultSortCriteria(i, u).options, includeHidden: e.includeHidden, reverse: e.reverse, orientation: i };
|
|
19
19
|
}) }), label: "Row Sort", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.includeHidden, onChange: () => o((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as z, forwardRef as E, useState as s } from "react";
|
|
3
|
-
import { k as
|
|
3
|
+
import { k as n, i as G, v as K, B as R, F as W, T as q, a as x, G as A, t as y } from "./CHNPjJxb0GY_naLa.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
5
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
|
|
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
|
|
11
|
-
const { initialValue: F = "", onOption:
|
|
10
|
+
const J = ["Input"], Y = z(E((w, T) => {
|
|
11
|
+
const { initialValue: F = "", onOption: v, onValidateOption: r, onInputOption: l, onValidateInputOption: p, onDone: u, inputProps: c, inputLabel: I, inputType: P, inputPlaceHolder: k, options: d = J, autoFocusSel: C = ".autoFocus", cancelOption: g, defaultOption: m = d?.[0], ...b } = w, [V, B] = s(!1), [o, D] = s(F), [S, H] = s(""), [L, M] = s(!0), e = n(async (a, t) => {
|
|
12
12
|
if (!p) return !0;
|
|
13
|
-
const h = await p?.(a,
|
|
13
|
+
const h = await p?.(a, t);
|
|
14
14
|
H(h?.message ?? "");
|
|
15
15
|
const O = h?.valid ?? !0;
|
|
16
16
|
return M(O), O;
|
|
17
|
-
}, [p]), f =
|
|
17
|
+
}, [p]), f = n(async (a) => {
|
|
18
18
|
l?.(o, a);
|
|
19
|
-
}, [o, l, u,
|
|
19
|
+
}, [o, l, u, v, g, m]), N = n(async (a) => {
|
|
20
20
|
a.keyCode === G.Enter && await e?.(o, null);
|
|
21
|
-
}, [o, f]), $ =
|
|
21
|
+
}, [o, f]), $ = n((a) => {
|
|
22
22
|
D(a.target.value), e?.(a.target.value, null);
|
|
23
|
-
}, [r]), j =
|
|
24
|
-
let
|
|
23
|
+
}, [r]), j = n(async (a) => {
|
|
24
|
+
let t = await e(o, a);
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
t !== !1 && (t = await e(o, a));
|
|
27
27
|
} catch {
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return t ?? !0;
|
|
30
30
|
}, [o, r]);
|
|
31
|
-
return i(K, { options: d, onDone: u, onOption: (a,
|
|
32
|
-
|
|
33
|
-
}, onValidateOption: j, cancelOption: g, defaultOption: m, autoFocusSel:
|
|
31
|
+
return i(K, { options: d, onDone: u, onOption: (a, t) => {
|
|
32
|
+
t || f(a);
|
|
33
|
+
}, onValidateOption: j, cancelOption: g, defaultOption: m, autoFocusSel: C, ref: T, ...b, children: i(R, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0) }, children: i(W, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(q, { onFocus: (a) => {
|
|
34
34
|
V || a.target?.select(), B(!0);
|
|
35
|
-
}, type:
|
|
35
|
+
}, type: P, label: I, helperText: S || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5), color: L ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: k, spellCheck: !1, autoComplete: "off", ...c, className: A("autoFocus", c?.className), sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${x("#fff", y(5))}, ${x("#fff", y(5))})` } } }, value: o, onChange: $, onKeyDown: N, onContextMenu: (a) => {
|
|
36
36
|
a.stopPropagation();
|
|
37
37
|
} }) }) }) });
|
|
38
38
|
}));
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
Y as default
|
|
41
41
|
};
|