@sheetxl/studio-mui 0.8.0-beta.5 → 0.8.0-beta.7
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/{Bi26L7L89ZK_y5Pk.cjs → 2tG9HJLr-WjsOCP3.cjs} +1 -1
- package/browser/cjs/{BGvoJjUs21bbuE1i.cjs → 3RXtLkq7wTAV6y_e.cjs} +1 -1
- package/browser/cjs/4_Zy3pR6YXkzISoK.cjs +1 -0
- package/browser/cjs/{BXkdjAb4jpTr412c.cjs → BD50lsTki7wvzb5g.cjs} +1 -1
- package/browser/cjs/BcBrhEv9acaTxPkO.cjs +13 -0
- package/browser/cjs/ByIUHPOa02D7XbdC.cjs +1 -0
- package/browser/cjs/{eCw4rAEIYE3BftpG.cjs → CkroJ2FmfFvk6Eyv.cjs} +1 -1
- package/browser/cjs/Clzu4HOXk3QSlzUD.cjs +8 -0
- package/browser/cjs/{B9GcCj7sj8XdjPZF.cjs → CzJvR12QCQb-0Rtn.cjs} +1 -1
- package/browser/cjs/{3uprnzi2l0iT17Dg.cjs → D-Yo5aV9STT5KH4G.cjs} +1 -1
- package/browser/cjs/{BHb7TnK1NmimV4OX.cjs → DwkiLFWUtLC8ZcIQ.cjs} +1 -1
- package/browser/cjs/{BQMCM3iFn4MNWAkB.cjs → HuPFsmz7kyZVo3c7.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{GZvjjMyv09_4zahu.mjs → 0Rpk1T56LoSnDrmq.mjs} +2 -2
- package/browser/esm/{C2Ja33FV0pE1u_b4.mjs → 3L04oqyfyjRxhmzg.mjs} +2 -2
- package/browser/esm/7gisHVXYgcPxWH8-.mjs +223 -0
- package/browser/esm/{Ot_3uk9g5RQpAjcQ.mjs → B57WM1X24rsvTF_o.mjs} +1 -1
- package/browser/esm/{ZLszpvKCQ6ZVPKdC.mjs → B7k8enrhC2Rvqhn1.mjs} +3 -3
- package/browser/esm/{C828ANqeXNxG8adc.mjs → BK4OEmeaw-kC-vAN.mjs} +1345 -1307
- package/browser/esm/{0RwF0cH7JQ-VqL4E.mjs → BWAIbfQZ6h5xVLdB.mjs} +1 -1
- package/browser/esm/{26__l2vZsdgD-nJx.mjs → B_PhUn6yySwXt2wo.mjs} +2 -2
- package/browser/esm/{DkuGZXKiwLKsUN_D.mjs → C36WT3I3aIR8y7I6.mjs} +2 -2
- package/browser/esm/{DDYeKYs_XIOjhieg.mjs → CH7ZfljN7ru0Y9Wg.mjs} +2 -2
- package/browser/esm/{aNqEbtO2cALJwwos.mjs → CpTqhDZotYaKGbLl.mjs} +1 -1
- package/browser/esm/{ONmBo80X5eV6cBBI.mjs → D3BwGfI_IEjay0dA.mjs} +1 -1
- package/browser/esm/{DFQo3TQ5Lpt6_Vid.mjs → D7HOLngE_1FYF6y6.mjs} +3 -3
- package/browser/esm/{P8cqCkmugGNd2vkm.mjs → D88iVsgfDG9k-qf_.mjs} +3 -3
- package/browser/esm/{CfwoCDjpHNheDLn1.mjs → DErAKw-lIK3RY8m-.mjs} +1 -1
- package/browser/esm/{bC4EbB4OILhPseb3.mjs → DNhLiDpvz3lAR190.mjs} +2 -2
- package/browser/esm/{DG26kflIdO_PIeNZ.mjs → DR95Rgl8ItgWla8V.mjs} +2 -2
- package/browser/esm/{BDHzwq_DKJi-l3vm.mjs → DvYZOxsaTNeBKuFq.mjs} +98 -97
- package/browser/esm/{DkWV5seJEk7n5n4f.mjs → DyNZEBlugP-x15kP.mjs} +3 -3
- package/browser/esm/{BhUPwPyeqs6QNdfZ.mjs → DzWcb3yuPXS0E4_P.mjs} +3 -3
- package/browser/esm/{DFAzrYRM9N1LhRsL.mjs → WftYXVWvPKx99H0H.mjs} +2 -2
- package/browser/esm/{DzxWYVoWw4-RT-Ia.mjs → eoNyVUe5ZEpHwJ7k.mjs} +1 -1
- package/browser/esm/{FZXipbgDJzTXFMSX.mjs → hFLn30a6N1fEy7fz.mjs} +2225 -1546
- package/browser/esm/index.mjs +56 -56
- package/browser/esm/{D_kD4qmjhElkOeRw.mjs → jkFhDHWwKoyTSSDL.mjs} +1 -1
- package/node/esm/{CAe57GIDt8E3Sj1R.mjs → BTI9exTFHEYzVjw9.mjs} +1 -1
- package/node/esm/{BKpja0BXFbcWlnni.mjs → BbXHuDHRHOW_6Sbs.mjs} +1 -1
- package/node/esm/{6HLpHxyQNZYCN2_o.mjs → BlD3bHo8AAxK7O1j.mjs} +1 -1
- package/node/esm/{DCJNQumUzquqdCpn.mjs → CbpkRpNbQYYOJbxH.mjs} +3 -3
- package/node/esm/{DHVHJBTqBhlJQXpX.mjs → Ccrq9TNkiiSHKw-m.mjs} +1 -1
- package/node/esm/{aAEiFrxe-aYXbogR.mjs → CpteKzMPi39jxmYL.mjs} +1 -1
- package/node/esm/{4HI6dheaskyg9kLm.mjs → Cul_Vgip2OE8yFBQ.mjs} +1 -1
- package/node/esm/{CS307VndSoCLgQ-m.mjs → DA2gosTk8L-FUVI5.mjs} +1171 -1132
- package/node/esm/{BOsZituO28YENQvh.mjs → DP23-d6_VRFro0_D.mjs} +103 -102
- package/node/esm/{B9mtSfhFe3Hjcx9T.mjs → DQtpY5kX99aMHygs.mjs} +1 -1
- package/node/esm/{C4o3AryrtuiHuFLr.mjs → DifZAchLTKOmWpkv.mjs} +1 -1
- package/node/esm/{BT8pKXqqPi8PAXbL.mjs → Dvvg1Yo2e7OGd8sv.mjs} +1 -1
- package/node/esm/{COd_Ly7pt0y62C8c.mjs → YKY4d8_Ckc8nPQqI.mjs} +9 -9
- package/node/esm/index.mjs +3538 -2860
- package/node/esm/{B77SESbao6p6Y4Dy.mjs → lH1iFsECniBRMubb.mjs} +8 -8
- package/node/esm/{oAiHfSODZnkRxiTN.mjs → v0BFuYjhq2G8zDRe.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/ui.msg.json +22 -4
- package/resources/locales/en/ui.msg.json +22 -4
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +6 -0
- package/types/src/comments/CommentCard.d.ts +41 -0
- package/types/src/comments/CommentsPlugin.d.ts +6 -0
- package/types/src/comments/CommentsTaskPane.d.ts +23 -0
- package/types/src/comments/index.d.ts +4 -0
- package/types/src/conditions/BetweenOption.d.ts +5 -0
- package/types/src/conditions/ScalarOption.d.ts +18 -0
- package/types/src/dialog/index.d.ts +0 -1
- package/types/src/filter/FilterList.d.ts +3 -3
- package/types/src/form/FormulaField.d.ts +6 -0
- package/types/src/format/AlignmentPanel.d.ts +1 -2
- package/types/src/format/BorderPreview.d.ts +23 -13
- package/types/src/format/useFormatSelection.d.ts +3 -2
- package/types/src/index.d.ts +1 -0
- package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +1 -2
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +13 -0
- package/types/src/itemsPanel/index.d.ts +1 -0
- package/types/src/studio/StudioCommands.d.ts +2 -2
- package/types/src/studio/StudioProps.d.ts +1 -1
- package/types/src/studio/StudioSplitPane.d.ts +1 -1
- package/types/src/studio/useStudioApp.d.ts +2 -2
- package/types/src/template/useTemplateCatalog.d.ts +5 -5
- package/types/src/workbook/DefaultRenderers.d.ts +3 -1
- package/types/src/workbook/WorkbookElement.d.ts +1 -1
- package/browser/cjs/CucKgy044KxMHXrx.cjs +0 -13
- package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +0 -3
- package/browser/cjs/L0TaaQ9lceHCeg8C.cjs +0 -8
- package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +0 -1
- package/browser/cjs/iFPhqab5w95hHEsT.cjs +0 -1
- package/browser/esm/BkCuNLKQc4KN4Ss4.mjs +0 -97
- package/browser/esm/CMBpd4LN1GYbtCdW.mjs +0 -222
- package/node/esm/r_EDiG9j1gFuHgF9.mjs +0 -98
- 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
|