@sheetxl/studio-mui 0.3.3 → 0.3.5
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/4qy63Boa4nvdxyjo.cjs +6 -0
- package/browser/cjs/{D69p4DRnZE5Oa52x.cjs → AQ9Vi-Cv6JK-IezR.cjs} +1 -1
- package/browser/cjs/{YpWYrg3Eysqtr9aZ.cjs → B13OXuZsTC4RULMo.cjs} +1 -1
- package/browser/cjs/BHJSCG4oU8pmuDwm.cjs +12 -0
- package/browser/cjs/{DSNu0kgR1_X-nK_Z.cjs → Bav0cmsoPAA3a5yu.cjs} +2 -2
- package/browser/cjs/{DAyHZyXZGsDWfbyd.cjs → Bkl3DGri3E5UGuvv.cjs} +1 -1
- package/browser/cjs/{BH160EggM2K8qaSr.cjs → BlxVofqfnSMNcuv8.cjs} +1 -1
- package/browser/cjs/{BL1st_QvuF5m8AaJ.cjs → ByVL-_c8JG4yCwyg.cjs} +2 -2
- package/browser/cjs/{BlBsVySC7wICKf3b.cjs → CGHGrJD1KaYGPUWt.cjs} +2 -2
- package/browser/cjs/{Bh785l7WNSK7G3hU.cjs → CQXkduebOzsWYR7I.cjs} +1 -1
- package/browser/cjs/{C9TJkm0tBPD04idM.cjs → CauYni4UlnUOg2KD.cjs} +2 -2
- package/browser/cjs/CetwWGtSVR7MPQmq.cjs +6 -0
- package/browser/cjs/{BQyDL6TxMqPmkugH.cjs → D76n8Obon9BUBaN9.cjs} +1 -1
- package/browser/cjs/{scolQa-PxnIvyiDb.cjs → DAIK3n9uEZA5B3jo.cjs} +1 -1
- package/browser/cjs/{CPKZW7FfYlmkNYbE.cjs → DKTmOXPHU474-EAe.cjs} +2 -2
- package/browser/cjs/DQxMsOz7p1VlzGGr.cjs +11 -0
- package/browser/cjs/DSumeKv5upBoatXJ.cjs +12 -0
- package/browser/cjs/{CEx5ZMI8c4HYrxzW.cjs → Dold2uHEN8H8QsT-.cjs} +1 -1
- package/browser/cjs/{B0-aLTQ0dAlPdRnQ.cjs → K7lHFQm8oaMP4Fc7.cjs} +3 -3
- package/browser/cjs/{D8qPzQKLyGrgGg08.cjs → LLqao183uS5MMxF5.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/kEe9PBONC8-oT9AU.cjs +6 -0
- package/browser/cjs/{CP_eU6V1jkcP4WtQ.cjs → p8j2cCUulAy7yD2q.cjs} +2 -2
- package/browser/cjs/q9JmnJDMYsSf7UfZ.cjs +6 -0
- package/browser/cjs/wwocjd0UfaRLBBMZ.cjs +6 -0
- package/browser/cjs/zAZ0LJZMPXeu6JSh.cjs +87 -0
- package/browser/esm/{BeMVD9uqSXo5o9U7.mjs → B5O5PCrKRZ4DUAH5.mjs} +13 -13
- package/browser/esm/B89QkSJt5Nra70ba.mjs +19838 -0
- package/browser/esm/{5uqs7KjiX3pi6cd5.mjs → BRJgzXA_m_2aKWbd.mjs} +10 -10
- package/browser/esm/{C8eXD0cT7ZPGYNCl.mjs → BYUh5NiLu-E5n_2A.mjs} +21 -20
- package/browser/esm/{B9IRFHtuYz6_J4Sj.mjs → Bx8dhDDGV4fnPcL4.mjs} +8 -8
- package/browser/esm/{DpJqkBHKECEClAah.mjs → C2gkPo-K972JVp5g.mjs} +6 -6
- package/browser/esm/{BVjzMl2EkoD1ceqn.mjs → CEvGwR40Y6Ef-WDe.mjs} +7 -7
- package/browser/esm/{BLiRvSBEJD-6dWH0.mjs → Cb9SB2mI9VqoMLgo.mjs} +1 -1
- package/browser/esm/{BIQXdDApQqsa7WWH.mjs → CsT1vXKI_o6hLmzM.mjs} +1 -1
- package/browser/esm/D0WM4vskQ31-MkSX.mjs +1467 -0
- package/browser/esm/{QNCUQO7a-oixacNG.mjs → D5FRlmQmwf6Y4j_G.mjs} +1 -1
- package/browser/esm/{0qppnWkLyeMGOizg.mjs → DEorp4Rd9a565r_h.mjs} +1 -1
- package/browser/esm/{q1cTyqrb2yKNSDq5.mjs → DHvI-gSNOpEkZS0_.mjs} +170 -169
- package/browser/esm/{Dy7xNyqd4jfUcj2t.mjs → DK4TrH-nckKO9Q9L.mjs} +1 -1
- package/browser/esm/DMOlhSnOh4hHXiw0.mjs +52 -0
- package/browser/esm/{B1fKMAH-vx3TJ0ii.mjs → DQwg0nFQOuoWa9vC.mjs} +1 -1
- package/browser/esm/{BXvDIYhOIHqmZQQo.mjs → DVEcYvO4EkDBk4FX.mjs} +1 -1
- package/browser/esm/{CE3LjR3RfccnMUQt.mjs → DdsrrZg_d16qXBaF.mjs} +13 -13
- package/browser/esm/{BCiGYy5wMbcNSF3g.mjs → DhJgaHDvhGW9Q-Jd.mjs} +1 -1
- package/browser/esm/{PbEXrCdkQc02gfVZ.mjs → Dr-hrT0HVZs3fkdF.mjs} +10 -10
- package/browser/esm/{DTW06ga7BIWfkpc3.mjs → Drjhq-zlZ3HTK_ZI.mjs} +11 -10
- package/browser/esm/{CTdZQdi5BoNPu7rZ.mjs → Dw7dYD6MrvZb3WPh.mjs} +65 -65
- package/browser/esm/{DJVGX60ly4BfiFse.mjs → DzW551wAkGdUKn1f.mjs} +44 -43
- package/browser/esm/{DrzfnYtbTkZ0Vztm.mjs → XSaSkbiadpjvNPF-.mjs} +2 -2
- package/browser/esm/index.mjs +74 -73
- package/browser/esm/{B0k5xuPgYO9B-vto.mjs → q-qojAI33CqmRx77.mjs} +16 -16
- package/licenses/dependencies.txt +156 -178
- package/node/esm/{cT4-HbwV7TBlRjja.mjs → 0VUK_26rxW-1p-no.mjs} +276 -275
- package/node/esm/{BiiNcUkTIcWxOabS.mjs → B4Eo0tFRg7GybYQq.mjs} +2 -2
- package/node/esm/B6na2FpIb2N8_BII.mjs +25 -0
- package/node/esm/{tk69oRoeZHf4vk1z.mjs → BCqh-sztmdgZm9pd.mjs} +13 -13
- package/node/esm/{fENiUIb3u1Oy7Amv.mjs → BNhJrLEKwde0o2dg.mjs} +8 -8
- package/node/esm/{Cd5wE06_wa41Z6Wt.mjs → BQWO9jQkGVXLYnCK.mjs} +12 -12
- package/node/esm/{BvOnjWMz5o3z-qWe.mjs → BUDeEhnsn9-yrQlE.mjs} +1 -1
- package/node/esm/{CZlpZhqzgcRkv_bX.mjs → BXZpU4qRYF5maAg0.mjs} +9 -9
- package/node/esm/{D4ydLNNfUH8D41A7.mjs → BexDrSYf11he63De.mjs} +1 -1
- package/node/esm/{BnbhKW27rQ185mOb.mjs → BiU1UyUrEkNS9WeH.mjs} +2 -2
- package/node/esm/{Br_lQeehvACsDkzu.mjs → C53eiTE5QbclOU-x.mjs} +13 -12
- package/node/esm/{CBlVCA0uvCwlok1v.mjs → C63AwhK2bi3nQ-qh.mjs} +1 -1
- package/node/esm/{DbzTWKX0Q8SGsGA4.mjs → CJzMybL2SEMDl1Nw.mjs} +29 -29
- package/node/esm/{zQ0ozpm04cC2OG19.mjs → CKS2ltb4Bv_q8qad.mjs} +22 -22
- package/node/esm/{C0eiYtK0Lkx4fQGc.mjs → CZtyxHtVSnQOWUIw.mjs} +86 -85
- package/node/esm/{6L7TnSLCvI3zabFK.mjs → CvxTDOd3lLLowV8Z.mjs} +24 -23
- package/node/esm/DQv4OOMysHEA_ih5.mjs +553 -0
- package/node/esm/{CI3U9rEYT3a_Biw5.mjs → D_wrbdHZwcqLBmob.mjs} +1 -1
- package/node/esm/{BY1cZ8MXawge5drQ.mjs → Dca0ee8jhGRibBhk.mjs} +2 -2
- package/node/esm/{Ro_fz9s3_2DHfiE-.mjs → DpB6jqJa5heTZlo1.mjs} +1 -1
- package/node/esm/{CZA-oIez6io5vwv1.mjs → DrgN5wWkYF1hgIK3.mjs} +1 -1
- package/node/esm/DuL4Zvdz5hbTWC1z.mjs +308 -0
- package/node/esm/index.mjs +12885 -41674
- package/node/esm/{D6wjzUXEh-Q71uoB.mjs → mEXgu7-CAzFc23RE.mjs} +2 -2
- package/package.json +8 -8
- package/browser/cjs/BAGEDalcFwfUrDOV.cjs +0 -6
- package/browser/cjs/BMcvveT3JniLuWWw.cjs +0 -6
- package/browser/cjs/B_JRx-UyLNBI8Jr9.cjs +0 -6
- package/browser/cjs/BbCINWmJNJ1UoABX.cjs +0 -6
- package/browser/cjs/BdPTNgv6BQFiJXiH.cjs +0 -238
- package/browser/cjs/BgqUvcQGSrZtIsnp.cjs +0 -6
- package/browser/cjs/Bub0lBbzpOagYy-6.cjs +0 -12
- package/browser/cjs/BvV0mrFKi8cdsSFF.cjs +0 -6
- package/browser/cjs/BxCxDRRwMVIA9T0Q.cjs +0 -6
- package/browser/cjs/BxbbUhKRSHRfeoNL.cjs +0 -32
- package/browser/cjs/C3RxbodVdJ0MR0eY.cjs +0 -11
- package/browser/cjs/C4zc2Ll270E135fR.cjs +0 -6
- package/browser/cjs/CEkRIfptK2yyy4PS.cjs +0 -6
- package/browser/cjs/CGp4fzG2ZIsJmB72.cjs +0 -6
- package/browser/cjs/CT5f8xMCNbOhih6R.cjs +0 -12
- package/browser/cjs/CV6WjeLkZrGoM4SB.cjs +0 -6
- package/browser/cjs/CZA_Av5pG0M1RgJK.cjs +0 -6
- package/browser/cjs/Ca6YJnV2DBQrqx0b.cjs +0 -124
- package/browser/cjs/Ci7CqdgErq0IGcl5.cjs +0 -6
- package/browser/cjs/CmROQEOLO7s-rzZW.cjs +0 -6
- package/browser/cjs/Cnc0-T-tLmqyX7Mq.cjs +0 -6
- package/browser/cjs/Ct6nh7ILtW_PHbB3.cjs +0 -6
- package/browser/cjs/CtmTxxgCijL1ZuPa.cjs +0 -6
- package/browser/cjs/CyUaP6X--CmuILoU.cjs +0 -6
- package/browser/cjs/D598Bk4npBA6UESy.cjs +0 -6
- package/browser/cjs/D7asEaPB97YVwe1v.cjs +0 -6
- package/browser/cjs/D9lDObZe3CkEPPGI.cjs +0 -6
- package/browser/cjs/DFrTuKkfDctye00L.cjs +0 -7
- package/browser/cjs/DNquPukGj-6iRmmP.cjs +0 -13
- package/browser/cjs/DOXD9gLvRI-UN_9l.cjs +0 -6
- package/browser/cjs/DRhcrHz-whpKmHXb.cjs +0 -6
- package/browser/cjs/DdBygPkI15syG3qE.cjs +0 -1501
- package/browser/cjs/DrgfA0AIigevE5fO.cjs +0 -15
- package/browser/cjs/DyjUI4ZuHoE2UtYP.cjs +0 -6
- package/browser/cjs/Ou0ysDOtKXD_MCyi.cjs +0 -6
- package/browser/cjs/Tkr7WOf1Km7F6jc1.cjs +0 -6
- package/browser/cjs/Ui6MyVXLy4hSZZln.cjs +0 -6
- package/browser/cjs/ZSSSnynZ-cYurCZ4.cjs +0 -6
- package/browser/cjs/hDl6HNkylTvv-qT3.cjs +0 -6
- package/browser/cjs/tLWq6abRGIT6oIrd.cjs +0 -6
- package/browser/cjs/xS50A4hbimnAA3g8.cjs +0 -6
- package/browser/esm/6qF6HMFmVJEMu5ze.mjs +0 -10
- package/browser/esm/91ZejdYNSNvEQyri.mjs +0 -43655
- package/browser/esm/B6KWiZxcJDzPKz7A.mjs +0 -10
- package/browser/esm/BGfz8kkDQwuckxnU.mjs +0 -10
- package/browser/esm/BNWWT7cxdCiMaWFC.mjs +0 -10
- package/browser/esm/BSB3k2C-vxhRI9pk.mjs +0 -5582
- package/browser/esm/Baiv07hkxLIkAcoq.mjs +0 -10
- package/browser/esm/Bc6K-JiRW1SodxIq.mjs +0 -10
- package/browser/esm/BpfyDNlbLX4dOPvj.mjs +0 -24
- package/browser/esm/Bs0RJigDhPR1WzFT.mjs +0 -21
- package/browser/esm/BtP3Wpc2YRk8W2KZ.mjs +0 -12
- package/browser/esm/BwWIlZYqfL7BAjSI.mjs +0 -10
- package/browser/esm/C7YTh7Sm32Nt_Kv5.mjs +0 -10
- package/browser/esm/CE1gssQmn8QAeBEI.mjs +0 -10
- package/browser/esm/CE3vBPdWXPf3M3h2.mjs +0 -51
- package/browser/esm/CJigh9OXZ04sdTLc.mjs +0 -1466
- package/browser/esm/CLHgqHwohIYlAAUF.mjs +0 -472
- package/browser/esm/CTuGnJMMNAi4EKiy.mjs +0 -10
- package/browser/esm/CUZmKq_NPR_OCibb.mjs +0 -10
- package/browser/esm/ChIE2YGkU9_cnmDj.mjs +0 -10
- package/browser/esm/Cv8VSqfWEaftgiTH.mjs +0 -10
- package/browser/esm/CvJUNcDyz497Gxl7.mjs +0 -10
- package/browser/esm/D2OQwThnobBdsQ1x.mjs +0 -3934
- package/browser/esm/D73ljnqYKCXMdyPd.mjs +0 -1575
- package/browser/esm/DAPWMPwVGQJsblPQ.mjs +0 -10
- package/browser/esm/Dsu3RRvUfCUWRZ6q.mjs +0 -10
- package/browser/esm/DxEtUnQEyEYWuqL7.mjs +0 -820
- package/browser/esm/Dxrje6uVvr2LGdV7.mjs +0 -10
- package/browser/esm/JMr0jtu67PC8clGf.mjs +0 -10
- package/browser/esm/QhTxW6tFl-So20AH.mjs +0 -425
- package/browser/esm/_tXPsCW6hHTdj45y.mjs +0 -10
- package/browser/esm/bJWg5_Jxjizyivdn.mjs +0 -29
- package/browser/esm/cVH-KYzKaUP4C3dh.mjs +0 -10
- package/browser/esm/cp8pKSzbJqh-zBtd.mjs +0 -10
- package/browser/esm/dmuee2Is7r5Q4B3M.mjs +0 -10
- package/node/esm/0CbEJyCpbWyFHdK1.mjs +0 -4002
- package/node/esm/6qF6HMFmVJEMu5ze.mjs +0 -10
- package/node/esm/A5WewF_ecyRMfEW9.mjs +0 -80
- package/node/esm/B0rQMzpUsBE47H-k.mjs +0 -10
- package/node/esm/B3TBImEZBAbKsEAq.mjs +0 -10
- package/node/esm/B6KWiZxcJDzPKz7A.mjs +0 -10
- package/node/esm/B8tFaB-W9JcM6xhy.mjs +0 -29
- package/node/esm/BGfz8kkDQwuckxnU.mjs +0 -10
- package/node/esm/BKb0zrP-OexxgIYb.mjs +0 -24
- package/node/esm/BNWWT7cxdCiMaWFC.mjs +0 -10
- package/node/esm/BQBHsnvwWPo5kQhy.mjs +0 -10
- package/node/esm/BZTLlsc-NvE1_mTb.mjs +0 -555
- package/node/esm/Baiv07hkxLIkAcoq.mjs +0 -10
- package/node/esm/Bc6K-JiRW1SodxIq.mjs +0 -10
- package/node/esm/BiVFM0O-4h4yY7oa.mjs +0 -10
- package/node/esm/Bq-gS5qqB1Jrllm2.mjs +0 -307
- package/node/esm/Bv7SpuMBfsaGEFxP.mjs +0 -16
- package/node/esm/BwWIlZYqfL7BAjSI.mjs +0 -10
- package/node/esm/C0qF-AAqNGDMeSVO.mjs +0 -813
- package/node/esm/CE1gssQmn8QAeBEI.mjs +0 -10
- package/node/esm/CUZmKq_NPR_OCibb.mjs +0 -10
- package/node/esm/ChIE2YGkU9_cnmDj.mjs +0 -10
- package/node/esm/CvJUNcDyz497Gxl7.mjs +0 -10
- package/node/esm/DAPWMPwVGQJsblPQ.mjs +0 -10
- package/node/esm/DJtTsiROzkkD2wRx.mjs +0 -5642
- package/node/esm/DLEDFraKFWvZtfvX.mjs +0 -10
- package/node/esm/DNYPU79SNlXuHN8j.mjs +0 -10
- package/node/esm/DjhMNAleaI3hhcHG.mjs +0 -13
- package/node/esm/DtUFCYSrTGcBjdBN.mjs +0 -453
- package/node/esm/Dxrje6uVvr2LGdV7.mjs +0 -10
- package/node/esm/EebvqIVFwWH3slRt.mjs +0 -14
- package/node/esm/cVH-KYzKaUP4C3dh.mjs +0 -10
- package/node/esm/cp8pKSzbJqh-zBtd.mjs +0 -10
- package/node/esm/dmuee2Is7r5Q4B3M.mjs +0 -10
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { a2 as e } from "./index.mjs";
|
|
8
8
|
function r(e2, r2) {
|
|
9
9
|
for (var t2 = 0; t2 < r2.length; t2++) {
|
|
10
10
|
const n2 = r2[t2];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
8
|
+
import { useState as t } from "react";
|
|
9
|
+
import { Box as o, FormControlLabel as i, Checkbox as l } from "@mui/material";
|
|
10
|
+
import { Sort as r, IRange as a } from "@sheetxl/sdk";
|
|
11
|
+
import { P as s, o as c } from "./index.mjs";
|
|
12
|
+
const d = ({ range: d2, options: m, cell: p, onDone: h, ...u }) => {
|
|
13
|
+
const [v, C] = t(m ?? r.DefaultRangeOptions), O = s((e2) => {
|
|
14
|
+
let n2 = null;
|
|
15
|
+
"Sort" === e2 && (n2 = { ...m, options: v }), h?.(n2);
|
|
16
|
+
}, [v, h, m]);
|
|
17
|
+
return e(c, { title: "Sort", options: ["Sort", "Cancel"], onDone: O, ...u, children: n(o, { sx: { display: "flex", flexDirection: "column" }, children: [e(i, { control: e(l, { checked: !v.reverse, onChange: () => C((e2) => ({ ...e2, reverse: !e2.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), e(i, { control: e(l, { checked: v.hasHeader, onChange: () => C((e2) => ({ ...e2, hasHeader: !e2.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), e(i, { control: e(l, { checked: v.collatorOptions?.sensitivity === r.CaseSensitiveOptions.sensitivity, onChange: () => C((e2) => ({ ...e2, collatorOptions: v.collatorOptions?.sensitivity === r.CaseSensitiveOptions.sensitivity ? r.CaseInsensitiveOptions : r.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), e(i, { control: e(l, { checked: v.orientation === a.Orientation.Row, onChange: () => C((e2) => {
|
|
18
|
+
const n2 = e2.orientation === a.Orientation.Row ? a.Orientation.Column : a.Orientation.Row;
|
|
19
|
+
return { ...d2.getDefaultSortCriteria(n2, p).options, includeHidden: e2.includeHidden, reverse: e2.reverse, orientation: n2 };
|
|
20
|
+
}) }), label: "Row Sort", labelPlacement: "end" }), e(i, { control: e(l, { checked: v.includeHidden, onChange: () => C((e2) => ({ ...e2, includeHidden: !e2.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
d as SortDialog,
|
|
24
|
+
d as default
|
|
25
|
+
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
6
6
|
*/
|
|
7
|
-
import { jsx as e, jsxs as
|
|
8
|
-
import { memo as
|
|
7
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
|
+
import { memo as a, useMemo as n, useState as l, useCallback as o } from "react";
|
|
9
9
|
import { Box as i } from "@mui/material";
|
|
10
|
-
import {
|
|
11
|
-
const u = ["Ok", "Cancel"], c =
|
|
12
|
-
const { value: c2 = null, context: m, onOption: g, onValidateOption: x, onDone: f, onUpdate: N, options: y = u, defaultOption: T = y?.[0], cancelOption: O = "Cancel", sx: V, ...h } =
|
|
10
|
+
import { P as r, o as s, NamedInput as d, RangeInput as p } from "./index.mjs";
|
|
11
|
+
const u = ["Ok", "Cancel"], c = a((a2) => {
|
|
12
|
+
const { value: c2 = null, context: m, onOption: g, onValidateOption: x, onDone: f, onUpdate: N, options: y = u, defaultOption: T = y?.[0], cancelOption: O = "Cancel", sx: V, ...h } = a2, v = n(() => m?.getNames().findValidName("Range1"), []), C = n(() => {
|
|
13
13
|
if (!c2) return true;
|
|
14
|
-
}, []), [R, w] = l({ displayText: c2?.getName() ?? v, errorText: null }), [F, D] = l({ displayValue: c2?.getRanges() ?? m?.selection() ?? null, errorText: null }), [I, j] = l(false), B = o(async (e2) => !R.errorText && !F.errorText, [m]), E = r((e2,
|
|
15
|
-
if (!
|
|
14
|
+
}, []), [R, w] = l({ displayText: c2?.getName() ?? v, errorText: null }), [F, D] = l({ displayValue: c2?.getRanges() ?? m?.selection() ?? null, errorText: null }), [I, j] = l(false), B = o(async (e2) => !R.errorText && !F.errorText, [m]), E = r((e2, t2, a3) => {
|
|
15
|
+
if (!t2) {
|
|
16
16
|
let e3 = null;
|
|
17
17
|
C ? e3 = m?.getNames().addReference(R?.displayText, F?.displayValue, false) : ("reference" === c2.getType() && c2.doBatch(() => {
|
|
18
18
|
c2.setName(R?.displayText), c2.setReference(F?.displayValue);
|
|
19
19
|
}, `Edit Named '${R?.displayText}'`), e3 = c2), e3 && (e3.select(), N(e3, C));
|
|
20
20
|
}
|
|
21
|
-
g?.(e2,
|
|
21
|
+
g?.(e2, t2, a3), f?.();
|
|
22
22
|
}, [m, R, F, f, g, T, O, N]), L = r((e2) => {
|
|
23
|
-
let
|
|
23
|
+
let t2 = null;
|
|
24
24
|
try {
|
|
25
25
|
m?.getNames().validateName(e2);
|
|
26
26
|
} catch (e3) {
|
|
27
|
-
|
|
27
|
+
t2 = e3.message;
|
|
28
28
|
}
|
|
29
|
-
w({ displayText: e2, errorText:
|
|
29
|
+
w({ displayText: e2, errorText: t2 });
|
|
30
30
|
}, []), b = r((e2) => {
|
|
31
31
|
c2 && c2.getName().toLowerCase() === e2.toLowerCase() || m?.getNames().validateName(e2);
|
|
32
32
|
}, [m, c2]), k = o((e2) => {
|
|
33
33
|
D({ displayValue: e2 ?? null, errorText: null });
|
|
34
34
|
}, []);
|
|
35
|
-
return e(s, { title: (C ? "Define" : "Edit") + " Range", options: y, onOption: E, onValidateOption: B, defaultOption: T, cancelOption: O, autoFocusSel: ".autoFocus", sx: { width: "460px", ...V }, ...h, children:
|
|
35
|
+
return e(s, { title: (C ? "Define" : "Edit") + " Range", options: y, onOption: E, onValidateOption: B, defaultOption: T, cancelOption: O, autoFocusSel: ".autoFocus", sx: { width: "460px", ...V }, ...h, children: t(i, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(0), rowGap: (e2) => e2.spacing(1), range: "flex", flexDirection: "column" }, children: [e(d, { formName: "name", defaultInput: v, value: R.displayText, onChangeInput: L, onValidate: b, onFocus: (e2) => {
|
|
36
36
|
I || e2.target?.select(), j(true);
|
|
37
37
|
} }), e(p, { formName: "range", value: F.displayValue, onChangeInput: k, resolvedAddress: m.getNames().getRanges.bind(m.getNames()), onFocus: (e2) => {
|
|
38
38
|
I || e2.target?.select(), j(true);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
6
6
|
*/
|
|
7
7
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
8
|
-
import { memo as
|
|
9
|
-
import { Box as i, FormControlLabel as
|
|
10
|
-
import {
|
|
11
|
-
const d = ["Ok", "Cancel"], m =
|
|
12
|
-
const { tableOptions: m2, context: g, onOption: u, onValidateOption: f, onDone: h, options: x = d, defaultOption: O = x?.[0], cancelOption: b = "Cancel", sx: C, ...D } =
|
|
8
|
+
import { memo as t, useState as o, useCallback as a } from "react";
|
|
9
|
+
import { Box as i, FormControlLabel as l, Checkbox as s } from "@mui/material";
|
|
10
|
+
import { P as r, o as p, RangeInput as c } from "./index.mjs";
|
|
11
|
+
const d = ["Ok", "Cancel"], m = t((t2) => {
|
|
12
|
+
const { tableOptions: m2, context: g, onOption: u, onValidateOption: f, onDone: h, options: x = d, defaultOption: O = x?.[0], cancelOption: b = "Cancel", sx: C, ...D } = t2, [N, T] = o(false), [j, k] = o(() => m2?.hasHeader ?? false), [v, w] = o(() => m2?.ranges ?? null), y = r((e2) => {
|
|
13
13
|
const n2 = { ...m2, hasHeader: j, ranges: v };
|
|
14
14
|
u?.(e2, e2 === b, e2 === O), h?.({ option: e2, tableOptions: n2 });
|
|
15
|
-
}, [h, u, O, b, j, v, m2]), F =
|
|
15
|
+
}, [h, u, O, b, j, v, m2]), F = a(async (e2, n2) => null, []);
|
|
16
16
|
return e(p, { title: "Insert Table", options: x, onDone: y, onValidateOption: F, defaultOption: O, cancelOption: b, autoFocusSel: ".range-input input", sx: { width: "360px", ...C }, ...D, children: n(i, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(0), rowGap: (e2) => e2.spacing(1), display: "flex", flexDirection: "column" }, children: [e(c, { formName: "range", value: v, onChangeInput: (e2) => w(e2), resolvedAddress: g.getNames().getRanges.bind(g.getNames()), onFocus: (e2) => {
|
|
17
17
|
N || e2.target?.select(), T(true);
|
|
18
|
-
} }), e(
|
|
18
|
+
} }), e(l, { control: e(s, { checked: j, onChange: () => k(!j) }), label: "Table has headers", labelPlacement: "end" })] }) });
|
|
19
19
|
});
|
|
20
20
|
export {
|
|
21
21
|
m as TableNewDialog,
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
6
6
|
*/
|
|
7
7
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
8
8
|
import { Box as n, TextField as i, InputAdornment as r, IconButton as o, FormControlLabel as a, Checkbox as l, Typography as d, TableCell as s, DialogContent as c } from "@mui/material";
|
|
9
|
-
import {
|
|
9
|
+
import { e as h, T as p, a1 as m, H as u } from "./index.mjs";
|
|
10
10
|
import g, { useState as f, useMemo as x, useEffect as b } from "react";
|
|
11
11
|
import y from "clsx";
|
|
12
12
|
import { alpha as w, getOverlayAlpha as R, styled as C } from "@mui/material/styles/index.js";
|
|
13
13
|
import { Close as k } from "@mui/icons-material";
|
|
14
14
|
import { AutoSizer as v, Table as $, Column as D } from "react-virtualized";
|
|
15
|
-
const z = "ReactVirtualizedDemo-flexContainer",
|
|
15
|
+
const z = "ReactVirtualizedDemo-flexContainer", H = "ReactVirtualizedDemo-tableRow", I = "ReactVirtualizedDemo-tableRowHover", K = "ReactVirtualizedDemo-tableCell", S = "ReactVirtualizedDemo-noClick";
|
|
16
16
|
class N extends g.PureComponent {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments), this.getRowClassName = ({ index: e2 }) => {
|
|
19
19
|
const { onRowClick: t2 } = this.props;
|
|
20
|
-
return y(
|
|
20
|
+
return y(H, z, { [I]: -1 !== e2 && null != t2 });
|
|
21
21
|
}, this.cellRenderer = ({ cellData: e2, columnIndex: n2, dataKey: i2 }) => {
|
|
22
22
|
const { columns: r2, rowHeight: o2, onRowClick: a2 } = this.props;
|
|
23
23
|
let l2 = e2, d2 = { height: o2, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px" };
|
|
24
|
-
return "shortcut" === i2 ? l2 = m(e2) : "description" === i2 && (d2 = { ...d2, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), t(s, { component: "div", className: y(
|
|
24
|
+
return "shortcut" === i2 ? l2 = m(e2) : "description" === i2 && (d2 = { ...d2, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), t(s, { component: "div", className: y(K, z, { [S]: null == a2 }), variant: "body", style: d2, align: null != n2 && r2[n2].numeric ? "right" : "left", children: l2 });
|
|
25
25
|
}, this.headerRenderer = ({ label: e2, columnIndex: n2 }) => {
|
|
26
26
|
const { headerHeight: i2, columns: r2 } = this.props;
|
|
27
|
-
return t(s, { component: "div", className: y(
|
|
27
|
+
return t(s, { component: "div", className: y(K, z, S), variant: "head", sx: { height: i2, backgroundColor: (e3) => e3.palette.grey[300] }, align: r2[n2].numeric ? "right" : "left", children: t("span", { children: e2 }) });
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
static {
|
|
@@ -38,7 +38,7 @@ class N extends g.PureComponent {
|
|
|
38
38
|
}) }) });
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const T = C(N)(({ theme: e2 }) => ({ "& .ReactVirtualized__Table__headerRow": { ..."rtl" === e2.direction && { paddingLeft: "0 !important" }, ..."rtl" !== e2.direction && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${z}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${
|
|
41
|
+
const T = C(N)(({ theme: e2 }) => ({ "& .ReactVirtualized__Table__headerRow": { ..."rtl" === e2.direction && { paddingLeft: "0 !important" }, ..."rtl" !== e2.direction && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${z}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${H}`]: { cursor: "pointer" }, [`& .${I}`]: { "&:hover:not([disabled])": { backgroundColor: e2.palette.grey[200] } }, [`& .${K}`]: { flex: 1 }, [`& .${S}`]: { cursor: "initial" } }));
|
|
42
42
|
function _(s2) {
|
|
43
43
|
const { commands: c2, ...m2 } = s2, [u2, g2] = f(false), [y2, C2] = f(""), v2 = x(() => {
|
|
44
44
|
let e2 = c2.getAllCommands();
|
|
@@ -58,22 +58,22 @@ function _(s2) {
|
|
|
58
58
|
D2(new e2.default(v2, { threshold: 0, ignoreLocation: true, keys: ["label", "description"] }));
|
|
59
59
|
});
|
|
60
60
|
}, [v2]);
|
|
61
|
-
const [z2,
|
|
61
|
+
const [z2, H2] = f(v2), I2 = y2.length > 0 && 0 === z2.length;
|
|
62
62
|
b(() => {
|
|
63
63
|
$2 && h.debounce(() => {
|
|
64
|
-
if (0 === y2.trim().length) return void
|
|
64
|
+
if (0 === y2.trim().length) return void H2(v2);
|
|
65
65
|
const e2 = $2.search(y2.trim()), t2 = new Array(e2.length);
|
|
66
66
|
for (let n2 = 0; n2 < e2.length; n2++) t2[n2] = e2[n2].item;
|
|
67
|
-
|
|
67
|
+
H2(t2);
|
|
68
68
|
}, 90)();
|
|
69
69
|
}, [$2, y2]);
|
|
70
|
-
return e(n, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...m2, children: [e(n, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (e2) => e2.spacing(2), color: (e2) => e2.palette.text.secondary }, children: [t(i, { InputProps: { sx: { backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` }, inputProps: { className: "input", autoFocus: true, spellCheck: false, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1) } }, endAdornment: t(r, { sx: { opacity: y2.length > 0 ? 1 : 0, display: y2.length > 0 ? "flex" : "none" }, position: "end", children: t(o, { "aria-label": "clear search", onClick: () => C2(""), edge: "end", children: t(k, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) =>
|
|
70
|
+
return e(n, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...m2, children: [e(n, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (e2) => e2.spacing(2), color: (e2) => e2.palette.text.secondary }, children: [t(i, { InputProps: { sx: { backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` }, inputProps: { className: "input", autoFocus: true, spellCheck: false, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1) } }, endAdornment: t(r, { sx: { opacity: y2.length > 0 ? 1 : 0, display: y2.length > 0 ? "flex" : "none" }, position: "end", children: t(o, { "aria-label": "clear search", onClick: () => C2(""), edge: "end", children: t(k, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) => I2 ? `${e2.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e2) => I2 ? `${e2.palette.error.main} !important` : void 0 } }, value: y2, onChange: (e2) => {
|
|
71
71
|
C2(e2.target.value);
|
|
72
72
|
}, onKeyDown: (e2) => {
|
|
73
73
|
e2.which === p.Escape && y2.length > 0 && (C2(""), e2.stopPropagation(), e2.preventDefault());
|
|
74
74
|
}, onContextMenu: (e2) => {
|
|
75
75
|
e2.stopPropagation();
|
|
76
|
-
} }), t(a, { sx: { flex: "1 1 60%" }, control: t(l, { checked: u2, onChange: () => g2(!u2) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), t(n, { sx: { flex: "1 1 100%", borderRadius: (e2) => `${e2.shape.borderRadius}px`, border: (e2) => `solid ${e2.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (e2) => e2.palette.background.paper, backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` } }, children: t(T, { rowCount: z2.length, rowGetter: (e2) => z2[e2.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), t(n, { sx: { display: "flex", flexShrink: "0", paddingLeft: (e2) => e2.spacing(1), paddingTop: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: t(d, { noWrap: true, component: "div", sx: { color: (e2) =>
|
|
76
|
+
} }), t(a, { sx: { flex: "1 1 60%" }, control: t(l, { checked: u2, onChange: () => g2(!u2) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), t(n, { sx: { flex: "1 1 100%", borderRadius: (e2) => `${e2.shape.borderRadius}px`, border: (e2) => `solid ${e2.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (e2) => e2.palette.background.paper, backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` } }, children: t(T, { rowCount: z2.length, rowGetter: (e2) => z2[e2.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), t(n, { sx: { display: "flex", flexShrink: "0", paddingLeft: (e2) => e2.spacing(1), paddingTop: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: t(d, { noWrap: true, component: "div", sx: { color: (e2) => I2 ? e2.palette.error.main : e2.palette.text.secondary }, children: `${0 === z2.length ? "No" : z2.length} shortcut key${1 === z2.length ? "" : "s"}${y2.length > 0 ? " found" : ""}` }) })] });
|
|
77
77
|
}
|
|
78
78
|
const P = (e2) => {
|
|
79
79
|
const { title: n2 = "Shortcut Keys", commands: i2, sx: r2, ...o2 } = e2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { Workbook as e, IRange as t } from "@sheetxl/sdk";
|
|
8
8
|
const n = async (e2, t2) => {
|
|
9
|
-
const { trimLeadingBlankRow: n2 = true, trimLeadingBlankColumn: r2 = true, excludeHidden: o = false, sheetKey: s = null, papaParseConfig: a = {} } = t2 || {},
|
|
9
|
+
const { trimLeadingBlankRow: n2 = true, trimLeadingBlankColumn: r2 = true, excludeHidden: o = false, sheetKey: s = null, papaParseConfig: a = {} } = t2 || {}, l = await import("./DQv4OOMysHEA_ih5.mjs").then((e3) => e3.p);
|
|
10
10
|
if (!e2) throw new Error("workbook must be specified");
|
|
11
|
-
let
|
|
12
|
-
if (null === s ?
|
|
11
|
+
let i = null;
|
|
12
|
+
if (null === s ? i = e2.getSelectedSheet() : "number" == typeof s ? i = e2.getSheets().search()[s] : "string" == typeof s && (i = e2.getSheets().getByName(s)), !i) throw new Error("invalid sheetKey specified");
|
|
13
13
|
let c = null;
|
|
14
14
|
const d = [];
|
|
15
|
-
let p = null, u =
|
|
15
|
+
let p = null, u = i.getUsedRange({ excludeHidden: o });
|
|
16
16
|
if (!u) throw new Error("Nothing to export");
|
|
17
17
|
if (!n2 || !r2) {
|
|
18
18
|
const e3 = n2 ? u.getRowStart() : 0, t3 = r2 ? u.getColumnStart() : 0;
|
|
@@ -24,10 +24,10 @@ const n = async (e2, t2) => {
|
|
|
24
24
|
const o2 = r3.toTextUnformatted() ?? "";
|
|
25
25
|
p.push(o2);
|
|
26
26
|
}, { includeEmpty: true, address: null }), p && d.push(p);
|
|
27
|
-
const f = { ...a }, g =
|
|
27
|
+
const f = { ...a }, g = l.unparse(d, f);
|
|
28
28
|
return new TextEncoder().encode(g);
|
|
29
29
|
}, r = async (n2, r2) => {
|
|
30
|
-
const { papaParseConfig: o, setValuesOptions: s, constructorOptions: a } = r2 ?? {},
|
|
30
|
+
const { papaParseConfig: o, setValuesOptions: s, constructorOptions: a } = r2 ?? {}, l = await import("./DQv4OOMysHEA_ih5.mjs").then((e2) => e2.p), i = new TextDecoder().decode(n2);
|
|
31
31
|
let c = -1;
|
|
32
32
|
const d = new e(a), p = d.getSelectedSheet().getEntireRange().startIncrementalUpdates({ orientation: t.Orientation.Row }), u = r2?.onProgress;
|
|
33
33
|
let f = 0;
|
|
@@ -38,7 +38,7 @@ const n = async (e2, t2) => {
|
|
|
38
38
|
let r3 = e2 ?? "";
|
|
39
39
|
return p.pushAt(c, n3, r3), f++, f % 1e5 == 0 && u?.(f), e2;
|
|
40
40
|
} };
|
|
41
|
-
return
|
|
41
|
+
return l.parse(i, g).data, p.apply({ textParser: true, ...s }), d;
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
44
|
r as fromBufferCSV,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
@@ -8,7 +8,7 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
8
8
|
import { memo as e, useMemo as o, useState as a, useCallback as i } from "react";
|
|
9
9
|
import { alpha as s, getOverlayAlpha as l } from "@mui/material/styles/index.js";
|
|
10
10
|
import { Box as r, FormControl as p, TextField as d } from "@mui/material";
|
|
11
|
-
import {
|
|
11
|
+
import { P as c, o as u } from "./index.mjs";
|
|
12
12
|
const g = ["Ok", "Cancel"], m = e((e2) => {
|
|
13
13
|
const { initialHyperlink: m2 = null, initialDisplay: f = null, onUpdateHyperlink: x, context: h, onOption: y, onValidateOption: T, onDone: k, options: C = g, defaultOption: O = C?.[0], cancelOption: P = "Cancel", sx: b, ...D } = e2, F = o(() => null !== (m2 ?? h?.()?.getHyperlink()), []), I = o(() => {
|
|
14
14
|
let t2 = null, n2 = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
@@ -8,34 +8,35 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
8
8
|
import { memo as o, useState as a, useCallback as n, useEffect as i, useMemo as r } from "react";
|
|
9
9
|
import { alpha as l, getOverlayAlpha as s } from "@mui/material/styles/index.js";
|
|
10
10
|
import { Box as p, FormControl as c, InputLabel as d, Select as u, TextField as m, Typography as g, MenuItem as f } from "@mui/material";
|
|
11
|
-
import {
|
|
11
|
+
import { NumberFormat as y } from "@sheetxl/sdk";
|
|
12
|
+
import { P as x, T as h, o as C } from "./index.mjs";
|
|
12
13
|
const v = ["Ok", "Cancel"], b = o((o2) => {
|
|
13
|
-
const { initialValue: b2, context: T, onOption: k, onValidateOption: O, onInputOption: w, onDone: F, options: P = v, defaultOption: S = P?.[0], cancelOption: $ = "Cancel", sx: D, ...I } = o2, [j, V] = a(b2), [N, z] = a(false), B = n(async (e2, t2) => true, []), L =
|
|
14
|
+
const { initialValue: b2, context: T, onOption: k, onValidateOption: O, onInputOption: w, onDone: F, options: P = v, defaultOption: S = P?.[0], cancelOption: $ = "Cancel", sx: D, ...I } = o2, [j, V] = a(b2), [N, z] = a(false), B = n(async (e2, t2) => true, []), L = x(async (e2) => {
|
|
14
15
|
w?.(j, e2), k?.(e2, e2 === $, e2 === S), F?.();
|
|
15
|
-
}, [j, w, F, k, $, S]), M =
|
|
16
|
-
if (e2.keyCode ===
|
|
16
|
+
}, [j, w, F, k, $, S]), M = x(async (e2) => {
|
|
17
|
+
if (e2.keyCode === h.Enter) {
|
|
17
18
|
false !== await B?.(j, null) && L(S);
|
|
18
19
|
}
|
|
19
|
-
}, [j, L]), R =
|
|
20
|
+
}, [j, L]), R = x((e2) => {
|
|
20
21
|
V(e2.target.value), B?.(e2.target.value, null);
|
|
21
|
-
}, [O]), W =
|
|
22
|
+
}, [O]), W = x(async (e2) => {
|
|
22
23
|
let t2 = await Promise.resolve(O?.(e2));
|
|
23
24
|
try {
|
|
24
25
|
false !== t2 && (t2 = await Promise.resolve(B?.(j, e2)) ?? true);
|
|
25
26
|
} catch (e3) {
|
|
26
27
|
}
|
|
27
28
|
return t2 ?? true;
|
|
28
|
-
}, [O]), [E, G] = a(
|
|
29
|
+
}, [O]), [E, G] = a(y.Styles.lookupStyle(j).formatType ?? y.Type.Custom);
|
|
29
30
|
i(() => {
|
|
30
|
-
G(
|
|
31
|
+
G(y.Styles.lookupStyle(j).formatType ?? y.Type.Custom);
|
|
31
32
|
}, [j]);
|
|
32
33
|
const H = r(() => {
|
|
33
|
-
const t2 =
|
|
34
|
-
return a2.push(o3(
|
|
34
|
+
const t2 = y.Styles.lookupPrimary(), o3 = (t3) => e(f, { value: t3, children: t3 }, t3), a2 = Object.keys(t2).map((e2) => o3(t2[e2].formatType));
|
|
35
|
+
return a2.push(o3(y.Type.Custom)), a2;
|
|
35
36
|
}, []), K = n((e2) => {
|
|
36
37
|
const t2 = e2.target.value;
|
|
37
38
|
G(t2);
|
|
38
|
-
const o3 =
|
|
39
|
+
const o3 = y.Styles.lookupDefault(t2);
|
|
39
40
|
o3 && V(o3);
|
|
40
41
|
}, []), q = r(() => {
|
|
41
42
|
const e2 = T();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
@@ -8,53 +8,53 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
8
8
|
import { memo as o, useState as n, useRef as a, useReducer as i, useMemo as l } from "react";
|
|
9
9
|
import { useMeasure as s } from "react-use";
|
|
10
10
|
import { DialogContent as r, Box as c } from "@mui/material";
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
13
|
-
const { title:
|
|
11
|
+
import { R as d, Y as g, $ as m, P as p, H as h, NamedInput as u, RangeInput as x, p as f, TableStyleOptionsPanel as y, TableStylePreview as b, Z as w, q as S, t as C, a0 as N } from "./index.mjs";
|
|
12
|
+
const v = o((o2) => {
|
|
13
|
+
const { title: v2, onHide: R, autoFocusSel: T = ".range-input input", context: F, notifier: D = d, command: H, commands: B, ...I } = o2, [P, j] = n(false), [z, L] = n(false), O = a(null), [E, A] = i((e2) => e2 + 1, 0), [M, { width: W }] = s();
|
|
14
14
|
g(H);
|
|
15
|
-
const
|
|
16
|
-
m(
|
|
17
|
-
Z(
|
|
15
|
+
const q = F ?? H.context(), V = q.table(), [Y, Z] = n(() => V ? q.getNames().getRanges(V.getRange()) : null), $ = l(() => V?.getName() ?? "", [V]);
|
|
16
|
+
m(q.table(), { onAnchorCoordsChange(e2) {
|
|
17
|
+
Z(q.getNames().getRanges(e2.getRange()));
|
|
18
18
|
}, onProtectedChange(e2) {
|
|
19
19
|
A();
|
|
20
20
|
} });
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
let
|
|
27
|
-
return
|
|
21
|
+
const k = p((e2) => {
|
|
22
|
+
q?.table().setName(e2);
|
|
23
|
+
}, [q]), G = p((e2) => {
|
|
24
|
+
q?.table().resize(e2.at(0));
|
|
25
|
+
}, [q]);
|
|
26
|
+
let J = null;
|
|
27
|
+
return q.table() || (J = e("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", opacity: 1, display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center", boxSizing: "border-box" }, children: e("div", { children: "No table selected" }) })), e(h, { title: v2 ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, refWindow: O, onHide: R, onFocus: () => j(true), onBlur: (e2) => {
|
|
28
28
|
O?.current?.contains(e2.relatedTarget) || j(false);
|
|
29
|
-
}, PaperProps: { elevation: P ? 3 : 1 }, ...I, children: t(r, { dividers: true, ref: M, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, children: [t(c, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity:
|
|
30
|
-
|
|
31
|
-
}, disabled:
|
|
29
|
+
}, PaperProps: { elevation: P ? 3 : 1 }, ...I, children: t(r, { dividers: true, ref: M, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, children: [t(c, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: q.table() ? 1 : 0 }, children: [e(c, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: e(c, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2) }, children: t(c, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [e(u, { formName: "name", defaultInput: $, value: V?.getName() ?? "No table", onChangeInput: k, onValidate: (e2) => {
|
|
30
|
+
V && V.getName().toLowerCase() === e2.toLowerCase() || q?.getNames().validateName(e2);
|
|
31
|
+
}, disabled: V?.isProtected() ?? true, onFocus: (e2) => {
|
|
32
32
|
z || e2.target?.select(), L(true);
|
|
33
|
-
} }), e(
|
|
33
|
+
} }), e(x, { formName: "range", value: Y, onChangeInput: G, resolvedAddress: q.getNames().getRanges.bind(q.getNames()), disabled: V?.isProtected() ?? true, onFocus: (e2) => {
|
|
34
34
|
z || e2.target?.select(), L(true);
|
|
35
|
-
} })] }) }) }), t(c, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(0.5), marginTop: (e2) => e2.spacing(1) }, children: [e(
|
|
36
|
-
|
|
37
|
-
}, showHeaderRow:
|
|
35
|
+
} })] }) }) }), t(c, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(0.5), marginTop: (e2) => e2.spacing(1) }, children: [e(f, { orientation: "horizontal", sx: { marginTop: (e2) => e2.spacing(1.5), marginBottom: (e2) => e2.spacing(0.75) } }), e(y, { disabled: V?.isProtected(), styleOptions: V?.getStyleOptions() ?? null, onStyleOptionsChange: (e2) => {
|
|
36
|
+
V.updateStyleOptions(e2);
|
|
37
|
+
}, showHeaderRow: V?.getShowHeaders(), onShowHeaderRowChange: (e2) => {
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
V.setShowHeaders(e2);
|
|
40
40
|
} catch (e3) {
|
|
41
41
|
D.showError(e3);
|
|
42
42
|
}
|
|
43
|
-
}, showTotalRow:
|
|
43
|
+
}, showTotalRow: V?.getShowTotals(), onShowTotalRowChange: (e2) => {
|
|
44
44
|
try {
|
|
45
|
-
|
|
45
|
+
V.setShowTotals(e2);
|
|
46
46
|
} catch (e3) {
|
|
47
47
|
D.showError(e3);
|
|
48
48
|
}
|
|
49
|
-
}, showFilterButton:
|
|
49
|
+
}, showFilterButton: V?.getFilter() ? V.getShowFilterButton() : null, onShowFilterButtonChange: (e2) => {
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
V.setShowFilterButton(e2);
|
|
52
52
|
} catch (e3) {
|
|
53
53
|
D.showError(e3);
|
|
54
54
|
}
|
|
55
|
-
} }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(
|
|
55
|
+
} }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(b, { table: V, styles: q.styles(), bodyStyle: q.bodyStyle(), cellHeight: 30, isLive: true }) }), e(f, { orientation: "horizontal" }), t(c, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [e(w, { variant: C.Menuitem, command: B.getCommand("convertTableToRange"), commandState: V, icon: S(e(N, {})) }), e(w, { variant: C.Menuitem, commandState: V, command: B.getCommand("deleteTable"), icon: S(e(N, {})) })] })] })] }), J] }) });
|
|
56
56
|
});
|
|
57
57
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
v as TableDetailsWindow,
|
|
59
|
+
v as default
|
|
60
60
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.5
|
|
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.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { Workbook as e } from "@sheetxl/sdk";
|
|
8
8
|
const t = async (e2, t2) => {
|
|
9
9
|
const n2 = await e2.toJSON(), r = t2?.whiteSpace ?? 0;
|
|
10
10
|
let o;
|
|
@@ -14,50 +14,50 @@ const t = async (e2, t2) => {
|
|
|
14
14
|
const r3 = t3 * e4;
|
|
15
15
|
return void 0 === n3[r3] && (n3[r3] = " ".repeat(r3)), n3[r3];
|
|
16
16
|
}
|
|
17
|
-
return function e4(t4, n4, o2,
|
|
17
|
+
return function e4(t4, n4, o2, s2) {
|
|
18
18
|
if (null == t4 || "object" != typeof t4) return JSON.stringify(t4);
|
|
19
|
-
const
|
|
19
|
+
const i2 = r2(n4), c = r2(n4 + 1);
|
|
20
20
|
if (Array.isArray(t4)) {
|
|
21
21
|
const r3 = t4.length;
|
|
22
22
|
if (0 === r3) return "[]";
|
|
23
23
|
if (0 !== o2) return JSON.stringify(t4);
|
|
24
|
-
let
|
|
25
|
-
for (let
|
|
26
|
-
return
|
|
24
|
+
let s3 = "[\n";
|
|
25
|
+
for (let i3 = 0; i3 < r3; i3++) s3 += c + e4(t4[i3], n4 + 1, o2 + 1, true), i3 < r3 - 1 && (s3 += ",\n");
|
|
26
|
+
return s3 += "\n" + i2 + "]", s3;
|
|
27
27
|
}
|
|
28
28
|
const f = Object.keys(t4), a = f.length;
|
|
29
29
|
if (0 === a) return "{}";
|
|
30
30
|
if (!(o2 < 2)) return JSON.stringify(t4);
|
|
31
31
|
let u = "{\n";
|
|
32
|
-
|
|
32
|
+
s2 || (o2 = 0);
|
|
33
33
|
for (let r3 = 0; r3 < a; r3++) {
|
|
34
|
-
const
|
|
35
|
-
u += c + JSON.stringify(
|
|
34
|
+
const s3 = f[r3];
|
|
35
|
+
u += c + JSON.stringify(s3) + ": " + e4(t4[s3], n4 + 1, o2, false), r3 < a - 1 && (u += ",\n");
|
|
36
36
|
}
|
|
37
|
-
return u += "\n" +
|
|
37
|
+
return u += "\n" + i2 + "}", u;
|
|
38
38
|
}(e3, 0, 0, false);
|
|
39
39
|
}(n2, r);
|
|
40
|
-
let
|
|
41
|
-
const
|
|
42
|
-
return
|
|
40
|
+
let s = new TextEncoder().encode(o);
|
|
41
|
+
const i = t2?.compress ?? true;
|
|
42
|
+
return i && (s = await async function(e3, t3 = "gzip") {
|
|
43
43
|
const n3 = new ReadableStream({ start(t4) {
|
|
44
44
|
t4.enqueue(e3), t4.close();
|
|
45
45
|
} }), r2 = new CompressionStream(t3), o2 = n3.pipeThrough(r2);
|
|
46
46
|
return (await new Response(o2).blob()).arrayBuffer();
|
|
47
|
-
}(
|
|
47
|
+
}(s, "string" == typeof i ? i : void 0)), s;
|
|
48
48
|
}, n = async (t2, n2) => {
|
|
49
49
|
let r = t2;
|
|
50
50
|
(function(e2) {
|
|
51
51
|
if (e2.byteLength < 4) return false;
|
|
52
52
|
const t3 = new Uint8Array(e2), n3 = { gzip: [31, 139], zip: [80, 75, 3, 4], bz2: [66, 90, 104], br: [206, 178, 207, 129] }, r2 = Object.keys(n3);
|
|
53
53
|
for (let e3 = 0; e3 < r2.length; e3++) {
|
|
54
|
-
const o2 = r2[e3],
|
|
55
|
-
let
|
|
56
|
-
for (let e4 = 0; e4 <
|
|
57
|
-
|
|
54
|
+
const o2 = r2[e3], s2 = n3[o2];
|
|
55
|
+
let i2 = true;
|
|
56
|
+
for (let e4 = 0; e4 < s2.length; e4++) if (t3[e4] !== s2[e4]) {
|
|
57
|
+
i2 = false;
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
|
-
if (
|
|
60
|
+
if (i2) return o2;
|
|
61
61
|
}
|
|
62
62
|
return false;
|
|
63
63
|
})(r) && (r = await async function(e2, t3 = "gzip") {
|
|
@@ -65,8 +65,8 @@ const t = async (e2, t2) => {
|
|
|
65
65
|
return (await new Response(o2).blob()).arrayBuffer();
|
|
66
66
|
}(r));
|
|
67
67
|
let o = new TextDecoder().decode(r);
|
|
68
|
-
const
|
|
69
|
-
return new e(
|
|
68
|
+
const s = JSON.parse(o), i = { ...n2?.constructorOptions ?? {}, json: s };
|
|
69
|
+
return new e(i);
|
|
70
70
|
};
|
|
71
71
|
export {
|
|
72
72
|
n as fromBufferJSON,
|