@sheetxl/studio-mui 0.3.2 → 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/LICENSE.md +11 -11
- package/README.md +24 -24
- package/browser/cjs/B1DCwLSJMTHSgdcP.cjs +6 -0
- package/browser/cjs/{BtYvPg1MnEyGWx8E.cjs → BHC1oqfBYh7Xmx_G.cjs} +1 -1
- package/browser/cjs/{BBJ57oaa6vu0zEjI.cjs → BMUOX4KpmBu6GH8Q.cjs} +1 -1
- package/browser/cjs/BsXtNRaOhnjlXTcA.cjs +6 -0
- package/browser/cjs/{sxA11AN6vr9fiHaa.cjs → Bwk2L5ydEvoRIisp.cjs} +1 -1
- package/browser/cjs/{CEjq7KQ0zHIi69or.cjs → C0hVi0a9d9Sh_FgO.cjs} +2 -2
- package/browser/cjs/{CgaWzlL_p5dgqA4f.cjs → C0sbobSHWURMB8m0.cjs} +3 -3
- package/browser/cjs/{CsvjAXVeoKH34aZc.cjs → C1GrJth6YhBZDgvq.cjs} +2 -2
- package/browser/cjs/{BZfQo-wrdJc4xy1p.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/{BTSVJlDxWgqbdgwJ.cjs → DEa9UMmpvbiH_Dxm.cjs} +1 -1
- package/browser/cjs/{CJFKRBbjz7X-rEau.cjs → DY0yxZSYTOZvtIkB.cjs} +1 -1
- package/browser/cjs/DbczL66CNJYzHHvr.cjs +12 -0
- package/browser/cjs/{DLeOkdGvdWl5tqCl.cjs → DfPqfTiRAZ9i5RVA.cjs} +2 -2
- package/browser/cjs/{C-4fmxJxBM8ThtN5.cjs → Dpc0lG73ekHkTPOA.cjs} +2 -2
- package/browser/cjs/{ByKQeaRgOfTOn4P6.cjs → DzdnNJvBx5lkLTW-.cjs} +1 -1
- package/browser/cjs/EPoWWLrVLfRMaxvD.cjs +6 -0
- package/browser/cjs/_JBLryXFRVS5vFVX.cjs +12 -0
- package/browser/cjs/{CX6yLHEdmP8SVEfH.cjs → edAxlEEqzjJ_PaBv.cjs} +2 -2
- package/browser/cjs/{CMTXA4puzeAnzQwq.cjs → f1m-IERoDbQdUMNJ.cjs} +1 -1
- package/browser/cjs/index.cjs +3 -3
- package/browser/cjs/{vEKDv57iikwYjhOc.cjs → j8ba84pFnKx2xWvW.cjs} +2 -2
- package/browser/cjs/{DLcyf5qNRNueXSur.cjs → xRKATlLPCXjQqLyR.cjs} +1 -1
- package/browser/esm/{Bt8Hem_KC6UibnGm.mjs → B3E24eA0KrqZGcc6.mjs} +6 -6
- package/browser/esm/{ZwbkuvbehTjluIzn.mjs → B7spDz0f3MErGle0.mjs} +21 -20
- package/browser/esm/{AkfGEQyMAKNp1Ktw.mjs → BQSJPoCxw_CbM_GB.mjs} +11 -10
- package/browser/esm/{Dq2nqH2znDzDq0no.mjs → C0HMqAubZ7789bne.mjs} +1 -1
- package/browser/esm/{DoCwq6ipapKirQSJ.mjs → C72RDqmHBctKx6yu.mjs} +1 -1
- package/browser/esm/{C3dyK-h3mgD7XzKl.mjs → CSEDlIO1VyJbsJUh.mjs} +8 -8
- package/browser/esm/{_zJv_HkelROSMajR.mjs → Ca8SXunZNcPT82kM.mjs} +1 -1
- package/browser/esm/{Dvi6qc2t9c_bRvzo.mjs → Cbj_GBiwqMbV7xNp.mjs} +44 -43
- package/browser/esm/Cdr3G0s5DSG6bX6w.mjs +52 -0
- package/browser/esm/{DudPyyE63O5X5Tij.mjs → CoPf1k9QR8u7c9dJ.mjs} +10 -10
- package/browser/esm/{CRByH9Wf2wJ94di-.mjs → CyUxX9cLgslryjv5.mjs} +1 -1
- package/browser/esm/{FhyoG4Gyhb7gVRPB.mjs → D7kxhKOLn3UAkGzE.mjs} +13 -13
- package/browser/esm/{9vaTrJzQjSFA2egn.mjs → DGIZQy_4rgYfRKUt.mjs} +10 -10
- package/browser/esm/{BRPqw1D9DgPK_A6V.mjs → DJmEZGVO4DnLsMSK.mjs} +7 -7
- package/browser/esm/{TFr0V-rb-KYQeRVW.mjs → DTY6o1fHyy7Ldm2E.mjs} +1 -1
- package/browser/esm/DhuuaOVgVDtHsSft.mjs +1467 -0
- package/browser/esm/{ByYn00uYUmHj9zvS.mjs → Dig0J4i2Urjl9Z--.mjs} +171 -170
- package/browser/esm/{CdUwERsyanWuNPx8.mjs → DmqNGi-j-G64Ah3R.mjs} +2 -2
- package/browser/esm/{B-DwCBC-vYtRKiGS.mjs → DnH6tB6PvfbWK92p.mjs} +13 -13
- package/browser/esm/{D_LHNgrCc-7V6FjT.mjs → Sg5ukHMhDKaJmwC5.mjs} +65 -65
- package/browser/esm/{D645MdIazDB-hc3d.mjs → TfEcJxbuvenMTWzb.mjs} +1 -1
- package/browser/esm/{s-R04_lOf8TuzWvo.mjs → buSI99ehYQ3RDGh9.mjs} +1 -1
- package/browser/esm/index.mjs +75 -74
- package/browser/esm/{BNbDRm5P-Ha3rBv4.mjs → n91lwJODGYpl_0sb.mjs} +1 -1
- package/browser/esm/{BVDNIiq2e_loYVfc.mjs → oJzTpcQBF382AsoK.mjs} +16 -16
- package/browser/esm/tEvhefgL1pPAbBne.mjs +19828 -0
- package/licenses/dependencies.txt +203 -225
- package/node/assets/style.css +1 -1
- package/node/esm/{CI9F84m6LzoOkVfK.mjs → B794OzAyQ2S3DUvE.mjs} +2 -2
- package/node/esm/{N2xFXdAPXckWbqvN.mjs → B9eTznHjWdKEfnmd.mjs} +13 -13
- package/node/esm/{DjLSO4d4T2JddYG_.mjs → BA_RIYlnXvTDRdhy.mjs} +9 -9
- package/node/esm/{CYcFo_OeyApoGTg3.mjs → BBUuSB5DBjPGuwXm.mjs} +2 -2
- package/node/esm/{CWRpbP9nAT2yR2r6.mjs → BPAWh9TN2AA_qg8Q.mjs} +13 -12
- package/node/esm/{DYOAGczbRXmskyrr.mjs → BWxdcvg2Tp0Ysth3.mjs} +1 -1
- package/node/esm/{BX8KUYAnQx1vI-cS.mjs → BX8ZbzM8Zfe_MtDJ.mjs} +22 -22
- package/node/esm/{DuboCcThig3p0wzs.mjs → BdXN9t5_NDfrKA2E.mjs} +29 -29
- package/node/esm/CaySzQgftaLFVU-a.mjs +25 -0
- package/node/esm/{B5jFauUSFpo_iDkW.mjs → CrwtN-27La5MZ9yI.mjs} +1 -1
- package/node/esm/{BjIAi3GfBAjiRIja.mjs → Cug20O7hGugaeSka.mjs} +276 -275
- package/node/esm/{Bth10k64kFkk36Hy.mjs → CwZUEv9f0ywDMV-Z.mjs} +12 -12
- package/node/esm/{Bk7aoxfQtGp8id7D.mjs → D0fA-N8eAJVD4a_b.mjs} +1 -1
- package/node/esm/{ZVae6CkvsUOXzMKw.mjs → D1aU9ydYjq7iFVAr.mjs} +1 -1
- package/node/esm/{D95MPCm8ObgZN5_j.mjs → D2gUK2WMUbCR0-Kw.mjs} +24 -23
- package/node/esm/{B2Y6U5_PvKIFVtAh.mjs → D4HUF8JC55LqF87u.mjs} +86 -85
- package/node/esm/DOC-LvGYDU9FpsDS.mjs +553 -0
- package/node/esm/{BsSGinAqat7R8x_O.mjs → DXNmGNM6ItcTOZyo.mjs} +1 -1
- package/node/esm/{DfXVaugDnucoDGYk.mjs → DY3eG9Mfo_-xsWGD.mjs} +2 -2
- package/node/esm/{CwIlFXgoa_xv0Doi.mjs → Djc-gCpBoXNpI6yL.mjs} +2 -2
- package/node/esm/{CS138m7XyLHvzDPV.mjs → ILfHRiSFod9A2fKN.mjs} +1 -1
- package/node/esm/Sc5EyWF8aAI0xzOO.mjs +308 -0
- package/node/esm/{CradKrxfiGQucTZ3.mjs → dasEgLXLO2WWGkUm.mjs} +8 -8
- package/node/esm/index.mjs +12873 -41672
- package/package.json +8 -8
- package/browser/cjs/1C6nE8JXbR1K_yhw.cjs +0 -6
- package/browser/cjs/6denMJxSAR1JnvVP.cjs +0 -15
- package/browser/cjs/B-N31rKSrvqkcxZP.cjs +0 -6
- package/browser/cjs/BLHCySywMnqptSI9.cjs +0 -32
- package/browser/cjs/BbEnQfoP4EOJK3YQ.cjs +0 -6
- package/browser/cjs/BjaD6jFpWrhKL2dz.cjs +0 -6
- package/browser/cjs/BnaQy4xZm6MUD5Sg.cjs +0 -13
- package/browser/cjs/BszSSdQItUM3BnN1.cjs +0 -6
- package/browser/cjs/C0vPGOmkrEmgMUC8.cjs +0 -6
- package/browser/cjs/C19mJZkF3zJRRDNw.cjs +0 -11
- package/browser/cjs/C2kX273f3kTe7viA.cjs +0 -6
- package/browser/cjs/C6MOXXmZPlw53ARk.cjs +0 -6
- package/browser/cjs/CGxAeOIqbsFk97UV.cjs +0 -6
- package/browser/cjs/CLeyzaTKMMR0Hcac.cjs +0 -6
- package/browser/cjs/CM1UZZ4gfAch7cju.cjs +0 -7
- package/browser/cjs/CSiwPeW0XIEaw5qn.cjs +0 -6
- package/browser/cjs/CaH2ZbfCFFqmTqKi.cjs +0 -6
- package/browser/cjs/Cbffh394PX-rgpbL.cjs +0 -6
- package/browser/cjs/Ce6nJl_bhnr51GJ3.cjs +0 -238
- package/browser/cjs/ChVT2EzsTJjDsozn.cjs +0 -6
- package/browser/cjs/Cjs836g7b_ipAS4X.cjs +0 -6
- package/browser/cjs/CkxuzW8FWE8vKkSL.cjs +0 -6
- package/browser/cjs/Clh_-4NLLHCW3c-r.cjs +0 -6
- package/browser/cjs/CsxexX1uKSMjAryZ.cjs +0 -6
- package/browser/cjs/CwgzXfkSX0s-h_0a.cjs +0 -6
- package/browser/cjs/CxIFTPLgMN5VgKh1.cjs +0 -12
- package/browser/cjs/D0ByNhICkrbUC74Z.cjs +0 -6
- package/browser/cjs/DAnQwP6m2P_AUhZh.cjs +0 -6
- package/browser/cjs/DFIMAvLgAQfQm3Bx.cjs +0 -6
- package/browser/cjs/DI-wbtkuZm7yx_ek.cjs +0 -6
- package/browser/cjs/DUUZT0ElQBBkt4qe.cjs +0 -6
- package/browser/cjs/DfrXQdrMzJWgyX4S.cjs +0 -6
- package/browser/cjs/DkOOlgNR-NXixaQX.cjs +0 -6
- package/browser/cjs/DmZIqrySryidgnRl.cjs +0 -6
- package/browser/cjs/DscIvkrfig_mffwY.cjs +0 -6
- package/browser/cjs/Dz8coNXp80TEXSyH.cjs +0 -6
- package/browser/cjs/IaiQe7d-LGA2611T.cjs +0 -1501
- package/browser/cjs/KNduwqq-J9uyLgsC.cjs +0 -6
- package/browser/cjs/LTnky81SCDfvEiub.cjs +0 -6
- package/browser/cjs/_EleKbbhQWfp8mqy.cjs +0 -124
- package/browser/cjs/sNpLX232YHzUxZOr.cjs +0 -12
- package/browser/esm/26ozZ2-vj7N8rpiB.mjs +0 -10
- package/browser/esm/B1BxGO2lBpSxSvw1.mjs +0 -10
- package/browser/esm/B7mPpY5DOxEGMbPk.mjs +0 -3934
- package/browser/esm/B8le6PM3dfy1qSHY.mjs +0 -10
- package/browser/esm/BCIwvhxFiDXGEwES.mjs +0 -10
- package/browser/esm/BFtFjxXyhdNH6yAV.mjs +0 -10
- package/browser/esm/BMsToxhQy4cSxlz-.mjs +0 -10
- package/browser/esm/BSv1o1DpwfEAWYSy.mjs +0 -51
- package/browser/esm/Be1UWt41K_Sp7nbQ.mjs +0 -10
- package/browser/esm/Bqmme9ilyvrHA-e_.mjs +0 -1575
- package/browser/esm/BvPUue2e8_ByeP7c.mjs +0 -10
- package/browser/esm/C9uQaKOaImv5o9c3.mjs +0 -10
- package/browser/esm/CBFDGZ_aqeLV3IIt.mjs +0 -10
- package/browser/esm/CNdA2-u6_d2tqz5J.mjs +0 -10
- package/browser/esm/CV-D1e318ShLCDie.mjs +0 -10
- package/browser/esm/CXKMDzYsDLhyK3SV.mjs +0 -10
- package/browser/esm/CaFxIFV4dLSI4zDW.mjs +0 -472
- package/browser/esm/CpD505ep5Z3oX287.mjs +0 -1466
- package/browser/esm/Cz9BPykuRu_5ay57.mjs +0 -425
- package/browser/esm/D2yV2gASA--bjve5.mjs +0 -10
- package/browser/esm/D6mAWXETxAqf416J.mjs +0 -10
- package/browser/esm/DPw7ErLvgq_9jYHE.mjs +0 -24
- package/browser/esm/DRVlO95U75R3eY27.mjs +0 -10
- package/browser/esm/DWoRF-U96vWLWF5Q.mjs +0 -5582
- package/browser/esm/DX8AE4p9fLlmEdTJ.mjs +0 -10
- package/browser/esm/DYvwKUBbWi2NWsyf.mjs +0 -10
- package/browser/esm/Dxl5GgDFgUsBkg-b.mjs +0 -10
- package/browser/esm/Qq233O5gbpRAP6un.mjs +0 -29
- package/browser/esm/UC5M3Z5HmOzupzqQ.mjs +0 -21
- package/browser/esm/VchKQpT2_B7Ca113.mjs +0 -820
- package/browser/esm/_5B66awyRsaDd_Hv.mjs +0 -10
- package/browser/esm/cOX4zBcY0-H_8kAj.mjs +0 -43654
- package/browser/esm/iIqrOkF_gUf_5m0C.mjs +0 -10
- package/browser/esm/kjRF87FSQwIzB1KD.mjs +0 -12
- package/browser/esm/ob7IFBy7DLC-iS-g.mjs +0 -10
- package/node/esm/8OtdJtJIKyA4POih.mjs +0 -14
- package/node/esm/B1BxGO2lBpSxSvw1.mjs +0 -10
- package/node/esm/B7bDAwgd6OSbVJh_.mjs +0 -10
- package/node/esm/B8le6PM3dfy1qSHY.mjs +0 -10
- package/node/esm/BCIwvhxFiDXGEwES.mjs +0 -10
- package/node/esm/BFtFjxXyhdNH6yAV.mjs +0 -10
- package/node/esm/BK9EmmFbROJ0rZqB.mjs +0 -4002
- package/node/esm/BMsToxhQy4cSxlz-.mjs +0 -10
- package/node/esm/Be1UWt41K_Sp7nbQ.mjs +0 -10
- package/node/esm/BeyDW_Yk6iu1JB4v.mjs +0 -453
- package/node/esm/BpdsRwlUAUyUdrlR.mjs +0 -813
- package/node/esm/BwnMNGZmp-FGW86J.mjs +0 -13
- package/node/esm/C9uQaKOaImv5o9c3.mjs +0 -10
- package/node/esm/CBFDGZ_aqeLV3IIt.mjs +0 -10
- package/node/esm/CJiY4Wz9eiX2B9nv.mjs +0 -10
- package/node/esm/CM9lgZdHfhhL2cv-.mjs +0 -10
- package/node/esm/CNdA2-u6_d2tqz5J.mjs +0 -10
- package/node/esm/CV-D1e318ShLCDie.mjs +0 -10
- package/node/esm/CV4Y5e_kU8o_sXoX.mjs +0 -10
- package/node/esm/CXKMDzYsDLhyK3SV.mjs +0 -10
- package/node/esm/CYsd2qqC_WxLTKE1.mjs +0 -555
- package/node/esm/D5uKz7a9v8FUVx0k.mjs +0 -80
- package/node/esm/D61UbOtLixUCDQce.mjs +0 -307
- package/node/esm/DRVlO95U75R3eY27.mjs +0 -10
- package/node/esm/DYvwKUBbWi2NWsyf.mjs +0 -10
- package/node/esm/DdDxTsQsLWNqX7ee.mjs +0 -16
- package/node/esm/Do5a0pvRN3hayzdD.mjs +0 -10
- package/node/esm/_5B66awyRsaDd_Hv.mjs +0 -10
- package/node/esm/_Wieg3dqzHo6_Crg.mjs +0 -29
- package/node/esm/iIqrOkF_gUf_5m0C.mjs +0 -10
- package/node/esm/kTEpzGO5dC1M9dbV.mjs +0 -24
- package/node/esm/ob7IFBy7DLC-iS-g.mjs +0 -10
- package/node/esm/pTSFPHHLPzmAcEKW.mjs +0 -10
- package/node/esm/rF9x01iQv2EpxorW.mjs +0 -5642
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as h, jsxs as ie, Fragment as It } from "react/jsx-runtime";
|
|
2
|
-
import S, { Component as At, createElement as le, createContext as an, memo as Ee, forwardRef as oe, useRef as ne, useState as ee, useCallback as Z, useEffect as
|
|
3
|
-
import { u as un,
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { Card as
|
|
2
|
+
import S, { Component as At, createElement as le, createContext as an, memo as Ee, forwardRef as oe, useRef as ne, useState as ee, useCallback as Z, useEffect as j, useMemo as $, useContext as sn, isValidElement as ln, cloneElement as cn, useLayoutEffect as st } from "react";
|
|
3
|
+
import { u as un, b as lt, V as dn, T as te, f as Je, y as Te, v as pn, S as mn, A as fn, _ as hn, d as kt, W as pe, e as gn, z as kn, h as bt, M as bn, s as xn, i as wn, j as yn, k as vn, m as Ht, l as En, n as Cn, o as Sn, Y as Ln, Q as K, Z as De, p as xt, H as Rt, q as Tn, t as jt, w as ct, L as Dn, x as Mn, B as On, D as Wn, I as qt, E as Fn, F as Pn, G as Re, J as Nn, K as wt, R as In, N as An, O as Hn, P as Rn, U as jn, X as qn } from "./tEvhefgL1pPAbBne.mjs";
|
|
4
|
+
import { createPortal as Bn } from "react-dom";
|
|
5
|
+
import { Card as _n, CardActions as Vn, Typography as zn, IconButton as ut, Collapse as Un, Box as ue, SvgIcon as Gn, CssBaseline as Kn } from "@mui/material";
|
|
6
|
+
import { PartialError as $n, CommonUtils as et, UndoManager as Zn, Workbook as yt } from "@sheetxl/sdk";
|
|
6
7
|
import { ExpandMore as Xn, Close as Qn, CancelOutlined as Yn } from "@mui/icons-material";
|
|
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.
|
|
@@ -127,7 +128,7 @@ function L() {
|
|
|
127
128
|
function zt(t, a) {
|
|
128
129
|
t.prototype = Object.create(a.prototype), t.prototype.constructor = t, t.__proto__ = a;
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function Ne(t, a) {
|
|
131
132
|
if (t == null) return {};
|
|
132
133
|
var r, e, n = {}, o = Object.keys(t);
|
|
133
134
|
for (e = 0; e < o.length; e++) r = o[e], a.indexOf(r) >= 0 || (n[r] = t[r]);
|
|
@@ -140,18 +141,18 @@ function Et(t) {
|
|
|
140
141
|
dt.bind({ g: 1 }), dt.bind({ k: 1 });
|
|
141
142
|
var Ct = function() {
|
|
142
143
|
return "";
|
|
143
|
-
}, Ut = S.createContext({ enqueueSnackbar: Ct, closeSnackbar: Ct }), nt = "@media (max-width:599.95px)",
|
|
144
|
+
}, Ut = S.createContext({ enqueueSnackbar: Ct, closeSnackbar: Ct }), nt = "@media (max-width:599.95px)", Ge = "@media (min-width:600px)", St = function(t) {
|
|
144
145
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
145
146
|
}, mt = function(t) {
|
|
146
147
|
return "" + St(t.vertical) + St(t.horizontal);
|
|
147
|
-
},
|
|
148
|
+
}, je = function(t) {
|
|
148
149
|
return !!t || t === 0;
|
|
149
|
-
}, qe = "unmounted", xe = "exited", we = "entering",
|
|
150
|
+
}, qe = "unmounted", xe = "exited", we = "entering", Me = "entered", Lt = "exiting", ft = function(t) {
|
|
150
151
|
function a(e) {
|
|
151
152
|
var n;
|
|
152
153
|
n = t.call(this, e) || this;
|
|
153
154
|
var o, i = e.appear;
|
|
154
|
-
return n.appearStatus = null, e.in ? i ? (o = xe, n.appearStatus = we) : o =
|
|
155
|
+
return n.appearStatus = null, e.in ? i ? (o = xe, n.appearStatus = we) : o = Me : o = e.unmountOnExit || e.mountOnEnter ? qe : xe, n.state = { status: o }, n.nextCallback = null, n;
|
|
155
156
|
}
|
|
156
157
|
zt(a, t), a.getDerivedStateFromProps = function(e, n) {
|
|
157
158
|
return e.in && n.status === qe ? { status: xe } : null;
|
|
@@ -163,7 +164,7 @@ var Ct = function() {
|
|
|
163
164
|
var n = null;
|
|
164
165
|
if (e !== this.props) {
|
|
165
166
|
var o = this.state.status;
|
|
166
|
-
this.props.in ? o !== we && o !==
|
|
167
|
+
this.props.in ? o !== we && o !== Me && (n = we) : o !== we && o !== Me || (n = Lt);
|
|
167
168
|
}
|
|
168
169
|
this.updateStatus(!1, n);
|
|
169
170
|
}, r.componentWillUnmount = function() {
|
|
@@ -177,11 +178,11 @@ var Ct = function() {
|
|
|
177
178
|
var n = this, o = this.props.enter, i = e, c = this.getTimeouts();
|
|
178
179
|
e || o ? (this.props.onEnter && this.props.onEnter(this.node, i), this.safeSetState({ status: we }, function() {
|
|
179
180
|
n.props.onEntering && n.props.onEntering(n.node, i), n.onTransitionEnd(c.enter, function() {
|
|
180
|
-
n.safeSetState({ status:
|
|
181
|
+
n.safeSetState({ status: Me }, function() {
|
|
181
182
|
n.props.onEntered && n.props.onEntered(n.node, i);
|
|
182
183
|
});
|
|
183
184
|
});
|
|
184
|
-
})) : this.safeSetState({ status:
|
|
185
|
+
})) : this.safeSetState({ status: Me }, function() {
|
|
185
186
|
n.props.onEntered && n.props.onEntered(n.node, i);
|
|
186
187
|
});
|
|
187
188
|
}, r.performExit = function() {
|
|
@@ -214,7 +215,7 @@ var Ct = function() {
|
|
|
214
215
|
var e = this.state.status;
|
|
215
216
|
if (e === qe) return null;
|
|
216
217
|
var n = this.props;
|
|
217
|
-
return (0, n.children)(e,
|
|
218
|
+
return (0, n.children)(e, Ne(n, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
|
|
218
219
|
}, Vt(a, [{ key: "node", get: function() {
|
|
219
220
|
var e, n = (e = this.props.nodeRef) === null || e === void 0 ? void 0 : e.current;
|
|
220
221
|
if (!n) throw new Error("notistack - Custom snackbar is not refForwarding");
|
|
@@ -233,12 +234,12 @@ function pt(t, a) {
|
|
|
233
234
|
};
|
|
234
235
|
}, [t, a]);
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
+
function Ke(t) {
|
|
237
238
|
var a = t.timeout, r = t.style, e = r === void 0 ? {} : r, n = t.mode;
|
|
238
239
|
return { duration: typeof a == "object" ? a[n] || 0 : a, easing: e.transitionTimingFunction, delay: e.transitionDelay };
|
|
239
240
|
}
|
|
240
241
|
ft.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: ye, onEntering: ye, onEntered: ye, onExit: ye, onExiting: ye, onExited: ye };
|
|
241
|
-
var io = "cubic-bezier(0.4, 0, 0.2, 1)", so = "cubic-bezier(0.0, 0, 0.2, 1)", lo = "cubic-bezier(0.4, 0, 0.6, 1)",
|
|
242
|
+
var io = "cubic-bezier(0.4, 0, 0.2, 1)", so = "cubic-bezier(0.0, 0, 0.2, 1)", lo = "cubic-bezier(0.4, 0, 0.6, 1)", Gt = function(t) {
|
|
242
243
|
t.scrollTop = t.scrollTop;
|
|
243
244
|
}, Dt = function(t) {
|
|
244
245
|
return Math.round(t) + "ms";
|
|
@@ -251,7 +252,7 @@ function ve(t, a) {
|
|
|
251
252
|
return l + " " + u + " " + i + " " + d;
|
|
252
253
|
}).join(",");
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
+
function Kt(t) {
|
|
255
256
|
var a = function(r) {
|
|
256
257
|
return r && r.ownerDocument || document;
|
|
257
258
|
}(t);
|
|
@@ -260,7 +261,7 @@ function Gt(t) {
|
|
|
260
261
|
function Be(t, a) {
|
|
261
262
|
if (a) {
|
|
262
263
|
var r = function(e, n) {
|
|
263
|
-
var o, i = n.getBoundingClientRect(), c =
|
|
264
|
+
var o, i = n.getBoundingClientRect(), c = Kt(n);
|
|
264
265
|
if (n.fakeTransform) o = n.fakeTransform;
|
|
265
266
|
else {
|
|
266
267
|
var s = c.getComputedStyle(n);
|
|
@@ -286,43 +287,43 @@ function Be(t, a) {
|
|
|
286
287
|
}
|
|
287
288
|
}
|
|
288
289
|
var $t = oe(function(t, a) {
|
|
289
|
-
var r = t.children, e = t.direction, n = e === void 0 ? "down" : e, o = t.in, i = t.style, c = t.timeout, s = c === void 0 ? 0 : c, l = t.onEnter, u = t.onEntered, d = t.onExit, m = t.onExited, b =
|
|
290
|
+
var r = t.children, e = t.direction, n = e === void 0 ? "down" : e, o = t.in, i = t.style, c = t.timeout, s = c === void 0 ? 0 : c, l = t.onEnter, u = t.onEntered, d = t.onExit, m = t.onExited, b = Ne(t, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), w = ne(null), x = pt(r.ref, w), y = pt(x, a), g = Z(function() {
|
|
290
291
|
w.current && Be(n, w.current);
|
|
291
292
|
}, [n]);
|
|
292
|
-
return
|
|
293
|
+
return j(function() {
|
|
293
294
|
if (!o && n !== "down" && n !== "right") {
|
|
294
295
|
var f = function(C, Y) {
|
|
295
|
-
var
|
|
296
|
+
var R;
|
|
296
297
|
function q() {
|
|
297
298
|
for (var B = this, z = arguments.length, _ = new Array(z), X = 0; X < z; X++) _[X] = arguments[X];
|
|
298
|
-
clearTimeout(
|
|
299
|
+
clearTimeout(R), R = setTimeout(function() {
|
|
299
300
|
C.apply(B, _);
|
|
300
301
|
}, Y);
|
|
301
302
|
}
|
|
302
303
|
return Y === void 0 && (Y = 166), q.clear = function() {
|
|
303
|
-
clearTimeout(
|
|
304
|
+
clearTimeout(R);
|
|
304
305
|
}, q;
|
|
305
306
|
}(function() {
|
|
306
307
|
w.current && Be(n, w.current);
|
|
307
|
-
}),
|
|
308
|
-
return
|
|
309
|
-
f.clear(),
|
|
308
|
+
}), O = Kt(w.current);
|
|
309
|
+
return O.addEventListener("resize", f), function() {
|
|
310
|
+
f.clear(), O.removeEventListener("resize", f);
|
|
310
311
|
};
|
|
311
312
|
}
|
|
312
|
-
}, [n, o]),
|
|
313
|
+
}, [n, o]), j(function() {
|
|
313
314
|
o || g();
|
|
314
|
-
}, [o, g]), le(ft, Object.assign({ appear: !0, nodeRef: w, onEnter: function(f,
|
|
315
|
-
Be(n, f),
|
|
315
|
+
}, [o, g]), le(ft, Object.assign({ appear: !0, nodeRef: w, onEnter: function(f, O) {
|
|
316
|
+
Be(n, f), Gt(f), l && l(f, O);
|
|
316
317
|
}, onEntered: u, onEntering: function(f) {
|
|
317
|
-
var
|
|
318
|
+
var O = i?.transitionTimingFunction || so, C = Ke({ timeout: s, mode: "enter", style: L({}, i, { transitionTimingFunction: O }) });
|
|
318
319
|
f.style.webkitTransition = ve("-webkit-transform", C), f.style.transition = ve("transform", C), f.style.webkitTransform = "none", f.style.transform = "none";
|
|
319
320
|
}, onExit: function(f) {
|
|
320
|
-
var
|
|
321
|
+
var O = i?.transitionTimingFunction || lo, C = Ke({ timeout: s, mode: "exit", style: L({}, i, { transitionTimingFunction: O }) });
|
|
321
322
|
f.style.webkitTransition = ve("-webkit-transform", C), f.style.transition = ve("transform", C), Be(n, f), d && d(f);
|
|
322
323
|
}, onExited: function(f) {
|
|
323
324
|
f.style.webkitTransition = "", f.style.transition = "", m && m(f);
|
|
324
|
-
}, in: o, timeout: s }, b), function(f,
|
|
325
|
-
return cn(r, L({ ref: y, style: L({ visibility: f !== "exited" || o ? void 0 : "hidden" }, i, {}, r.props.style) },
|
|
325
|
+
}, in: o, timeout: s }, b), function(f, O) {
|
|
326
|
+
return cn(r, L({ ref: y, style: L({ visibility: f !== "exited" || o ? void 0 : "hidden" }, i, {}, r.props.style) }, O));
|
|
326
327
|
});
|
|
327
328
|
});
|
|
328
329
|
$t.displayName = "Slide";
|
|
@@ -363,7 +364,7 @@ function Ie(t) {
|
|
|
363
364
|
}
|
|
364
365
|
var ho = "notistack-SnackbarContainer", go = "notistack-Snackbar", Zt = "notistack-CollapseWrapper", ko = "notistack-MuiContent", bo = function(t) {
|
|
365
366
|
return "notistack-MuiContent-" + t;
|
|
366
|
-
},
|
|
367
|
+
}, Mt = Ie({ root: { height: 0 }, entered: { height: "auto" } }), ot = "0px", Xt = oe(function(t, a) {
|
|
367
368
|
var r = t.children, e = t.in, n = t.onExited, o = ne(null), i = ne(null), c = pt(a, i), s = function() {
|
|
368
369
|
return o.current ? o.current.clientHeight : 0;
|
|
369
370
|
};
|
|
@@ -372,24 +373,24 @@ var ho = "notistack-SnackbarContainer", go = "notistack-Snackbar", Zt = "notista
|
|
|
372
373
|
}, onEntered: function(l) {
|
|
373
374
|
l.style.height = "auto";
|
|
374
375
|
}, onEntering: function(l) {
|
|
375
|
-
var u = s(), d =
|
|
376
|
+
var u = s(), d = Ke({ timeout: 175, mode: "enter" }), m = d.duration, b = d.easing;
|
|
376
377
|
l.style.transitionDuration = typeof m == "string" ? m : m + "ms", l.style.height = u + "px", l.style.transitionTimingFunction = b || "";
|
|
377
378
|
}, onExit: function(l) {
|
|
378
379
|
l.style.height = s() + "px";
|
|
379
380
|
}, onExited: n, onExiting: function(l) {
|
|
380
|
-
|
|
381
|
-
var u =
|
|
381
|
+
Gt(l);
|
|
382
|
+
var u = Ke({ timeout: 175, mode: "exit" }), d = u.duration, m = u.easing;
|
|
382
383
|
l.style.transitionDuration = typeof d == "string" ? d : d + "ms", l.style.height = ot, l.style.transitionTimingFunction = m || "";
|
|
383
384
|
}, nodeRef: i, timeout: 175 }, function(l, u) {
|
|
384
|
-
return le("div", Object.assign({ ref: c, className: fe(
|
|
385
|
+
return le("div", Object.assign({ ref: c, className: fe(Mt.root, l === "entered" && Mt.entered), style: L({ pointerEvents: "all", overflow: "hidden", minHeight: ot, transition: ve("height") }, l === "entered" && { overflow: "visible" }, {}, l === "exited" && !e && { visibility: "hidden" }) }, u), le("div", { ref: o, className: Zt, style: { display: "flex", width: "100%" } }, r));
|
|
385
386
|
});
|
|
386
387
|
});
|
|
387
388
|
Xt.displayName = "Collapse";
|
|
388
|
-
var
|
|
389
|
+
var Ot = { right: "left", left: "right", bottom: "up", top: "down" }, xo = function(t) {
|
|
389
390
|
return "anchorOrigin" + mt(t);
|
|
390
391
|
}, wo = function() {
|
|
391
392
|
};
|
|
392
|
-
function
|
|
393
|
+
function Pe(t, a) {
|
|
393
394
|
return t.reduce(function(r, e) {
|
|
394
395
|
return e == null ? r : function() {
|
|
395
396
|
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
|
|
@@ -398,7 +399,7 @@ function Ne(t, a) {
|
|
|
398
399
|
};
|
|
399
400
|
}, wo);
|
|
400
401
|
}
|
|
401
|
-
var yo = typeof window < "u" ? st :
|
|
402
|
+
var yo = typeof window < "u" ? st : j;
|
|
402
403
|
function Wt(t) {
|
|
403
404
|
var a = ne(t);
|
|
404
405
|
return yo(function() {
|
|
@@ -415,7 +416,7 @@ var rt, Qt = oe(function(t, a) {
|
|
|
415
416
|
b(null, "timeout", s);
|
|
416
417
|
}, g));
|
|
417
418
|
});
|
|
418
|
-
|
|
419
|
+
j(function() {
|
|
419
420
|
return l && w(n), function() {
|
|
420
421
|
m.current && clearTimeout(m.current);
|
|
421
422
|
};
|
|
@@ -425,7 +426,7 @@ var rt, Qt = oe(function(t, a) {
|
|
|
425
426
|
}, y = Z(function() {
|
|
426
427
|
n != null && w(0.5 * n);
|
|
427
428
|
}, [n, w]);
|
|
428
|
-
return
|
|
429
|
+
return j(function() {
|
|
429
430
|
if (!i && l) return window.addEventListener("focus", y), window.addEventListener("blur", x), function() {
|
|
430
431
|
window.removeEventListener("focus", y), window.removeEventListener("blur", x);
|
|
431
432
|
};
|
|
@@ -436,25 +437,25 @@ var rt, Qt = oe(function(t, a) {
|
|
|
436
437
|
} }), r);
|
|
437
438
|
});
|
|
438
439
|
Qt.displayName = "Snackbar";
|
|
439
|
-
var vo = Ie({ root: (rt = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, rt[
|
|
440
|
-
var r = t.className, e =
|
|
440
|
+
var vo = Ie({ root: (rt = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, rt[Ge] = { flexGrow: "initial", minWidth: "288px" }, rt) }), ht = oe(function(t, a) {
|
|
441
|
+
var r = t.className, e = Ne(t, ["className"]);
|
|
441
442
|
return S.createElement("div", Object.assign({ ref: a, className: fe(vo.root, r) }, e));
|
|
442
443
|
});
|
|
443
444
|
ht.displayName = "SnackbarContent";
|
|
444
|
-
var
|
|
445
|
+
var Oe = Ie({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), Ft = "notistack-snackbar", Yt = oe(function(t, a) {
|
|
445
446
|
var r = t.id, e = t.message, n = t.action, o = t.iconVariant, i = t.variant, c = t.hideIconVariant, s = t.style, l = t.className, u = o[i], d = n;
|
|
446
|
-
return typeof d == "function" && (d = d(r)), S.createElement(ht, { ref: a, role: "alert", "aria-describedby": Ft, style: s, className: fe(ko, bo(i),
|
|
447
|
+
return typeof d == "function" && (d = d(r)), S.createElement(ht, { ref: a, role: "alert", "aria-describedby": Ft, style: s, className: fe(ko, bo(i), Oe.root, Oe[i], l, !c && u && Oe.lessPadding) }, S.createElement("div", { id: Ft, className: Oe.message }, c ? null : u, e), d && S.createElement("div", { className: Oe.action }, d));
|
|
447
448
|
});
|
|
448
449
|
Yt.displayName = "MaterialDesignContent";
|
|
449
450
|
var We, at, _e, Ve, it, Eo = Ee(Yt), Co = Ie({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), So = function(t) {
|
|
450
|
-
var a = ne(), r = ee(!0), e = r[0], n = r[1], o =
|
|
451
|
+
var a = ne(), r = ee(!0), e = r[0], n = r[1], o = Pe([t.snack.onClose, t.onClose]), i = Z(function() {
|
|
451
452
|
a.current = setTimeout(function() {
|
|
452
453
|
n(function(B) {
|
|
453
454
|
return !B;
|
|
454
455
|
});
|
|
455
456
|
}, 125);
|
|
456
457
|
}, []);
|
|
457
|
-
|
|
458
|
+
j(function() {
|
|
458
459
|
return function() {
|
|
459
460
|
a.current && clearTimeout(a.current);
|
|
460
461
|
};
|
|
@@ -470,30 +471,30 @@ var We, at, _e, Ve, it, Eo = Ee(Yt), Co = Ie({ wrappedRoot: { width: "100%", pos
|
|
|
470
471
|
return L({}, _, ((he = {})[X] = B[X], he));
|
|
471
472
|
}, {});
|
|
472
473
|
}(l);
|
|
473
|
-
}, [l]), b = s.open, w = s.SnackbarProps, x = s.TransitionComponent, y = s.TransitionProps, g = s.transitionDuration, f = s.disableWindowBlurListener,
|
|
474
|
-
typeof
|
|
474
|
+
}, [l]), b = s.open, w = s.SnackbarProps, x = s.TransitionComponent, y = s.TransitionProps, g = s.transitionDuration, f = s.disableWindowBlurListener, O = s.content, C = Ne(s, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), Y = L({ direction: (c = C.anchorOrigin, c.horizontal !== "center" ? Ot[c.horizontal] : Ot[c.vertical]), timeout: g }, y), R = O;
|
|
475
|
+
typeof R == "function" && (R = R(C.id, C.message));
|
|
475
476
|
var q = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(B, z) {
|
|
476
477
|
var _;
|
|
477
|
-
return L({}, B, ((_ = {})[z] =
|
|
478
|
+
return L({}, B, ((_ = {})[z] = Pe([t.snack[z], t[z]], C.id), _));
|
|
478
479
|
}, {});
|
|
479
|
-
return S.createElement(Xt, { in: e, onExited: q.onExited }, S.createElement(Qt, { open: b, id: C.id, disableWindowBlurListener: f, autoHideDuration: C.autoHideDuration, className: fe(Co.wrappedRoot, m.root, m[xo(C.anchorOrigin)]), SnackbarProps: w, onClose: o }, S.createElement(x, Object.assign({}, Y, { appear: !0, in: b, onExit: q.onExit, onExited: i, onEnter: q.onEnter, onEntered:
|
|
480
|
+
return S.createElement(Xt, { in: e, onExited: q.onExited }, S.createElement(Qt, { open: b, id: C.id, disableWindowBlurListener: f, autoHideDuration: C.autoHideDuration, className: fe(Co.wrappedRoot, m.root, m[xo(C.anchorOrigin)]), SnackbarProps: w, onClose: o }, S.createElement(x, Object.assign({}, Y, { appear: !0, in: b, onExit: q.onExit, onExited: i, onEnter: q.onEnter, onEntered: Pe([q.onEntered, function() {
|
|
480
481
|
t.snack.requestClose && o(null, "instructed", t.snack.id);
|
|
481
|
-
}], C.id) }),
|
|
482
|
-
}, Fe = { default: 20 }, ze = { default: 6, dense: 2 },
|
|
482
|
+
}], C.id) }), R || S.createElement(d, Object.assign({}, C)))));
|
|
483
|
+
}, Fe = { default: 20 }, ze = { default: 6, dense: 2 }, Pt = "." + Zt, Ue = Ie({ root: (We = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: ve(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, We[Pt] = { padding: ze.default + "px 0px", transition: "padding 300ms ease 0ms" }, We.maxWidth = "calc(100% - " + 2 * Fe.default + "px)", We[nt] = { width: "100%", maxWidth: "calc(100% - 32px)" }, We), rootDense: (at = {}, at[Pt] = { padding: ze.dense + "px 0px" }, at), top: { top: Fe.default - ze.default + "px", flexDirection: "column" }, bottom: { bottom: Fe.default - ze.default + "px", flexDirection: "column-reverse" }, left: (_e = { left: Fe.default + "px" }, _e[Ge] = { alignItems: "flex-start" }, _e[nt] = { left: "16px" }, _e), right: (Ve = { right: Fe.default + "px" }, Ve[Ge] = { alignItems: "flex-end" }, Ve[nt] = { right: "16px" }, Ve), center: (it = { left: "50%", transform: "translateX(-50%)" }, it[Ge] = { alignItems: "center" }, it) }), Lo = Ee(function(t) {
|
|
483
484
|
var a = t.classes, r = a === void 0 ? {} : a, e = t.anchorOrigin, n = t.dense, o = t.children, i = fe(ho, Ue[e.vertical], Ue[e.horizontal], Ue.root, r.containerRoot, r["containerAnchorOrigin" + mt(e)], n && Ue.rootDense);
|
|
484
485
|
return S.createElement("div", { className: i }, o);
|
|
485
|
-
}),
|
|
486
|
+
}), Nt = function(t) {
|
|
486
487
|
return !(typeof t == "string" || ln(t));
|
|
487
488
|
}, To = function(t) {
|
|
488
489
|
function a(r) {
|
|
489
490
|
var e;
|
|
490
491
|
return (e = t.call(this, r) || this).enqueueSnackbar = function(n, o) {
|
|
491
492
|
if (o === void 0 && (o = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
|
|
492
|
-
var i =
|
|
493
|
+
var i = Nt(n) ? n : o, c = Nt(n) ? n.message : n, s = i.key, l = i.preventDuplicate, u = Ne(i, ["key", "preventDuplicate"]), d = je(s), m = d ? s : (/* @__PURE__ */ new Date()).getTime() + Math.random(), b = fo(u, e.props), w = L({ id: m }, u, { message: c, open: !0, entered: !1, requestClose: !1, persist: b("persist"), action: b("action"), content: b("content"), variant: b("variant"), anchorOrigin: b("anchorOrigin"), disableWindowBlurListener: b("disableWindowBlurListener"), autoHideDuration: b("autoHideDuration"), hideIconVariant: b("hideIconVariant"), TransitionComponent: b("TransitionComponent"), transitionDuration: b("transitionDuration"), TransitionProps: b("TransitionProps", !0), iconVariant: b("iconVariant", !0), style: b("style", !0), SnackbarProps: b("SnackbarProps", !0), className: fe(e.props.className, u.className) });
|
|
493
494
|
return w.persist && (w.autoHideDuration = void 0), e.setState(function(x) {
|
|
494
495
|
if (l === void 0 && e.props.preventDuplicate || l) {
|
|
495
|
-
var y = function(
|
|
496
|
-
return d ?
|
|
496
|
+
var y = function(O) {
|
|
497
|
+
return d ? O.id === m : O.message === c;
|
|
497
498
|
}, g = x.queue.findIndex(y) > -1, f = x.snacks.findIndex(y) > -1;
|
|
498
499
|
if (g || f) return x;
|
|
499
500
|
}
|
|
@@ -517,7 +518,7 @@ var We, at, _e, Ve, it, Eo = Ee(Yt), Co = Ie({ wrappedRoot: { width: "100%", pos
|
|
|
517
518
|
});
|
|
518
519
|
return L({}, n, { snacks: c });
|
|
519
520
|
}, e.handleEnteredSnack = function(n, o, i) {
|
|
520
|
-
if (!
|
|
521
|
+
if (!je(i)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
|
|
521
522
|
e.setState(function(c) {
|
|
522
523
|
return { snacks: c.snacks.map(function(s) {
|
|
523
524
|
return s.id === i ? L({}, s, { entered: !0 }) : L({}, s);
|
|
@@ -538,9 +539,9 @@ var We, at, _e, Ve, it, Eo = Ee(Yt), Co = Ie({ wrappedRoot: { width: "100%", pos
|
|
|
538
539
|
var o = e.state.snacks.find(function(i) {
|
|
539
540
|
return i.id === n;
|
|
540
541
|
});
|
|
541
|
-
|
|
542
|
+
je(n) && o && o.onClose && o.onClose(null, "instructed", n), e.handleCloseSnack(null, "instructed", n);
|
|
542
543
|
}, e.handleExitedSnack = function(n, o) {
|
|
543
|
-
if (!
|
|
544
|
+
if (!je(o)) throw new Error("handleExitedSnack Cannot be called with undefined key");
|
|
544
545
|
e.setState(function(i) {
|
|
545
546
|
var c = e.processQueue(L({}, i, { snacks: i.snacks.filter(function(s) {
|
|
546
547
|
return s.id !== o;
|
|
@@ -556,23 +557,23 @@ var We, at, _e, Ve, it, Eo = Ee(Yt), Co = Ie({ wrappedRoot: { width: "100%", pos
|
|
|
556
557
|
}, {}), b = Object.keys(m).map(function(w) {
|
|
557
558
|
var x = m[w], y = x[0];
|
|
558
559
|
return S.createElement(Lo, { key: w, dense: s, anchorOrigin: y.anchorOrigin, classes: d }, x.map(function(g) {
|
|
559
|
-
return S.createElement(So, { key: g.id, snack: g, classes: d, Component: u[g.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited:
|
|
560
|
+
return S.createElement(So, { key: g.id, snack: g, classes: d, Component: u[g.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited: Pe([r.handleExitedSnack, r.props.onExited], g.id), onEntered: Pe([r.handleEnteredSnack, r.props.onEntered], g.id) });
|
|
560
561
|
}));
|
|
561
562
|
});
|
|
562
|
-
return S.createElement(Ut.Provider, { value: e }, i, o ?
|
|
563
|
+
return S.createElement(Ut.Provider, { value: e }, i, o ? Bn(b, o) : b);
|
|
563
564
|
}, Vt(a, [{ key: "maxSnack", get: function() {
|
|
564
565
|
return this.props.maxSnack || de.maxSnack;
|
|
565
566
|
} }]), a;
|
|
566
567
|
}(At), Jt = function() {
|
|
567
568
|
return sn(Ut);
|
|
568
569
|
};
|
|
569
|
-
const ae = { card: "
|
|
570
|
+
const ae = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, en = oe((t, a) => {
|
|
570
571
|
const { id: r, message: e, iconVariant: n, error: o, hideIconVariant: i, ...c } = t, { closeSnackbar: s } = Jt(), l = un(), [u, d] = ee(!1), m = Z(() => {
|
|
571
572
|
d((x) => !x);
|
|
572
573
|
}, []), b = Z(() => {
|
|
573
574
|
s(r);
|
|
574
575
|
}, [r, s]), w = o?.message || String(e);
|
|
575
|
-
return h(ht, { ref: a, className: lt(ae.root, "error-snackbar"), children: ie(
|
|
576
|
+
return h(ht, { ref: a, className: lt(ae.root, "error-snackbar"), children: ie(_n, { className: ae.card, style: { backgroundColor: l.palette.error.dark, border: `1px solid ${l.palette.error.dark}` }, children: [ie(Vn, { className: ae.actionRoot, children: [i ? null : n?.error, h(zn, { variant: "body2", component: "div", className: ae.typography, style: { color: l.palette.text.primary }, children: w }), h("div", { style: { flex: "1 1 auto" } }), ie("div", { className: ae.icons, children: [o ? h(ut, { "aria-label": "Show more", size: "small", className: lt(ae.expand, { [ae.expandOpen]: u }), style: { color: l.palette.action.active }, onClick: m, children: h(Xn, {}) }) : null, h(ut, { size: "small", className: ae.expand, style: { color: l.palette.action.active }, onClick: b, children: h(Qn, { fontSize: "small" }) })] })] }), o ? h(Un, { in: u, timeout: "auto", unmountOnExit: !0, children: h("div", { className: ae.stackTraceContainer, style: { backgroundColor: l.palette.error.light, borderTop: `1px solid ${l.palette.error.main}` }, children: h(dn, { error: o, hideLineNumbers: !0 }) }) }) : null] }) });
|
|
576
577
|
});
|
|
577
578
|
en.displayName = "ToastError";
|
|
578
579
|
const tn = Ee(oe((t, a) => {
|
|
@@ -601,55 +602,55 @@ const Do = h(En, { label: "SheetXL", description: "Visit me at sheetxl.com.", ch
|
|
|
601
602
|
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), nn = Ee(oe((t, a) => {
|
|
602
603
|
const { commands: r, workbook: e, logo: n = Do, mainElement: o, showFileMenu: i = !0, showAppearanceMenu: c = !0, ...s } = t, { reference: l } = wn(), [u, { width: d }] = yn(), m = d < 530, b = i ? h(tn, { commands: r, commandHook: { beforeExecute() {
|
|
603
604
|
l?.closeAll();
|
|
604
|
-
}, onError(g, f,
|
|
605
|
+
}, onError(g, f, O) {
|
|
605
606
|
} } }) : null, w = c ? h(Sn, { commands: r, commandHook: { beforeExecute() {
|
|
606
607
|
l?.closeAll();
|
|
607
|
-
}, onError(g, f,
|
|
608
|
+
}, onError(g, f, O) {
|
|
608
609
|
} } }) : null, x = $(() => ({ paddingLeft: (g) => g.spacing(1), paddingRight: (g) => g.spacing(1) }), []), y = ne(null);
|
|
609
|
-
return h(ue, { ref:
|
|
610
|
+
return h(ue, { ref: Ht([y, u, a]), ...s, children: vn({ commands: r, renderCompact: m, workbook: e, selectWrapper: (g) => ie(ue, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (f) => f.spacing(1), paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }, children: [ie(ue, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (f) => f.spacing(0.5) }, children: [n, ie(ue, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (f) => f.spacing(0.25) }, children: [b, g] })] }), h(ue, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: o }), h(ue, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: m && !w ? "0 0 auto" : "1 1 100%" }, children: w })] }), selectProps: x, toolbarsProps: { Home: { sx: {} } } }) });
|
|
610
611
|
}));
|
|
611
612
|
nn.displayName = "StandaloneWorkbookToolbar";
|
|
612
613
|
const on = Ee(oe((t, a) => {
|
|
613
614
|
const { workbook: r, setWorkbook: e, refWorkbookTitle: n, titleWorkbook: o, setWorkbookTitle: i, titlePlaceHolder: c, children: s, undoManager: l, commands: u, importExportDisabled: d, themeModeOptions: m } = t, b = Jt(), w = b ? b.enqueueSnackbar : () => {
|
|
614
615
|
}, x = b ? b.closeSnackbar : () => {
|
|
615
616
|
}, [y, g] = ee({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), f = Z(() => {
|
|
616
|
-
g((
|
|
617
|
-
}, []),
|
|
618
|
-
g((
|
|
619
|
-
}, []), C =
|
|
620
|
-
const
|
|
617
|
+
g((M) => ({ ...M, isMounted: !0 }));
|
|
618
|
+
}, []), O = Z(() => {
|
|
619
|
+
g((M) => ({ ...M, isMounted: !1 }));
|
|
620
|
+
}, []), C = Mn(), Y = On(), R = Wn(), q = ne(/* @__PURE__ */ new Set()), B = $(() => {
|
|
621
|
+
const M = (v, E) => {
|
|
621
622
|
if (E?.onceKey) {
|
|
622
623
|
if (q.current.has(E.onceKey)) return;
|
|
623
624
|
const T = new Set(q.current);
|
|
624
625
|
T.add(E.onceKey), q.current = T;
|
|
625
626
|
}
|
|
626
|
-
const W = { variant: E?.type ??
|
|
627
|
+
const W = { variant: E?.type ?? Re.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: E?.preventDuplicate, persist: E?.persist ?? E?.type === Re.Error, action: (T) => h(ut, { onClick: () => x(T), children: h(Yn, {}) }) };
|
|
627
628
|
E?.enqueueProps && Object.assign(W, E.enqueueProps), v || console.log("message is 'null'", E), w(v ?? "Alert", W);
|
|
628
629
|
};
|
|
629
|
-
return { showMessage:
|
|
630
|
+
return { showMessage: M, showBusy: (v, E) => {
|
|
630
631
|
let W = null;
|
|
631
|
-
const T = new Promise((
|
|
632
|
-
W =
|
|
632
|
+
const T = new Promise((H) => {
|
|
633
|
+
W = H;
|
|
633
634
|
});
|
|
634
|
-
return g((
|
|
635
|
-
const I = new Map(
|
|
636
|
-
return I.set(T, W), { ...
|
|
635
|
+
return g((H) => {
|
|
636
|
+
const I = new Map(H.starting);
|
|
637
|
+
return I.set(T, W), { ...H, label: v, starting: I };
|
|
637
638
|
}), T;
|
|
638
639
|
}, showWindow: (v, E, W) => {
|
|
639
|
-
const T = { ...E, onKeyDown: (
|
|
640
|
-
u?.dispatchToFocusedCommand(
|
|
640
|
+
const T = { ...E, onKeyDown: (H) => {
|
|
641
|
+
u?.dispatchToFocusedCommand(H), H.isDefaultPrevented() || H.isPropagationStopped() || E?.onKeyDown?.(H);
|
|
641
642
|
} };
|
|
642
|
-
return C(v, { sort: () => import("./
|
|
643
|
-
}, showOptions: Y, showInputOptions:
|
|
644
|
-
let E, W =
|
|
645
|
-
typeof v == "string" ? T = v : v instanceof Error && (E = v, v.message && (T = v.message)), v instanceof
|
|
643
|
+
return C(v, { sort: () => import("./BQSJPoCxw_CbM_GB.mjs"), numberFormat: () => import("./Cdr3G0s5DSG6bX6w.mjs"), hyperlink: () => import("./CoPf1k9QR8u7c9dJ.mjs"), comments: () => import("./B3E24eA0KrqZGcc6.mjs"), find: () => import("./Cbj_GBiwqMbV7xNp.mjs"), tableDetails: () => import("./oJzTpcQBF382AsoK.mjs"), tableNew: () => import("./CSEDlIO1VyJbsJUh.mjs"), namedDetails: () => import("./D7kxhKOLn3UAkGzE.mjs") }[v], T, W);
|
|
644
|
+
}, showOptions: Y, showInputOptions: R, showError: (v) => {
|
|
645
|
+
let E, W = Re.Error, T = "Unknown Error";
|
|
646
|
+
typeof v == "string" ? T = v : v instanceof Error && (E = v, v.message && (T = v.message)), v instanceof $n && (W = Re.Info), M(T, { type: W, enqueueProps: { error: E } });
|
|
646
647
|
} };
|
|
647
648
|
}, []), z = Z(() => {
|
|
648
|
-
}, []), _ = ((
|
|
649
|
-
const { workbook: v, setWorkbook: E, importExportDisabled: W, workbookTitle: T = "export", setWorkbookTitle:
|
|
649
|
+
}, []), _ = ((M) => {
|
|
650
|
+
const { workbook: v, setWorkbook: E, importExportDisabled: W, workbookTitle: T = "export", setWorkbookTitle: H, notifier: I, requestWorkbookTitle: J, themeModeOptions: F, undoManager: Ae, commands: Q, onExecute: ke } = M, He = te(F?.onForceModeChange, [F?.onForceModeChange]), Ze = te(F?.onForceLightGridChange, [F?.onForceLightGridChange]), be = te(F?.onForceLightImagesChange, [F?.onForceLightImagesChange]), Xe = te(async (D = null, U = null) => {
|
|
650
651
|
const p = [];
|
|
651
|
-
let k,
|
|
652
|
-
if (typeof D == "string" ?
|
|
652
|
+
let k, P = null, G = null;
|
|
653
|
+
if (typeof D == "string" ? G = D : P = D, k = P ? D : await Ln.openFileDialog(G ?? pe.getAllReadFormatTypeAsString().join(",")), !k) return null;
|
|
653
654
|
const se = { source: k, constructorOptions: U, onWarning: (Ye) => {
|
|
654
655
|
p.push(Ye);
|
|
655
656
|
} }, Le = await pe.read(se, I);
|
|
@@ -666,36 +667,36 @@ const on = Ee(oe((t, a) => {
|
|
|
666
667
|
} }), []), ce = $(() => {
|
|
667
668
|
const D = [];
|
|
668
669
|
W || (pe.getWriteFormats().forEach((p) => {
|
|
669
|
-
const k = p.isDefault,
|
|
670
|
-
k && (
|
|
670
|
+
const k = p.isDefault, P = { label: k ? "Save Workbook" : `Save Workbook as ${p.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${p.description}` }, tags: p.tags, description: `Save the workbook to the desktop${k ? "" : ` as ${p.description}`}.` };
|
|
671
|
+
k && (P.shortcut = { key: "S", modifiers: [De.Ctrl] }, D.push(new K("saveWorkbookAs", A, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [De.Shift, De.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
671
672
|
Ce(v, null, p).catch((se) => {
|
|
672
673
|
I?.showError?.(se);
|
|
673
674
|
});
|
|
674
675
|
})));
|
|
675
|
-
const
|
|
676
|
-
D.push(new G
|
|
676
|
+
const G = k ? "saveWorkbook" : `saveWorkbookAs${p.key}`;
|
|
677
|
+
D.push(new K(G, A, P, (se) => {
|
|
677
678
|
Ce(v, se ?? T, p).catch((Le) => {
|
|
678
679
|
I?.showError?.(Le);
|
|
679
680
|
});
|
|
680
681
|
}));
|
|
681
|
-
}), D.push(new
|
|
682
|
+
}), D.push(new K("openWorkbook", A, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [De.Ctrl] } }, async (p = null) => {
|
|
682
683
|
const k = { date1904: v.isDate1904(), ...v.options };
|
|
683
684
|
try {
|
|
684
|
-
const
|
|
685
|
-
if (!
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
688
|
-
const Ye = v.findValidSheetName(
|
|
685
|
+
const P = await Xe(p, k);
|
|
686
|
+
if (!P) return;
|
|
687
|
+
const G = P.title, se = P.workbook, Le = se.getSelectedSheet();
|
|
688
|
+
if (P.formatType.mimeType === "text/csv") {
|
|
689
|
+
const Ye = v.findValidSheetName(G);
|
|
689
690
|
await v.doBatch(async () => {
|
|
690
691
|
const gt = Le.getUsedRange();
|
|
691
692
|
if (!gt) return void I?.showMessage("The file appears to be blank.");
|
|
692
693
|
await v.getSheets().add({ name: Ye, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(gt);
|
|
693
|
-
}, `Import CSV '${
|
|
694
|
-
} else v?.close(),
|
|
695
|
-
} catch (
|
|
696
|
-
I?.showError?.(
|
|
694
|
+
}, `Import CSV '${G}'`);
|
|
695
|
+
} else v?.close(), H?.(G), E(se);
|
|
696
|
+
} catch (P) {
|
|
697
|
+
I?.showError?.(P);
|
|
697
698
|
}
|
|
698
|
-
})), D.push(new
|
|
699
|
+
})), D.push(new K("openWorkbookFromUrl", A, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(p) {
|
|
699
700
|
if (!p) {
|
|
700
701
|
const k = await I?.showInputOptions?.({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
|
|
701
702
|
if (k.option !== "Open") return;
|
|
@@ -704,30 +705,30 @@ const on = Ee(oe((t, a) => {
|
|
|
704
705
|
p && console.log("openWorkbookFromUrl", p);
|
|
705
706
|
})));
|
|
706
707
|
let U = [];
|
|
707
|
-
return F && (U = [new
|
|
708
|
+
return F && (U = [new K("themeMode", A, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new K("defaultThemeMode", A, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new K("forceLightGrid", A, { label: "Force Light Grid", description: "Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new K("forceLightImages", A, { label: "Force Light Images", description: "Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...D, ...U, new xt("help", A, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
|
|
708
709
|
}), new xt("showKeyboardShortcuts", A, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [De.Ctrl] } }, () => {
|
|
709
|
-
}), new
|
|
710
|
+
}), new K("gotoUrlGithub", A, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
|
|
710
711
|
window?.open("https://github.com/sheetxl/sheetxl");
|
|
711
|
-
}), new
|
|
712
|
+
}), new K("gotoUrlDiscord", A, { label: "Discord", description: "Join our community on discord." }, () => {
|
|
712
713
|
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
713
|
-
}), new
|
|
714
|
+
}), new K("gotoUrlDocumentation", A, { label: "Documentation", description: "Read the documentation." }, () => {
|
|
714
715
|
window?.open("https://www.sheetxl.com/docs");
|
|
715
|
-
}), new
|
|
716
|
+
}), new K("gotoUrlIssue", A, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
716
717
|
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
717
718
|
})];
|
|
718
719
|
}, [v, T, I, W, F, Q, Ae]), V = $(() => {
|
|
719
720
|
let D = null;
|
|
720
|
-
return D = Q ? Q.createChildGroup(A, "standaloneWorkbook", !1) : new
|
|
721
|
+
return D = Q ? Q.createChildGroup(A, "standaloneWorkbook", !1) : new Rt(A, "standaloneWorkbook"), D.addCommands(ce, !0), D;
|
|
721
722
|
}, [Q, ce]);
|
|
722
723
|
Tn({ manager: Ae, commands: V, notifier: I });
|
|
723
|
-
const { themeMode: Se } =
|
|
724
|
-
|
|
724
|
+
const { themeMode: Se } = jt();
|
|
725
|
+
j(() => {
|
|
725
726
|
if (!F || !V) return;
|
|
726
727
|
const D = F.forceMode === "dark" || !F.forceMode && Se === "dark";
|
|
727
728
|
V.getCommand("themeMode").update({ state: F.forceMode ?? null, label: D ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: D ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
728
|
-
|
|
729
|
+
He(D ? ct.Light : ct.Dark);
|
|
729
730
|
}), V.getCommand("defaultThemeMode").update({ state: !F.forceMode }).updateCallback(() => {
|
|
730
|
-
|
|
731
|
+
He(null);
|
|
731
732
|
}), V.getCommand("forceLightGrid").update({ state: F.forceLightGrid }).updateCallback(() => {
|
|
732
733
|
Ze(!F.forceLightGrid);
|
|
733
734
|
}), V.getCommand("forceLightImages").update({ state: F.forceLightImages }).updateCallback(() => {
|
|
@@ -735,54 +736,54 @@ const on = Ee(oe((t, a) => {
|
|
|
735
736
|
});
|
|
736
737
|
}, [Se, F, ce]);
|
|
737
738
|
const { showModal: Qe } = Dn();
|
|
738
|
-
return
|
|
739
|
+
return j(() => {
|
|
739
740
|
const D = () => new Promise((U, p) => {
|
|
740
|
-
const k = S.lazy(() => import("./
|
|
741
|
-
|
|
741
|
+
const k = S.lazy(() => import("./Sg5ukHMhDKaJmwC5.mjs")), P = Qe(k, { title: "Shortcut Keys Reference", commands: V, onDone: () => {
|
|
742
|
+
P.hide();
|
|
742
743
|
}, TransitionProps: { onExited: () => {
|
|
743
744
|
U(!0);
|
|
744
745
|
} } });
|
|
745
746
|
});
|
|
746
747
|
V.getCommand("showKeyboardShortcuts").updateCallback(() => D()), V.getCommand("help").updateCallback(() => D());
|
|
747
748
|
}, [ce, V]), V;
|
|
748
|
-
})({ workbook: r, setWorkbook: e, importExportDisabled: d, workbookTitle: o, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (
|
|
749
|
+
})({ workbook: r, setWorkbook: e, importExportDisabled: d, workbookTitle: o, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (M) => new Promise((v) => {
|
|
749
750
|
n.current ? n.current.requestWorkbookTitle((E, W) => {
|
|
750
751
|
v(E);
|
|
751
|
-
}, { selectAll: !0, requestReason:
|
|
752
|
+
}, { selectAll: !0, requestReason: M }) : v(c);
|
|
752
753
|
}), themeModeOptions: m, undoManager: l, notifier: B, onExecute: z });
|
|
753
|
-
|
|
754
|
-
y.starting.size <= 0 || !y.isMounted || g((
|
|
755
|
-
const v = new Map(
|
|
756
|
-
return
|
|
754
|
+
j(() => {
|
|
755
|
+
y.starting.size <= 0 || !y.isMounted || g((M) => {
|
|
756
|
+
const v = new Map(M.running);
|
|
757
|
+
return M.starting.forEach((E, W) => {
|
|
757
758
|
const T = () => {
|
|
758
|
-
g((
|
|
759
|
-
const I = new Map(
|
|
760
|
-
return I.delete(W), { ...
|
|
759
|
+
g((H) => {
|
|
760
|
+
const I = new Map(H.running);
|
|
761
|
+
return I.delete(W), { ...H, running: I };
|
|
761
762
|
});
|
|
762
763
|
};
|
|
763
764
|
v.set(W, T), E(T);
|
|
764
|
-
}), { ...
|
|
765
|
+
}), { ...M, starting: /* @__PURE__ */ new Map(), running: v };
|
|
765
766
|
});
|
|
766
767
|
}, [y]);
|
|
767
768
|
const [X, he] = ee(null);
|
|
768
|
-
|
|
769
|
-
y.starting.size !== 0 || y.running.size !== 0 ? he(h(qt, { icon: h(Fn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: y.label, onMount: f, onUnmount:
|
|
769
|
+
j(() => {
|
|
770
|
+
y.starting.size !== 0 || y.running.size !== 0 ? he(h(qt, { icon: h(Fn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: y.label, onMount: f, onUnmount: O, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : he(null);
|
|
770
771
|
}, [y.starting, y.running]);
|
|
771
|
-
const
|
|
772
|
-
return r && (ge.statusBarProps = { childrenEnd:
|
|
772
|
+
const N = $(() => h(Pn, { commands: _, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [_]), ge = { notifier: B, commands: _ };
|
|
773
|
+
return r && (ge.statusBarProps = { childrenEnd: N }), ie(It, { children: [X, s ? S.cloneElement(s, ge) : null] });
|
|
773
774
|
}));
|
|
774
775
|
on.displayName = "SnackbarAndCommandsWrapper";
|
|
775
776
|
const rn = Ee(oe((t, a) => {
|
|
776
|
-
const { className: r, sx: e, style: n, onElementLoad: o, onError: i, undoManager: c, errorPanel: s =
|
|
777
|
-
|
|
778
|
-
v(c ?? new
|
|
777
|
+
const { className: r, sx: e, style: n, onElementLoad: o, onError: i, undoManager: c, errorPanel: s = Nn, onKeyDown: l, workbook: u, createWorkbookOptions: d, onWorkbookChange: m, logo: b, importExportDisabled: w = !1, themeModeOptions: x, autoFocus: y = !1, commands: g, title: f, onTitleChange: O, titleProps: C, ...Y } = t, R = ne(null), q = te(m, [m]), B = te(O ?? C?.onTitleChange, [O ?? C?.onTitleChange]), z = C?.placeHolder ?? "Untitled", _ = x?.forceMode, { themeMode: X, source: he } = jt({ mode: _ }), N = $(() => ({ ...x, light: wt(!1, et.deepMerge(x?.theme ?? {}, x?.light ?? {})), dark: wt(!0, et.deepMerge(x?.theme ?? {}, x?.dark ?? {})) }), [x]), ge = X === ct.Dark, [M, v] = ee(null);
|
|
778
|
+
j(() => {
|
|
779
|
+
v(c ?? new Zn());
|
|
779
780
|
}, [c]);
|
|
780
|
-
const [E, W] = ee(null), [T,
|
|
781
|
+
const [E, W] = ee(null), [T, H] = ee(null), I = In();
|
|
781
782
|
st(() => {
|
|
782
783
|
if (!u || Object.keys(u).length === 0 && !et.isPromiseLike(u)) {
|
|
783
784
|
const p = { theme: I.getDefaultTheme(), ...d };
|
|
784
|
-
|
|
785
|
-
} else
|
|
785
|
+
H(new yt(p));
|
|
786
|
+
} else H(u);
|
|
786
787
|
}, [u]), st(() => {
|
|
787
788
|
if (T) {
|
|
788
789
|
if (T instanceof yt) return W({ workbook: T }), void (u !== T && q?.(T));
|
|
@@ -797,63 +798,63 @@ const rn = Ee(oe((t, a) => {
|
|
|
797
798
|
}
|
|
798
799
|
}, [T]);
|
|
799
800
|
const [J, F] = ee(null);
|
|
800
|
-
|
|
801
|
-
if (!
|
|
802
|
-
|
|
801
|
+
j(() => {
|
|
802
|
+
if (!M || !E) return;
|
|
803
|
+
M.clear();
|
|
803
804
|
const p = E?.workbook?.getTransactions();
|
|
804
805
|
if (p)
|
|
805
806
|
return p.addListener({ onCommitEnd: (k) => {
|
|
806
|
-
k.getDescription() ?
|
|
807
|
+
k.getDescription() ? M.addUndoOperation({ description: k.getDescription(), undo: () => (p.revert(k.getId()), J.source?.focus(), () => {
|
|
807
808
|
p.restore(k.getId()), J.source?.focus();
|
|
808
809
|
}) }) : console.warn("commit has no description", k);
|
|
809
810
|
} });
|
|
810
|
-
}, [
|
|
811
|
+
}, [M, E, J]);
|
|
811
812
|
const Ae = te((p) => {
|
|
812
|
-
p ?
|
|
813
|
-
}, [
|
|
814
|
-
|
|
813
|
+
p ? M.setRepeatableOperation({ description: p.label(), repeat: async () => p.execute() }) : M.setRepeatableOperation(null);
|
|
814
|
+
}, [M]), [Q, ke] = ee(f ?? C?.title ?? "");
|
|
815
|
+
j(() => {
|
|
815
816
|
ke(f ?? C?.title ?? "");
|
|
816
|
-
}, [f ?? C?.title]),
|
|
817
|
+
}, [f ?? C?.title]), j(() => {
|
|
817
818
|
B?.(Q);
|
|
818
819
|
}, [Q]);
|
|
819
|
-
const [
|
|
820
|
+
const [He, Ze] = ee(null), be = $(() => {
|
|
820
821
|
const p = () => ({ contains: (k) => !0, focus() {
|
|
821
822
|
} });
|
|
822
|
-
return g ? g.createChildGroup(p, "application", !1) : new
|
|
823
|
+
return g ? g.createChildGroup(p, "application", !1) : new Rt(p, "application");
|
|
823
824
|
}, [g]), Xe = te((p) => {
|
|
824
825
|
Ze(p.source.getViewportElement()), F(p), be.activate("sheet"), o?.(p);
|
|
825
826
|
}, [be]);
|
|
826
|
-
|
|
827
|
+
j(() => {
|
|
827
828
|
J && y && J.source?.focus(typeof y == "object" ? y : void 0);
|
|
828
829
|
}, [J]);
|
|
829
830
|
const Ce = ne(null), A = Z((p) => {
|
|
830
831
|
let k = null;
|
|
831
|
-
return C?.hidden || (k = h(
|
|
832
|
-
ke(
|
|
833
|
-
} })), h(nn, { ...p, logo: b, mainElement: k, showFileMenu: !w, showAppearanceMenu: !!(
|
|
834
|
-
}, [b, Q, C,
|
|
835
|
-
|
|
832
|
+
return C?.hidden || (k = h(An, { ...C, style: { maxWidth: "100%", ...C?.style }, workbook: R.current, ref: Ce, title: Q, placeHolder: z, onTitleChange: (P) => {
|
|
833
|
+
ke(P);
|
|
834
|
+
} })), h(nn, { ...p, logo: b, mainElement: k, showFileMenu: !w, showAppearanceMenu: !!(N?.onForceLightGridChange || N?.onForceLightImagesChange || N?.onForceModeChange) });
|
|
835
|
+
}, [b, Q, C, N, w, be]);
|
|
836
|
+
j(() => {
|
|
836
837
|
const p = (k) => k.preventDefault();
|
|
837
|
-
return
|
|
838
|
-
|
|
838
|
+
return R.current?.addEventListener("wheel", p, { passive: !1 }), () => {
|
|
839
|
+
R.current?.removeEventListener("wheel", p);
|
|
839
840
|
};
|
|
840
841
|
}, []);
|
|
841
|
-
const ce = $(() => h(qt, { transparentBackground: !0, sx: e, style: n }), [e, n]), V = Z(({ error: p }) => (i?.(p), h(s, { sx: e, style: n, error: p ?? "Unable to display empty workbook." })), [e, n, i]), Se = $(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (p) => p.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), Qe =
|
|
842
|
+
const ce = $(() => h(qt, { transparentBackground: !0, sx: e, style: n }), [e, n]), V = Z(({ error: p }) => (i?.(p), h(s, { sx: e, style: n, error: p ?? "Unable to display empty workbook." })), [e, n, i]), Se = $(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (p) => p.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), Qe = Ht([R, a]), D = $(() => {
|
|
842
843
|
if (!E) return ce;
|
|
843
844
|
if (E.error || !E.workbook) return V({ error: E.error });
|
|
844
|
-
let p = null, k = null,
|
|
845
|
-
return
|
|
846
|
-
l?.(
|
|
847
|
-
}, gridTheme: k, headersTheme: p, forceLightImages:
|
|
848
|
-
}, [E, Q,
|
|
849
|
-
let U = h(eo, { fallbackRender: V, children: h(To, { maxSnack: 3, domRoot:
|
|
850
|
-
|
|
851
|
-
}, Components: { error: en }, iconVariant: { success: h(
|
|
852
|
-
return
|
|
845
|
+
let p = null, k = null, P = !1;
|
|
846
|
+
return N && (p = ge ? N.dark : N.light, k = ge && !N.forceLightGrid ? N.dark : N.light, P = N.forceLightImages), h(Hn, { sx: Se, style: n, tabIndex: 0, autoFocus: !0, workbook: E.workbook, ref: Qe, renderToolbar: A, onElementLoad: Xe, onRepeatCommandChange: Ae, onKeyDown: (G) => {
|
|
847
|
+
l?.(G);
|
|
848
|
+
}, gridTheme: k, headersTheme: p, forceLightImages: P, className: lt(r, "sheetxl-workbook"), onContextMenu: (G) => G.preventDefault(), ...Y }, "WorkbookElement");
|
|
849
|
+
}, [E, Q, M, ce, N, Y, A, Se]);
|
|
850
|
+
let U = h(eo, { fallbackRender: V, children: h(To, { maxSnack: 3, domRoot: He, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (p, k, P) => {
|
|
851
|
+
R.current?.focus();
|
|
852
|
+
}, Components: { error: en }, iconVariant: { success: h(Gn, { style: { marginRight: "8px" }, children: h("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: h(jn, { style: { marginRight: "8px" } }) }, children: h(Rn, { children: h(on, { workbook: E?.workbook, setWorkbook: H, importExportDisabled: w, titlePlaceHolder: z, titleWorkbook: Q, setWorkbookTitle: ke, refWorkbookTitle: Ce, commands: be, undoManager: M, themeModeOptions: N, children: D }) }) }) });
|
|
853
|
+
return N && (U = ie(qn, { theme: ge ? N.dark : N.light, children: [N.cssBaseline ? h(Kn, {}) : null, U] })), U;
|
|
853
854
|
}));
|
|
854
855
|
rn.displayName = "EagerStandaloneWorkbook";
|
|
855
|
-
const
|
|
856
|
+
const Ho = Object.freeze(Object.defineProperty({ __proto__: null, default: rn }, Symbol.toStringTag, { value: "Module" }));
|
|
856
857
|
export {
|
|
857
|
-
|
|
858
|
+
Ho as E,
|
|
858
859
|
fe as c
|
|
859
860
|
};
|