@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,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 "./CyUSCTdWkG7ZxVra.js";
|
|
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
|
});
|
package/cdn/index.js
CHANGED
|
@@ -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.
|
|
@@ -115,7 +115,7 @@ let c;
|
|
|
115
115
|
const b = async (e) => c || (c = await (async (n, t) => {
|
|
116
116
|
try {
|
|
117
117
|
if (t?.selector && C(t?.selector, t?.loading), !n) {
|
|
118
|
-
const { resolveDependencies: r } = await import("./assets/
|
|
118
|
+
const { resolveDependencies: r } = await import("./assets/0vZqExkLfT4asC9K.js");
|
|
119
119
|
n = await r(t?.dependencies);
|
|
120
120
|
}
|
|
121
121
|
t?.licenseKey && await n.StudioMUI.LicenseManager.setLicenseKey(t.licenseKey), t?.selector && h(t?.selector);
|
package/cdn/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";/**
|
|
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/studio-vanilla",
|
|
3
3
|
"description": "SheetXL Studio - Vanilla entry point for integrating SheetXL UI.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.20",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./browser/esm/index.mjs",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@mui/styled-engine": "^6.5.0",
|
|
42
42
|
"@mui/system": "^6.5.0",
|
|
43
43
|
"@mui/utils": "^6.4.9",
|
|
44
|
-
"@sheetxl/studio-mui": "^0.3.
|
|
44
|
+
"@sheetxl/studio-mui": "^0.3.20",
|
|
45
45
|
"csstype": "^3.1.3",
|
|
46
46
|
"http-server": "^14.1.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@sheetxl/sdk": "^0.3.
|
|
49
|
+
"@sheetxl/sdk": "^0.3.20",
|
|
50
50
|
"react": "^19.1.0",
|
|
51
51
|
"react-dom": "^19.1.0"
|
|
52
52
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ export declare type StandaloneWorkbookProps = StandaloneWorkbookProps_2;
|
|
|
138
138
|
/**
|
|
139
139
|
* Reference to StudioMUI module.
|
|
140
140
|
*
|
|
141
|
-
*
|
|
141
|
+
* [@sheetxl/studio-mui](../modules/_sheetxl_studio-mui.html)
|
|
142
142
|
*/
|
|
143
143
|
export declare type StudioMUIModule = sheetxlStudioMui;
|
|
144
144
|
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("react"),t=require("./S1ymoLlv7Uf-qfRz.cjs"),p=a.memo(h=>{const{title:f,onHide:y,autoFocusSel:b=".range-input input",context:j,notifier:l=t.yu,command:r,commands:c,...w}=h,[S,d]=a.useState(!1),[g,x]=a.useState(!1),m=a.useRef(null),[F,C]=a.useReducer(e=>e+1,0),[R,{width:H}]=t.fc();t.Yi(r);const i=j??r.context(),n=i.table(),[v,B]=a.useState(()=>n?i.getNames().getRanges(n.getRange()):null),N=a.useMemo(()=>n?.getName()??"",[n]);t.un(i.table(),{onAnchorCoordsChange(e){B(i.getNames().getRanges(e.getRange()))},onProtectedChange(e){C()}});const T=t.pe(e=>{i?.table().setName(e)},[i]),D=t.pe(e=>{i?.table().resize(e.at(0))},[i]);let u=null;return i.table()||(u=o.jsx("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:o.jsx("div",{children:"No table selected"})})),o.jsx(t.cS,{title:f??"Table Details",initialPosition:{y:"35"},autoFocusSel:b,refWindow:m,onHide:y,onFocus:()=>d(!0),onBlur:e=>{m?.current?.contains(e.relatedTarget)||d(!1)},PaperProps:{elevation:S?3:1},...w,children:o.jsxs(t.DialogContent,{dividers:!0,ref:R,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[o.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:i.table()?1:0},children:[o.jsx(t.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:o.jsx(t.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:o.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[o.jsx(t.cM,{formName:"name",defaultInput:N,value:n?.getName()??"No table",onChangeInput:T,onValidate:e=>{n&&n.getName().toLowerCase()===e.toLowerCase()||i?.getNames().validateName(e)},disabled:n?.isProtected()??!0,onFocus:e=>{g||e.target?.select(),x(!0)}}),o.jsx(t.dM,{formName:"range",value:v,onChangeInput:D,resolvedAddress:i.getNames().getRanges.bind(i.getNames()),disabled:n?.isProtected()??!0,onFocus:e=>{g||e.target?.select(),x(!0)}})]})})}),o.jsxs(t.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[o.jsx(t.Wt,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),o.jsx(t.HR,{disabled:n?.isProtected(),styleOptions:n?.getStyleOptions()??null,onStyleOptionsChange:e=>{n.updateStyleOptions(e)},showHeaderRow:n?.getShowHeaders(),onShowHeaderRowChange:e=>{try{n.setShowHeaders(e)}catch(s){l.showError(s)}},showTotalRow:n?.getShowTotals(),onShowTotalRowChange:e=>{try{n.setShowTotals(e)}catch(s){l.showError(s)}},showFilterButton:n?.getFilter()?n.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{n.setShowFilterButton(e)}catch(s){l.showError(s)}}}),o.jsx(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:o.jsx(t.tM,{table:n,styles:i.styles(),bodyStyle:i.bodyStyle(),cellHeight:30,isLive:!0})}),o.jsx(t.Wt,{orientation:"horizontal"}),o.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[o.jsx(t.ze,{variant:t.en.Menuitem,command:c.getCommand("convertTableToRange"),commandState:n,icon:t.Ce(o.jsx(t.j1,{}))}),o.jsx(t.ze,{variant:t.en.Menuitem,commandState:n,command:c.getCommand("deleteTable"),icon:t.Ce(o.jsx(t.j1,{}))})]})]})]}),u]})})});exports.TableDetailsWindow=p,exports.default=p;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),a=require("react"),e=require("./S1ymoLlv7Uf-qfRz.cjs"),H=["Input"],L=a.memo(a.forwardRef((x,N)=>{const{initialValue:y="",onOption:O,onValidateOption:l,onInputOption:r,onValidateInputOption:s,onDone:u,inputProps:c,inputLabel:v,inputType:w,inputPlaceHolder:F,options:d=H,autoFocusSel:S=".autoFocus",cancelOption:g,defaultOption:m=d?.[0],...b}=x,[P,C]=a.useState(!1),[n,I]=a.useState(y),[j,k]=a.useState(""),[V,q]=a.useState(!0),i=e.Tn(async(t,o)=>{if(!s)return!0;const h=await s?.(t,o);k(h?.message??"");const T=h?.valid??!0;return q(T),T},[s]),f=e.Tn(async t=>{r?.(n,t)},[n,r,u,O,g,m]),B=e.Tn(async t=>{t.keyCode===e.sr.Enter&&await i?.(n,null)},[n,f]),D=e.Tn(t=>{I(t.target.value),i?.(t.target.value,null)},[l]),M=e.Tn(async t=>{let o=await i(n,t);try{o!==!1&&(o=await i(n,t))}catch{}return o??!0},[n,l]);return p.jsx(e.b4,{options:d,onDone:u,onOption:(t,o)=>{o||f(t)},onValidateOption:M,cancelOption:g,defaultOption:m,autoFocusSel:S,...b,children:p.jsx(e.Box,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0)},children:p.jsx(e.FormControl,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:p.jsx(e.TextField,{onFocus:t=>{P||t.target?.select(),C(!0)},type:w,label:v,helperText:j||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5),color:V?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:F,spellCheck:!1,autoComplete:"off",...c,className:e.Xo("autoFocus",c?.className),sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${e.alpha("#fff",e.ev(5))}, ${e.alpha("#fff",e.ev(5))})`}}},value:n,onChange:D,onKeyDown:B,onContextMenu:t=>{t.stopPropagation()}})})})})}));exports.default=L;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@sheetxl/sdk");exports.fromBufferCSV=async(a,d)=>{const{papaParseConfig:i,setValuesOptions:g,constructorOptions:h}=d??{},o=await Promise.resolve().then(()=>require("./DqW0_yEVBgywVFtY.cjs")).then(n=>n.p),m=new TextDecoder().decode(a);let p=-1;const t=new S.Workbook(h),c=t.getSelectedSheet().getEntireRange().startIncrementalUpdates({orientation:S.IRange.Orientation.Row}),u=d?.onProgress;let e=0;const r={...i,transform:(n,f)=>{i?.transform&&(n=i.transform(n,f));const s=f;s===0&&p++;let l=n??"";return c.pushAt(p,s,l),e++,e%1e5==0&&u?.(e),n}};return o.parse(m,r).data,c.apply({textParser:!0,...g}),t},exports.toBufferCSV=async(a,d)=>{const{trimLeadingBlankRow:i=!0,trimLeadingBlankColumn:g=!0,excludeHidden:h=!1,sheetKey:o=null,papaParseConfig:m={}}=d||{},p=await Promise.resolve().then(()=>require("./DqW0_yEVBgywVFtY.cjs")).then(s=>s.p);if(!a)throw new Error("workbook must be specified");let t=null;if(o===null?t=a.getSelectedSheet():typeof o=="number"?t=a.getSheets().search()[o]:typeof o=="string"&&(t=a.getSheets().getByName(o)),!t)throw new Error("invalid sheetKey specified");let c=null;const u=[];let e=null,r=t.getUsedRange({excludeHidden:h});if(!r)throw new Error("Nothing to export");if(!i||!g){const s=i?r.getRowStart():0,l=g?r.getColumnStart():0;r=r.getOffsetTo(s,l)}r.forEach((s,l)=>{const w=l.getCoords(),y=l.getCell();c!==w.rowIndex&&(e&&u.push(e),e=[],c=w.rowIndex);const x=y.toTextUnformatted()??"";e.push(x)},{includeEmpty:!0,address:null}),e&&u.push(e);const n={...m},f=p.unparse(u,n);return new TextEncoder().encode(f)};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("@sheetxl/sdk");exports.fromBufferJSON=async(g,y)=>{let i=g;(function(s){if(s.byteLength<4)return!1;const u=new Uint8Array(s),c={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},r=Object.keys(c);for(let n=0;n<r.length;n++){const o=r[n],e=c[o];let a=!0;for(let t=0;t<e.length;t++)if(u[t]!==e[t]){a=!1;break}if(a)return o}return!1})(i)&&(i=await async function(s,u="gzip"){const c=new Blob([s]).stream(),r=new DecompressionStream(u),n=c.pipeThrough(r);return(await new Response(n).blob()).arrayBuffer()}(i));let b=new TextDecoder().decode(i);const w=JSON.parse(b),p={...y?.constructorOptions??{},json:w};return new j.Workbook(p)},exports.toBufferJSON=async(g,y)=>{const i=await g.toJSON(),b=y?.whiteSpace??0;let w;y?.beforeWrite?.(g,i),w=b===0?JSON.stringify(i):function(u,c=2){const r=[];function n(o){const e=c*o;return r[e]===void 0&&(r[e]=" ".repeat(e)),r[e]}return function o(e,a,t,N){if(e==null||typeof e!="object")return JSON.stringify(e);const h=n(a),m=n(a+1);if(Array.isArray(e)){const f=e.length;if(f===0)return"[]";if(t!==0)return JSON.stringify(e);let l=`[
|
|
7
|
-
`;for(let O=0;O<f;O++)l+=m+o(e[O],a+1,t+1,!0),O<f-1&&(l+=`,
|
|
8
|
-
`);return l+=`
|
|
9
|
-
`+h+"]",l}const J=Object.keys(e),d=J.length;if(d===0)return"{}";if(!(t<2))return JSON.stringify(e);let S=`{
|
|
10
|
-
`;N||(t=0);for(let f=0;f<d;f++){const l=J[f];S+=m+JSON.stringify(l)+": "+o(e[l],a+1,t,!1),f<d-1&&(S+=`,
|
|
11
|
-
`)}return S+=`
|
|
12
|
-
`+h+"}",S}(u,0,0,!1)}(i,b);let p=new TextEncoder().encode(w);const s=y?.compress??!0;return s&&(p=await async function(u,c="gzip"){const r=new ReadableStream({start(e){e.enqueue(u),e.close()}}),n=new CompressionStream(c),o=r.pipeThrough(n);return(await new Response(o).blob()).arrayBuffer()}(p,typeof s=="string"?s:void 0)),p};
|
|
@@ -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, a as D, c as l, ay as p } from "./DXfVp9l0_p8tTvaN.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
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 e = null, t = null;
|
|
13
|
-
n && (typeof n == "string" ? t = n : e = n);
|
|
14
|
-
const C = e ?? s?.()?.getHyperlink();
|
|
15
|
-
return { address: t ?? C?.getAddress() ?? "", textToDisplay: C?.getDisplayText() ?? "" };
|
|
16
|
-
}, [n, s]), [a, M] = g(y.address), [u, B] = g(() => {
|
|
17
|
-
const e = s?.().toTextUnformatted() ?? w;
|
|
18
|
-
return e === y.address ? "" : e;
|
|
19
|
-
}), [$, k] = g(!1), L = O((e) => {
|
|
20
|
-
B(e.target.value);
|
|
21
|
-
}, []), T = O(async (e, t) => null, []), W = f(async (e) => {
|
|
22
|
-
e !== i && m?.(a === "" ? null : { address: a }, u), x?.(e, e === i, e === c), d?.();
|
|
23
|
-
}, [a, u, m, d, x, c, i]), j = f((e) => {
|
|
24
|
-
M(e.target.value), T(e.target.value, null);
|
|
25
|
-
}, [r]), z = f(async (e) => {
|
|
26
|
-
let t = await Promise.resolve(r?.(e));
|
|
27
|
-
try {
|
|
28
|
-
t !== !1 && (t = await T(a, e));
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
return t ?? !0;
|
|
32
|
-
}, [r]);
|
|
33
|
-
return o(S, { title: (v ? "Edit" : "Insert") + " Link", options: h, onDone: d, onOption: (e) => W(e), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...H }, ...I, children: A(U, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [o(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
|
|
34
|
-
$ || e.target?.select(), k(!0);
|
|
35
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: a, onChange: j, onContextMenu: (e) => {
|
|
36
|
-
e.stopPropagation();
|
|
37
|
-
} }) }), o(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
|
|
38
|
-
k(!0);
|
|
39
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: u, onChange: L, onContextMenu: (e) => {
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
} }) })] }) });
|
|
42
|
-
});
|
|
43
|
-
export {
|
|
44
|
-
J as HyperlinkDialog,
|
|
45
|
-
J as default
|
|
46
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Workbook as k } from "@sheetxl/sdk";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
4
|
-
*
|
|
5
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
|
-
*/
|
|
8
|
-
const B = async (g, p) => {
|
|
9
|
-
const i = await g.toJSON(), w = p?.whiteSpace ?? 0;
|
|
10
|
-
let b;
|
|
11
|
-
p?.beforeWrite?.(g, i), b = w === 0 ? JSON.stringify(i) : function(a, c = 2) {
|
|
12
|
-
const r = [];
|
|
13
|
-
function n(o) {
|
|
14
|
-
const e = c * o;
|
|
15
|
-
return r[e] === void 0 && (r[e] = " ".repeat(e)), r[e];
|
|
16
|
-
}
|
|
17
|
-
return function o(e, u, t, d) {
|
|
18
|
-
if (e == null || typeof e != "object") return JSON.stringify(e);
|
|
19
|
-
const m = n(u), J = n(u + 1);
|
|
20
|
-
if (Array.isArray(e)) {
|
|
21
|
-
const f = e.length;
|
|
22
|
-
if (f === 0) return "[]";
|
|
23
|
-
if (t !== 0) return JSON.stringify(e);
|
|
24
|
-
let l = `[
|
|
25
|
-
`;
|
|
26
|
-
for (let O = 0; O < f; O++) l += J + o(e[O], u + 1, t + 1, !0), O < f - 1 && (l += `,
|
|
27
|
-
`);
|
|
28
|
-
return l += `
|
|
29
|
-
` + m + "]", l;
|
|
30
|
-
}
|
|
31
|
-
const N = Object.keys(e), h = N.length;
|
|
32
|
-
if (h === 0) return "{}";
|
|
33
|
-
if (!(t < 2)) return JSON.stringify(e);
|
|
34
|
-
let S = `{
|
|
35
|
-
`;
|
|
36
|
-
d || (t = 0);
|
|
37
|
-
for (let f = 0; f < h; f++) {
|
|
38
|
-
const l = N[f];
|
|
39
|
-
S += J + JSON.stringify(l) + ": " + o(e[l], u + 1, t, !1), f < h - 1 && (S += `,
|
|
40
|
-
`);
|
|
41
|
-
}
|
|
42
|
-
return S += `
|
|
43
|
-
` + m + "}", S;
|
|
44
|
-
}(a, 0, 0, !1);
|
|
45
|
-
}(i, w);
|
|
46
|
-
let y = new TextEncoder().encode(b);
|
|
47
|
-
const s = p?.compress ?? !0;
|
|
48
|
-
return s && (y = await async function(a, c = "gzip") {
|
|
49
|
-
const r = new ReadableStream({ start(e) {
|
|
50
|
-
e.enqueue(a), e.close();
|
|
51
|
-
} }), n = new CompressionStream(c), o = r.pipeThrough(n);
|
|
52
|
-
return (await new Response(o).blob()).arrayBuffer();
|
|
53
|
-
}(y, typeof s == "string" ? s : void 0)), y;
|
|
54
|
-
}, j = async (g, p) => {
|
|
55
|
-
let i = g;
|
|
56
|
-
(function(s) {
|
|
57
|
-
if (s.byteLength < 4) return !1;
|
|
58
|
-
const a = new Uint8Array(s), c = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, r = Object.keys(c);
|
|
59
|
-
for (let n = 0; n < r.length; n++) {
|
|
60
|
-
const o = r[n], e = c[o];
|
|
61
|
-
let u = !0;
|
|
62
|
-
for (let t = 0; t < e.length; t++) if (a[t] !== e[t]) {
|
|
63
|
-
u = !1;
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
if (u) return o;
|
|
67
|
-
}
|
|
68
|
-
return !1;
|
|
69
|
-
})(i) && (i = await async function(s, a = "gzip") {
|
|
70
|
-
const c = new Blob([s]).stream(), r = new DecompressionStream(a), n = c.pipeThrough(r);
|
|
71
|
-
return (await new Response(n).blob()).arrayBuffer();
|
|
72
|
-
}(i));
|
|
73
|
-
let w = new TextDecoder().decode(i);
|
|
74
|
-
const b = JSON.parse(w), y = { ...p?.constructorOptions ?? {}, json: b };
|
|
75
|
-
return new k(y);
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
j as fromBufferJSON,
|
|
79
|
-
B as toBufferJSON
|
|
80
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as j, forwardRef as z, useState as s } from "react";
|
|
3
|
-
import { T as n, s as E, b as K, B as R, F as W, a as X, c as x, X as q, e as y } from "./DXfVp9l0_p8tTvaN.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
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 A = ["Input"], Y = j(z((w, G) => {
|
|
11
|
-
const { initialValue: T = "", onOption: F, onValidateOption: r, onInputOption: l, onValidateInputOption: p, onDone: u, inputProps: c, inputLabel: I, inputType: P, inputPlaceHolder: b, options: d = A, autoFocusSel: v = ".autoFocus", cancelOption: g, defaultOption: m = d?.[0], ...C } = w, [k, V] = s(!1), [o, B] = s(T), [D, S] = s(""), [H, L] = s(!0), e = n(async (a, t) => {
|
|
12
|
-
if (!p) return !0;
|
|
13
|
-
const h = await p?.(a, t);
|
|
14
|
-
S(h?.message ?? "");
|
|
15
|
-
const O = h?.valid ?? !0;
|
|
16
|
-
return L(O), O;
|
|
17
|
-
}, [p]), f = n(async (a) => {
|
|
18
|
-
l?.(o, a);
|
|
19
|
-
}, [o, l, u, F, g, m]), M = n(async (a) => {
|
|
20
|
-
a.keyCode === E.Enter && await e?.(o, null);
|
|
21
|
-
}, [o, f]), N = n((a) => {
|
|
22
|
-
B(a.target.value), e?.(a.target.value, null);
|
|
23
|
-
}, [r]), $ = n(async (a) => {
|
|
24
|
-
let t = await e(o, a);
|
|
25
|
-
try {
|
|
26
|
-
t !== !1 && (t = await e(o, a));
|
|
27
|
-
} catch {
|
|
28
|
-
}
|
|
29
|
-
return t ?? !0;
|
|
30
|
-
}, [o, r]);
|
|
31
|
-
return i(K, { options: d, onDone: u, onOption: (a, t) => {
|
|
32
|
-
t || f(a);
|
|
33
|
-
}, onValidateOption: $, cancelOption: g, defaultOption: m, autoFocusSel: v, ...C, 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(X, { onFocus: (a) => {
|
|
34
|
-
k || a.target?.select(), V(!0);
|
|
35
|
-
}, type: P, label: I, helperText: D || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5), color: H ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: b, spellCheck: !1, autoComplete: "off", ...c, className: q("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: N, onKeyDown: M, onContextMenu: (a) => {
|
|
36
|
-
a.stopPropagation();
|
|
37
|
-
} }) }) }) });
|
|
38
|
-
}));
|
|
39
|
-
export {
|
|
40
|
-
Y as default
|
|
41
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as j, forwardRef as z, useState as s } from "react";
|
|
3
|
-
import { T as n, s as E, b as K, B as R, F as W, a as X, c as x, X as q, e as y } from "./CXyKsX-Rk4hkAgns.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
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 A = ["Input"], Y = j(z((w, G) => {
|
|
11
|
-
const { initialValue: T = "", onOption: F, onValidateOption: r, onInputOption: l, onValidateInputOption: p, onDone: u, inputProps: c, inputLabel: I, inputType: P, inputPlaceHolder: b, options: d = A, autoFocusSel: v = ".autoFocus", cancelOption: g, defaultOption: m = d?.[0], ...C } = w, [k, V] = s(!1), [o, B] = s(T), [D, S] = s(""), [H, L] = s(!0), e = n(async (a, t) => {
|
|
12
|
-
if (!p) return !0;
|
|
13
|
-
const h = await p?.(a, t);
|
|
14
|
-
S(h?.message ?? "");
|
|
15
|
-
const O = h?.valid ?? !0;
|
|
16
|
-
return L(O), O;
|
|
17
|
-
}, [p]), f = n(async (a) => {
|
|
18
|
-
l?.(o, a);
|
|
19
|
-
}, [o, l, u, F, g, m]), M = n(async (a) => {
|
|
20
|
-
a.keyCode === E.Enter && await e?.(o, null);
|
|
21
|
-
}, [o, f]), N = n((a) => {
|
|
22
|
-
B(a.target.value), e?.(a.target.value, null);
|
|
23
|
-
}, [r]), $ = n(async (a) => {
|
|
24
|
-
let t = await e(o, a);
|
|
25
|
-
try {
|
|
26
|
-
t !== !1 && (t = await e(o, a));
|
|
27
|
-
} catch {
|
|
28
|
-
}
|
|
29
|
-
return t ?? !0;
|
|
30
|
-
}, [o, r]);
|
|
31
|
-
return i(K, { options: d, onDone: u, onOption: (a, t) => {
|
|
32
|
-
t || f(a);
|
|
33
|
-
}, onValidateOption: $, cancelOption: g, defaultOption: m, autoFocusSel: v, ...C, 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(X, { onFocus: (a) => {
|
|
34
|
-
k || a.target?.select(), V(!0);
|
|
35
|
-
}, type: P, label: I, helperText: D || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5), color: H ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: b, spellCheck: !1, autoComplete: "off", ...c, className: q("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: N, onKeyDown: M, onContextMenu: (a) => {
|
|
36
|
-
a.stopPropagation();
|
|
37
|
-
} }) }) }) });
|
|
38
|
-
}));
|
|
39
|
-
export {
|
|
40
|
-
Y as default
|
|
41
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Workbook as k } from "@sheetxl/sdk";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
4
|
-
*
|
|
5
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
|
-
*/
|
|
8
|
-
const B = async (g, p) => {
|
|
9
|
-
const i = await g.toJSON(), w = p?.whiteSpace ?? 0;
|
|
10
|
-
let b;
|
|
11
|
-
p?.beforeWrite?.(g, i), b = w === 0 ? JSON.stringify(i) : function(a, c = 2) {
|
|
12
|
-
const r = [];
|
|
13
|
-
function n(o) {
|
|
14
|
-
const e = c * o;
|
|
15
|
-
return r[e] === void 0 && (r[e] = " ".repeat(e)), r[e];
|
|
16
|
-
}
|
|
17
|
-
return function o(e, u, t, d) {
|
|
18
|
-
if (e == null || typeof e != "object") return JSON.stringify(e);
|
|
19
|
-
const m = n(u), J = n(u + 1);
|
|
20
|
-
if (Array.isArray(e)) {
|
|
21
|
-
const f = e.length;
|
|
22
|
-
if (f === 0) return "[]";
|
|
23
|
-
if (t !== 0) return JSON.stringify(e);
|
|
24
|
-
let l = `[
|
|
25
|
-
`;
|
|
26
|
-
for (let O = 0; O < f; O++) l += J + o(e[O], u + 1, t + 1, !0), O < f - 1 && (l += `,
|
|
27
|
-
`);
|
|
28
|
-
return l += `
|
|
29
|
-
` + m + "]", l;
|
|
30
|
-
}
|
|
31
|
-
const N = Object.keys(e), h = N.length;
|
|
32
|
-
if (h === 0) return "{}";
|
|
33
|
-
if (!(t < 2)) return JSON.stringify(e);
|
|
34
|
-
let S = `{
|
|
35
|
-
`;
|
|
36
|
-
d || (t = 0);
|
|
37
|
-
for (let f = 0; f < h; f++) {
|
|
38
|
-
const l = N[f];
|
|
39
|
-
S += J + JSON.stringify(l) + ": " + o(e[l], u + 1, t, !1), f < h - 1 && (S += `,
|
|
40
|
-
`);
|
|
41
|
-
}
|
|
42
|
-
return S += `
|
|
43
|
-
` + m + "}", S;
|
|
44
|
-
}(a, 0, 0, !1);
|
|
45
|
-
}(i, w);
|
|
46
|
-
let y = new TextEncoder().encode(b);
|
|
47
|
-
const s = p?.compress ?? !0;
|
|
48
|
-
return s && (y = await async function(a, c = "gzip") {
|
|
49
|
-
const r = new ReadableStream({ start(e) {
|
|
50
|
-
e.enqueue(a), e.close();
|
|
51
|
-
} }), n = new CompressionStream(c), o = r.pipeThrough(n);
|
|
52
|
-
return (await new Response(o).blob()).arrayBuffer();
|
|
53
|
-
}(y, typeof s == "string" ? s : void 0)), y;
|
|
54
|
-
}, j = async (g, p) => {
|
|
55
|
-
let i = g;
|
|
56
|
-
(function(s) {
|
|
57
|
-
if (s.byteLength < 4) return !1;
|
|
58
|
-
const a = new Uint8Array(s), c = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, r = Object.keys(c);
|
|
59
|
-
for (let n = 0; n < r.length; n++) {
|
|
60
|
-
const o = r[n], e = c[o];
|
|
61
|
-
let u = !0;
|
|
62
|
-
for (let t = 0; t < e.length; t++) if (a[t] !== e[t]) {
|
|
63
|
-
u = !1;
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
if (u) return o;
|
|
67
|
-
}
|
|
68
|
-
return !1;
|
|
69
|
-
})(i) && (i = await async function(s, a = "gzip") {
|
|
70
|
-
const c = new Blob([s]).stream(), r = new DecompressionStream(a), n = c.pipeThrough(r);
|
|
71
|
-
return (await new Response(n).blob()).arrayBuffer();
|
|
72
|
-
}(i));
|
|
73
|
-
let w = new TextDecoder().decode(i);
|
|
74
|
-
const b = JSON.parse(w), y = { ...p?.constructorOptions ?? {}, json: b };
|
|
75
|
-
return new k(y);
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
j as fromBufferJSON,
|
|
79
|
-
B as toBufferJSON
|
|
80
|
-
};
|
|
@@ -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, a as D, c as l, ay as p } from "./CXyKsX-Rk4hkAgns.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.18
|
|
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 e = null, t = null;
|
|
13
|
-
n && (typeof n == "string" ? t = n : e = n);
|
|
14
|
-
const C = e ?? s?.()?.getHyperlink();
|
|
15
|
-
return { address: t ?? C?.getAddress() ?? "", textToDisplay: C?.getDisplayText() ?? "" };
|
|
16
|
-
}, [n, s]), [a, M] = g(y.address), [u, B] = g(() => {
|
|
17
|
-
const e = s?.().toTextUnformatted() ?? w;
|
|
18
|
-
return e === y.address ? "" : e;
|
|
19
|
-
}), [$, k] = g(!1), L = O((e) => {
|
|
20
|
-
B(e.target.value);
|
|
21
|
-
}, []), T = O(async (e, t) => null, []), W = f(async (e) => {
|
|
22
|
-
e !== i && m?.(a === "" ? null : { address: a }, u), x?.(e, e === i, e === c), d?.();
|
|
23
|
-
}, [a, u, m, d, x, c, i]), j = f((e) => {
|
|
24
|
-
M(e.target.value), T(e.target.value, null);
|
|
25
|
-
}, [r]), z = f(async (e) => {
|
|
26
|
-
let t = await Promise.resolve(r?.(e));
|
|
27
|
-
try {
|
|
28
|
-
t !== !1 && (t = await T(a, e));
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
return t ?? !0;
|
|
32
|
-
}, [r]);
|
|
33
|
-
return o(S, { title: (v ? "Edit" : "Insert") + " Link", options: h, onDone: d, onOption: (e) => W(e), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...H }, ...I, children: A(U, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [o(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
|
|
34
|
-
$ || e.target?.select(), k(!0);
|
|
35
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: a, onChange: j, onContextMenu: (e) => {
|
|
36
|
-
e.stopPropagation();
|
|
37
|
-
} }) }), o(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(D, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
|
|
38
|
-
k(!0);
|
|
39
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: u, onChange: L, onContextMenu: (e) => {
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
} }) })] }) });
|
|
42
|
-
});
|
|
43
|
-
export {
|
|
44
|
-
J as HyperlinkDialog,
|
|
45
|
-
J as default
|
|
46
|
-
};
|