@sheetxl/studio-mui 0.3.3 → 0.3.4
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/B1DCwLSJMTHSgdcP.cjs +6 -0
- package/browser/cjs/{YpWYrg3Eysqtr9aZ.cjs → BHC1oqfBYh7Xmx_G.cjs} +1 -1
- package/browser/cjs/{DAyHZyXZGsDWfbyd.cjs → BMUOX4KpmBu6GH8Q.cjs} +1 -1
- package/browser/cjs/BsXtNRaOhnjlXTcA.cjs +6 -0
- package/browser/cjs/{scolQa-PxnIvyiDb.cjs → Bwk2L5ydEvoRIisp.cjs} +1 -1
- package/browser/cjs/{DSNu0kgR1_X-nK_Z.cjs → C0hVi0a9d9Sh_FgO.cjs} +2 -2
- package/browser/cjs/{B0-aLTQ0dAlPdRnQ.cjs → C0sbobSHWURMB8m0.cjs} +3 -3
- package/browser/cjs/{C9TJkm0tBPD04idM.cjs → C1GrJth6YhBZDgvq.cjs} +2 -2
- package/browser/cjs/{D8qPzQKLyGrgGg08.cjs → CB6TEerfGxS24WUy.cjs} +2 -2
- package/browser/cjs/CBIj9rqxh2ze9ckF.cjs +6 -0
- package/browser/cjs/CkdT8JSum0WmJ7Tn.cjs +87 -0
- package/browser/cjs/CtKfykOLBwpCtsPd.cjs +11 -0
- package/browser/cjs/D9t4mfnS94EkWCXT.cjs +6 -0
- package/browser/cjs/{D69p4DRnZE5Oa52x.cjs → DEa9UMmpvbiH_Dxm.cjs} +1 -1
- package/browser/cjs/{CEx5ZMI8c4HYrxzW.cjs → DY0yxZSYTOZvtIkB.cjs} +1 -1
- package/browser/cjs/DbczL66CNJYzHHvr.cjs +12 -0
- package/browser/cjs/{BL1st_QvuF5m8AaJ.cjs → DfPqfTiRAZ9i5RVA.cjs} +2 -2
- package/browser/cjs/{BlBsVySC7wICKf3b.cjs → Dpc0lG73ekHkTPOA.cjs} +2 -2
- package/browser/cjs/{BH160EggM2K8qaSr.cjs → DzdnNJvBx5lkLTW-.cjs} +1 -1
- package/browser/cjs/EPoWWLrVLfRMaxvD.cjs +6 -0
- package/browser/cjs/_JBLryXFRVS5vFVX.cjs +12 -0
- package/browser/cjs/{CPKZW7FfYlmkNYbE.cjs → edAxlEEqzjJ_PaBv.cjs} +2 -2
- package/browser/cjs/{Bh785l7WNSK7G3hU.cjs → f1m-IERoDbQdUMNJ.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{CP_eU6V1jkcP4WtQ.cjs → j8ba84pFnKx2xWvW.cjs} +2 -2
- package/browser/cjs/{BQyDL6TxMqPmkugH.cjs → xRKATlLPCXjQqLyR.cjs} +1 -1
- package/browser/esm/{DpJqkBHKECEClAah.mjs → B3E24eA0KrqZGcc6.mjs} +6 -6
- package/browser/esm/{C8eXD0cT7ZPGYNCl.mjs → B7spDz0f3MErGle0.mjs} +21 -20
- package/browser/esm/{DTW06ga7BIWfkpc3.mjs → BQSJPoCxw_CbM_GB.mjs} +11 -10
- package/browser/esm/{QNCUQO7a-oixacNG.mjs → C0HMqAubZ7789bne.mjs} +1 -1
- package/browser/esm/{B1fKMAH-vx3TJ0ii.mjs → C72RDqmHBctKx6yu.mjs} +1 -1
- package/browser/esm/{B9IRFHtuYz6_J4Sj.mjs → CSEDlIO1VyJbsJUh.mjs} +8 -8
- package/browser/esm/{BLiRvSBEJD-6dWH0.mjs → Ca8SXunZNcPT82kM.mjs} +1 -1
- package/browser/esm/{DJVGX60ly4BfiFse.mjs → Cbj_GBiwqMbV7xNp.mjs} +44 -43
- package/browser/esm/Cdr3G0s5DSG6bX6w.mjs +52 -0
- package/browser/esm/{5uqs7KjiX3pi6cd5.mjs → CoPf1k9QR8u7c9dJ.mjs} +10 -10
- package/browser/esm/{BXvDIYhOIHqmZQQo.mjs → CyUxX9cLgslryjv5.mjs} +1 -1
- package/browser/esm/{CE3LjR3RfccnMUQt.mjs → D7kxhKOLn3UAkGzE.mjs} +13 -13
- package/browser/esm/{PbEXrCdkQc02gfVZ.mjs → DGIZQy_4rgYfRKUt.mjs} +10 -10
- package/browser/esm/{BVjzMl2EkoD1ceqn.mjs → DJmEZGVO4DnLsMSK.mjs} +7 -7
- package/browser/esm/{BIQXdDApQqsa7WWH.mjs → DTY6o1fHyy7Ldm2E.mjs} +1 -1
- package/browser/esm/DhuuaOVgVDtHsSft.mjs +1467 -0
- package/browser/esm/{q1cTyqrb2yKNSDq5.mjs → Dig0J4i2Urjl9Z--.mjs} +170 -169
- package/browser/esm/{DrzfnYtbTkZ0Vztm.mjs → DmqNGi-j-G64Ah3R.mjs} +2 -2
- package/browser/esm/{BeMVD9uqSXo5o9U7.mjs → DnH6tB6PvfbWK92p.mjs} +13 -13
- package/browser/esm/{CTdZQdi5BoNPu7rZ.mjs → Sg5ukHMhDKaJmwC5.mjs} +65 -65
- package/browser/esm/{BCiGYy5wMbcNSF3g.mjs → TfEcJxbuvenMTWzb.mjs} +1 -1
- package/browser/esm/{0qppnWkLyeMGOizg.mjs → buSI99ehYQ3RDGh9.mjs} +1 -1
- package/browser/esm/index.mjs +74 -73
- package/browser/esm/{Dy7xNyqd4jfUcj2t.mjs → n91lwJODGYpl_0sb.mjs} +1 -1
- package/browser/esm/{B0k5xuPgYO9B-vto.mjs → oJzTpcQBF382AsoK.mjs} +16 -16
- package/browser/esm/tEvhefgL1pPAbBne.mjs +19828 -0
- package/licenses/dependencies.txt +156 -178
- package/node/esm/{BiiNcUkTIcWxOabS.mjs → B794OzAyQ2S3DUvE.mjs} +2 -2
- package/node/esm/{tk69oRoeZHf4vk1z.mjs → B9eTznHjWdKEfnmd.mjs} +13 -13
- package/node/esm/{CZlpZhqzgcRkv_bX.mjs → BA_RIYlnXvTDRdhy.mjs} +9 -9
- package/node/esm/{BnbhKW27rQ185mOb.mjs → BBUuSB5DBjPGuwXm.mjs} +2 -2
- package/node/esm/{Br_lQeehvACsDkzu.mjs → BPAWh9TN2AA_qg8Q.mjs} +13 -12
- package/node/esm/{Ro_fz9s3_2DHfiE-.mjs → BWxdcvg2Tp0Ysth3.mjs} +1 -1
- package/node/esm/{zQ0ozpm04cC2OG19.mjs → BX8ZbzM8Zfe_MtDJ.mjs} +22 -22
- package/node/esm/{DbzTWKX0Q8SGsGA4.mjs → BdXN9t5_NDfrKA2E.mjs} +29 -29
- package/node/esm/CaySzQgftaLFVU-a.mjs +25 -0
- package/node/esm/{CI3U9rEYT3a_Biw5.mjs → CrwtN-27La5MZ9yI.mjs} +1 -1
- package/node/esm/{cT4-HbwV7TBlRjja.mjs → Cug20O7hGugaeSka.mjs} +276 -275
- package/node/esm/{Cd5wE06_wa41Z6Wt.mjs → CwZUEv9f0ywDMV-Z.mjs} +12 -12
- package/node/esm/{CZA-oIez6io5vwv1.mjs → D0fA-N8eAJVD4a_b.mjs} +1 -1
- package/node/esm/{CBlVCA0uvCwlok1v.mjs → D1aU9ydYjq7iFVAr.mjs} +1 -1
- package/node/esm/{6L7TnSLCvI3zabFK.mjs → D2gUK2WMUbCR0-Kw.mjs} +24 -23
- package/node/esm/{C0eiYtK0Lkx4fQGc.mjs → D4HUF8JC55LqF87u.mjs} +86 -85
- package/node/esm/DOC-LvGYDU9FpsDS.mjs +553 -0
- package/node/esm/{D4ydLNNfUH8D41A7.mjs → DXNmGNM6ItcTOZyo.mjs} +1 -1
- package/node/esm/{D6wjzUXEh-Q71uoB.mjs → DY3eG9Mfo_-xsWGD.mjs} +2 -2
- package/node/esm/{BY1cZ8MXawge5drQ.mjs → Djc-gCpBoXNpI6yL.mjs} +2 -2
- package/node/esm/{BvOnjWMz5o3z-qWe.mjs → ILfHRiSFod9A2fKN.mjs} +1 -1
- package/node/esm/Sc5EyWF8aAI0xzOO.mjs +308 -0
- package/node/esm/{fENiUIb3u1Oy7Amv.mjs → dasEgLXLO2WWGkUm.mjs} +8 -8
- package/node/esm/index.mjs +12873 -41673
- 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,24 +1,25 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v } from "react";
|
|
3
3
|
import { Box as O, FormControlLabel as a, Checkbox as s } from "@mui/material";
|
|
4
|
-
import {
|
|
4
|
+
import { Sort as l, IRange as r } from "@sheetxl/sdk";
|
|
5
|
+
import { T as b, a1 as S } from "./tEvhefgL1pPAbBne.mjs";
|
|
5
6
|
/**
|
|
6
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
7
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
7
8
|
*
|
|
8
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
10
11
|
*/
|
|
11
|
-
const
|
|
12
|
-
const [o, t] =
|
|
12
|
+
const D = ({ range: p, options: c, cell: m, onDone: d, ...C }) => {
|
|
13
|
+
const [o, t] = v(c ?? l.DefaultRangeOptions), h = b((e) => {
|
|
13
14
|
let i = null;
|
|
14
15
|
e === "Sort" && (i = { ...c, options: o }), d?.(i);
|
|
15
16
|
}, [o, d, c]);
|
|
16
|
-
return n(
|
|
17
|
+
return n(S, { title: "Sort", options: ["Sort", "Cancel"], onDone: h, ...C, children: u(O, { sx: { display: "flex", flexDirection: "column" }, children: [n(a, { control: n(s, { checked: !o.reverse, onChange: () => t((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.hasHeader, onChange: () => t((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.collatorOptions?.sensitivity === l.CaseSensitiveOptions.sensitivity, onChange: () => t((e) => ({ ...e, collatorOptions: o.collatorOptions?.sensitivity === l.CaseSensitiveOptions.sensitivity ? l.CaseInsensitiveOptions : l.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.orientation === r.Orientation.Row, onChange: () => t((e) => {
|
|
17
18
|
const i = e.orientation === r.Orientation.Row ? r.Orientation.Column : r.Orientation.Row;
|
|
18
|
-
return { ...p.getDefaultSortCriteria(i,
|
|
19
|
+
return { ...p.getDefaultSortCriteria(i, m).options, includeHidden: e.includeHidden, reverse: e.reverse, orientation: i };
|
|
19
20
|
}) }), label: "Row Sort", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.includeHidden, onChange: () => t((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
D as SortDialog,
|
|
24
|
+
D as default
|
|
24
25
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import C, { memo as ne, useState as z, useRef as m, useCallback as re, useEffect as S } from "react";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
3
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* 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.4
|
|
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,23 +1,23 @@
|
|
|
1
1
|
import { jsx as o, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import { memo as D, useState as i, useCallback as N } from "react";
|
|
3
|
-
import { Box as
|
|
4
|
-
import { T as v,
|
|
3
|
+
import { Box as j, FormControlLabel as w, Checkbox as F } from "@mui/material";
|
|
4
|
+
import { T as v, a1 as y, aj as B } from "./tEvhefgL1pPAbBne.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
6
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
7
7
|
*
|
|
8
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
10
10
|
*/
|
|
11
|
-
const H = ["Ok", "Cancel"],
|
|
11
|
+
const H = ["Ok", "Cancel"], L = D((g) => {
|
|
12
12
|
const { tableOptions: e, context: r, onOption: p, onValidateOption: I, onDone: c, options: d = H, defaultOption: t = d?.[0], cancelOption: s = "Cancel", sx: u, ...x } = g, [b, h] = i(!1), [n, f] = i(() => e?.hasHeader ?? !1), [l, O] = i(() => e?.ranges ?? null), C = v((a) => {
|
|
13
13
|
const m = { ...e, hasHeader: n, ranges: l };
|
|
14
14
|
p?.(a, a === s, a === t), c?.({ option: a, tableOptions: m });
|
|
15
15
|
}, [c, p, t, s, n, l, e]), T = N(async (a, m) => null, []);
|
|
16
|
-
return o(y, { title: "Insert Table", options: d, onDone: C, onValidateOption: T, defaultOption: t, cancelOption: s, autoFocusSel: ".range-input input", sx: { width: "360px", ...u }, ...x, children: k(
|
|
16
|
+
return o(y, { title: "Insert Table", options: d, onDone: C, onValidateOption: T, defaultOption: t, cancelOption: s, autoFocusSel: ".range-input input", sx: { width: "360px", ...u }, ...x, children: k(j, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0), rowGap: (a) => a.spacing(1), display: "flex", flexDirection: "column" }, children: [o(B, { formName: "range", value: l, onChangeInput: (a) => O(a), resolvedAddress: r.getNames().getRanges.bind(r.getNames()), onFocus: (a) => {
|
|
17
17
|
b || a.target?.select(), h(!0);
|
|
18
|
-
} }), o(
|
|
18
|
+
} }), o(w, { control: o(F, { checked: n, onChange: () => f(!n) }), label: "Table has headers", labelPlacement: "end" })] }) });
|
|
19
19
|
});
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
L as TableNewDialog,
|
|
22
|
+
L as default
|
|
23
23
|
};
|
|
@@ -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.4
|
|
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.
|
|
@@ -2,70 +2,71 @@ import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo as ie, useRef as C, useState as b, useEffect as D, useLayoutEffect as ce, useMemo as pe } from "react";
|
|
3
3
|
import { DialogContent as de, Box as O, TextField as Y, InputAdornment as ue, Collapse as _, MenuItem as fe, FormControl as ge, InputLabel as me, Select as xe } from "@mui/material";
|
|
4
4
|
import { ArrowBack as he, ArrowUpward as Oe, ArrowForward as Ce, ArrowDownward as ye } from "@mui/icons-material";
|
|
5
|
-
import {
|
|
5
|
+
import { ICell as c, IRange as R } from "@sheetxl/sdk";
|
|
6
|
+
import { T as W, a4 as be, j as Te, a6 as ve, a7 as m, y as x, a8 as Re, Z as y, a9 as ke, aa as we, ab as Ie, ac as Se, a5 as k, ad as Ee, ae as Fe, A as De } from "./tEvhefgL1pPAbBne.mjs";
|
|
6
7
|
import { alpha as w } from "@mui/system";
|
|
7
8
|
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
9
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
9
10
|
*
|
|
10
11
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
12
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
13
|
*/
|
|
13
|
-
const $ = ie((
|
|
14
|
-
const { label: h, value: r, options: s, onSelect: d, tabIndex: T = 0, ...A } =
|
|
14
|
+
const $ = ie((I) => {
|
|
15
|
+
const { label: h, value: r, options: s, onSelect: d, tabIndex: T = 0, ...A } = I, [P, v] = b(() => ne(r, s));
|
|
15
16
|
D(() => {
|
|
16
17
|
v(ne(r, s));
|
|
17
18
|
}, [r, s]);
|
|
18
|
-
const
|
|
19
|
+
const K = W((u) => {
|
|
19
20
|
v(u.target.value), d?.(s[u.target.value]);
|
|
20
21
|
}, [d, s]), l = pe(() => Object.keys(s).map((u) => i(fe, { value: u, children: u }, u)), [s]);
|
|
21
|
-
return p(ge, { sx: { minWidth: 135 }, size: "small", children: [i(me, { children: h }), i(xe, { inputProps: { tabIndex: T }, value:
|
|
22
|
+
return p(ge, { sx: { minWidth: 135 }, size: "small", children: [i(me, { children: h }), i(xe, { inputProps: { tabIndex: T }, value: P, label: h, onChange: K, sx: { backgroundImage: `linear-gradient(${w("#fff", k(5))}, ${w("#fff", k(5))})` }, ...A, children: l })] });
|
|
22
23
|
}), ee = { Workbook: "workbook", Sheet: "sheet" }, te = { enter: 140, exit: 140 }, oe = { Formulas: c.Content.Formulas, Values: c.Content.Values, Notes: c.Content.Notes, Comments: c.Content.Comments }, se = { ...oe };
|
|
23
24
|
delete se.Values;
|
|
24
|
-
const Ae = { "By Rows": !0, "By Columns": !1 }, ne = (
|
|
25
|
+
const Ae = { "By Rows": !0, "By Columns": !1 }, ne = (I, h) => {
|
|
25
26
|
const r = Object.keys(h);
|
|
26
27
|
for (let s = 0; s < r.length; s++) {
|
|
27
28
|
const d = r[s];
|
|
28
|
-
if (h[d] ===
|
|
29
|
+
if (h[d] === I) return d;
|
|
29
30
|
}
|
|
30
|
-
},
|
|
31
|
-
const { replace: h = !1, findText: r, replaceText: s, findOptions: d, replaceOptions: T, title: A, onHide:
|
|
31
|
+
}, je = ie((I) => {
|
|
32
|
+
const { replace: h = !1, findText: r, replaceText: s, findOptions: d, replaceOptions: T, title: A, onHide: P, onFindOrReplace: v, ...K } = I, l = C(null), u = C(null), j = C(null), V = C(null), N = C(null), H = C(null), z = (e, t) => {
|
|
32
33
|
t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
|
|
33
|
-
}, [U,
|
|
34
|
+
}, [U, F] = b(!1), [M, le] = b(!1), [f, B] = b(h), [X, L] = b(!1), [G, Z] = b(!1), [o, a] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: ee.Sheet }), S = W(async (e, t, n, E) => {
|
|
34
35
|
if (!v) return;
|
|
35
36
|
const g = { ...o };
|
|
36
37
|
g.replaceOptions = { ...g.replaceOptions }, g.findOptions = { ...g.findOptions }, g.replaceOptions.maxCount = n ? void 0 : 1, g.replace = t, t && o.findOptions.fields?.[0] === c.Content.Values && (g.findOptions.fields = [c.Content.Formulas]), g.findOptions.reverse = !e;
|
|
37
|
-
const re = await v({ autoFocus:
|
|
38
|
+
const re = await v({ autoFocus: E, ...g });
|
|
38
39
|
L(re === 0);
|
|
39
40
|
}, [o, v]);
|
|
40
41
|
D(() => {
|
|
41
42
|
L(!1);
|
|
42
|
-
}, [o,
|
|
43
|
-
const
|
|
43
|
+
}, [o, M, f]);
|
|
44
|
+
const q = W((e, t) => {
|
|
44
45
|
if (e.keyCode === be.Enter) {
|
|
45
46
|
if (!o.findText) return;
|
|
46
|
-
let n = !0,
|
|
47
|
-
e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (
|
|
47
|
+
let n = !0, E = !1;
|
|
48
|
+
e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (E = !0), z(e, E ? H.current : N.current)) : z(e, n ? V.current : j.current), S(n, t, E, !1);
|
|
48
49
|
}
|
|
49
|
-
}, [o]),
|
|
50
|
+
}, [o]), J = C(null);
|
|
50
51
|
ce(() => {
|
|
51
52
|
a((e) => {
|
|
52
53
|
const t = { ...e };
|
|
53
|
-
t.findText = r && r.length > 0 ? r : e.findText ?? "",
|
|
54
|
+
t.findText = r && r.length > 0 ? r : e.findText ?? "", F(!0), s !== void 0 && (t.replaceText = s), d && (t.findOptions = { ...t.findOptions, ...d }), t.replaceText || (t.replaceText = ""), t.replaceOptions && (t.replaceOptions = { ...t.replaceOptions }), T && (t.replaceOptions = { ...t.replaceOptions, ...T }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
|
|
54
55
|
const n = !(!T && s === void 0);
|
|
55
|
-
return n &&
|
|
56
|
-
}),
|
|
56
|
+
return n && B(n), t;
|
|
57
|
+
}), G || J.current?.focus();
|
|
57
58
|
}, [r, s, d, T]), D(() => {
|
|
58
|
-
f ? (o.findOptions.fields[0], c.Content.Values) :
|
|
59
|
+
f ? (o.findOptions.fields[0], c.Content.Values) : F(!0);
|
|
59
60
|
}, [f]), D(() => {
|
|
60
|
-
if (U && l.current && o.findText === l.current.value) return l.current === document.activeElement || l.current.contains(document.activeElement) ? (l.current?.select(), void
|
|
61
|
-
l.current?.select(),
|
|
61
|
+
if (U && l.current && o.findText === l.current.value) return l.current === document.activeElement || l.current.contains(document.activeElement) ? (l.current?.select(), void F(!1)) : void l.current.addEventListener("focus", () => {
|
|
62
|
+
l.current?.select(), F(!1);
|
|
62
63
|
}, { once: !0 });
|
|
63
64
|
}, [U, o]);
|
|
64
65
|
const [ae, { width: Q }] = Te();
|
|
65
|
-
return i(ve, { title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", refWindow:
|
|
66
|
-
|
|
67
|
-
}, PaperProps: { elevation:
|
|
68
|
-
if (e.key === "h" && e.ctrlKey)
|
|
66
|
+
return i(ve, { title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", refWindow: J, onHide: P, onFocus: () => Z(!0), onBlur: () => {
|
|
67
|
+
Z(!1), L(!1);
|
|
68
|
+
}, PaperProps: { elevation: G ? 3 : 1 }, ...K, children: p(de, { dividers: !0, ref: ae, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
|
|
69
|
+
if (e.key === "h" && e.ctrlKey) B(!0), l.current?.contains(document.activeElement) && u.current?.focus();
|
|
69
70
|
else if (e.key === "f" && e.ctrlKey) l.current?.focus();
|
|
70
71
|
else if (e.key === "c" && e.altKey) a((t) => {
|
|
71
72
|
const n = { ...t };
|
|
@@ -83,10 +84,10 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ne = (E, h) => {
|
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
86
|
e.preventDefault();
|
|
86
|
-
}, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected:
|
|
87
|
+
}, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected: M, onSelectToggle: (e) => {
|
|
87
88
|
le(e);
|
|
88
89
|
}, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(Re, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
|
|
89
|
-
|
|
90
|
+
B(e);
|
|
90
91
|
}, preventFocus: !0, label: "Toggle Replace", icon: x(i(ke, {})), shortcut: { key: f ? "F" : "H", modifiers: [y.Ctrl] } })] }), p(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(Y, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Q > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${w("#fff", k(5))}, ${w("#fff", k(5))})` }, inputProps: { draggable: !1, ref: l, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } }, endAdornment: i(ue, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [i(m, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
|
|
91
92
|
a((t) => {
|
|
92
93
|
const n = { ...t };
|
|
@@ -97,36 +98,36 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ne = (E, h) => {
|
|
|
97
98
|
const n = { ...t };
|
|
98
99
|
return n.findOptions.matchEntireCell = e, n;
|
|
99
100
|
});
|
|
100
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(
|
|
101
|
+
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(Ie, {})) }), i(m, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
101
102
|
a((t) => {
|
|
102
103
|
const n = { ...t };
|
|
103
104
|
return n.findOptions.useRegex = e, n;
|
|
104
105
|
});
|
|
105
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(
|
|
106
|
+
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(Se, {})) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => X ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => X ? `${e.palette.error.main} !important` : void 0 } }, value: o.findText ?? "", onChange: (e) => {
|
|
106
107
|
a((t) => {
|
|
107
108
|
const n = { ...t };
|
|
108
109
|
return n.findText = e.target.value, n;
|
|
109
110
|
});
|
|
110
|
-
}, onKeyDown: (e) =>
|
|
111
|
+
}, onKeyDown: (e) => q(e, !1), onContextMenu: (e) => {
|
|
111
112
|
e.stopPropagation();
|
|
112
113
|
} }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
113
|
-
|
|
114
|
-
}, touchRippleRef:
|
|
115
|
-
|
|
116
|
-
}, touchRippleRef:
|
|
114
|
+
S(!1, !1);
|
|
115
|
+
}, touchRippleRef: j, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(he, {}) : i(Oe, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
116
|
+
S(!0, !1);
|
|
117
|
+
}, touchRippleRef: V, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Ce, {}) : i(ye, {})), disabled: !o.findText })] }), i(_, { in: f, timeout: te, onExit: () => {
|
|
117
118
|
l.current?.focus();
|
|
118
119
|
}, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(Y, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${w("#fff", k(5))}, ${w("#fff", k(5))})` }, inputProps: { ref: u, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
|
|
119
120
|
a((t) => {
|
|
120
121
|
const n = { ...t };
|
|
121
122
|
return n.replaceText = e.target.value, n;
|
|
122
123
|
});
|
|
123
|
-
}, onKeyDown: (e) =>
|
|
124
|
+
}, onKeyDown: (e) => q(e, !0), onContextMenu: (e) => {
|
|
124
125
|
e.stopPropagation();
|
|
125
126
|
} }), i(m, { onSelectToggle: (e) => {
|
|
126
|
-
|
|
127
|
-
}, touchRippleRef:
|
|
128
|
-
|
|
129
|
-
}, touchRippleRef:
|
|
127
|
+
S(!0, !0);
|
|
128
|
+
}, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(Ee, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
|
|
129
|
+
S(!0, !0, !0);
|
|
130
|
+
}, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Fe, {})), disabled: !o.findText })] }) })] })] }), i(_, { in: M, timeout: te, onExit: () => {
|
|
130
131
|
l.current?.focus();
|
|
131
132
|
}, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(De, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Q >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i($, { label: "Within", value: o.scope, options: ee, onSelect: (e) => {
|
|
132
133
|
a((t) => {
|
|
@@ -146,7 +147,7 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, ne = (E, h) => {
|
|
|
146
147
|
} })] })] }) })] }) });
|
|
147
148
|
});
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
je as FindReplaceWindow,
|
|
150
151
|
ee as ScopeOptions,
|
|
151
|
-
|
|
152
|
+
je as default
|
|
152
153
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { memo as G, useState as x, useCallback as O, useEffect as H, useMemo as S } from "react";
|
|
3
|
+
import { Box as w, FormControl as P, InputLabel as K, Select as q, TextField as A, Typography as I, MenuItem as J } from "@mui/material";
|
|
4
|
+
import { NumberFormat as n } from "@sheetxl/sdk";
|
|
5
|
+
import { T as l, a4 as Q, a1 as U, a5 as p } from "./tEvhefgL1pPAbBne.mjs";
|
|
6
|
+
import { alpha as c } from "@mui/system";
|
|
7
|
+
/**
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
9
|
+
*
|
|
10
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
+
*/
|
|
13
|
+
const X = ["Ok", "Cancel"], te = G((D) => {
|
|
14
|
+
const { initialValue: $, context: h, onOption: b, onValidateOption: u, onInputOption: C, onDone: m, options: T = X, defaultOption: i = T?.[0], cancelOption: d = "Cancel", sx: N, ...M } = D, [a, v] = x($), [V, j] = x(!1), g = O(async (e, o) => !0, []), f = l(async (e) => {
|
|
15
|
+
C?.(a, e), b?.(e, e === d, e === i), m?.();
|
|
16
|
+
}, [a, C, m, b, d, i]), B = l(async (e) => {
|
|
17
|
+
e.keyCode === Q.Enter && await g?.(a, null) !== !1 && f(i);
|
|
18
|
+
}, [a, f]), L = l((e) => {
|
|
19
|
+
v(e.target.value), g?.(e.target.value, null);
|
|
20
|
+
}, [u]), z = l(async (e) => {
|
|
21
|
+
let o = await Promise.resolve(u?.(e));
|
|
22
|
+
try {
|
|
23
|
+
o !== !1 && (o = await Promise.resolve(g?.(a, e)) ?? !0);
|
|
24
|
+
} catch {
|
|
25
|
+
}
|
|
26
|
+
return o ?? !0;
|
|
27
|
+
}, [u]), [k, F] = x(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
|
|
28
|
+
H(() => {
|
|
29
|
+
F(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
|
|
30
|
+
}, [a]);
|
|
31
|
+
const E = S(() => {
|
|
32
|
+
const e = n.Styles.lookupPrimary(), o = (r) => t(J, { value: r, children: r }, r), s = Object.keys(e).map((r) => o(e[r].formatType));
|
|
33
|
+
return s.push(o(n.Type.Custom)), s;
|
|
34
|
+
}, []), R = O((e) => {
|
|
35
|
+
const o = e.target.value;
|
|
36
|
+
F(o);
|
|
37
|
+
const s = n.Styles.lookupDefault(o);
|
|
38
|
+
s && v(s);
|
|
39
|
+
}, []), W = S(() => {
|
|
40
|
+
const e = h();
|
|
41
|
+
return e.createTemporaryCell({ value: e.getValue() ?? 12345, style: { numberFormat: a } });
|
|
42
|
+
}, [k, a, h]);
|
|
43
|
+
return t(U, { title: "Number Format", options: T, onDone: m, onOption: (e) => f(e), onValidateOption: z, defaultOption: i, cancelOption: d, autoFocusSel: ".autoFocus", sx: { width: "580px", ...N }, ...M, children: y(w, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [y(P, { sx: { minWidth: 135 }, size: "small", children: [t(K, { children: "Category" }), t(q, { value: k, label: "Category", onChange: R, sx: { backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, children: E })] }), t(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(A, { label: "Code", onFocus: (e) => {
|
|
44
|
+
V || e.target?.select(), j(!0);
|
|
45
|
+
}, 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(${c("#fff", p(5))}, ${c("#fff", p(5))})` } } }, value: a, onChange: L, onKeyDown: B, onContextMenu: (e) => {
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
} }) }), y(w, { children: [t(I, { variant: "caption", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: "Preview" }), t(I, { variant: "body2", component: "div", sx: { borderRadius: (e) => `${e.shape.borderRadius}px`, padding: (e) => e.spacing(1), border: (e) => `1px solid ${e.palette.grey[400]}` }, children: W.getNumberFormat().displayText || "(empty)" })] })] }) });
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
te as NumberFormatDialog,
|
|
51
|
+
te as default
|
|
52
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as A } from "react/jsx-runtime";
|
|
2
2
|
import { memo as E, useMemo as F, useState as m, useCallback as O } from "react";
|
|
3
3
|
import { Box as S, FormControl as P, TextField as b } from "@mui/material";
|
|
4
|
-
import { T as f,
|
|
4
|
+
import { T as f, a1 as U, a5 as l } from "./tEvhefgL1pPAbBne.mjs";
|
|
5
5
|
import { alpha as p } from "@mui/system";
|
|
6
6
|
/**
|
|
7
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
7
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
8
8
|
*
|
|
9
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -18,13 +18,13 @@ const V = ["Ok", "Cancel"], Q = E((D) => {
|
|
|
18
18
|
}, [t, s]), [a, M] = m(T.address), [u, B] = m(() => {
|
|
19
19
|
const n = s?.().toTextUnformatted() ?? H;
|
|
20
20
|
return n === T.address ? "" : n;
|
|
21
|
-
}), [$, k] = m(!1),
|
|
21
|
+
}), [$, k] = m(!1), L = O((n) => {
|
|
22
22
|
B(n.target.value);
|
|
23
|
-
}, []), C = O(async (n, e) => null, []),
|
|
23
|
+
}, []), C = O(async (n, e) => null, []), W = f(async (n) => {
|
|
24
24
|
n !== i && x?.(a === "" ? null : { address: a }, u), h?.(n, n === i, n === c), d?.();
|
|
25
|
-
}, [a, u, x, d, h, c, i]),
|
|
25
|
+
}, [a, u, x, d, h, c, i]), j = f((n) => {
|
|
26
26
|
M(n.target.value), C(n.target.value, null);
|
|
27
|
-
}, [r]),
|
|
27
|
+
}, [r]), z = f(async (n) => {
|
|
28
28
|
let e = await Promise.resolve(r?.(n));
|
|
29
29
|
try {
|
|
30
30
|
e !== !1 && (e = await C(a, n));
|
|
@@ -32,13 +32,13 @@ const V = ["Ok", "Cancel"], Q = E((D) => {
|
|
|
32
32
|
}
|
|
33
33
|
return e ?? !0;
|
|
34
34
|
}, [r]);
|
|
35
|
-
return o(U, { title: (w ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (n) =>
|
|
35
|
+
return o(U, { title: (w ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (n) => W(n), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...I }, ...v, children: A(S, { sx: { paddingTop: (n) => n.spacing(1), paddingBottom: (n) => n.spacing(0), rowGap: (n) => n.spacing(1), display: "flex", flexDirection: "column" }, children: [o(P, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(b, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (n) => {
|
|
36
36
|
$ || n.target?.select(), k(!0);
|
|
37
|
-
}, 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(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: a, onChange:
|
|
37
|
+
}, 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(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: a, onChange: j, onContextMenu: (n) => {
|
|
38
38
|
n.stopPropagation();
|
|
39
39
|
} }) }), o(P, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(b, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
|
|
40
40
|
k(!0);
|
|
41
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: u, onChange:
|
|
41
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: u, onChange: L, onContextMenu: (n) => {
|
|
42
42
|
n.stopPropagation();
|
|
43
43
|
} }) })] }) });
|
|
44
44
|
});
|
|
@@ -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.4
|
|
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,25 +1,25 @@
|
|
|
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
3
|
import { Box as L } from "@mui/material";
|
|
4
|
-
import { T as u,
|
|
4
|
+
import { T as u, a1 as S, ai as A, aj as G } from "./tEvhefgL1pPAbBne.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
6
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
7
7
|
*
|
|
8
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
10
10
|
*/
|
|
11
|
-
const M = ["Ok", "Cancel"],
|
|
12
|
-
const { value: a = null, context: t, onOption:
|
|
11
|
+
const M = ["Ok", "Cancel"], J = E((C) => {
|
|
12
|
+
const { value: a = null, context: t, onOption: c, onValidateOption: U, onDone: m, onUpdate: g, options: x = M, defaultOption: f = x?.[0], cancelOption: N = "Cancel", sx: R, ...v } = C, T = V(() => t?.getNames().findValidName("Range1"), []), i = V(() => {
|
|
13
13
|
if (!a) return !0;
|
|
14
|
-
}, []), [n, w] = p({ displayText: a?.getName() ?? T, errorText: null }), [o, D] = p({ displayValue: a?.getRanges() ?? t?.selection() ?? null, errorText: null }), [y, O] = p(!1), F = h(async (e) => !n.errorText && !o.errorText, [t]),
|
|
14
|
+
}, []), [n, w] = p({ displayText: a?.getName() ?? T, errorText: null }), [o, D] = p({ displayValue: a?.getRanges() ?? t?.selection() ?? null, errorText: null }), [y, O] = p(!1), F = h(async (e) => !n.errorText && !o.errorText, [t]), j = u((e, l, r) => {
|
|
15
15
|
if (!l) {
|
|
16
16
|
let s = null;
|
|
17
17
|
i ? s = t?.getNames().addReference(n?.displayText, o?.displayValue, !1) : (a.getType() === "reference" && a.doBatch(() => {
|
|
18
18
|
a.setName(n?.displayText), a.setReference(o?.displayValue);
|
|
19
19
|
}, `Edit Named '${n?.displayText}'`), s = a), s && (s.select(), g(s, i));
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
}, [t, n, o,
|
|
21
|
+
c?.(e, l, r), m?.();
|
|
22
|
+
}, [t, n, o, m, c, f, N, g]), B = u((e) => {
|
|
23
23
|
let l = null;
|
|
24
24
|
try {
|
|
25
25
|
t?.getNames().validateName(e);
|
|
@@ -27,18 +27,18 @@ const M = ["Ok", "Cancel"], H = E((C) => {
|
|
|
27
27
|
l = r.message;
|
|
28
28
|
}
|
|
29
29
|
w({ displayText: e, errorText: l });
|
|
30
|
-
}, []),
|
|
30
|
+
}, []), I = u((e) => {
|
|
31
31
|
a && a.getName().toLowerCase() === e.toLowerCase() || t?.getNames().validateName(e);
|
|
32
|
-
}, [t, a]),
|
|
32
|
+
}, [t, a]), b = h((e) => {
|
|
33
33
|
D({ displayValue: e ?? null, errorText: null });
|
|
34
34
|
}, []);
|
|
35
|
-
return d(S, { title: (i ? "Define" : "Edit") + " Range", options: x, onOption:
|
|
35
|
+
return d(S, { title: (i ? "Define" : "Edit") + " Range", options: x, onOption: j, onValidateOption: F, defaultOption: f, cancelOption: N, autoFocusSel: ".autoFocus", sx: { width: "460px", ...R }, ...v, children: k(L, { 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: T, value: n.displayText, onChangeInput: B, onValidate: I, onFocus: (e) => {
|
|
36
36
|
y || e.target?.select(), O(!0);
|
|
37
|
-
} }), d(G, { formName: "range", value: o.displayValue, onChangeInput:
|
|
37
|
+
} }), d(G, { formName: "range", value: o.displayValue, onChangeInput: b, resolvedAddress: t.getNames().getRanges.bind(t.getNames()), onFocus: (e) => {
|
|
38
38
|
y || e.target?.select(), O(!0);
|
|
39
39
|
} })] }) });
|
|
40
40
|
});
|
|
41
41
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
J as NamedReferenceDialog,
|
|
43
|
+
J as default
|
|
44
44
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as j, forwardRef as z, useState as p } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as t, a0 as E, a1 as K, a2 as R, a3 as O } from "./tEvhefgL1pPAbBne.mjs";
|
|
4
4
|
import { Box as W, FormControl as q, TextField as A } from "@mui/material";
|
|
5
5
|
import { alpha as y } from "@mui/system";
|
|
6
6
|
/**
|
|
7
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
7
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
8
8
|
*
|
|
9
9
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
10
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
11
|
*/
|
|
12
12
|
const G = ["Input"], _ = j(z((w, J) => {
|
|
13
|
-
const { initialValue: F = "", onOption: T, onValidateOption: r, onInputOption: l, onValidateInputOption: s, onDone: u, inputProps: c, inputLabel: C, inputType: I, inputPlaceHolder: P, options: d = G, autoFocusSel:
|
|
13
|
+
const { initialValue: F = "", onOption: T, onValidateOption: r, onInputOption: l, onValidateInputOption: s, onDone: u, inputProps: c, inputLabel: C, inputType: I, inputPlaceHolder: P, options: d = G, autoFocusSel: v = ".autoFocus", cancelOption: m, defaultOption: g = d?.[0], ...b } = w, [k, V] = p(!1), [o, B] = p(F), [D, S] = p(""), [$, H] = p(!0), e = t(async (a, n) => {
|
|
14
14
|
if (!s) return !0;
|
|
15
15
|
const h = await s?.(a, n);
|
|
16
16
|
S(h?.message ?? "");
|
|
17
17
|
const x = h?.valid ?? !0;
|
|
18
|
-
return
|
|
18
|
+
return H(x), x;
|
|
19
19
|
}, [s]), f = t(async (a) => {
|
|
20
20
|
l?.(o, a);
|
|
21
|
-
}, [o, l, u, T, m, g]),
|
|
21
|
+
}, [o, l, u, T, m, g]), L = t(async (a) => {
|
|
22
22
|
a.keyCode === E.Enter && await e?.(o, null);
|
|
23
|
-
}, [o, f]),
|
|
23
|
+
}, [o, f]), M = t((a) => {
|
|
24
24
|
B(a.target.value), e?.(a.target.value, null);
|
|
25
|
-
}, [r]),
|
|
25
|
+
}, [r]), N = t(async (a) => {
|
|
26
26
|
let n = await e(o, a);
|
|
27
27
|
try {
|
|
28
28
|
n !== !1 && (n = await e(o, a));
|
|
@@ -32,9 +32,9 @@ const G = ["Input"], _ = j(z((w, J) => {
|
|
|
32
32
|
}, [o, r]);
|
|
33
33
|
return i(K, { options: d, onDone: u, onOption: (a, n) => {
|
|
34
34
|
n || f(a);
|
|
35
|
-
}, onValidateOption:
|
|
36
|
-
|
|
37
|
-
}, type: I, label: C, helperText: D || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5), color:
|
|
35
|
+
}, onValidateOption: N, cancelOption: m, defaultOption: g, autoFocusSel: v, ...b, children: i(W, { sx: { paddingTop: (a) => a.spacing(1), paddingBottom: (a) => a.spacing(0) }, children: i(q, { sx: { paddingTop: (a) => a.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(A, { onFocus: (a) => {
|
|
36
|
+
k || a.target?.select(), V(!0);
|
|
37
|
+
}, type: I, label: C, helperText: D || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (a) => a.spacing(0.5), color: $ ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: P, spellCheck: !1, autoComplete: "off", ...c, className: R("autoFocus", c?.className), sx: { paddingTop: (a) => a.spacing(1.25), paddingBottom: (a) => a.spacing(0.75), backgroundImage: `linear-gradient(${y("#fff", O(5))}, ${y("#fff", O(5))})` } } }, value: o, onChange: M, onKeyDown: L, onContextMenu: (a) => {
|
|
38
38
|
a.stopPropagation();
|
|
39
39
|
} }) }) }) });
|
|
40
40
|
}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Workbook as k } from "@sheetxl/sdk";
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
3
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.4
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const B = async (g, p) => {
|
|
9
9
|
const i = await g.toJSON(), w = p?.whiteSpace ?? 0;
|
|
10
10
|
let b;
|
|
11
11
|
p?.beforeWrite?.(g, i), b = w === 0 ? JSON.stringify(i) : function(a, c = 2) {
|
|
@@ -51,7 +51,7 @@ const j = async (g, p) => {
|
|
|
51
51
|
} }), n = new CompressionStream(c), o = r.pipeThrough(n);
|
|
52
52
|
return (await new Response(o).blob()).arrayBuffer();
|
|
53
53
|
}(y, typeof s == "string" ? s : void 0)), y;
|
|
54
|
-
},
|
|
54
|
+
}, j = async (g, p) => {
|
|
55
55
|
let i = g;
|
|
56
56
|
(function(s) {
|
|
57
57
|
if (s.byteLength < 4) return !1;
|
|
@@ -72,9 +72,9 @@ const j = async (g, p) => {
|
|
|
72
72
|
}(i));
|
|
73
73
|
let w = new TextDecoder().decode(i);
|
|
74
74
|
const b = JSON.parse(w), y = { ...p?.constructorOptions ?? {}, json: b };
|
|
75
|
-
return new
|
|
75
|
+
return new k(y);
|
|
76
76
|
};
|
|
77
77
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
j as fromBufferJSON,
|
|
79
|
+
B as toBufferJSON
|
|
80
80
|
};
|
|
@@ -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.4
|
|
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.
|