@sheetxl/studio-mui 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/8yJKDn6FG4qXm6C_.cjs +6 -0
- package/browser/cjs/{CvVjY72BJUTQvkkP.cjs → B1jZEfhC-UDnqHyx.cjs} +2 -2
- package/browser/cjs/B6SNtC4e_WvQXSbH.cjs +87 -0
- package/browser/cjs/{BWJGFEIQCBdTEl6B.cjs → BDNJoQLDNwBKjkfN.cjs} +2 -2
- package/browser/cjs/{BLcValtf97N7iwR5.cjs → BNRt1gPcV30KL-_2.cjs} +1 -1
- package/browser/cjs/Br-k5vmbo_70osX8.cjs +12 -0
- package/browser/cjs/{C6UymVKpB0f_aOz4.cjs → BxHOEF80SAdnbAt9.cjs} +1 -1
- package/browser/cjs/{tzUSfMyL4rscAPOw.cjs → ByE3VEEpczj3xLVa.cjs} +1 -1
- package/browser/cjs/{BNyVm7np2bfgLvot.cjs → C70cMil2r-R9L7x8.cjs} +3 -3
- package/browser/cjs/{CJQdEaRRBvm3gCqh.cjs → CLx2YONMFeXbGBO3.cjs} +1 -1
- package/browser/cjs/{ckZ4F6Ezl3aCnh5Z.cjs → C_V7M1p_CSqFgZ5C.cjs} +3 -3
- package/browser/cjs/{BkCmVm6sA_avib9h.cjs → CaqQouPOAX3k7acG.cjs} +2 -2
- package/browser/cjs/{B5eQzk5WyXy8IAA8.cjs → ClDyjEAo5O3N7VH4.cjs} +4 -4
- package/browser/cjs/{CKF-dWfZku6ebHzj.cjs → Co714rETH_sBPMIE.cjs} +2 -2
- package/browser/cjs/{D6MmQYTV_-2r6TNA.cjs → D5lC4NJu4zIU1Zs7.cjs} +4 -4
- package/browser/cjs/{2OSBl2r7IttrCdtA.cjs → Dd3jhRCtgjzn-Q_j.cjs} +1 -1
- package/browser/cjs/{CYlWk3JZne2DVAvj.cjs → Dw-60Ix8trelSf49.cjs} +2 -2
- package/browser/cjs/{CMQnksVdFNTGCcuL.cjs → ERubX2VhTgExTjPs.cjs} +1 -1
- package/browser/cjs/{B1SUaFgnsimk42bG.cjs → HU2wyYTngkzRIfcp.cjs} +2 -2
- package/browser/cjs/{Dsf7iNkpZ-XRvkri.cjs → IJjqthMv8sYE3zk5.cjs} +2 -2
- package/browser/cjs/{Dt-_lF8cbqIQeFDT.cjs → Mkgw7-OjsOuATlTu.cjs} +2 -2
- package/browser/cjs/{CTVwwijxWyTj1-To.cjs → hNe2uQuNlEZUxHVc.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BBB1d8xHkY7ltQWw.cjs → omB-b0WJWPLOvoDW.cjs} +2 -2
- package/browser/cjs/{DtfIBBSWwGnFn5da.cjs → r3IRuRCfr7z3EIua.cjs} +1 -1
- package/browser/cjs/y6pSQIuEtIXm0Nrb.cjs +6 -0
- package/browser/esm/{dyvLjt-D32wPaGoj.mjs → BAg5b-CxAJZIccnx.mjs} +2 -2
- package/browser/esm/{CvzuJmImMn0DC78K.mjs → BGDtHuaoSHSUbpFS.mjs} +40 -40
- package/browser/esm/{B9JJu0VnIIYWT5lt.mjs → BnJG8TC71fG1mf91.mjs} +3 -3
- package/browser/esm/{B-rFSfciMrAt40UW.mjs → BxSZJMB3FJ6E3VQm.mjs} +1 -1
- package/browser/esm/{COZ6r5iZ8TyK00AP.mjs → BzYtHnJ9YtmP06qB.mjs} +1 -1
- package/browser/esm/{DAABl4IjtZoiB_ZM.mjs → CACmHB-fbLy04wZd.mjs} +2 -2
- package/browser/esm/{DWhxo1LUgYMKPIl6.mjs → CBktOJulH0O7hLGQ.mjs} +8 -8
- package/browser/esm/{Bm90soyGjT9Iu1LC.mjs → CCTPmbQSUB0QnmRa.mjs} +2 -2
- package/browser/esm/{D85IfpCrfIBFDqe8.mjs → CMc3J0D7OFGYJ-c9.mjs} +2 -2
- package/browser/esm/CSA6yBKvhJGmIb1K.mjs +84 -0
- package/browser/esm/{DRnTwfoTxrtXBFC7.mjs → CYsNgnaP27Wh2Sp0.mjs} +1 -1
- package/browser/esm/{CvsYx4oxcqsUUtrr.mjs → ChqC2YqQOdxyO-yL.mjs} +1 -1
- package/browser/esm/{Cbz-BdHkkb_IX1IO.mjs → CwY4b2WKnvnRRk9n.mjs} +4 -4
- package/browser/esm/{DrGVTfUVlughL_d0.mjs → D1Upf6elHEvN6BvD.mjs} +1 -1
- package/browser/esm/DGQh7NK1O5vxTFbY.mjs +43 -0
- package/browser/esm/{BQQcYbNIADI7dSX4.mjs → DQZnd1NQGxJbVV61.mjs} +2 -2
- package/browser/esm/{DOtIN-2juYEPtB8A.mjs → DSyt7euUXqyQE6wJ.mjs} +4 -4
- package/browser/esm/{kag30q_f2OyzNEpu.mjs → Dnlx2SfcuqIfXAuA.mjs} +1 -1
- package/browser/esm/{B_GtXHanCbWYSw3u.mjs → DtrcnJnkGUDsjn70.mjs} +1 -1
- package/browser/esm/{D7VfJjp49e_MDYZN.mjs → Epq0t9gZ5n9jR9fk.mjs} +2 -2
- package/browser/esm/{qnS7YH5ry4bwFwmH.mjs → Ra0uzwzBLLZ-3x5M.mjs} +1 -1
- package/browser/esm/{CHo7Pe-qLRr6D7Zb.mjs → VA1ZILAJsv7M5eeq.mjs} +12 -12
- package/browser/esm/{BJiFVIVZgstircY0.mjs → WY7bB02qrit-yNWs.mjs} +9079 -8988
- package/browser/esm/index.mjs +16 -16
- package/browser/esm/{wk6kyK0HvQWZcF9v.mjs → jh3hpFpR0p1T4JLc.mjs} +7 -7
- package/browser/esm/{IW0FN0JJihUjmUhl.mjs → q1N22YChJlGT72Pc.mjs} +2 -2
- package/licenses/dependencies.txt +7 -7
- package/node/esm/{DyLBbEMRFc3oCumP.mjs → 7P6cCNWpeCh60raM.mjs} +2 -2
- package/node/esm/{DwU05hEZ7gmV6D81.mjs → 7pybVbMMrYvkgqo9.mjs} +2 -2
- package/node/esm/{BMwY3wpsb5LC-oha.mjs → B8JB14t2M1ROyBkd.mjs} +1 -1
- package/node/esm/{Bjq64rdekFLv2Pk6.mjs → BAETN9DFz0tUoXIp.mjs} +10 -10
- package/node/esm/{DOyVcSa6UGUQpjJ8.mjs → BN1OHyhHhXzVvWHA.mjs} +12 -12
- package/node/esm/BWAaL8-EYBs6vY6s.mjs +78 -0
- package/node/esm/{CN_9EpYFfSahI0tk.mjs → BhUbhNqcdaTWybXe.mjs} +27 -27
- package/node/esm/{Bt5SOQDsxPC-egr0.mjs → BjeTLq8pChIWnYWi.mjs} +5 -5
- package/node/esm/{hYDFyrnl76Q8TbVg.mjs → BkyFc92-aUY-wmW4.mjs} +4 -4
- package/node/esm/{CkG4RfZYIEpgMYHF.mjs → C0LHsgaW5_sBdiDi.mjs} +84 -84
- package/node/esm/{D37x0J7Pp7Ovk7U6.mjs → C6X-zKtwMSEFUmHG.mjs} +1 -1
- package/node/esm/{CVcSQEeEQOVzGI-N.mjs → CATzhyyc6fqHMLUL.mjs} +1 -1
- package/node/esm/{SDYCTfAbHCT1NUVT.mjs → CCNbV253HUVpRz3U.mjs} +7 -7
- package/node/esm/{BTyx75rKO81NBrpD.mjs → C__9KMBW0m5KFw3m.mjs} +2 -2
- package/node/esm/{DZTAP_s1UBqFpZWn.mjs → D6zrNfT4CrAssYik.mjs} +1 -1
- package/node/esm/{qTHmpgXiWFDs-DpN.mjs → DCjKIE1BmIXBswF0.mjs} +1 -1
- package/node/esm/{C-K5UNI5JYn9db2u.mjs → DCr306y2KVQnDJ7Q.mjs} +6 -6
- package/node/esm/{DCqwwPMoosi5CmNI.mjs → DNHrDFkT_y0MPSWZ.mjs} +27 -27
- package/node/esm/{BwhDUQgAy49WUvzS.mjs → DT7b6dvdVukPKg4l.mjs} +4 -4
- package/node/esm/{DET5hZx0KEr6Xvkf.mjs → DgTOFZPvhbvehrEy.mjs} +2 -2
- package/node/esm/{CfC4Y9itv3zxli6a.mjs → DtR80dy_xh4e2mfQ.mjs} +1 -1
- package/node/esm/{DNg39nLT0gHqmPlz.mjs → XxfPUjXZVLZfzpYZ.mjs} +1 -1
- package/node/esm/{BKWvOu_IeRMuC8Xk.mjs → gtQdInhawjIRtXyg.mjs} +2 -2
- package/node/esm/index.mjs +4000 -3897
- package/package.json +8 -8
- package/types/index.d.ts +50 -45
- package/browser/cjs/AQdyOmNsNjlI3zZX.cjs +0 -6
- package/browser/cjs/B50pi_DZlxL44FZa.cjs +0 -87
- package/browser/cjs/BpriOx_ASGcmQgAv.cjs +0 -6
- package/browser/cjs/Clxk_WuA_PRn6KW9.cjs +0 -12
- package/browser/esm/D5U2mNtg-sHAxwUo.mjs +0 -80
- package/browser/esm/DivcgoJCzXwVgCcg.mjs +0 -43
- package/node/esm/2eYi7rphLL5H13FB.mjs +0 -74
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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("./2OSBl2r7IttrCdtA.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("./2OSBl2r7IttrCdtA.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-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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,80 +0,0 @@
|
|
|
1
|
-
import { Workbook as k } from "@sheetxl/sdk";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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,43 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as j, forwardRef as z, useState as p } from "react";
|
|
3
|
-
import { $ as t, a0 as E, a1 as K, a2 as R, a3 as O } from "./BJiFVIVZgstircY0.mjs";
|
|
4
|
-
import { Box as W, FormControl as q, TextField as A } from "@mui/material";
|
|
5
|
-
import { alpha as y } from "@mui/system";
|
|
6
|
-
/**
|
|
7
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.18
|
|
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 G = ["Input"], _ = j(z((w, J) => {
|
|
13
|
-
const { initialValue: F = "", onOption: T, onValidateOption: r, onInputOption: l, onValidateInputOption: s, onDone: u, inputProps: c, inputLabel: C, inputType: I, inputPlaceHolder: P, options: d = G, autoFocusSel: v = ".autoFocus", cancelOption: m, defaultOption: g = d?.[0], ...b } = w, [k, V] = p(!1), [o, B] = p(F), [D, S] = p(""), [$, H] = p(!0), e = t(async (a, n) => {
|
|
14
|
-
if (!s) return !0;
|
|
15
|
-
const h = await s?.(a, n);
|
|
16
|
-
S(h?.message ?? "");
|
|
17
|
-
const x = h?.valid ?? !0;
|
|
18
|
-
return H(x), x;
|
|
19
|
-
}, [s]), f = t(async (a) => {
|
|
20
|
-
l?.(o, a);
|
|
21
|
-
}, [o, l, u, T, m, g]), L = t(async (a) => {
|
|
22
|
-
a.keyCode === E.Enter && await e?.(o, null);
|
|
23
|
-
}, [o, f]), M = t((a) => {
|
|
24
|
-
B(a.target.value), e?.(a.target.value, null);
|
|
25
|
-
}, [r]), N = t(async (a) => {
|
|
26
|
-
let n = await e(o, a);
|
|
27
|
-
try {
|
|
28
|
-
n !== !1 && (n = await e(o, a));
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
return n ?? !0;
|
|
32
|
-
}, [o, r]);
|
|
33
|
-
return i(K, { options: d, onDone: u, onOption: (a, n) => {
|
|
34
|
-
n || f(a);
|
|
35
|
-
}, onValidateOption: N, cancelOption: m, defaultOption: g, autoFocusSel: v, ...b, children: i(W, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0) }, children: i(q, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(A, { onFocus: (a) => {
|
|
36
|
-
k || a.target?.select(), V(!0);
|
|
37
|
-
}, type: I, label: C, helperText: D || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5), color: $ ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: P, spellCheck: !1, autoComplete: "off", ...c, className: R("autoFocus", c?.className), sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${y("#fff", O(5))}, ${y("#fff", O(5))})` } } }, value: o, onChange: M, onKeyDown: L, onContextMenu: (a) => {
|
|
38
|
-
a.stopPropagation();
|
|
39
|
-
} }) }) }) });
|
|
40
|
-
}));
|
|
41
|
-
export {
|
|
42
|
-
_ as default
|
|
43
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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
|
-
*/
|
|
7
|
-
import { Workbook as e } from "@sheetxl/sdk";
|
|
8
|
-
const t = async (e2, t2) => {
|
|
9
|
-
const n2 = await e2.toJSON(), r = t2?.whiteSpace ?? 0;
|
|
10
|
-
let o;
|
|
11
|
-
t2?.beforeWrite?.(e2, n2), o = 0 === r ? JSON.stringify(n2) : function(e3, t3 = 2) {
|
|
12
|
-
const n3 = [];
|
|
13
|
-
function r2(e4) {
|
|
14
|
-
const r3 = t3 * e4;
|
|
15
|
-
return void 0 === n3[r3] && (n3[r3] = " ".repeat(r3)), n3[r3];
|
|
16
|
-
}
|
|
17
|
-
return function e4(t4, n4, o2, s2) {
|
|
18
|
-
if (null == t4 || "object" != typeof t4) return JSON.stringify(t4);
|
|
19
|
-
const i2 = r2(n4), c = r2(n4 + 1);
|
|
20
|
-
if (Array.isArray(t4)) {
|
|
21
|
-
const r3 = t4.length;
|
|
22
|
-
if (0 === r3) return "[]";
|
|
23
|
-
if (0 !== o2) return JSON.stringify(t4);
|
|
24
|
-
let s3 = "[\n";
|
|
25
|
-
for (let i3 = 0; i3 < r3; i3++) s3 += c + e4(t4[i3], n4 + 1, o2 + 1, true), i3 < r3 - 1 && (s3 += ",\n");
|
|
26
|
-
return s3 += "\n" + i2 + "]", s3;
|
|
27
|
-
}
|
|
28
|
-
const f = Object.keys(t4), a = f.length;
|
|
29
|
-
if (0 === a) return "{}";
|
|
30
|
-
if (!(o2 < 2)) return JSON.stringify(t4);
|
|
31
|
-
let u = "{\n";
|
|
32
|
-
s2 || (o2 = 0);
|
|
33
|
-
for (let r3 = 0; r3 < a; r3++) {
|
|
34
|
-
const s3 = f[r3];
|
|
35
|
-
u += c + JSON.stringify(s3) + ": " + e4(t4[s3], n4 + 1, o2, false), r3 < a - 1 && (u += ",\n");
|
|
36
|
-
}
|
|
37
|
-
return u += "\n" + i2 + "}", u;
|
|
38
|
-
}(e3, 0, 0, false);
|
|
39
|
-
}(n2, r);
|
|
40
|
-
let s = new TextEncoder().encode(o);
|
|
41
|
-
const i = t2?.compress ?? true;
|
|
42
|
-
return i && (s = await async function(e3, t3 = "gzip") {
|
|
43
|
-
const n3 = new ReadableStream({ start(t4) {
|
|
44
|
-
t4.enqueue(e3), t4.close();
|
|
45
|
-
} }), r2 = new CompressionStream(t3), o2 = n3.pipeThrough(r2);
|
|
46
|
-
return (await new Response(o2).blob()).arrayBuffer();
|
|
47
|
-
}(s, "string" == typeof i ? i : void 0)), s;
|
|
48
|
-
}, n = async (t2, n2) => {
|
|
49
|
-
let r = t2;
|
|
50
|
-
(function(e2) {
|
|
51
|
-
if (e2.byteLength < 4) return false;
|
|
52
|
-
const t3 = new Uint8Array(e2), n3 = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, r2 = Object.keys(n3);
|
|
53
|
-
for (let e3 = 0; e3 < r2.length; e3++) {
|
|
54
|
-
const o2 = r2[e3], s2 = n3[o2];
|
|
55
|
-
let i2 = true;
|
|
56
|
-
for (let e4 = 0; e4 < s2.length; e4++) if (t3[e4] !== s2[e4]) {
|
|
57
|
-
i2 = false;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
if (i2) return o2;
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
})(r) && (r = await async function(e2, t3 = "gzip") {
|
|
64
|
-
const n3 = new Blob([e2]).stream(), r2 = new DecompressionStream(t3), o2 = n3.pipeThrough(r2);
|
|
65
|
-
return (await new Response(o2).blob()).arrayBuffer();
|
|
66
|
-
}(r));
|
|
67
|
-
let o = new TextDecoder().decode(r);
|
|
68
|
-
const s = JSON.parse(o), i = { ...n2?.constructorOptions ?? {}, json: s };
|
|
69
|
-
return new e(i);
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
n as fromBufferJSON,
|
|
73
|
-
t as toBufferJSON
|
|
74
|
-
};
|