@thebuoyant-tsdev/mui-ts-library 3.11.0 → 3.11.3
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/README.de.md +21 -0
- package/README.md +21 -0
- package/dist/components/chord-chart/ChordChart.d.ts +1 -1
- package/dist/components/chord-chart/ChordChart.js +155 -137
- package/dist/components/chord-chart/ChordChart.types.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.js +134 -121
- package/dist/components/gantt-chart/GanttTaskDialog.js +131 -126
- package/dist/components/gantt-chart/hooks/useGanttDrag.js +44 -38
- package/dist/components/gantt-chart/util/gantt-chart.util.d.ts +7 -0
- package/dist/components/gantt-chart/util/gantt-chart.util.js +31 -20
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +222 -206
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.types.d.ts +1 -1
- package/dist/components/json-editor/JsonEditorContent.js +134 -119
- package/dist/components/json-editor/JsonEditorToolbar.js +3 -3
- package/dist/components/password-strength-meter/PasswordStrengthMeter.js +131 -130
- package/dist/components/radial-tree-chart/RadialTreeChart.js +197 -186
- package/dist/components/rich-text-editor/RichTextEditor.js +1 -1
- package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +40 -39
- package/dist/components/shared/useTimedFlag.d.ts +6 -0
- package/dist/components/shared/useTimedFlag.js +14 -0
- package/dist/components/sql-editor/SqlEditorHistoryMenu.js +1 -1
- package/dist/components/sql-editor/useSqlQueryHistory.js +14 -12
- package/dist/components/sql-editor/util/sqlQueryHistory.util.d.ts +1 -0
- package/dist/components/sql-editor/util/sqlQueryHistory.util.js +21 -13
- package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
- package/dist/components/sunburst-chart/SunburstChart.js +126 -115
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +7 -5
- package/dist/index.cjs +2 -2
- package/dist/index.js +7 -7
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@ export type HorizontalTreeChartProps = {
|
|
|
70
70
|
showIcons?: boolean;
|
|
71
71
|
/** Per-depth color palette — falls back to MUI theme palette */
|
|
72
72
|
chartColors?: string[];
|
|
73
|
-
/** Link stroke opacity (default:
|
|
73
|
+
/** Link stroke opacity (default: 1) */
|
|
74
74
|
linkStrokeOpacity?: number;
|
|
75
75
|
/** Link stroke width in px (default: 1.5) */
|
|
76
76
|
linkStrokeWidth?: number;
|
|
@@ -2,71 +2,80 @@ import { computeJsonPath as e } from "./util/jsonPathFinder.js";
|
|
|
2
2
|
import { findRangeForPath as t, validateAgainstSchema as n } from "./util/jsonSchemaValidator.js";
|
|
3
3
|
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
4
4
|
import { Box as o, Fade as s, Paper as c, Typography as ee, useTheme as te } from "@mui/material";
|
|
5
|
-
import { EditorView as l, highlightActiveLine as ne, highlightActiveLineGutter as
|
|
6
|
-
import { Compartment as
|
|
7
|
-
import { json as
|
|
8
|
-
import { defaultKeymap as
|
|
9
|
-
import { HighlightStyle as
|
|
10
|
-
import { forceLinting as
|
|
11
|
-
import { tags as
|
|
12
|
-
import { showMinimap as
|
|
13
|
-
import { jsx as
|
|
5
|
+
import { EditorView as l, highlightActiveLine as ne, highlightActiveLineGutter as u, keymap as re, lineNumbers as d, placeholder as f } from "@codemirror/view";
|
|
6
|
+
import { Compartment as p, EditorState as m } from "@codemirror/state";
|
|
7
|
+
import { json as ie, jsonParseLinter as ae } from "@codemirror/lang-json";
|
|
8
|
+
import { defaultKeymap as oe, history as se, historyKeymap as ce } from "@codemirror/commands";
|
|
9
|
+
import { HighlightStyle as le, foldGutter as h, foldKeymap as ue, syntaxHighlighting as de } from "@codemirror/language";
|
|
10
|
+
import { forceLinting as fe, lintGutter as pe, linter as g } from "@codemirror/lint";
|
|
11
|
+
import { tags as _ } from "@lezer/highlight";
|
|
12
|
+
import { showMinimap as me } from "@replit/codemirror-minimap";
|
|
13
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/json-editor/JsonEditorContent.tsx
|
|
15
|
-
function
|
|
16
|
-
|
|
15
|
+
function b(e) {
|
|
16
|
+
return e ? [d(), u()] : [];
|
|
17
|
+
}
|
|
18
|
+
function x(e) {
|
|
19
|
+
return e ? [h()] : [];
|
|
20
|
+
}
|
|
21
|
+
function S(e) {
|
|
22
|
+
return e ? [f(e)] : [];
|
|
23
|
+
}
|
|
24
|
+
function C({ value: u, onChange: d, placeholder: f, disabled: h = !1, readonly: C = !1, schema: w, showLineNumbers: T = !0, showMinimap: E = !1, showFolding: D = !0, enablePathFinder: O = !0, highlightColors: k, onViewReady: A, onCursorChange: j, onBlur: M, onFocus: N, onPathCopy: P }) {
|
|
25
|
+
let F = i(null), I = i(null), L = i(null), R = i(d), z = i(j), he = i(M), B = i(N), V = i(A), H = i(P), U = i(O), W = i(w), [G, K] = a(null), q = i(new p()), J = i(new p()), Y = i(new p()), X = i(new p()), Z = i(new p()), Q = te(), $ = Q.palette.mode === "dark", ge = k?.propertyName ?? Q.palette.primary.main, _e = k?.string ?? Q.palette.success.main, ve = k?.number ?? Q.palette.warning.main, ye = k?.boolean ?? Q.palette.info.main, be = k?.null ?? Q.palette.text.secondary;
|
|
17
26
|
return r(() => {
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
|
|
21
|
-
}, [O]), r(() => {
|
|
22
|
-
L.current = k;
|
|
23
|
-
}, [k]), r(() => {
|
|
24
|
-
R.current = A;
|
|
25
|
-
}, [A]), r(() => {
|
|
26
|
-
z.current = D;
|
|
27
|
-
}, [D]), r(() => {
|
|
28
|
-
B.current = j;
|
|
27
|
+
R.current = d;
|
|
28
|
+
}, [d]), r(() => {
|
|
29
|
+
z.current = j;
|
|
29
30
|
}, [j]), r(() => {
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
he.current = M;
|
|
32
|
+
}, [M]), r(() => {
|
|
33
|
+
B.current = N;
|
|
34
|
+
}, [N]), r(() => {
|
|
35
|
+
V.current = A;
|
|
36
|
+
}, [A]), r(() => {
|
|
37
|
+
H.current = P;
|
|
38
|
+
}, [P]), r(() => {
|
|
39
|
+
U.current = O;
|
|
40
|
+
}, [O]), r(() => {
|
|
41
|
+
W.current = w, L.current && fe(L.current);
|
|
42
|
+
}, [w]), r(() => {
|
|
43
|
+
if (!I.current) return;
|
|
44
|
+
let r = L.current?.state.doc.toString() ?? u ?? "", i = le.define([
|
|
36
45
|
{
|
|
37
|
-
tag:
|
|
38
|
-
color:
|
|
46
|
+
tag: _.propertyName,
|
|
47
|
+
color: ge,
|
|
39
48
|
fontWeight: "bold"
|
|
40
49
|
},
|
|
41
50
|
{
|
|
42
|
-
tag:
|
|
43
|
-
color:
|
|
51
|
+
tag: _.string,
|
|
52
|
+
color: _e
|
|
44
53
|
},
|
|
45
54
|
{
|
|
46
|
-
tag:
|
|
47
|
-
color:
|
|
55
|
+
tag: _.number,
|
|
56
|
+
color: ve
|
|
48
57
|
},
|
|
49
58
|
{
|
|
50
|
-
tag:
|
|
51
|
-
color:
|
|
59
|
+
tag: _.bool,
|
|
60
|
+
color: ye,
|
|
52
61
|
fontWeight: "bold"
|
|
53
62
|
},
|
|
54
63
|
{
|
|
55
|
-
tag:
|
|
56
|
-
color:
|
|
64
|
+
tag: _.null,
|
|
65
|
+
color: be,
|
|
57
66
|
fontStyle: "italic"
|
|
58
67
|
},
|
|
59
68
|
{
|
|
60
|
-
tag:
|
|
61
|
-
color:
|
|
69
|
+
tag: _.bracket,
|
|
70
|
+
color: Q.palette.text.secondary
|
|
62
71
|
},
|
|
63
72
|
{
|
|
64
|
-
tag:
|
|
65
|
-
color:
|
|
73
|
+
tag: _.punctuation,
|
|
74
|
+
color: Q.palette.text.disabled
|
|
66
75
|
},
|
|
67
76
|
{
|
|
68
|
-
tag:
|
|
69
|
-
color:
|
|
77
|
+
tag: _.invalid,
|
|
78
|
+
color: Q.palette.error.main,
|
|
70
79
|
textDecoration: "underline wavy"
|
|
71
80
|
}
|
|
72
81
|
]), a = l.theme({
|
|
@@ -78,63 +87,63 @@ function _({ value: _, onChange: v, placeholder: y, disabled: b = !1, readonly:
|
|
|
78
87
|
".cm-scroller": { overflow: "auto" },
|
|
79
88
|
".cm-content": {
|
|
80
89
|
padding: "8px 4px",
|
|
81
|
-
caretColor:
|
|
90
|
+
caretColor: Q.palette.text.primary
|
|
82
91
|
},
|
|
83
92
|
".cm-gutters": {
|
|
84
|
-
backgroundColor:
|
|
85
|
-
color:
|
|
93
|
+
backgroundColor: $ ? Q.palette.grey[900] : Q.palette.grey[50],
|
|
94
|
+
color: Q.palette.text.disabled,
|
|
86
95
|
border: "none",
|
|
87
|
-
borderRight: `1px solid ${
|
|
96
|
+
borderRight: `1px solid ${Q.palette.divider}`
|
|
88
97
|
},
|
|
89
98
|
".cm-lineNumbers .cm-gutterElement": {
|
|
90
99
|
paddingLeft: "4px",
|
|
91
100
|
paddingRight: "8px"
|
|
92
101
|
},
|
|
93
|
-
".cm-activeLineGutter": { backgroundColor:
|
|
94
|
-
".cm-activeLine": { backgroundColor:
|
|
95
|
-
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor:
|
|
96
|
-
".cm-cursor, .cm-dropCursor": { borderLeftColor:
|
|
102
|
+
".cm-activeLineGutter": { backgroundColor: Q.palette.action.selected },
|
|
103
|
+
".cm-activeLine": { backgroundColor: Q.palette.action.hover },
|
|
104
|
+
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: Q.palette.primary.main + "40" },
|
|
105
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: Q.palette.text.primary },
|
|
97
106
|
"&.cm-focused": { outline: "none" },
|
|
98
107
|
".cm-placeholder": {
|
|
99
|
-
color:
|
|
108
|
+
color: Q.palette.text.disabled,
|
|
100
109
|
fontStyle: "italic"
|
|
101
110
|
},
|
|
102
111
|
".cm-gutter-lint": { width: "16px" },
|
|
103
|
-
".cm-lint-marker-error": { color:
|
|
104
|
-
".cm-lint-marker-warning": { color:
|
|
112
|
+
".cm-lint-marker-error": { color: Q.palette.error.main },
|
|
113
|
+
".cm-lint-marker-warning": { color: Q.palette.warning.main },
|
|
105
114
|
".cm-foldGutter .cm-gutterElement": {
|
|
106
115
|
cursor: "pointer",
|
|
107
|
-
color:
|
|
116
|
+
color: Q.palette.text.disabled
|
|
108
117
|
},
|
|
109
118
|
".cm-foldPlaceholder": {
|
|
110
|
-
backgroundColor:
|
|
111
|
-
border: `1px solid ${
|
|
119
|
+
backgroundColor: Q.palette.action.selected,
|
|
120
|
+
border: `1px solid ${Q.palette.divider}`,
|
|
112
121
|
borderRadius: "3px",
|
|
113
|
-
color:
|
|
122
|
+
color: Q.palette.text.secondary,
|
|
114
123
|
padding: "0 4px"
|
|
115
124
|
},
|
|
116
125
|
".cm-tooltip.cm-tooltip-lint": {
|
|
117
|
-
backgroundColor:
|
|
118
|
-
border: `1px solid ${
|
|
126
|
+
backgroundColor: Q.palette.background.paper,
|
|
127
|
+
border: `1px solid ${Q.palette.divider}`,
|
|
119
128
|
borderRadius: "4px"
|
|
120
129
|
},
|
|
121
|
-
".cm-diagnostic-error": { borderLeft: `3px solid ${
|
|
122
|
-
".cm-diagnostic-warning": { borderLeft: `3px solid ${
|
|
123
|
-
}, { dark:
|
|
130
|
+
".cm-diagnostic-error": { borderLeft: `3px solid ${Q.palette.error.main}` },
|
|
131
|
+
".cm-diagnostic-warning": { borderLeft: `3px solid ${Q.palette.warning.main}` }
|
|
132
|
+
}, { dark: $ }), o = E ? [me.of({
|
|
124
133
|
create: () => {
|
|
125
134
|
let e = document.createElement("div");
|
|
126
|
-
return e.style.width = "80px", e.style.overflow = "hidden", e.style.borderLeft = `1px solid ${
|
|
135
|
+
return e.style.width = "80px", e.style.overflow = "hidden", e.style.borderLeft = `1px solid ${Q.palette.divider}`, e.style.backgroundColor = $ ? Q.palette.grey[900] : Q.palette.grey[50], { dom: e };
|
|
127
136
|
},
|
|
128
137
|
displayText: "blocks",
|
|
129
138
|
showOverlay: "always"
|
|
130
139
|
})] : [], s = [
|
|
131
140
|
a,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
let r =
|
|
141
|
+
de(i),
|
|
142
|
+
ie(),
|
|
143
|
+
pe(),
|
|
144
|
+
g(ae()),
|
|
145
|
+
g((e) => {
|
|
146
|
+
let r = W.current;
|
|
138
147
|
if (!r) return [];
|
|
139
148
|
let i;
|
|
140
149
|
try {
|
|
@@ -154,33 +163,33 @@ function _({ value: _, onChange: v, placeholder: y, disabled: b = !1, readonly:
|
|
|
154
163
|
}
|
|
155
164
|
return a;
|
|
156
165
|
}),
|
|
157
|
-
|
|
158
|
-
|
|
166
|
+
se(),
|
|
167
|
+
re.of([
|
|
168
|
+
...oe,
|
|
159
169
|
...ce,
|
|
160
|
-
...ue
|
|
161
|
-
...pe
|
|
170
|
+
...ue
|
|
162
171
|
]),
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
q.current.of(l.editable.of(!h && !C)),
|
|
173
|
+
J.current.of(m.readOnly.of(C)),
|
|
165
174
|
ne(),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
175
|
+
X.current.of(b(T)),
|
|
176
|
+
Y.current.of(x(D)),
|
|
177
|
+
Z.current.of(S(f)),
|
|
169
178
|
...o,
|
|
170
179
|
l.updateListener.of((e) => {
|
|
171
|
-
e.docChanged &&
|
|
180
|
+
e.docChanged && R.current?.(e.state.doc.toString());
|
|
172
181
|
let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
|
|
173
|
-
|
|
182
|
+
z.current(n.number, t - n.from + 1);
|
|
174
183
|
}),
|
|
175
184
|
l.domEventHandlers({
|
|
176
185
|
blur: () => {
|
|
177
|
-
|
|
186
|
+
he.current?.();
|
|
178
187
|
},
|
|
179
188
|
focus: () => {
|
|
180
|
-
|
|
189
|
+
B.current?.();
|
|
181
190
|
},
|
|
182
191
|
click: (t, n) => {
|
|
183
|
-
if (!
|
|
192
|
+
if (!U.current || !(t.ctrlKey || t.metaKey)) return !1;
|
|
184
193
|
let r;
|
|
185
194
|
try {
|
|
186
195
|
r = n.posAtCoords({
|
|
@@ -193,79 +202,85 @@ function _({ value: _, onChange: v, placeholder: y, disabled: b = !1, readonly:
|
|
|
193
202
|
if (r === null) return !1;
|
|
194
203
|
let i = e(n.state, r);
|
|
195
204
|
return i ? (navigator.clipboard.writeText(i).then(() => {
|
|
196
|
-
let e =
|
|
197
|
-
|
|
205
|
+
let e = F.current?.getBoundingClientRect();
|
|
206
|
+
K({
|
|
198
207
|
x: t.clientX - (e?.left ?? 0),
|
|
199
208
|
y: t.clientY - (e?.top ?? 0),
|
|
200
209
|
path: i
|
|
201
|
-
}),
|
|
210
|
+
}), H.current?.(i);
|
|
202
211
|
}), !0) : !1;
|
|
203
212
|
}
|
|
204
213
|
})
|
|
205
214
|
], c = new l({
|
|
206
|
-
state:
|
|
215
|
+
state: m.create({
|
|
207
216
|
doc: r,
|
|
208
217
|
extensions: s
|
|
209
218
|
}),
|
|
210
|
-
parent:
|
|
219
|
+
parent: I.current
|
|
211
220
|
});
|
|
212
|
-
return
|
|
213
|
-
|
|
221
|
+
return L.current = c, V.current(c), () => {
|
|
222
|
+
V.current(null), c.destroy(), L.current = null;
|
|
214
223
|
};
|
|
215
224
|
}, [
|
|
216
|
-
J,
|
|
217
|
-
Y,
|
|
218
|
-
X,
|
|
219
|
-
Z,
|
|
220
|
-
Q,
|
|
221
225
|
$,
|
|
222
|
-
|
|
226
|
+
ge,
|
|
227
|
+
_e,
|
|
228
|
+
ve,
|
|
229
|
+
ye,
|
|
230
|
+
be,
|
|
231
|
+
E
|
|
223
232
|
]), r(() => {
|
|
224
|
-
let e =
|
|
233
|
+
let e = L.current;
|
|
225
234
|
if (!e) return;
|
|
226
235
|
let t = e.state.doc.toString();
|
|
227
|
-
t !== (
|
|
236
|
+
t !== (u ?? "") && e.dispatch({ changes: {
|
|
228
237
|
from: 0,
|
|
229
238
|
to: t.length,
|
|
230
|
-
insert:
|
|
239
|
+
insert: u ?? ""
|
|
231
240
|
} });
|
|
232
|
-
}, [
|
|
233
|
-
|
|
234
|
-
}, [
|
|
235
|
-
|
|
236
|
-
|
|
241
|
+
}, [u]), r(() => {
|
|
242
|
+
L.current?.dispatch({ effects: [q.current.reconfigure(l.editable.of(!h && !C)), J.current.reconfigure(m.readOnly.of(C))] });
|
|
243
|
+
}, [h, C]), r(() => {
|
|
244
|
+
L.current?.dispatch({ effects: X.current.reconfigure(b(T)) });
|
|
245
|
+
}, [T]), r(() => {
|
|
246
|
+
L.current?.dispatch({ effects: Y.current.reconfigure(x(D)) });
|
|
247
|
+
}, [D]), r(() => {
|
|
248
|
+
L.current?.dispatch({ effects: Z.current.reconfigure(S(f)) });
|
|
249
|
+
}, [f]), r(() => {
|
|
250
|
+
if (!G) return;
|
|
251
|
+
let e = setTimeout(() => K(null), 1500);
|
|
237
252
|
return () => clearTimeout(e);
|
|
238
|
-
}, [
|
|
239
|
-
ref:
|
|
253
|
+
}, [G]), /* @__PURE__ */ y(o, {
|
|
254
|
+
ref: F,
|
|
240
255
|
sx: {
|
|
241
256
|
position: "relative",
|
|
242
257
|
flex: 1,
|
|
243
258
|
overflow: "hidden",
|
|
244
259
|
display: "flex"
|
|
245
260
|
},
|
|
246
|
-
children: [/* @__PURE__ */
|
|
247
|
-
ref:
|
|
261
|
+
children: [/* @__PURE__ */ v(o, {
|
|
262
|
+
ref: I,
|
|
248
263
|
sx: {
|
|
249
264
|
flex: 1,
|
|
250
265
|
overflow: "hidden",
|
|
251
266
|
display: "flex",
|
|
252
267
|
flexDirection: "column",
|
|
253
|
-
opacity:
|
|
254
|
-
backgroundColor:
|
|
268
|
+
opacity: h ? .5 : 1,
|
|
269
|
+
backgroundColor: Q.palette.background.paper,
|
|
255
270
|
"& .cm-editor": {
|
|
256
271
|
flex: 1,
|
|
257
272
|
display: "flex",
|
|
258
273
|
flexDirection: "column"
|
|
259
274
|
}
|
|
260
275
|
}
|
|
261
|
-
}),
|
|
276
|
+
}), G && /* @__PURE__ */ v(s, {
|
|
262
277
|
in: !0,
|
|
263
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ v(c, {
|
|
264
279
|
elevation: 3,
|
|
265
280
|
sx: {
|
|
266
281
|
position: "absolute",
|
|
267
|
-
left:
|
|
268
|
-
top:
|
|
282
|
+
left: G.x,
|
|
283
|
+
top: G.y,
|
|
269
284
|
transform: "translate(-50%, -130%)",
|
|
270
285
|
px: 1,
|
|
271
286
|
py: .5,
|
|
@@ -274,14 +289,14 @@ function _({ value: _, onChange: v, placeholder: y, disabled: b = !1, readonly:
|
|
|
274
289
|
bgcolor: "grey.900",
|
|
275
290
|
color: "common.white"
|
|
276
291
|
},
|
|
277
|
-
children: /* @__PURE__ */
|
|
292
|
+
children: /* @__PURE__ */ y(ee, {
|
|
278
293
|
variant: "caption",
|
|
279
294
|
sx: { fontFamily: "monospace" },
|
|
280
|
-
children: ["Copied: ",
|
|
295
|
+
children: ["Copied: ", G.path]
|
|
281
296
|
})
|
|
282
297
|
})
|
|
283
298
|
})]
|
|
284
299
|
});
|
|
285
300
|
}
|
|
286
301
|
//#endregion
|
|
287
|
-
export {
|
|
302
|
+
export { C as JsonEditorContent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToolbarButton as e } from "../shared/ToolbarButton.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useTimedFlag as t } from "../shared/useTimedFlag.js";
|
|
3
3
|
import { Box as n, Divider as r } from "@mui/material";
|
|
4
4
|
import { redo as i, undo as a } from "@codemirror/commands";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
@@ -12,7 +12,7 @@ import p from "@mui/icons-material/AutoFixHigh";
|
|
|
12
12
|
import m from "@mui/icons-material/Compress";
|
|
13
13
|
//#region src/components/json-editor/JsonEditorToolbar.tsx
|
|
14
14
|
function h({ editorView: h, toolbarConfig: g, translation: _, indent: v, disabled: y }) {
|
|
15
|
-
let [b, x] = t(
|
|
15
|
+
let [b, x] = t(), S = y || !h;
|
|
16
16
|
function C() {
|
|
17
17
|
let e = h;
|
|
18
18
|
if (!e) return;
|
|
@@ -44,7 +44,7 @@ function h({ editorView: h, toolbarConfig: g, translation: _, indent: v, disable
|
|
|
44
44
|
function T() {
|
|
45
45
|
let e = h?.state.doc.toString() ?? "";
|
|
46
46
|
navigator.clipboard.writeText(e).then(() => {
|
|
47
|
-
x(
|
|
47
|
+
x();
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
function E() {
|