@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.12
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/{ByeL_BZuJ2kl8gtf.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
- package/browser/esm/2nRxqrNYbmEn8fS8.mjs +386 -0
- package/browser/esm/{fb126BNj3F8URR19.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
- package/browser/esm/BAzhmMX4Fk_qnUTp.mjs +414 -0
- package/browser/esm/BGL3x0W74D7qZXlf.mjs +318 -0
- package/browser/esm/BHGr2gsFofTdAFxq.mjs +515 -0
- package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BKhcJI-G15D3kGap.mjs} +4 -4
- package/browser/esm/BNbub9weuqm3mcoF.mjs +335 -0
- package/browser/esm/BSv9MVJaz1DVEffm.mjs +975 -0
- package/browser/esm/BWfLpYmd3cSgJ0C6.mjs +141 -0
- package/browser/esm/BZqwbIE8qzjSOYcJ.mjs +582 -0
- package/browser/esm/BZy9xUrYpAtnKeji.mjs +1288 -0
- package/browser/esm/{CIu1bjPJe_x31Oww.mjs → BnkwC5rsg9LZyhoP.mjs} +3 -3
- package/browser/esm/BpJsBv413cNQpyg0.mjs +319 -0
- package/browser/esm/BpVrgbVISiTDyFR3.mjs +197 -0
- package/browser/esm/BsngRDhvVYGVBJeK.mjs +1546 -0
- package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → C29TKq47CbXs652l.mjs} +2 -2
- package/browser/esm/{CEvZe2cZK-voZTif.mjs → C8p2iMad_NNCwGI_.mjs} +5 -5
- package/browser/esm/CBzXksWnb-1gGEWZ.mjs +212 -0
- package/browser/esm/{IQLeaAbtGTipUsOD.mjs → CFIAWgpU3UyepLBn.mjs} +25 -24
- package/browser/esm/CJD4jF4m9cBGHzr_.mjs +31 -0
- package/browser/esm/{CjznclrKqJRi7u9O.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
- package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
- package/browser/esm/CeF35ZeFP28Do5Zx.mjs +1379 -0
- package/browser/esm/{xKiLJKiLxto8SayF.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
- package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → Cq82lvdjyBvlJ8xJ.mjs} +19 -17
- package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
- package/browser/esm/Cvk2yY90hpgXWMAt.mjs +103 -0
- package/browser/esm/D0slJycx3nq53qmf.mjs +14 -0
- package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
- package/browser/esm/D5Fn0Hqllwv5HY6i.mjs +7581 -0
- package/browser/esm/D5N4nGaZsXtrHAOh.mjs +831 -0
- package/browser/esm/D7AqPfyhMiuda5l5.mjs +412 -0
- package/browser/esm/DHZA48ZMCETvHmeP.mjs +161 -0
- package/browser/esm/DX2_vf7WX6uRLaOZ.mjs +94 -0
- package/browser/esm/DaxpbAF1ShkT7hNU.mjs +490 -0
- package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → Db3oHfXiRtcH015t.mjs} +162 -156
- package/browser/esm/Dt47Huh1l3C4_5_w.mjs +87 -0
- package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
- package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
- package/browser/esm/{DHY19rkSiiRZxShC.mjs → DuuyN4-7K6_io2Py.mjs} +3 -3
- package/browser/esm/{yZxC4qUENOlMhVUH.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
- package/browser/esm/PY3Br5Bo_TxcCnCU.mjs +252 -0
- package/browser/esm/WIhvQtBkGiw-oFUs.mjs +2566 -0
- package/browser/esm/WgIvwAENeO8LANax.mjs +437 -0
- package/browser/esm/{DBtc4lku0uHVcqWn.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
- package/browser/esm/index.mjs +1053 -192
- package/browser/esm/jFRFCWlkD7Dsrhkh.mjs +236 -0
- package/browser/esm/lKXEDVt2ow1NlWJj.mjs +392 -0
- package/browser/esm/{Blaj2R5hYxtLAW__.mjs → oC0OwOddhOD0OoCJ.mjs} +6 -6
- package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
- package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → u84rSnESjxqB6gay.mjs} +1 -1
- package/licenses/dependencies.txt +94 -94
- package/node/esm/{BcwMb6CyVfvEwbHn.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
- package/node/esm/{CKu1AtRgyltyEdEN.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
- package/node/esm/{ETK6T6G0SIcFXDe5.mjs → BBGoyqs2L_ccSH1e.mjs} +40 -40
- package/node/esm/BLv99aovW4R3C5PE.mjs +515 -0
- package/node/esm/BUGU_5lUtnCRlp3n.mjs +519 -0
- package/node/esm/BalROFG_oa9PFs9Q.mjs +141 -0
- package/node/esm/{ah3CUg4-VmNstGk_.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
- package/node/esm/C3FCh9xju2SccUIE.mjs +1283 -0
- package/node/esm/{Bb1sLMqXWKjdve23.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
- package/node/esm/CKWeipCqqpLnLE5e.mjs +391 -0
- package/node/esm/CTnVNfz4eqFnM92M.mjs +212 -0
- package/node/esm/Cfi_ly8fBDZZdiZT.mjs +72 -0
- package/node/esm/CgKa6JuyJ1tTodev.mjs +1703 -0
- package/node/esm/{cqzp431iNSLWictb.mjs → Cq53M7bAUSXMNq1f.mjs} +22 -22
- package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
- package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
- package/node/esm/D72CupF9mfy2D1Xa.mjs +94 -0
- package/node/esm/{DNSjK5DAH3M14Qbc.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
- package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DJFkALt4XrwkMbnU.mjs} +163 -157
- package/node/esm/DJpwI8PlKBI2rk0r.mjs +319 -0
- package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DQaGPUYbgL4Y5YZW.mjs} +32 -30
- package/node/esm/{D9rzScOA9pEYFrtz.mjs → DsNYnq4NtYBxPmeA.mjs} +20 -20
- package/node/esm/DygDgOpa9sJ6YFVS.mjs +385 -0
- package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
- package/node/esm/M7YxvRPGCuxuk9aK.mjs +142 -0
- package/node/esm/QNjtpX8rIpqGGLEJ.mjs +1379 -0
- package/node/esm/{B_jRGdwGFkudwmL-.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
- package/node/esm/{ci8d-mF1H9wnYzix.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
- package/node/esm/dm8dmEaTIqfmgyeL.mjs +412 -0
- package/node/esm/{D6oQL8knsPpgdXuk.mjs → fmya3XQnTGyQisvT.mjs} +2 -2
- package/node/esm/gPYAb_A0T5ZwcQ1E.mjs +318 -0
- package/node/esm/index.mjs +8915 -13417
- package/node/esm/wB8xMpyJ_NvE16yG.mjs +975 -0
- package/node/esm/zGAcd4Jr7wkvXDBS.mjs +197 -0
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +4 -0
- package/resources/locales/de/ui.msg.json +100 -1
- package/resources/locales/en/groups.cmd.json +4 -0
- package/resources/locales/en/ui.msg.json +100 -1
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
- package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/border/BorderTemplateIcon.d.ts +6 -1
- package/types/src/chart/ChartFormatPanel.d.ts +20 -0
- package/types/src/chart/ChartPlugin.d.ts +6 -0
- package/types/src/chart/index.d.ts +3 -0
- 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/comments/CommentCard.d.ts +2 -2
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
- package/types/src/conditions/ConditionEditor.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/useFormulaOption.d.ts +2 -2
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/format/BorderPreview.d.ts +11 -4
- package/types/src/format/useFormatSelection.d.ts +4 -4
- package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
- package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
- package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
- package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
- package/types/src/index.d.ts +15 -6
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
- package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
- package/types/src/protection/index.d.ts +1 -1
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
- 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 +31 -19
- package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
- 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/Biy7bhzzzPb5sfRN.mjs +0 -152
- package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
- package/browser/esm/CtEFHbzYNvYjDYvi.mjs +0 -236
- package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
- package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
- package/node/esm/BYVLi0md4AYuDsB_.mjs +0 -236
- package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
- package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
|
|
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 { t as e } from "./DHZA48ZMCETvHmeP.mjs";
|
|
8
|
+
import { t } from "./lKXEDVt2ow1NlWJj.mjs";
|
|
9
|
+
import { externalBookFileName as n, externalBookLocation as r } from "@sheetxl/sdk";
|
|
10
|
+
import { DynamicIcon as i, NotifierType as a, useNotifier as o, useTranslator as s } from "@sheetxl/utils-react";
|
|
11
|
+
import { forwardRef as c, memo as l, useMemo as u, useReducer as d, useState as f } from "react";
|
|
12
|
+
import { SimpleTooltip as p } from "@sheetxl/utils-mui";
|
|
13
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
14
|
+
import { Box as g, Button as _, FormControl as v, FormControlLabel as y, FormLabel as b, Radio as x, RadioGroup as S, Tab as C, Tabs as w, Typography as T } from "@mui/material";
|
|
15
|
+
import { messageKey as E } from "@sheetxl/utils";
|
|
16
|
+
var D = ({ item: e }) => {
|
|
17
|
+
let t = s(), n = e.getSheetNames(), r = [], i = !1;
|
|
18
|
+
for (let t = 0; t < n.length; t++) {
|
|
19
|
+
let a = e.getSheetData(t);
|
|
20
|
+
a && (r.push(n[t]), a.refreshError && (i = !0));
|
|
21
|
+
}
|
|
22
|
+
return h(g, {
|
|
23
|
+
sx: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
gap: (e) => e.spacing(.5)
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
m(T, {
|
|
30
|
+
variant: "caption",
|
|
31
|
+
sx: { color: "text.secondary" },
|
|
32
|
+
children: r.length > 0 ? t("externalLink.cached", { sheets: r.join(", ") }) : t("externalLink.cachedNone")
|
|
33
|
+
}),
|
|
34
|
+
i ? m(T, {
|
|
35
|
+
variant: "caption",
|
|
36
|
+
sx: { color: "error.main" },
|
|
37
|
+
children: t("externalLink.refreshError")
|
|
38
|
+
}) : null,
|
|
39
|
+
m(T, {
|
|
40
|
+
variant: "caption",
|
|
41
|
+
sx: { color: "text.secondary" },
|
|
42
|
+
children: t("externalLink.dependents", { count: e.getDependents().length })
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}, O = l((t) => {
|
|
47
|
+
let { size: n = 28, ...r } = t, a = s();
|
|
48
|
+
return m(e, {
|
|
49
|
+
className: "sxl-external-link-chip",
|
|
50
|
+
title: a("externalLink.linkedWorkbook"),
|
|
51
|
+
sx: {
|
|
52
|
+
width: "auto",
|
|
53
|
+
minWidth: 1.7 * n + "px",
|
|
54
|
+
height: `${n}px`,
|
|
55
|
+
color: "text.secondary"
|
|
56
|
+
},
|
|
57
|
+
...r,
|
|
58
|
+
children: m(i, {
|
|
59
|
+
iconKey: "ExternalLinked",
|
|
60
|
+
size: Math.round(.7 * n)
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
O.displayName = "ExternalLinkChip";
|
|
65
|
+
var k = ({ item: e }) => {
|
|
66
|
+
let t = r(e);
|
|
67
|
+
if (!t) return null;
|
|
68
|
+
let n = Math.max(t.lastIndexOf("/"), t.lastIndexOf("\\")), i = n === -1 ? "" : t.substring(0, n + 1), a = n === -1 ? t : t.substring(n + 1);
|
|
69
|
+
return m(p, {
|
|
70
|
+
title: t,
|
|
71
|
+
children: h(g, {
|
|
72
|
+
className: "sxl-external-link-location",
|
|
73
|
+
sx: {
|
|
74
|
+
display: "flex",
|
|
75
|
+
alignItems: "baseline",
|
|
76
|
+
minWidth: 0,
|
|
77
|
+
typography: "subtitle2",
|
|
78
|
+
fontWeight: 600
|
|
79
|
+
},
|
|
80
|
+
children: [i ? m(T, {
|
|
81
|
+
variant: "subtitle2",
|
|
82
|
+
sx: {
|
|
83
|
+
fontWeight: 600,
|
|
84
|
+
minWidth: 0,
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
textOverflow: "ellipsis",
|
|
87
|
+
whiteSpace: "nowrap"
|
|
88
|
+
},
|
|
89
|
+
children: i
|
|
90
|
+
}) : null, m(T, {
|
|
91
|
+
variant: "subtitle2",
|
|
92
|
+
sx: {
|
|
93
|
+
fontWeight: 600,
|
|
94
|
+
flex: "0 0 auto",
|
|
95
|
+
whiteSpace: "nowrap"
|
|
96
|
+
},
|
|
97
|
+
children: a
|
|
98
|
+
})]
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}, A = l(c((e, r) => {
|
|
102
|
+
let { workbook: i, ...c } = e, l = s(), d = o(), f = u(() => ({
|
|
103
|
+
key: "external-link",
|
|
104
|
+
messageKeys: {
|
|
105
|
+
none: E("externalLink.none"),
|
|
106
|
+
delete: E("externalLink.breakLink"),
|
|
107
|
+
search: E("externalLink.search"),
|
|
108
|
+
clearSearch: E("externalLink.clearSearch"),
|
|
109
|
+
noMatches: E("externalLink.noMatches")
|
|
110
|
+
},
|
|
111
|
+
getItems: (e) => e.getExternalBooks().getItems(),
|
|
112
|
+
subscribe: (e, t) => {
|
|
113
|
+
let n = e.getExternalBooks().addListeners({ onCollectionChange: () => t.onChange() }, { transactional: !1 }), r = e.getCalculation().addListeners({ onComplete: () => t.onChange() }, { transactional: !1 }), i = e.addListeners({ onProtectionChange: () => t.onChange() }, { transactional: !1 });
|
|
114
|
+
return () => {
|
|
115
|
+
n?.(), r?.(), i?.();
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
isReadOnly: (e) => !e.getProtection().isStructureAllowed(),
|
|
119
|
+
getItemKey: (e) => e.getId(),
|
|
120
|
+
delete: (e, t) => {
|
|
121
|
+
e.breakLink();
|
|
122
|
+
},
|
|
123
|
+
getSearchText: (e) => [
|
|
124
|
+
n(e),
|
|
125
|
+
e.getDisplayName(),
|
|
126
|
+
...e.getSheetNames(),
|
|
127
|
+
...e.getSources().map((e) => e.target)
|
|
128
|
+
].join("\n"),
|
|
129
|
+
CardMedia: () => m(O, { size: 32 }),
|
|
130
|
+
getCardTitle: (e) => n(e),
|
|
131
|
+
CardSubtitle: k,
|
|
132
|
+
CardBody: (e) => m(D, { ...e })
|
|
133
|
+
}), []), p = !i.getProtection().isStructureAllowed(), v = i.getExternalBooks().getCount() > 0, y = u(() => {
|
|
134
|
+
let e = {
|
|
135
|
+
flex: "0 0 auto",
|
|
136
|
+
textTransform: "none",
|
|
137
|
+
whiteSpace: "nowrap"
|
|
138
|
+
};
|
|
139
|
+
return h(g, {
|
|
140
|
+
sx: {
|
|
141
|
+
display: "flex",
|
|
142
|
+
gap: .5,
|
|
143
|
+
flex: "0 0 auto"
|
|
144
|
+
},
|
|
145
|
+
children: [m(_, {
|
|
146
|
+
size: "small",
|
|
147
|
+
disabled: p || !v,
|
|
148
|
+
sx: e,
|
|
149
|
+
onClick: () => {
|
|
150
|
+
i.getExternalBooks().refreshAll().then((e) => {
|
|
151
|
+
let t = {
|
|
152
|
+
refreshed: 0,
|
|
153
|
+
failed: 0,
|
|
154
|
+
unavailable: 0
|
|
155
|
+
};
|
|
156
|
+
for (let n of e) t[n.status]++;
|
|
157
|
+
t.refreshed === 0 && t.failed === 0 ? d.showMessage?.(l("externalLink.refreshUnavailable"), { type: a.Warning }) : d.showMessage?.(l("externalLink.refreshSummary", t), { type: t.failed ? a.Warning : a.Info });
|
|
158
|
+
}, (e) => {
|
|
159
|
+
d.showMessage?.(e.message, { type: a.Error });
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
children: l("externalLink.refreshAll")
|
|
163
|
+
}), m(_, {
|
|
164
|
+
size: "small",
|
|
165
|
+
disabled: p || !v,
|
|
166
|
+
sx: e,
|
|
167
|
+
onClick: () => {
|
|
168
|
+
try {
|
|
169
|
+
i.getExternalBooks().breakAll();
|
|
170
|
+
} catch (e) {
|
|
171
|
+
d.showMessage?.(e.message, { type: a.Error });
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
children: l("externalLink.breakAll")
|
|
175
|
+
})]
|
|
176
|
+
});
|
|
177
|
+
}, [
|
|
178
|
+
i,
|
|
179
|
+
p,
|
|
180
|
+
v,
|
|
181
|
+
d,
|
|
182
|
+
l
|
|
183
|
+
]);
|
|
184
|
+
return m(t, {
|
|
185
|
+
ref: r,
|
|
186
|
+
workbook: i,
|
|
187
|
+
descriptor: f,
|
|
188
|
+
headerActions: y,
|
|
189
|
+
...c
|
|
190
|
+
});
|
|
191
|
+
}));
|
|
192
|
+
A.displayName = "ExternalLinksPanel";
|
|
193
|
+
var j = [
|
|
194
|
+
"userSet",
|
|
195
|
+
"always",
|
|
196
|
+
"never"
|
|
197
|
+
], M = {
|
|
198
|
+
userSet: E("externalLink.updateLinks.userSet"),
|
|
199
|
+
always: E("externalLink.updateLinks.always"),
|
|
200
|
+
never: E("externalLink.updateLinks.never")
|
|
201
|
+
}, N = l(c((e, t) => {
|
|
202
|
+
let { workbook: n, ...r } = e, i = s(), [a, o] = d((e) => e + 1, 0), c = n.getUpdateLinks() ?? "userSet", l = !n.getProtection().isStructureAllowed();
|
|
203
|
+
return h(g, {
|
|
204
|
+
ref: t,
|
|
205
|
+
...r,
|
|
206
|
+
sx: {
|
|
207
|
+
display: "flex",
|
|
208
|
+
flexDirection: "column",
|
|
209
|
+
boxSizing: "border-box",
|
|
210
|
+
gap: (e) => e.spacing(1.5),
|
|
211
|
+
padding: (e) => e.spacing(1.5),
|
|
212
|
+
overflowX: "hidden",
|
|
213
|
+
overflowY: "auto"
|
|
214
|
+
},
|
|
215
|
+
children: [h(v, {
|
|
216
|
+
disabled: l,
|
|
217
|
+
children: [m(b, {
|
|
218
|
+
sx: { typography: "body2" },
|
|
219
|
+
children: i("externalLink.updateLinks.label")
|
|
220
|
+
}), m(S, {
|
|
221
|
+
value: c,
|
|
222
|
+
onChange: (e, t) => {
|
|
223
|
+
n.setUpdateLinks(t), o();
|
|
224
|
+
},
|
|
225
|
+
children: j.map((e) => m(y, {
|
|
226
|
+
value: e,
|
|
227
|
+
control: m(x, { size: "small" }),
|
|
228
|
+
label: m(T, {
|
|
229
|
+
variant: "body2",
|
|
230
|
+
children: i(M[e])
|
|
231
|
+
})
|
|
232
|
+
}, e))
|
|
233
|
+
})]
|
|
234
|
+
}), m(T, {
|
|
235
|
+
variant: "caption",
|
|
236
|
+
sx: { color: "text.secondary" },
|
|
237
|
+
children: i("externalLink.updateLinks.note")
|
|
238
|
+
})]
|
|
239
|
+
});
|
|
240
|
+
}));
|
|
241
|
+
N.displayName = "ExternalLinkSettingsTab";
|
|
242
|
+
var P = {
|
|
243
|
+
links: E("externalLink.tab.links"),
|
|
244
|
+
settings: E("externalLink.tab.settings")
|
|
245
|
+
}, F = Object.keys(P), I = (e) => F.includes(e) ? e : null, L = l((e) => {
|
|
246
|
+
let { model: t, args: n, defaultTab: r = "links", entryKey: i, frame: a, ref: o, ...c } = e, l = s(), [u, d] = f(() => I(n?.tab) ?? r), [p, _] = f(n);
|
|
247
|
+
if (n !== p) {
|
|
248
|
+
_(n);
|
|
249
|
+
let e = I(n?.tab);
|
|
250
|
+
e && d(e);
|
|
251
|
+
}
|
|
252
|
+
return t ? h(g, {
|
|
253
|
+
ref: o,
|
|
254
|
+
...c,
|
|
255
|
+
sx: {
|
|
256
|
+
display: "flex",
|
|
257
|
+
flexDirection: "column",
|
|
258
|
+
width: "100%",
|
|
259
|
+
minWidth: 0,
|
|
260
|
+
flex: "1 1 auto",
|
|
261
|
+
height: "100%",
|
|
262
|
+
minHeight: 0,
|
|
263
|
+
overflowX: "hidden"
|
|
264
|
+
},
|
|
265
|
+
children: [m(w, {
|
|
266
|
+
value: u,
|
|
267
|
+
onChange: (e, t) => d(t),
|
|
268
|
+
variant: "fullWidth",
|
|
269
|
+
sx: {
|
|
270
|
+
width: "100%",
|
|
271
|
+
flex: "0 0 auto",
|
|
272
|
+
minHeight: "36px",
|
|
273
|
+
borderBottom: 1,
|
|
274
|
+
borderColor: "divider",
|
|
275
|
+
"& .MuiTab-root": {
|
|
276
|
+
minHeight: "36px",
|
|
277
|
+
textTransform: "none",
|
|
278
|
+
pt: .5,
|
|
279
|
+
pb: .5,
|
|
280
|
+
px: .5,
|
|
281
|
+
minWidth: 0
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
children: F.map((e) => m(C, {
|
|
285
|
+
value: e,
|
|
286
|
+
label: l(P[e])
|
|
287
|
+
}, e))
|
|
288
|
+
}), h(g, {
|
|
289
|
+
sx: {
|
|
290
|
+
flex: "1 1 auto",
|
|
291
|
+
minHeight: 0,
|
|
292
|
+
minWidth: 0,
|
|
293
|
+
width: "100%",
|
|
294
|
+
display: "flex",
|
|
295
|
+
flexDirection: "column"
|
|
296
|
+
},
|
|
297
|
+
children: [u === "links" ? m(A, {
|
|
298
|
+
workbook: t,
|
|
299
|
+
style: {
|
|
300
|
+
flex: "1 1 auto",
|
|
301
|
+
minHeight: 0,
|
|
302
|
+
minWidth: 0,
|
|
303
|
+
width: "100%"
|
|
304
|
+
}
|
|
305
|
+
}) : null, u === "settings" ? m(N, {
|
|
306
|
+
workbook: t,
|
|
307
|
+
style: {
|
|
308
|
+
flex: "1 1 auto",
|
|
309
|
+
minHeight: 0,
|
|
310
|
+
minWidth: 0,
|
|
311
|
+
width: "100%"
|
|
312
|
+
}
|
|
313
|
+
}) : null]
|
|
314
|
+
})]
|
|
315
|
+
}) : null;
|
|
316
|
+
});
|
|
317
|
+
L.displayName = "ExternalLinksTaskPane";
|
|
318
|
+
export { L as ExternalLinksTaskPane, L as default };
|