@sheetxl/studio-vanilla 0.3.4 → 0.3.6
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/3JKPVnbyR3hJBHBj.cjs +6 -0
- package/browser/cjs/B1_gRcAH1cv26X_U.cjs +301 -0
- package/browser/cjs/B2fgcYTdhA0facdy.cjs +6 -0
- package/browser/cjs/B5cmz4f50xr5iF-S.cjs +19 -0
- package/browser/cjs/B7eLEpR9cmunfRfq.cjs +6 -0
- package/browser/cjs/BDUaerzhOJJZeQgS.cjs +6 -0
- package/browser/cjs/BDcLV5_cJTh8yhJI.cjs +7 -0
- package/browser/cjs/{CdVKz1bz20BYztuB.cjs → BOSNEoFPpJAjkRsv.cjs} +1 -1
- package/browser/cjs/{BDmE5OFneHwyeeiD.cjs → BSfmlz8MvlIKFx_N.cjs} +4 -4
- package/browser/cjs/Bdhft6pu1-bwMbfv.cjs +12 -0
- package/browser/cjs/BmbGW13BR2649OAV.cjs +6 -0
- package/browser/cjs/{DzE824T4cXRcKowY.cjs → Bu6q4vuUt_6LDbk_.cjs} +1 -1
- package/browser/cjs/{DD0VHDU8F1FiLKcs.cjs → CXe_6K7OT1AVSgAV.cjs} +1 -1
- package/browser/cjs/ChqJwXboF-6-bjIC.cjs +6 -0
- package/browser/cjs/CyA00uY0ivUSWJ17.cjs +6 -0
- package/browser/cjs/D1jsD18kKrFBRLo8.cjs +12 -0
- package/browser/cjs/{D-I49Eh-SQg7zJYX.cjs → DC0sGYXEVcjL3fEu.cjs} +1 -1
- package/browser/cjs/{BTgA_stiR3dZAHop.cjs → DQJ0sG5gEZSPPLGp.cjs} +2 -2
- package/browser/cjs/{WPXWuf9j-uwazW31.cjs → DUIyD1-nWzOytYDo.cjs} +2 -2
- package/browser/cjs/{yZrSgyFKPqsiym7z.cjs → D_RushRsBoa4Hd6w.cjs} +2 -2
- package/browser/cjs/{46C8cTP5D1fDfsPs.cjs → D_gx4EJ1Z1jqCpC2.cjs} +1 -1
- package/browser/cjs/Dgv9C5kP5-0zdZ_n.cjs +6 -0
- package/browser/cjs/{BB5pxJh1jhHsvVZ1.cjs → Dp_f-iB1lirYu5mz.cjs} +1 -1
- package/browser/cjs/P2nQEqe-ae2Lk91E.cjs +11 -0
- package/browser/cjs/{CpPM7Ir1EZB_8bER.cjs → SvTvsTn26UgPTXmE.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{CuldnUeQxpcu8oJ7.cjs → oIH2DXvUemx8KBZE.cjs} +1 -1
- package/{cdn/assets/RWhi_dOrWDICNt1t.js → browser/esm/BEdBgMB0JXu6qm1p.mjs} +1 -1
- package/browser/esm/{BNq1DlA_v8-hm8PQ.mjs → BUVsXfFhbzBtVoTV.mjs} +71 -70
- package/browser/esm/{DLJ1zBZE-WPdkpt2.mjs → BWoHBg8cjtJL9xBv.mjs} +132 -131
- package/{cdn/assets/DjHCn_TmfObC_aJ1.js → browser/esm/Bc8I4T3hDcq3Tbe7.mjs} +13 -13
- package/{cdn/assets/dQu9CDkkTpS5h580.js → browser/esm/BpIA1_q9rYZhuE_V.mjs} +8 -8
- package/browser/esm/{BjLCBG20KyjNKCpy.mjs → BwpZ-CB67KJ8A2Pd.mjs} +2 -2
- package/browser/esm/{Dq1oxXMudxqdJaKZ.mjs → CAUWxMHzGpG7-P5A.mjs} +11 -10
- package/{cdn/assets/CGUSbWH383tudMFu.js → browser/esm/CFw_ZTxUHsgd5Pf5.mjs} +10 -10
- package/browser/esm/{CTdGamCv2VtpI05C.mjs → CIG-Y2tRBFYerBVK.mjs} +1 -1
- package/browser/esm/{s8U6UEvd4LQsvEnH.mjs → CRLFplTpJUvecqqq.mjs} +1 -1
- package/browser/esm/{CeWIrhJ_bsxOl7mw.mjs → CanwhkFG9e2Ojys-.mjs} +24 -23
- package/browser/esm/CcGOjkDDVya2Ff-b.mjs +50 -0
- package/browser/esm/{BfNo01-WwZl_5N1M.mjs → Ce53t5Ez6mDQoNNS.mjs} +192 -191
- package/browser/esm/{pxRv4ndPNkOMM_s3.mjs → Cmk4lwRc0QJqs2cT.mjs} +13 -13
- package/{cdn/assets/CG-YuIoWsi12_nu9.js → browser/esm/CnI4MLBb2ZtZInkh.mjs} +10 -10
- package/{cdn/assets/CNhPYXS_v3a2ATBg.js → browser/esm/CrZPGKZDaJ-22LSg.mjs} +791 -788
- package/{cdn/assets/Dl02UNFD2tNwtHQ9.js → browser/esm/D-GTj1DQOn_EIw_N.mjs} +1 -1
- package/{cdn/assets/ct9ztJbQB16MJoyP.js → browser/esm/D0YFJdBci18KKVSS.mjs} +7 -7
- package/{cdn/assets/BY5dcSv5nxuvXMsr.js → browser/esm/D7__-CZBbVdVmNms.mjs} +13 -13
- package/{cdn/assets/C-oc6cc0wXRVBFx2.js → browser/esm/DRX3PxyWmwYCO1oC.mjs} +1 -1
- package/browser/esm/DtS8vZkP_9xxg-8G.mjs +24893 -0
- package/browser/esm/{BXMZNx8rs4_V8pQL.mjs → DuOzS4aDJybvfnas.mjs} +2 -2
- package/browser/esm/{C2Ik_RfF43fmFDeS.mjs → ekyugPyyyBIdZgfX.mjs} +1 -1
- package/browser/esm/{BrWhLiIy81LKNSUX.mjs → evOdu9Z-9G0PNrGI.mjs} +1 -1
- package/browser/esm/{qchlbvmOxrybWJep.mjs → goTiQtfGVEDiRLX3.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{FCkxbRy2XiqD3GdL.mjs → ius8cYWSRDNFx-QU.mjs} +12 -12
- package/{browser/esm/BoL2rsWK1YyT1PP7.mjs → cdn/assets/6GT7WcmdWYVxOobM.js} +8 -8
- package/{browser/esm/RWhi_dOrWDICNt1t.mjs → cdn/assets/BEdBgMB0JXu6qm1p.js} +1 -1
- package/cdn/assets/{6tFlyQMvtppXfmuU.js → BH-qA3U2gj7snkKJ.js} +24 -23
- package/{browser/esm/im3UoVISx3VXhEFp.mjs → cdn/assets/BPeDOIBYCZkjaWRD.js} +13 -13
- package/cdn/assets/{mAWImp_J2v8z8hbZ.js → BVIGf25ixd6wvJVI.js} +132 -131
- package/cdn/assets/{BPStm90FUYfOgibU.js → BcGPdpUCizGdDlXm.js} +12 -12
- package/cdn/assets/Be-_CFU80fx1X1E9.js +50 -0
- package/cdn/assets/{CTdGamCv2VtpI05C.js → CIG-Y2tRBFYerBVK.js} +1 -1
- package/cdn/assets/{s8U6UEvd4LQsvEnH.js → CRLFplTpJUvecqqq.js} +1 -1
- package/cdn/assets/{BKDQtGZxRUUzBmnI.js → ChD-x-lrZKLslGbg.js} +2 -2
- package/cdn/assets/{COFTB6OufFls7NP1.js → CkMou3XlV2mmYqmq.js} +11 -10
- package/cdn/assets/{BMb4pCD8O5vK2p1B.js → Cx6czat4u0MrS9wL.js} +2 -2
- package/{browser/esm/Dl02UNFD2tNwtHQ9.mjs → cdn/assets/D-GTj1DQOn_EIw_N.js} +1 -1
- package/{browser/esm/GbTp1_3jFZu0Ex24.mjs → cdn/assets/D0YFJdBci18KKVSS.js} +7 -7
- package/{browser/esm/C-oc6cc0wXRVBFx2.mjs → cdn/assets/DRX3PxyWmwYCO1oC.js} +1 -1
- package/{browser/esm/CZRLp5H9dSrMEgaI.mjs → cdn/assets/DS9Og6WSj_kNksiq.js} +10 -10
- package/cdn/assets/De8HwbKM7sZJMZSq.js +24740 -0
- package/{browser/esm/CKHDKAaHkwZHUkoS.mjs → cdn/assets/DfoJr75R0GrjAv-i.js} +10 -10
- package/cdn/assets/{DYgFWlitgXmKdN_I.js → Dw1Rz_MNeT4QWFeY.js} +192 -191
- package/{browser/esm/Br4TnuxGRULZDhCA.mjs → cdn/assets/FSFNUan5QfhjNqMt.js} +791 -788
- package/cdn/assets/{Be9YovX6b_0gKXs5.js → Ijbe8IzzEjVScejo.js} +71 -70
- package/{browser/esm/Ddm9jggzrr5VJQ68.mjs → cdn/assets/YQRaiV0_mvhQsFVY.js} +13 -13
- package/cdn/assets/{LxoKYdUqZ4Zgxjza.js → _W5FqhFhYviNTP8H.js} +13 -13
- package/cdn/assets/{C2Ik_RfF43fmFDeS.js → ekyugPyyyBIdZgfX.js} +1 -1
- package/cdn/assets/{BrWhLiIy81LKNSUX.js → evOdu9Z-9G0PNrGI.js} +1 -1
- package/cdn/assets/{qchlbvmOxrybWJep.js → goTiQtfGVEDiRLX3.js} +1 -1
- package/cdn/index.js +8 -8
- package/cdn/loader.js +1 -1
- package/package.json +8 -7
- package/browser/cjs/0dkhOl0ItVZXnHg_.cjs +0 -6
- package/browser/cjs/7Xjct_4bBSU-vad1.cjs +0 -6
- package/browser/cjs/B2kFbeodTh3Gk-aQ.cjs +0 -6
- package/browser/cjs/B5UGK4AzAC9SjXJp.cjs +0 -6
- package/browser/cjs/B9kurj8mOePUlJX2.cjs +0 -6
- package/browser/cjs/BDACVe5nzEmYknRm.cjs +0 -19
- package/browser/cjs/BG8OR9VWCkyIRwrw.cjs +0 -6
- package/browser/cjs/BML8p6hKVpqMb-13.cjs +0 -124
- package/browser/cjs/BeGusiaaShhfh7Ch.cjs +0 -7
- package/browser/cjs/BgJ-surJf8jSxqmk.cjs +0 -6
- package/browser/cjs/BgJFVvwpAWB3ssLE.cjs +0 -6
- package/browser/cjs/Bi8tk3LAhLkM7IXm.cjs +0 -6
- package/browser/cjs/BlYpCVX1NOGpcNB6.cjs +0 -7
- package/browser/cjs/BnZdvx8z2BIDZv9J.cjs +0 -355
- package/browser/cjs/BvnUfF0WlIXumm-E.cjs +0 -6
- package/browser/cjs/BwGs6fp9j-iFwDlB.cjs +0 -32
- package/browser/cjs/C4JyilwtB4aWsWnG.cjs +0 -6
- package/browser/cjs/C8PUqW17bEbzJthE.cjs +0 -6
- package/browser/cjs/CBTWDt8vxgXfkDfh.cjs +0 -6
- package/browser/cjs/CJ29qM66PMBNE3G9.cjs +0 -6
- package/browser/cjs/CKtzkomrFnDVY5SY.cjs +0 -11
- package/browser/cjs/CLarA_vLTlgU3TCF.cjs +0 -13
- package/browser/cjs/CN8Y9NZjRCPl8CqY.cjs +0 -6
- package/browser/cjs/CNIPdrSO6Xr2gkt9.cjs +0 -6
- package/browser/cjs/CNkEdWYoHRiw_Uez.cjs +0 -6
- package/browser/cjs/CPFRW8nnIVWYeQYn.cjs +0 -12
- package/browser/cjs/CZih4fqvAIVbCVO4.cjs +0 -6
- package/browser/cjs/Cx3wCYZR6BKbOtgk.cjs +0 -6
- package/browser/cjs/Cx8xafhEESu639Ig.cjs +0 -6
- package/browser/cjs/CzqzVoUeKxH16SDC.cjs +0 -6
- package/browser/cjs/D-GDPxpVRx45cdpQ.cjs +0 -6
- package/browser/cjs/D50Wzp-4UIlO9uVc.cjs +0 -6
- package/browser/cjs/DB9rOzEP0g0ZGfBj.cjs +0 -6
- package/browser/cjs/DIeyUTfGkxwK6bdT.cjs +0 -15
- package/browser/cjs/DX_oDw_K4CB6Ej9i.cjs +0 -6
- package/browser/cjs/DcNRcLtSOkHAK_Mt.cjs +0 -6
- package/browser/cjs/Df8ZAsCgZ69F33-C.cjs +0 -6
- package/browser/cjs/DfCiN8VOEQt4cw-x.cjs +0 -12
- package/browser/cjs/DnkG5azaxDtt-73G.cjs +0 -6
- package/browser/cjs/Dr_HVAdkD1bM9yrW.cjs +0 -6
- package/browser/cjs/KbKjJCMErVEwKqoi.cjs +0 -6
- package/browser/cjs/Px_DbuQFWhjhPilq.cjs +0 -6
- package/browser/cjs/VmYEO_-N9Cn7JpZN.cjs +0 -6
- package/browser/cjs/c4HmqMqg3ugRd4gl.cjs +0 -1501
- package/browser/cjs/jmPMUQMT7KTdf9Sr.cjs +0 -6
- package/browser/cjs/zRbLzzCcfjQpsQ4j.cjs +0 -6
- package/browser/esm/0M23_yfYSvrAB5iY.mjs +0 -472
- package/browser/esm/2sPP8EL_OzSYDsKu.mjs +0 -10
- package/browser/esm/3SiPV9yNzSbQVINg.mjs +0 -10
- package/browser/esm/6CkscKSECxQpy0v6.mjs +0 -10
- package/browser/esm/94SRg1Gxbdr9B75m.mjs +0 -10
- package/browser/esm/B2I1Hudz2EIGw59h.mjs +0 -10
- package/browser/esm/B2fqssq7kMsGIg5g.mjs +0 -10
- package/browser/esm/BBBP9totA24zTbqh.mjs +0 -10
- package/browser/esm/BEYxIKe5B75ADXWP.mjs +0 -5582
- package/browser/esm/BIHHiMjUvXmWQ6w_.mjs +0 -10
- package/browser/esm/BYRVuU6FUEX6XBFW.mjs +0 -10
- package/browser/esm/Bq_HFm6_6_ycs_gE.mjs +0 -48519
- package/browser/esm/Bs6fth_bBoNrYDwE.mjs +0 -21
- package/browser/esm/C-QHwmJCeB3o-mzv.mjs +0 -3934
- package/browser/esm/C0U_bX9Hj97edVC9.mjs +0 -10
- package/browser/esm/CC8aO_pPT-tkJK_H.mjs +0 -10
- package/browser/esm/CGxu5NKxrEXE8QIe.mjs +0 -24
- package/browser/esm/CbTDhJiJfpR6Btxp.mjs +0 -10
- package/browser/esm/CsUNORBKkJ7f3diG.mjs +0 -10
- package/browser/esm/CyYXh2ng_dKgHzbE.mjs +0 -29
- package/browser/esm/DRFsMc27LyLwGu56.mjs +0 -820
- package/browser/esm/DT09m4FGTu5N2LZJ.mjs +0 -10
- package/browser/esm/DUgyehn3re1zGQT5.mjs +0 -10
- package/browser/esm/DWOT4LkGXRN4FrJI.mjs +0 -10
- package/browser/esm/Dx1J8HBJdbrROP0v.mjs +0 -10
- package/browser/esm/Dz8v5MSOgkaH_zTd.mjs +0 -49
- package/browser/esm/F7oUe3nLrtaRYTas.mjs +0 -10
- package/browser/esm/L5HOBW-m9BjZTUuw.mjs +0 -10
- package/browser/esm/XL9-bWRsLjEvW1Y0.mjs +0 -10
- package/browser/esm/ZXuNMFT0sYh8ui7O.mjs +0 -1575
- package/browser/esm/gX1gbnkwbpalR57F.mjs +0 -12
- package/browser/esm/kagl0zcUDaK1IX_X.mjs +0 -10
- package/browser/esm/t7CffsKJY64LMXgS.mjs +0 -10
- package/browser/esm/x9wy-F3t5pNOvOIp.mjs +0 -425
- package/cdn/assets/2sPP8EL_OzSYDsKu.js +0 -10
- package/cdn/assets/3SiPV9yNzSbQVINg.js +0 -10
- package/cdn/assets/6CkscKSECxQpy0v6.js +0 -10
- package/cdn/assets/94SRg1Gxbdr9B75m.js +0 -10
- package/cdn/assets/B2I1Hudz2EIGw59h.js +0 -10
- package/cdn/assets/B2fqssq7kMsGIg5g.js +0 -10
- package/cdn/assets/BBBP9totA24zTbqh.js +0 -10
- package/cdn/assets/BD1S4plUUe1NPAqV.js +0 -425
- package/cdn/assets/BIHHiMjUvXmWQ6w_.js +0 -10
- package/cdn/assets/BYRVuU6FUEX6XBFW.js +0 -10
- package/cdn/assets/Bs6fth_bBoNrYDwE.js +0 -21
- package/cdn/assets/BzlAT8jiYfNV3kGy.js +0 -820
- package/cdn/assets/C0U_bX9Hj97edVC9.js +0 -10
- package/cdn/assets/CC8aO_pPT-tkJK_H.js +0 -10
- package/cdn/assets/CGxu5NKxrEXE8QIe.js +0 -24
- package/cdn/assets/CJOmvmuvywU33q7C.js +0 -3934
- package/cdn/assets/CbTDhJiJfpR6Btxp.js +0 -10
- package/cdn/assets/CsUNORBKkJ7f3diG.js +0 -10
- package/cdn/assets/DBq5E3hmvVO5ss1V.js +0 -5582
- package/cdn/assets/DT09m4FGTu5N2LZJ.js +0 -10
- package/cdn/assets/DUgyehn3re1zGQT5.js +0 -10
- package/cdn/assets/DWOT4LkGXRN4FrJI.js +0 -10
- package/cdn/assets/Det1P4Jrl9aZHFGe.js +0 -472
- package/cdn/assets/Dt3qIbvMvgQhNgeR.js +0 -1575
- package/cdn/assets/Dx1J8HBJdbrROP0v.js +0 -10
- package/cdn/assets/F7oUe3nLrtaRYTas.js +0 -10
- package/cdn/assets/L5HOBW-m9BjZTUuw.js +0 -10
- package/cdn/assets/U_ihCP2tbaRnqD2g.js +0 -48366
- package/cdn/assets/XL9-bWRsLjEvW1Y0.js +0 -10
- package/cdn/assets/Z4Ov3rzhXnezd-gU.js +0 -29
- package/cdn/assets/dR_uwa9znq6_hDmB.js +0 -49
- package/cdn/assets/gX1gbnkwbpalR57F.js +0 -12
- package/cdn/assets/kagl0zcUDaK1IX_X.js +0 -10
- package/cdn/assets/t7CffsKJY64LMXgS.js +0 -10
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { jsx as o, jsxs as A } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as b, useState as g, useCallback as O } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { w as f, b as S, B as U, F as P, a as D, c as l, ay as p } from "./DtS8vZkP_9xxg-8G.mjs";
|
|
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.6
|
|
6
6
|
*
|
|
7
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
9
|
*/
|
|
10
10
|
const V = ["Ok", "Cancel"], J = E((F) => {
|
|
11
|
-
const { initialHyperlink:
|
|
12
|
-
let e = null,
|
|
13
|
-
|
|
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
14
|
const C = e ?? s?.()?.getHyperlink();
|
|
15
|
-
return { address:
|
|
16
|
-
}, [
|
|
17
|
-
const e = s?.().toTextUnformatted() ??
|
|
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
18
|
return e === y.address ? "" : e;
|
|
19
19
|
}), [$, k] = g(!1), L = O((e) => {
|
|
20
20
|
B(e.target.value);
|
|
21
|
-
}, []), T = O(async (e,
|
|
21
|
+
}, []), T = O(async (e, t) => null, []), W = f(async (e) => {
|
|
22
22
|
e !== i && m?.(a === "" ? null : { address: a }, u), x?.(e, e === i, e === c), d?.();
|
|
23
23
|
}, [a, u, m, d, x, c, i]), j = f((e) => {
|
|
24
24
|
M(e.target.value), T(e.target.value, null);
|
|
25
25
|
}, [r]), z = f(async (e) => {
|
|
26
|
-
let
|
|
26
|
+
let t = await Promise.resolve(r?.(e));
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
t !== !1 && (t = await T(a, e));
|
|
29
29
|
} catch {
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return t ?? !0;
|
|
32
32
|
}, [r]);
|
|
33
|
-
return o(S, { title: (
|
|
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
34
|
$ || e.target?.select(), k(!0);
|
|
35
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
36
|
e.stopPropagation();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as M, useState as x, useCallback as j } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { w as r, b as S, B as V, F as $, a as z, c as h, ay as C } from "./DtS8vZkP_9xxg-8G.mjs";
|
|
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.6
|
|
6
6
|
*
|
|
7
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
9
|
*/
|
|
10
10
|
const G = ["Ok", "Cancel"], U = E((O) => {
|
|
11
|
-
const { initialComments:
|
|
12
|
-
const n =
|
|
11
|
+
const { initialComments: w = null, onUpdateComments: m, context: y, onOption: u, onValidateOption: l, onDone: p, options: d = G, defaultOption: c = d?.[0], cancelOption: s = "Cancel", sx: F, ...b } = O, g = M(() => {
|
|
12
|
+
const n = w ?? y?.()?.getComments();
|
|
13
13
|
let t = "";
|
|
14
14
|
if (n && n.content && n.content.runs) {
|
|
15
15
|
const a = n.content.runs;
|
|
@@ -19,7 +19,7 @@ const G = ["Ok", "Cancel"], U = E((O) => {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
|
-
}, []), [e,
|
|
22
|
+
}, []), [e, k] = x(g), [P, T] = x(!1), f = j(async (n, t) => null, []), v = r(async (n) => {
|
|
23
23
|
const t = e === "" ? [] : e.split(`
|
|
24
24
|
`);
|
|
25
25
|
if (n !== s) {
|
|
@@ -29,7 +29,7 @@ const G = ["Ok", "Cancel"], U = E((O) => {
|
|
|
29
29
|
}
|
|
30
30
|
u?.(n, n === s, n === c), p?.();
|
|
31
31
|
}, [e, m, p, u, c, s]), D = r((n) => {
|
|
32
|
-
|
|
32
|
+
k(n.target.value), f(n.target.value, null);
|
|
33
33
|
}, [l]), I = r(async (n) => {
|
|
34
34
|
let t = await Promise.resolve(l?.(n));
|
|
35
35
|
try {
|
|
@@ -38,8 +38,8 @@ const G = ["Ok", "Cancel"], U = E((O) => {
|
|
|
38
38
|
}
|
|
39
39
|
return t ?? !0;
|
|
40
40
|
}, [l, e]);
|
|
41
|
-
return i(S, { title: (g ? "Edit" : "Insert") + " Comments", options: d, onDone: p, onOption: (n) => v(n), onValidateOption: I, defaultOption: c, cancelOption: s, autoFocusSel: ".autoFocus", sx: { width: "480px", ...
|
|
42
|
-
|
|
41
|
+
return i(S, { title: (g ? "Edit" : "Insert") + " Comments", options: d, onDone: p, onOption: (n) => v(n), onValidateOption: I, defaultOption: c, cancelOption: s, autoFocusSel: ".autoFocus", sx: { width: "480px", ...F }, ...b, children: i(V, { sx: { paddingTop: (n) => n.spacing(1), paddingBottom: (n) => n.spacing(0), rowGap: (n) => n.spacing(1), display: "flex", flexDirection: "column" }, children: i($, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(z, { label: "Comments", placeholder: "Enter a comment.", onFocus: (n) => {
|
|
42
|
+
P || n.target?.select(), T(!0);
|
|
43
43
|
}, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${h("#fff", C(5))}, ${h("#fff", C(5))})` } } }, value: e, onChange: D, onContextMenu: (n) => {
|
|
44
44
|
n.stopPropagation();
|
|
45
45
|
} }) }) }) });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.6
|
|
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.
|
|
@@ -13,7 +13,7 @@ const i = { reactUrl: "https://esm.sh/react@19.1.0", reactJsxTransform: "https:/
|
|
|
13
13
|
e.type = "importmap", e.textContent = JSON.stringify({ imports: { react: n, "react/jsx-runtime": a, "react-dom": s, "react-dom/client": c } }), document.head.appendChild(e), console.log("SheetXL: Import map injected:", e.textContent);
|
|
14
14
|
}
|
|
15
15
|
await new Promise((e) => setTimeout(e, 0));
|
|
16
|
-
const o = await Promise.all([import("react"), import("react/jsx-runtime"), import("react-dom"), import("react-dom/client"), import("./
|
|
16
|
+
const o = await Promise.all([import("react"), import("react/jsx-runtime"), import("react-dom"), import("react-dom/client"), import("./DtS8vZkP_9xxg-8G.mjs").then((e) => e.b7)]);
|
|
17
17
|
return console.log("SheetXL: Dependencies resolved:", o), { React: o[0], ReactJSXTransform: o[1], ReactDOM: o[2], ReactDOMClient: o[3], StudioMUI: o[4] };
|
|
18
18
|
})(), r));
|
|
19
19
|
export {
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as C } from "react";
|
|
3
|
+
import { Sort as a, IRange as r } from "@sheetxl/sdk";
|
|
4
|
+
import { w as O, b as S, B as b, at as s, au as l } from "./DtS8vZkP_9xxg-8G.mjs";
|
|
4
5
|
/**
|
|
5
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.6
|
|
6
7
|
*
|
|
7
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
10
|
*/
|
|
10
|
-
const
|
|
11
|
-
const [t, o] =
|
|
11
|
+
const D = ({ range: p, options: c, cell: u, onDone: d, ...m }) => {
|
|
12
|
+
const [t, o] = C(c ?? a.DefaultRangeOptions), v = O((e) => {
|
|
12
13
|
let i = null;
|
|
13
14
|
e === "Sort" && (i = { ...c, options: t }), d?.(i);
|
|
14
15
|
}, [t, d, c]);
|
|
15
|
-
return n(
|
|
16
|
+
return n(S, { title: "Sort", options: ["Sort", "Cancel"], onDone: v, ...m, children: h(b, { sx: { display: "flex", flexDirection: "column" }, children: [n(s, { control: n(l, { checked: !t.reverse, onChange: () => o((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.hasHeader, onChange: () => o((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.collatorOptions?.sensitivity === a.CaseSensitiveOptions.sensitivity, onChange: () => o((e) => ({ ...e, collatorOptions: t.collatorOptions?.sensitivity === a.CaseSensitiveOptions.sensitivity ? a.CaseInsensitiveOptions : a.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.orientation === r.Orientation.Row, onChange: () => o((e) => {
|
|
16
17
|
const i = e.orientation === r.Orientation.Row ? r.Orientation.Column : r.Orientation.Row;
|
|
17
|
-
return { ...
|
|
18
|
+
return { ...p.getDefaultSortCriteria(i, u).options, includeHidden: e.includeHidden, reverse: e.reverse, orientation: i };
|
|
18
19
|
}) }), label: "Row Sort", labelPlacement: "end" }), n(s, { control: n(l, { checked: t.includeHidden, onChange: () => o((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
D as SortDialog,
|
|
23
|
+
D as default
|
|
23
24
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as d, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as V, useState as p, useCallback as h } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { w as u, b as L, B as S, aO as A, aP as G } from "./DtS8vZkP_9xxg-8G.mjs";
|
|
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.6
|
|
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 M = ["Ok", "Cancel"],
|
|
11
|
-
const { value: a = null, context: t, onOption: c, onValidateOption:
|
|
10
|
+
const M = ["Ok", "Cancel"], z = E((C) => {
|
|
11
|
+
const { value: a = null, context: t, onOption: c, onValidateOption: P, onDone: m, onUpdate: g, options: x = M, defaultOption: f = x?.[0], cancelOption: N = "Cancel", sx: R, ...v } = C, y = V(() => t?.getNames().findValidName("Range1"), []), i = V(() => {
|
|
12
12
|
if (!a) return !0;
|
|
13
|
-
}, []), [n,
|
|
13
|
+
}, []), [n, w] = p({ displayText: a?.getName() ?? y, errorText: null }), [l, D] = p({ displayValue: a?.getRanges() ?? t?.selection() ?? null, errorText: null }), [T, O] = p(!1), F = h(async (e) => !n.errorText && !l.errorText, [t]), b = u((e, s, r) => {
|
|
14
14
|
if (!s) {
|
|
15
15
|
let o = null;
|
|
16
16
|
i ? o = t?.getNames().addReference(n?.displayText, l?.displayValue, !1) : (a.getType() === "reference" && a.doBatch(() => {
|
|
@@ -25,19 +25,19 @@ const M = ["Ok", "Cancel"], H = E((C) => {
|
|
|
25
25
|
} catch (r) {
|
|
26
26
|
s = r.message;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
w({ displayText: e, errorText: s });
|
|
29
29
|
}, []), I = u((e) => {
|
|
30
30
|
a && a.getName().toLowerCase() === e.toLowerCase() || t?.getNames().validateName(e);
|
|
31
31
|
}, [t, a]), j = h((e) => {
|
|
32
|
-
|
|
32
|
+
D({ displayValue: e ?? null, errorText: null });
|
|
33
33
|
}, []);
|
|
34
|
-
return d(L, { title: (i ? "Define" : "Edit") + " Range", options: x, onOption:
|
|
34
|
+
return d(L, { title: (i ? "Define" : "Edit") + " Range", options: x, onOption: b, onValidateOption: F, defaultOption: f, cancelOption: N, autoFocusSel: ".autoFocus", sx: { width: "460px", ...R }, ...v, children: k(S, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), range: "flex", flexDirection: "column" }, children: [d(A, { formName: "name", defaultInput: y, value: n.displayText, onChangeInput: B, onValidate: I, onFocus: (e) => {
|
|
35
35
|
T || e.target?.select(), O(!0);
|
|
36
36
|
} }), d(G, { formName: "range", value: l.displayValue, onChangeInput: j, resolvedAddress: t.getNames().getRanges.bind(t.getNames()), onFocus: (e) => {
|
|
37
37
|
T || e.target?.select(), O(!0);
|
|
38
38
|
} })] }) });
|
|
39
39
|
});
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
z as NamedReferenceDialog,
|
|
42
|
+
z as default
|
|
43
43
|
};
|
|
@@ -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.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,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.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as x, b as f, r as
|
|
1
|
+
import { Q as Y } from "./DtS8vZkP_9xxg-8G.mjs";
|
|
2
|
+
import { c as x, b as f, r as I, t as Z, a as A, p as D, d as tt } from "./BWoHBg8cjtJL9xBv.mjs";
|
|
3
|
+
import { IFont as k, IAutoFilter as T, Sort as G, IRange as et, AddressUtils as W, IFill as C, IStyle as rt, ITextFrame as P, FormulaError as st, IBorder as V } from "@sheetxl/sdk";
|
|
3
4
|
/**
|
|
4
|
-
* @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.6
|
|
5
6
|
*
|
|
6
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
7
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -211,7 +212,7 @@ class pt {
|
|
|
211
212
|
return s.plotArea = r, r;
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
|
-
class
|
|
215
|
+
class L {
|
|
215
216
|
EnumMappings() {
|
|
216
217
|
}
|
|
217
218
|
static fromOoxmlGradientType(t) {
|
|
@@ -236,7 +237,7 @@ class q {
|
|
|
236
237
|
processStroke(t, e, s) {
|
|
237
238
|
const r = {}, o = t.evaluate("ln", e);
|
|
238
239
|
if (o) {
|
|
239
|
-
o.hasAttribute("algn") && (r.align =
|
|
240
|
+
o.hasAttribute("algn") && (r.align = L.fromOoxmlAlignment(o.getAttribute("algn"))), o.hasAttribute("cap") && (r.lineCap = L.fromOoxmlLineCap(o.getAttribute("cap"))), o.hasAttribute("cmpd") && (r.compound = L.fromOoxmlCompound(o.getAttribute("cmpd"))), o.hasAttribute("w") && (r.width = Z(o.getAttribute("w")));
|
|
240
241
|
const i = t.evaluate("miter", o);
|
|
241
242
|
i && (r.lineJoin = "miter", i.hasAttribute("lim") && (r.miter = parseFloat(i.getAttribute("lim")))), t.evaluate("bevel", o) && (r.lineJoin = "bevel"), t.evaluate("round", o) && (r.lineJoin = "round");
|
|
242
243
|
const n = t.evaluate("custDash", o);
|
|
@@ -308,7 +309,7 @@ class q {
|
|
|
308
309
|
e.hasAttribute("flip") && (o.mirror = e.getAttribute("flip")), Object.keys(o).length > 0 && (s.tile = o);
|
|
309
310
|
const i = t.evaluate("path", e);
|
|
310
311
|
if (i) {
|
|
311
|
-
i.hasAttribute("path") && (s.type =
|
|
312
|
+
i.hasAttribute("path") && (s.type = L.fromOoxmlGradientType(i.getAttribute("path")));
|
|
312
313
|
const c = t.evaluate("fillToRect", i);
|
|
313
314
|
c && (s.fillTo = this.getRect(c));
|
|
314
315
|
}
|
|
@@ -885,7 +886,7 @@ class Ot {
|
|
|
885
886
|
r.collatorOptions = n ? G.CaseSensitiveOptions : G.CaseInsensitiveOptions;
|
|
886
887
|
}
|
|
887
888
|
const o = e.getAttribute("sortMethod");
|
|
888
|
-
o != null && o !== "none" && (o === "stroke" ? r.collatorOptions = { ...r.collatorOptions, collation: "stroke" } : o === "pinYin" && (r.collatorOptions = { ...r.collatorOptions, collation: "pinyin" })), e.hasAttribute("columnSort") && f(e.getAttribute("columnSort")) && (r.orientation =
|
|
889
|
+
o != null && o !== "none" && (o === "stroke" ? r.collatorOptions = { ...r.collatorOptions, collation: "stroke" } : o === "pinYin" && (r.collatorOptions = { ...r.collatorOptions, collation: "pinyin" })), e.hasAttribute("columnSort") && f(e.getAttribute("columnSort")) && (r.orientation = et.Orientation.Column);
|
|
889
890
|
const i = W.fastStringToRange(r.ref);
|
|
890
891
|
return this.processSortConditions(t, e, r, i), Object.keys(r).length > 0 && (s.sort = r), r;
|
|
891
892
|
}
|
|
@@ -914,12 +915,12 @@ class Ot {
|
|
|
914
915
|
return i.length > 0 && (s.fields = i), i;
|
|
915
916
|
}
|
|
916
917
|
}
|
|
917
|
-
class
|
|
918
|
+
class Q {
|
|
918
919
|
visit(t, e, s) {
|
|
919
920
|
}
|
|
920
921
|
processDataBarColor(t, e, s, r, o = "dk1") {
|
|
921
922
|
if (!e) return;
|
|
922
|
-
const i =
|
|
923
|
+
const i = tt((n) => e.getAttribute(n), o);
|
|
923
924
|
return i && (s[r] = i), s;
|
|
924
925
|
}
|
|
925
926
|
processFonts(t, e, s) {
|
|
@@ -1055,7 +1056,7 @@ class Z {
|
|
|
1055
1056
|
return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? s[r] = i : null;
|
|
1056
1057
|
}
|
|
1057
1058
|
}
|
|
1058
|
-
class Tt extends
|
|
1059
|
+
class Tt extends Q {
|
|
1059
1060
|
visit(t, e, s) {
|
|
1060
1061
|
this.processNumFmts(t, t.evaluate("numFmts", e), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1061
1062
|
const r = { fills: {}, fonts: {}, borders: {} };
|
|
@@ -1128,7 +1129,7 @@ class Tt extends Z {
|
|
|
1128
1129
|
const n = e.getAttribute("xfId");
|
|
1129
1130
|
if (n && o) {
|
|
1130
1131
|
const c = o.get(parseInt(n));
|
|
1131
|
-
c && c !==
|
|
1132
|
+
c && c !== rt.BuiltInName.Normal && (s.named = c);
|
|
1132
1133
|
}
|
|
1133
1134
|
const l = (c) => !(!i && e.hasAttribute(c)) || f(e.getAttribute("applyFont"));
|
|
1134
1135
|
if (l("applyFont")) {
|
|
@@ -1255,7 +1256,7 @@ class Tt extends Z {
|
|
|
1255
1256
|
afterVisit(t, e, s) {
|
|
1256
1257
|
}
|
|
1257
1258
|
}
|
|
1258
|
-
class Vt extends
|
|
1259
|
+
class Vt extends Q {
|
|
1259
1260
|
visit(t, e, s) {
|
|
1260
1261
|
return this.processSheetRefs(t, t.evaluate("sheets", e), s), this.processBookViews(t, t.evaluate("bookViews", e), s), this.processDefinedNames(t, t.evaluate("definedNames", e), s), this.processCalcPr(t, t.evaluate("calcPr", e), s), this.processWorkbookProtection(t, t.evaluate("workbookProtection", e), s), this.processWorkbookPr(t, t.evaluate("workbookPr", e), s), s;
|
|
1261
1262
|
}
|
|
@@ -1362,7 +1363,7 @@ class St {
|
|
|
1362
1363
|
o.length > 0 && (s.columns = o);
|
|
1363
1364
|
}
|
|
1364
1365
|
}
|
|
1365
|
-
class
|
|
1366
|
+
class xt {
|
|
1366
1367
|
visit(t, e, s) {
|
|
1367
1368
|
return s;
|
|
1368
1369
|
}
|
|
@@ -1386,7 +1387,7 @@ class U {
|
|
|
1386
1387
|
return r && (t.copyFromAttribute(r, "name", s), t.copyFromAttribute(r, "desc", s), t.copyFromAttribute(r, "hidden", s, "hidden", t.BOOLEAN_COPY), t.copyFromAttribute(r, "id", s)), s;
|
|
1387
1388
|
}
|
|
1388
1389
|
}
|
|
1389
|
-
class
|
|
1390
|
+
class kt extends U {
|
|
1390
1391
|
visit(t, e, s) {
|
|
1391
1392
|
if (!e) return;
|
|
1392
1393
|
s = super.visit(t, e, s);
|
|
@@ -1433,7 +1434,7 @@ class z extends U {
|
|
|
1433
1434
|
return s.content = { type: "sp", json: o }, o;
|
|
1434
1435
|
}
|
|
1435
1436
|
}
|
|
1436
|
-
class
|
|
1437
|
+
class It extends U {
|
|
1437
1438
|
visit(t, e, s) {
|
|
1438
1439
|
if (!e) return;
|
|
1439
1440
|
const r = super.visit(t, e, s), o = t.evaluate("nvPicPr/cNvPicPr", e);
|
|
@@ -1457,7 +1458,7 @@ class Lt extends U {
|
|
|
1457
1458
|
return s.content = { type: "picture", json: l }, r;
|
|
1458
1459
|
}
|
|
1459
1460
|
}
|
|
1460
|
-
class
|
|
1461
|
+
class Lt extends z {
|
|
1461
1462
|
visit(t, e, s) {
|
|
1462
1463
|
if (!e) return;
|
|
1463
1464
|
s = super.visit(t, e, s);
|
|
@@ -1542,7 +1543,7 @@ class jt {
|
|
|
1542
1543
|
if (e.type === "_error") {
|
|
1543
1544
|
const s = e.errorType;
|
|
1544
1545
|
if (s) try {
|
|
1545
|
-
e =
|
|
1546
|
+
e = st.getBuiltInById(s + 1);
|
|
1546
1547
|
} catch {
|
|
1547
1548
|
}
|
|
1548
1549
|
}
|
|
@@ -1600,7 +1601,7 @@ class Dt {
|
|
|
1600
1601
|
visit(t, e, s) {
|
|
1601
1602
|
if (!e) return;
|
|
1602
1603
|
const r = {};
|
|
1603
|
-
return t.copyFromAttribute(e, "id", r, "id",
|
|
1604
|
+
return t.copyFromAttribute(e, "id", r, "id", I), t.copyFromAttribute(e, "personId", r, "personId", I), t.copyFromAttribute(e, "ref", r), t.copyFromAttribute(e, "parentId", r, "parentId", I), t.copyFromAttribute(e, "dT", r), e.hasAttribute("done") && (r.done = f(e.getAttribute("done"))), s.push(r), r;
|
|
1604
1605
|
}
|
|
1605
1606
|
}
|
|
1606
1607
|
class Mt {
|
|
@@ -1610,7 +1611,7 @@ class Mt {
|
|
|
1610
1611
|
const n = o.item(i);
|
|
1611
1612
|
if (n.nodeType === 1 && n.localName === "person") {
|
|
1612
1613
|
const l = {};
|
|
1613
|
-
t.copyFromAttribute(n, "id", l, "id",
|
|
1614
|
+
t.copyFromAttribute(n, "id", l, "id", I), t.copyFromAttribute(n, "displayName", l), t.copyFromAttribute(n, "userId", l, "userId", I), t.copyFromAttribute(n, "providerId", l), r.push(l);
|
|
1614
1615
|
}
|
|
1615
1616
|
}
|
|
1616
1617
|
return r.length > 0 && (s.persons = r), r;
|
|
@@ -1622,9 +1623,9 @@ class zt {
|
|
|
1622
1623
|
this.path = t, this.visitor = e;
|
|
1623
1624
|
}
|
|
1624
1625
|
}
|
|
1625
|
-
class
|
|
1626
|
+
class $t {
|
|
1626
1627
|
constructor() {
|
|
1627
|
-
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new ct()), this.registerVisitor("spPr", new M()), this.registerVisitor("txBody", new F()), this.registerVisitor("txPr", new F()), this.registerVisitor("c:chartSpace", new ut()), this.registerVisitor("c:chartSpace", new ht(), "chart"), this.registerVisitor("c:plotArea", new pt()), this.registerVisitor("c:barChart", new gt()), this.registerVisitor("c:doughnutChart", new S()), this.registerVisitor("c:lineChart", new S()), this.registerVisitor("c:ofPieType", new S()), this.registerVisitor("c:pieChart", new S()), this.registerVisitor("c:scatterChart", new S()), this.registerVisitor("c:barChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new N("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new dt()), this.registerVisitor("c:dPt", new mt()), this.registerVisitor("c:marker", new bt()), this.registerVisitor("c:catAx", new R()), this.registerVisitor("c:valAx", new R()), this.registerVisitor("c:dateAx", new R()), this.registerVisitor("c:majorGridlines", new j("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new j("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new F("labels.text"), "txPr"), this.registerVisitor("c:valAx", new F("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new F("labels.text"), "txPr"), this.registerVisitor("c:legend", new At()), this.registerVisitor("c:legend", new F("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new ft()), this.registerVisitor("c:ser", new yt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new N("labels"), "dLbls"), this.registerVisitor("c:dLbl", new N("points")), this.registerVisitor("c:title", new X()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new vt()), this.registerVisitor("c:dispUnits", new j("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new F(), "tx/rich"), this.registerVisitor("a:theme", new Ft()), this.registerVisitor("a:theme", new Ct(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new wt(), "themeElements/fontScheme"), this.registerVisitor("autoFilter", new Nt()), this.registerVisitor("sortState", new Ot()), this.registerVisitor("s:workbook", new Vt()), this.registerVisitor("styleSheet", new Tt()), this.registerVisitor("table", new St()), this.registerVisitor("hlinkClick", new Pt()), this.registerVisitor("wsDr", new
|
|
1628
|
+
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new ct()), this.registerVisitor("spPr", new M()), this.registerVisitor("txBody", new F()), this.registerVisitor("txPr", new F()), this.registerVisitor("c:chartSpace", new ut()), this.registerVisitor("c:chartSpace", new ht(), "chart"), this.registerVisitor("c:plotArea", new pt()), this.registerVisitor("c:barChart", new gt()), this.registerVisitor("c:doughnutChart", new S()), this.registerVisitor("c:lineChart", new S()), this.registerVisitor("c:ofPieType", new S()), this.registerVisitor("c:pieChart", new S()), this.registerVisitor("c:scatterChart", new S()), this.registerVisitor("c:barChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new N("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new dt()), this.registerVisitor("c:dPt", new mt()), this.registerVisitor("c:marker", new bt()), this.registerVisitor("c:catAx", new R()), this.registerVisitor("c:valAx", new R()), this.registerVisitor("c:dateAx", new R()), this.registerVisitor("c:majorGridlines", new j("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new j("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new F("labels.text"), "txPr"), this.registerVisitor("c:valAx", new F("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new F("labels.text"), "txPr"), this.registerVisitor("c:legend", new At()), this.registerVisitor("c:legend", new F("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new ft()), this.registerVisitor("c:ser", new yt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new N("labels"), "dLbls"), this.registerVisitor("c:dLbl", new N("points")), this.registerVisitor("c:title", new X()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new vt()), this.registerVisitor("c:dispUnits", new j("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new F(), "tx/rich"), this.registerVisitor("a:theme", new Ft()), this.registerVisitor("a:theme", new Ct(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new wt(), "themeElements/fontScheme"), this.registerVisitor("autoFilter", new Nt()), this.registerVisitor("sortState", new Ot()), this.registerVisitor("s:workbook", new Vt()), this.registerVisitor("styleSheet", new Tt()), this.registerVisitor("table", new St()), this.registerVisitor("hlinkClick", new Pt()), this.registerVisitor("wsDr", new xt()), this.registerVisitor("twoCellAnchor", new E()), this.registerVisitor("oneCellAnchor", new E()), this.registerVisitor("absoluteAnchor", new E()), this.registerVisitor("graphicFrame", new kt()), this.registerVisitor("sp", new z()), this.registerVisitor("grpSp", new Lt()), this.registerVisitor("cxnSp", new Bt()), this.registerVisitor("pic", new It()), this.registerVisitor("rvStructures", new _t()), this.registerVisitor("rvData", new jt()), this.registerVisitor("comments", new Rt()), this.registerVisitor("commentList", new Et(), "comment"), this.registerVisitor("comment", new F("content"), "text"), this.registerVisitor("ThreadedComments", new Yt()), this.registerVisitor("threadedComment", new Dt()), this.registerVisitor("threadedComment", new F("content"), "text"), this.registerVisitor("personList", new Mt());
|
|
1628
1629
|
}
|
|
1629
1630
|
registerVisitor(t, e, s = null) {
|
|
1630
1631
|
t.indexOf(":") === -1 && (t = "*:" + t);
|
|
@@ -1697,6 +1698,6 @@ class Xt {
|
|
|
1697
1698
|
}
|
|
1698
1699
|
}
|
|
1699
1700
|
export {
|
|
1700
|
-
|
|
1701
|
-
|
|
1701
|
+
$t as FromOOXMLConverter,
|
|
1702
|
+
$t as default
|
|
1702
1703
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { memo as G, useState as x, useCallback as O, useEffect as H, useMemo as w } from "react";
|
|
3
|
+
import { NumberFormat as n } from "@sheetxl/sdk";
|
|
4
|
+
import { w as l, av as K, b as _, B as P, F as S, aw as q, ax as A, c as p, ay as c, a as J, _ as D, az as Q } from "./DtS8vZkP_9xxg-8G.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.6
|
|
7
|
+
*
|
|
8
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
10
|
+
*/
|
|
11
|
+
const U = ["Ok", "Cancel"], ea = G(($) => {
|
|
12
|
+
const { initialValue: I, context: h, onOption: b, onValidateOption: u, onInputOption: C, onDone: d, options: v = U, defaultOption: r = v?.[0], cancelOption: m = "Cancel", sx: N, ...V } = $, [e, T] = x(I), [j, z] = x(!1), g = O(async (a, o) => !0, []), y = l(async (a) => {
|
|
13
|
+
C?.(e, a), b?.(a, a === m, a === r), d?.();
|
|
14
|
+
}, [e, C, d, b, m, r]), B = l(async (a) => {
|
|
15
|
+
a.keyCode === K.Enter && await g?.(e, null) !== !1 && y(r);
|
|
16
|
+
}, [e, y]), M = l((a) => {
|
|
17
|
+
T(a.target.value), g?.(a.target.value, null);
|
|
18
|
+
}, [u]), E = l(async (a) => {
|
|
19
|
+
let o = await Promise.resolve(u?.(a));
|
|
20
|
+
try {
|
|
21
|
+
o !== !1 && (o = await Promise.resolve(g?.(e, a)) ?? !0);
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
return o ?? !0;
|
|
25
|
+
}, [u]), [k, F] = x(n.Styles.lookupStyle(e).formatType ?? n.Type.Custom);
|
|
26
|
+
H(() => {
|
|
27
|
+
F(n.Styles.lookupStyle(e).formatType ?? n.Type.Custom);
|
|
28
|
+
}, [e]);
|
|
29
|
+
const L = w(() => {
|
|
30
|
+
const a = n.Styles.lookupPrimary(), o = (i) => t(Q, { value: i, children: i }, i), s = Object.keys(a).map((i) => o(a[i].formatType));
|
|
31
|
+
return s.push(o(n.Type.Custom)), s;
|
|
32
|
+
}, []), R = O((a) => {
|
|
33
|
+
const o = a.target.value;
|
|
34
|
+
F(o);
|
|
35
|
+
const s = n.Styles.lookupDefault(o);
|
|
36
|
+
s && T(s);
|
|
37
|
+
}, []), W = w(() => {
|
|
38
|
+
const a = h();
|
|
39
|
+
return a.createTemporaryCell({ value: a.getValue() ?? 12345, style: { numberFormat: e } });
|
|
40
|
+
}, [k, e, h]);
|
|
41
|
+
return t(_, { title: "Number Format", options: v, onDone: d, onOption: (a) => y(a), onValidateOption: E, defaultOption: r, cancelOption: m, autoFocusSel: ".autoFocus", sx: { width: "580px", ...N }, ...V, children: f(P, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0), rowGap: (a) => a.spacing(1), display: "flex", flexDirection: "column" }, children: [f(S, { sx: { minWidth: 135 }, size: "small", children: [t(q, { children: "Category" }), t(A, { value: k, label: "Category", onChange: R, sx: { backgroundImage: `linear-gradient(${p("#fff", c(5))}, ${p("#fff", c(5))})` }, children: L })] }), t(S, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(J, { label: "Code", onFocus: (a) => {
|
|
42
|
+
j || a.target?.select(), z(!0);
|
|
43
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", c(5))}, ${p("#fff", c(5))})` } } }, value: e, onChange: M, onKeyDown: B, onContextMenu: (a) => {
|
|
44
|
+
a.stopPropagation();
|
|
45
|
+
} }) }), f(P, { children: [t(D, { variant: "caption", component: "div", sx: { paddingLeft: (a) => a.spacing(2) }, children: "Preview" }), t(D, { variant: "body2", component: "div", sx: { borderRadius: (a) => `${a.shape.borderRadius}px`, padding: (a) => a.spacing(1), border: (a) => `1px solid ${a.palette.grey[400]}` }, children: W.getNumberFormat().displayText || "(empty)" })] })] }) });
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
ea as NumberFormatDialog,
|
|
49
|
+
ea as default
|
|
50
|
+
};
|