@sheetxl/studio-mui 0.8.0-beta.15 → 0.8.0-beta.16
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 +17 -7
- package/browser/esm/{CJWnWqGPw17cp9P3.mjs → 2DGUEeY8au7Hbmze.mjs} +2 -2
- package/browser/esm/{OmA1ClZ36ZMFrZe7.mjs → 9V0gwYl3BcajPwBD.mjs} +2 -2
- package/browser/esm/B0mscuFChIInl6Mo.mjs +119 -0
- package/browser/esm/{EFtp_C3sBnP3Nrns.mjs → BGg5TSbhaUimavRf.mjs} +7 -7
- package/browser/esm/BL-h4RElQAdaeHPF.mjs +360 -0
- package/browser/esm/{DOWfcHx0MO0J50de.mjs → BSrubs5qLEinR8Ew.mjs} +92 -87
- package/browser/esm/BUCQPr09aodgC88P.mjs +225 -0
- package/browser/esm/{BvpzsprI7cmVLuQn.mjs → Bg6bcIJsute7rxDL.mjs} +3 -3
- package/browser/esm/{CV-q-xCHVuNFhqEF.mjs → BjR7L3X6je3fXyQi.mjs} +2 -2
- package/browser/esm/{DMDi2lOps0veJKsM.mjs → Bo_18UwXk7eK6QaM.mjs} +3 -3
- package/browser/esm/{BfPTOOKhwUojRTef.mjs → Bp4rtdIKIFzTeJvr.mjs} +13 -9
- package/browser/esm/BxneVAXjYuQbCUQo.mjs +424 -0
- package/browser/esm/{BojGnpAWoIm5yCd8.mjs → C2V3kv29foh8dScC.mjs} +2 -2
- package/browser/esm/{BkxJY_YjMAEvhmuy.mjs → C8M4U_SswTd6auZd.mjs} +4 -4
- package/browser/esm/{BR51amBhaaHPBhpd.mjs → C9XRjC0yoGvS9Cm9.mjs} +3 -3
- package/browser/esm/{ghfcAaGu2CuZGdhi.mjs → CDgoQhayiKyo-7Br.mjs} +34 -33
- package/browser/esm/{Buzx8_zQYPX4DR7v.mjs → CLgar8cakFC22X3w.mjs} +2 -2
- package/browser/esm/{6SL2j-85OXrKJNZ5.mjs → CUh56URLD9Vh5Ak9.mjs} +1807 -1200
- package/browser/esm/{DLe9DT0DSurLSgiQ.mjs → CXgBRmauwDvHb3fQ.mjs} +2 -2
- package/browser/esm/{Bqba-3J9i8HsmusR.mjs → CYOaHHiaC7Ip5VLn.mjs} +2 -2
- package/browser/esm/C_qDBCzb8IHBlPhJ.mjs +294 -0
- package/browser/esm/{Cbkg5y4fYjLylYHF.mjs → CfsYKmwU44jlvh2Y.mjs} +2 -2
- package/browser/esm/Ch1y4AkETfKCYDwf.mjs +106 -0
- package/browser/esm/{By1IJOkvZJSlXs5f.mjs → CnId_LC0EekuwaAF.mjs} +3 -3
- package/browser/esm/{BsAoK_t2sn8IHtAO.mjs → CtVSJjciTocAi-ph.mjs} +3 -3
- package/browser/esm/{C8tci3dfo5lzeoK-.mjs → CuQsEoKZJrSL989Q.mjs} +6 -6
- package/browser/esm/{Cl_OUigCV04_zrRy.mjs → Cv99zJfRtzJQmM9a.mjs} +2 -2
- package/browser/esm/{BCDAnHFMvOd9XS8K.mjs → Cxk-oWZzE2jq5ul6.mjs} +3 -3
- package/browser/esm/{CcJHwg-rLMcCymSD.mjs → D3XdTSymYMag6tor.mjs} +6 -6
- package/browser/esm/{BH4eDAxZdwheO7d_.mjs → D4jGaUxHOgVc4qN0.mjs} +3 -3
- package/browser/esm/{BvbN9V67wFhTfq1-.mjs → DAdhaGB933dfni3E.mjs} +3 -3
- package/browser/esm/{DpAlQza0e5h3GGHC.mjs → DBx1Y3oFzB6gv-LQ.mjs} +3 -3
- package/browser/esm/{DJVpra0HoPH-4P7P.mjs → DIAnBUXPTvYAp5fm.mjs} +3 -3
- package/browser/esm/{idh3Y0jksygPSI3A.mjs → DIJh9jY37iVFn-tE.mjs} +2 -2
- package/browser/esm/{Ci74yk0whfoAP1TL.mjs → DK1K-M9iJV-DK3lK.mjs} +2 -2
- package/browser/esm/{BNas8wZuvrN45dRi.mjs → DMhFcJsnKSKTDivl.mjs} +2 -2
- package/browser/esm/{BWdpv2xf6GCyd4Te.mjs → DMj9kkIWw9chI5_u.mjs} +5 -5
- package/browser/esm/DUpW8HMoEhD3C9l6.mjs +235 -0
- package/browser/esm/{DzATG8XMcG6mmYbx.mjs → DVJ5AK0zcqSACGov.mjs} +9 -9
- package/browser/esm/{DYDnkmllpYTwfWir.mjs → DVaykBKx4eEsP4MI.mjs} +4 -4
- package/browser/esm/{C67SLDHwhVlVIMo0.mjs → Dex65RXS_A5CnMg3.mjs} +3 -3
- package/browser/esm/{BYnzaHXySiV-sc6w.mjs → DfYtGsqDIMAG4Sp8.mjs} +2 -2
- package/browser/esm/{IlX2PgLxvyTQu4Fh.mjs → Dj0VEFe2ckEWgQjy.mjs} +5 -5
- package/browser/esm/{DKkKac2vbeui2lDy.mjs → DjCDJhBfVI9O_Sq1.mjs} +6 -6
- package/browser/esm/DjjmLQLxU_U4JB3n.mjs +973 -0
- package/browser/esm/{CutWdrVA-c3x8IkL.mjs → DmOrKFaiUUr5hlFl.mjs} +5 -4
- package/browser/esm/{Bvq5aZyp5E79JB-s.mjs → DoYSmj1LQHAAqt5b.mjs} +2 -2
- package/browser/esm/{Dz20q7S5vmDWlO0p.mjs → KhOxaZS8EeSaYFXZ.mjs} +2 -2
- package/browser/esm/{DAYPqhHN3aQ2StjU.mjs → PvNtCGveCLbLAP3e.mjs} +14 -14
- package/browser/esm/{DfI4-5XM6AbILSti.mjs → ROOxAZY7YyHDmPcQ.mjs} +4 -4
- package/browser/esm/{DFAphWcDUw-gVtAl.mjs → TfUaejwwWzu5qFVE.mjs} +3 -3
- package/browser/esm/{DsM-NpB32hloRRR8.mjs → ZhI7zxDSTWb1DfaE.mjs} +3 -3
- package/browser/esm/{DY_EGsyx-zNiJS_0.mjs → fqZt7Z0jR4illVKU.mjs} +5 -5
- package/browser/esm/index.mjs +278 -277
- package/browser/esm/{OHvsc940xI-m_8cc.mjs → r7bLyFzJfaGLKP_7.mjs} +2 -2
- package/browser/esm/{DR9y7k4jB7stGPaZ.mjs → tffjGixzP1Ze4DqB.mjs} +3 -3
- package/browser/esm/{D90Bb0GPEwqYkf6R.mjs → tiC8hseLz66gO5BS.mjs} +804 -713
- package/node/esm/{-Adgw5-ltK-rfp33.mjs → -Il_piuBrbndDROB.mjs} +2 -2
- package/node/esm/0cm_0VYweOBWmzi7.mjs +972 -0
- package/node/esm/{CexPhV2NPh5ZGHus.mjs → 1gdwmt5CrQy4cGTH.mjs} +2 -2
- package/node/esm/{dUUbrmGMCILl8EOr.mjs → 3Geel3fylTwbPuxf.mjs} +2 -2
- package/node/esm/{CFi_Yls-gurU_CX3.mjs → 4pRKBhUYhbbE6qVT.mjs} +2 -2
- package/node/esm/{jGsHbOHP90nnx_hJ.mjs → 9qIZWfzxSaxNk6Cm.mjs} +16 -15
- package/node/esm/B9uLfbf5gMGnoUjH.mjs +224 -0
- package/node/esm/{BxIyViNSP0STSrfA.mjs → BFO2WxwRNbu-UmKe.mjs} +3 -3
- package/node/esm/{q2Byx8RdDnHk8YyG.mjs → BIJXqUbAalnd-gXD.mjs} +2 -2
- package/node/esm/{C4eVfVm_Omyt6NbE.mjs → BIviFvkWx6eP4dMd.mjs} +12 -12
- package/node/esm/{Cx4tBEsm3SjAafcw.mjs → BTOCej61y3MazK6r.mjs} +2 -2
- package/node/esm/{5etzEfk-28CCELyT.mjs → BV9hUarSGd3mWC8o.mjs} +3 -3
- package/node/esm/{DGtbmp72kfRXLtDu.mjs → BX1cTEV3SpcqLcXx.mjs} +81 -80
- package/node/esm/{DOuASwH2Lf83hMLe.mjs → BZu-8gEXwIzW_YX9.mjs} +2 -2
- package/node/esm/{CX13ASkhdJ0ZSAY4.mjs → B_jOG6MlKoiboP3D.mjs} +3 -3
- package/node/esm/{DwA7rfXJgzoNvjax.mjs → BgObBW8ZUr50OufC.mjs} +8 -8
- package/node/esm/{BKCNFVrdc_gTnOoS.mjs → BhiuBl2z87xThV1b.mjs} +2 -2
- package/node/esm/{B26ot2vO6Hd47uH0.mjs → Bm054Lh36PSa5m1P.mjs} +2 -2
- package/node/esm/BtxNP8JWe16vSXAs.mjs +106 -0
- package/node/esm/BzT_zks-KORaryRo.mjs +118 -0
- package/node/esm/{Bg3Yu66oJr6mNvAR.mjs → C5dRM0ExMHpFgKd0.mjs} +3 -3
- package/node/esm/{BZK6UksX7r-GgRms.mjs → CQxu_KONf2yyKKnD.mjs} +2 -2
- package/node/esm/{BaFRVcYZjcLoMQtk.mjs → CdoFRzEug2L0LwNb.mjs} +7 -7
- package/node/esm/{DybPyX8U-EqXKarV.mjs → Ch7Ebxf0bFrlCJpW.mjs} +2 -2
- package/node/esm/{CzKFdVrPSDYOUdWI.mjs → CsQTJ4JQRxLcJDiZ.mjs} +2 -2
- package/node/esm/{BFv2GzY6NjmJggAg.mjs → CyKOmz26TaZSFxmi.mjs} +3 -3
- package/node/esm/D3TsBlOewIFj-VDW.mjs +294 -0
- package/node/esm/{Ca31PUiJBGowHeob.mjs → D4TlOO7hjvqTR2HX.mjs} +3 -3
- package/node/esm/{TgwnKYh-WPxEgmyr.mjs → DYNM5HfUK0JbGHsx.mjs} +2 -2
- package/node/esm/{B7vbn_dO_cZnGyGM.mjs → DhPNzztIuq9WJwCz.mjs} +3 -3
- package/node/esm/{ISBEql8s7AnELTpd.mjs → cl-bDkq8M4STBYJy.mjs} +2 -2
- package/node/esm/fazR-cWd-2-W82Nk.mjs +425 -0
- package/node/esm/index.mjs +3391 -2778
- package/node/esm/{D9Ga7FFJDOO3Dpfu.mjs → iyOc5Rm5x746Qd3R.mjs} +2 -2
- package/node/esm/{CORxK68HpwPUYA6O.mjs → klLaIOeBuqaYuz_q.mjs} +2 -2
- package/node/esm/{D_JpopAVQopM26cb.mjs → mmzQ-lse6yBavXnw.mjs} +603 -514
- package/node/esm/{CkW8xNdW45Xg7jy7.mjs → rpHmm4X81z1orjHr.mjs} +3 -3
- package/node/esm/{HlNuwtpYoOARa894.mjs → tRnEFhRlzQPziQif.mjs} +2 -2
- package/package.json +10 -10
- package/resources/locales/de/groups.cmd.json +3 -0
- package/resources/locales/de/ui.msg.json +41 -0
- package/resources/locales/en/groups.cmd.json +3 -0
- package/resources/locales/en/ui.msg.json +41 -0
- package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
- package/types/src/command/index.d.ts +1 -0
- package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
- package/types/src/filter/PivotMenu.d.ts +31 -0
- package/types/src/filter/index.d.ts +1 -0
- package/types/src/pivot/PivotChipMenu.d.ts +10 -0
- package/types/src/pivot/PivotPlugin.d.ts +3 -0
- package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
- package/types/src/pivot/PivotTableHeader.d.ts +12 -0
- package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
- package/types/src/pivot/_pivotSource.d.ts +7 -0
- package/types/src/table/_drawStyleSwatch.d.ts +25 -0
- package/types/src/workbook/DefaultRenderers.d.ts +10 -4
- package/browser/esm/C4ir9dn7q0RUoOm_.mjs +0 -319
- package/browser/esm/DEUzUShfyJLvgd6_.mjs +0 -1379
- package/browser/esm/xe1B8ohea8qfZlFg.mjs +0 -582
- package/node/esm/CKtnUYKjsTf7dYKS.mjs +0 -318
- package/node/esm/vf5X26EJO7Q1b8Ln.mjs +0 -1379
package/browser/esm/index.mjs
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._sheetxl-reset_11z3j_1{margin:0;padding:0;line-height:1;display:block}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{border-collapse:inherit;border-spacing:0;border:none;border-color:inherit;width:auto;height:auto;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;margin:0;padding:0;display:block}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._stats-items_151a8_1{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;min-width:0;max-height:1rem;display:flex;overflow:hidden}._stats-item_151a8_1{flex-shrink:0}._stats-item-label_151a8_15{user-select:none;white-space:nowrap;cursor:pointer;border-radius:2px;align-items:center;gap:4px;padding:0 4px;transition:background-color .2s;display:flex}._stats-item-label_151a8_15:hover{background-color:#0000000a}._stats-item-label_151a8_15:active{background-color:#00000014}._formula-bar_uer84_1{flex-direction:row;flex:100%;align-items:start;display:flex}._details-panel_mdq6z_1{box-sizing:border-box;background:0 0;flex-direction:column;flex:auto;align-items:stretch;width:100%;height:100%;display:flex;overflow:hidden}._editor_mdq6z_13{flex-direction:column;height:100%;display:flex}._editor-panel_mdq6z_19{flex-direction:column;display:flex}._editor-buttons_mdq6z_24{justify-content:flex-end;display:flex}._card_mdq6z_29{flex-direction:column;display:flex}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{user-select:none;grid-template-columns:1fr;display:grid;@container (width>600px){grid-template-rows:repeat(3,auto);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px}}._range-row_1yps2_1{flex-direction:column;flex:100%;align-items:center;row-gap:8px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-between;gap:12px}}._action-row_1yps2_17{flex-direction:column;align-items:start;gap:4px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-evenly;align-items:center}}._card_h0jnt_7{width:100%}._actionRoot_h0jnt_11{justify-content:space-between;padding:8px 8px 8px 16px}._icons_h0jnt_16{align-items:center;margin-left:auto;display:flex}._expand_h0jnt_22{color:var(--sxl-color-error-content);padding:8px;transition:all .2s ease-in-out;transform:rotate(0)}._expandOpen_h0jnt_29{transform:rotate(180deg)}._stackTraceContainer_h0jnt_33{padding:16px}._paper_h0jnt_37{background-color:#fff;padding:16px}._checkIcon_h0jnt_42{padding-right:4px;font-size:20px}._button_h0jnt_47{text-transform:none;padding:0}._styled-resizer_fdl5y_3{background-color:var(--sxl-color-neutral,grey)}._styled-resizer_fdl5y_3:hover,.splitPane.dragging ._styled-resizer_fdl5y_3{background-color:var(--sxl-color-primary,blue)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
2
|
/**
|
|
3
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
3
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.16
|
|
4
4
|
*
|
|
5
5
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
6
|
-
* License:
|
|
6
|
+
* License: MIT
|
|
7
7
|
*/
|
|
8
|
-
import { $ as e, A as t,
|
|
9
|
-
import { c as
|
|
10
|
-
import { t as
|
|
11
|
-
import { a as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
8
|
+
import { $ as e, A as t, At as n, B as r, C as i, Ct as a, D as o, Dt as s, E as c, Et as l, F as u, G as d, H as f, I as p, J as m, K as h, L as g, M as _, N as v, O as y, Ot as b, P as x, Q as S, R as C, S as w, St as T, T as E, Tt as D, U as O, V as k, W as A, X as j, Y as M, Z as N, _ as P, _t as F, a as ee, at as te, b as I, bt as ne, c as re, ct as L, d as ie, dt as ae, et as oe, f as se, ft as ce, g as le, gt as ue, h as de, ht as fe, i as pe, it as me, j as he, jt as ge, k as _e, kt as ve, l as ye, lt as be, m as xe, mt as Se, n as Ce, nt as we, o as Te, ot as Ee, p as De, pt as Oe, q as ke, r as Ae, rt as je, s as Me, tt as Ne, u as Pe, ut as Fe, v as Ie, vt as Le, w as Re, wt as ze, x as Be, xt as Ve, y as He, yt as Ue, z as We } from "./CUh56URLD9Vh5Ak9.mjs";
|
|
9
|
+
import { c as Ge, i as Ke, l as qe, n as Je, o as Ye, r as Xe, s as Ze, t as Qe } from "./C8M4U_SswTd6auZd.mjs";
|
|
10
|
+
import { t as $e } from "./CYOaHHiaC7Ip5VLn.mjs";
|
|
11
|
+
import { a as et } from "./DMj9kkIWw9chI5_u.mjs";
|
|
12
|
+
import { t as R } from "./DMhFcJsnKSKTDivl.mjs";
|
|
13
|
+
import { n as tt, r as nt, t as rt } from "./BL-h4RElQAdaeHPF.mjs";
|
|
14
|
+
import { a as it, i as at, r as ot } from "./DUpW8HMoEhD3C9l6.mjs";
|
|
15
|
+
import { a as st, n as ct, t as lt } from "./BSrubs5qLEinR8Ew.mjs";
|
|
16
|
+
import { t as ut } from "./BjR7L3X6je3fXyQi.mjs";
|
|
17
|
+
import { n as dt, t as ft } from "./DVaykBKx4eEsP4MI.mjs";
|
|
18
|
+
import { t as pt } from "./DK1K-M9iJV-DK3lK.mjs";
|
|
19
|
+
import { n as mt, r as ht, t as gt } from "./tffjGixzP1Ze4DqB.mjs";
|
|
20
|
+
import { a as _t, i as vt, n as yt, o as bt, r as xt, t as St } from "./DIAnBUXPTvYAp5fm.mjs";
|
|
21
|
+
import { t as Ct } from "./ZhI7zxDSTWb1DfaE.mjs";
|
|
22
|
+
import { t as wt } from "./C2V3kv29foh8dScC.mjs";
|
|
23
|
+
import { Color as z, IFill as B, LicenseManager as Tt, LicenseManager as Et } from "@sheetxl/sdk";
|
|
24
|
+
import { DefaultTaskPaneRegistry as Dt, ThemeStateDefaults as Ot, ThemeStateKey as kt, WorkbookIO as At, WorkbookIO as jt, setPrintExamplesOnLoad as Mt, useInputField as Nt, useModelListener as Pt, useRangeListener as Ft, useWindowChrome as It, useWorkbook as Lt, useWorkbookFormat as Rt, useWorkbookName as zt } from "@sheetxl/react";
|
|
25
|
+
import { CommandButtonType as Bt, DynamicIcon as V, RenderSlot as Vt, createThemeScopeClass as Ht, lazyComponent as Ut, useCallbackRef as H, useCommandButtonEntry as Wt, useCommandButtonRegistry as Gt, useCommands as Kt, useFloatStack as qt, useLocationSearch as Jt, usePersistentState as Yt, useResolvedThemeMode as Xt, useTextSelectionDrag as Zt, useTranslator as U } from "@sheetxl/utils-react";
|
|
26
|
+
import { Suspense as Qt, createElement as $t, forwardRef as en, memo as W, useCallback as tn, useEffect as G, useId as nn, useImperativeHandle as rn, useLayoutEffect as an, useMemo as K, useRef as q, useState as J } from "react";
|
|
27
|
+
import { CommandButton as Y, CommandGroup as on, CommandPopupButton as sn, ExhibitDivider as cn, ExhibitIconButton as X, ExhibitPopupIconButton as ln, ExhibitTooltip as un, LabelIcon as dn, LazyLoadErrorPanel as fn, SimpleTooltip as pn, defaultRenderPopupPanel as mn, renderMembers as hn } from "@sheetxl/utils-mui";
|
|
28
|
+
import { Fragment as gn, jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
29
|
+
import { Box as $, FormControl as _n, InputAdornment as vn, InputLabel as yn, MenuItem as bn, Paper as xn, Select as Sn, TextField as Cn, Typography as wn, useMediaQuery as Tn, useTheme as En } from "@mui/material";
|
|
30
|
+
import { defineLazyModule as Dn } from "@sheetxl/utils";
|
|
31
|
+
var On = (e) => {
|
|
31
32
|
e.button === 0 && e.preventDefault();
|
|
32
|
-
},
|
|
33
|
-
let { disabled: n, className: r, sx: i, defaultInput: a, value: o, formName: s, formOptions: c, onChangeInput: l, onChangeText: u, onDone: d, changeOn: f, onValidate: p, apiRef: m, label: h, helperText: g, showError: _ = !0, onChangeError: v, hideAdornment: y, propsInput: b, onKeyDown: x, onFocus: S, ...C } = e, w =
|
|
33
|
+
}, kn = W(en((e, t) => {
|
|
34
|
+
let { disabled: n, className: r, sx: i, defaultInput: a, value: o, formName: s, formOptions: c, onChangeInput: l, onChangeText: u, onDone: d, changeOn: f, onValidate: p, apiRef: m, label: h, helperText: g, showError: _ = !0, onChangeError: v, hideAdornment: y, propsInput: b, onKeyDown: x, onFocus: S, ...C } = e, w = U(), T = Zt(), E = h ?? w("namedInput.label"), D = ut(), O = s && D ? D.register(s, c) : null, k = Nt({
|
|
34
35
|
value: o ?? "",
|
|
35
36
|
onChange: l,
|
|
36
37
|
onChangeText: u,
|
|
@@ -39,7 +40,7 @@ var Cn = (e) => {
|
|
|
39
40
|
onValidate: p,
|
|
40
41
|
disabled: n
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
+
rn(m, () => k, [k]);
|
|
43
44
|
let A = q(D);
|
|
44
45
|
A.current = D;
|
|
45
46
|
let j = q(v);
|
|
@@ -50,10 +51,10 @@ var Cn = (e) => {
|
|
|
50
51
|
let e = A.current;
|
|
51
52
|
e && (k.error ? e.setError(s, { message: w(k.error) }) : e.clearErrors(s));
|
|
52
53
|
}, [k.error, s]);
|
|
53
|
-
let N = f === "done", P = k.engaged && k.dirty,
|
|
54
|
-
if (!y && N) return Q(
|
|
54
|
+
let N = f === "done", P = k.engaged && k.dirty, F = K(() => {
|
|
55
|
+
if (!y && N) return Q(vn, {
|
|
55
56
|
tabIndex: -1,
|
|
56
|
-
onMouseDown:
|
|
57
|
+
onMouseDown: On,
|
|
57
58
|
"aria-hidden": !P,
|
|
58
59
|
sx: {
|
|
59
60
|
display: "flex",
|
|
@@ -65,34 +66,34 @@ var Cn = (e) => {
|
|
|
65
66
|
}
|
|
66
67
|
},
|
|
67
68
|
position: "end",
|
|
68
|
-
children: [Z(
|
|
69
|
+
children: [Z(X, {
|
|
69
70
|
dense: !0,
|
|
70
71
|
outlined: !1,
|
|
71
72
|
color: "primary",
|
|
72
73
|
"aria-label": "commit-input",
|
|
73
|
-
icon: Z(
|
|
74
|
+
icon: Z(V, { iconKey: "CheckSuccess" }),
|
|
74
75
|
propsTooltip: {
|
|
75
76
|
label: w("referenceInput.commit"),
|
|
76
77
|
simple: !0
|
|
77
78
|
},
|
|
78
79
|
disabled: !!k.error,
|
|
79
80
|
tabIndex: -1,
|
|
80
|
-
onMouseDown:
|
|
81
|
+
onMouseDown: On,
|
|
81
82
|
onClick: () => {
|
|
82
83
|
k.commit();
|
|
83
84
|
}
|
|
84
|
-
}), Z(
|
|
85
|
+
}), Z(X, {
|
|
85
86
|
dense: !0,
|
|
86
87
|
outlined: !1,
|
|
87
88
|
color: "warning",
|
|
88
89
|
"aria-label": "cancel-input",
|
|
89
|
-
icon: Z(
|
|
90
|
+
icon: Z(V, { iconKey: "CloseError" }),
|
|
90
91
|
propsTooltip: {
|
|
91
92
|
label: w("referenceInput.cancel"),
|
|
92
93
|
simple: !0
|
|
93
94
|
},
|
|
94
95
|
tabIndex: -1,
|
|
95
|
-
onMouseDown:
|
|
96
|
+
onMouseDown: On,
|
|
96
97
|
onClick: () => {
|
|
97
98
|
k.cancel();
|
|
98
99
|
}
|
|
@@ -106,7 +107,7 @@ var Cn = (e) => {
|
|
|
106
107
|
k.cancel,
|
|
107
108
|
!!k.error
|
|
108
109
|
]);
|
|
109
|
-
return Z(
|
|
110
|
+
return Z(_n, {
|
|
110
111
|
sx: {
|
|
111
112
|
minWidth: 135,
|
|
112
113
|
width: "100%",
|
|
@@ -114,9 +115,9 @@ var Cn = (e) => {
|
|
|
114
115
|
},
|
|
115
116
|
size: "small",
|
|
116
117
|
ref: t,
|
|
117
|
-
className:
|
|
118
|
+
className: R("sxl-input-field", r),
|
|
118
119
|
...C,
|
|
119
|
-
children: Z(
|
|
120
|
+
children: Z(Cn, {
|
|
120
121
|
label: E,
|
|
121
122
|
placeholder: a,
|
|
122
123
|
disabled: n,
|
|
@@ -124,7 +125,7 @@ var Cn = (e) => {
|
|
|
124
125
|
helperText: k.error && _ ? w(k.error) : g === void 0 ? " " : g,
|
|
125
126
|
sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
|
|
126
127
|
slotProps: {
|
|
127
|
-
input: { endAdornment:
|
|
128
|
+
input: { endAdornment: F },
|
|
128
129
|
inputLabel: { shrink: !0 },
|
|
129
130
|
htmlInput: {
|
|
130
131
|
spellCheck: !1,
|
|
@@ -132,7 +133,7 @@ var Cn = (e) => {
|
|
|
132
133
|
onPointerDown: T.onPointerDown,
|
|
133
134
|
onDragStart: T.onDragStart,
|
|
134
135
|
...b,
|
|
135
|
-
className:
|
|
136
|
+
className: R("autoFocus", b?.className),
|
|
136
137
|
name: s,
|
|
137
138
|
readOnly: n,
|
|
138
139
|
sx: {
|
|
@@ -163,40 +164,40 @@ var Cn = (e) => {
|
|
|
163
164
|
})
|
|
164
165
|
});
|
|
165
166
|
}));
|
|
166
|
-
|
|
167
|
-
var
|
|
168
|
-
let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s =
|
|
167
|
+
kn.displayName = "InputField";
|
|
168
|
+
var An = W(en((e, t) => {
|
|
169
|
+
let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s = jt.canWrite(), c = jt.canRead();
|
|
169
170
|
G(() => {
|
|
170
171
|
let e = !0;
|
|
171
|
-
return
|
|
172
|
+
return jt.getWriteFormats().then((t) => {
|
|
172
173
|
e && o(t);
|
|
173
174
|
}), () => {
|
|
174
175
|
e = !1;
|
|
175
176
|
};
|
|
176
177
|
}, []);
|
|
177
|
-
let l =
|
|
178
|
+
let l = Lt(), u = Rt(l), d = K(() => {
|
|
178
179
|
if (a.length === 0) return null;
|
|
179
180
|
let e = u?.toLowerCase();
|
|
180
181
|
return (e ? a.find((t) => t.key.toLowerCase() === e) ?? a.find((t) => t.exts?.some((t) => t.toLowerCase() === e)) : void 0) ?? a.find((e) => e.exts?.some((e) => e.toLowerCase() === "sxl")) ?? a.find((e) => !e.advanced) ?? a[0];
|
|
181
|
-
}, [a, u]), [f] =
|
|
182
|
+
}, [a, u]), [f] = Kt(d ? `saveWorkbookAs${d.key}` : []), p = Gt(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = H((e) => {
|
|
182
183
|
let t = {
|
|
183
|
-
variant:
|
|
184
|
+
variant: Bt.Menuitem,
|
|
184
185
|
groupKey: n,
|
|
185
186
|
disabled: r
|
|
186
|
-
}, i = Q(
|
|
187
|
-
m.length > 1 ? Z(
|
|
187
|
+
}, i = Q(gn, { children: [
|
|
188
|
+
m.length > 1 ? Z(sn, {
|
|
188
189
|
...t,
|
|
189
190
|
quickCommand: "newWorkbook",
|
|
190
191
|
renderPopupPanel: (e) => {
|
|
191
|
-
let t =
|
|
192
|
-
variant:
|
|
192
|
+
let t = hn(m, {
|
|
193
|
+
variant: Bt.Menuitem,
|
|
193
194
|
dividerOrientation: "horizontal",
|
|
194
195
|
groupKey: "newWorkbookOptions",
|
|
195
196
|
registry: p,
|
|
196
197
|
propsCommandButton: { disabled: r },
|
|
197
198
|
propsCommandPopup: { disabled: r }
|
|
198
199
|
});
|
|
199
|
-
return
|
|
200
|
+
return mn({
|
|
200
201
|
...e,
|
|
201
202
|
children: t,
|
|
202
203
|
onClick: () => {
|
|
@@ -208,24 +209,24 @@ var Tn = U(H((e, t) => {
|
|
|
208
209
|
...t,
|
|
209
210
|
commandKey: "newWorkbook"
|
|
210
211
|
}),
|
|
211
|
-
Z(
|
|
212
|
-
c ? Z(
|
|
212
|
+
Z(cn, { orientation: "horizontal" }),
|
|
213
|
+
c ? Z(sn, {
|
|
213
214
|
...t,
|
|
214
215
|
quickCommand: "openWorkbook",
|
|
215
216
|
renderPopupPanel: (e) => {
|
|
216
217
|
let n = {
|
|
217
218
|
...t,
|
|
218
219
|
groupKey: "openWorkbookOptions"
|
|
219
|
-
}, r = [
|
|
220
|
+
}, r = [$t(Y, {
|
|
220
221
|
...n,
|
|
221
222
|
key: "device",
|
|
222
223
|
commandKey: "openWorkbook"
|
|
223
|
-
}),
|
|
224
|
+
}), $t(Y, {
|
|
224
225
|
...n,
|
|
225
226
|
key: "web",
|
|
226
227
|
commandKey: "openWorkbookFromUrl"
|
|
227
228
|
})];
|
|
228
|
-
return
|
|
229
|
+
return mn({
|
|
229
230
|
...e,
|
|
230
231
|
children: r,
|
|
231
232
|
onClick: () => {
|
|
@@ -234,28 +235,28 @@ var Tn = U(H((e, t) => {
|
|
|
234
235
|
});
|
|
235
236
|
}
|
|
236
237
|
}) : null,
|
|
237
|
-
s && a.length > 0 ? Z(
|
|
238
|
+
s && a.length > 0 ? Z(sn, {
|
|
238
239
|
...t,
|
|
239
240
|
quickCommand: "saveWorkbook",
|
|
240
241
|
renderPopupPanel: (e) => {
|
|
241
242
|
let n = {
|
|
242
243
|
...t,
|
|
243
244
|
groupKey: "saveWorkbookOptions"
|
|
244
|
-
}, r = [
|
|
245
|
+
}, r = [$t(Y, {
|
|
245
246
|
...n,
|
|
246
247
|
key: "saveWorkbookAs",
|
|
247
248
|
commandKey: "saveWorkbookAs",
|
|
248
249
|
label: f?.getLabel("saveWorkbookOptions"),
|
|
249
250
|
icon: f?.getIcon("saveWorkbookOptions")
|
|
250
251
|
})], i = a.filter((e) => !e.advanced && e.key !== d?.key);
|
|
251
|
-
return i.length > 0 && r.push(Z(
|
|
252
|
+
return i.length > 0 && r.push(Z(cn, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
|
|
252
253
|
let t = e.key, i = `saveWorkbookAs${t}`;
|
|
253
|
-
r.push(
|
|
254
|
+
r.push($t(Y, {
|
|
254
255
|
...n,
|
|
255
256
|
key: t,
|
|
256
257
|
commandKey: i
|
|
257
258
|
}));
|
|
258
|
-
}),
|
|
259
|
+
}), mn({
|
|
259
260
|
...e,
|
|
260
261
|
children: r,
|
|
261
262
|
onClick: () => {
|
|
@@ -265,7 +266,7 @@ var Tn = U(H((e, t) => {
|
|
|
265
266
|
}
|
|
266
267
|
}) : null
|
|
267
268
|
] });
|
|
268
|
-
return
|
|
269
|
+
return mn({
|
|
269
270
|
...e,
|
|
270
271
|
children: i,
|
|
271
272
|
onClick: (t) => {
|
|
@@ -280,8 +281,8 @@ var Tn = U(H((e, t) => {
|
|
|
280
281
|
f,
|
|
281
282
|
m,
|
|
282
283
|
p
|
|
283
|
-
]), g =
|
|
284
|
-
return Z(
|
|
284
|
+
]), g = Wt("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
|
|
285
|
+
return Z(sn, {
|
|
285
286
|
disabled: r,
|
|
286
287
|
groupKey: n,
|
|
287
288
|
label: _,
|
|
@@ -296,21 +297,21 @@ var Tn = U(H((e, t) => {
|
|
|
296
297
|
},
|
|
297
298
|
...i,
|
|
298
299
|
renderPopupPanel: h,
|
|
299
|
-
icon: Z(
|
|
300
|
+
icon: Z(dn, {
|
|
300
301
|
className: "label",
|
|
301
302
|
icon: null,
|
|
302
303
|
label: _
|
|
303
304
|
})
|
|
304
305
|
});
|
|
305
306
|
}));
|
|
306
|
-
|
|
307
|
-
var
|
|
308
|
-
let { groupKey: n, disabled: r, ...i } = e, [a] =
|
|
307
|
+
An.displayName = "FileCommandButton";
|
|
308
|
+
var jn = W(en((e, t) => {
|
|
309
|
+
let { groupKey: n, disabled: r, ...i } = e, [a] = Kt(["themeMode"]), o = Wt("appearanceOptions"), s = H((e) => {
|
|
309
310
|
let t = {
|
|
310
|
-
variant:
|
|
311
|
+
variant: Bt.Menuitem,
|
|
311
312
|
groupKey: "appearanceOptions",
|
|
312
313
|
disabled: r
|
|
313
|
-
}, n = Q(
|
|
314
|
+
}, n = Q(gn, { children: [
|
|
314
315
|
Z(Y, {
|
|
315
316
|
...t,
|
|
316
317
|
commandKey: "themeMode"
|
|
@@ -319,7 +320,7 @@ var En = U(H((e, t) => {
|
|
|
319
320
|
...t,
|
|
320
321
|
commandKey: "defaultThemeMode"
|
|
321
322
|
}),
|
|
322
|
-
Z(
|
|
323
|
+
Z(cn, { orientation: "horizontal" }),
|
|
323
324
|
Z(Y, {
|
|
324
325
|
...t,
|
|
325
326
|
commandKey: "enableDarkGrid"
|
|
@@ -329,7 +330,7 @@ var En = U(H((e, t) => {
|
|
|
329
330
|
commandKey: "enableDarkImages"
|
|
330
331
|
})
|
|
331
332
|
] });
|
|
332
|
-
return
|
|
333
|
+
return mn({
|
|
333
334
|
...e,
|
|
334
335
|
children: n
|
|
335
336
|
});
|
|
@@ -337,8 +338,8 @@ var En = U(H((e, t) => {
|
|
|
337
338
|
r,
|
|
338
339
|
a,
|
|
339
340
|
n
|
|
340
|
-
]), c = a?.getState(), l =
|
|
341
|
-
return Z(
|
|
341
|
+
]), c = a?.getState(), l = Tn("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
|
|
342
|
+
return Z(sn, {
|
|
342
343
|
ref: t,
|
|
343
344
|
quickCommand: "themeMode",
|
|
344
345
|
renderPopupPanel: s,
|
|
@@ -350,16 +351,16 @@ var En = U(H((e, t) => {
|
|
|
350
351
|
selected: d,
|
|
351
352
|
...i
|
|
352
353
|
});
|
|
353
|
-
})),
|
|
354
|
+
})), Mn = W(en((e, t) => {
|
|
354
355
|
let { ...n } = e;
|
|
355
|
-
return Z(
|
|
356
|
+
return Z(on, {
|
|
356
357
|
ref: t,
|
|
357
358
|
groupKey: "insertFunctionSumOptions",
|
|
358
359
|
...n
|
|
359
360
|
});
|
|
360
361
|
}));
|
|
361
|
-
function
|
|
362
|
-
return e ===
|
|
362
|
+
function Nn(e, t, n) {
|
|
363
|
+
return e === B.BuiltInSheetPattern.Solid ? {
|
|
363
364
|
foreground: n,
|
|
364
365
|
background: t
|
|
365
366
|
} : {
|
|
@@ -367,12 +368,12 @@ function On(e, t, n) {
|
|
|
367
368
|
background: n
|
|
368
369
|
};
|
|
369
370
|
}
|
|
370
|
-
|
|
371
|
-
var
|
|
371
|
+
Mn.displayName = "InsertFunctionSumCommandPopupButton";
|
|
372
|
+
var Pn = W((e) => {
|
|
372
373
|
let { patternType: t, foreground: n, background: r, createCell: i, darkMode: a = !1, className: o, style: s, ...c } = e, l = K(() => {
|
|
373
|
-
let e =
|
|
374
|
+
let e = Nn(t, n, r);
|
|
374
375
|
return i({ style: { fill: {
|
|
375
|
-
type:
|
|
376
|
+
type: B.Type.Pattern,
|
|
376
377
|
patternType: t,
|
|
377
378
|
foreground: e.foreground ?? void 0,
|
|
378
379
|
background: e.background ?? void 0
|
|
@@ -385,7 +386,7 @@ var kn = U((e) => {
|
|
|
385
386
|
a
|
|
386
387
|
]);
|
|
387
388
|
return Z("div", {
|
|
388
|
-
className:
|
|
389
|
+
className: R("sxl-pattern-swatch", o),
|
|
389
390
|
style: {
|
|
390
391
|
width: "100%",
|
|
391
392
|
height: "100%",
|
|
@@ -395,53 +396,53 @@ var kn = U((e) => {
|
|
|
395
396
|
...c
|
|
396
397
|
});
|
|
397
398
|
});
|
|
398
|
-
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
399
|
+
Pn.displayName = "PatternSwatch";
|
|
400
|
+
var Fn = Object.freeze([
|
|
401
|
+
B.BuiltInSheetPattern.Solid,
|
|
402
|
+
B.BuiltInSheetPattern.DarkGray,
|
|
403
|
+
B.BuiltInSheetPattern.MediumGray,
|
|
404
|
+
B.BuiltInSheetPattern.LightGray,
|
|
405
|
+
B.BuiltInSheetPattern.Gray125,
|
|
406
|
+
B.BuiltInSheetPattern.Gray0625,
|
|
407
|
+
B.BuiltInSheetPattern.DarkHorizontal,
|
|
408
|
+
B.BuiltInSheetPattern.DarkVertical,
|
|
409
|
+
B.BuiltInSheetPattern.DarkDown,
|
|
410
|
+
B.BuiltInSheetPattern.DarkUp,
|
|
411
|
+
B.BuiltInSheetPattern.DarkGrid,
|
|
412
|
+
B.BuiltInSheetPattern.DarkTrellis,
|
|
413
|
+
B.BuiltInSheetPattern.LightHorizontal,
|
|
414
|
+
B.BuiltInSheetPattern.LightVertical,
|
|
415
|
+
B.BuiltInSheetPattern.LightDown,
|
|
416
|
+
B.BuiltInSheetPattern.LightUp,
|
|
417
|
+
B.BuiltInSheetPattern.LightGrid,
|
|
418
|
+
B.BuiltInSheetPattern.LightTrellis
|
|
418
419
|
]);
|
|
419
|
-
function
|
|
420
|
+
function In(e, t) {
|
|
420
421
|
switch (t) {
|
|
421
|
-
case
|
|
422
|
-
case
|
|
423
|
-
case
|
|
424
|
-
case
|
|
425
|
-
case
|
|
426
|
-
case
|
|
427
|
-
case
|
|
428
|
-
case
|
|
429
|
-
case
|
|
430
|
-
case
|
|
431
|
-
case
|
|
432
|
-
case
|
|
433
|
-
case
|
|
434
|
-
case
|
|
435
|
-
case
|
|
436
|
-
case
|
|
437
|
-
case
|
|
438
|
-
case
|
|
439
|
-
case
|
|
422
|
+
case B.BuiltInSheetPattern.None: return e("fill.pattern.none");
|
|
423
|
+
case B.BuiltInSheetPattern.Solid: return e("fill.pattern.solid");
|
|
424
|
+
case B.BuiltInSheetPattern.Gray0625: return e("fill.pattern.gray0625");
|
|
425
|
+
case B.BuiltInSheetPattern.Gray125: return e("fill.pattern.gray125");
|
|
426
|
+
case B.BuiltInSheetPattern.LightGray: return e("fill.pattern.lightGray");
|
|
427
|
+
case B.BuiltInSheetPattern.MediumGray: return e("fill.pattern.mediumGray");
|
|
428
|
+
case B.BuiltInSheetPattern.DarkGray: return e("fill.pattern.darkGray");
|
|
429
|
+
case B.BuiltInSheetPattern.LightHorizontal: return e("fill.pattern.lightHorizontal");
|
|
430
|
+
case B.BuiltInSheetPattern.LightVertical: return e("fill.pattern.lightVertical");
|
|
431
|
+
case B.BuiltInSheetPattern.LightDown: return e("fill.pattern.lightDown");
|
|
432
|
+
case B.BuiltInSheetPattern.LightUp: return e("fill.pattern.lightUp");
|
|
433
|
+
case B.BuiltInSheetPattern.LightGrid: return e("fill.pattern.lightGrid");
|
|
434
|
+
case B.BuiltInSheetPattern.LightTrellis: return e("fill.pattern.lightTrellis");
|
|
435
|
+
case B.BuiltInSheetPattern.DarkHorizontal: return e("fill.pattern.darkHorizontal");
|
|
436
|
+
case B.BuiltInSheetPattern.DarkVertical: return e("fill.pattern.darkVertical");
|
|
437
|
+
case B.BuiltInSheetPattern.DarkDown: return e("fill.pattern.darkDown");
|
|
438
|
+
case B.BuiltInSheetPattern.DarkUp: return e("fill.pattern.darkUp");
|
|
439
|
+
case B.BuiltInSheetPattern.DarkGrid: return e("fill.pattern.darkGrid");
|
|
440
|
+
case B.BuiltInSheetPattern.DarkTrellis: return e("fill.pattern.darkTrellis");
|
|
440
441
|
default: return t;
|
|
441
442
|
}
|
|
442
443
|
}
|
|
443
|
-
var
|
|
444
|
-
let { selectedPattern: t, foreground: n, background: r, onSelectPattern: i, createCell: a, darkMode: o = !1, disabled: s, ...c } = e, l =
|
|
444
|
+
var Ln = W((e) => {
|
|
445
|
+
let { selectedPattern: t, foreground: n, background: r, onSelectPattern: i, createCell: a, darkMode: o = !1, disabled: s, ...c } = e, l = U(), u = H(i ?? ((e) => {}), [i]), d = tn((e) => {
|
|
445
446
|
let { closeFloat: i } = e;
|
|
446
447
|
return Z($, {
|
|
447
448
|
sx: {
|
|
@@ -450,12 +451,12 @@ var Mn = U((e) => {
|
|
|
450
451
|
gap: "4px",
|
|
451
452
|
padding: "8px"
|
|
452
453
|
},
|
|
453
|
-
children:
|
|
454
|
-
label:
|
|
454
|
+
children: Fn.map((e) => Z(un, {
|
|
455
|
+
label: In(l, e),
|
|
455
456
|
children: Z($, {
|
|
456
457
|
role: "button",
|
|
457
458
|
tabIndex: 0,
|
|
458
|
-
"aria-label":
|
|
459
|
+
"aria-label": In(l, e),
|
|
459
460
|
"aria-pressed": e === t,
|
|
460
461
|
onMouseDown: (e) => e.preventDefault(),
|
|
461
462
|
onMouseUp: () => {
|
|
@@ -473,7 +474,7 @@ var Mn = U((e) => {
|
|
|
473
474
|
outlineOffset: "-1px",
|
|
474
475
|
"&:hover": { outline: (e) => `2px solid ${e.palette.primary.light}` }
|
|
475
476
|
},
|
|
476
|
-
children: Z(
|
|
477
|
+
children: Z(Pn, {
|
|
477
478
|
patternType: e,
|
|
478
479
|
foreground: n,
|
|
479
480
|
background: r,
|
|
@@ -492,9 +493,9 @@ var Mn = U((e) => {
|
|
|
492
493
|
u,
|
|
493
494
|
l
|
|
494
495
|
]);
|
|
495
|
-
return Z(
|
|
496
|
+
return Z(ln, {
|
|
496
497
|
disabled: s,
|
|
497
|
-
tooltip: l("fill.patternTooltip", { pattern:
|
|
498
|
+
tooltip: l("fill.patternTooltip", { pattern: In(l, t) }),
|
|
498
499
|
renderPopupPanel: d,
|
|
499
500
|
icon: Z($, {
|
|
500
501
|
sx: {
|
|
@@ -505,7 +506,7 @@ var Mn = U((e) => {
|
|
|
505
506
|
outlineOffset: "-1px",
|
|
506
507
|
overflow: "hidden"
|
|
507
508
|
},
|
|
508
|
-
children: Z(
|
|
509
|
+
children: Z(Pn, {
|
|
509
510
|
patternType: t,
|
|
510
511
|
foreground: n,
|
|
511
512
|
background: r,
|
|
@@ -516,13 +517,13 @@ var Mn = U((e) => {
|
|
|
516
517
|
...c
|
|
517
518
|
});
|
|
518
519
|
});
|
|
519
|
-
|
|
520
|
-
var
|
|
520
|
+
Ln.displayName = "PatternPopupButton";
|
|
521
|
+
var Rn = {
|
|
521
522
|
resizeOnOverflow: !1,
|
|
522
523
|
placement: "bottom",
|
|
523
524
|
offsets: [0, 2],
|
|
524
525
|
shift: { padding: 8 }
|
|
525
|
-
},
|
|
526
|
+
}, zn = ((e) => {
|
|
526
527
|
let t = [], n = e.length;
|
|
527
528
|
for (let r = 0; r < n; r++) {
|
|
528
529
|
let [i, a] = e[(r + n - 1) % n], [o, s, c] = e[r], [l, u] = e[(r + 1) % n], d = (e, t) => {
|
|
@@ -558,24 +559,24 @@ var Nn = {
|
|
|
558
559
|
6,
|
|
559
560
|
1.5
|
|
560
561
|
]
|
|
561
|
-
]),
|
|
562
|
+
]), Bn = (e) => Math.max(0, Math.min(1, e)), Vn = (e, t, n) => {
|
|
562
563
|
try {
|
|
563
|
-
return (e instanceof
|
|
564
|
+
return (e instanceof z ? e : new z(e, t)).toCSS(n);
|
|
564
565
|
} catch {
|
|
565
566
|
return "transparent";
|
|
566
567
|
}
|
|
567
|
-
},
|
|
568
|
+
}, Hn = (e, t, n) => {
|
|
568
569
|
try {
|
|
569
|
-
let r = new
|
|
570
|
+
let r = new z(e, n).toRGBA(), i = new z(t, n).toRGBA(), a = (e, t) => Math.round((e + t) / 2).toString(16).padStart(2, "0");
|
|
570
571
|
return `${a(r.red, i.red)}${a(r.green, i.green)}${a(r.blue, i.blue)}`;
|
|
571
572
|
} catch {
|
|
572
573
|
return e;
|
|
573
574
|
}
|
|
574
|
-
},
|
|
575
|
-
let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a =
|
|
575
|
+
}, Un = (e, t) => e.offset === t.offset && String(e.color) === String(t.color), Wn = (e, t) => e.length === t.length && e.every((e, n) => Un(e, t[n])), Gn = W((e) => {
|
|
576
|
+
let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a = U(), [o, s] = J(String(t)), [c, l] = J(!1);
|
|
576
577
|
return G(() => {
|
|
577
578
|
c || s(String(t));
|
|
578
|
-
}, [t, c]), Z(
|
|
579
|
+
}, [t, c]), Z(Cn, {
|
|
579
580
|
type: "number",
|
|
580
581
|
size: "small",
|
|
581
582
|
disabled: n,
|
|
@@ -599,7 +600,7 @@ var Nn = {
|
|
|
599
600
|
style: { textAlign: "right" }
|
|
600
601
|
},
|
|
601
602
|
inputLabel: { shrink: !0 },
|
|
602
|
-
input: { endAdornment: Z(
|
|
603
|
+
input: { endAdornment: Z(vn, {
|
|
603
604
|
position: "end",
|
|
604
605
|
disableTypography: !0,
|
|
605
606
|
children: "%"
|
|
@@ -608,13 +609,13 @@ var Nn = {
|
|
|
608
609
|
sx: { width: 120 }
|
|
609
610
|
});
|
|
610
611
|
});
|
|
611
|
-
|
|
612
|
-
var
|
|
613
|
-
let { index: t, stop: n, offset: r, schemeLookup: i, recentColors: a, darkMode: o, disabled: s, canRemove: c, rampRef: l, onDrag: u, onMove: d, onPreviewColor: f, onChangeColor: p, onRemove: m, onOpenChange: h } = e, g =
|
|
612
|
+
Gn.displayName = "StopPositionField";
|
|
613
|
+
var Kn = W((e) => {
|
|
614
|
+
let { index: t, stop: n, offset: r, schemeLookup: i, recentColors: a, darkMode: o, disabled: s, canRemove: c, rampRef: l, onDrag: u, onMove: d, onPreviewColor: f, onChangeColor: p, onRemove: m, onOpenChange: h } = e, g = U(), _ = En(), v = K(() => new z(n.color, i), [n.color, i]), [y, b] = J(void 0), [x, S] = J(null), [C, w] = J(!1), [T, E] = J(!1), [D, O] = J(!1), [k, A] = J(!1), j = q(null), M = q(!1), N = H((e) => {
|
|
614
615
|
b(e), f(t, e ?? null);
|
|
615
|
-
}, [t, f]), P =
|
|
616
|
+
}, [t, f]), P = H((e) => {
|
|
616
617
|
d(t, e / 100);
|
|
617
|
-
}, [t, d]),
|
|
618
|
+
}, [t, d]), F = Math.round(100 * r), ee = Vn(y ?? v, i, o), te = tn((e) => {
|
|
618
619
|
let { closeFloat: n } = e;
|
|
619
620
|
return Q($, {
|
|
620
621
|
className: "sxl-gradient-stop-popup",
|
|
@@ -622,7 +623,7 @@ var Vn = U((e) => {
|
|
|
622
623
|
display: "flex",
|
|
623
624
|
flexDirection: "column"
|
|
624
625
|
},
|
|
625
|
-
children: [Z(
|
|
626
|
+
children: [Z(Ke, {
|
|
626
627
|
selectedColor: v,
|
|
627
628
|
previewColor: y,
|
|
628
629
|
disableAlpha: !0,
|
|
@@ -643,8 +644,8 @@ var Vn = U((e) => {
|
|
|
643
644
|
paddingX: 1,
|
|
644
645
|
paddingBottom: 1
|
|
645
646
|
},
|
|
646
|
-
children: Z(
|
|
647
|
-
percent:
|
|
647
|
+
children: Z(Gn, {
|
|
648
|
+
percent: F,
|
|
648
649
|
disabled: s,
|
|
649
650
|
inputRef: j,
|
|
650
651
|
onChange: P
|
|
@@ -654,7 +655,7 @@ var Vn = U((e) => {
|
|
|
654
655
|
}, [
|
|
655
656
|
v,
|
|
656
657
|
y,
|
|
657
|
-
|
|
658
|
+
F,
|
|
658
659
|
t,
|
|
659
660
|
i,
|
|
660
661
|
a,
|
|
@@ -663,71 +664,71 @@ var Vn = U((e) => {
|
|
|
663
664
|
N,
|
|
664
665
|
p,
|
|
665
666
|
P
|
|
666
|
-
]),
|
|
667
|
+
]), I = qt({
|
|
667
668
|
anchor: x,
|
|
668
669
|
label: "gradient-stop",
|
|
669
|
-
renderPopupPanel:
|
|
670
|
-
propsPopper:
|
|
670
|
+
renderPopupPanel: te,
|
|
671
|
+
propsPopper: Rn,
|
|
671
672
|
onOpen: () => {
|
|
672
673
|
w(!0), h(t, !0), M.current && (M.current = !1, requestAnimationFrame(() => j.current?.focus()));
|
|
673
674
|
},
|
|
674
675
|
onClose: () => {
|
|
675
676
|
w(!1), h(t, !1), N(void 0);
|
|
676
677
|
}
|
|
677
|
-
}),
|
|
678
|
-
M.current = e,
|
|
679
|
-
}, [
|
|
680
|
-
C ?
|
|
678
|
+
}), ne = H((e) => {
|
|
679
|
+
M.current = e, I.reference.open(0);
|
|
680
|
+
}, [I]), re = H(() => {
|
|
681
|
+
C ? I.reference.close(0) : ne(!1);
|
|
681
682
|
}, [
|
|
682
683
|
C,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
]),
|
|
686
|
-
s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId),
|
|
684
|
+
I,
|
|
685
|
+
ne
|
|
686
|
+
]), L = q(null), ie = H((e) => {
|
|
687
|
+
s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), L.current = {
|
|
687
688
|
pointerId: e.pointerId,
|
|
688
689
|
startX: e.clientX,
|
|
689
690
|
startOffset: r,
|
|
690
691
|
moved: !1,
|
|
691
692
|
offset: r
|
|
692
693
|
});
|
|
693
|
-
}, [s, r]),
|
|
694
|
-
let n =
|
|
694
|
+
}, [s, r]), ae = H((e) => {
|
|
695
|
+
let n = L.current;
|
|
695
696
|
if (!n || n.pointerId !== e.pointerId) return;
|
|
696
697
|
let r = e.clientX - n.startX;
|
|
697
698
|
if (!n.moved) {
|
|
698
699
|
if (Math.abs(r) < 3) return;
|
|
699
|
-
n.moved = !0, E(!0), A(!1),
|
|
700
|
+
n.moved = !0, E(!0), A(!1), I.reference.close(0);
|
|
700
701
|
}
|
|
701
702
|
let i = l.current?.getBoundingClientRect().width ?? 0;
|
|
702
|
-
n.offset = i > 0 ?
|
|
703
|
+
n.offset = i > 0 ? Bn(n.startOffset + r / i) : n.startOffset, u(t, n.offset, !1);
|
|
703
704
|
}, [
|
|
704
705
|
t,
|
|
705
706
|
l,
|
|
706
|
-
|
|
707
|
+
I,
|
|
707
708
|
u
|
|
708
|
-
]),
|
|
709
|
-
let n =
|
|
709
|
+
]), oe = H((e) => {
|
|
710
|
+
let n = L.current;
|
|
710
711
|
if (n && n.pointerId === e.pointerId) {
|
|
711
|
-
if (
|
|
712
|
-
|
|
712
|
+
if (L.current = null, n.moved) return E(!1), u(t, n.offset, !0), void d(t, n.offset);
|
|
713
|
+
re();
|
|
713
714
|
}
|
|
714
715
|
}, [
|
|
715
716
|
t,
|
|
716
717
|
u,
|
|
717
718
|
d,
|
|
718
|
-
|
|
719
|
-
]),
|
|
720
|
-
let n =
|
|
721
|
-
n && n.pointerId === e.pointerId && (
|
|
722
|
-
}, [t, u]),
|
|
719
|
+
re
|
|
720
|
+
]), se = H((e) => {
|
|
721
|
+
let n = L.current;
|
|
722
|
+
n && n.pointerId === e.pointerId && (L.current = null, n.moved && (E(!1), u(t, n.startOffset, !0)));
|
|
723
|
+
}, [t, u]), ce = H((e) => {
|
|
723
724
|
if (s) return;
|
|
724
725
|
let n = e.shiftKey ? .1 : .01;
|
|
725
726
|
switch (e.key) {
|
|
726
727
|
case "ArrowLeft":
|
|
727
|
-
d(t,
|
|
728
|
+
d(t, Bn(r - n));
|
|
728
729
|
break;
|
|
729
730
|
case "ArrowRight":
|
|
730
|
-
d(t,
|
|
731
|
+
d(t, Bn(r + n));
|
|
731
732
|
break;
|
|
732
733
|
case "Home":
|
|
733
734
|
d(t, 0);
|
|
@@ -741,11 +742,11 @@ var Vn = U((e) => {
|
|
|
741
742
|
break;
|
|
742
743
|
case "Enter":
|
|
743
744
|
case " ":
|
|
744
|
-
|
|
745
|
+
ne(!0);
|
|
745
746
|
break;
|
|
746
747
|
case "Escape":
|
|
747
748
|
if (!C) return;
|
|
748
|
-
|
|
749
|
+
I.reference.close(0);
|
|
749
750
|
break;
|
|
750
751
|
default: return;
|
|
751
752
|
}
|
|
@@ -756,11 +757,11 @@ var Vn = U((e) => {
|
|
|
756
757
|
r,
|
|
757
758
|
c,
|
|
758
759
|
C,
|
|
759
|
-
|
|
760
|
-
|
|
760
|
+
I,
|
|
761
|
+
ne,
|
|
761
762
|
d,
|
|
762
763
|
m
|
|
763
|
-
]),
|
|
764
|
+
]), le = C || T || D, ue = !s && !T && !C && k, de = Q($, {
|
|
764
765
|
className: "sxl-gradient-stop-toolbar",
|
|
765
766
|
onPointerDown: (e) => {
|
|
766
767
|
e.stopPropagation();
|
|
@@ -770,7 +771,7 @@ var Vn = U((e) => {
|
|
|
770
771
|
alignItems: "center",
|
|
771
772
|
gap: .25
|
|
772
773
|
},
|
|
773
|
-
children: [Z(
|
|
774
|
+
children: [Z(X, {
|
|
774
775
|
tabIndex: -1,
|
|
775
776
|
propsTooltip: {
|
|
776
777
|
label: g("fill.gradientStopColor"),
|
|
@@ -780,27 +781,27 @@ var Vn = U((e) => {
|
|
|
780
781
|
className: "color-wrapper",
|
|
781
782
|
sx: {
|
|
782
783
|
lineHeight: 0,
|
|
783
|
-
"& .activeColor": { fill:
|
|
784
|
+
"& .activeColor": { fill: ee }
|
|
784
785
|
},
|
|
785
|
-
children: Z(
|
|
786
|
+
children: Z(V, { iconKey: "circle.colored" })
|
|
786
787
|
}),
|
|
787
788
|
onClick: () => {
|
|
788
|
-
A(!1),
|
|
789
|
+
A(!1), re();
|
|
789
790
|
}
|
|
790
|
-
}), Z(
|
|
791
|
+
}), Z(X, {
|
|
791
792
|
tabIndex: -1,
|
|
792
793
|
disabled: !c,
|
|
793
794
|
propsTooltip: {
|
|
794
795
|
label: g("fill.gradientRemoveStop"),
|
|
795
796
|
simple: !0
|
|
796
797
|
},
|
|
797
|
-
icon: Z(
|
|
798
|
+
icon: Z(V, { iconKey: "Close" }),
|
|
798
799
|
onClick: () => m(t)
|
|
799
800
|
})]
|
|
800
801
|
});
|
|
801
|
-
return Q(
|
|
802
|
-
title:
|
|
803
|
-
open:
|
|
802
|
+
return Q(gn, { children: [Z(pn, {
|
|
803
|
+
title: de,
|
|
804
|
+
open: ue,
|
|
804
805
|
onOpen: () => A(!0),
|
|
805
806
|
onClose: () => A(!1),
|
|
806
807
|
enterDelay: 250,
|
|
@@ -821,19 +822,19 @@ var Vn = U((e) => {
|
|
|
821
822
|
ref: S,
|
|
822
823
|
role: "button",
|
|
823
824
|
tabIndex: s ? -1 : 0,
|
|
824
|
-
"aria-label": g("fill.gradientStop", { position:
|
|
825
|
+
"aria-label": g("fill.gradientStop", { position: F }),
|
|
825
826
|
"aria-disabled": s || void 0,
|
|
826
|
-
className:
|
|
827
|
+
className: R("sxl-gradient-stop", {
|
|
827
828
|
"sxl-gradient-stop-open": C,
|
|
828
829
|
"sxl-gradient-stop-dragging": T
|
|
829
830
|
}),
|
|
830
|
-
onPointerDown:
|
|
831
|
-
onPointerMove:
|
|
832
|
-
onPointerUp:
|
|
833
|
-
onPointerCancel:
|
|
831
|
+
onPointerDown: ie,
|
|
832
|
+
onPointerMove: ae,
|
|
833
|
+
onPointerUp: oe,
|
|
834
|
+
onPointerCancel: se,
|
|
834
835
|
onFocus: () => O(!0),
|
|
835
836
|
onBlur: () => O(!1),
|
|
836
|
-
onKeyDown:
|
|
837
|
+
onKeyDown: ce,
|
|
837
838
|
sx: {
|
|
838
839
|
position: "absolute",
|
|
839
840
|
left: 100 * r + "%",
|
|
@@ -847,7 +848,7 @@ var Vn = U((e) => {
|
|
|
847
848
|
touchAction: "none",
|
|
848
849
|
outline: "none",
|
|
849
850
|
zIndex: +!!T,
|
|
850
|
-
filter:
|
|
851
|
+
filter: le ? `drop-shadow(0 1px 2px ${_.palette.action.active})` : void 0
|
|
851
852
|
},
|
|
852
853
|
children: Z("svg", {
|
|
853
854
|
width: 14,
|
|
@@ -855,28 +856,28 @@ var Vn = U((e) => {
|
|
|
855
856
|
viewBox: "0 0 14 17",
|
|
856
857
|
"aria-hidden": "true",
|
|
857
858
|
children: Z("path", {
|
|
858
|
-
d:
|
|
859
|
-
fill:
|
|
860
|
-
stroke:
|
|
861
|
-
strokeWidth:
|
|
859
|
+
d: zn,
|
|
860
|
+
fill: ee,
|
|
861
|
+
stroke: le ? _.palette.primary.main : _.palette.text.secondary,
|
|
862
|
+
strokeWidth: le ? 1.5 : 1,
|
|
862
863
|
strokeLinejoin: "round"
|
|
863
864
|
})
|
|
864
865
|
})
|
|
865
866
|
})
|
|
866
|
-
}),
|
|
867
|
+
}), I.component] });
|
|
867
868
|
});
|
|
868
|
-
|
|
869
|
-
var
|
|
870
|
-
let { stops: t, onChange: n, minStops: r = 2, maxStops: i = 8, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d =
|
|
869
|
+
Kn.displayName = "StopHandle";
|
|
870
|
+
var qn = W((e) => {
|
|
871
|
+
let { stops: t, onChange: n, minStops: r = 2, maxStops: i = 8, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = U(), f = q(null), p = q({
|
|
871
872
|
known: [],
|
|
872
873
|
next: 1
|
|
873
874
|
}), m = K(() => {
|
|
874
875
|
let e = p.current, n = ((e, t, n) => {
|
|
875
|
-
for (let n of t) if (
|
|
876
|
+
for (let n of t) if (Wn(e, n.stops)) return n.keys;
|
|
876
877
|
let r = /* @__PURE__ */ new Set();
|
|
877
878
|
return e.map((e) => {
|
|
878
879
|
for (let n of t) {
|
|
879
|
-
let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) &&
|
|
880
|
+
let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) && Un(t, e));
|
|
880
881
|
if (t >= 0) return r.add(n.keys[t]), n.keys[t];
|
|
881
882
|
}
|
|
882
883
|
return -1;
|
|
@@ -887,33 +888,33 @@ var Hn = U((e) => {
|
|
|
887
888
|
keys: n
|
|
888
889
|
}, ...e.known].slice(0, 3)), n;
|
|
889
890
|
}, [t]), [h, g] = J(null), [_, v] = J(null), [y, b] = J(null);
|
|
890
|
-
|
|
891
|
+
an(() => {
|
|
891
892
|
g((e) => {
|
|
892
893
|
if (!e?.released) return e;
|
|
893
894
|
let n = m.indexOf(e.key);
|
|
894
895
|
return n >= 0 && t[n].offset === e.offset ? null : e;
|
|
895
896
|
});
|
|
896
|
-
}, [t, m]),
|
|
897
|
+
}, [t, m]), an(() => {
|
|
897
898
|
if (!h?.released) return;
|
|
898
899
|
let e = window.setTimeout(() => g((e) => e?.released ? null : e), 1e3);
|
|
899
900
|
return () => window.clearTimeout(e);
|
|
900
901
|
}, [h]);
|
|
901
|
-
let x = !c && t.length < i, S = !c && t.length > r, C =
|
|
902
|
+
let x = !c && t.length < i, S = !c && t.length > r, C = H((e) => {
|
|
902
903
|
let t = [...e].sort((e, t) => e.stop.offset - t.stop.offset), r = {
|
|
903
904
|
stops: t.map((e) => e.stop),
|
|
904
905
|
keys: t.map((e) => e.key)
|
|
905
906
|
}, i = p.current;
|
|
906
907
|
i.known = [r, ...i.known].slice(0, 3), n(r.stops.slice());
|
|
907
|
-
}, [n]), w =
|
|
908
|
+
}, [n]), w = H(() => t.map((e, t) => ({
|
|
908
909
|
stop: e,
|
|
909
910
|
key: m[t]
|
|
910
|
-
})), [t, m]), T =
|
|
911
|
+
})), [t, m]), T = H((e, t, n) => {
|
|
911
912
|
g({
|
|
912
913
|
key: m[e],
|
|
913
914
|
offset: t,
|
|
914
915
|
released: n
|
|
915
916
|
});
|
|
916
|
-
}, [m]), E =
|
|
917
|
+
}, [m]), E = H((e, t) => {
|
|
917
918
|
C(w().map((n, r) => r === e ? {
|
|
918
919
|
...n,
|
|
919
920
|
stop: {
|
|
@@ -921,15 +922,15 @@ var Hn = U((e) => {
|
|
|
921
922
|
offset: t
|
|
922
923
|
}
|
|
923
924
|
} : n));
|
|
924
|
-
}, [w, C]), D =
|
|
925
|
+
}, [w, C]), D = H((e, t) => {
|
|
925
926
|
v(t ? {
|
|
926
927
|
key: m[e],
|
|
927
928
|
color: t
|
|
928
929
|
} : null);
|
|
929
|
-
}, [m]), O =
|
|
930
|
+
}, [m]), O = H((e, t) => {
|
|
930
931
|
let n = m[e];
|
|
931
932
|
b((e) => t ? n : e === n ? null : e);
|
|
932
|
-
}, [m]), k =
|
|
933
|
+
}, [m]), k = H((e, t) => {
|
|
933
934
|
C(w().map((n, r) => r === e ? {
|
|
934
935
|
...n,
|
|
935
936
|
stop: {
|
|
@@ -937,14 +938,14 @@ var Hn = U((e) => {
|
|
|
937
938
|
color: t.toString()
|
|
938
939
|
}
|
|
939
940
|
} : n));
|
|
940
|
-
}, [w, C]), A =
|
|
941
|
+
}, [w, C]), A = H((e) => {
|
|
941
942
|
t.length <= r || C(w().filter((t, n) => n !== e));
|
|
942
943
|
}, [
|
|
943
944
|
t,
|
|
944
945
|
r,
|
|
945
946
|
w,
|
|
946
947
|
C
|
|
947
|
-
]), j =
|
|
948
|
+
]), j = H((e) => {
|
|
948
949
|
if (t.length >= i) return;
|
|
949
950
|
let n = [...t].sort((e, t) => e.offset - t.offset), r = e;
|
|
950
951
|
if (r === void 0) {
|
|
@@ -959,7 +960,7 @@ var Hn = U((e) => {
|
|
|
959
960
|
C([...w(), {
|
|
960
961
|
stop: {
|
|
961
962
|
offset: r,
|
|
962
|
-
color:
|
|
963
|
+
color: Hn(o.color, s.color, a)
|
|
963
964
|
},
|
|
964
965
|
key: p.current.next++
|
|
965
966
|
}]);
|
|
@@ -969,10 +970,10 @@ var Hn = U((e) => {
|
|
|
969
970
|
a,
|
|
970
971
|
w,
|
|
971
972
|
C
|
|
972
|
-
]), M =
|
|
973
|
+
]), M = H((e) => {
|
|
973
974
|
if (!x || e.button !== 0 || y !== null || e.target.closest(".sxl-gradient-stop")) return;
|
|
974
975
|
let t = e.currentTarget.getBoundingClientRect();
|
|
975
|
-
t.width <= 0 || j(
|
|
976
|
+
t.width <= 0 || j(Bn((e.clientX - t.left) / t.width));
|
|
976
977
|
}, [
|
|
977
978
|
x,
|
|
978
979
|
y,
|
|
@@ -980,7 +981,7 @@ var Hn = U((e) => {
|
|
|
980
981
|
]), N = K(() => {
|
|
981
982
|
let e = t.map((e, t) => ({
|
|
982
983
|
offset: h?.key === m[t] ? h.offset : e.offset,
|
|
983
|
-
css:
|
|
984
|
+
css: Vn(_?.key === m[t] ? _.color : e.color, a, s)
|
|
984
985
|
}));
|
|
985
986
|
return e.sort((e, t) => e.offset - t.offset), `linear-gradient(90deg, ${e.map((e) => `${e.css} ${(100 * e.offset).toFixed(2)}%`).join(", ")})`;
|
|
986
987
|
}, [
|
|
@@ -992,7 +993,7 @@ var Hn = U((e) => {
|
|
|
992
993
|
s
|
|
993
994
|
]);
|
|
994
995
|
return Q($, {
|
|
995
|
-
className:
|
|
996
|
+
className: R("sxl-gradient-stops", l),
|
|
996
997
|
sx: {
|
|
997
998
|
display: "flex",
|
|
998
999
|
alignItems: "flex-start",
|
|
@@ -1021,7 +1022,7 @@ var Hn = U((e) => {
|
|
|
1021
1022
|
cursor: x ? "copy" : "default",
|
|
1022
1023
|
opacity: c ? .5 : 1
|
|
1023
1024
|
},
|
|
1024
|
-
children: t.map((e, t) => Z(
|
|
1025
|
+
children: t.map((e, t) => Z(Kn, {
|
|
1025
1026
|
index: t,
|
|
1026
1027
|
stop: e,
|
|
1027
1028
|
offset: h?.key === m[t] ? h.offset : e.offset,
|
|
@@ -1039,28 +1040,28 @@ var Hn = U((e) => {
|
|
|
1039
1040
|
onOpenChange: O
|
|
1040
1041
|
}, m[t]))
|
|
1041
1042
|
})
|
|
1042
|
-
}), Z(
|
|
1043
|
+
}), Z(X, {
|
|
1043
1044
|
disabled: !x,
|
|
1044
1045
|
propsTooltip: {
|
|
1045
1046
|
label: d("fill.gradientAddStop"),
|
|
1046
1047
|
simple: !0
|
|
1047
1048
|
},
|
|
1048
|
-
icon: Z(
|
|
1049
|
+
icon: Z(V, { iconKey: "Add" }),
|
|
1049
1050
|
onClick: () => j(),
|
|
1050
1051
|
sx: { marginTop: "-3px" }
|
|
1051
1052
|
})]
|
|
1052
1053
|
});
|
|
1053
1054
|
});
|
|
1054
|
-
|
|
1055
|
-
var
|
|
1056
|
-
let { value: t, onChange: n, minStops: r, maxStops: i, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d =
|
|
1055
|
+
qn.displayName = "GradientStopsBar";
|
|
1056
|
+
var Jn = W((e) => {
|
|
1057
|
+
let { value: t, onChange: n, minStops: r, maxStops: i, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = U(), f = H((e) => {
|
|
1057
1058
|
n({
|
|
1058
1059
|
...t,
|
|
1059
1060
|
...e
|
|
1060
1061
|
});
|
|
1061
|
-
}, [t, n]), p = t.gradientType ===
|
|
1062
|
+
}, [t, n]), p = t.gradientType === B.GradientType.Linear;
|
|
1062
1063
|
return Q($, {
|
|
1063
|
-
className:
|
|
1064
|
+
className: R("sxl-gradient-editor", l),
|
|
1064
1065
|
sx: {
|
|
1065
1066
|
display: "flex",
|
|
1066
1067
|
flexDirection: "column",
|
|
@@ -1075,30 +1076,30 @@ var Un = U((e) => {
|
|
|
1075
1076
|
gap: 1,
|
|
1076
1077
|
alignItems: "center"
|
|
1077
1078
|
},
|
|
1078
|
-
children: [Q(
|
|
1079
|
+
children: [Q(_n, {
|
|
1079
1080
|
size: "small",
|
|
1080
1081
|
sx: {
|
|
1081
1082
|
minWidth: 132,
|
|
1082
1083
|
flex: "1 1 132px"
|
|
1083
1084
|
},
|
|
1084
|
-
children: [Z(
|
|
1085
|
+
children: [Z(yn, {
|
|
1085
1086
|
shrink: !0,
|
|
1086
1087
|
children: d("fill.gradientStyle")
|
|
1087
|
-
}), Q(
|
|
1088
|
+
}), Q(Sn, {
|
|
1088
1089
|
label: d("fill.gradientStyle"),
|
|
1089
1090
|
notched: !0,
|
|
1090
1091
|
disabled: c,
|
|
1091
1092
|
value: t.gradientType,
|
|
1092
1093
|
onChange: (e) => f({ gradientType: e.target.value }),
|
|
1093
|
-
children: [Z(
|
|
1094
|
-
value:
|
|
1094
|
+
children: [Z(bn, {
|
|
1095
|
+
value: B.GradientType.Linear,
|
|
1095
1096
|
children: d("fill.gradientLinear")
|
|
1096
|
-
}), Z(
|
|
1097
|
-
value:
|
|
1097
|
+
}), Z(bn, {
|
|
1098
|
+
value: B.GradientType.Path,
|
|
1098
1099
|
children: d("fill.gradientRadial")
|
|
1099
1100
|
})]
|
|
1100
1101
|
})]
|
|
1101
|
-
}), Z(
|
|
1102
|
+
}), Z(Cn, {
|
|
1102
1103
|
label: d("fill.gradientAngle"),
|
|
1103
1104
|
type: "number",
|
|
1104
1105
|
size: "small",
|
|
@@ -1125,12 +1126,12 @@ var Un = U((e) => {
|
|
|
1125
1126
|
gap: .5,
|
|
1126
1127
|
minWidth: 0
|
|
1127
1128
|
},
|
|
1128
|
-
children: [Z(
|
|
1129
|
+
children: [Z(wn, {
|
|
1129
1130
|
variant: "caption",
|
|
1130
1131
|
component: "div",
|
|
1131
1132
|
sx: { color: "text.secondary" },
|
|
1132
1133
|
children: d("fill.gradientStops")
|
|
1133
|
-
}), Z(
|
|
1134
|
+
}), Z(qn, {
|
|
1134
1135
|
stops: t.stops,
|
|
1135
1136
|
onChange: (e) => f({ stops: e }),
|
|
1136
1137
|
minStops: r,
|
|
@@ -1143,8 +1144,8 @@ var Un = U((e) => {
|
|
|
1143
1144
|
})]
|
|
1144
1145
|
});
|
|
1145
1146
|
});
|
|
1146
|
-
|
|
1147
|
-
var
|
|
1147
|
+
Jn.displayName = "GradientEditor";
|
|
1148
|
+
var Yn = (e) => {
|
|
1148
1149
|
let t = e.getStops();
|
|
1149
1150
|
return {
|
|
1150
1151
|
gradientType: e.getGradientType(),
|
|
@@ -1152,10 +1153,10 @@ var Wn = (e) => {
|
|
|
1152
1153
|
stops: t.length >= 2 ? t.map((e) => ({
|
|
1153
1154
|
offset: e.getOffset(),
|
|
1154
1155
|
color: e.getColor().toString()
|
|
1155
|
-
})) : [...
|
|
1156
|
+
})) : [...Xn.stops]
|
|
1156
1157
|
};
|
|
1157
|
-
},
|
|
1158
|
-
gradientType:
|
|
1158
|
+
}, Xn = Object.freeze({
|
|
1159
|
+
gradientType: B.GradientType.Linear,
|
|
1159
1160
|
angle: 90,
|
|
1160
1161
|
stops: [{
|
|
1161
1162
|
offset: 0,
|
|
@@ -1164,18 +1165,18 @@ var Wn = (e) => {
|
|
|
1164
1165
|
offset: 1,
|
|
1165
1166
|
color: "4472c4"
|
|
1166
1167
|
}]
|
|
1167
|
-
}),
|
|
1168
|
+
}), Zn = /* @__PURE__ */ new Set(/* @__PURE__ */ "square.elevation.variant.title.onKeyDown.workbook.onWorkbookChange.onDocumentError.propsDocumentError.renderDocumentError.propsDocumentLoading.renderDocumentLoading.propsWorkbook.onWorkbookLoad.propsTaskPaneArea.renderTaskPaneArea.taskPaneSide.logo.onDirtyChange.propsDocumentTitle.showFormulaBar.propsFormulaBar.renderFormulaBar.formulaBarPlacement.manageVisualViewport.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), Qn = Dn("studio:eagerStudio", () => import("./tiC8hseLz66gO5BS.mjs").then((e) => e.t)), $n = ({ error: e, onShown: t }) => (G(() => {
|
|
1168
1169
|
t();
|
|
1169
|
-
}, []), Z(
|
|
1170
|
-
let { sx: n, style:
|
|
1170
|
+
}, []), Z(fn, { error: e })), er = W(en((e, t) => {
|
|
1171
|
+
let { sx: n, style: r, className: i, licenseKey: a, renderDocumentLoading: o = c, propsDocumentLoading: s, onWorkbookLoad: l, onDocumentError: u, ...d } = e, [f, p] = ((e) => {
|
|
1171
1172
|
let t = {}, n = {};
|
|
1172
|
-
for (let r in e) (
|
|
1173
|
+
for (let r in e) (Zn.has(r) ? t : n)[r] = e[r];
|
|
1173
1174
|
return [t, n];
|
|
1174
1175
|
})(d);
|
|
1175
1176
|
K(() => {
|
|
1176
|
-
|
|
1177
|
-
}, [
|
|
1178
|
-
let [m] =
|
|
1177
|
+
a && Et.setLicenseKey(a).catch(() => {});
|
|
1178
|
+
}, [a]);
|
|
1179
|
+
let [m] = Yt(kt.Mode, Ot[kt.Mode]), { themeMode: h } = Xt({ mode: m ?? void 0 }), g = h === "dark", [_, v] = J(null), y = Ht("studio", nn()), [b, x] = J(!1), S = K(() => !o || b ? null : Z(xn, {
|
|
1179
1180
|
style: {
|
|
1180
1181
|
backgroundColor: `var(--sxl-color-base-100, ${g ? "#121212" : "#fff"})`,
|
|
1181
1182
|
inset: 0,
|
|
@@ -1187,22 +1188,22 @@ var Wn = (e) => {
|
|
|
1187
1188
|
justifyContent: "center",
|
|
1188
1189
|
zIndex: 9900
|
|
1189
1190
|
},
|
|
1190
|
-
children: Z(
|
|
1191
|
-
render:
|
|
1192
|
-
props:
|
|
1191
|
+
children: Z(Vt, {
|
|
1192
|
+
render: o,
|
|
1193
|
+
props: s ?? {}
|
|
1193
1194
|
})
|
|
1194
1195
|
}), [
|
|
1196
|
+
o,
|
|
1195
1197
|
s,
|
|
1196
|
-
c,
|
|
1197
1198
|
g,
|
|
1198
1199
|
b
|
|
1199
|
-
]), C = K(() =>
|
|
1200
|
+
]), C = K(() => Ut(Qn.load, { renderError: ({ error: e }) => Z($n, {
|
|
1200
1201
|
error: e,
|
|
1201
1202
|
onShown: () => x(!0)
|
|
1202
1203
|
}) }), []);
|
|
1203
1204
|
return Q($, {
|
|
1204
1205
|
ref: v,
|
|
1205
|
-
className:
|
|
1206
|
+
className: R("sheetxl-studio", y, i),
|
|
1206
1207
|
"data-sxl-theme-mode": h,
|
|
1207
1208
|
sx: n,
|
|
1208
1209
|
style: {
|
|
@@ -1215,10 +1216,10 @@ var Wn = (e) => {
|
|
|
1215
1216
|
minHeight: 0,
|
|
1216
1217
|
position: "relative",
|
|
1217
1218
|
overflow: "hidden",
|
|
1218
|
-
...
|
|
1219
|
+
...r
|
|
1219
1220
|
},
|
|
1220
1221
|
...p,
|
|
1221
|
-
children: [Z(
|
|
1222
|
+
children: [Z(Qt, {
|
|
1222
1223
|
fallback: null,
|
|
1223
1224
|
children: Z(C, {
|
|
1224
1225
|
...f,
|
|
@@ -1232,10 +1233,10 @@ var Wn = (e) => {
|
|
|
1232
1233
|
}), S]
|
|
1233
1234
|
});
|
|
1234
1235
|
}));
|
|
1235
|
-
|
|
1236
|
-
var
|
|
1237
|
-
let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d =
|
|
1238
|
-
|
|
1236
|
+
er.displayName = "Studio";
|
|
1237
|
+
var tr = (e = {}) => {
|
|
1238
|
+
let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = Jt(), [f, p] = J(null), [m, h] = J(!1), g = zt(f);
|
|
1239
|
+
It(g, m, {
|
|
1239
1240
|
documentTitle: s,
|
|
1240
1241
|
confirmOnClose: c,
|
|
1241
1242
|
keyboardGuard: l
|
|
@@ -1262,15 +1263,15 @@ var Xn = (e = {}) => {
|
|
|
1262
1263
|
}, [v]);
|
|
1263
1264
|
let b = q(a);
|
|
1264
1265
|
b.current = a;
|
|
1265
|
-
let x =
|
|
1266
|
+
let x = tn((e) => {
|
|
1266
1267
|
e && y.current && (e.getOrigin().setName(y.current), y.current = null), p(e), b.current?.(e);
|
|
1267
1268
|
}, []), S = q(o);
|
|
1268
1269
|
S.current = o;
|
|
1269
|
-
let C =
|
|
1270
|
+
let C = tn((e) => {
|
|
1270
1271
|
h(e), S.current?.(e);
|
|
1271
1272
|
}, []);
|
|
1272
1273
|
G(() => {
|
|
1273
|
-
n === "welcome" && _ === void 0 &&
|
|
1274
|
+
n === "welcome" && _ === void 0 && Ce(r);
|
|
1274
1275
|
}, [
|
|
1275
1276
|
n,
|
|
1276
1277
|
_,
|
|
@@ -1278,7 +1279,7 @@ var Xn = (e = {}) => {
|
|
|
1278
1279
|
]);
|
|
1279
1280
|
let w = q(!1), T = q(i);
|
|
1280
1281
|
T.current = i;
|
|
1281
|
-
let E =
|
|
1282
|
+
let E = tn((e) => (w.current || (w.current = !0, n === "welcome" && _ === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
1282
1283
|
e.source?.getCommandScope?.()?.resolve("showWelcome")?.execute({
|
|
1283
1284
|
templatePath: r,
|
|
1284
1285
|
atStartup: !0
|
|
@@ -1296,4 +1297,4 @@ var Xn = (e = {}) => {
|
|
|
1296
1297
|
onWorkbookLoad: E
|
|
1297
1298
|
};
|
|
1298
1299
|
};
|
|
1299
|
-
export {
|
|
1300
|
+
export { r as AnomaliesPlugin, jn as AppearanceCommandButton, Ge as AutoColorPosition, b as BorderCommandButton, et as BorderPopupButton, Qe as BorderStylePopupButton, $e as BorderTemplateIcon, Oe as CalculationOptionsCommandButton, S as CalculationRequiredStatus, e as CircularReferenceStatus, Ze as ColorButton, Ye as ColorButtonList, tt as ColorCommandButton, Ke as ColorPanel, qe as ColorPanelType, Xe as ColorPopupButton, We as ColumnMenu, Ct as CommentCard, k as CommentsPlugin, Xn as DEFAULT_GRADIENT, Dt as DefaultTaskPaneRegistry, we as DefaultWorkbookToolbars, Se as DocThemeCommandButton, Ae as DocumentTitle, f as ExternalLinksPlugin, x as FORMAT_TASK_PANE_KEY, h as FORMULA_BAR_EDITOR_ID, ft as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, An as FileCommandButton, y as FillMenu, rt as FontFamilyCommandButton, nt as FontSizeCommandButton, u as FormatPlugin, d as FormulaBar, dt as FormulaField, _t as FunctionArgumentsPanel, bt as FunctionSearchPanel, Jn as GradientEditor, qn as GradientStopsBar, L as INSERT_CELL_CONTROL_OPTIONS_KEY, St as INSERT_FUNCTION_PAGE_CLASS, kn as InputField, be as InsertCellControlCommandButton, Fe as InsertFunctionCommandPopupButton, yt as InsertFunctionOption, Mn as InsertFunctionSumCommandPopupButton, xt as InsertFunctionWizard, mt as ItemCard, ht as ItemCardAction, gt as ItemsSearchField, Tt as LicenseManager, O as MobileFormulaBar, A as MobileInputToolbar, M as NamedCollectionEditor, m as NamedPlugin, s as NumberFormatCommandButton, ot as NumberFormatOption, oe as NumberStats, Fn as PATTERN_GALLERY, wt as PasswordField, ze as PasteCommandButton, Ln as PatternPopupButton, Pn as PatternSwatch, N as PendingStatus, C as PivotMenu, ee as PivotToolbar, a as PresetCellStylesCommandButton, pt as PresetChip, Ve as PresetPivotStylesCommandButton, g as PresetSlicerStylesCommandButton, lt as PresetTableStylesCommandButton, v as ProtectionPlugin, _ as SheetTabMenu, ve as SheetZoomCommandButton, Ne as SheetZoomScale, he as SheetsAllMenu, p as SlicerPlugin, j as StatusBar, er as Studio, Je as StyledStrokeIcon, T as TablePlugin, ct as TableStyleCanvasPreview, st as TableStylePreview, Te as TableToolbar, D as TextEffectsCommandButton, n as TextRotateGroupButton, ne as ThemeSelectButton, Ue as ThemeSelectPanel, Le as ThemeSelectPopupButton, l as UndoRedoCommandButton, ce as WalkingCopyCommandButton, _e as WorkbookContextMenu, pe as WorkbookElement, At as WorkbookIO, t as WorkbookStrip, je as WorkbookToolbars, fe as createStudioThemeCSS, ue as createThemeFromMUITheme, Me as defaultRenderColumnMenu, re as defaultRenderCommentCard, ye as defaultRenderContextMenu, Pe as defaultRenderFillMenu, ie as defaultRenderFormulaBar, se as defaultRenderHyperlinkCard, De as defaultRenderMovableMenu, xe as defaultRenderOutlineButton, de as defaultRenderOutlineLevelButton, le as defaultRenderPivotMenu, P as defaultRenderPivotToolbar, Ie as defaultRenderSheetTab, He as defaultRenderSheetTabMenu, I as defaultRenderSheetsAll, Be as defaultRenderStatusBar, w as defaultRenderTableToolbar, i as defaultRenderTabs, me as defaultRenderToolbar, Re as defaultRenderTooltip, E as defaultRenderWorkbookError, c as defaultRenderWorkbookLoading, o as defaultRenderWorksheet, at as numberFormatCategoryLabel, it as numberFormatTypeLabel, vt as optionsForPage, In as patternLabel, ae as registerSheetCommandGroups, ge as registerStudioCommandCatalogs, te as registerStudioCommandGroups, Ee as registerWorkbookCommandGroups, Mt as setPrintExamplesOnLoad, Yn as toGradientValue, Nn as toPatternSlots, F as tokensToMuiOptions, ke as useFormulaBarSession, Pt as useModelListener, Ft as useRangeListener, tr as useStudioApp };
|