@sheetxl/studio-mui 0.8.0-beta.11 → 0.8.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{DDc6rDuU9JAo1DH_.mjs → 6QDKC3DXaJjdTQvn.mjs} +3 -3
- package/browser/esm/{LZoYSQAYV2wksnDv.mjs → B8-aNCyDzXh-3BnN.mjs} +5 -5
- package/browser/esm/{Bujtz_Guj88d03vI.mjs → BEjT3zSht5iH93uB.mjs} +6 -6
- package/browser/esm/{Ds3XRkne7HxcXD8J.mjs → BKB6y-l1USxdLM8V.mjs} +2 -2
- package/browser/esm/{BED6h6YAwCf1HEQJ.mjs → BKE2ez65WLb02bOy.mjs} +1 -1
- package/browser/esm/{C9pIZVACtl9unFOp.mjs → BOKRcLS0QikMyoWf.mjs} +2 -2
- package/browser/esm/{DdcZrjMLWVukWcU5.mjs → BTH-nzAPniB6G4TG.mjs} +814 -685
- package/browser/esm/{BYE9gCDWKyx6mnVs.mjs → Bbvx7IiwR5jW-Hwu.mjs} +114 -103
- package/browser/esm/{zqilJefihVd7At2T.mjs → BgYy8t04q74BFK5_.mjs} +7 -7
- package/browser/esm/{CynTY0oNtyJnoaBq.mjs → BniGX5aeZXM9zMWH.mjs} +1 -1
- package/browser/esm/{D9ISy7VkaRRFJl46.mjs → BsxCXTfNJhFrldW9.mjs} +4 -4
- package/browser/esm/{D3rRUK4dIM5gUSmj.mjs → BwbheU7gonBpE9Bs.mjs} +2 -2
- package/browser/esm/{DDczwkXhz_MHub4z.mjs → BzLjlI67XDv3JcvA.mjs} +2 -2
- package/browser/esm/{DsoNMWDwHZP8UXQd.mjs → C3KoAU2WKPxC5-u7.mjs} +1 -1
- package/browser/esm/{DTpRkgsTm_zYnWfW.mjs → C9HzAN75sBq35kZg.mjs} +1 -1
- package/browser/esm/{BknfGJouygmnpFIU.mjs → CMbJhvtUGfi-wQ3o.mjs} +2 -2
- package/browser/esm/{DnGaP5F7mLwCGUYG.mjs → CQd6qQ6b5R96lYkQ.mjs} +206 -124
- package/browser/esm/{DV6i9RQZfJiKtEaJ.mjs → CYDqU_DnwM2dkv3O.mjs} +678 -623
- package/browser/esm/{ChSVxkPTIjgcC8PL.mjs → CYNVxcg3QJ1RHCwS.mjs} +2 -2
- package/browser/esm/{BjvD_4t2KGsZP5V8.mjs → CcyyIgMejaWOK8qw.mjs} +3 -3
- package/browser/esm/{ClBvNPeNCAhuVWrG.mjs → CkmieJ2_aHVESg8Q.mjs} +1 -1
- package/browser/esm/{Di3BUxA0SqFWWgeg.mjs → CtVEsNpA7LivARDl.mjs} +1 -1
- package/browser/esm/{w_JrR69vEpvoyeMy.mjs → CyRZCFT_uVfmLkoB.mjs} +1 -1
- package/browser/esm/{DpD4fg2WcyiKX_2K.mjs → D2KYXweAKTJVnLbt.mjs} +5 -5
- package/browser/esm/{G0Inqm6Eqw47dMpa.mjs → D9KI3TDs1Ed_en8o.mjs} +1 -1
- package/browser/esm/{CEtXsBzEjEKk9GOj.mjs → DAX7uqV05BahXHL1.mjs} +2 -2
- package/browser/esm/{COlZu93LRwuBvjE-.mjs → DFEz0RMRQrGo3tWC.mjs} +2 -2
- package/browser/esm/{DG21x7RKDpge6zAE.mjs → DLP2vkb2VDlGGA1A.mjs} +1 -1
- package/browser/esm/{BXhNFzyEGokTF-BL.mjs → DSIQFoVhlKSPzucu.mjs} +2 -2
- package/browser/esm/{Buqcl7J75MJrhpVE.mjs → DWUrXikL8TyDNRrI.mjs} +8 -8
- package/browser/esm/{0BWO0bLZ8Vm_dKd2.mjs → DYypTSo0adN5dUTS.mjs} +13 -13
- package/browser/esm/{CTjqDD-swFMZzI-Y.mjs → D_x6k92V4etahUtS.mjs} +2 -2
- package/browser/esm/{YThnrg3PadGs7B4j.mjs → DeSHnKGHmL3Lwl6t.mjs} +143 -137
- package/browser/esm/{BlE_8o8tO2AgAlaj.mjs → DkRUwiADZvoEL2xg.mjs} +1 -1
- package/browser/esm/{BAbq4-I5f5oUiNaF.mjs → DlGOcFqQzrYB9wiZ.mjs} +4 -4
- package/browser/esm/{C0wlMAIn9iREPK6w.mjs → DvDPtmuD-1bVFXhc.mjs} +1 -1
- package/browser/esm/{DKtJxrpN0axtuQ0l.mjs → DyKgCJS1jQMxcPFF.mjs} +1 -1
- package/browser/esm/{CWkOgdL7mOKiTR62.mjs → ERVyjcGWX4mUl1p_.mjs} +4 -4
- package/browser/esm/{HViD4Wfoi0mmqk9w.mjs → H8Dxocn689KdLYhD.mjs} +1 -1
- package/browser/esm/{Brsh5yscJ_4uKFXp.mjs → LF4eGB9EZ_W6kUXC.mjs} +2 -2
- package/browser/esm/{BokqKEpU6TFgfRs6.mjs → PSYAcayGMjkZauMz.mjs} +2 -2
- package/browser/esm/{DJOOed_OtB-XT7f3.mjs → TT3Q8r0Jww_zZmNv.mjs} +6 -6
- package/browser/esm/{C8JU4KsMasmLvojI.mjs → UMji8dlv0GKyfjRw.mjs} +1 -1
- package/browser/esm/UWvqHAyCVY3D-8Pk.mjs +242 -0
- package/browser/esm/{DRSCS6aLiYmPjUz1.mjs → aNYq27kJA5RA4L_0.mjs} +365 -362
- package/browser/esm/{CBD4RiRKbbZtSXV-.mjs → dn1AnYOyR4bZamV4.mjs} +3 -3
- package/browser/esm/{ttjcNHcFn8O6hfnd.mjs → eKakg1lFqn9dZkOO.mjs} +11 -11
- package/browser/esm/index.mjs +290 -287
- package/browser/esm/{CyLn6zOOp_biA3xU.mjs → jbPNLnRSS8Xt5_Zd.mjs} +8 -8
- package/browser/esm/{BvhYPwX3GrRaO9CM.mjs → oj398-Nn8Gb8Cmu7.mjs} +3 -3
- package/browser/esm/{DEv4pIEgYr5C7etm.mjs → qyIg2o8AfCcwCuVZ.mjs} +1 -1
- package/browser/esm/{xFqkfN8QMCxvsetB.mjs → w9rl3kS5ehDc2U18.mjs} +1 -1
- package/node/esm/{Do-zCKziWhoG5eAv.mjs → A-6VdAxUYuVCsS80.mjs} +2 -2
- package/node/esm/{Db3dbaYLKUO66T9s.mjs → BN5K-JWYdHJtnF5G.mjs} +473 -418
- package/node/esm/{CSAnTp5rwId0DUb8.mjs → BRSLQ_UNOJKAWRUq.mjs} +127 -116
- package/node/esm/{Bph-sR3l6AYWeuxK.mjs → BVCjSh6m3Z_Cd6DD.mjs} +2 -2
- package/node/esm/{4HmLH0bPVJCZLgik.mjs → BVyN4cLnT2ii1GMj.mjs} +1 -1
- package/node/esm/{zITjZ7R4raDqhP-n.mjs → BWG2FA3rbsOsBHQM.mjs} +3 -3
- package/node/esm/{DMXLxp3T0E0SRTQc.mjs → BZVe_afv1tfvExD6.mjs} +1 -1
- package/node/esm/{CYIoK22I6Yvv12_x.mjs → BiBMdXkWOUHZpWcb.mjs} +1 -1
- package/node/esm/{1bf4gn-2vld4BZ9u.mjs → Bj-UqmrrHdVSX4vS.mjs} +1 -1
- package/node/esm/{CuMePia6i_8yfJ6S.mjs → Blxb1C2eUbWoXcsl.mjs} +9 -9
- package/node/esm/{CZyA9uD4SkTvqp_G.mjs → BmySpSgR3H6eUK0L.mjs} +253 -253
- package/node/esm/{CPq-MIdEnc-53JpF.mjs → C86bIpa86VUEVY3_.mjs} +2 -2
- package/node/esm/CVeYUjvKIc1XuPC1.mjs +242 -0
- package/node/esm/{XEDcegsv5AGKBfu2.mjs → Cg1eqOYlWMCprF6j.mjs} +2 -2
- package/node/esm/{BlN7G0DVC24zauig.mjs → CksDVaPvtllTUe7F.mjs} +1 -1
- package/node/esm/{BPzcW4BejRqso338.mjs → D0HpdVWcePBpfQHX.mjs} +3 -3
- package/node/esm/{DfCuL8AUxMFoEG2s.mjs → DEK0D7wAs-O0YMBq.mjs} +36 -36
- package/node/esm/{DLqBHdFp6wvm6EGs.mjs → DFZctv5meqoQLuQF.mjs} +1 -1
- package/node/esm/{BIMkjQUwG4Ih-6Sh.mjs → DQ9BkHy3YgoLqyAw.mjs} +1 -1
- package/node/esm/{D-xqQ5qOSd6WrzwJ.mjs → DTtGcAuClHgv-5s6.mjs} +1 -1
- package/node/esm/{CvRbu8JPxFarsSR-.mjs → DcUXYRkJLeQFybOy.mjs} +5 -5
- package/node/esm/{CjC6s3RUJQNCF7mP.mjs → DjB5CHk5N8mYRiAW.mjs} +1 -1
- package/node/esm/{DeZJlLk8WJ3BLtLs.mjs → DopRYDglwpRFuZ9y.mjs} +3 -3
- package/node/esm/E3iNwBp5FzwRWhBH.mjs +489 -0
- package/node/esm/{DWqvf4H5F2wMnZ0L.mjs → Mm5HFZHyaIJ5EfYO.mjs} +1 -1
- package/node/esm/{CWcv7UVXF8IUB0PC.mjs → VLp3LfRG5Njlf4Mp.mjs} +15 -15
- package/node/esm/{CyafafEgfmjLqE5O.mjs → YTiLYQEQ-ST2j-Yd.mjs} +1 -1
- package/node/esm/{DdEzhVqYTrGODXrz.mjs → h5Tt_pl2Dpa9vaR-.mjs} +1 -1
- package/node/esm/index.mjs +2936 -2800
- package/node/esm/{BR45ogAR-hY2bE60.mjs → nVZW0-P7DISm9GFM.mjs} +1 -1
- package/node/esm/{yCUxQuqVuC4DHKPx.mjs → sKA_898BrWm-kfiS.mjs} +1 -1
- package/node/esm/{3WghtBXAvCDwcVrq.mjs → uySjOpgLC6iCqgC-.mjs} +1 -1
- package/node/esm/{BNg4QQY0WAPLE0q7.mjs → xw7vek0VNw7ofbq1.mjs} +3 -3
- package/node/esm/{DpJ2gmZJioCyq8La.mjs → zZTOpRFxWBgeZTpk.mjs} +166 -160
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +16 -1
- package/resources/locales/de/ui.msg.json +3 -1
- package/resources/locales/en/groups.cmd.json +16 -1
- package/resources/locales/en/ui.msg.json +3 -1
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/index.d.ts +1 -0
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
- package/types/src/conditions/ConditionEditor.d.ts +1 -1
- package/types/src/conditions/MembershipOption.d.ts +1 -1
- package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/SelectorSelect.d.ts +1 -1
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +1 -1
- package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/filter/ColumnMenu.d.ts +1 -1
- package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
- package/types/src/shape/ShapePlugin.d.ts +2 -0
- package/types/src/shape/index.d.ts +1 -1
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/StudioProps.d.ts +10 -10
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
- package/types/src/workbook/DefaultRenderers.d.ts +30 -18
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/esm/QgaAIDUMmBQBsXP9.mjs +0 -236
- package/node/esm/B0bdb_6p7fQI_ivo.mjs +0 -236
- package/node/esm/DatM6eEYPpAtIMy-.mjs +0 -405
- package/types/src/shape/InsertShapeCommandButton.d.ts +0 -20
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { n as e, r as t, t as n } from "./
|
|
7
|
+
import { n as e, r as t, t as n } from "./D_x6k92V4etahUtS.mjs";
|
|
8
8
|
import { IRange as r, ISort as i, Sort as a } from "@sheetxl/sdk";
|
|
9
9
|
import { DynamicIcon as o, useCallbackRef as s, useTranslator as c } from "@sheetxl/utils-react";
|
|
10
10
|
import { memo as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./CkmieJ2_aHVESg8Q.mjs";
|
|
8
8
|
import { DynamicIcon as t, useTranslator as n } from "@sheetxl/utils-react";
|
|
9
9
|
import { memo as r, useEffect as i, useMemo as a, useReducer as o, useState as s } from "react";
|
|
10
10
|
import { ExhibitIconButton as c, SimpleTooltip as l } from "@sheetxl/utils-mui";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./CkmieJ2_aHVESg8Q.mjs";
|
|
8
8
|
import { IFill as t, Table as n } from "@sheetxl/sdk";
|
|
9
9
|
import { StaticBorderRenderer as r, useGridColorScheme as i } from "@sheetxl/react";
|
|
10
10
|
import { CommandButtonType as a, useCallbackRef as o, useCommands as s, useTranslator as c } from "@sheetxl/utils-react";
|
|
11
11
|
import { forwardRef as l, memo as u, useCallback as d, useEffect as f, useLayoutEffect as p, useMemo as m, useReducer as h, useRef as g, useState as _ } from "react";
|
|
12
|
-
import { CommandButton as v, CommandPopupButton as y, ContextMenu as b, ExhibitDivider as x, ExhibitIconButton as S, ExhibitMenuHeader as C, ExhibitTooltip as w,
|
|
12
|
+
import { CommandButton as v, CommandPopupButton as y, ContextMenu as b, ExhibitDivider as x, ExhibitIconButton as S, ExhibitMenuHeader as C, ExhibitTooltip as w, defaultRenderPopupPanel as T } from "@sheetxl/utils-mui";
|
|
13
13
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
14
14
|
import { Box as k } from "@mui/material";
|
|
15
15
|
var A = "_sheetxl-reset_11z3j_1", j = 10, M = u(l((t, a) => {
|
|
@@ -301,7 +301,7 @@ var A = "_sheetxl-reset_11z3j_1", j = 10, M = u(l((t, a) => {
|
|
|
301
301
|
}, n.getName());
|
|
302
302
|
return s && (C = D(b, {
|
|
303
303
|
label: t.getStyleOptions().name,
|
|
304
|
-
|
|
304
|
+
renderPopupPanel: g,
|
|
305
305
|
children: C
|
|
306
306
|
})), C;
|
|
307
307
|
}), L = u(l((e, t) => {
|
|
@@ -419,11 +419,11 @@ var A = "_sheetxl-reset_11z3j_1", j = 10, M = u(l((t, a) => {
|
|
|
419
419
|
return D(y, {
|
|
420
420
|
ref: t,
|
|
421
421
|
quickCommand: p ? void 0 : F,
|
|
422
|
-
|
|
422
|
+
renderPopupPanel: U,
|
|
423
423
|
label: A?.getLabel(b),
|
|
424
424
|
groupKey: b,
|
|
425
425
|
commandState: P,
|
|
426
|
-
|
|
426
|
+
renderTooltip: ({ children: e, disabled: t }) => D(w, {
|
|
427
427
|
label: A?.getLabel(),
|
|
428
428
|
description: A?.getDescription(),
|
|
429
429
|
disabled: t,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.13
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { n as e } from "./6QDKC3DXaJjdTQvn.mjs";
|
|
8
|
+
import { InputField as t } from "./index.mjs";
|
|
9
|
+
import { useReferenceMode as n } from "@sheetxl/react";
|
|
10
|
+
import { useCallbackRef as r, useTranslator as i } from "@sheetxl/utils-react";
|
|
11
|
+
import { memo as a, useEffect as ee, useId as te, useMemo as o, useRef as s, useState as c } from "react";
|
|
12
|
+
import { OptionsDialog as ne } from "@sheetxl/utils-mui";
|
|
13
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
14
|
+
import { Box as re, FormControl as f, InputLabel as ie, MenuItem as p, Select as ae, TextField as oe } from "@mui/material";
|
|
15
|
+
var se = ["Ok", "Cancel"], ce = ["Cancel"], m = { paddingTop: (e) => e.spacing(1.5) }, h = (e) => e?.isReadOnly() ? null : e, g = "mailto:", _ = (e) => e.length >= 7 && e.substring(0, 7).toLowerCase() === g, v = (e) => {
|
|
16
|
+
if (!_(e)) return null;
|
|
17
|
+
let t = e.substring(7), n = t.indexOf("?");
|
|
18
|
+
if (n === -1) return {
|
|
19
|
+
address: t,
|
|
20
|
+
subject: ""
|
|
21
|
+
};
|
|
22
|
+
let r = "";
|
|
23
|
+
try {
|
|
24
|
+
r = new URLSearchParams(t.substring(n + 1)).get("subject") ?? "";
|
|
25
|
+
} catch {}
|
|
26
|
+
return {
|
|
27
|
+
address: t.substring(0, n),
|
|
28
|
+
subject: r
|
|
29
|
+
};
|
|
30
|
+
}, y = a((a) => {
|
|
31
|
+
let { initialValue: y = null, context: b, onInput: x, onOption: S, onValidateOption: C, onDone: w, disabled: T = !1, hideDisplayText: E = !1, sheetName: D, options: O = T ? ce : se, defaultOption: k = O?.[0], cancelOption: A = "Cancel", sx: le, ...ue } = a, j = i(), M = o(() => (y ?? h(b?.()?.getHyperlink()) ?? null) !== null, []), N = o(() => {
|
|
32
|
+
let e = null, t = null;
|
|
33
|
+
y && (typeof y == "string" ? t = y : e = y);
|
|
34
|
+
let n = e ? null : h(b?.()?.getHyperlink());
|
|
35
|
+
return {
|
|
36
|
+
address: t ?? e?.address ?? n?.getAddress() ?? "",
|
|
37
|
+
textToDisplay: e?.textToDisplay ?? n?.getTextToDisplay() ?? ""
|
|
38
|
+
};
|
|
39
|
+
}, [y, b]), P = N.address.startsWith("#"), F = o(() => v(N.address), [N.address]), [I, L] = c(P ? "document" : F ? "email" : "url"), [R, z] = c(P || F ? "" : N.address), [B, V] = c(F?.address ?? ""), [H, de] = c(F?.subject ?? ""), [U, fe] = c(() => P && N.address.substring(1) || null), [pe, me] = c(P ? N.address.substring(1) : ""), [W, he] = c(null), [G, ge] = c(() => {
|
|
40
|
+
let e = b?.().getText({ useFormattingCategory: !0 }) ?? N.textToDisplay;
|
|
41
|
+
return e === N.address || F && e === F.address ? "" : e;
|
|
42
|
+
}), [K, q] = c(!1), J = te(), Y = s(null), X = s(null), Z = r(() => {
|
|
43
|
+
Y.current?.querySelector("input.autoFocus")?.focus(), X.current?.engage();
|
|
44
|
+
}, []), Q = s(I);
|
|
45
|
+
ee(() => {
|
|
46
|
+
Q.current !== I && (Q.current = I, Z());
|
|
47
|
+
}, [I]);
|
|
48
|
+
let _e = o(() => {
|
|
49
|
+
let e = D ?? b?.()?.getWorksheet()?.getName();
|
|
50
|
+
return e ? { scope: e } : void 0;
|
|
51
|
+
}, [b, D]), ve = n().getMode()?.mode === "point", ye = r((e) => {
|
|
52
|
+
ge(e.target.value);
|
|
53
|
+
}, []), $ = r(() => {
|
|
54
|
+
if (I === "document") {
|
|
55
|
+
if (typeof U == "string") {
|
|
56
|
+
let e = U.trim();
|
|
57
|
+
return e ? `#${e}` : null;
|
|
58
|
+
}
|
|
59
|
+
let e = U?.getReferences()?.getAddress();
|
|
60
|
+
return e ? `#${e}` : null;
|
|
61
|
+
}
|
|
62
|
+
return I === "email" ? ((e, t) => {
|
|
63
|
+
let n = e.trim();
|
|
64
|
+
if (_(n) && (n = n.substring(7)), !n) return null;
|
|
65
|
+
let r = t.trim();
|
|
66
|
+
return `${g}${n}${r ? `?subject=${encodeURIComponent(r)}` : ""}`;
|
|
67
|
+
})(B, H) : R === "" ? null : R;
|
|
68
|
+
}, [
|
|
69
|
+
I,
|
|
70
|
+
U,
|
|
71
|
+
R,
|
|
72
|
+
B,
|
|
73
|
+
H
|
|
74
|
+
]), be = r(async (e) => {
|
|
75
|
+
let t = e === A;
|
|
76
|
+
if (!t) {
|
|
77
|
+
let e = $(), t = e;
|
|
78
|
+
e?.startsWith("#") ? t = e.substring(1) : I === "email" && e && (t = v(e)?.address ?? e), x?.({
|
|
79
|
+
address: e,
|
|
80
|
+
textToDisplay: (G === "" ? t : G) ?? null
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
S?.(e, t, e === k), w?.();
|
|
84
|
+
}, [
|
|
85
|
+
$,
|
|
86
|
+
I,
|
|
87
|
+
G,
|
|
88
|
+
x,
|
|
89
|
+
w,
|
|
90
|
+
S,
|
|
91
|
+
k,
|
|
92
|
+
A
|
|
93
|
+
]), xe = r(async (e) => !1 !== await Promise.resolve(C?.(e)) && (I !== "document" || !W), [
|
|
94
|
+
C,
|
|
95
|
+
I,
|
|
96
|
+
W
|
|
97
|
+
]), Se = I === "document" ? pe : I === "email" ? B : R;
|
|
98
|
+
return u(ne, {
|
|
99
|
+
title: j(M ? "hyperlink.titleEdit" : "hyperlink.titleInsert"),
|
|
100
|
+
options: O,
|
|
101
|
+
onDone: w,
|
|
102
|
+
onOption: (e) => be(e),
|
|
103
|
+
onValidateOption: xe,
|
|
104
|
+
defaultOption: k,
|
|
105
|
+
cancelOption: A,
|
|
106
|
+
autoFocusSel: T ? ".defaultOption" : ".autoFocus",
|
|
107
|
+
suspendModal: ve,
|
|
108
|
+
sx: {
|
|
109
|
+
width: "480px",
|
|
110
|
+
...le
|
|
111
|
+
},
|
|
112
|
+
...ue,
|
|
113
|
+
children: d(re, {
|
|
114
|
+
ref: Y,
|
|
115
|
+
sx: {
|
|
116
|
+
paddingTop: (e) => e.spacing(1),
|
|
117
|
+
paddingBottom: (e) => e.spacing(0),
|
|
118
|
+
rowGap: (e) => e.spacing(1),
|
|
119
|
+
display: "flex",
|
|
120
|
+
flexDirection: "column"
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
d(f, {
|
|
124
|
+
sx: {
|
|
125
|
+
minWidth: 135,
|
|
126
|
+
width: "100%"
|
|
127
|
+
},
|
|
128
|
+
size: "small",
|
|
129
|
+
children: [u(ie, {
|
|
130
|
+
id: J,
|
|
131
|
+
children: j("hyperlink.linkTo")
|
|
132
|
+
}), d(ae, {
|
|
133
|
+
labelId: J,
|
|
134
|
+
value: I,
|
|
135
|
+
disabled: T,
|
|
136
|
+
label: j("hyperlink.linkTo"),
|
|
137
|
+
MenuProps: {
|
|
138
|
+
disableRestoreFocus: !0,
|
|
139
|
+
slotProps: { transition: { onExited: Z } },
|
|
140
|
+
container: () => document.fullscreenElement
|
|
141
|
+
},
|
|
142
|
+
onChange: (e) => {
|
|
143
|
+
L(e.target.value);
|
|
144
|
+
},
|
|
145
|
+
children: [
|
|
146
|
+
u(p, {
|
|
147
|
+
value: "url",
|
|
148
|
+
children: j("hyperlink.typeWebPage")
|
|
149
|
+
}),
|
|
150
|
+
u(p, {
|
|
151
|
+
value: "document",
|
|
152
|
+
children: j("hyperlink.typeInDocument")
|
|
153
|
+
}),
|
|
154
|
+
u(p, {
|
|
155
|
+
value: "email",
|
|
156
|
+
children: j("hyperlink.typeEmail")
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
})]
|
|
160
|
+
}),
|
|
161
|
+
I === "email" ? d(l, { children: [u(t, {
|
|
162
|
+
sx: m,
|
|
163
|
+
label: j("hyperlink.emailAddress"),
|
|
164
|
+
defaultInput: j("hyperlink.emailPlaceholder"),
|
|
165
|
+
value: B,
|
|
166
|
+
disabled: T,
|
|
167
|
+
onChangeInput: (e) => V(e),
|
|
168
|
+
onFocus: (e) => {
|
|
169
|
+
K || e.target?.select?.(), q(!0);
|
|
170
|
+
}
|
|
171
|
+
}), u(t, {
|
|
172
|
+
label: j("hyperlink.subject"),
|
|
173
|
+
defaultInput: "",
|
|
174
|
+
value: H,
|
|
175
|
+
disabled: T,
|
|
176
|
+
onChangeInput: (e) => de(e),
|
|
177
|
+
onFocus: () => q(!0)
|
|
178
|
+
})] }) : I === "document" ? u(e, {
|
|
179
|
+
sx: m,
|
|
180
|
+
grammar: "reference",
|
|
181
|
+
apiRef: X,
|
|
182
|
+
classNameInput: "autoFocus",
|
|
183
|
+
label: j("hyperlink.reference"),
|
|
184
|
+
value: U,
|
|
185
|
+
disabled: T,
|
|
186
|
+
allowMulti: !1,
|
|
187
|
+
home: _e,
|
|
188
|
+
onChangeInput: (e) => fe(e),
|
|
189
|
+
onChangeText: (e) => me(e),
|
|
190
|
+
onChangeError: (e) => he(e),
|
|
191
|
+
onFocus: (e) => {
|
|
192
|
+
K || e.target?.select?.(), q(!0);
|
|
193
|
+
}
|
|
194
|
+
}) : u(t, {
|
|
195
|
+
sx: m,
|
|
196
|
+
label: j("hyperlink.address"),
|
|
197
|
+
defaultInput: j("hyperlink.addressPlaceholder"),
|
|
198
|
+
value: R,
|
|
199
|
+
disabled: T,
|
|
200
|
+
onChangeInput: (e) => z(e),
|
|
201
|
+
onFocus: (e) => {
|
|
202
|
+
K || e.target?.select?.(), q(!0);
|
|
203
|
+
}
|
|
204
|
+
}),
|
|
205
|
+
E ? null : u(f, {
|
|
206
|
+
sx: {
|
|
207
|
+
paddingTop: (e) => e.spacing(1.5),
|
|
208
|
+
minWidth: 135,
|
|
209
|
+
width: "100%"
|
|
210
|
+
},
|
|
211
|
+
size: "small",
|
|
212
|
+
children: u(oe, {
|
|
213
|
+
label: j("hyperlink.displayText"),
|
|
214
|
+
placeholder: Se,
|
|
215
|
+
onFocus: () => {
|
|
216
|
+
q(!0);
|
|
217
|
+
},
|
|
218
|
+
sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
|
|
219
|
+
slotProps: {
|
|
220
|
+
inputLabel: { shrink: !0 },
|
|
221
|
+
htmlInput: {
|
|
222
|
+
spellCheck: !1,
|
|
223
|
+
autoComplete: "off",
|
|
224
|
+
sx: {
|
|
225
|
+
paddingTop: (e) => e.spacing(1.25),
|
|
226
|
+
paddingBottom: (e) => e.spacing(.75)
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
value: G,
|
|
231
|
+
disabled: T,
|
|
232
|
+
onChange: ye,
|
|
233
|
+
onContextMenu: (e) => {
|
|
234
|
+
e.stopPropagation();
|
|
235
|
+
}
|
|
236
|
+
})
|
|
237
|
+
})
|
|
238
|
+
]
|
|
239
|
+
})
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
export { y as HyperlinkDialog, y as default };
|