@sheetxl/studio-mui 0.7.2 → 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/{BTKJQTAiNX3PUH4J.cjs → B6o1iQp5wuulPhxo.cjs} +1 -1
- package/browser/cjs/BCNKSDS1DahImiBd.cjs +20 -0
- package/browser/cjs/{DpVOTM5LqKLF9WSk.cjs → BY1UZBLCxYes25sM.cjs} +1 -1
- package/browser/cjs/{BvWKmFKC47AMDMFu.cjs → BY3gQcuJkcK9yhlk.cjs} +2 -2
- package/browser/cjs/BrJIDDxcCb7loSqZ.cjs +6 -0
- package/browser/cjs/{Vrlvn1CfPRQisLYL.cjs → CflDY3SthBCQg-9F.cjs} +2 -2
- package/browser/cjs/{BAbmJ4Ls0UAVWref.cjs → D5l5wPl8rDYzrVey.cjs} +3 -3
- package/browser/cjs/{BwWj-AITfsL6qDpj.cjs → DwzNkpi_T8XJi3Cd.cjs} +1 -1
- package/browser/cjs/{JOT43QluehBYwrKS.cjs → HfdfBnRHde6LrsMc.cjs} +1 -1
- package/browser/cjs/{Sm5xZWmdTjSCJxOx.cjs → hRcxITGib5rp_kTW.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{DZhb2mEKXfkKfz6x.cjs → qd_yuub025U26HmN.cjs} +1 -1
- package/browser/cjs/{DI5l6QVkb01TsEwV.cjs → yETr27p_AmaFufvo.cjs} +2 -2
- package/browser/esm/{Dh7XtuX1cWz1nW_v.mjs → BMrxZUxFZxs_TprK.mjs} +3 -3
- package/browser/esm/{Q18D_b2fTBJ7QH7K.mjs → BXa5jJK06vkHLfz_.mjs} +8 -6
- package/browser/esm/{DzgkcKlJrnETrT-z.mjs → BqypjhYAei9BoIkg.mjs} +2 -2
- package/browser/esm/{C4RZiafsbwfiLz-C.mjs → C-TjWH0Ll_dg6TXG.mjs} +1 -1
- package/browser/esm/{CPuHFKqFT5LF6fXj.mjs → C43cFXvNQttM0tuv.mjs} +1 -1
- package/browser/esm/{CPjkuTz3sLh-etcJ.mjs → CX5p76lvGB80Gn7j.mjs} +1 -1
- package/browser/esm/{CGIwipEW4v4OPSB8.mjs → CwE4P36bJkqx4fG2.mjs} +1 -1
- package/browser/esm/{Su0kqIblR6zTAjB2.mjs → DDCO6hne0WaKAsyz.mjs} +2 -2
- package/browser/esm/{CMzmkaChmbnHntkb.mjs → DUTXM-jsPX1poBAb.mjs} +2 -2
- package/browser/esm/{CzxKHjziUuDxKzIn.mjs → DpeZ0TCk2XtCsW7D.mjs} +2 -2
- package/browser/esm/{DUS29WdqCMuVVLpm.mjs → UKbQrJIwqIMUQ4dz.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/zTa4aYOOiAsmWpM1.mjs +4489 -0
- package/node/esm/{_Nq9WHxw-bmMA6Eh.mjs → C0x0sq_I7hdqCuBB.mjs} +1 -1
- package/node/esm/{DfoPtVWCLOfcAoCg.mjs → CdEdm8ItFMvEzr0O.mjs} +1 -1
- package/node/esm/{Dw2SSXphjQ4gTuEe.mjs → DUoSsHJRuVxAeHW-.mjs} +1 -1
- package/node/esm/{5715fftg6SqkmbCs.mjs → DhjwHPKOhF-WGawL.mjs} +1 -1
- package/node/esm/{BYxSe-f9SXkVQCOn.mjs → DmbC0_ocWCB60DUY.mjs} +1 -1
- package/node/esm/DuFKPKejduTq6L6F.mjs +65 -0
- package/node/esm/{CJQiYToWJ-8AaD8d.mjs → VjNnErE5lO5hNix_.mjs} +1 -1
- package/node/esm/{BNH5761S3vit417d.mjs → g5IsTuP_M7p1bN41.mjs} +1 -1
- package/node/esm/index.mjs +604 -604
- package/node/esm/{1bQb13SILtJFnqBQ.mjs → nZVauB5xkNLVTaod.mjs} +1 -1
- package/node/esm/{d78UMCfSqw7_DwUj.mjs → x7VDppl2hKDhIcfj.mjs} +1 -1
- package/package.json +8 -8
- package/types/index.d.ts +4 -11
- package/browser/cjs/B7w0OTmhuQrwQqVN.cjs +0 -6
- package/browser/cjs/Dz_LzICPkmdzQlzy.cjs +0 -20
- package/browser/esm/DLrKIbuNE76u-F3y.mjs +0 -4489
- package/node/esm/uS3k2AKeGAjgsirO.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.2
|
|
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
|
-
};
|