@sheetxl/studio-vanilla 0.4.20 → 0.4.21
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/index.cjs +80 -2
- package/browser/cjs/{DlL3FUzHZ4HVF-yg.cjs → n6CXzSocLW_BCO8w.cjs} +6 -6
- package/browser/esm/{BFUWwMA9uskwVkew.mjs → NBuS53B7u8hItiXf.mjs} +933 -937
- package/browser/esm/index.mjs +176 -4
- package/cdn/assets/CY8njwo06MWkoPz2.js +21 -0
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/browser/cjs/B3IrGavp2xDl72qi.cjs +0 -15
- package/browser/cjs/B4ScrvWBCXLzvNBz.cjs +0 -145
- package/browser/cjs/BBNggAKHDP4QyhrD.cjs +0 -6
- package/browser/cjs/BC_a9wiziJZdu6Au.cjs +0 -6
- package/browser/cjs/BDxykI6GcXpGGGMz.cjs +0 -42
- package/browser/cjs/BK6DsykAfJG4V-cJ.cjs +0 -6
- package/browser/cjs/BKow6xaj0GHFH5-V.cjs +0 -6
- package/browser/cjs/BOAxaoihJZZzZXhd.cjs +0 -6
- package/browser/cjs/BSlU398ba-ACAG1g.cjs +0 -11
- package/browser/cjs/BSoRD8INLnGqOd24.cjs +0 -7
- package/browser/cjs/BTxfWiE-FbVvlbXz.cjs +0 -11
- package/browser/cjs/BdltTXLt7iZT8sku.cjs +0 -6
- package/browser/cjs/Bf-D_AYDbEeRcsvz.cjs +0 -6
- package/browser/cjs/Bhlan81dumwgyb0S.cjs +0 -6
- package/browser/cjs/BlJixWFmG-z3n7dN.cjs +0 -6
- package/browser/cjs/BndDL5HS4RNIfwOd.cjs +0 -15
- package/browser/cjs/Buw8XeqL6XQwxqnQ.cjs +0 -32
- package/browser/cjs/C04_CccTUmfnv-ln.cjs +0 -6
- package/browser/cjs/C4AWzM1Uh9cuE1A9.cjs +0 -6
- package/browser/cjs/C5TLXtw93fBnRGm7.cjs +0 -378
- package/browser/cjs/CKa-Z1SfYc0pkIX2.cjs +0 -6
- package/browser/cjs/CLiSJrUNaSxa5Mn7.cjs +0 -16
- package/browser/cjs/CODi1uYlZ35lFLh9.cjs +0 -6
- package/browser/cjs/CSM5H5PTjrTaUgKK.cjs +0 -6
- package/browser/cjs/CTPgM-UqKCo4_hd1.cjs +0 -6
- package/browser/cjs/CW5RuE4isKBlwHmQ.cjs +0 -6
- package/browser/cjs/CX82d7xySIGMF7yM.cjs +0 -6
- package/browser/cjs/CXik9BghKbVW93T0.cjs +0 -124
- package/browser/cjs/Ccv5NHm99sYZnKE6.cjs +0 -7
- package/browser/cjs/CeH0O9zPmIGKjuT9.cjs +0 -19
- package/browser/cjs/CeLG8vmgbEkx4oD1.cjs +0 -6
- package/browser/cjs/CvYl4W2vXnvHHHoI.cjs +0 -6
- package/browser/cjs/D2J4RLkySRIXFbsa.cjs +0 -6
- package/browser/cjs/D2bZuhwA7aCEA0It.cjs +0 -6
- package/browser/cjs/D3hV1-QRPKCq0om8.cjs +0 -6
- package/browser/cjs/D6WxWENDWFXA_esX.cjs +0 -6
- package/browser/cjs/DEiPHs81OFnGI_GL.cjs +0 -6
- package/browser/cjs/DHiQ_sK8f-95Ft4X.cjs +0 -12
- package/browser/cjs/DMpqQkdCfg2AjXjR.cjs +0 -6
- package/browser/cjs/DUjgS2e8jjyhZF41.cjs +0 -6
- package/browser/cjs/DWIR1gQMiYyoUVpN.cjs +0 -7
- package/browser/cjs/DawJBg8LyIArkwdU.cjs +0 -6
- package/browser/cjs/Dn5IBCKPuNI0ypyZ.cjs +0 -6
- package/browser/cjs/Dp6UwWmFehNr8oln.cjs +0 -6
- package/browser/cjs/Dr95ZpJD5KpADFgL.cjs +0 -6
- package/browser/cjs/IxfGyvVPF27qqDF3.cjs +0 -6
- package/browser/cjs/P7jR9JAKpf5me2pK.cjs +0 -6
- package/browser/cjs/QonkTPcCkOm4Mvas.cjs +0 -6
- package/browser/cjs/T4zy652TD1RHF35F.cjs +0 -6
- package/browser/cjs/d6ywgaNww4eYXcem.cjs +0 -1501
- package/browser/cjs/dQ_t_glP-41DsAl-.cjs +0 -6
- package/browser/cjs/iIOyWIrlq0JiZyZX.cjs +0 -6
- package/browser/cjs/jX_tynzFoHAGPZOz.cjs +0 -6
- package/browser/cjs/nlzloz3gqSXQwTl5.cjs +0 -13
- package/browser/cjs/xPUjEhL251Mb-kyD.cjs +0 -161
- package/browser/cjs/zreCxaXU5L2iHQ99.cjs +0 -6
- package/browser/esm/2vIB3gG-Ct-P7aHY.mjs +0 -24
- package/browser/esm/B1qmfUH_Mmjtp3JU.mjs +0 -56
- package/browser/esm/B4ABRWtE31zu8-wJ.mjs +0 -21
- package/browser/esm/B6c_mMwG96t6MlCE.mjs +0 -10
- package/browser/esm/B7ohU_quBXWjiBEw.mjs +0 -3934
- package/browser/esm/BGJaDv3Ih-M1lFCD.mjs +0 -10
- package/browser/esm/BJkeQi-0GTlyPsTT.mjs +0 -52369
- package/browser/esm/BR2yOGMlFrbNy1I_.mjs +0 -472
- package/browser/esm/BRzxK84abQUinUUx.mjs +0 -10
- package/browser/esm/BS_-p_4yMCoR9FTp.mjs +0 -10
- package/browser/esm/BTbBL2qySirAIMIH.mjs +0 -1346
- package/browser/esm/Be9tvHxvnxnHNRa4.mjs +0 -12
- package/browser/esm/BfiejFYnvgVrrJPI.mjs +0 -10
- package/browser/esm/Bj4d7nd4XMugBsBg.mjs +0 -39
- package/browser/esm/Bmfu8IUFzu9KyCkA.mjs +0 -10
- package/browser/esm/BqgjdQ15LFcefVOZ.mjs +0 -425
- package/browser/esm/BuX3I7e8lbon25vL.mjs +0 -1702
- package/browser/esm/Bz0TojPavQ5NTjyD.mjs +0 -633
- package/browser/esm/CA33PnXmPNl09v6w.mjs +0 -84
- package/browser/esm/CPchasanZLQiASse.mjs +0 -10
- package/browser/esm/CSDiL3gZro2_BYTj.mjs +0 -10
- package/browser/esm/CT_g1GDC8_vSGR0o.mjs +0 -48
- package/browser/esm/CVvfga1mKyvzrvCr.mjs +0 -20
- package/browser/esm/CXSiJ-t5xz78GMwK.mjs +0 -10
- package/browser/esm/CYrbG4T_bwbc4Un4.mjs +0 -390
- package/browser/esm/CeSDjV2b8w7KibJw.mjs +0 -1466
- package/browser/esm/Cjp7NabZ26PaBnIT.mjs +0 -46
- package/browser/esm/CmLCIveZbsUFrSOH.mjs +0 -1665
- package/browser/esm/CpDyqZXpstRo2buW.mjs +0 -10
- package/browser/esm/CpQM3xIeariuqfsN.mjs +0 -47
- package/browser/esm/D2L4EVLdv-YwKGoi.mjs +0 -2344
- package/browser/esm/D7bqIxhqlHgc3Fih.mjs +0 -10
- package/browser/esm/DJx6S7TOhQyWdjS5.mjs +0 -10
- package/browser/esm/DR85glElKOQxCdEw.mjs +0 -820
- package/browser/esm/DWnopZ6R26qNLVyV.mjs +0 -10
- package/browser/esm/DaoqFa2lhVoZvd16.mjs +0 -421
- package/browser/esm/DgxaqoqInkc26SCt.mjs +0 -13208
- package/browser/esm/Dkf0_o7D9GkUfOZy.mjs +0 -147
- package/browser/esm/DlASr70UXrIpKZQO.mjs +0 -2174
- package/browser/esm/DmXkRZFP-WnV2YT9.mjs +0 -10
- package/browser/esm/DsabS3TdXZB45_O2.mjs +0 -1575
- package/browser/esm/Dvo7tXJcgnIXR-H7.mjs +0 -5582
- package/browser/esm/JdOvTKCcf5acl7vA.mjs +0 -10
- package/browser/esm/KUyPDaQO4D8lwO7O.mjs +0 -21
- package/browser/esm/KWZAe-e6U7Po4gCx.mjs +0 -44
- package/browser/esm/Qjkn8L0WuEQToAqm.mjs +0 -41
- package/browser/esm/RvEM-YtFLw3OMG0V.mjs +0 -29
- package/browser/esm/S2TZ7C9tQtDNeeGo.mjs +0 -10
- package/browser/esm/VYFESZA0Jc8C13ZT.mjs +0 -10
- package/browser/esm/_sUvLBCLSPhV2gF6.mjs +0 -10
- package/browser/esm/dWGGn8a_Ez8kVjgZ.mjs +0 -10
- package/browser/esm/dwY5oHtoGa_ktt9_.mjs +0 -1365
- package/browser/esm/giu63J2gO2p8JJIf.mjs +0 -10
- package/browser/esm/glJJyP0v0nlhAzqM.mjs +0 -10
- package/browser/esm/q5jyS6wUD9X8N3dI.mjs +0 -3755
- package/browser/esm/xbsV0YR05atX96kb.mjs +0 -10
- package/cdn/assets/2vIB3gG-Ct-P7aHY.js +0 -24
- package/cdn/assets/9GNkN_zTAHpnP-uq.js +0 -1575
- package/cdn/assets/B6c_mMwG96t6MlCE.js +0 -10
- package/cdn/assets/BBGivbkBG9VS_rL9.js +0 -3756
- package/cdn/assets/BCfZ9L4sqA1AhATQ.js +0 -46
- package/cdn/assets/BF0szY6Cs6OTiu4J.js +0 -22
- package/cdn/assets/BFvB3zk5mbav2VDI.js +0 -52200
- package/cdn/assets/BGJaDv3Ih-M1lFCD.js +0 -10
- package/cdn/assets/BGQ19MuEoWb0IGOg.js +0 -425
- package/cdn/assets/BKAFXvz5L4pnwrYW.js +0 -41
- package/cdn/assets/BRzxK84abQUinUUx.js +0 -10
- package/cdn/assets/BS_-p_4yMCoR9FTp.js +0 -10
- package/cdn/assets/BTbBL2qySirAIMIH.js +0 -1346
- package/cdn/assets/Be9tvHxvnxnHNRa4.js +0 -12
- package/cdn/assets/BfiejFYnvgVrrJPI.js +0 -10
- package/cdn/assets/Bj6XCGohW0EagXDQ.js +0 -1702
- package/cdn/assets/Bmfu8IUFzu9KyCkA.js +0 -10
- package/cdn/assets/Bnpwlyv8i_gnevRF.js +0 -3934
- package/cdn/assets/BnrLDtUMM23rGXOR.js +0 -390
- package/cdn/assets/Bz0TojPavQ5NTjyD.js +0 -633
- package/cdn/assets/C-saEYaoPI4gaVAh.js +0 -820
- package/cdn/assets/CBG91FlGgFb_NSW3.js +0 -1466
- package/cdn/assets/CO9eLmNMi1heLPMx.js +0 -2177
- package/cdn/assets/CPchasanZLQiASse.js +0 -10
- package/cdn/assets/CSDiL3gZro2_BYTj.js +0 -10
- package/cdn/assets/CXSiJ-t5xz78GMwK.js +0 -10
- package/cdn/assets/Cc_7h2P328hlBcqK.js +0 -472
- package/cdn/assets/CmLCIveZbsUFrSOH.js +0 -1665
- package/cdn/assets/CpDyqZXpstRo2buW.js +0 -10
- package/cdn/assets/Cv2EzXYuphY8Hlz2.js +0 -23
- package/cdn/assets/Cz1EUITrDS2M-lu2.js +0 -2346
- package/cdn/assets/D7bqIxhqlHgc3Fih.js +0 -10
- package/cdn/assets/DDWoPuN8AcPJHNxL.js +0 -58
- package/cdn/assets/DJx6S7TOhQyWdjS5.js +0 -10
- package/cdn/assets/DU8_1yjWbaEkXcbL.js +0 -12
- package/cdn/assets/DWnopZ6R26qNLVyV.js +0 -10
- package/cdn/assets/DYE-hWYAUd_f6MX8.js +0 -46
- package/cdn/assets/DaoqFa2lhVoZvd16.js +0 -421
- package/cdn/assets/DfpCefkqWIezzC8Z.js +0 -49
- package/cdn/assets/DgxaqoqInkc26SCt.js +0 -13208
- package/cdn/assets/DmXkRZFP-WnV2YT9.js +0 -10
- package/cdn/assets/EN4PLLABu5llaV3T.js +0 -21
- package/cdn/assets/JdOvTKCcf5acl7vA.js +0 -10
- package/cdn/assets/KUyPDaQO4D8lwO7O.js +0 -21
- package/cdn/assets/LbFq2oCowUDgCX8L.js +0 -43
- package/cdn/assets/S2TZ7C9tQtDNeeGo.js +0 -10
- package/cdn/assets/SPvRfEBpgC5rbgPz.js +0 -29
- package/cdn/assets/SsQFeDXfmfXHyy1R.js +0 -5582
- package/cdn/assets/TP7wJaHcKRz3uH_W.js +0 -50
- package/cdn/assets/UhBzX4vQryCjy6ce.js +0 -84
- package/cdn/assets/VYFESZA0Jc8C13ZT.js +0 -10
- package/cdn/assets/_sUvLBCLSPhV2gF6.js +0 -10
- package/cdn/assets/dWGGn8a_Ez8kVjgZ.js +0 -10
- package/cdn/assets/dwY5oHtoGa_ktt9_.js +0 -1365
- package/cdn/assets/giu63J2gO2p8JJIf.js +0 -10
- package/cdn/assets/glJJyP0v0nlhAzqM.js +0 -10
- package/cdn/assets/nsmFGDjpeUcAO4is.js +0 -149
- package/cdn/assets/xbsV0YR05atX96kb.js +0 -10
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { h as J } from "./BJkeQi-0GTlyPsTT.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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 k = async (w, l) => {
|
|
9
|
-
const u = await w.toJSON(), b = l?.whiteSpace ?? 0;
|
|
10
|
-
let g;
|
|
11
|
-
l?.beforeWrite?.(w, u), g = b === 0 ? JSON.stringify(u) : function(f, r = 2) {
|
|
12
|
-
const n = [];
|
|
13
|
-
function i(o) {
|
|
14
|
-
const e = r * o;
|
|
15
|
-
return n[e] === void 0 && (n[e] = " ".repeat(e)), n[e];
|
|
16
|
-
}
|
|
17
|
-
return function o(e, a, s, m) {
|
|
18
|
-
if (e == null || typeof e != "object") return JSON.stringify(e);
|
|
19
|
-
const d = i(a), O = i(a + 1);
|
|
20
|
-
if (Array.isArray(e)) {
|
|
21
|
-
const c = e.length;
|
|
22
|
-
if (c === 0) return "[]";
|
|
23
|
-
if (s !== 0) return JSON.stringify(e);
|
|
24
|
-
let y = `[
|
|
25
|
-
`;
|
|
26
|
-
for (let S = 0; S < c; S++) y += O + o(e[S], a + 1, s + 1, !0), S < c - 1 && (y += `,
|
|
27
|
-
`);
|
|
28
|
-
return y += `
|
|
29
|
-
` + d + "]", y;
|
|
30
|
-
}
|
|
31
|
-
const B = Object.keys(e), A = B.length;
|
|
32
|
-
if (A === 0) return "{}";
|
|
33
|
-
if (!(s < 2)) return JSON.stringify(e);
|
|
34
|
-
let h = `{
|
|
35
|
-
`;
|
|
36
|
-
m || (s = 0);
|
|
37
|
-
for (let c = 0; c < A; c++) {
|
|
38
|
-
const y = B[c];
|
|
39
|
-
h += O + JSON.stringify(y) + ": " + o(e[y], a + 1, s, !1), c < A - 1 && (h += `,
|
|
40
|
-
`);
|
|
41
|
-
}
|
|
42
|
-
return h += `
|
|
43
|
-
` + d + "}", h;
|
|
44
|
-
}(f, 0, 0, !1);
|
|
45
|
-
}(u, b);
|
|
46
|
-
let p = new TextEncoder().encode(g).buffer;
|
|
47
|
-
const t = l?.compress ?? !0;
|
|
48
|
-
return t && (p = await async function(f, r = "gzip") {
|
|
49
|
-
let n;
|
|
50
|
-
typeof SharedArrayBuffer < "u" && f instanceof SharedArrayBuffer ? (n = new ArrayBuffer(f.byteLength), new Uint8Array(n).set(new Uint8Array(f))) : n = f;
|
|
51
|
-
const i = new ReadableStream({ start(a) {
|
|
52
|
-
a.enqueue(n), a.close();
|
|
53
|
-
} }), o = new CompressionStream(r), e = i.pipeThrough(o);
|
|
54
|
-
return (await new Response(e).blob()).arrayBuffer();
|
|
55
|
-
}(p, typeof t == "string" ? t : void 0)), p;
|
|
56
|
-
}, z = async (w, l) => {
|
|
57
|
-
let u = w;
|
|
58
|
-
(function(t) {
|
|
59
|
-
if (t.byteLength < 4) return !1;
|
|
60
|
-
const f = new Uint8Array(t), r = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, n = Object.keys(r);
|
|
61
|
-
for (let i = 0; i < n.length; i++) {
|
|
62
|
-
const o = n[i], e = r[o];
|
|
63
|
-
let a = !0;
|
|
64
|
-
for (let s = 0; s < e.length; s++) if (f[s] !== e[s]) {
|
|
65
|
-
a = !1;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
if (a) return o;
|
|
69
|
-
}
|
|
70
|
-
return !1;
|
|
71
|
-
})(u) && (u = await async function(t, f = "gzip") {
|
|
72
|
-
let r;
|
|
73
|
-
typeof SharedArrayBuffer < "u" && t instanceof SharedArrayBuffer ? (r = new ArrayBuffer(t.byteLength), new Uint8Array(r).set(new Uint8Array(t))) : r = t;
|
|
74
|
-
const n = new Blob([r]).stream(), i = new DecompressionStream(f), o = n.pipeThrough(i);
|
|
75
|
-
return (await new Response(o).blob()).arrayBuffer();
|
|
76
|
-
}(u));
|
|
77
|
-
let b = new TextDecoder().decode(u);
|
|
78
|
-
const g = JSON.parse(b), p = { ...l?.createWorkbookOptions ?? {}, json: g };
|
|
79
|
-
return new J(p);
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
z as fromBufferJSON,
|
|
83
|
-
k as toBufferJSON
|
|
84
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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
|
-
const e = { DATE: { s: "Returns the number that represents the date in Microsoft Excel date-time code", p: { year: { d: "is a number from 1900 or 1904 (depending on the workbook's date system) to 9999" }, month: { d: "is a number from 1 to 12 representing the month of the year" }, day: { d: "is a number from 1 to 31 representing the day of the month" } } }, DATEDIF: { s: "Returns the number of days between two dates", p: { startDate: { d: "is a serial date number that represents the start date" }, endDate: { d: "is a serial date number that represents the end date" }, unit: { d: "is a string that specifies the unit of time to use" } }, h: "Legacy" }, DATESTRING: { s: "Returns NA.", p: { number: { d: "is a number that is ignored" } }, h: "Legacy" }, DATEVALUE: { s: "Converts a date in the form of text to a number that represents the date in Microsoft Excel date-time code", p: { dateText: { d: "is text that represents a date in a Microsoft Excel date format, between 1/1/1900 or 1/1/1904 (depending on the workbook's date system) and 12/31/9999" } } }, DAY: { s: "Returns the day of the month, a number from 1 to 31.", p: { serialOrString: { d: "is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM" } } }, DAYS: { s: "Returns the number of days between the two dates.", p: { endDate: { d: "start_date and end_date are the two dates between which you want to know the number of days" }, startDate: { d: "start_date and end_date are the two dates between which you want to know the number of days" } } }, DAYS360: { s: "Returns the number of days between two dates based on a 360-day year (twelve 30-day months)", p: { startDate: { d: "start_date and end_date are the two dates between which you want to know the number of days" }, endDate: { d: "start_date and end_date are the two dates between which you want to know the number of days" }, method: { d: "is a logical value specifying the calculation method: U.S. (NASD) = FALSE; European = TRUE.", v: !1 } } }, EDATE: { s: "Returns the serial number of the date that is the indicated number of months before or after the start date", p: { startDate: { d: "is a serial date number that represents the start date" }, months: { d: "is the number of months before or after start_date" } } }, EOMONTH: { s: "Returns the serial number of the last day of the month before or after a specified number of months", p: { startDate: { d: "is a serial date number that represents the start date" }, months: { d: "is the number of months before or after the start_date" } } }, HOUR: { s: "Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.).", p: { serialOrString: { d: "is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM" } } }, ISOWEEKNUM: { s: "Returns the ISO week number in the year for a given date", p: { serialOrString: { d: "is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM" } } }, MINUTE: { s: "Returns the minute, a number from 0 to 59.", p: { serialOrString: { d: "is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM" } } }, MONTH: { s: "Returns the month, a number from 1 (January) to 12 (December).", p: { serialOrString: { d: "is a number in the date-time code used by Excel" } } }, NETWORKDAYS: { s: "Returns the number of whole workdays between two dates", p: { startDate: { d: "is a serial date number that represents the start date" }, endDate: { d: "is a serial date number that represents the end date" }, holidays: { d: "is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays", v: null } } }, "NETWORKDAYS.INTL": { s: "Returns the number of whole workdays between two dates with custom weekend parameters", p: { startDate: { d: "is a serial date number that represents the start date" }, endDate: { d: "is a serial date number that represents the end date" }, weekend: { d: "is a number or string specifying when weekends occur", v: 1 }, holidays: { d: "is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays", v: null } } }, NOW: { s: "Returns the current date and time formatted as a date and time.", p: {} }, SECOND: { s: "Returns the second, a number from 0 to 59.", p: { serialOrString: { d: "is a number in the date-time code used by Excel or text in time format, such as 16:48:23 or 4:48:47 PM" } } }, TIME: { s: "Converts hours, minutes, and seconds given as numbers to an Excel serial number, formatted with a time format", p: { hour: { d: "is a number from 0 to 23 representing the hour" }, minute: { d: "is a number from 0 to 59 representing the minute" }, second: { d: "is a number from 0 to 59 representing the second" } } }, TIMEVALUE: { s: "Converts a text time to an Excel serial number for a time, a number from 0 (12:00:00 AM) to 0.999988426 (11:59:59 PM). Format the number with a time format after entering the formula", p: { timeText: { d: "is a text string that gives a time in any one of the Excel time formats (date information in the string is ignored)" } } }, TODAY: { s: "Returns the current date formatted as a date.", p: {} }, WEEKDAY: { s: "Returns a number from 1 to 7 identifying the day of the week of a date.", p: { serialOrString: { d: "is a number that represents a date" }, returnType: { d: "is a number: for Sunday=1 through Saturday=7, use 1; for Monday=1 through Sunday=7, use 2; for Monday=0 through Sunday=6, use 3", v: 1 } } }, WEEKNUM: { s: "Returns the week number in the year", p: { serialOrString: { d: "is the date-time code used by Excel for date and time calculation" }, returnType: { d: "is a number (1 or 2) that determines the type of the return value", v: 1 } } }, WORKDAY: { s: "Returns the serial number of the date before or after a specified number of workdays", p: { startDate: { d: "is a serial date number that represents the start date" }, days: { d: "is the number of nonweekend and non-holiday days before or after start_date" }, holidays: { d: "is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays", v: null } } }, "WORKDAY.INTL": { s: "Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters", p: { startDate: { d: "is a serial date number that represents the start date" }, days: { d: "is the number of nonweekend and non-holiday days before or after start_date" }, weekend: { d: "is a number or string specifying when weekends occur", v: 1 }, holidays: { d: "is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays", v: null } } }, YEAR: { s: "Returns the year of a date, an integer in the range 1900 - 9999.", p: { serialOrString: { d: "is a number in the date-time code used by Excel" } } }, YEARFRAC: { s: "Returns the year fraction representing the number of whole days between start_date and end_date", p: { startDate: { d: "is a serial date number that represents the start date" }, endDate: { d: "is a serial date number that represents the end date" }, basis: { d: "is the type of day count basis to use", v: 0 } } } };
|
|
8
|
-
export {
|
|
9
|
-
e as default
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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
|
-
const e = { CUBEKPIMEMBER: { s: "Returns a key performance indicator (KPI) property and displays the KPI name in the cell.", p: { connection: { d: "is the name of a connection to an OLAP cube" }, kpiName: { d: "is the KPI name" }, kpiProperty: { d: "is the KPI property" }, caption: { d: "is the caption to be displayed in the cell" } }, h: "Unimplemented" }, CUBEMEMBER: { s: "Returns a member or tuple from the cube.", p: { connection: { d: "is the name of a connection to an OLAP cube" }, memberExpression: { d: "is the expression representing the name of a member or tuple in the OLAP cube" }, caption: { d: "is the caption to be displayed in the cell" } }, h: "Unimplemented" }, CUBEMEMBERPROPERTY: { s: "Returns the value of a member property from the cube.", p: { connection: { d: "is the name of a connection to an OLAP cube" }, memberExpression: { d: "is the expression representing the name of a member in the OLAP cube" }, kpiProperty: { d: "is the property name" } }, h: "Unimplemented" }, CUBERANKEDMEMBER: { s: "Returns the nth, or ranked, member in a set.", p: { connection: { d: "is the name of a connection to an OLAP cube" }, setExpression: { d: "is the set from which the element is to be retrieved" }, rank: { d: "is the rank of the element to be retrieved" }, caption: { d: "is the caption to be displayed in the cell" } }, h: "Unimplemented" }, CUBESET: { s: "Defines a calculated set of members or tuples by sending a set expression to the cube on the server, which creates the set, and then returns that set to Microsoft Excel.", p: { connection: { d: "is the name of a connection to an OLAP cube" }, setExpression: { d: "is the expression for the set" }, caption: { d: "is the caption to be displayed in the cell" }, sortOrder: { d: "is the sort order" }, sortBy: { d: "is the sort by" } }, h: "Unimplemented" }, CUBESETCOUNT: { s: "Returns the number of items in a set.", p: { set: { d: "is the set whose elements are to be counted" } }, h: "Unimplemented" }, CUBEVALUE: { s: "Returns an aggregated value from the cube.", p: { connection: { d: "is the name of a connection to an OLAP cube" }, memberExpression: {} }, h: "Unimplemented" } };
|
|
8
|
-
export {
|
|
9
|
-
e as default
|
|
10
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { r as s, t as u, j as l, $ as B, B as M, F as S, a as $, b as h, U as C } from "./BJkeQi-0GTlyPsTT.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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 E = ["Ok", "Cancel"], V = s.memo((O) => {
|
|
9
|
-
const { initialComments: F = null, onUpdateComments: m, context: b, onOption: d, onValidateOption: c, onDone: p, options: g = E, defaultOption: r = g?.[0], cancelOption: i = "Cancel", sx: j, ...k } = O, x = s.useMemo(() => {
|
|
10
|
-
const n = F ?? b?.()?.getComments();
|
|
11
|
-
let t = "";
|
|
12
|
-
if (n && n.content && n.content.runs) {
|
|
13
|
-
const a = n.content.runs;
|
|
14
|
-
for (let o = 0; o < a.length; o++) {
|
|
15
|
-
const I = a[o];
|
|
16
|
-
t += I?.text;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
}, []), [e, w] = s.useState(x), [y, P] = s.useState(!1), f = s.useCallback(async (n, t) => null, []), T = u(async (n) => {
|
|
21
|
-
const t = e === "" ? [] : e.split(`
|
|
22
|
-
`);
|
|
23
|
-
if (n !== i) {
|
|
24
|
-
const a = [];
|
|
25
|
-
for (let o = 0; o < t.length; o++) a.push({ text: t[o] });
|
|
26
|
-
m?.({ content: { runs: a } });
|
|
27
|
-
}
|
|
28
|
-
d?.(n, n === i, n === r), p?.();
|
|
29
|
-
}, [e, m, p, d, r, i]), v = u((n) => {
|
|
30
|
-
w(n.target.value), f(n.target.value, null);
|
|
31
|
-
}, [c]), D = u(async (n) => {
|
|
32
|
-
let t = await Promise.resolve(c?.(n));
|
|
33
|
-
try {
|
|
34
|
-
t !== !1 && (t = await f(e, n));
|
|
35
|
-
} catch {
|
|
36
|
-
}
|
|
37
|
-
return t ?? !0;
|
|
38
|
-
}, [c, e]);
|
|
39
|
-
return l.jsx(B, { title: (x ? "Edit" : "Insert") + " Comments", options: g, onDone: p, onOption: (n) => T(n), onValidateOption: D, defaultOption: r, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...j }, ...k, children: l.jsx(M, { sx: { paddingTop: (n) => n.spacing(1), paddingBottom: (n) => n.spacing(0), rowGap: (n) => n.spacing(1), display: "flex", flexDirection: "column" }, children: l.jsx(S, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l.jsx($, { label: "Comments", placeholder: "Enter a comment.", onFocus: (n) => {
|
|
40
|
-
y || n.target?.select(), P(!0);
|
|
41
|
-
}, 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: v, onContextMenu: (n) => {
|
|
42
|
-
n.stopPropagation();
|
|
43
|
-
} }) }) }) });
|
|
44
|
-
});
|
|
45
|
-
export {
|
|
46
|
-
V as CommentsDialog,
|
|
47
|
-
V as default
|
|
48
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { r as a, t as D, j as n, $ as N, B as S, X as T, u as k, C as w } from "./BJkeQi-0GTlyPsTT.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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 v = ["Ok", "Cancel"], F = a.memo((g) => {
|
|
9
|
-
const { tableOptions: t, context: c, onOption: p, onValidateOption: y, onDone: r, options: d = v, defaultOption: o = d?.[0], cancelOption: l = "Cancel", sx: x, ...m } = g, [h, O] = a.useState(!1), [s, b] = a.useState(() => t?.hasHeader ?? !1), [i, f] = a.useState(() => t?.ranges ?? null), j = D((e) => {
|
|
10
|
-
const u = { ...t, hasHeader: s, ranges: i };
|
|
11
|
-
p?.(e, e === l, e === o), r?.({ option: e, tableOptions: u });
|
|
12
|
-
}, [r, p, o, l, s, i, t]), C = a.useCallback(async (e, u) => null, []);
|
|
13
|
-
return n.jsx(N, { title: "Insert Table", options: d, onDone: j, onValidateOption: C, defaultOption: o, cancelOption: l, autoFocusSel: ".range-input input", sx: { width: "360px", ...x }, ...m, children: n.jsxs(S, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [n.jsx(T, { formName: "range", value: i, onChangeInput: (e) => f(e), resolvedAddress: c.getNames().getRanges.bind(c.getNames()), onFocus: (e) => {
|
|
14
|
-
h || e.target?.select(), O(!0);
|
|
15
|
-
} }), n.jsx(k, { control: n.jsx(w, { checked: s, onChange: () => b(!s) }), label: "Table has headers", labelPlacement: "end" })] }) });
|
|
16
|
-
});
|
|
17
|
-
export {
|
|
18
|
-
F as TableNewDialog,
|
|
19
|
-
F as default
|
|
20
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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
|
-
const e = { AND: { s: "Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE", p: { logical: { d: "logical1,logical2,... are 1 to 255 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references" } } }, BYCOL: { s: "Applies a LAMBDA function to each column and returns an array of the results.", p: { array: { d: "is an array to be separated by column" }, fn: { d: "is a LAMBDA that is called to scan the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, BYROW: { s: "Applies a LAMBDA function to each row and returns an array of the results.", p: { array: { d: "is an array to be separated by column" }, fn: { d: "is a LAMBDA that is called to scan the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, FALSE: { s: "Returns the logical value FALSE", p: {} }, IF: { s: "Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE", p: { logicalTest: { d: "is any value or expression that can be evaluated to TRUE or FALSE" }, valueIfTrue: { d: "is the value that is returned if Logical_test is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions" }, valueIfFalse: { d: "is the value that is returned if Logical_test is FALSE. If omitted, FALSE is returned" } } }, IFERROR: { s: "Returns value_if_error if expression is an error and the value of the expression itself otherwise", p: { value: { d: "is any value or expression or reference" }, valueIfError: { d: "is any value or expression or reference" } } }, IFNA: { s: "Returns the value you specify if the expression resolves to #N/A, otherwise returns the result of the expression", p: { value: { d: "is any value or expression or reference" }, valueIfError: { d: "is any value or expression or reference" } } }, IFS: { s: "Checks whether one or more conditions are met and returns a value corresponding to the first TRUE condition", p: { logicalTest: { d: "logical_test1,logical_test2,... is any value or expression that can be evaluated to TRUE or FALSE" }, logicalTrue: { d: "value_if_true1,value_if_true2,... is the value returned if Logical_test is TRUE" }, rest: {} } }, LAMDA: { s: "Creates a function value with can be called within formulas.", p: { parameterOrCalculation: { d: "a parameter or a calculation that returns a value. If a parameter, it must be the last argument." } }, h: "Unimplemented" }, LET: { s: "Assigns calculation results to names. Useful for storing intermediate calculations and values by defining names inside a formula. These names only apply within the scope of the LET function.", p: { name: { d: "name1,name2,... the name, or a calculation which can make use of all names within the LET. Names must start with a letter, cannot be the output of a formula, or conflict with range syntax." }, nameOrValue: { d: "name_value1,name_value2,... the value associated with the name." }, calculationOrName: {}, rest: {} }, h: "Unimplemented" }, MAKEARRAY: { s: "Returns a calculated array of a specified row and column size, by applying a LAMBDA function.", p: { rows: { d: "is the number of rows in the array. Must be greater than zero." }, columns: { d: "is the number of columns in the array. Must be greater than zero." }, fn: { d: "is a LAMBDA that is called to create the array. The LAMBDA takes two parameters, row index and column index." } }, h: "Unimplemented" }, MAP: { s: "Returns an array formed by 'mapping' each value in the array(s) to a new value by applying a lambda to create a new value.", p: { array: { d: "is an array to be mapped" }, lamdaOrArray: { d: "lambda_or_array1,lambda_or_array2,... is a LAMBDA which must be the last argument and must have a parameter for each array passed, or another array to be mapped" } }, h: "Unimplemented" }, NOT: { s: "Changes FALSE to TRUE, or TRUE to FALSE", p: { logical: { d: "is a value or expression that can be evaluated to TRUE or FALSE" } } }, OR: { s: "Checks whether any of the arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all arguments are FALSE", p: { logical: { d: "logical1,logical2,... are 1 to 255 conditions that you want to test that can be either TRUE or FALSE" } } }, REDUCE: { s: "Reduces an array to an accumulated value by applying a LAMBDA function to each value and returning the total value in the accumulator.", p: { initialValue: { d: "is the starting value for the accumulator" }, array: { d: "is an array to be reduced" }, fn: { d: "is a LAMBDA that is called to reduce the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, SCAN: { s: "Scans an array by applying a LAMBDA function to each value and returns an array that has each intermediate value", p: { initialValue: { d: "is the starting value for the accumulator" }, array: { d: "is an array to be reduced" }, fn: { d: "is a LAMBDA that is called to reduce the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, SWITCH: { s: "Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value is returned", p: { expression: {}, value: { d: "is an expression to be evaluated" }, results: { d: "result1,result2,... is a result to be returned if the corresponding value matches expression" } }, h: "Unimplemented" }, TRUE: { s: "Returns the logical value TRUE", p: {} }, XOR: { s: "Returns a logical 'Exclusive Or' of all arguments", p: { logical: { d: "logical1,logical2,... are 1 to 254 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references" } } } };
|
|
8
|
-
export {
|
|
9
|
-
e as default
|
|
10
|
-
};
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
import { r as c, y as T } from "./BJkeQi-0GTlyPsTT.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
|
|
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
|
-
function me(e, t, r) {
|
|
9
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
10
|
-
}
|
|
11
|
-
function ne(e, t) {
|
|
12
|
-
var r = Object.keys(e);
|
|
13
|
-
if (Object.getOwnPropertySymbols) {
|
|
14
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
15
|
-
t && (n = n.filter(function(o) {
|
|
16
|
-
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
17
|
-
})), r.push.apply(r, n);
|
|
18
|
-
}
|
|
19
|
-
return r;
|
|
20
|
-
}
|
|
21
|
-
function oe(e) {
|
|
22
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
23
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
24
|
-
t % 2 ? ne(Object(r), !0).forEach(function(n) {
|
|
25
|
-
me(e, n, r[n]);
|
|
26
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ne(Object(r)).forEach(function(n) {
|
|
27
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return e;
|
|
31
|
-
}
|
|
32
|
-
function ie(e, t) {
|
|
33
|
-
(t == null || t > e.length) && (t = e.length);
|
|
34
|
-
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
35
|
-
return n;
|
|
36
|
-
}
|
|
37
|
-
function ye(e, t, r) {
|
|
38
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
39
|
-
}
|
|
40
|
-
function ue(e, t) {
|
|
41
|
-
var r = Object.keys(e);
|
|
42
|
-
if (Object.getOwnPropertySymbols) {
|
|
43
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
44
|
-
t && (n = n.filter(function(o) {
|
|
45
|
-
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
46
|
-
})), r.push.apply(r, n);
|
|
47
|
-
}
|
|
48
|
-
return r;
|
|
49
|
-
}
|
|
50
|
-
function ce(e) {
|
|
51
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
52
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
53
|
-
t % 2 ? ue(Object(r), !0).forEach(function(n) {
|
|
54
|
-
ye(e, n, r[n]);
|
|
55
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ue(Object(r)).forEach(function(n) {
|
|
56
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return e;
|
|
60
|
-
}
|
|
61
|
-
function V(e) {
|
|
62
|
-
return function t() {
|
|
63
|
-
for (var r = this, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
|
|
64
|
-
return o.length >= e.length ? e.apply(this, o) : function() {
|
|
65
|
-
for (var a = arguments.length, u = new Array(a), s = 0; s < a; s++) u[s] = arguments[s];
|
|
66
|
-
return t.apply(r, [].concat(o, u));
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function U(e) {
|
|
71
|
-
return {}.toString.call(e).includes("Object");
|
|
72
|
-
}
|
|
73
|
-
function L(e) {
|
|
74
|
-
return typeof e == "function";
|
|
75
|
-
}
|
|
76
|
-
var R = V(function(e, t) {
|
|
77
|
-
throw new Error(e[t] || e.default);
|
|
78
|
-
})({ initialIsRequired: "initial state is required", initialType: "initial state should be an object", initialContent: "initial state shouldn't be an empty object", handlerType: "handler should be an object or a function", handlersType: "all handlers should be a functions", selectorType: "selector should be a function", changeType: "provided value of changes should be an object", changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state', default: "an unknown error accured in `state-local` package" }), ve = function(e, t) {
|
|
79
|
-
return U(t) || R("changeType"), Object.keys(t).some(function(r) {
|
|
80
|
-
return n = e, o = r, !Object.prototype.hasOwnProperty.call(n, o);
|
|
81
|
-
var n, o;
|
|
82
|
-
}) && R("changeField"), t;
|
|
83
|
-
};
|
|
84
|
-
function be(e, t) {
|
|
85
|
-
return L(t) ? t(e.current) : t;
|
|
86
|
-
}
|
|
87
|
-
function we(e, t) {
|
|
88
|
-
return e.current = ce(ce({}, e.current), t), t;
|
|
89
|
-
}
|
|
90
|
-
function Oe(e, t, r) {
|
|
91
|
-
return L(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
|
|
92
|
-
var o;
|
|
93
|
-
return (o = t[n]) === null || o === void 0 ? void 0 : o.call(t, e.current[n]);
|
|
94
|
-
}), r;
|
|
95
|
-
}
|
|
96
|
-
var Q, se = { configIsRequired: "the configuration object is required", configType: "the configuration object should be an object", default: "an unknown error accured in `@monaco-editor/loader` package", deprecation: `Deprecation warning!
|
|
97
|
-
You are using deprecated way of configuration.
|
|
98
|
-
|
|
99
|
-
Instead of using
|
|
100
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
101
|
-
use
|
|
102
|
-
monaco.config({ paths: { vs: '...' } })
|
|
103
|
-
|
|
104
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
105
|
-
` }, ae = (Q = function(e, t) {
|
|
106
|
-
throw new Error(e[t] || e.default);
|
|
107
|
-
}, function e() {
|
|
108
|
-
for (var t = this, r = arguments.length, n = new Array(r), o = 0; o < r; o++) n[o] = arguments[o];
|
|
109
|
-
return n.length >= Q.length ? Q.apply(this, n) : function() {
|
|
110
|
-
for (var i = arguments.length, a = new Array(i), u = 0; u < i; u++) a[u] = arguments[u];
|
|
111
|
-
return e.apply(t, [].concat(n, a));
|
|
112
|
-
};
|
|
113
|
-
})(se);
|
|
114
|
-
function fe(e, t) {
|
|
115
|
-
return Object.keys(t).forEach(function(r) {
|
|
116
|
-
t[r] instanceof Object && e[r] && Object.assign(t[r], fe(e[r], t[r]));
|
|
117
|
-
}), oe(oe({}, e), t);
|
|
118
|
-
}
|
|
119
|
-
var je = { type: "cancelation", msg: "operation is manually canceled" };
|
|
120
|
-
function W(e) {
|
|
121
|
-
var t = !1, r = new Promise(function(n, o) {
|
|
122
|
-
e.then(function(i) {
|
|
123
|
-
return t ? o(je) : n(i);
|
|
124
|
-
}), e.catch(o);
|
|
125
|
-
});
|
|
126
|
-
return r.cancel = function() {
|
|
127
|
-
return t = !0;
|
|
128
|
-
}, r;
|
|
129
|
-
}
|
|
130
|
-
var X, de = function(e) {
|
|
131
|
-
if (Array.isArray(e)) return e;
|
|
132
|
-
}(X = function(e) {
|
|
133
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
134
|
-
(function(u) {
|
|
135
|
-
var s;
|
|
136
|
-
u || R("initialIsRequired"), U(u) || R("initialType"), s = u, Object.keys(s).length || R("initialContent");
|
|
137
|
-
})(e), function(u) {
|
|
138
|
-
L(u) || U(u) || R("handlerType"), U(u) && Object.values(u).some(function(s) {
|
|
139
|
-
return !L(s);
|
|
140
|
-
}) && R("handlersType");
|
|
141
|
-
}(t);
|
|
142
|
-
var r = { current: e }, n = V(Oe)(r, t), o = V(we)(r), i = V(ve)(e), a = V(be)(r);
|
|
143
|
-
return [function() {
|
|
144
|
-
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(s) {
|
|
145
|
-
return s;
|
|
146
|
-
};
|
|
147
|
-
return function(s) {
|
|
148
|
-
L(s) || R("selectorType");
|
|
149
|
-
}(u), u(r.current);
|
|
150
|
-
}, function(u) {
|
|
151
|
-
(function() {
|
|
152
|
-
for (var s = arguments.length, p = new Array(s), O = 0; O < s; O++) p[O] = arguments[O];
|
|
153
|
-
return function(b) {
|
|
154
|
-
return p.reduceRight(function(E, P) {
|
|
155
|
-
return P(E);
|
|
156
|
-
}, b);
|
|
157
|
-
};
|
|
158
|
-
})(n, o, i, a)(u);
|
|
159
|
-
}];
|
|
160
|
-
}({ config: { paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs" } }, isInitialized: !1, resolve: null, reject: null, monaco: null })) || function(e) {
|
|
161
|
-
if (typeof Symbol < "u" && Symbol.iterator in Object(e)) {
|
|
162
|
-
var t = [], r = !0, n = !1, o = void 0;
|
|
163
|
-
try {
|
|
164
|
-
for (var i, a = e[Symbol.iterator](); !(r = (i = a.next()).done) && (t.push(i.value), t.length !== 2); r = !0) ;
|
|
165
|
-
} catch (u) {
|
|
166
|
-
n = !0, o = u;
|
|
167
|
-
} finally {
|
|
168
|
-
try {
|
|
169
|
-
r || a.return == null || a.return();
|
|
170
|
-
} finally {
|
|
171
|
-
if (n) throw o;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return t;
|
|
175
|
-
}
|
|
176
|
-
}(X) || function(e) {
|
|
177
|
-
if (e) {
|
|
178
|
-
if (typeof e == "string") return ie(e, 2);
|
|
179
|
-
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
180
|
-
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ie(e, 2) : void 0;
|
|
181
|
-
}
|
|
182
|
-
}(X) || function() {
|
|
183
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
184
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
185
|
-
}(), z = de[0], B = de[1];
|
|
186
|
-
function Me(e) {
|
|
187
|
-
return document.body.appendChild(e);
|
|
188
|
-
}
|
|
189
|
-
function Ee(e) {
|
|
190
|
-
var t, r, n = z(function(i) {
|
|
191
|
-
return { config: i.config, reject: i.reject };
|
|
192
|
-
}), o = (t = "".concat(n.config.paths.vs, "/loader.js"), r = document.createElement("script"), t && (r.src = t), r);
|
|
193
|
-
return o.onload = function() {
|
|
194
|
-
return e();
|
|
195
|
-
}, o.onerror = n.reject, o;
|
|
196
|
-
}
|
|
197
|
-
function Pe() {
|
|
198
|
-
var e = z(function(r) {
|
|
199
|
-
return { config: r.config, resolve: r.resolve, reject: r.reject };
|
|
200
|
-
}), t = window.require;
|
|
201
|
-
t.config(e.config), t(["vs/editor/editor.main"], function(r) {
|
|
202
|
-
ge(r), e.resolve(r);
|
|
203
|
-
}, function(r) {
|
|
204
|
-
e.reject(r);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
function ge(e) {
|
|
208
|
-
z().monaco || B({ monaco: e });
|
|
209
|
-
}
|
|
210
|
-
var Z = new Promise(function(e, t) {
|
|
211
|
-
return B({ resolve: e, reject: t });
|
|
212
|
-
}), Y = { config: function(e) {
|
|
213
|
-
var t = function(o) {
|
|
214
|
-
var i;
|
|
215
|
-
return o || ae("configIsRequired"), i = o, {}.toString.call(i).includes("Object") || ae("configType"), o.urls ? (console.warn(se.deprecation), { paths: { vs: o.urls.monacoBase } }) : o;
|
|
216
|
-
}(e), r = t.monaco, n = function(o, i) {
|
|
217
|
-
if (o == null) return {};
|
|
218
|
-
var a, u, s = function(O, b) {
|
|
219
|
-
if (O == null) return {};
|
|
220
|
-
var E, P, S = {}, k = Object.keys(O);
|
|
221
|
-
for (P = 0; P < k.length; P++) E = k[P], b.indexOf(E) >= 0 || (S[E] = O[E]);
|
|
222
|
-
return S;
|
|
223
|
-
}(o, i);
|
|
224
|
-
if (Object.getOwnPropertySymbols) {
|
|
225
|
-
var p = Object.getOwnPropertySymbols(o);
|
|
226
|
-
for (u = 0; u < p.length; u++) a = p[u], i.indexOf(a) >= 0 || Object.prototype.propertyIsEnumerable.call(o, a) && (s[a] = o[a]);
|
|
227
|
-
}
|
|
228
|
-
return s;
|
|
229
|
-
}(t, ["monaco"]);
|
|
230
|
-
B(function(o) {
|
|
231
|
-
return { config: fe(o.config, n), monaco: r };
|
|
232
|
-
});
|
|
233
|
-
}, init: function() {
|
|
234
|
-
var e = z(function(t) {
|
|
235
|
-
return { monaco: t.monaco, isInitialized: t.isInitialized, resolve: t.resolve };
|
|
236
|
-
});
|
|
237
|
-
if (!e.isInitialized) {
|
|
238
|
-
if (B({ isInitialized: !0 }), e.monaco) return e.resolve(e.monaco), W(Z);
|
|
239
|
-
if (window.monaco && window.monaco.editor) return ge(window.monaco), e.resolve(window.monaco), W(Z);
|
|
240
|
-
(function() {
|
|
241
|
-
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
|
|
242
|
-
return function(o) {
|
|
243
|
-
return r.reduceRight(function(i, a) {
|
|
244
|
-
return a(i);
|
|
245
|
-
}, o);
|
|
246
|
-
};
|
|
247
|
-
})(Me, Ee)(Pe);
|
|
248
|
-
}
|
|
249
|
-
return W(Z);
|
|
250
|
-
}, __getMonacoInstance: function() {
|
|
251
|
-
return z(function(e) {
|
|
252
|
-
return e.monaco;
|
|
253
|
-
});
|
|
254
|
-
} }, Re = { display: "flex", position: "relative", textAlign: "initial" }, Se = { width: "100%" }, ke = { display: "none" }, xe = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Ie = function({ children: e }) {
|
|
255
|
-
return T.createElement("div", { style: xe.container }, e);
|
|
256
|
-
}, pe = c.memo(function({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: i, wrapperProps: a }) {
|
|
257
|
-
return T.createElement("section", { style: { ...Re, width: e, height: t }, ...a }, !r && T.createElement(Ie, null, n), T.createElement("div", { ref: o, style: { ...Se, ...!r && ke }, className: i }));
|
|
258
|
-
}), ee = function(e) {
|
|
259
|
-
c.useEffect(e, []);
|
|
260
|
-
}, j = function(e, t, r = !0) {
|
|
261
|
-
let n = c.useRef(!0);
|
|
262
|
-
c.useEffect(n.current || !r ? () => {
|
|
263
|
-
n.current = !1;
|
|
264
|
-
} : e, t);
|
|
265
|
-
};
|
|
266
|
-
function q() {
|
|
267
|
-
}
|
|
268
|
-
function I(e, t, r, n) {
|
|
269
|
-
return p = n, (s = e).editor.getModel(le(s, p)) || (i = t, a = r, u = n, (o = e).editor.createModel(i, a, u ? le(o, u) : void 0));
|
|
270
|
-
var o, i, a, u, s, p;
|
|
271
|
-
}
|
|
272
|
-
function le(e, t) {
|
|
273
|
-
return e.Uri.parse(t);
|
|
274
|
-
}
|
|
275
|
-
var Ae = c.memo(function({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: a, keepCurrentOriginalModel: u = !1, keepCurrentModifiedModel: s = !1, theme: p = "light", loading: O = "Loading...", options: b = {}, height: E = "100%", width: P = "100%", className: S, wrapperProps: k = {}, beforeMount: $ = q, onMount: G = q }) {
|
|
276
|
-
let [w, C] = c.useState(!1), [A, m] = c.useState(!0), y = c.useRef(null), d = c.useRef(null), D = c.useRef(null), v = c.useRef(G), l = c.useRef($), x = c.useRef(!1);
|
|
277
|
-
ee(() => {
|
|
278
|
-
let f = Y.init();
|
|
279
|
-
return f.then((g) => (d.current = g) && m(!1)).catch((g) => g?.type !== "cancelation" && console.error("Monaco initialization: error:", g)), () => y.current ? function() {
|
|
280
|
-
let g = y.current?.getModel();
|
|
281
|
-
u || g?.original?.dispose(), s || g?.modified?.dispose(), y.current?.dispose();
|
|
282
|
-
}() : f.cancel();
|
|
283
|
-
}), j(() => {
|
|
284
|
-
if (y.current && d.current) {
|
|
285
|
-
let f = y.current.getOriginalEditor(), g = I(d.current, e || "", n || r || "text", i || "");
|
|
286
|
-
g !== f.getModel() && f.setModel(g);
|
|
287
|
-
}
|
|
288
|
-
}, [i], w), j(() => {
|
|
289
|
-
if (y.current && d.current) {
|
|
290
|
-
let f = y.current.getModifiedEditor(), g = I(d.current, t || "", o || r || "text", a || "");
|
|
291
|
-
g !== f.getModel() && f.setModel(g);
|
|
292
|
-
}
|
|
293
|
-
}, [a], w), j(() => {
|
|
294
|
-
let f = y.current.getModifiedEditor();
|
|
295
|
-
f.getOption(d.current.editor.EditorOption.readOnly) ? f.setValue(t || "") : t !== f.getValue() && (f.executeEdits("", [{ range: f.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), f.pushUndoStop());
|
|
296
|
-
}, [t], w), j(() => {
|
|
297
|
-
y.current?.getModel()?.original.setValue(e || "");
|
|
298
|
-
}, [e], w), j(() => {
|
|
299
|
-
let { original: f, modified: g } = y.current.getModel();
|
|
300
|
-
d.current.editor.setModelLanguage(f, n || r || "text"), d.current.editor.setModelLanguage(g, o || r || "text");
|
|
301
|
-
}, [r, n, o], w), j(() => {
|
|
302
|
-
d.current?.editor.setTheme(p);
|
|
303
|
-
}, [p], w), j(() => {
|
|
304
|
-
y.current?.updateOptions(b);
|
|
305
|
-
}, [b], w);
|
|
306
|
-
let _ = c.useCallback(() => {
|
|
307
|
-
if (!d.current) return;
|
|
308
|
-
l.current(d.current);
|
|
309
|
-
let f = I(d.current, e || "", n || r || "text", i || ""), g = I(d.current, t || "", o || r || "text", a || "");
|
|
310
|
-
y.current?.setModel({ original: f, modified: g });
|
|
311
|
-
}, [r, t, o, e, n, i, a]), N = c.useCallback(() => {
|
|
312
|
-
!x.current && D.current && (y.current = d.current.editor.createDiffEditor(D.current, { automaticLayout: !0, ...b }), _(), d.current?.editor.setTheme(p), C(!0), x.current = !0);
|
|
313
|
-
}, [b, p, _]);
|
|
314
|
-
return c.useEffect(() => {
|
|
315
|
-
w && v.current(y.current, d.current);
|
|
316
|
-
}, [w]), c.useEffect(() => {
|
|
317
|
-
!A && !w && N();
|
|
318
|
-
}, [A, w, N]), T.createElement(pe, { width: P, height: E, isEditorReady: w, loading: O, _ref: D, className: S, wrapperProps: k });
|
|
319
|
-
}), De = function() {
|
|
320
|
-
let [e, t] = c.useState(Y.__getMonacoInstance());
|
|
321
|
-
return ee(() => {
|
|
322
|
-
let r;
|
|
323
|
-
return e || (r = Y.init(), r.then((n) => {
|
|
324
|
-
t(n);
|
|
325
|
-
})), () => r?.cancel();
|
|
326
|
-
}), e;
|
|
327
|
-
}, F = /* @__PURE__ */ new Map(), Te = c.memo(function({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: i, theme: a = "light", line: u, loading: s = "Loading...", options: p = {}, overrideServices: O = {}, saveViewState: b = !0, keepCurrentModel: E = !1, width: P = "100%", height: S = "100%", className: k, wrapperProps: $ = {}, beforeMount: G = q, onMount: w = q, onChange: C, onValidate: A = q }) {
|
|
328
|
-
let [m, y] = c.useState(!1), [d, D] = c.useState(!0), v = c.useRef(null), l = c.useRef(null), x = c.useRef(null), _ = c.useRef(w), N = c.useRef(G), f = c.useRef(), g = c.useRef(n), he = function(h) {
|
|
329
|
-
let M = c.useRef();
|
|
330
|
-
return c.useEffect(() => {
|
|
331
|
-
M.current = h;
|
|
332
|
-
}, [h]), M.current;
|
|
333
|
-
}(i), te = c.useRef(!1), H = c.useRef(!1);
|
|
334
|
-
ee(() => {
|
|
335
|
-
let h = Y.init();
|
|
336
|
-
return h.then((M) => (v.current = M) && D(!1)).catch((M) => M?.type !== "cancelation" && console.error("Monaco initialization: error:", M)), () => l.current ? (f.current?.dispose(), E ? b && F.set(i, l.current.saveViewState()) : l.current.getModel()?.dispose(), void l.current.dispose()) : h.cancel();
|
|
337
|
-
}), j(() => {
|
|
338
|
-
let h = I(v.current, e || n || "", t || o || "", i || r || "");
|
|
339
|
-
h !== l.current?.getModel() && (b && F.set(he, l.current?.saveViewState()), l.current?.setModel(h), b && l.current?.restoreViewState(F.get(i)));
|
|
340
|
-
}, [i], m), j(() => {
|
|
341
|
-
l.current?.updateOptions(p);
|
|
342
|
-
}, [p], m), j(() => {
|
|
343
|
-
!l.current || n === void 0 || (l.current.getOption(v.current.editor.EditorOption.readOnly) ? l.current.setValue(n) : n !== l.current.getValue() && (H.current = !0, l.current.executeEdits("", [{ range: l.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), l.current.pushUndoStop(), H.current = !1));
|
|
344
|
-
}, [n], m), j(() => {
|
|
345
|
-
let h = l.current?.getModel();
|
|
346
|
-
h && o && v.current?.editor.setModelLanguage(h, o);
|
|
347
|
-
}, [o], m), j(() => {
|
|
348
|
-
u !== void 0 && l.current?.revealLine(u);
|
|
349
|
-
}, [u], m), j(() => {
|
|
350
|
-
v.current?.editor.setTheme(a);
|
|
351
|
-
}, [a], m);
|
|
352
|
-
let re = c.useCallback(() => {
|
|
353
|
-
if (x.current && v.current && !te.current) {
|
|
354
|
-
N.current(v.current);
|
|
355
|
-
let h = i || r, M = I(v.current, n || e || "", t || o || "", h || "");
|
|
356
|
-
l.current = v.current?.editor.create(x.current, { model: M, automaticLayout: !0, ...p }, O), b && l.current.restoreViewState(F.get(h)), v.current.editor.setTheme(a), u !== void 0 && l.current.revealLine(u), y(!0), te.current = !0;
|
|
357
|
-
}
|
|
358
|
-
}, [e, t, r, n, o, i, p, O, b, a, u]);
|
|
359
|
-
return c.useEffect(() => {
|
|
360
|
-
m && _.current(l.current, v.current);
|
|
361
|
-
}, [m]), c.useEffect(() => {
|
|
362
|
-
!d && !m && re();
|
|
363
|
-
}, [d, m, re]), g.current = n, c.useEffect(() => {
|
|
364
|
-
m && C && (f.current?.dispose(), f.current = l.current?.onDidChangeModelContent((h) => {
|
|
365
|
-
H.current || C(l.current.getValue(), h);
|
|
366
|
-
}));
|
|
367
|
-
}, [m, C]), c.useEffect(() => {
|
|
368
|
-
if (m) {
|
|
369
|
-
let h = v.current.editor.onDidChangeMarkers((M) => {
|
|
370
|
-
let J = l.current.getModel()?.uri;
|
|
371
|
-
if (J && M.find((K) => K.path === J.path)) {
|
|
372
|
-
let K = v.current.editor.getModelMarkers({ resource: J });
|
|
373
|
-
A?.(K);
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
return () => {
|
|
377
|
-
h?.dispose();
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
return () => {
|
|
381
|
-
};
|
|
382
|
-
}, [m, A]), T.createElement(pe, { width: P, height: S, isEditorReady: m, loading: s, _ref: x, className: k, wrapperProps: $ });
|
|
383
|
-
}), Ve = Te;
|
|
384
|
-
export {
|
|
385
|
-
Ae as DiffEditor,
|
|
386
|
-
Te as Editor,
|
|
387
|
-
Ve as default,
|
|
388
|
-
Y as loader,
|
|
389
|
-
De as useMonaco
|
|
390
|
-
};
|