@sheetxl/studio-mui 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{CZHpYokIrB9or1kO.cjs → B6o1iQp5wuulPhxo.cjs} +1 -1
- package/browser/cjs/BCNKSDS1DahImiBd.cjs +20 -0
- package/browser/cjs/{BDBuN2H9gI8rbqch.cjs → BY1UZBLCxYes25sM.cjs} +1 -1
- package/browser/cjs/{7yf1jDRYBQhJ0IgK.cjs → BY3gQcuJkcK9yhlk.cjs} +2 -2
- package/browser/cjs/BrJIDDxcCb7loSqZ.cjs +6 -0
- package/browser/cjs/{fI8eQSgm9DnQdoqc.cjs → CflDY3SthBCQg-9F.cjs} +2 -2
- package/browser/cjs/{CF7gN1Im2OZf0fyo.cjs → D5l5wPl8rDYzrVey.cjs} +3 -3
- package/browser/cjs/{Ba3EaCxs0-PYJOHF.cjs → DwzNkpi_T8XJi3Cd.cjs} +1 -1
- package/browser/cjs/{Dd1ymyZnhRrMyk8W.cjs → HfdfBnRHde6LrsMc.cjs} +1 -1
- package/browser/cjs/{CzhsFl-yeDRYp_Ya.cjs → hRcxITGib5rp_kTW.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BNAv-1KD4Z-JBGmo.cjs → qd_yuub025U26HmN.cjs} +1 -1
- package/browser/cjs/{Ezgivppjg0YGYuvk.cjs → yETr27p_AmaFufvo.cjs} +2 -2
- package/browser/esm/{CxbwDisnGiU8Bvfq.mjs → BMrxZUxFZxs_TprK.mjs} +3 -3
- package/browser/esm/{B4c9bY5iEhIRTeFI.mjs → BXa5jJK06vkHLfz_.mjs} +8 -6
- package/browser/esm/{CbQfO8yuXsD7zfKt.mjs → BqypjhYAei9BoIkg.mjs} +2 -2
- package/browser/esm/{UJcz7qfMj06BWj1Q.mjs → C-TjWH0Ll_dg6TXG.mjs} +1 -1
- package/browser/esm/{BMhsxJPTT2oY70z6.mjs → C43cFXvNQttM0tuv.mjs} +1 -1
- package/browser/esm/{C0QRYjn9bQqR1KnO.mjs → CX5p76lvGB80Gn7j.mjs} +1 -1
- package/browser/esm/{D3NThHe3w_O4Ry0D.mjs → CwE4P36bJkqx4fG2.mjs} +1 -1
- package/browser/esm/{B3OGepFJek3nMUlQ.mjs → DDCO6hne0WaKAsyz.mjs} +2 -2
- package/browser/esm/{BXTb14FHzlnPLAEW.mjs → DUTXM-jsPX1poBAb.mjs} +2 -2
- package/browser/esm/{QHLyYFH_hFJn_CdF.mjs → DpeZ0TCk2XtCsW7D.mjs} +2 -2
- package/browser/esm/{C-WOTbexGZdqA0Cy.mjs → UKbQrJIwqIMUQ4dz.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/zTa4aYOOiAsmWpM1.mjs +4489 -0
- package/node/esm/{CcEBSVCCtyGC6XWd.mjs → C0x0sq_I7hdqCuBB.mjs} +1 -1
- package/node/esm/{GfnfhO-RSN3U1QDI.mjs → CdEdm8ItFMvEzr0O.mjs} +1 -1
- package/node/esm/{CE_wDNQHtTFRFwNO.mjs → DUoSsHJRuVxAeHW-.mjs} +1 -1
- package/node/esm/{KhHu7gqlchpl2exi.mjs → DhjwHPKOhF-WGawL.mjs} +1 -1
- package/node/esm/{B01n_q5SspvjsTcc.mjs → DmbC0_ocWCB60DUY.mjs} +1 -1
- package/node/esm/DuFKPKejduTq6L6F.mjs +65 -0
- package/node/esm/{e-hAbNYacz5nXfrX.mjs → VjNnErE5lO5hNix_.mjs} +1 -1
- package/node/esm/{MlWMmDWfx1ohpoCK.mjs → g5IsTuP_M7p1bN41.mjs} +1 -1
- package/node/esm/index.mjs +604 -604
- package/node/esm/{BsnCGCG5NtyDT_bI.mjs → nZVauB5xkNLVTaod.mjs} +1 -1
- package/node/esm/{D616RGpnOfCKxE7k.mjs → x7VDppl2hKDhIcfj.mjs} +1 -1
- package/package.json +8 -8
- package/types/index.d.ts +4 -11
- package/browser/cjs/HhHqaDWuILzt1AKC.cjs +0 -20
- package/browser/cjs/MdZLRo_iiKExSIs7.cjs +0 -6
- package/browser/esm/DoO4MKoQT5HuPymy.mjs +0 -4489
- package/node/esm/B_ltyNSEkQayBgVo.mjs +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.3
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
|
-
import { memo as o, useState as n, useRef as i, useReducer as a, useMemo as l } from "react";
|
|
9
|
-
import { useMeasure as r } from "react-use";
|
|
10
|
-
import { DialogContent as s, Box as c } from "@mui/material";
|
|
11
|
-
import { DefaultNotifier as d, useCommand as m, useCallbackRef as g, CommandButtonType as p } from "@sheetxl/utils-react";
|
|
12
|
-
import { InternalWindow as h, ExhibitDivider as u, CommandButton as x, themeIcon as f, InsertTableIcon as y } from "@sheetxl/utils-mui";
|
|
13
|
-
import { useModelListener as b } from "@sheetxl/react";
|
|
14
|
-
import { NamedInput as w, RangeInput as S, TableStyleOptionsPanel as C, TableStylePreview as N } from "./index.mjs";
|
|
15
|
-
const v = o((o2) => {
|
|
16
|
-
const { title: v2, onHide: R, autoFocusSel: T = ".range-input input", context: F, notifier: D = d, command: H, commands: B, ...I } = o2, [P, j] = n(false), [z, L] = n(false), O = i(null), [E, A] = a((e2) => e2 + 1, 0), [M, { width: V }] = r();
|
|
17
|
-
m(H);
|
|
18
|
-
const W = F ?? H.context(), k = W.table(), [q, G] = n(() => k ? W.getNames().getRanges(k.getRange()) : null), J = l(() => k?.getName() ?? "", [k]);
|
|
19
|
-
b(W.table(), { onAnchorCoordsChange(e2) {
|
|
20
|
-
G(W.getNames().getRanges(e2.getRange()));
|
|
21
|
-
}, onProtectedChange(e2) {
|
|
22
|
-
A();
|
|
23
|
-
} });
|
|
24
|
-
const K = g((e2) => {
|
|
25
|
-
W?.table().setName(e2);
|
|
26
|
-
}, [W]), Q = g((e2) => {
|
|
27
|
-
W?.table().resize(e2.at(0));
|
|
28
|
-
}, [W]);
|
|
29
|
-
let U = null;
|
|
30
|
-
return W.table() || (U = e("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", opacity: 1, display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center", boxSizing: "border-box" }, children: e("div", { children: "No table selected" }) })), e(h, { ref: O, title: v2 ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, onHide: R, onFocus: () => j(true), onBlur: (e2) => {
|
|
31
|
-
O?.current?.contains(e2.relatedTarget) || j(false);
|
|
32
|
-
}, PaperProps: { elevation: P ? 3 : 1 }, ...I, children: t(s, { dividers: true, ref: M, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, children: [t(c, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: W.table() ? 1 : 0 }, children: [e(c, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: e(c, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2) }, children: t(c, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [e(w, { formName: "name", defaultInput: J, value: k?.getName() ?? "No table", onChangeInput: K, onValidate: (e2) => {
|
|
33
|
-
k && k.getName().toLowerCase() === e2.toLowerCase() || W?.getNames().validateName(e2);
|
|
34
|
-
}, disabled: k?.isProtected() ?? true, onFocus: (e2) => {
|
|
35
|
-
z || e2.target?.select(), L(true);
|
|
36
|
-
} }), e(S, { formName: "range", value: q, onChangeInput: Q, resolvedAddress: W.getNames().getRanges.bind(W.getNames()), disabled: k?.isProtected() ?? true, onFocus: (e2) => {
|
|
37
|
-
z || e2.target?.select(), L(true);
|
|
38
|
-
} })] }) }) }), t(c, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(0.5), marginTop: (e2) => e2.spacing(1) }, children: [e(u, { orientation: "horizontal", sx: { marginTop: (e2) => e2.spacing(1.5), marginBottom: (e2) => e2.spacing(0.75) } }), e(C, { disabled: k?.isProtected(), styleOptions: k?.getStyleOptions() ?? null, onStyleOptionsChange: (e2) => {
|
|
39
|
-
k.updateStyleOptions(e2);
|
|
40
|
-
}, showHeaderRow: k?.getShowHeaders(), onShowHeaderRowChange: (e2) => {
|
|
41
|
-
try {
|
|
42
|
-
k.setShowHeaders(e2);
|
|
43
|
-
} catch (e3) {
|
|
44
|
-
D.showError(e3);
|
|
45
|
-
}
|
|
46
|
-
}, showTotalRow: k?.getShowTotals(), onShowTotalRowChange: (e2) => {
|
|
47
|
-
try {
|
|
48
|
-
k.setShowTotals(e2);
|
|
49
|
-
} catch (e3) {
|
|
50
|
-
D.showError(e3);
|
|
51
|
-
}
|
|
52
|
-
}, showFilterButton: k?.getFilter() ? k.getShowFilterButton() : null, onShowFilterButtonChange: (e2) => {
|
|
53
|
-
try {
|
|
54
|
-
k.setShowFilterButton(e2);
|
|
55
|
-
} catch (e3) {
|
|
56
|
-
D.showError(e3);
|
|
57
|
-
}
|
|
58
|
-
} }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(N, { table: k, styles: W.styles(), bodyStyle: W.bodyStyle(), cellHeight: 30, isLive: true }) }), e(u, { orientation: "horizontal" }), t(c, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [e(x, { variant: p.Menuitem, command: B.getCommand("convertTableToRange"), commandState: k, icon: f(e(y, {})) }), e(x, { variant: p.Menuitem, commandState: k, command: B.getCommand("deleteTable"), icon: f(e(y, {})) })] })] })] }), U] }) });
|
|
59
|
-
});
|
|
60
|
-
export {
|
|
61
|
-
v as TableDetailsWindow,
|
|
62
|
-
v as default
|
|
63
|
-
};
|