@sheetxl/studio-mui 0.8.0-beta.5 → 0.8.0-beta.6

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.
Files changed (79) hide show
  1. package/browser/cjs/{BGvoJjUs21bbuE1i.cjs → 3RXtLkq7wTAV6y_e.cjs} +1 -1
  2. package/browser/cjs/{BXkdjAb4jpTr412c.cjs → BD50lsTki7wvzb5g.cjs} +1 -1
  3. package/browser/cjs/BlNKpwiG-Q7eIi5t.cjs +8 -0
  4. package/browser/cjs/ByIUHPOa02D7XbdC.cjs +1 -0
  5. package/browser/cjs/{eCw4rAEIYE3BftpG.cjs → CkroJ2FmfFvk6Eyv.cjs} +1 -1
  6. package/browser/cjs/{B9GcCj7sj8XdjPZF.cjs → CzJvR12QCQb-0Rtn.cjs} +1 -1
  7. package/browser/cjs/{3uprnzi2l0iT17Dg.cjs → D-Yo5aV9STT5KH4G.cjs} +1 -1
  8. package/browser/cjs/{BHb7TnK1NmimV4OX.cjs → DwkiLFWUtLC8ZcIQ.cjs} +1 -1
  9. package/browser/cjs/index.cjs +1 -1
  10. package/browser/cjs/xCAd86Y_REa3Xs1o.cjs +13 -0
  11. package/browser/esm/{DkWV5seJEk7n5n4f.mjs → 27jPjqdDLWn5qbQ8.mjs} +3 -3
  12. package/browser/esm/{0RwF0cH7JQ-VqL4E.mjs → 2_WF-hy6x4dXfEzW.mjs} +1 -1
  13. package/browser/esm/{CfwoCDjpHNheDLn1.mjs → 61ip_C1X9ls4svw6.mjs} +1 -1
  14. package/browser/esm/{D_kD4qmjhElkOeRw.mjs → 6EK3JgWrKYfqzAfV.mjs} +1 -1
  15. package/browser/esm/{DFQo3TQ5Lpt6_Vid.mjs → BFxtcKJBbfjtMft-.mjs} +2 -2
  16. package/browser/esm/{BhUPwPyeqs6QNdfZ.mjs → BGdZT1Ka4ohDCZpW.mjs} +3 -3
  17. package/browser/esm/{C828ANqeXNxG8adc.mjs → BPzT8gL3SgD0CG7V.mjs} +1016 -978
  18. package/browser/esm/{DDYeKYs_XIOjhieg.mjs → BlWsO6M15Ii13NrV.mjs} +2 -2
  19. package/browser/esm/{Ot_3uk9g5RQpAjcQ.mjs → BofZe0q9bsHQr0Xd.mjs} +1 -1
  20. package/browser/esm/{ZLszpvKCQ6ZVPKdC.mjs → BybBaLxSKyGAsxqO.mjs} +3 -3
  21. package/browser/esm/{C2Ja33FV0pE1u_b4.mjs → C5swGBbBLdDzg_bm.mjs} +2 -2
  22. package/browser/esm/{GZvjjMyv09_4zahu.mjs → CKemMJZNIPnJ0dUE.mjs} +2 -2
  23. package/browser/esm/{aNqEbtO2cALJwwos.mjs → CsNOEAKuHLfckItX.mjs} +1 -1
  24. package/browser/esm/CyQk62MFBCep2ZZs.mjs +223 -0
  25. package/browser/esm/{DkuGZXKiwLKsUN_D.mjs → D-JQOjmAh6Gk6wVM.mjs} +2 -2
  26. package/browser/esm/{ONmBo80X5eV6cBBI.mjs → D3b3dWTjvFd1Kj5g.mjs} +1 -1
  27. package/browser/esm/{P8cqCkmugGNd2vkm.mjs → D8FEKUKVxH32duMx.mjs} +3 -3
  28. package/browser/esm/{DzxWYVoWw4-RT-Ia.mjs → DRUKu2I27bidfyvH.mjs} +1 -1
  29. package/browser/esm/{DFAzrYRM9N1LhRsL.mjs → DTLKzrZGPkkNlncN.mjs} +2 -2
  30. package/browser/esm/{bC4EbB4OILhPseb3.mjs → Dzym1WSjYb_mnVkJ.mjs} +2 -2
  31. package/browser/esm/{FZXipbgDJzTXFMSX.mjs → FK7vqizwRujDsqL2.mjs} +1825 -1743
  32. package/browser/esm/{DG26kflIdO_PIeNZ.mjs → JYRkZ4iKzbWnNhEs.mjs} +2 -2
  33. package/browser/esm/{26__l2vZsdgD-nJx.mjs → aGoWX29-zbUaPh2U.mjs} +2 -2
  34. package/browser/esm/index.mjs +12 -12
  35. package/browser/esm/{BDHzwq_DKJi-l3vm.mjs → p62JxLmjmWD2MQq1.mjs} +2 -2
  36. package/licenses/dependencies.txt +79 -79
  37. package/node/esm/{BOsZituO28YENQvh.mjs → 3J2-TRYWEsvnTDnO.mjs} +1 -1
  38. package/node/esm/{COd_Ly7pt0y62C8c.mjs → B2QOYsl1YmcwknsP.mjs} +9 -9
  39. package/node/esm/{CAe57GIDt8E3Sj1R.mjs → CE6ZU2MVb3_-FzIk.mjs} +1 -1
  40. package/node/esm/{B9mtSfhFe3Hjcx9T.mjs → CKOhL08sVy1N_Uza.mjs} +1 -1
  41. package/node/esm/{CS307VndSoCLgQ-m.mjs → CksPMsHwUSCpFnpS.mjs} +1135 -1096
  42. package/node/esm/{6HLpHxyQNZYCN2_o.mjs → CtoRlEz1GwA88zTu.mjs} +1 -1
  43. package/node/esm/{B77SESbao6p6Y4Dy.mjs → CzERDnu2VbNTjJgI.mjs} +8 -8
  44. package/node/esm/{4HI6dheaskyg9kLm.mjs → D3xcuMwJvLJhlPNV.mjs} +1 -1
  45. package/node/esm/{BKpja0BXFbcWlnni.mjs → DDVJs9oOFXR3RfSi.mjs} +1 -1
  46. package/node/esm/{C4o3AryrtuiHuFLr.mjs → Dc4t_AYLdTAnPOIT.mjs} +1 -1
  47. package/node/esm/{BT8pKXqqPi8PAXbL.mjs → JUUre9pYia7feetw.mjs} +1 -1
  48. package/node/esm/{DHVHJBTqBhlJQXpX.mjs → K6LEXUZkuqoEn5yJ.mjs} +1 -1
  49. package/node/esm/{oAiHfSODZnkRxiTN.mjs → ObY_iULY2ezBYD3q.mjs} +1 -1
  50. package/node/esm/index.mjs +2873 -2792
  51. package/node/esm/{aAEiFrxe-aYXbogR.mjs → qu70N1tsIwi7LmT6.mjs} +1 -1
  52. package/node/esm/{DCJNQumUzquqdCpn.mjs → uIRinWE0OCKJvsGN.mjs} +2 -2
  53. package/package.json +9 -9
  54. package/resources/locales/de/ui.msg.json +3 -4
  55. package/resources/locales/en/ui.msg.json +3 -4
  56. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +6 -0
  57. package/types/src/conditions/BetweenOption.d.ts +5 -0
  58. package/types/src/conditions/ScalarOption.d.ts +18 -0
  59. package/types/src/dialog/index.d.ts +0 -1
  60. package/types/src/filter/FilterList.d.ts +3 -3
  61. package/types/src/form/FormulaField.d.ts +6 -0
  62. package/types/src/format/AlignmentPanel.d.ts +1 -2
  63. package/types/src/format/BorderPreview.d.ts +23 -13
  64. package/types/src/format/useFormatSelection.d.ts +3 -2
  65. package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
  66. package/types/src/itemsPanel/EditorPanel.d.ts +1 -2
  67. package/types/src/itemsPanel/ItemsDescriptor.d.ts +13 -0
  68. package/types/src/itemsPanel/index.d.ts +1 -0
  69. package/types/src/studio/StudioCommands.d.ts +2 -2
  70. package/types/src/studio/StudioProps.d.ts +1 -1
  71. package/types/src/studio/StudioSplitPane.d.ts +1 -1
  72. package/browser/cjs/CucKgy044KxMHXrx.cjs +0 -13
  73. package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +0 -3
  74. package/browser/cjs/L0TaaQ9lceHCeg8C.cjs +0 -8
  75. package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +0 -1
  76. package/browser/esm/BkCuNLKQc4KN4Ss4.mjs +0 -97
  77. package/browser/esm/CMBpd4LN1GYbtCdW.mjs +0 -222
  78. package/node/esm/r_EDiG9j1gFuHgF9.mjs +0 -98
  79. package/types/src/dialog/CommentsDialog.d.ts +0 -11
