@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,141 @@
|
|
|
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 { n as e } from "./7fVZXXuonYb6Z7FU.mjs";
|
|
8
|
+
import { n as t } from "./D0slJycx3nq53qmf.mjs";
|
|
9
|
+
import { t as n } from "./lKXEDVt2ow1NlWJj.mjs";
|
|
10
|
+
import { useModelSync as r } from "@sheetxl/react";
|
|
11
|
+
import { NotifierType as i, useNotifier as a } from "@sheetxl/utils-react";
|
|
12
|
+
import { forwardRef as o, memo as s, useCallback as c, useMemo as l, useRef as u } from "react";
|
|
13
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
14
|
+
var f = (e) => {
|
|
15
|
+
let t = (t) => e.getCollection(t.getWorksheet());
|
|
16
|
+
return {
|
|
17
|
+
key: e.key,
|
|
18
|
+
messageKeys: e.messageKeys,
|
|
19
|
+
getItems: (t) => ((t) => {
|
|
20
|
+
let n = t.getSelectedWorksheet();
|
|
21
|
+
return n ? e.getCollection(n) : null;
|
|
22
|
+
})(t)?.getItems() ?? [],
|
|
23
|
+
subscribe: (t, n) => {
|
|
24
|
+
let r = null, i = () => {
|
|
25
|
+
r?.();
|
|
26
|
+
let i = {
|
|
27
|
+
onProtectionChange: () => n.onChange(),
|
|
28
|
+
onInvalidated: () => n.onInvalidated()
|
|
29
|
+
};
|
|
30
|
+
for (let t of e.changeEvents) i[t] = () => n.onChange();
|
|
31
|
+
r = t.getSelectedWorksheet()?.addListeners(i, { transactional: !1 }) ?? null;
|
|
32
|
+
};
|
|
33
|
+
i();
|
|
34
|
+
let a = t.addListeners({ onSelectedSheetChange: () => {
|
|
35
|
+
i(), n.onChange();
|
|
36
|
+
} }, { transactional: !1 });
|
|
37
|
+
return () => {
|
|
38
|
+
r?.(), a?.();
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
isReadOnly: (t) => {
|
|
42
|
+
let n = t.getSelectedWorksheet();
|
|
43
|
+
return !n || (e.isReadOnly?.(n) ?? !n.getProtection().isObjectsAllowed());
|
|
44
|
+
},
|
|
45
|
+
isItemReadOnly: (t, n) => {
|
|
46
|
+
let r = n.getSelectedWorksheet();
|
|
47
|
+
return !r || (e.isReadOnly?.(r) ?? !r.getProtection().isObjectsAllowed()) || t.isProtected();
|
|
48
|
+
},
|
|
49
|
+
subscribeItem: (e, t) => e.addListeners({
|
|
50
|
+
onInvalidated: () => t(),
|
|
51
|
+
onProtectedChange: () => t()
|
|
52
|
+
}, { transactional: !1 }),
|
|
53
|
+
createDraft: (n, r) => {
|
|
54
|
+
let i = t(n).createItem(r);
|
|
55
|
+
return r || e.applyNewDefaults?.(i), i;
|
|
56
|
+
},
|
|
57
|
+
createSeededDraft: e.applySeed ? (n, r) => {
|
|
58
|
+
let i = t(n).createItem();
|
|
59
|
+
return e.applyNewDefaults?.(i), e.applySeed(i, r), i;
|
|
60
|
+
} : void 0,
|
|
61
|
+
beforeSave: e.beforeSave,
|
|
62
|
+
validate: e.validate,
|
|
63
|
+
save: (n, r, i) => {
|
|
64
|
+
if (i === null) t(n).add(r, { replaceExisting: !0 });
|
|
65
|
+
else {
|
|
66
|
+
e.applyUpdate(i, r);
|
|
67
|
+
let t = r.getRanges();
|
|
68
|
+
t.isInvalid() || t.toString() === i.getRanges().toString() || i.setRanges(t);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
delete: (e) => e.delete(),
|
|
72
|
+
duplicate: (e, n) => {
|
|
73
|
+
let r = t(n);
|
|
74
|
+
r.add(r.createItem(e), { index: e.getIndex() });
|
|
75
|
+
},
|
|
76
|
+
moveBy: e.reorderable ?? 1 ? (e, t) => {
|
|
77
|
+
e.setIndex(e.getIndex() + t);
|
|
78
|
+
} : void 0,
|
|
79
|
+
getCardTitle: e.getCardTitle,
|
|
80
|
+
getCardSubtitle: (e) => e.getRanges().toString(),
|
|
81
|
+
CardSubtitle: e.CardSubtitle,
|
|
82
|
+
CardMedia: e.CardMedia,
|
|
83
|
+
CardBody: e.CardBody,
|
|
84
|
+
EditorBody: ({ draft: t }) => {
|
|
85
|
+
let n = e.EditorBody;
|
|
86
|
+
return d(n, { item: t });
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}, p = s(o((e, t) => {
|
|
90
|
+
let { workbook: r, descriptor: i, args: a, dragReorder: o, ...s } = e, c = l(() => f(i), [i]);
|
|
91
|
+
return d(n, {
|
|
92
|
+
ref: t,
|
|
93
|
+
workbook: r,
|
|
94
|
+
descriptor: c,
|
|
95
|
+
args: a,
|
|
96
|
+
dragReorder: o,
|
|
97
|
+
...s
|
|
98
|
+
});
|
|
99
|
+
}));
|
|
100
|
+
p.displayName = "AnchorItemsPanel";
|
|
101
|
+
var m = s((n) => {
|
|
102
|
+
let { item: o, label: s, helperText: f } = n, p = a();
|
|
103
|
+
r(o, ["onAnchorCoordsChange", "onAnyChange"]);
|
|
104
|
+
let m = o.getRanges(), h = l(() => {
|
|
105
|
+
if (m.isInvalid()) return;
|
|
106
|
+
let e = m.at(0).getCoords();
|
|
107
|
+
return {
|
|
108
|
+
rowIndex: e.rowStart,
|
|
109
|
+
colIndex: e.colStart,
|
|
110
|
+
scope: m.at(0).getWorksheet().getName()
|
|
111
|
+
};
|
|
112
|
+
}, [m]), g = u(!1), _ = c((e) => {
|
|
113
|
+
g.current = !1;
|
|
114
|
+
let t = e?.getReferences();
|
|
115
|
+
if (t && !t.isInvalid()) try {
|
|
116
|
+
o.setRanges(t);
|
|
117
|
+
} catch (e) {
|
|
118
|
+
g.current = !0, p.showMessage?.(e.message, { type: i.Error });
|
|
119
|
+
}
|
|
120
|
+
}, [o, p]), v = u(null);
|
|
121
|
+
return t(() => {
|
|
122
|
+
let e = v.current;
|
|
123
|
+
return !e || !e.dirty || !e.error && (e.commit(), !g.current);
|
|
124
|
+
}), d(e, {
|
|
125
|
+
grammar: "reference",
|
|
126
|
+
value: m,
|
|
127
|
+
allowMulti: !0,
|
|
128
|
+
allowCrossSheet: !1,
|
|
129
|
+
required: !0,
|
|
130
|
+
home: h,
|
|
131
|
+
pickAs: "absolute",
|
|
132
|
+
changeOn: "done",
|
|
133
|
+
onDone: _,
|
|
134
|
+
apiRef: v,
|
|
135
|
+
label: s,
|
|
136
|
+
helperText: f,
|
|
137
|
+
disabled: o.isProtected()
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
m.displayName = "AnchoredRangeField";
|
|
141
|
+
export { p as n, m as t };
|
|
@@ -0,0 +1,582 @@
|
|
|
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 { r as e } from "./D5N4nGaZsXtrHAOh.mjs";
|
|
8
|
+
import { t } from "./u84rSnESjxqB6gay.mjs";
|
|
9
|
+
import { Color as n, FontUtils as r, IFontCollection as i, NumberFormat as a } from "@sheetxl/sdk";
|
|
10
|
+
import { useGridColorScheme as o } from "@sheetxl/react";
|
|
11
|
+
import { CommandButtonType as s, DynamicIcon as c, KeyCodes as l, measureUIText as u, themeSurfaceProps as d, useCallbackRef as f, useCommands as p, useLanguage as m, useTextSelectionDrag as h, useTranslator as g } from "@sheetxl/utils-react";
|
|
12
|
+
import { forwardRef as _, memo as v, useCallback as y, useEffect as b, useMemo as x, useState as S } from "react";
|
|
13
|
+
import { CommandButton as C, CommandPopupButton as w, CommandTooltip as T, ExhibitDivider as E, ExhibitMenuItem as D, ExhibitPopupIconButton as O, ExhibitTooltip as k, PopupButtonType as A, SelectedIcon as j, defaultRenderPopupPanel as M } from "@sheetxl/utils-mui";
|
|
14
|
+
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
15
|
+
import { Box as F, IconButton as I, Input as L, Typography as R, useTheme as z } from "@mui/material";
|
|
16
|
+
import { alpha as B } from "@mui/system";
|
|
17
|
+
var V = v(_((e, n) => {
|
|
18
|
+
let { commandKey: i, showQuickButtons: a, fontSizes: o = r.DefaultFontSizes, disabled: s, icon: c, label: d, sx: m, ...g } = e, [_] = p([i ?? ""]), v = () => _?.getState()?.toString() || "11", [w, T] = S(v), A = f(() => {
|
|
19
|
+
let e = parseFloat(w);
|
|
20
|
+
isNaN(e) ? T(v()) : parseFloat(v()) !== e && _?.execute(e);
|
|
21
|
+
}, [
|
|
22
|
+
v,
|
|
23
|
+
_,
|
|
24
|
+
w
|
|
25
|
+
]);
|
|
26
|
+
b(() => {
|
|
27
|
+
T(v());
|
|
28
|
+
}, [_?.getState()]);
|
|
29
|
+
let R = ["formatFontSizeIncrease", "formatFontSizeDecrease"], B = x(() => R ? P(F, {
|
|
30
|
+
className: t("quick-buttons", {}),
|
|
31
|
+
sx: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center"
|
|
35
|
+
},
|
|
36
|
+
children: [N(C, { commandKey: R[0] }), N(C, { commandKey: R[1] })]
|
|
37
|
+
}) : null, [R]), V = z(), H = x(() => `${u("12.3", {
|
|
38
|
+
size: Math.round(V.typography.fontSize),
|
|
39
|
+
family: V.typography.fontFamily ?? ""
|
|
40
|
+
})}px`, [V]), U = s ?? (!_ || _.disabled()), W = h(), G = y((e) => {
|
|
41
|
+
let { onMouseDown: t, onMouseUp: n, ...r } = e;
|
|
42
|
+
return N(I, {
|
|
43
|
+
component: "div",
|
|
44
|
+
...r,
|
|
45
|
+
disableRipple: !0,
|
|
46
|
+
children: N(L, {
|
|
47
|
+
inputMode: "numeric",
|
|
48
|
+
disabled: s || !_ || _.disabled(),
|
|
49
|
+
inputProps: {
|
|
50
|
+
name: "font-input",
|
|
51
|
+
autoComplete: "off",
|
|
52
|
+
onPointerDown: W.onPointerDown,
|
|
53
|
+
onDragStart: W.onDragStart,
|
|
54
|
+
tabIndex: 0,
|
|
55
|
+
type: "number",
|
|
56
|
+
maxLength: 4,
|
|
57
|
+
max: 409,
|
|
58
|
+
min: 2
|
|
59
|
+
},
|
|
60
|
+
sx: {
|
|
61
|
+
"&::before": { borderBottom: "1px solid transparent" },
|
|
62
|
+
"&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e) => `1px solid ${e.palette.text.icon ?? e.palette.action.active}` },
|
|
63
|
+
"&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e) => `1px solid ${e.palette.error.main}` },
|
|
64
|
+
"::after": { borderBottom: (e) => `1px solid ${e.palette.primary.main}` },
|
|
65
|
+
paddingTop: "0px",
|
|
66
|
+
paddingBottom: "0px",
|
|
67
|
+
paddingLeft: "0px",
|
|
68
|
+
paddingRight: "0px",
|
|
69
|
+
fontSize: (e) => `${Math.round(e.typography.fontSize)}px`,
|
|
70
|
+
width: H,
|
|
71
|
+
color: (e) => e.palette.text.secondary,
|
|
72
|
+
input: {
|
|
73
|
+
padding: "0 0",
|
|
74
|
+
textAlign: "center",
|
|
75
|
+
height: "1rem",
|
|
76
|
+
MozAppearance: "textfield",
|
|
77
|
+
"&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e) => e.palette.text.primary },
|
|
78
|
+
"&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e) => e.palette.text.primary }
|
|
79
|
+
},
|
|
80
|
+
"input::-webkit-inner-spin-button": {
|
|
81
|
+
WebkitAppearance: "none",
|
|
82
|
+
margin: "0"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
value: w,
|
|
86
|
+
onFocus: (e) => {
|
|
87
|
+
e.target?.select();
|
|
88
|
+
},
|
|
89
|
+
onKeyDown: (e) => {
|
|
90
|
+
if (e.which === l.Enter) v() !== w && (e.stopPropagation(), e.preventDefault(), A());
|
|
91
|
+
else if (e.which === l.Escape) v() !== w && (T(v()), setTimeout(() => {
|
|
92
|
+
e.target?.select();
|
|
93
|
+
}, 0), e.stopPropagation(), e.preventDefault());
|
|
94
|
+
else {
|
|
95
|
+
if (e.key.match("[-]") || e.key.match("[0-9.]") && (w + e.key).length > 4) return e.stopPropagation(), void e.preventDefault();
|
|
96
|
+
if (e.which === l.Space) return void e.preventDefault();
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
onBlur: () => {
|
|
100
|
+
A();
|
|
101
|
+
},
|
|
102
|
+
onChange: (e) => {
|
|
103
|
+
if (e.target.value.length > 4) return e.stopPropagation(), void e.preventDefault();
|
|
104
|
+
T(e.target.value);
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}, [
|
|
109
|
+
w,
|
|
110
|
+
U,
|
|
111
|
+
_,
|
|
112
|
+
W
|
|
113
|
+
]), K = y((e) => {
|
|
114
|
+
let t = (e) => {
|
|
115
|
+
_?.execute(e);
|
|
116
|
+
}, n = _?.getState(), r = [];
|
|
117
|
+
for (let e = 0; e < o.length; e++) {
|
|
118
|
+
let i = o[e] === n;
|
|
119
|
+
r.push(N(D, {
|
|
120
|
+
selected: i,
|
|
121
|
+
icon: i ? N(j, {}) : void 0,
|
|
122
|
+
disabled: s || !_ || _.disabled(),
|
|
123
|
+
onMouseDown: (e) => {
|
|
124
|
+
e.button === 0 && e.preventDefault();
|
|
125
|
+
},
|
|
126
|
+
onMouseUp: (n) => {
|
|
127
|
+
n.button === 0 && t(o[e]);
|
|
128
|
+
},
|
|
129
|
+
onKeyDown: (n) => {
|
|
130
|
+
n.keyCode !== l.Enter && n.keyCode !== l.Space || t(o[e]);
|
|
131
|
+
},
|
|
132
|
+
sx: {
|
|
133
|
+
paddingTop: "4px",
|
|
134
|
+
paddingBottom: "4px"
|
|
135
|
+
},
|
|
136
|
+
children: N(F, {
|
|
137
|
+
sx: {
|
|
138
|
+
display: "flex",
|
|
139
|
+
flex: "1 1 100%",
|
|
140
|
+
justifyContent: "end"
|
|
141
|
+
},
|
|
142
|
+
children: o[e]
|
|
143
|
+
})
|
|
144
|
+
}, "fontSize-" + e));
|
|
145
|
+
}
|
|
146
|
+
let i = P(F, {
|
|
147
|
+
sx: {
|
|
148
|
+
display: "flex",
|
|
149
|
+
flexDirection: "column",
|
|
150
|
+
flex: "1 1 100%",
|
|
151
|
+
overflow: "hidden"
|
|
152
|
+
},
|
|
153
|
+
...g,
|
|
154
|
+
children: [
|
|
155
|
+
B,
|
|
156
|
+
N(E, { orientation: "horizontal" }),
|
|
157
|
+
N(F, {
|
|
158
|
+
sx: {
|
|
159
|
+
overflow: "auto",
|
|
160
|
+
flex: "1 1 100%"
|
|
161
|
+
},
|
|
162
|
+
children: r
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
return M({
|
|
167
|
+
...e,
|
|
168
|
+
children: i
|
|
169
|
+
});
|
|
170
|
+
}, [U, _]);
|
|
171
|
+
return N(O, {
|
|
172
|
+
ref: n,
|
|
173
|
+
sx: { ...m },
|
|
174
|
+
tabIndex: -1,
|
|
175
|
+
outlined: !0,
|
|
176
|
+
disabled: U,
|
|
177
|
+
renderPopupPanel: K,
|
|
178
|
+
renderTooltip: ({ children: e, disabled: t }) => N(k, {
|
|
179
|
+
label: _?.getLabel(),
|
|
180
|
+
description: _?.getDescription(),
|
|
181
|
+
disabled: t || _?.disabled(),
|
|
182
|
+
children: e
|
|
183
|
+
}),
|
|
184
|
+
renderQuickButton: G,
|
|
185
|
+
...g
|
|
186
|
+
});
|
|
187
|
+
})), H = v((e) => {
|
|
188
|
+
let { label: t, sample: n, sx: r, ...i } = e, a = !!n && n.length > 0;
|
|
189
|
+
return P(F, {
|
|
190
|
+
sx: {
|
|
191
|
+
display: "flex",
|
|
192
|
+
flex: "1 1 100%",
|
|
193
|
+
flexDirection: "column",
|
|
194
|
+
overflow: "hidden",
|
|
195
|
+
"*": { lineHeight: "1.4" },
|
|
196
|
+
...r
|
|
197
|
+
},
|
|
198
|
+
...i,
|
|
199
|
+
children: [N(R, {
|
|
200
|
+
component: "div",
|
|
201
|
+
children: t
|
|
202
|
+
}), N(R, {
|
|
203
|
+
variant: "caption",
|
|
204
|
+
component: "div",
|
|
205
|
+
sx: {
|
|
206
|
+
color: (e) => B(e.palette.text.primary, .6),
|
|
207
|
+
paddingTop: a ? "1px" : void 0,
|
|
208
|
+
overflow: "hidden",
|
|
209
|
+
textOverflow: "ellipsis"
|
|
210
|
+
},
|
|
211
|
+
children: a ? n : " "
|
|
212
|
+
})]
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
H.displayName = "NumberFormatOption";
|
|
216
|
+
var U = (e, t) => {
|
|
217
|
+
switch (t) {
|
|
218
|
+
case a.Type.General: return e("numberFormat.catGeneral");
|
|
219
|
+
case a.Type.Number: return e("numberFormat.catNumber");
|
|
220
|
+
case a.Type.Currency: return e("numberFormat.catCurrency");
|
|
221
|
+
case a.Type.Accounting: return e("numberFormat.catAccounting");
|
|
222
|
+
case a.Type.ShortDate: return e("numberFormat.typeShortDate");
|
|
223
|
+
case a.Type.MediumDate: return e("numberFormat.typeMediumDate");
|
|
224
|
+
case a.Type.LongDate: return e("numberFormat.typeLongDate");
|
|
225
|
+
case a.Type.ShortTime: return e("numberFormat.typeShortTime");
|
|
226
|
+
case a.Type.MediumTime: return e("numberFormat.typeMediumTime");
|
|
227
|
+
case a.Type.LongTime: return e("numberFormat.typeLongTime");
|
|
228
|
+
case a.Type.Comma: return e("numberFormat.typeComma");
|
|
229
|
+
case a.Type.Percentage: return e("numberFormat.catPercentage");
|
|
230
|
+
case a.Type.Fraction: return e("numberFormat.catFraction");
|
|
231
|
+
case a.Type.Scientific: return e("numberFormat.catScientific");
|
|
232
|
+
case a.Type.Text: return e("numberFormat.catText");
|
|
233
|
+
case a.Type.Special: return e("numberFormat.catSpecial");
|
|
234
|
+
case a.Type.Custom: return e("numberFormat.catCustom");
|
|
235
|
+
default: return t;
|
|
236
|
+
}
|
|
237
|
+
}, W = (e, t) => {
|
|
238
|
+
switch (t) {
|
|
239
|
+
case "General": return e("numberFormat.catGeneral");
|
|
240
|
+
case "Number": return e("numberFormat.catNumber");
|
|
241
|
+
case "Currency": return e("numberFormat.catCurrency");
|
|
242
|
+
case "Accounting": return e("numberFormat.catAccounting");
|
|
243
|
+
case "Date": return e("numberFormat.catDate");
|
|
244
|
+
case "Time": return e("numberFormat.catTime");
|
|
245
|
+
case "Percentage": return e("numberFormat.catPercentage");
|
|
246
|
+
case "Fraction": return e("numberFormat.catFraction");
|
|
247
|
+
case "Scientific": return e("numberFormat.catScientific");
|
|
248
|
+
case "Text": return e("numberFormat.catText");
|
|
249
|
+
case "Special": return e("numberFormat.catSpecial");
|
|
250
|
+
case "Custom": return e("numberFormat.catCustom");
|
|
251
|
+
default: return t;
|
|
252
|
+
}
|
|
253
|
+
}, { Builder: G } = a, K = /* @__PURE__ */ "USD.EUR.JPY.GBP.CNY.AUD.CAD.CHF.HKD.SGD.SEK.NOK.DKK.NZD.KRW.INR.BRL.RUB.ZAR.MXN.TRY.PLN.THB.IDR.ILS.AED.SAR.CZK.HUF.PHP.MYR.TWD".split("."), q = v(_((e, t) => {
|
|
254
|
+
let { sx: n, disabled: r, groupKey: i, ...a } = e, o = g(), s = m(), [u] = p(["formatNumberFormatAccountingStyle"]), d = r ?? (!u || u.disabled()), f = y((e) => {
|
|
255
|
+
let t = (t) => {
|
|
256
|
+
e.closeFloat?.(), u?.execute(t ?? void 0);
|
|
257
|
+
}, n = (e) => ({
|
|
258
|
+
disabled: d,
|
|
259
|
+
sx: {
|
|
260
|
+
display: "flex",
|
|
261
|
+
paddingTop: "4px",
|
|
262
|
+
paddingBottom: "4px",
|
|
263
|
+
flex: "none"
|
|
264
|
+
},
|
|
265
|
+
onMouseUp: (t) => {
|
|
266
|
+
t.button === 0 && e();
|
|
267
|
+
},
|
|
268
|
+
onMouseDown: (e) => {
|
|
269
|
+
e.button === 0 && e.preventDefault();
|
|
270
|
+
},
|
|
271
|
+
onKeyDown: (t) => {
|
|
272
|
+
t.keyCode !== l.Enter && t.keyCode !== l.Space || e();
|
|
273
|
+
}
|
|
274
|
+
}), r = (e) => N(F, {
|
|
275
|
+
sx: {
|
|
276
|
+
display: "flex",
|
|
277
|
+
flex: "1 1 100%",
|
|
278
|
+
flexDirection: "column",
|
|
279
|
+
overflow: "hidden"
|
|
280
|
+
},
|
|
281
|
+
children: N(R, {
|
|
282
|
+
component: "div",
|
|
283
|
+
sx: {
|
|
284
|
+
whiteSpace: "nowrap",
|
|
285
|
+
overflow: "hidden",
|
|
286
|
+
textOverflow: "ellipsis"
|
|
287
|
+
},
|
|
288
|
+
children: e
|
|
289
|
+
})
|
|
290
|
+
}), i = [...K].sort((e, t) => J(e, s).localeCompare(J(t, s))).map((e) => {
|
|
291
|
+
let i = function(e) {
|
|
292
|
+
try {
|
|
293
|
+
return new Intl.NumberFormat("en", {
|
|
294
|
+
style: "currency",
|
|
295
|
+
currency: e,
|
|
296
|
+
currencyDisplay: "narrowSymbol"
|
|
297
|
+
}).formatToParts(0).find((e) => e.type === "currency")?.value ?? e;
|
|
298
|
+
} catch {
|
|
299
|
+
return e;
|
|
300
|
+
}
|
|
301
|
+
}(e);
|
|
302
|
+
return N(D, {
|
|
303
|
+
...n(() => t(function(e) {
|
|
304
|
+
let t = G.parse(G.defaultCodeForCategory("Accounting"));
|
|
305
|
+
return G.build({
|
|
306
|
+
...t,
|
|
307
|
+
currencySymbol: e
|
|
308
|
+
});
|
|
309
|
+
}(i))),
|
|
310
|
+
children: r(`${i} ${J(e, s)} (${e})`)
|
|
311
|
+
}, e);
|
|
312
|
+
});
|
|
313
|
+
return M({
|
|
314
|
+
...e,
|
|
315
|
+
children: P(F, {
|
|
316
|
+
sx: {
|
|
317
|
+
display: "flex",
|
|
318
|
+
flexDirection: "column",
|
|
319
|
+
flex: "1 1 100%",
|
|
320
|
+
overflow: "hidden"
|
|
321
|
+
},
|
|
322
|
+
children: [P(F, {
|
|
323
|
+
sx: { flex: "none" },
|
|
324
|
+
children: [N(D, {
|
|
325
|
+
...n(() => t()),
|
|
326
|
+
children: r(o("numberFormat.accountingDefault"))
|
|
327
|
+
}, "default-currency"), N(E, { orientation: "horizontal" })]
|
|
328
|
+
}), N(F, {
|
|
329
|
+
sx: {
|
|
330
|
+
overflow: "auto",
|
|
331
|
+
flex: "1 1 100%"
|
|
332
|
+
},
|
|
333
|
+
children: i
|
|
334
|
+
})]
|
|
335
|
+
})
|
|
336
|
+
});
|
|
337
|
+
}, [
|
|
338
|
+
u,
|
|
339
|
+
d,
|
|
340
|
+
o,
|
|
341
|
+
s
|
|
342
|
+
]);
|
|
343
|
+
return N(w, {
|
|
344
|
+
ref: t,
|
|
345
|
+
sx: { ...n },
|
|
346
|
+
disabled: d,
|
|
347
|
+
quickCommand: "formatNumberFormatAccountingStyle",
|
|
348
|
+
renderPopupPanel: f,
|
|
349
|
+
renderTooltip: ({ children: e, disabled: t }) => N(k, {
|
|
350
|
+
label: u?.getLabel?.(i),
|
|
351
|
+
description: u?.getDescription?.(i),
|
|
352
|
+
disabled: t,
|
|
353
|
+
children: e
|
|
354
|
+
}),
|
|
355
|
+
icon: N(c, { iconKey: "CurrencyDollar" }),
|
|
356
|
+
label: u?.getLabel?.(i),
|
|
357
|
+
...a
|
|
358
|
+
});
|
|
359
|
+
}));
|
|
360
|
+
function J(e, t) {
|
|
361
|
+
try {
|
|
362
|
+
return new Intl.DisplayNames([t ?? "en"], { type: "currency" }).of(e) ?? e;
|
|
363
|
+
} catch {
|
|
364
|
+
return e;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
var Y = "numberFormatOptions", X = v(_((e, t) => {
|
|
368
|
+
let { groupKey: n = Y, disabled: r, sx: i, ...a } = e;
|
|
369
|
+
return P(F, {
|
|
370
|
+
ref: t,
|
|
371
|
+
className: "quick-buttons",
|
|
372
|
+
sx: {
|
|
373
|
+
display: "flex",
|
|
374
|
+
alignItems: "center",
|
|
375
|
+
justifyContent: "center",
|
|
376
|
+
...i
|
|
377
|
+
},
|
|
378
|
+
...a,
|
|
379
|
+
children: [
|
|
380
|
+
N(q, {
|
|
381
|
+
groupKey: n,
|
|
382
|
+
disabled: r
|
|
383
|
+
}),
|
|
384
|
+
N(C, {
|
|
385
|
+
commandKey: "formatNumberFormatPercentStyle",
|
|
386
|
+
groupKey: n,
|
|
387
|
+
disabled: r
|
|
388
|
+
}),
|
|
389
|
+
N(C, {
|
|
390
|
+
commandKey: "formatNumberFormatCommaStyle",
|
|
391
|
+
groupKey: n,
|
|
392
|
+
disabled: r
|
|
393
|
+
}),
|
|
394
|
+
N(C, {
|
|
395
|
+
commandKey: "formatNumberFormatIncreaseDecimal",
|
|
396
|
+
groupKey: n,
|
|
397
|
+
disabled: r
|
|
398
|
+
}),
|
|
399
|
+
N(C, {
|
|
400
|
+
commandKey: "formatNumberFormatDecreaseDecimal",
|
|
401
|
+
groupKey: n,
|
|
402
|
+
disabled: r
|
|
403
|
+
})
|
|
404
|
+
]
|
|
405
|
+
});
|
|
406
|
+
}));
|
|
407
|
+
X.displayName = "NumberFormatQuickButtons";
|
|
408
|
+
var Z = v(_((t, r) => {
|
|
409
|
+
let { commandKey: i, onSelectColor: a, disabled: c, variant: l = s.Toolbar, quickColor: u, propsPanel: m, isSplit: h = !1, darkMode: g, icon: _, ...v } = t, { autoColor: b, schemeLookup: S, recentColors: C, ...w } = m ?? {};
|
|
410
|
+
if (v.selectedColor) throw Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
|
|
411
|
+
let [E] = p([i ?? ""]), D = E?.getContext(), O = u ?? D?.quickColor;
|
|
412
|
+
h && !O && (O = new n("transparent"));
|
|
413
|
+
let k = b === void 0 ? D?.autoColor : b, j = S ?? D?.schemeLookup, M = C ?? D?.recentColors, P = o(), F = g ?? P === "dark", I = x(() => ({
|
|
414
|
+
autoColor: k,
|
|
415
|
+
schemeLookup: j,
|
|
416
|
+
recentColors: M,
|
|
417
|
+
darkMode: F,
|
|
418
|
+
...d("grid", F ? "dark" : "light"),
|
|
419
|
+
...w
|
|
420
|
+
}), [
|
|
421
|
+
k,
|
|
422
|
+
j,
|
|
423
|
+
M,
|
|
424
|
+
F
|
|
425
|
+
]), L = f((e, t) => {
|
|
426
|
+
e && t && D?.addRecentColor && D.addRecentColor(e), D?.onColorSelect && D.onColorSelect(e), a?.(e, t), E?.execute(e);
|
|
427
|
+
}, [
|
|
428
|
+
E,
|
|
429
|
+
a,
|
|
430
|
+
D
|
|
431
|
+
]), R = y((e) => {
|
|
432
|
+
let { disabled: t, children: n, title: r, ...a } = e, o = e.children;
|
|
433
|
+
return (E?.disabled() || c) && (o = N("div", { children: o })), N(T, {
|
|
434
|
+
commandKey: i,
|
|
435
|
+
placement: l === s.Toolbar ? "bottom-start" : "right-start",
|
|
436
|
+
disabled: t,
|
|
437
|
+
...a,
|
|
438
|
+
children: o
|
|
439
|
+
});
|
|
440
|
+
}, [E, c]);
|
|
441
|
+
return N(e, {
|
|
442
|
+
ref: r,
|
|
443
|
+
propsPanel: I,
|
|
444
|
+
icon: _ ?? E?.getIcon(),
|
|
445
|
+
quickColor: O,
|
|
446
|
+
selectedColor: E?.getState(),
|
|
447
|
+
onSelectColor: L,
|
|
448
|
+
variant: l === s.Menuitem ? A.Menuitem : A.Toolbar,
|
|
449
|
+
renderTooltip: R,
|
|
450
|
+
label: E?.getLabel(),
|
|
451
|
+
disabled: c ?? (!E || E.disabled()),
|
|
452
|
+
compareRGB: !0,
|
|
453
|
+
darkMode: F,
|
|
454
|
+
...v
|
|
455
|
+
});
|
|
456
|
+
}));
|
|
457
|
+
Z.displayName = "ColorCommandButton";
|
|
458
|
+
var Q = v(_((e, t) => {
|
|
459
|
+
let { commandKey: n, sx: r, disabled: a, icon: o, label: s, ...c } = e, [d] = p([n]), f = d?.getState(), m = z(), h = x(() => `${u("Times New Roman", {
|
|
460
|
+
size: Math.round(m.typography.fontSize),
|
|
461
|
+
family: m.typography.fontFamily ?? ""
|
|
462
|
+
})}px`, [m]), g = a ?? (!d || d.disabled()), _ = y((e) => {
|
|
463
|
+
let t = (e) => {
|
|
464
|
+
d?.execute(e);
|
|
465
|
+
}, n = i.getShared().getFontList(), r = [];
|
|
466
|
+
for (let e = 0; e < n.length; e++) {
|
|
467
|
+
let t = n[e].fontRef;
|
|
468
|
+
if (!t) continue;
|
|
469
|
+
let i = t.getFamily();
|
|
470
|
+
r.push({
|
|
471
|
+
key: i,
|
|
472
|
+
description: i
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
r.some((e) => e.key === f) || r.unshift({
|
|
476
|
+
key: f,
|
|
477
|
+
description: f
|
|
478
|
+
});
|
|
479
|
+
let o = [], s = r.length;
|
|
480
|
+
for (let e = 0; e < s; e++) {
|
|
481
|
+
let n = r[e];
|
|
482
|
+
if (!n) continue;
|
|
483
|
+
let i = n.key, s = n.key === f;
|
|
484
|
+
o.push(N(D, {
|
|
485
|
+
sx: {
|
|
486
|
+
display: "flex",
|
|
487
|
+
paddingTop: "4px",
|
|
488
|
+
paddingBottom: "4px"
|
|
489
|
+
},
|
|
490
|
+
selected: s,
|
|
491
|
+
disabled: a || !d || d.disabled(),
|
|
492
|
+
icon: s ? N(j, {}) : void 0,
|
|
493
|
+
onMouseUp: (e) => {
|
|
494
|
+
e.button === 0 && t(i);
|
|
495
|
+
},
|
|
496
|
+
onMouseDown: (e) => {
|
|
497
|
+
e.button === 0 && e.preventDefault();
|
|
498
|
+
},
|
|
499
|
+
onKeyDown: (e) => {
|
|
500
|
+
e.keyCode !== l.Enter && e.keyCode !== l.Space || t(i);
|
|
501
|
+
},
|
|
502
|
+
children: N(F, {
|
|
503
|
+
sx: {
|
|
504
|
+
display: "flex",
|
|
505
|
+
flex: "1 1 100%",
|
|
506
|
+
flexDirection: "column",
|
|
507
|
+
overflow: "hidden"
|
|
508
|
+
},
|
|
509
|
+
children: N(R, {
|
|
510
|
+
component: "div",
|
|
511
|
+
sx: {
|
|
512
|
+
whiteSpace: "nowrap",
|
|
513
|
+
overflow: "hidden",
|
|
514
|
+
textOverflow: "ellipsis",
|
|
515
|
+
fontFamily: () => i
|
|
516
|
+
},
|
|
517
|
+
children: r[e].description
|
|
518
|
+
})
|
|
519
|
+
})
|
|
520
|
+
}, e + "" + i));
|
|
521
|
+
}
|
|
522
|
+
let u = N(F, {
|
|
523
|
+
sx: {
|
|
524
|
+
display: "flex",
|
|
525
|
+
flexDirection: "column",
|
|
526
|
+
flex: "1 1 100%"
|
|
527
|
+
},
|
|
528
|
+
...c,
|
|
529
|
+
children: N(F, {
|
|
530
|
+
sx: {
|
|
531
|
+
overflow: "auto",
|
|
532
|
+
flex: "1 1 100%"
|
|
533
|
+
},
|
|
534
|
+
children: o
|
|
535
|
+
})
|
|
536
|
+
});
|
|
537
|
+
return M({
|
|
538
|
+
...e,
|
|
539
|
+
children: u
|
|
540
|
+
});
|
|
541
|
+
}, [
|
|
542
|
+
g,
|
|
543
|
+
d,
|
|
544
|
+
f
|
|
545
|
+
]);
|
|
546
|
+
return N(O, {
|
|
547
|
+
ref: t,
|
|
548
|
+
sx: { ...r },
|
|
549
|
+
outlined: !0,
|
|
550
|
+
disabled: g,
|
|
551
|
+
renderPopupPanel: _,
|
|
552
|
+
renderTooltip: ({ children: e, disabled: t }) => N(k, {
|
|
553
|
+
label: d?.getLabel(),
|
|
554
|
+
description: d?.getDescription(),
|
|
555
|
+
disabled: t,
|
|
556
|
+
children: e
|
|
557
|
+
}),
|
|
558
|
+
icon: N(F, {
|
|
559
|
+
sx: {
|
|
560
|
+
display: "flex",
|
|
561
|
+
paddingLeft: "4px",
|
|
562
|
+
paddingRight: "4px",
|
|
563
|
+
fontSize: (e) => `${Math.round(e.typography.fontSize)}px`,
|
|
564
|
+
lineHeight: 1.2,
|
|
565
|
+
fontFamily: (e) => e.typography.fontFamily,
|
|
566
|
+
color: (e) => e.palette.text.secondary,
|
|
567
|
+
flex: "1 1 auto",
|
|
568
|
+
width: h
|
|
569
|
+
},
|
|
570
|
+
children: N(F, {
|
|
571
|
+
sx: {
|
|
572
|
+
overflow: "hidden",
|
|
573
|
+
textOverflow: "ellipsis",
|
|
574
|
+
whiteSpace: "pre"
|
|
575
|
+
},
|
|
576
|
+
children: f
|
|
577
|
+
})
|
|
578
|
+
}),
|
|
579
|
+
...c
|
|
580
|
+
});
|
|
581
|
+
}));
|
|
582
|
+
export { H as a, V as c, X as i, Z as n, W as o, Y as r, U as s, Q as t };
|