@@ -1,222 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.5
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 "./aNqEbtO2cALJwwos.mjs";
8
- import { useFormulaInput as ee, useFormulaInputParts as t } from "@sheetxl/react";
9
- import { DynamicIcon as n, useTranslator as r } from "@sheetxl/utils-react";
10
- import i, { forwardRef as a, memo as o, useEffect as s, useId as c, useImperativeHandle as l, useMemo as te, useRef as u } from "react";
11
- import { ExhibitIconButton as d } from "@sheetxl/utils-mui";
12
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
13
- import { Box as ne, FormControl as re, InputAdornment as ie, TextField as ae } from "@mui/material";
14
- var h = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
15
- i.createContext(null).displayName = "HookFormControlContext", h ? i.useLayoutEffect : i.useEffect;
16
- var g = i.createContext(null);
17
- g.displayName = "HookFormContext";
18
- var _ = () => i.useContext(g), v = (e) => {
19
- e.button === 0 && e.preventDefault();
20
- }, y = "20px", b = "4px", x = `calc(${y} + ${b})`, S = o(a((i, a) => {
21
- let { grammar: o = "formula", formName: h, formOptions: g, disabled: x, className: S, sx: oe, onKeyDown: se, onFocus: ce, value: le, onChangeInput: ue, onChangeText: de, onDone: C, changeOn: fe, apiRef: pe, workbook: w, home: T, equals: me, pickAs: he, pickSpills: ge, allowMulti: _e, allowCrossSheet: ve, label: E, labelPlacement: D = "floating", placeholder: O, helperText: k, showError: A = !0, onChangeError: j, validationError: M, hideAdornment: N, classNameInput: P, argument: F, id: ye, ...be } = i, I = r(), L = D === "above", xe = c(), R = ye ?? xe, z = o === "formula", B = E === void 0 ? I(z ? "formulaInput.label" : "rangeInput.label") : E, Se = O ?? I(z ? "formulaInput.placeholder" : "rangeInput.placeholder"), V = _(), H = h && V ? V.register(h, g) : null, U = ee({
22
- value: le,
23
- onChange: ue,
24
- onChangeText: de,
25
- onDone: C,
26
- changeOn: fe,
27
- workbook: w,
28
- home: T,
29
- equals: me,
30
- pickAs: he,
31
- pickSpills: ge,
32
- allowMulti: _e,
33
- allowCrossSheet: ve,
34
- disabled: x
35
- }, o);
36
- l(pe, () => U, [U]);
37
- let W = t({
38
- api: U,
39
- grammar: o,
40
- disabled: x,
41
- workbook: w,
42
- home: T,
43
- argument: F
44
- }), G = !!U.error && !W.inputExpected, K = G || !!M, q = A && K ? I(G ? U.error : M) : k === void 0 ? " " : k, J = u(V);
45
- J.current = V;
46
- let Y = u(j);
47
- Y.current = j;
48
- let X = u(null), Z = G ? U.error : null, Q = u(null);
49
- s(() => {
50
- Z !== Q.current && (Q.current = Z, Y.current?.(Z));
51
- }, [Z]), s(() => {
52
- if (U.error === X.current || (X.current = U.error, !h)) return;
53
- let e = J.current;
54
- e && (U.error ? e.setError(h, { message: U.error }) : e.clearErrors(h));
55
- }, [U.error, h]);
56
- let $ = !!C, Ce = te(() => N ? void 0 : p(ie, {
57
- tabIndex: -1,
58
- onMouseDown: v,
59
- sx: {
60
- display: "flex",
61
- position: "relative",
62
- flex: "0"
63
- },
64
- position: "end",
65
- children: U.engaged && $ ? m(f, { children: [p(d, {
66
- dense: !0,
67
- outlined: !1,
68
- color: "primary",
69
- "aria-label": "commit-reference",
70
- icon: p(n, { iconKey: "CheckSuccess" }),
71
- propsTooltip: {
72
- label: I("referenceInput.commit"),
73
- simple: !0
74
- },
75
- disabled: !!U.error,
76
- tabIndex: -1,
77
- onMouseDown: v,
78
- onClick: () => {
79
- U.commit();
80
- }
81
- }), p(d, {
82
- dense: !0,
83
- outlined: !1,
84
- color: "warning",
85
- "aria-label": "cancel-reference",
86
- icon: p(n, { iconKey: "CloseError" }),
87
- propsTooltip: {
88
- label: I("referenceInput.cancel"),
89
- simple: !0
90
- },
91
- tabIndex: -1,
92
- onMouseDown: v,
93
- onClick: () => {
94
- U.cancel();
95
- }
96
- })] }) : p(d, {
97
- dense: !0,
98
- outlined: !1,
99
- disabled: x || !U.canSelectCurrent,
100
- sx: { "&.Mui-disabled": { opacity: .35 } },
101
- "aria-label": "select-current-range",
102
- icon: p(n, { iconKey: "SelectRangeMode" }),
103
- propsTooltip: {
104
- label: I("referenceInput.selectCurrent"),
105
- simple: !0
106
- },
107
- tabIndex: -1,
108
- onMouseDown: v,
109
- onClick: () => {
110
- U.engaged || U.togglePoint(), U.selectCurrent();
111
- }
112
- })
113
- }), [
114
- N,
115
- x,
116
- $,
117
- U.engaged,
118
- U.canSelectCurrent,
119
- U.togglePoint,
120
- U.selectCurrent,
121
- U.commit,
122
- U.cancel,
123
- !!U.error
124
- ]);
125
- return m(re, {
126
- sx: {
127
- minWidth: 135,
128
- width: "100%",
129
- ...oe
130
- },
131
- size: "small",
132
- ref: (e) => {
133
- W.containerRef.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
134
- },
135
- className: e("sxl-formula-field", S),
136
- "data-grammar": o,
137
- ...be,
138
- children: [
139
- L ? p(ne, {
140
- component: "label",
141
- htmlFor: R,
142
- sx: {
143
- lineHeight: y,
144
- marginBottom: b,
145
- paddingLeft: "14px",
146
- display: "flex",
147
- alignItems: "center",
148
- gap: "4px",
149
- overflow: "hidden",
150
- whiteSpace: "nowrap",
151
- fontSize: "0.8rem",
152
- color: x ? "text.disabled" : "text.primary"
153
- },
154
- children: B
155
- }) : null,
156
- p(ae, {
157
- id: R,
158
- label: L ? void 0 : B,
159
- placeholder: Se,
160
- disabled: x,
161
- error: K,
162
- helperText: q,
163
- sx: { "& .MuiFormHelperText-root": {
164
- marginTop: b,
165
- ...L ? { lineHeight: y } : null
166
- } },
167
- slotProps: {
168
- input: { endAdornment: Ce },
169
- inputLabel: { shrink: !0 },
170
- htmlInput: {
171
- className: P,
172
- spellCheck: !1,
173
- autoComplete: "off",
174
- readOnly: x || U.inputProps.readOnly,
175
- name: h,
176
- sx: {
177
- paddingTop: (e) => e.spacing(L || B == null ? 1 : 1.25),
178
- paddingBottom: (e) => e.spacing(L || B == null ? 1 : .75),
179
- ...W.overlayActive ? {
180
- color: "transparent",
181
- caretColor: (e) => e.palette.text.primary
182
- } : null
183
- },
184
- onSelect: (e) => {
185
- U.inputProps.onSelect(e), W.inputHandlers.onSelect(e);
186
- },
187
- onScroll: W.inputHandlers.onScroll,
188
- onMouseMove: W.inputHandlers.onMouseMove,
189
- onMouseLeave: W.inputHandlers.onMouseLeave,
190
- onDragStart: W.inputHandlers.onDragStart
191
- }
192
- },
193
- value: U.inputProps.value,
194
- inputRef: (e) => {
195
- W.inputElRef.current = e, U.inputProps.ref(e), H?.ref && H.ref(e);
196
- },
197
- onChange: (e) => {
198
- U.inputProps.onChange(e), W.inputHandlers.onSelect(e), H?.onChange(e);
199
- },
200
- onKeyDown: (e) => {
201
- W.handleKeyDown(e) || (U.inputProps.onKeyDown(e), e.defaultPrevented || se?.(e));
202
- },
203
- onPointerDown: W.inputHandlers.onPointerDown,
204
- onMouseDown: U.inputProps.onMouseDown,
205
- onFocus: (e) => {
206
- U.inputProps.onFocus(e), ce?.(e);
207
- },
208
- onBlur: (e) => {
209
- U.inputProps.onBlur(e), H?.onBlur(e);
210
- },
211
- onContextMenu: (e) => {
212
- e.stopPropagation();
213
- }
214
- }),
215
- W.overlayElement,
216
- W.tipElement,
217
- W.hintElement
218
- ]
219
- });
220
- }));
221
- S.displayName = "FormulaField";
222
- export { S as n, _ as r, x as t };
@@ -1,98 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.5
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 { useCallbackRef as t, useTranslator as n } from "@sheetxl/utils-react";
8
- import { memo as e, useCallback as o, useMemo as i, useState as a } from "react";
9
- import { OptionsDialog as l } from "@sheetxl/utils-mui";
10
- import { jsx as s } from "react/jsx-runtime";
11
- import { Box as r, FormControl as p, TextField as c } from "@mui/material";
12
- var u = ["Ok", "Cancel"], m = e((e) => {
13
- const { initialValue: m = null, onInput: d, context: g, onOption: h, onValidateOption: x, onDone: f, options: C = u, defaultOption: O = C?.[0], cancelOption: y = "Cancel", sx: v, ...w } = e, F = n(), T = i(() => {
14
- const t = g?.()?.getComments() ?? null, n = m?.content ?? (t ? t.getRichContent() ?? t.getContent() : null);
15
- if (!n) return "";
16
- if ("string" == typeof n) return n;
17
- let e = "";
18
- const o = n.runs;
19
- for (let t = 0; t < o.length; t++) e += o[t]?.text ?? "";
20
- return e;
21
- }, []), [b, k] = a(T), [D, I] = a(!1), P = o(async (t, n) => null, []), V = t(async (t) => {
22
- const n = "" === b ? [] : b.split("\n"), e = t === y;
23
- e || d?.({ content: n.join("\n") }), h?.(t, e, t === O), f?.();
24
- }, [
25
- b,
26
- d,
27
- f,
28
- h,
29
- O,
30
- y
31
- ]), j = t((t) => {
32
- k(t.target.value), P(t.target.value);
33
- }, [x]), B = t(async (t) => {
34
- let n = await Promise.resolve(x?.(t));
35
- try {
36
- !1 !== n && (n = await P(b, t));
37
- } catch (t) {}
38
- return n ?? !0;
39
- }, [x, b]);
40
- return s(l, {
41
- title: F(T ? "comments.titleEdit" : "comments.titleInsert"),
42
- options: C,
43
- onDone: f,
44
- onOption: (t) => V(t),
45
- onValidateOption: B,
46
- defaultOption: O,
47
- cancelOption: y,
48
- autoFocusSel: ".autoFocus",
49
- sx: {
50
- width: "480px",
51
- ...v
52
- },
53
- ...w,
54
- children: s(r, {
55
- sx: {
56
- paddingTop: (t) => t.spacing(1),
57
- paddingBottom: (t) => t.spacing(0),
58
- rowGap: (t) => t.spacing(1),
59
- display: "flex",
60
- flexDirection: "column"
61
- },
62
- children: s(p, {
63
- sx: {
64
- paddingTop: (t) => t.spacing(1.5),
65
- minWidth: 135,
66
- width: "100%"
67
- },
68
- size: "small",
69
- children: s(c, {
70
- label: F("comments.label"),
71
- placeholder: F("comments.placeholder"),
72
- onFocus: (t) => {
73
- D || t.target?.select(), I(!0);
74
- },
75
- sx: { "& .MuiFormHelperText-root": { marginTop: (t) => t.spacing(.5) } },
76
- slotProps: {
77
- inputLabel: { shrink: !0 },
78
- htmlInput: {
79
- className: "autoFocus",
80
- spellCheck: !1,
81
- autoComplete: "off",
82
- sx: {
83
- paddingTop: (t) => t.spacing(1.25),
84
- paddingBottom: (t) => t.spacing(.75)
85
- }
86
- }
87
- },
88
- value: b,
89
- onChange: j,
90
- onContextMenu: (t) => {
91
- t.stopPropagation();
92
- }
93
- })
94
- })
95
- })
96
- });
97
- });
98
- export { m as CommentsDialog, m as default };
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IComment } from '@sheetxl/sdk';
3
- import { InputDialogProps } from '@sheetxl/utils-mui';
4
- export interface CommentsDialogProps extends InputDialogProps<IComment.Properties> {
5
- }
6
- /**
7
- * PLACEHOLDER for comments editor
8
- */
9
- export declare const CommentsDialog: React.NamedExoticComponent<CommentsDialogProps>;
10
- export default CommentsDialog;
11
- //# sourceMappingURL=CommentsDialog.d.ts.map