@thebuoyant-tsdev/mui-ts-library 1.4.0 → 2.0.0
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 +12 -7
- package/README.md +12 -7
- package/dist/components/confirm-dialog/ConfirmDialog.types.d.ts +2 -0
- package/dist/components/gantt-chart/GanttChart.types.d.ts +1 -0
- package/dist/components/gantt-chart/GanttTimelineHeader.d.ts +5 -1
- package/dist/components/json-editor/JsonEditor.d.ts +1 -1
- package/dist/components/json-editor/JsonEditor.types.d.ts +2 -0
- package/dist/components/json-editor/JsonEditorContent.d.ts +2 -1
- package/dist/components/password-strength-meter/PasswordStrengthBar.d.ts +3 -1
- package/dist/components/password-strength-meter/PasswordStrengthMeter.d.ts +1 -1
- package/dist/components/password-strength-meter/PasswordStrengthMeter.types.d.ts +12 -0
- package/dist/components/sql-editor/SqlEditorContent.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +713 -586
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -6,12 +6,13 @@ import B from "@mui/icons-material/ErrorOutlined";
|
|
|
6
6
|
import V from "@mui/icons-material/CheckCircleOutlined";
|
|
7
7
|
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
8
8
|
import { EditorView as G, highlightActiveLine as K, highlightActiveLineGutter as q, keymap as J, lineNumbers as ee, placeholder as te } from "@codemirror/view";
|
|
9
|
-
import { Compartment as ne, EditorState as
|
|
10
|
-
import { json as
|
|
11
|
-
import { defaultKeymap as
|
|
12
|
-
import { HighlightStyle as
|
|
13
|
-
import { lintGutter as
|
|
14
|
-
import { tags as
|
|
9
|
+
import { Compartment as ne, EditorState as Y } from "@codemirror/state";
|
|
10
|
+
import { json as re, jsonParseLinter as ie } from "@codemirror/lang-json";
|
|
11
|
+
import { defaultKeymap as ae, history as oe, historyKeymap as se, redo as ce, undo as le } from "@codemirror/commands";
|
|
12
|
+
import { HighlightStyle as ue, syntaxHighlighting as de } from "@codemirror/language";
|
|
13
|
+
import { lintGutter as fe, linter as pe } from "@codemirror/lint";
|
|
14
|
+
import { tags as X } from "@lezer/highlight";
|
|
15
|
+
import { showMinimap as me } from "@replit/codemirror-minimap";
|
|
15
16
|
import he from "@mui/icons-material/ContentCopy";
|
|
16
17
|
import ge from "@mui/icons-material/Check";
|
|
17
18
|
import _e from "@mui/icons-material/Delete";
|
|
@@ -76,17 +77,35 @@ var _t = {
|
|
|
76
77
|
error: "error",
|
|
77
78
|
success: "success"
|
|
78
79
|
};
|
|
79
|
-
function bt({ open: e, options: t, translation: n, onConfirm:
|
|
80
|
-
let { title:
|
|
80
|
+
function bt({ open: e, options: t, translation: n, onConfirm: i, onCancel: a }) {
|
|
81
|
+
let { title: o, description: c, confirmLabel: l, cancelLabel: d, countdown: f, severity: g = "info", hideCancelButton: y = !1, maxWidth: b = "xs", showIcon: x = !0 } = t, S = x ? vt[g] : null, C = yt[g], w = l ?? n.confirmLabel, T = d ?? n.cancelLabel, [E, D] = s(null);
|
|
82
|
+
r(() => {
|
|
83
|
+
if (!e || !f || f <= 0) {
|
|
84
|
+
D(null);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
D(f);
|
|
88
|
+
let t = setInterval(() => {
|
|
89
|
+
D((e) => e === null || e <= 1 ? (clearInterval(t), 0) : e - 1);
|
|
90
|
+
}, 1e3);
|
|
91
|
+
return () => clearInterval(t);
|
|
92
|
+
}, [e, f]), r(() => {
|
|
93
|
+
E === 0 && i();
|
|
94
|
+
}, [E]);
|
|
95
|
+
function O(e) {
|
|
96
|
+
e.key === "Enter" && (e.preventDefault(), i());
|
|
97
|
+
}
|
|
98
|
+
let k = E !== null && E > 0 ? `${w} (${E})` : w;
|
|
81
99
|
return /* @__PURE__ */ W(p, {
|
|
82
100
|
open: e,
|
|
83
|
-
onClose:
|
|
84
|
-
|
|
101
|
+
onClose: a,
|
|
102
|
+
onKeyDown: O,
|
|
103
|
+
maxWidth: b,
|
|
85
104
|
fullWidth: !0,
|
|
86
|
-
"aria-labelledby":
|
|
87
|
-
"aria-describedby":
|
|
105
|
+
"aria-labelledby": o ? "confirm-dialog-title" : void 0,
|
|
106
|
+
"aria-describedby": c ? "confirm-dialog-description" : void 0,
|
|
88
107
|
children: [
|
|
89
|
-
|
|
108
|
+
o && /* @__PURE__ */ W(_, {
|
|
90
109
|
id: "confirm-dialog-title",
|
|
91
110
|
"data-testid": "confirm-dialog-title",
|
|
92
111
|
sx: {
|
|
@@ -94,22 +113,22 @@ function bt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i })
|
|
|
94
113
|
alignItems: "center",
|
|
95
114
|
gap: 1
|
|
96
115
|
},
|
|
97
|
-
children: [
|
|
98
|
-
color:
|
|
116
|
+
children: [S && /* @__PURE__ */ U(S, {
|
|
117
|
+
color: g,
|
|
99
118
|
"data-testid": "confirm-dialog-icon",
|
|
100
119
|
fontSize: "small"
|
|
101
|
-
}),
|
|
120
|
+
}), o]
|
|
102
121
|
}),
|
|
103
|
-
|
|
122
|
+
c && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(v, {}), /* @__PURE__ */ U(h, { children: typeof c == "string" ? /* @__PURE__ */ U(I, {
|
|
104
123
|
id: "confirm-dialog-description",
|
|
105
124
|
"data-testid": "confirm-dialog-description",
|
|
106
125
|
variant: "body2",
|
|
107
126
|
color: "text.secondary",
|
|
108
|
-
children:
|
|
127
|
+
children: c
|
|
109
128
|
}) : /* @__PURE__ */ U("div", {
|
|
110
129
|
id: "confirm-dialog-description",
|
|
111
130
|
"data-testid": "confirm-dialog-description",
|
|
112
|
-
children:
|
|
131
|
+
children: c
|
|
113
132
|
}) })] }),
|
|
114
133
|
/* @__PURE__ */ U(v, {}),
|
|
115
134
|
/* @__PURE__ */ W(m, {
|
|
@@ -117,18 +136,18 @@ function bt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i })
|
|
|
117
136
|
px: 2,
|
|
118
137
|
py: 1.5
|
|
119
138
|
},
|
|
120
|
-
children: [!
|
|
139
|
+
children: [!y && /* @__PURE__ */ U(u, {
|
|
121
140
|
"data-testid": "confirm-dialog-cancel-btn",
|
|
122
|
-
onClick:
|
|
141
|
+
onClick: a,
|
|
123
142
|
color: "inherit",
|
|
124
|
-
children:
|
|
143
|
+
children: T
|
|
125
144
|
}), /* @__PURE__ */ U(u, {
|
|
126
145
|
"data-testid": "confirm-dialog-confirm-btn",
|
|
127
|
-
onClick:
|
|
128
|
-
color:
|
|
146
|
+
onClick: i,
|
|
147
|
+
color: C,
|
|
129
148
|
variant: "contained",
|
|
130
149
|
autoFocus: !0,
|
|
131
|
-
children:
|
|
150
|
+
children: k
|
|
132
151
|
})]
|
|
133
152
|
})
|
|
134
153
|
]
|
|
@@ -194,142 +213,151 @@ var wt = {
|
|
|
194
213
|
};
|
|
195
214
|
//#endregion
|
|
196
215
|
//#region src/components/json-editor/JsonEditorContent.tsx
|
|
197
|
-
function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0,
|
|
198
|
-
let
|
|
216
|
+
function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, showMinimap: c = !1, highlightColors: u, onViewReady: d, onCursorChange: f, onBlur: p, onFocus: m }) {
|
|
217
|
+
let h = o(null), g = o(null), _ = o(t), v = o(f), y = o(p), b = o(m), x = o(d), S = o(new ne()), C = o(new ne()), w = L(), T = w.palette.mode === "dark", E = u?.propertyName ?? w.palette.primary.main, D = u?.string ?? w.palette.success.main, O = u?.number ?? w.palette.warning.main, k = u?.boolean ?? w.palette.info.main, A = u?.null ?? w.palette.text.secondary;
|
|
199
218
|
return r(() => {
|
|
200
|
-
|
|
219
|
+
_.current = t;
|
|
201
220
|
}, [t]), r(() => {
|
|
202
|
-
_.current = d;
|
|
203
|
-
}, [d]), r(() => {
|
|
204
221
|
v.current = f;
|
|
205
222
|
}, [f]), r(() => {
|
|
206
223
|
y.current = p;
|
|
207
224
|
}, [p]), r(() => {
|
|
208
|
-
b.current =
|
|
209
|
-
}, [
|
|
210
|
-
|
|
211
|
-
|
|
225
|
+
b.current = m;
|
|
226
|
+
}, [m]), r(() => {
|
|
227
|
+
x.current = d;
|
|
228
|
+
}, [d]), r(() => {
|
|
229
|
+
if (!h.current) return;
|
|
230
|
+
let t = g.current?.state.doc.toString() ?? e ?? "", r = ue.define([
|
|
212
231
|
{
|
|
213
|
-
tag:
|
|
214
|
-
color:
|
|
232
|
+
tag: X.propertyName,
|
|
233
|
+
color: E,
|
|
215
234
|
fontWeight: "bold"
|
|
216
235
|
},
|
|
217
236
|
{
|
|
218
|
-
tag:
|
|
219
|
-
color:
|
|
237
|
+
tag: X.string,
|
|
238
|
+
color: D
|
|
220
239
|
},
|
|
221
240
|
{
|
|
222
|
-
tag:
|
|
223
|
-
color:
|
|
241
|
+
tag: X.number,
|
|
242
|
+
color: O
|
|
224
243
|
},
|
|
225
244
|
{
|
|
226
|
-
tag:
|
|
227
|
-
color:
|
|
245
|
+
tag: X.bool,
|
|
246
|
+
color: k,
|
|
228
247
|
fontWeight: "bold"
|
|
229
248
|
},
|
|
230
249
|
{
|
|
231
|
-
tag:
|
|
232
|
-
color:
|
|
250
|
+
tag: X.null,
|
|
251
|
+
color: A,
|
|
233
252
|
fontStyle: "italic"
|
|
234
253
|
},
|
|
235
254
|
{
|
|
236
|
-
tag:
|
|
237
|
-
color:
|
|
255
|
+
tag: X.bracket,
|
|
256
|
+
color: w.palette.text.secondary
|
|
238
257
|
},
|
|
239
258
|
{
|
|
240
|
-
tag:
|
|
241
|
-
color:
|
|
259
|
+
tag: X.punctuation,
|
|
260
|
+
color: w.palette.text.disabled
|
|
242
261
|
},
|
|
243
262
|
{
|
|
244
|
-
tag:
|
|
245
|
-
color:
|
|
263
|
+
tag: X.invalid,
|
|
264
|
+
color: w.palette.error.main,
|
|
246
265
|
textDecoration: "underline wavy"
|
|
247
266
|
}
|
|
248
|
-
]), o =
|
|
249
|
-
|
|
250
|
-
"
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
"
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
267
|
+
]), o = G.theme({
|
|
268
|
+
"&": {
|
|
269
|
+
height: "100%",
|
|
270
|
+
fontFamily: "'Fira Code', 'JetBrains Mono', 'Consolas', monospace",
|
|
271
|
+
fontSize: "0.875rem"
|
|
272
|
+
},
|
|
273
|
+
".cm-scroller": { overflow: "auto" },
|
|
274
|
+
".cm-content": {
|
|
275
|
+
padding: "8px 4px",
|
|
276
|
+
caretColor: w.palette.text.primary
|
|
277
|
+
},
|
|
278
|
+
".cm-gutters": {
|
|
279
|
+
backgroundColor: T ? w.palette.grey[900] : w.palette.grey[50],
|
|
280
|
+
color: w.palette.text.disabled,
|
|
281
|
+
border: "none",
|
|
282
|
+
borderRight: `1px solid ${w.palette.divider}`
|
|
283
|
+
},
|
|
284
|
+
".cm-lineNumbers .cm-gutterElement": {
|
|
285
|
+
paddingLeft: "4px",
|
|
286
|
+
paddingRight: "8px"
|
|
287
|
+
},
|
|
288
|
+
".cm-activeLineGutter": { backgroundColor: w.palette.action.selected },
|
|
289
|
+
".cm-activeLine": { backgroundColor: w.palette.action.hover },
|
|
290
|
+
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: w.palette.primary.main + "40" },
|
|
291
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: w.palette.text.primary },
|
|
292
|
+
"&.cm-focused": { outline: "none" },
|
|
293
|
+
".cm-placeholder": {
|
|
294
|
+
color: w.palette.text.disabled,
|
|
295
|
+
fontStyle: "italic"
|
|
296
|
+
},
|
|
297
|
+
".cm-gutter-lint": { width: "16px" },
|
|
298
|
+
".cm-lint-marker-error": { color: w.palette.error.main },
|
|
299
|
+
".cm-lint-marker-warning": { color: w.palette.warning.main },
|
|
300
|
+
".cm-tooltip.cm-tooltip-lint": {
|
|
301
|
+
backgroundColor: w.palette.background.paper,
|
|
302
|
+
border: `1px solid ${w.palette.divider}`,
|
|
303
|
+
borderRadius: "4px"
|
|
304
|
+
},
|
|
305
|
+
".cm-diagnostic-error": { borderLeft: `3px solid ${w.palette.error.main}` },
|
|
306
|
+
".cm-diagnostic-warning": { borderLeft: `3px solid ${w.palette.warning.main}` }
|
|
307
|
+
}, { dark: T }), l = c ? [me.of({
|
|
308
|
+
create: () => {
|
|
309
|
+
let e = document.createElement("div");
|
|
310
|
+
return e.style.width = "80px", e.style.overflow = "hidden", e.style.borderLeft = `1px solid ${w.palette.divider}`, e.style.backgroundColor = T ? w.palette.grey[900] : w.palette.grey[50], { dom: e };
|
|
311
|
+
},
|
|
312
|
+
displayText: "blocks",
|
|
313
|
+
showOverlay: "always"
|
|
314
|
+
})] : [], u = [
|
|
315
|
+
o,
|
|
316
|
+
de(r),
|
|
317
|
+
re(),
|
|
318
|
+
fe(),
|
|
319
|
+
pe(ie()),
|
|
320
|
+
oe(),
|
|
321
|
+
J.of([...ae, ...se]),
|
|
322
|
+
S.current.of(G.editable.of(!i && !a)),
|
|
323
|
+
C.current.of(Y.readOnly.of(a)),
|
|
298
324
|
K(),
|
|
299
325
|
...s ? [ee(), q()] : [],
|
|
300
326
|
...n ? [te(n)] : [],
|
|
327
|
+
...l,
|
|
301
328
|
G.updateListener.of((e) => {
|
|
302
|
-
e.docChanged &&
|
|
329
|
+
e.docChanged && _.current?.(e.state.doc.toString());
|
|
303
330
|
let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
|
|
304
|
-
|
|
331
|
+
v.current(n.number, t - n.from + 1);
|
|
305
332
|
}),
|
|
306
333
|
G.domEventHandlers({
|
|
307
334
|
blur: () => {
|
|
308
|
-
|
|
335
|
+
y.current?.();
|
|
309
336
|
},
|
|
310
337
|
focus: () => {
|
|
311
|
-
|
|
338
|
+
b.current?.();
|
|
312
339
|
}
|
|
313
340
|
})
|
|
314
|
-
],
|
|
315
|
-
state:
|
|
341
|
+
], d = new G({
|
|
342
|
+
state: Y.create({
|
|
316
343
|
doc: t,
|
|
317
|
-
extensions:
|
|
344
|
+
extensions: u
|
|
318
345
|
}),
|
|
319
|
-
parent:
|
|
346
|
+
parent: h.current
|
|
320
347
|
});
|
|
321
|
-
return
|
|
322
|
-
|
|
348
|
+
return g.current = d, x.current(d), () => {
|
|
349
|
+
x.current(null), d.destroy(), g.current = null;
|
|
323
350
|
};
|
|
324
351
|
}, [
|
|
325
|
-
w,
|
|
326
352
|
T,
|
|
327
353
|
E,
|
|
328
354
|
D,
|
|
329
355
|
O,
|
|
330
|
-
k
|
|
356
|
+
k,
|
|
357
|
+
A,
|
|
358
|
+
c
|
|
331
359
|
]), r(() => {
|
|
332
|
-
let t =
|
|
360
|
+
let t = g.current;
|
|
333
361
|
if (!t) return;
|
|
334
362
|
let n = t.state.doc.toString();
|
|
335
363
|
n !== (e ?? "") && t.dispatch({ changes: {
|
|
@@ -338,16 +366,16 @@ function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
338
366
|
insert: e ?? ""
|
|
339
367
|
} });
|
|
340
368
|
}, [e]), r(() => {
|
|
341
|
-
|
|
369
|
+
g.current?.dispatch({ effects: [S.current.reconfigure(G.editable.of(!i && !a)), C.current.reconfigure(Y.readOnly.of(a))] });
|
|
342
370
|
}, [i, a]), /* @__PURE__ */ U(l, {
|
|
343
|
-
ref:
|
|
371
|
+
ref: h,
|
|
344
372
|
sx: {
|
|
345
373
|
flex: 1,
|
|
346
374
|
overflow: "hidden",
|
|
347
375
|
display: "flex",
|
|
348
376
|
flexDirection: "column",
|
|
349
377
|
opacity: i ? .5 : 1,
|
|
350
|
-
backgroundColor:
|
|
378
|
+
backgroundColor: w.palette.background.paper,
|
|
351
379
|
"& .cm-editor": {
|
|
352
380
|
flex: 1,
|
|
353
381
|
display: "flex",
|
|
@@ -358,7 +386,7 @@ function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
358
386
|
}
|
|
359
387
|
//#endregion
|
|
360
388
|
//#region src/components/shared/ToolbarButton.tsx
|
|
361
|
-
function
|
|
389
|
+
function Z({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
|
|
362
390
|
return /* @__PURE__ */ U(F, {
|
|
363
391
|
title: e,
|
|
364
392
|
arrow: !0,
|
|
@@ -423,11 +451,11 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
|
|
|
423
451
|
}
|
|
424
452
|
function m() {
|
|
425
453
|
let t = e.current;
|
|
426
|
-
t && (
|
|
454
|
+
t && (le(t), t.focus());
|
|
427
455
|
}
|
|
428
456
|
function h() {
|
|
429
457
|
let t = e.current;
|
|
430
|
-
t && (
|
|
458
|
+
t && (ce(t), t.focus());
|
|
431
459
|
}
|
|
432
460
|
let g = t.showFormat || t.showCompact, _ = t.showCopy || t.showClear, y = t.showUndoRedo;
|
|
433
461
|
return /* @__PURE__ */ W(l, {
|
|
@@ -447,12 +475,12 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
|
|
|
447
475
|
display: "flex",
|
|
448
476
|
gap: .25
|
|
449
477
|
},
|
|
450
|
-
children: [t.showFormat && /* @__PURE__ */ U(
|
|
478
|
+
children: [t.showFormat && /* @__PURE__ */ U(Z, {
|
|
451
479
|
label: n.format,
|
|
452
480
|
icon: /* @__PURE__ */ U(be, { fontSize: "small" }),
|
|
453
481
|
onClick: u,
|
|
454
482
|
disabled: c
|
|
455
|
-
}), t.showCompact && /* @__PURE__ */ U(
|
|
483
|
+
}), t.showCompact && /* @__PURE__ */ U(Z, {
|
|
456
484
|
label: n.compact,
|
|
457
485
|
icon: /* @__PURE__ */ U(xe, { fontSize: "small" }),
|
|
458
486
|
onClick: d,
|
|
@@ -469,7 +497,7 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
|
|
|
469
497
|
display: "flex",
|
|
470
498
|
gap: .25
|
|
471
499
|
},
|
|
472
|
-
children: [t.showCopy && /* @__PURE__ */ U(
|
|
500
|
+
children: [t.showCopy && /* @__PURE__ */ U(Z, {
|
|
473
501
|
label: a ? n.copySuccess : n.copy,
|
|
474
502
|
icon: a ? /* @__PURE__ */ U(ge, {
|
|
475
503
|
fontSize: "small",
|
|
@@ -477,7 +505,7 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
|
|
|
477
505
|
}) : /* @__PURE__ */ U(he, { fontSize: "small" }),
|
|
478
506
|
onClick: f,
|
|
479
507
|
disabled: c
|
|
480
|
-
}), t.showClear && /* @__PURE__ */ U(
|
|
508
|
+
}), t.showClear && /* @__PURE__ */ U(Z, {
|
|
481
509
|
label: n.clear,
|
|
482
510
|
icon: /* @__PURE__ */ U(_e, { fontSize: "small" }),
|
|
483
511
|
onClick: p,
|
|
@@ -494,12 +522,12 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
|
|
|
494
522
|
display: "flex",
|
|
495
523
|
gap: .25
|
|
496
524
|
},
|
|
497
|
-
children: [/* @__PURE__ */ U(
|
|
525
|
+
children: [/* @__PURE__ */ U(Z, {
|
|
498
526
|
label: n.undo,
|
|
499
527
|
icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
|
|
500
528
|
onClick: m,
|
|
501
529
|
disabled: c
|
|
502
|
-
}), /* @__PURE__ */ U(
|
|
530
|
+
}), /* @__PURE__ */ U(Z, {
|
|
503
531
|
label: n.redo,
|
|
504
532
|
icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
|
|
505
533
|
onClick: h,
|
|
@@ -575,31 +603,31 @@ function At(e) {
|
|
|
575
603
|
return !1;
|
|
576
604
|
}
|
|
577
605
|
}
|
|
578
|
-
function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a, width: c, disabled: u = !1, readonly: d = !1, error: f = !1, helperText: p, name: m, indent: h = 2, showLineNumbers: g = !0, showLineColumn: _ = !0,
|
|
579
|
-
let
|
|
606
|
+
function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a, width: c, disabled: u = !1, readonly: d = !1, error: f = !1, helperText: p, name: m, indent: h = 2, showLineNumbers: g = !0, showLineColumn: _ = !0, showMinimap: y = !1, showValidation: b = !1, toolbarConfig: x, translation: S, highlightColors: C, onBlur: w, onFocus: T }) {
|
|
607
|
+
let E = {
|
|
580
608
|
...Tt,
|
|
581
|
-
...
|
|
582
|
-
},
|
|
609
|
+
...S
|
|
610
|
+
}, D = {
|
|
583
611
|
...wt,
|
|
584
|
-
...
|
|
585
|
-
},
|
|
612
|
+
...x
|
|
613
|
+
}, k = kt(a), A = kt(c), j = k === "auto", M = j ? void 0 : k ?? 300, N = o(null), [P, F] = s({
|
|
586
614
|
line: 1,
|
|
587
615
|
col: 1
|
|
588
|
-
}), [
|
|
589
|
-
|
|
590
|
-
}, []),
|
|
591
|
-
|
|
616
|
+
}), [I, L] = s(() => At(e ?? "")), R = t((e) => {
|
|
617
|
+
N.current = e;
|
|
618
|
+
}, []), z = t((e, t) => {
|
|
619
|
+
F({
|
|
592
620
|
line: e,
|
|
593
621
|
col: t
|
|
594
622
|
});
|
|
595
|
-
}, []),
|
|
623
|
+
}, []), B = t((e) => {
|
|
596
624
|
let t = At(e);
|
|
597
|
-
|
|
598
|
-
}, [n, r]),
|
|
625
|
+
L(t), r?.(t), n?.(e);
|
|
626
|
+
}, [n, r]), V = _ || b || !!p;
|
|
599
627
|
return /* @__PURE__ */ W(l, {
|
|
600
628
|
sx: {
|
|
601
|
-
width:
|
|
602
|
-
...
|
|
629
|
+
width: A ?? "100%",
|
|
630
|
+
...j ? {
|
|
603
631
|
display: "flex",
|
|
604
632
|
flexDirection: "column",
|
|
605
633
|
flex: 1
|
|
@@ -612,7 +640,7 @@ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
|
|
|
612
640
|
display: "flex",
|
|
613
641
|
flexDirection: "column",
|
|
614
642
|
overflow: "hidden",
|
|
615
|
-
...
|
|
643
|
+
...j ? { flex: 1 } : { height: M },
|
|
616
644
|
borderColor: f ? "error.main" : void 0,
|
|
617
645
|
"&:focus-within": {
|
|
618
646
|
borderColor: f ? "error.main" : "primary.main",
|
|
@@ -620,34 +648,35 @@ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
|
|
|
620
648
|
}
|
|
621
649
|
},
|
|
622
650
|
children: [!d && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Dt, {
|
|
623
|
-
viewRef:
|
|
624
|
-
toolbarConfig:
|
|
625
|
-
translation:
|
|
651
|
+
viewRef: N,
|
|
652
|
+
toolbarConfig: D,
|
|
653
|
+
translation: E,
|
|
626
654
|
indent: h,
|
|
627
655
|
disabled: u
|
|
628
656
|
}), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(Et, {
|
|
629
657
|
value: e,
|
|
630
|
-
onChange:
|
|
658
|
+
onChange: B,
|
|
631
659
|
placeholder: i,
|
|
632
660
|
disabled: u,
|
|
633
661
|
readonly: d,
|
|
634
662
|
showLineNumbers: g,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
663
|
+
showMinimap: y,
|
|
664
|
+
highlightColors: C,
|
|
665
|
+
onViewReady: R,
|
|
666
|
+
onCursorChange: z,
|
|
667
|
+
onBlur: w,
|
|
668
|
+
onFocus: T
|
|
640
669
|
})]
|
|
641
670
|
}),
|
|
642
|
-
|
|
671
|
+
V && /* @__PURE__ */ U(Ot, {
|
|
643
672
|
helperText: p,
|
|
644
673
|
error: f,
|
|
645
674
|
showLineColumn: _,
|
|
646
|
-
showValidation:
|
|
647
|
-
isValid:
|
|
648
|
-
cursorLine:
|
|
649
|
-
cursorCol:
|
|
650
|
-
translation:
|
|
675
|
+
showValidation: b,
|
|
676
|
+
isValid: I,
|
|
677
|
+
cursorLine: P.line,
|
|
678
|
+
cursorCol: P.col,
|
|
679
|
+
translation: E
|
|
651
680
|
}),
|
|
652
681
|
m && /* @__PURE__ */ U("input", {
|
|
653
682
|
type: "hidden",
|
|
@@ -660,7 +689,7 @@ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
|
|
|
660
689
|
//#endregion
|
|
661
690
|
//#region src/components/gantt-chart/util/gantt-chart.util.ts
|
|
662
691
|
function Mt(e) {
|
|
663
|
-
let t = /* @__PURE__ */ new Date(), n =
|
|
692
|
+
let t = /* @__PURE__ */ new Date(), n = Jt(t), r = Yt(t);
|
|
664
693
|
if (e.length === 0) return {
|
|
665
694
|
start: n,
|
|
666
695
|
end: r
|
|
@@ -673,11 +702,11 @@ function Mt(e) {
|
|
|
673
702
|
}
|
|
674
703
|
function Nt(e, t) {
|
|
675
704
|
return t === "weeks" ? {
|
|
676
|
-
start:
|
|
705
|
+
start: Wt(e.start),
|
|
677
706
|
end: e.end
|
|
678
707
|
} : t === "quarters" ? {
|
|
679
|
-
start:
|
|
680
|
-
end:
|
|
708
|
+
start: Jt(e.start),
|
|
709
|
+
end: Yt(e.end)
|
|
681
710
|
} : e;
|
|
682
711
|
}
|
|
683
712
|
function Pt(e, t) {
|
|
@@ -722,10 +751,10 @@ function zt(e) {
|
|
|
722
751
|
function Bt(e, t) {
|
|
723
752
|
return new Date(e.getFullYear(), e.getMonth() + t, e.getDate());
|
|
724
753
|
}
|
|
725
|
-
function
|
|
754
|
+
function Vt(e, t) {
|
|
726
755
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t, 0, 0, 0, 0);
|
|
727
756
|
}
|
|
728
|
-
function
|
|
757
|
+
function Ht(e, t, n) {
|
|
729
758
|
if (n === 0) return e;
|
|
730
759
|
let r = /* @__PURE__ */ new Map();
|
|
731
760
|
for (let t of e) for (let e of t.dependencies ?? []) r.has(e) || r.set(e, []), r.get(e).push(t.id);
|
|
@@ -743,41 +772,41 @@ function Vt(e, t, n) {
|
|
|
743
772
|
}
|
|
744
773
|
return e.map((e) => i.get(e.id));
|
|
745
774
|
}
|
|
746
|
-
function
|
|
775
|
+
function Ut(e) {
|
|
747
776
|
let t = [], n = Rt(e.start);
|
|
748
777
|
for (; n <= e.end;) t.push(n), n = Bt(n, 1);
|
|
749
778
|
return t;
|
|
750
779
|
}
|
|
751
|
-
function
|
|
780
|
+
function Wt(e) {
|
|
752
781
|
let t = new Date(e), n = t.getDay(), r = n === 0 ? -6 : 1 - n;
|
|
753
782
|
return t.setDate(t.getDate() + r), t.setHours(0, 0, 0, 0), t;
|
|
754
783
|
}
|
|
755
|
-
function
|
|
784
|
+
function Gt(e) {
|
|
756
785
|
let t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), n = t.getUTCDay() || 7;
|
|
757
786
|
t.setUTCDate(t.getUTCDate() + 4 - n);
|
|
758
787
|
let r = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));
|
|
759
788
|
return Math.ceil(((t.getTime() - r.getTime()) / 864e5 + 1) / 7);
|
|
760
789
|
}
|
|
761
|
-
function
|
|
762
|
-
let t = [], n =
|
|
790
|
+
function Kt(e) {
|
|
791
|
+
let t = [], n = Wt(e.start);
|
|
763
792
|
for (; n <= e.end;) t.push(new Date(n)), n = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 7);
|
|
764
793
|
return t;
|
|
765
794
|
}
|
|
766
|
-
function
|
|
795
|
+
function qt(e) {
|
|
767
796
|
let t = [], n = new Date(e.start.getFullYear(), e.start.getMonth(), e.start.getDate(), 0, 0, 0, 0), r = new Date(e.end.getFullYear(), e.end.getMonth(), e.end.getDate(), 0, 0, 0, 0).getTime();
|
|
768
797
|
for (; n.getTime() <= r;) t.push(new Date(n)), n = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 1, 0, 0, 0, 0);
|
|
769
798
|
return t;
|
|
770
799
|
}
|
|
771
|
-
function
|
|
800
|
+
function Jt(e) {
|
|
772
801
|
let t = Math.floor(e.getMonth() / 3) * 3;
|
|
773
802
|
return new Date(e.getFullYear(), t, 1, 0, 0, 0, 0);
|
|
774
803
|
}
|
|
775
|
-
function
|
|
804
|
+
function Yt(e) {
|
|
776
805
|
let t = Math.floor(e.getMonth() / 3) * 3 + 2;
|
|
777
806
|
return zt(new Date(e.getFullYear(), t, 1));
|
|
778
807
|
}
|
|
779
|
-
function
|
|
780
|
-
let t = [], n =
|
|
808
|
+
function Xt(e) {
|
|
809
|
+
let t = [], n = Jt(e.start);
|
|
781
810
|
for (; n <= e.end;) {
|
|
782
811
|
let e = Math.floor(n.getMonth() / 3) + 1;
|
|
783
812
|
t.push({
|
|
@@ -788,7 +817,7 @@ function Yt(e) {
|
|
|
788
817
|
}
|
|
789
818
|
return t;
|
|
790
819
|
}
|
|
791
|
-
function
|
|
820
|
+
function Zt(e) {
|
|
792
821
|
if (e.length === 0) return /* @__PURE__ */ new Set();
|
|
793
822
|
let t = /* @__PURE__ */ new Map();
|
|
794
823
|
for (let n of e) for (let e of n.dependencies ?? []) t.has(e) || t.set(e, []), t.get(e).push(n.id);
|
|
@@ -808,14 +837,14 @@ function Xt(e) {
|
|
|
808
837
|
}
|
|
809
838
|
//#endregion
|
|
810
839
|
//#region src/components/gantt-chart/GanttChart.store.ts
|
|
811
|
-
function
|
|
840
|
+
function Qt(e, t) {
|
|
812
841
|
let n = t.startDate < e.start ? Rt(Bt(t.startDate, -1)) : e.start, r = t.endDate > e.end ? zt(Bt(t.endDate, 1)) : e.end;
|
|
813
842
|
return n === e.start && r === e.end ? e : {
|
|
814
843
|
start: n,
|
|
815
844
|
end: r
|
|
816
845
|
};
|
|
817
846
|
}
|
|
818
|
-
function
|
|
847
|
+
function $t(e, t = "months", n = !1, r, i = !1) {
|
|
819
848
|
let a = Mt(e);
|
|
820
849
|
return Ce((o, s) => ({
|
|
821
850
|
tasks: e,
|
|
@@ -841,7 +870,7 @@ function Qt(e, t = "months", n = !1, r, i = !1) {
|
|
|
841
870
|
return {
|
|
842
871
|
tasks: n,
|
|
843
872
|
taskTree: Ft(n),
|
|
844
|
-
timelineRange:
|
|
873
|
+
timelineRange: Qt(t.timelineRange, e)
|
|
845
874
|
};
|
|
846
875
|
});
|
|
847
876
|
},
|
|
@@ -850,10 +879,10 @@ function Qt(e, t = "months", n = !1, r, i = !1) {
|
|
|
850
879
|
let n = t.tasks.find((t) => t.id === e.id), r = t.tasks.map((t) => t.id === e.id ? e : t);
|
|
851
880
|
if (t.cascadeDependencies && n) {
|
|
852
881
|
let t = e.endDate.getTime() - n.endDate.getTime();
|
|
853
|
-
r =
|
|
882
|
+
r = Ht(r, e.id, t);
|
|
854
883
|
}
|
|
855
|
-
let i =
|
|
856
|
-
for (let e of r) i =
|
|
884
|
+
let i = Qt(t.timelineRange, e);
|
|
885
|
+
for (let e of r) i = Qt(i, e);
|
|
857
886
|
return {
|
|
858
887
|
tasks: r,
|
|
859
888
|
taskTree: Ft(r),
|
|
@@ -924,7 +953,7 @@ function Qt(e, t = "months", n = !1, r, i = !1) {
|
|
|
924
953
|
}
|
|
925
954
|
//#endregion
|
|
926
955
|
//#region src/components/gantt-chart/GanttChart.types.ts
|
|
927
|
-
var
|
|
956
|
+
var en = {
|
|
928
957
|
scaleDays: "Tage",
|
|
929
958
|
scaleWeeks: "Wochen",
|
|
930
959
|
scaleMonths: "Monate",
|
|
@@ -939,6 +968,7 @@ var $t = {
|
|
|
939
968
|
statusDone: "Done",
|
|
940
969
|
statusBlocked: "Blocked",
|
|
941
970
|
weekColumnPrefix: "KW",
|
|
971
|
+
todayLabel: "Heute",
|
|
942
972
|
dateLocale: "de-DE",
|
|
943
973
|
dialogAddTitle: "Aufgabe hinzufügen",
|
|
944
974
|
dialogEditTitle: "Aufgabe bearbeiten",
|
|
@@ -964,12 +994,12 @@ var $t = {
|
|
|
964
994
|
addTaskTooltip: "Aufgabe hinzufügen",
|
|
965
995
|
editTaskTooltip: "Aufgabe bearbeiten",
|
|
966
996
|
deleteTaskTooltip: "Aufgabe löschen"
|
|
967
|
-
},
|
|
997
|
+
}, tn = {
|
|
968
998
|
planned: "warning.light",
|
|
969
999
|
"in-progress": "info.main",
|
|
970
1000
|
done: "success.main",
|
|
971
1001
|
blocked: "error.main"
|
|
972
|
-
},
|
|
1002
|
+
}, nn = {
|
|
973
1003
|
planned: "warning",
|
|
974
1004
|
"in-progress": "info",
|
|
975
1005
|
done: "success",
|
|
@@ -977,16 +1007,16 @@ var $t = {
|
|
|
977
1007
|
};
|
|
978
1008
|
//#endregion
|
|
979
1009
|
//#region src/components/gantt-chart/GanttTaskDialog.tsx
|
|
980
|
-
function
|
|
1010
|
+
function rn(e) {
|
|
981
1011
|
return e.toISOString().slice(0, 10);
|
|
982
1012
|
}
|
|
983
|
-
function
|
|
1013
|
+
function an(e, t, n) {
|
|
984
1014
|
return e < t ? t : e > n ? n : e;
|
|
985
1015
|
}
|
|
986
|
-
function
|
|
987
|
-
return e.flatMap((e) => [e, ...
|
|
1016
|
+
function on(e) {
|
|
1017
|
+
return e.flatMap((e) => [e, ...on(e.children)]);
|
|
988
1018
|
}
|
|
989
|
-
function
|
|
1019
|
+
function sn({ label: e }) {
|
|
990
1020
|
let t = o(null), [n, r] = s(!1);
|
|
991
1021
|
return /* @__PURE__ */ U(F, {
|
|
992
1022
|
title: e,
|
|
@@ -1009,8 +1039,8 @@ function on({ label: e }) {
|
|
|
1009
1039
|
})
|
|
1010
1040
|
});
|
|
1011
1041
|
}
|
|
1012
|
-
function
|
|
1013
|
-
let f = $(), g = Q((e) => e.taskTree), v = Q((e) => e.timelineRange), x = a(() =>
|
|
1042
|
+
function cn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, onClose: c }) {
|
|
1043
|
+
let f = $(), g = Q((e) => e.taskTree), v = Q((e) => e.timelineRange), x = a(() => on(g), [g]), S = a(() => {
|
|
1014
1044
|
if (t === "add" || !n) return /* @__PURE__ */ new Set();
|
|
1015
1045
|
let e = (t) => [t.id, ...t.children.flatMap(e)], r = x.find((e) => e.id === n.id);
|
|
1016
1046
|
return new Set(r ? e(r) : [n.id]);
|
|
@@ -1018,7 +1048,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
|
|
|
1018
1048
|
t,
|
|
1019
1049
|
n,
|
|
1020
1050
|
x
|
|
1021
|
-
]), C = x.filter((e) => !S.has(e.id)), T = C, D =
|
|
1051
|
+
]), C = x.filter((e) => !S.has(e.id)), T = C, D = rn(an(/* @__PURE__ */ new Date(), v.start, v.end)), [O, k] = s({
|
|
1022
1052
|
name: "",
|
|
1023
1053
|
startDate: D,
|
|
1024
1054
|
endDate: D,
|
|
@@ -1029,11 +1059,11 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
|
|
|
1029
1059
|
});
|
|
1030
1060
|
r(() => {
|
|
1031
1061
|
if (!e) return;
|
|
1032
|
-
let r =
|
|
1062
|
+
let r = rn(an(/* @__PURE__ */ new Date(), v.start, v.end));
|
|
1033
1063
|
k(t === "edit" && n ? {
|
|
1034
1064
|
name: n.name,
|
|
1035
|
-
startDate:
|
|
1036
|
-
endDate:
|
|
1065
|
+
startDate: rn(n.startDate),
|
|
1066
|
+
endDate: rn(n.endDate),
|
|
1037
1067
|
status: n.status,
|
|
1038
1068
|
isMilestone: n.isMilestone ?? !1,
|
|
1039
1069
|
parentId: n.parentId ?? "",
|
|
@@ -1214,7 +1244,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
|
|
|
1214
1244
|
flexShrink: 0
|
|
1215
1245
|
},
|
|
1216
1246
|
children: "└"
|
|
1217
|
-
}), /* @__PURE__ */ U(
|
|
1247
|
+
}), /* @__PURE__ */ U(sn, { label: e.name })]
|
|
1218
1248
|
})
|
|
1219
1249
|
}, e.id))]
|
|
1220
1250
|
})]
|
|
@@ -1258,7 +1288,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
|
|
|
1258
1288
|
flexShrink: 0
|
|
1259
1289
|
},
|
|
1260
1290
|
children: "└"
|
|
1261
|
-
}), /* @__PURE__ */ U(
|
|
1291
|
+
}), /* @__PURE__ */ U(sn, { label: e.name })]
|
|
1262
1292
|
})
|
|
1263
1293
|
}, e.id))
|
|
1264
1294
|
})]
|
|
@@ -1280,7 +1310,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
|
|
|
1280
1310
|
}
|
|
1281
1311
|
//#endregion
|
|
1282
1312
|
//#region src/components/gantt-chart/GanttDeleteDialog.tsx
|
|
1283
|
-
function
|
|
1313
|
+
function ln({ open: e, task: t, onConfirm: n, onClose: r }) {
|
|
1284
1314
|
let i = $(), a = i.dialogDeleteConfirm.replace("{name}", t?.name ?? "");
|
|
1285
1315
|
return /* @__PURE__ */ W(p, {
|
|
1286
1316
|
open: e,
|
|
@@ -1306,7 +1336,7 @@ function cn({ open: e, task: t, onConfirm: n, onClose: r }) {
|
|
|
1306
1336
|
}
|
|
1307
1337
|
//#endregion
|
|
1308
1338
|
//#region src/components/gantt-chart/GanttTaskPanel.tsx
|
|
1309
|
-
function
|
|
1339
|
+
function un(e, t) {
|
|
1310
1340
|
return {
|
|
1311
1341
|
planned: t.statusPlanned,
|
|
1312
1342
|
"in-progress": t.statusInProgress,
|
|
@@ -1314,8 +1344,8 @@ function ln(e, t) {
|
|
|
1314
1344
|
blocked: t.statusBlocked
|
|
1315
1345
|
}[e];
|
|
1316
1346
|
}
|
|
1317
|
-
function
|
|
1318
|
-
let [m, h] = s(null), [g, _] = s(null), v = $(), { statusColors: y } =
|
|
1347
|
+
function dn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onTaskClick: i, onAddTask: a, onEditTask: o, onDeleteTask: c, onStatusChange: u, inlineEdit: d, onInlineRename: p }) {
|
|
1348
|
+
let [m, h] = s(null), [g, _] = s(null), v = $(), { statusColors: y } = Nn(), b = () => {
|
|
1319
1349
|
g !== null && g.trim() && p?.(e, g.trim()), _(null);
|
|
1320
1350
|
};
|
|
1321
1351
|
return /* @__PURE__ */ W(l, {
|
|
@@ -1371,7 +1401,7 @@ function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
|
|
|
1371
1401
|
borderRadius: e.isMilestone ? 0 : "50%",
|
|
1372
1402
|
transform: e.isMilestone ? "rotate(45deg)" : void 0,
|
|
1373
1403
|
flexShrink: 0,
|
|
1374
|
-
bgcolor: e.color ?? y?.[e.status] ??
|
|
1404
|
+
bgcolor: e.color ?? y?.[e.status] ?? tn[e.status] ?? "grey.400"
|
|
1375
1405
|
} }),
|
|
1376
1406
|
g === null ? /* @__PURE__ */ U(I, {
|
|
1377
1407
|
variant: "body2",
|
|
@@ -1459,10 +1489,10 @@ function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
|
|
|
1459
1489
|
justifyContent: "center"
|
|
1460
1490
|
},
|
|
1461
1491
|
children: [/* @__PURE__ */ U(f, {
|
|
1462
|
-
label:
|
|
1492
|
+
label: un(e.status, v),
|
|
1463
1493
|
size: "small",
|
|
1464
1494
|
variant: "outlined",
|
|
1465
|
-
color: e.color ?? y?.[e.status] ? "default" :
|
|
1495
|
+
color: e.color ?? y?.[e.status] ? "default" : nn[e.status] ?? "default",
|
|
1466
1496
|
sx: {
|
|
1467
1497
|
height: 20,
|
|
1468
1498
|
fontSize: 10,
|
|
@@ -1489,15 +1519,15 @@ function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
|
|
|
1489
1519
|
onClick: () => {
|
|
1490
1520
|
u(e, t), h(null);
|
|
1491
1521
|
},
|
|
1492
|
-
children:
|
|
1522
|
+
children: un(t, v)
|
|
1493
1523
|
}, t))
|
|
1494
1524
|
})]
|
|
1495
1525
|
})
|
|
1496
1526
|
]
|
|
1497
1527
|
});
|
|
1498
1528
|
}
|
|
1499
|
-
function
|
|
1500
|
-
let v = $(), y =
|
|
1529
|
+
function fn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTask: i, onEditTask: o, onDeleteTask: c, onStatusChange: u, onTasksChange: d, enableBuiltinDialogs: f, onTaskCreated: p, onTaskUpdated: m, onTaskDeleted: h, inlineEdit: g, virtualizeRows: _ = !1 }) {
|
|
1530
|
+
let v = $(), y = An(), b = Q((e) => e.taskTree), x = Q((e) => e.expandedIds), S = Q((e) => e.toggleExpand), C = Q((e) => e.timeScale), w = Q((e) => e.addTask), T = Q((e) => e.updateTask), E = Q((e) => e.deleteTask), D = a(() => Lt(b, x), [b, x]), O = we({
|
|
1501
1531
|
count: D.length,
|
|
1502
1532
|
getScrollElement: () => e.current,
|
|
1503
1533
|
estimateSize: () => 40,
|
|
@@ -1619,7 +1649,7 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
|
|
|
1619
1649
|
height: 40,
|
|
1620
1650
|
transform: `translateY(${e.start}px)`
|
|
1621
1651
|
},
|
|
1622
|
-
children: /* @__PURE__ */ U(
|
|
1652
|
+
children: /* @__PURE__ */ U(dn, {
|
|
1623
1653
|
task: D[e.index],
|
|
1624
1654
|
expandedIds: x,
|
|
1625
1655
|
toggleExpand: S,
|
|
@@ -1633,7 +1663,7 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
|
|
|
1633
1663
|
onInlineRename: g ? V : void 0
|
|
1634
1664
|
})
|
|
1635
1665
|
}, e.key))
|
|
1636
|
-
}) : D.map((e) => /* @__PURE__ */ U(
|
|
1666
|
+
}) : D.map((e) => /* @__PURE__ */ U(dn, {
|
|
1637
1667
|
task: e,
|
|
1638
1668
|
expandedIds: x,
|
|
1639
1669
|
toggleExpand: S,
|
|
@@ -1647,21 +1677,21 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
|
|
|
1647
1677
|
onInlineRename: g ? V : void 0
|
|
1648
1678
|
}, e.id)),
|
|
1649
1679
|
f && /* @__PURE__ */ W(H, { children: [
|
|
1650
|
-
/* @__PURE__ */ U(
|
|
1680
|
+
/* @__PURE__ */ U(cn, {
|
|
1651
1681
|
open: k,
|
|
1652
1682
|
mode: "add",
|
|
1653
1683
|
defaultParentId: F?.id,
|
|
1654
1684
|
onSave: R,
|
|
1655
1685
|
onClose: () => A(!1)
|
|
1656
1686
|
}),
|
|
1657
|
-
/* @__PURE__ */ U(
|
|
1687
|
+
/* @__PURE__ */ U(cn, {
|
|
1658
1688
|
open: j,
|
|
1659
1689
|
mode: "edit",
|
|
1660
1690
|
initialTask: F ?? void 0,
|
|
1661
1691
|
onSave: z,
|
|
1662
1692
|
onClose: () => M(!1)
|
|
1663
1693
|
}),
|
|
1664
|
-
/* @__PURE__ */ U(
|
|
1694
|
+
/* @__PURE__ */ U(ln, {
|
|
1665
1695
|
open: N,
|
|
1666
1696
|
task: F,
|
|
1667
1697
|
onConfirm: B,
|
|
@@ -1673,10 +1703,10 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
|
|
|
1673
1703
|
}
|
|
1674
1704
|
//#endregion
|
|
1675
1705
|
//#region src/components/gantt-chart/hooks/useGanttDrag.ts
|
|
1676
|
-
var
|
|
1677
|
-
function
|
|
1678
|
-
let a = Q((e) => e.updateTask), c =
|
|
1679
|
-
u.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) /
|
|
1706
|
+
var pn = 864e5;
|
|
1707
|
+
function mn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r, onTasksChange: i }) {
|
|
1708
|
+
let a = Q((e) => e.updateTask), c = An(), l = $(), u = o(1);
|
|
1709
|
+
u.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) / pn) : 1;
|
|
1680
1710
|
let d = o(n);
|
|
1681
1711
|
d.current = n;
|
|
1682
1712
|
let f = o(r);
|
|
@@ -1713,14 +1743,14 @@ function pn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r,
|
|
|
1713
1743
|
let n = c.getState().tasks.find((t) => t.id === e.taskId);
|
|
1714
1744
|
if (n) {
|
|
1715
1745
|
if (t.type === "move") {
|
|
1716
|
-
let r =
|
|
1746
|
+
let r = Vt(e.originalStart, t.deltaDays), i = Vt(e.originalEnd, t.deltaDays);
|
|
1717
1747
|
a({
|
|
1718
1748
|
...n,
|
|
1719
1749
|
startDate: r,
|
|
1720
1750
|
endDate: i
|
|
1721
1751
|
}), d.current?.(n, r, i);
|
|
1722
1752
|
} else {
|
|
1723
|
-
let r =
|
|
1753
|
+
let r = Vt(e.originalEnd, t.deltaDays), i = r > e.originalStart ? r : Vt(e.originalStart, 1);
|
|
1724
1754
|
a({
|
|
1725
1755
|
...n,
|
|
1726
1756
|
endDate: i
|
|
@@ -1777,7 +1807,7 @@ function pn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r,
|
|
|
1777
1807
|
}
|
|
1778
1808
|
//#endregion
|
|
1779
1809
|
//#region src/components/gantt-chart/GanttTimelineHeader.tsx
|
|
1780
|
-
function
|
|
1810
|
+
function hn({ items: e }) {
|
|
1781
1811
|
return /* @__PURE__ */ U(l, {
|
|
1782
1812
|
sx: { display: "flex" },
|
|
1783
1813
|
children: e.map((e) => /* @__PURE__ */ U(l, {
|
|
@@ -1800,7 +1830,8 @@ function mn({ items: e }) {
|
|
|
1800
1830
|
}, e.key))
|
|
1801
1831
|
});
|
|
1802
1832
|
}
|
|
1803
|
-
function
|
|
1833
|
+
function gn({ columns: e, groups: t, todayX: n, todayLabel: r, todayTooltip: i, todayColor: a }) {
|
|
1834
|
+
let o = L(), s = t ? 80 : 40, c = a ?? o.palette.primary.main, u = o.palette.getContrastText(c);
|
|
1804
1835
|
return /* @__PURE__ */ W(l, {
|
|
1805
1836
|
sx: {
|
|
1806
1837
|
position: "sticky",
|
|
@@ -1809,34 +1840,72 @@ function hn({ columns: e, groups: t }) {
|
|
|
1809
1840
|
zIndex: 1,
|
|
1810
1841
|
borderBottom: "1px solid",
|
|
1811
1842
|
borderColor: "divider",
|
|
1812
|
-
height:
|
|
1843
|
+
height: s,
|
|
1813
1844
|
overflow: "visible"
|
|
1814
1845
|
},
|
|
1815
|
-
children: [
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1846
|
+
children: [
|
|
1847
|
+
t && /* @__PURE__ */ U(l, {
|
|
1848
|
+
sx: {
|
|
1849
|
+
height: 40,
|
|
1850
|
+
borderBottom: "1px solid",
|
|
1851
|
+
borderColor: "divider",
|
|
1852
|
+
overflow: "visible"
|
|
1853
|
+
},
|
|
1854
|
+
children: /* @__PURE__ */ U(hn, { items: t })
|
|
1855
|
+
}),
|
|
1856
|
+
/* @__PURE__ */ U(hn, { items: e }),
|
|
1857
|
+
n != null && r && /* @__PURE__ */ U(F, {
|
|
1858
|
+
title: i ?? "",
|
|
1859
|
+
placement: "top",
|
|
1860
|
+
arrow: !0,
|
|
1861
|
+
children: /* @__PURE__ */ U(f, {
|
|
1862
|
+
"data-testid": "gantt-today-chip",
|
|
1863
|
+
size: "small",
|
|
1864
|
+
label: r,
|
|
1865
|
+
sx: {
|
|
1866
|
+
position: "absolute",
|
|
1867
|
+
bottom: 0,
|
|
1868
|
+
left: n,
|
|
1869
|
+
transform: "translateX(-50%) translateY(50%)",
|
|
1870
|
+
zIndex: 3,
|
|
1871
|
+
height: 20,
|
|
1872
|
+
fontSize: "0.65rem",
|
|
1873
|
+
fontWeight: 700,
|
|
1874
|
+
letterSpacing: "0.03em",
|
|
1875
|
+
backgroundColor: c,
|
|
1876
|
+
color: u,
|
|
1877
|
+
border: `1.5px solid ${c}`,
|
|
1878
|
+
boxShadow: o.shadows[2],
|
|
1879
|
+
cursor: "default",
|
|
1880
|
+
userSelect: "none",
|
|
1881
|
+
"& .MuiChip-label": {
|
|
1882
|
+
px: "6px",
|
|
1883
|
+
py: 0
|
|
1884
|
+
},
|
|
1885
|
+
"&:hover": {
|
|
1886
|
+
backgroundColor: c,
|
|
1887
|
+
opacity: .9
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
})
|
|
1891
|
+
})
|
|
1892
|
+
]
|
|
1824
1893
|
});
|
|
1825
1894
|
}
|
|
1826
1895
|
//#endregion
|
|
1827
1896
|
//#region src/components/gantt-chart/GanttBarRow.tsx
|
|
1828
|
-
function
|
|
1829
|
-
let v = L(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } =
|
|
1897
|
+
function _n({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth: i, gridColumnWidth: a, criticalTaskIds: o, draggable: s = !1, resizable: c = !1, progressDraggable: u = !1, onTaskClick: d, onMilestoneClick: f, onContextMenu: p, suppressClickRef: m, handleBarMouseDown: h, handleProgressMouseDown: g, formatDragDate: _ }) {
|
|
1898
|
+
let v = L(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } = Nn(), C = n?.taskId === e.id, w = e;
|
|
1830
1899
|
if (C && n) if (n.type === "move") w = {
|
|
1831
1900
|
...e,
|
|
1832
|
-
startDate:
|
|
1833
|
-
endDate:
|
|
1901
|
+
startDate: Vt(e.startDate, n.deltaDays),
|
|
1902
|
+
endDate: Vt(e.endDate, n.deltaDays)
|
|
1834
1903
|
};
|
|
1835
1904
|
else if (n.type === "resize") {
|
|
1836
|
-
let t =
|
|
1905
|
+
let t = Vt(e.endDate, n.deltaDays);
|
|
1837
1906
|
w = {
|
|
1838
1907
|
...e,
|
|
1839
|
-
endDate: t > e.startDate ? t :
|
|
1908
|
+
endDate: t > e.startDate ? t : Vt(e.startDate, 1)
|
|
1840
1909
|
};
|
|
1841
1910
|
} else n.type === "progress" && n.newProgress !== void 0 && (w = {
|
|
1842
1911
|
...e,
|
|
@@ -1860,7 +1929,7 @@ function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
|
|
|
1860
1929
|
backgroundSize: `${a}px 100%`,
|
|
1861
1930
|
backgroundRepeat: "repeat-x"
|
|
1862
1931
|
},
|
|
1863
|
-
children: e.isMilestone ? /* @__PURE__ */ U(
|
|
1932
|
+
children: e.isMilestone ? /* @__PURE__ */ U(vn, {
|
|
1864
1933
|
task: e,
|
|
1865
1934
|
left: T,
|
|
1866
1935
|
milestoneColor: x,
|
|
@@ -1868,7 +1937,7 @@ function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
|
|
|
1868
1937
|
isCritical: o.has(e.id),
|
|
1869
1938
|
onMilestoneClick: f,
|
|
1870
1939
|
theme: v
|
|
1871
|
-
}) : /* @__PURE__ */ U(
|
|
1940
|
+
}) : /* @__PURE__ */ U(yn, {
|
|
1872
1941
|
task: e,
|
|
1873
1942
|
effectiveTask: w,
|
|
1874
1943
|
left: T,
|
|
@@ -1893,7 +1962,7 @@ function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
|
|
|
1893
1962
|
})
|
|
1894
1963
|
});
|
|
1895
1964
|
}
|
|
1896
|
-
function
|
|
1965
|
+
function vn({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCritical: i, onMilestoneClick: a, theme: o }) {
|
|
1897
1966
|
return t < 0 || t > 100 ? null : /* @__PURE__ */ U(l, {
|
|
1898
1967
|
"data-testid": `gantt-milestone-${e.id}`,
|
|
1899
1968
|
sx: {
|
|
@@ -1911,14 +1980,14 @@ function _n({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCriti
|
|
|
1911
1980
|
onClick: () => a?.(e)
|
|
1912
1981
|
});
|
|
1913
1982
|
}
|
|
1914
|
-
function
|
|
1983
|
+
function yn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDragging: a, activeDrag: o, draggable: s, resizable: c, progressDraggable: u, isCritical: d, statusColors: f, criticalPathColor: p, barBorderRadius: m, onTaskClick: h, onContextMenu: g, suppressClickRef: _, handleBarMouseDown: v, handleProgressMouseDown: y, formatDragDate: b, theme: x }) {
|
|
1915
1984
|
let S = Math.max(0, n), C = Math.min(100, n + Math.max(r, .5)) - S;
|
|
1916
1985
|
return C <= 0 ? null : /* @__PURE__ */ W(H, { children: [
|
|
1917
|
-
a && o && o.type !== "progress" && o.deltaDays !== 0 && /* @__PURE__ */ U(
|
|
1986
|
+
a && o && o.type !== "progress" && o.deltaDays !== 0 && /* @__PURE__ */ U(bn, {
|
|
1918
1987
|
left: S,
|
|
1919
1988
|
children: o.type === "move" ? `${b(t.startDate)} – ${b(t.endDate)}` : `→ ${b(t.endDate)}`
|
|
1920
1989
|
}),
|
|
1921
|
-
a && o?.type === "progress" && o.newProgress !== void 0 && /* @__PURE__ */ W(
|
|
1990
|
+
a && o?.type === "progress" && o.newProgress !== void 0 && /* @__PURE__ */ W(bn, {
|
|
1922
1991
|
left: S,
|
|
1923
1992
|
children: [o.newProgress, "%"]
|
|
1924
1993
|
}),
|
|
@@ -1931,7 +2000,7 @@ function vn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDra
|
|
|
1931
2000
|
height: 16,
|
|
1932
2001
|
top: "50%",
|
|
1933
2002
|
transform: "translateY(-50%)",
|
|
1934
|
-
bgcolor: e.color ?? f?.[e.status] ??
|
|
2003
|
+
bgcolor: e.color ?? f?.[e.status] ?? tn[e.status] ?? "grey.300",
|
|
1935
2004
|
borderRadius: m === void 0 ? 1 : `${m}px`,
|
|
1936
2005
|
overflow: "hidden",
|
|
1937
2006
|
opacity: a ? .75 : 1,
|
|
@@ -2000,7 +2069,7 @@ function vn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDra
|
|
|
2000
2069
|
})
|
|
2001
2070
|
] });
|
|
2002
2071
|
}
|
|
2003
|
-
function
|
|
2072
|
+
function bn({ left: e, children: t }) {
|
|
2004
2073
|
return /* @__PURE__ */ U(l, {
|
|
2005
2074
|
sx: {
|
|
2006
2075
|
position: "absolute",
|
|
@@ -2021,8 +2090,8 @@ function yn({ left: e, children: t }) {
|
|
|
2021
2090
|
}
|
|
2022
2091
|
//#endregion
|
|
2023
2092
|
//#region src/components/gantt-chart/GanttWeekendStrips.tsx
|
|
2024
|
-
function
|
|
2025
|
-
let { weekendColor: i } =
|
|
2093
|
+
function xn({ strips: e, totalWidth: t, height: n, top: r }) {
|
|
2094
|
+
let { weekendColor: i } = Nn();
|
|
2026
2095
|
return e.length === 0 ? null : /* @__PURE__ */ U(l, {
|
|
2027
2096
|
"aria-hidden": !0,
|
|
2028
2097
|
"data-testid": "gantt-weekend-strips",
|
|
@@ -2046,7 +2115,7 @@ function bn({ strips: e, totalWidth: t, height: n, top: r }) {
|
|
|
2046
2115
|
}
|
|
2047
2116
|
//#endregion
|
|
2048
2117
|
//#region src/components/gantt-chart/GanttStatusContextMenu.tsx
|
|
2049
|
-
function
|
|
2118
|
+
function Sn({ contextMenu: e, onClose: t, onSelect: n }) {
|
|
2050
2119
|
let r = $(), i = {
|
|
2051
2120
|
planned: r.statusPlanned,
|
|
2052
2121
|
"in-progress": r.statusInProgress,
|
|
@@ -2078,8 +2147,8 @@ function xn({ contextMenu: e, onClose: t, onSelect: n }) {
|
|
|
2078
2147
|
}
|
|
2079
2148
|
//#endregion
|
|
2080
2149
|
//#region src/components/gantt-chart/GanttDependencyArrows.tsx
|
|
2081
|
-
function
|
|
2082
|
-
let o = L(), { todayLineColor: s } =
|
|
2150
|
+
function Cn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, arrowMarkerId: a }) {
|
|
2151
|
+
let o = L(), { todayLineColor: s } = Nn();
|
|
2083
2152
|
return e.length === 0 && t === null ? null : /* @__PURE__ */ W("svg", {
|
|
2084
2153
|
"data-testid": "gantt-dependency-arrows",
|
|
2085
2154
|
style: {
|
|
@@ -2128,7 +2197,7 @@ function Sn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, a
|
|
|
2128
2197
|
}
|
|
2129
2198
|
//#endregion
|
|
2130
2199
|
//#region src/components/gantt-chart/GanttTimeline.tsx
|
|
2131
|
-
function
|
|
2200
|
+
function wn(e, t, n) {
|
|
2132
2201
|
if (n === 0) return [];
|
|
2133
2202
|
let r = [], i = new Map(e.map((e, t) => [e.id, t]));
|
|
2134
2203
|
for (let a of e) {
|
|
@@ -2146,21 +2215,21 @@ function Cn(e, t, n) {
|
|
|
2146
2215
|
}
|
|
2147
2216
|
return r;
|
|
2148
2217
|
}
|
|
2149
|
-
function
|
|
2150
|
-
let y = Q((e) => e.taskTree), b = Q((e) => e.tasks), x = Q((e) => e.expandedIds), S = Q((e) => e.timelineRange), C = Q((e) => e.timeScale), w = Q((e) => e.updateTask), T =
|
|
2218
|
+
function Tn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, draggable: u = !1, resizable: d = !1, progressDraggable: f = !1, showCriticalPath: p = !1, virtualizeRows: m = !1, onTaskMoved: h, onTaskResized: g, onTasksChange: _, onStatusChange: v }) {
|
|
2219
|
+
let y = Q((e) => e.taskTree), b = Q((e) => e.tasks), x = Q((e) => e.expandedIds), S = Q((e) => e.timelineRange), C = Q((e) => e.timeScale), w = Q((e) => e.updateTask), T = An(), E = $(), D = L(), { todayLineColor: O } = Nn(), k = `gantt-arrow-${i().replace(/:/g, "")}`, A = a(() => Lt(y, x), [y, x]), j = a(() => Nt(S, C), [S, C]), M = a(() => C === "days" ? qt(j).map((e) => ({
|
|
2151
2220
|
key: e.toISOString(),
|
|
2152
2221
|
label: String(e.getDate()),
|
|
2153
2222
|
width: 20,
|
|
2154
2223
|
isWeekend: e.getDay() === 0 || e.getDay() === 6
|
|
2155
|
-
})) : C === "weeks" ?
|
|
2224
|
+
})) : C === "weeks" ? Kt(j).map((e) => ({
|
|
2156
2225
|
key: e.toISOString(),
|
|
2157
|
-
label: `${E.weekColumnPrefix}${
|
|
2226
|
+
label: `${E.weekColumnPrefix}${Gt(e)}`,
|
|
2158
2227
|
width: 40
|
|
2159
|
-
})) : C === "quarters" ?
|
|
2228
|
+
})) : C === "quarters" ? Xt(j).map((e) => ({
|
|
2160
2229
|
key: e.key,
|
|
2161
2230
|
label: e.label,
|
|
2162
2231
|
width: 360
|
|
2163
|
-
})) :
|
|
2232
|
+
})) : Ut(j).map((e) => ({
|
|
2164
2233
|
key: e.toISOString(),
|
|
2165
2234
|
label: e.toLocaleString(E.dateLocale, {
|
|
2166
2235
|
month: "short",
|
|
@@ -2169,13 +2238,13 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
|
|
|
2169
2238
|
width: 120
|
|
2170
2239
|
})), [
|
|
2171
2240
|
C,
|
|
2172
|
-
|
|
2241
|
+
j,
|
|
2173
2242
|
E.weekColumnPrefix,
|
|
2174
2243
|
E.dateLocale
|
|
2175
|
-
]),
|
|
2244
|
+
]), N = a(() => M.reduce((e, t) => e + t.width, 0), [M]), P = a(() => {
|
|
2176
2245
|
if (C !== "days") return;
|
|
2177
2246
|
let e = /* @__PURE__ */ new Map();
|
|
2178
|
-
for (let t of
|
|
2247
|
+
for (let t of M) {
|
|
2179
2248
|
let n = new Date(t.key), r = `${n.getFullYear()}-${n.getMonth()}`;
|
|
2180
2249
|
e.has(r) || e.set(r, {
|
|
2181
2250
|
label: n.toLocaleString(E.dateLocale, {
|
|
@@ -2191,46 +2260,51 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
|
|
|
2191
2260
|
}));
|
|
2192
2261
|
}, [
|
|
2193
2262
|
C,
|
|
2194
|
-
|
|
2263
|
+
M,
|
|
2195
2264
|
E.dateLocale
|
|
2196
|
-
]),
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
]),
|
|
2201
|
-
count:
|
|
2265
|
+
]), F = a(() => wn(A, j, N), [
|
|
2266
|
+
A,
|
|
2267
|
+
j,
|
|
2268
|
+
N
|
|
2269
|
+
]), I = a(() => p ? Zt(b) : /* @__PURE__ */ new Set(), [p, b]), R = we({
|
|
2270
|
+
count: A.length,
|
|
2202
2271
|
getScrollElement: () => e.current,
|
|
2203
2272
|
estimateSize: () => 40,
|
|
2204
2273
|
overscan: 5
|
|
2205
|
-
}),
|
|
2274
|
+
}), z = a(() => {
|
|
2206
2275
|
if (C !== "days") return [];
|
|
2207
2276
|
let e = 0;
|
|
2208
|
-
return
|
|
2277
|
+
return M.flatMap((t) => {
|
|
2209
2278
|
let n = t.isWeekend ? [{
|
|
2210
2279
|
key: t.key,
|
|
2211
2280
|
left: e
|
|
2212
2281
|
}] : [];
|
|
2213
2282
|
return e += t.width, n;
|
|
2214
2283
|
});
|
|
2215
|
-
}, [C,
|
|
2216
|
-
let e = Date.now(), t =
|
|
2217
|
-
return e < t || e > n ? null : (e - t) / (n - t) *
|
|
2218
|
-
}, [
|
|
2284
|
+
}, [C, M]), B = a(() => {
|
|
2285
|
+
let e = Date.now(), t = j.start.getTime(), n = j.end.getTime();
|
|
2286
|
+
return e < t || e > n ? null : (e - t) / (n - t) * N;
|
|
2287
|
+
}, [j, N]), V = a(() => (/* @__PURE__ */ new Date()).toLocaleDateString(E.dateLocale, {
|
|
2288
|
+
weekday: "long",
|
|
2289
|
+
day: "numeric",
|
|
2290
|
+
month: "long",
|
|
2291
|
+
year: "numeric"
|
|
2292
|
+
}), [E.dateLocale]), G = O ?? D.palette.primary.main;
|
|
2219
2293
|
r(() => {
|
|
2220
|
-
if (
|
|
2294
|
+
if (B === null || !e.current) return;
|
|
2221
2295
|
let t = e.current.clientWidth;
|
|
2222
|
-
e.current.scrollLeft = Math.max(0,
|
|
2296
|
+
e.current.scrollLeft = Math.max(0, B - t / 2);
|
|
2223
2297
|
}, []);
|
|
2224
|
-
let
|
|
2225
|
-
totalWidth:
|
|
2226
|
-
displayRange:
|
|
2298
|
+
let K = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, q = P ? 80 : 40, { activeDrag: J, suppressClickRef: ee, handleBarMouseDown: te, handleProgressMouseDown: ne, formatDragDate: Y } = mn({
|
|
2299
|
+
totalWidth: N,
|
|
2300
|
+
displayRange: j,
|
|
2227
2301
|
onTaskMoved: h,
|
|
2228
2302
|
onTaskResized: g,
|
|
2229
2303
|
onTasksChange: _
|
|
2230
|
-
}), [
|
|
2231
|
-
|
|
2232
|
-
let
|
|
2233
|
-
return
|
|
2304
|
+
}), [re, ie] = s(null), ae = o(v);
|
|
2305
|
+
ae.current = v;
|
|
2306
|
+
let oe = o(_);
|
|
2307
|
+
return oe.current = _, /* @__PURE__ */ U(l, {
|
|
2234
2308
|
ref: e,
|
|
2235
2309
|
onScroll: t,
|
|
2236
2310
|
"data-testid": "gantt-timeline-scroll",
|
|
@@ -2240,88 +2314,92 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
|
|
|
2240
2314
|
},
|
|
2241
2315
|
children: /* @__PURE__ */ W(l, {
|
|
2242
2316
|
sx: {
|
|
2243
|
-
minWidth:
|
|
2317
|
+
minWidth: N,
|
|
2244
2318
|
position: "relative"
|
|
2245
2319
|
},
|
|
2246
2320
|
children: [
|
|
2247
|
-
/* @__PURE__ */ U(
|
|
2248
|
-
columns:
|
|
2249
|
-
groups:
|
|
2321
|
+
/* @__PURE__ */ U(gn, {
|
|
2322
|
+
columns: M,
|
|
2323
|
+
groups: P,
|
|
2324
|
+
todayX: B,
|
|
2325
|
+
todayLabel: E.todayLabel,
|
|
2326
|
+
todayTooltip: V,
|
|
2327
|
+
todayColor: G
|
|
2250
2328
|
}),
|
|
2251
|
-
/* @__PURE__ */ U(
|
|
2252
|
-
strips:
|
|
2253
|
-
totalWidth:
|
|
2254
|
-
height:
|
|
2255
|
-
top:
|
|
2329
|
+
/* @__PURE__ */ U(xn, {
|
|
2330
|
+
strips: z,
|
|
2331
|
+
totalWidth: N,
|
|
2332
|
+
height: A.length * 40,
|
|
2333
|
+
top: q
|
|
2256
2334
|
}),
|
|
2257
2335
|
m ? /* @__PURE__ */ U(l, {
|
|
2258
2336
|
sx: {
|
|
2259
2337
|
position: "relative",
|
|
2260
|
-
height:
|
|
2338
|
+
height: R.getTotalSize()
|
|
2261
2339
|
},
|
|
2262
|
-
children:
|
|
2263
|
-
task:
|
|
2340
|
+
children: R.getVirtualItems().map((e) => /* @__PURE__ */ U(_n, {
|
|
2341
|
+
task: A[e.index],
|
|
2264
2342
|
virtualTop: e.start,
|
|
2265
|
-
activeDrag:
|
|
2266
|
-
displayRange:
|
|
2267
|
-
totalWidth:
|
|
2268
|
-
gridColumnWidth:
|
|
2269
|
-
criticalTaskIds:
|
|
2343
|
+
activeDrag: J,
|
|
2344
|
+
displayRange: j,
|
|
2345
|
+
totalWidth: N,
|
|
2346
|
+
gridColumnWidth: K,
|
|
2347
|
+
criticalTaskIds: I,
|
|
2270
2348
|
draggable: u,
|
|
2271
2349
|
resizable: d,
|
|
2272
2350
|
progressDraggable: f,
|
|
2273
2351
|
onTaskClick: n,
|
|
2274
2352
|
onMilestoneClick: c,
|
|
2275
|
-
onContextMenu: (e, t, n) =>
|
|
2353
|
+
onContextMenu: (e, t, n) => ie({
|
|
2276
2354
|
task: e,
|
|
2277
2355
|
mouseX: t,
|
|
2278
2356
|
mouseY: n
|
|
2279
2357
|
}),
|
|
2280
|
-
suppressClickRef:
|
|
2281
|
-
handleBarMouseDown:
|
|
2282
|
-
handleProgressMouseDown:
|
|
2283
|
-
formatDragDate:
|
|
2358
|
+
suppressClickRef: ee,
|
|
2359
|
+
handleBarMouseDown: te,
|
|
2360
|
+
handleProgressMouseDown: ne,
|
|
2361
|
+
formatDragDate: Y
|
|
2284
2362
|
}, e.key))
|
|
2285
|
-
}) : /* @__PURE__ */ U(H, { children:
|
|
2363
|
+
}) : /* @__PURE__ */ U(H, { children: A.map((e) => /* @__PURE__ */ U(_n, {
|
|
2286
2364
|
task: e,
|
|
2287
|
-
activeDrag:
|
|
2288
|
-
displayRange:
|
|
2289
|
-
totalWidth:
|
|
2290
|
-
gridColumnWidth:
|
|
2291
|
-
criticalTaskIds:
|
|
2365
|
+
activeDrag: J,
|
|
2366
|
+
displayRange: j,
|
|
2367
|
+
totalWidth: N,
|
|
2368
|
+
gridColumnWidth: K,
|
|
2369
|
+
criticalTaskIds: I,
|
|
2292
2370
|
draggable: u,
|
|
2293
2371
|
resizable: d,
|
|
2294
2372
|
progressDraggable: f,
|
|
2295
2373
|
onTaskClick: n,
|
|
2296
2374
|
onMilestoneClick: c,
|
|
2297
|
-
onContextMenu: (e, t, n) =>
|
|
2375
|
+
onContextMenu: (e, t, n) => ie({
|
|
2298
2376
|
task: e,
|
|
2299
2377
|
mouseX: t,
|
|
2300
2378
|
mouseY: n
|
|
2301
2379
|
}),
|
|
2302
|
-
suppressClickRef:
|
|
2303
|
-
handleBarMouseDown:
|
|
2304
|
-
handleProgressMouseDown:
|
|
2305
|
-
formatDragDate:
|
|
2380
|
+
suppressClickRef: ee,
|
|
2381
|
+
handleBarMouseDown: te,
|
|
2382
|
+
handleProgressMouseDown: ne,
|
|
2383
|
+
formatDragDate: Y
|
|
2306
2384
|
}, e.id)) }),
|
|
2307
|
-
/* @__PURE__ */ U(
|
|
2308
|
-
contextMenu:
|
|
2309
|
-
onClose: () =>
|
|
2385
|
+
/* @__PURE__ */ U(Sn, {
|
|
2386
|
+
contextMenu: re,
|
|
2387
|
+
onClose: () => ie(null),
|
|
2310
2388
|
onSelect: (e, t) => {
|
|
2311
2389
|
let n = T.getState().tasks.find((t) => t.id === e.id) ?? e;
|
|
2312
2390
|
w({
|
|
2313
2391
|
...n,
|
|
2314
2392
|
status: t
|
|
2315
|
-
}),
|
|
2393
|
+
}), ae.current?.(n, t), oe.current?.(T.getState().tasks), ie(null);
|
|
2316
2394
|
}
|
|
2317
2395
|
}),
|
|
2318
|
-
/* @__PURE__ */ U(
|
|
2319
|
-
dependencyLines:
|
|
2320
|
-
todayX:
|
|
2321
|
-
totalWidth:
|
|
2322
|
-
height:
|
|
2323
|
-
top:
|
|
2324
|
-
arrowMarkerId:
|
|
2396
|
+
/* @__PURE__ */ U(Cn, {
|
|
2397
|
+
dependencyLines: F,
|
|
2398
|
+
todayX: B,
|
|
2399
|
+
totalWidth: N,
|
|
2400
|
+
height: A.length * 40,
|
|
2401
|
+
top: q,
|
|
2402
|
+
arrowMarkerId: k
|
|
2325
2403
|
})
|
|
2326
2404
|
]
|
|
2327
2405
|
})
|
|
@@ -2329,14 +2407,14 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
|
|
|
2329
2407
|
}
|
|
2330
2408
|
//#endregion
|
|
2331
2409
|
//#region src/components/gantt-chart/GanttToolbar.tsx
|
|
2332
|
-
function
|
|
2410
|
+
function En(e) {
|
|
2333
2411
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
2334
2412
|
}
|
|
2335
|
-
function
|
|
2413
|
+
function Dn(e) {
|
|
2336
2414
|
let [t, n, r] = e.split("-").map(Number);
|
|
2337
2415
|
return !t || !n || !r ? null : new Date(t, n - 1, r, 0, 0, 0, 0);
|
|
2338
2416
|
}
|
|
2339
|
-
function
|
|
2417
|
+
function On({ onScrollToToday: e, config: t }) {
|
|
2340
2418
|
let n = $(), r = Q((e) => e.timeScale), i = Q((e) => e.defaultTimeScale), o = Q((e) => e.setTimeScale), s = Q((e) => e.timelineRange), c = Q((e) => e.isRangeCustomized), u = Q((e) => e.isExpandedCustomized), d = Q((e) => e.setTimelineRange), f = Q((e) => e.resetTimelineRange), p = Q((e) => e.resetView), m = Q((e) => e.tasks), h = Q((e) => e.expandedIds), g = Q((e) => e.expandAll), _ = Q((e) => e.collapseAll), v = m.length > 0 && m.every((e) => h.has(e.id)), y = r !== i || c || u, b = a(() => Date.now(), []), x = b >= s.start.getTime() && b <= s.end.getTime(), C = {
|
|
2341
2419
|
days: n.scaleDays,
|
|
2342
2420
|
weeks: n.scaleWeeks,
|
|
@@ -2405,9 +2483,9 @@ function Dn({ onScrollToToday: e, config: t }) {
|
|
|
2405
2483
|
type: "date",
|
|
2406
2484
|
size: "small",
|
|
2407
2485
|
label: n.rangeFrom,
|
|
2408
|
-
value:
|
|
2486
|
+
value: En(s.start),
|
|
2409
2487
|
onChange: (e) => {
|
|
2410
|
-
let t =
|
|
2488
|
+
let t = Dn(e.target.value);
|
|
2411
2489
|
t && d({
|
|
2412
2490
|
start: t,
|
|
2413
2491
|
end: s.end
|
|
@@ -2422,9 +2500,9 @@ function Dn({ onScrollToToday: e, config: t }) {
|
|
|
2422
2500
|
type: "date",
|
|
2423
2501
|
size: "small",
|
|
2424
2502
|
label: n.rangeTo,
|
|
2425
|
-
value:
|
|
2503
|
+
value: En(s.end),
|
|
2426
2504
|
onChange: (e) => {
|
|
2427
|
-
let t =
|
|
2505
|
+
let t = Dn(e.target.value);
|
|
2428
2506
|
t && d({
|
|
2429
2507
|
start: s.start,
|
|
2430
2508
|
end: t
|
|
@@ -2461,34 +2539,34 @@ function Dn({ onScrollToToday: e, config: t }) {
|
|
|
2461
2539
|
}
|
|
2462
2540
|
//#endregion
|
|
2463
2541
|
//#region src/components/gantt-chart/GanttChart.tsx
|
|
2464
|
-
var
|
|
2542
|
+
var kn = e(null);
|
|
2465
2543
|
function Q(e) {
|
|
2466
|
-
let t = n(
|
|
2544
|
+
let t = n(kn);
|
|
2467
2545
|
if (!t) throw Error("GanttChartStoreContext is missing.");
|
|
2468
2546
|
return Se(t, e);
|
|
2469
2547
|
}
|
|
2470
|
-
function
|
|
2471
|
-
let e = n(
|
|
2548
|
+
function An() {
|
|
2549
|
+
let e = n(kn);
|
|
2472
2550
|
if (!e) throw Error("GanttChartStoreContext is missing.");
|
|
2473
2551
|
return e;
|
|
2474
2552
|
}
|
|
2475
|
-
var
|
|
2553
|
+
var jn = e(en);
|
|
2476
2554
|
function $() {
|
|
2477
|
-
return n(An);
|
|
2478
|
-
}
|
|
2479
|
-
var jn = e({});
|
|
2480
|
-
function Mn() {
|
|
2481
2555
|
return n(jn);
|
|
2482
2556
|
}
|
|
2483
|
-
|
|
2557
|
+
var Mn = e({});
|
|
2558
|
+
function Nn() {
|
|
2559
|
+
return n(Mn);
|
|
2560
|
+
}
|
|
2561
|
+
function Pn(e, t) {
|
|
2484
2562
|
return e === void 0 ? t : e === "auto" ? "100%" : typeof e == "string" && /^\d+$/.test(e) ? Number(e) : e;
|
|
2485
2563
|
}
|
|
2486
|
-
var
|
|
2564
|
+
var Fn = [
|
|
2487
2565
|
"days",
|
|
2488
2566
|
"weeks",
|
|
2489
2567
|
"months",
|
|
2490
2568
|
"quarters"
|
|
2491
|
-
],
|
|
2569
|
+
], In = {
|
|
2492
2570
|
showScaleDays: !0,
|
|
2493
2571
|
showScaleWeeks: !0,
|
|
2494
2572
|
showScaleMonths: !0,
|
|
@@ -2499,11 +2577,11 @@ var Pn = [
|
|
|
2499
2577
|
showRangeReset: !0,
|
|
2500
2578
|
showResetView: !0
|
|
2501
2579
|
};
|
|
2502
|
-
function
|
|
2503
|
-
let N =
|
|
2504
|
-
...
|
|
2580
|
+
function Ln({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m = !0, onTaskCreated: h, onTaskUpdated: g, onTaskDeleted: _, showToolbar: v = !0, toolbarConfig: y, height: b, width: x, minPanelWidth: S = 200, maxPanelWidth: C = 600, zoomable: w = !1, draggable: T = !1, resizable: E = !1, inlineEdit: D = !1, progressDraggable: O = !1, showCriticalPath: k = !1, virtualizeRows: A = !1, onTaskMoved: j, onTaskResized: M }) {
|
|
2581
|
+
let N = Pn(b, 400), P = a(() => ({
|
|
2582
|
+
...In,
|
|
2505
2583
|
...y
|
|
2506
|
-
}), [y]), F =
|
|
2584
|
+
}), [y]), F = Pn(x, "100%"), I = Q((e) => e.setTasks), L = Q((e) => e.timeScale), R = Q((e) => e.setTimeScale), z = Q((e) => e.timelineRange), B = o(null), V = o(null), H = o(!1), [G, K] = s(320);
|
|
2507
2585
|
r(() => {
|
|
2508
2586
|
I(e);
|
|
2509
2587
|
}, [e, I]);
|
|
@@ -2521,8 +2599,8 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
|
|
|
2521
2599
|
let e = V.current, t = (e) => {
|
|
2522
2600
|
if (!e.ctrlKey) return;
|
|
2523
2601
|
e.preventDefault();
|
|
2524
|
-
let t =
|
|
2525
|
-
e.deltaY < 0 && t > 0 ? R(
|
|
2602
|
+
let t = Fn.indexOf(L);
|
|
2603
|
+
e.deltaY < 0 && t > 0 ? R(Fn[t - 1]) : e.deltaY > 0 && t < Fn.length - 1 && R(Fn[t + 1]);
|
|
2526
2604
|
};
|
|
2527
2605
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
2528
2606
|
}, [
|
|
@@ -2555,7 +2633,7 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
|
|
|
2555
2633
|
borderRadius: 1,
|
|
2556
2634
|
overflow: "hidden"
|
|
2557
2635
|
},
|
|
2558
|
-
children: [v && /* @__PURE__ */ U(
|
|
2636
|
+
children: [v && /* @__PURE__ */ U(On, {
|
|
2559
2637
|
onScrollToToday: ee,
|
|
2560
2638
|
config: P
|
|
2561
2639
|
}), /* @__PURE__ */ W(l, {
|
|
@@ -2565,7 +2643,7 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
|
|
|
2565
2643
|
overflow: "hidden"
|
|
2566
2644
|
},
|
|
2567
2645
|
children: [
|
|
2568
|
-
/* @__PURE__ */ U(
|
|
2646
|
+
/* @__PURE__ */ U(fn, {
|
|
2569
2647
|
scrollRef: B,
|
|
2570
2648
|
onScroll: q,
|
|
2571
2649
|
panelWidth: G,
|
|
@@ -2593,7 +2671,7 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
|
|
|
2593
2671
|
},
|
|
2594
2672
|
onMouseDown: te
|
|
2595
2673
|
}),
|
|
2596
|
-
/* @__PURE__ */ U(
|
|
2674
|
+
/* @__PURE__ */ U(Tn, {
|
|
2597
2675
|
scrollRef: V,
|
|
2598
2676
|
onScroll: J,
|
|
2599
2677
|
onTaskClick: n,
|
|
@@ -2612,14 +2690,14 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
|
|
|
2612
2690
|
})]
|
|
2613
2691
|
});
|
|
2614
2692
|
}
|
|
2615
|
-
function
|
|
2693
|
+
function Rn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showToolbar: r = !0, defaultRangeStart: i, defaultRangeEnd: o, translations: c, enableBuiltinDialogs: l = !0, toolbarConfig: u, zoomable: d = !1, draggable: f = !1, resizable: p = !1, inlineEdit: m = !1, progressDraggable: h = !1, showCriticalPath: g = !1, virtualizeRows: _ = !1, cascadeDependencies: v = !1, statusColors: y, ganttTheme: b, onTaskClick: x, onMilestoneClick: S, onAddTask: C, onEditTask: w, onDeleteTask: T, onStatusChange: E, onTasksChange: D, onTaskMoved: O, onTaskResized: k, onTaskCreated: A, onTaskUpdated: j, onTaskDeleted: M, height: N, width: P, minPanelWidth: F, maxPanelWidth: I }) {
|
|
2616
2694
|
let L = a(() => ({
|
|
2617
|
-
|
|
2695
|
+
...en,
|
|
2618
2696
|
...c
|
|
2619
2697
|
}), [c]), [R] = s(() => {
|
|
2620
|
-
if (!(i !== void 0 || o !== void 0)) return
|
|
2698
|
+
if (!(i !== void 0 || o !== void 0)) return $t(e, t, n, void 0, v);
|
|
2621
2699
|
let r = Mt(e);
|
|
2622
|
-
return
|
|
2700
|
+
return $t(e, t, n, {
|
|
2623
2701
|
start: i ?? r.start,
|
|
2624
2702
|
end: o ?? r.end
|
|
2625
2703
|
}, v);
|
|
@@ -2630,13 +2708,13 @@ function Ln({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
|
|
|
2630
2708
|
...b?.statusColors
|
|
2631
2709
|
}
|
|
2632
2710
|
}), [y, b]);
|
|
2633
|
-
return /* @__PURE__ */ U(
|
|
2711
|
+
return /* @__PURE__ */ U(jn.Provider, {
|
|
2634
2712
|
value: L,
|
|
2635
|
-
children: /* @__PURE__ */ U(
|
|
2713
|
+
children: /* @__PURE__ */ U(Mn.Provider, {
|
|
2636
2714
|
value: z,
|
|
2637
|
-
children: /* @__PURE__ */ U(
|
|
2715
|
+
children: /* @__PURE__ */ U(kn.Provider, {
|
|
2638
2716
|
value: R,
|
|
2639
|
-
children: /* @__PURE__ */ U(
|
|
2717
|
+
children: /* @__PURE__ */ U(Ln, {
|
|
2640
2718
|
tasks: e,
|
|
2641
2719
|
timeScale: t,
|
|
2642
2720
|
enableBuiltinDialogs: l,
|
|
@@ -2672,8 +2750,8 @@ function Ln({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
|
|
|
2672
2750
|
}
|
|
2673
2751
|
//#endregion
|
|
2674
2752
|
//#region src/components/password-strength-meter/util/password-strength.util.ts
|
|
2675
|
-
var
|
|
2676
|
-
function
|
|
2753
|
+
var zn = (e) => Math.max(0, Math.min(4, Math.round(e)));
|
|
2754
|
+
function Bn(e, t) {
|
|
2677
2755
|
let n = e ?? "", r = n.length, i = /[a-z]/.test(n), a = /[A-Z]/.test(n), o = /\d/.test(n), s = /[^A-Za-z0-9]/.test(n), c = [
|
|
2678
2756
|
i,
|
|
2679
2757
|
a,
|
|
@@ -2695,7 +2773,7 @@ function zn(e, t) {
|
|
|
2695
2773
|
}
|
|
2696
2774
|
let l = 0;
|
|
2697
2775
|
l += 1, r >= t + 4 && (l += 1), c >= 2 && (l += 1), c >= 3 && (l += 1), /^(.)\1+$/.test(n) && (l -= 2), /1234|abcd|qwer|password|passwort|admin/i.test(n) && (l -= 2);
|
|
2698
|
-
let u =
|
|
2776
|
+
let u = zn(l), d = u <= 1 ? "weak" : u === 2 ? "ok" : u === 3 ? "good" : "very good";
|
|
2699
2777
|
return {
|
|
2700
2778
|
score: u,
|
|
2701
2779
|
percent: u * 25,
|
|
@@ -2709,7 +2787,40 @@ function zn(e, t) {
|
|
|
2709
2787
|
}
|
|
2710
2788
|
//#endregion
|
|
2711
2789
|
//#region src/components/password-strength-meter/PasswordStrengthBar.tsx
|
|
2712
|
-
function
|
|
2790
|
+
function Vn({ percent: e, color: t, ariaLabel: n, segments: r = !1 }) {
|
|
2791
|
+
if (r) {
|
|
2792
|
+
let r = Math.round(e / 25);
|
|
2793
|
+
return /* @__PURE__ */ U(l, {
|
|
2794
|
+
role: "progressbar",
|
|
2795
|
+
"aria-label": n,
|
|
2796
|
+
"aria-valuenow": e,
|
|
2797
|
+
"aria-valuemin": 0,
|
|
2798
|
+
"aria-valuemax": 100,
|
|
2799
|
+
sx: {
|
|
2800
|
+
width: "100%",
|
|
2801
|
+
display: "flex",
|
|
2802
|
+
gap: "3px",
|
|
2803
|
+
mt: .5
|
|
2804
|
+
},
|
|
2805
|
+
children: [
|
|
2806
|
+
0,
|
|
2807
|
+
1,
|
|
2808
|
+
2,
|
|
2809
|
+
3
|
|
2810
|
+
].map((e) => /* @__PURE__ */ U(l, {
|
|
2811
|
+
"data-testid": e < r ? "psm-meter-segment-active" : "psm-meter-segment",
|
|
2812
|
+
sx: {
|
|
2813
|
+
flex: 1,
|
|
2814
|
+
height: "8px",
|
|
2815
|
+
borderRadius: "3px",
|
|
2816
|
+
border: "1px solid",
|
|
2817
|
+
borderColor: "divider",
|
|
2818
|
+
backgroundColor: e < r ? t : "transparent",
|
|
2819
|
+
transition: "background-color 0.3s ease-in-out"
|
|
2820
|
+
}
|
|
2821
|
+
}, e))
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2713
2824
|
return /* @__PURE__ */ U(l, {
|
|
2714
2825
|
role: "progressbar",
|
|
2715
2826
|
"aria-label": n,
|
|
@@ -2739,7 +2850,7 @@ function Bn({ percent: e, color: t, ariaLabel: n }) {
|
|
|
2739
2850
|
}
|
|
2740
2851
|
//#endregion
|
|
2741
2852
|
//#region src/components/password-strength-meter/PasswordStrengthMeter.types.ts
|
|
2742
|
-
var
|
|
2853
|
+
var Hn = {
|
|
2743
2854
|
label: "Password",
|
|
2744
2855
|
summaryHeaderLabel: "Requirements for your password",
|
|
2745
2856
|
summaryMinChars: "At least {n} characters",
|
|
@@ -2750,18 +2861,18 @@ var Vn = {
|
|
|
2750
2861
|
showPasswordLabel: "Show password",
|
|
2751
2862
|
hidePasswordLabel: "Hide password",
|
|
2752
2863
|
meterAriaLabel: "Password strength"
|
|
2753
|
-
},
|
|
2864
|
+
}, Un = {
|
|
2754
2865
|
weak: "#cc0000",
|
|
2755
2866
|
ok: "#fdc010",
|
|
2756
2867
|
good: "#8bc34a",
|
|
2757
2868
|
veryGood: "#43a047"
|
|
2758
|
-
},
|
|
2869
|
+
}, Wn = {
|
|
2759
2870
|
failure: "#cc0000",
|
|
2760
2871
|
success: "#43a047"
|
|
2761
2872
|
};
|
|
2762
2873
|
//#endregion
|
|
2763
2874
|
//#region src/components/password-strength-meter/PasswordStrengthMeter.tsx
|
|
2764
|
-
function
|
|
2875
|
+
function Gn({ label: e, fulfilled: t, checkColors: n }) {
|
|
2765
2876
|
return /* @__PURE__ */ W(j, {
|
|
2766
2877
|
direction: "row",
|
|
2767
2878
|
sx: {
|
|
@@ -2787,14 +2898,14 @@ function Wn({ label: e, fulfilled: t, checkColors: n }) {
|
|
|
2787
2898
|
})]
|
|
2788
2899
|
});
|
|
2789
2900
|
}
|
|
2790
|
-
function
|
|
2791
|
-
let
|
|
2792
|
-
...Vn,
|
|
2793
|
-
...h
|
|
2794
|
-
}, E = {
|
|
2901
|
+
function Kn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, helperText: c, autoComplete: u, customRequirements: d, showPasswordAdornment: f = !0, showMeter: p = !0, showSegmentedBar: m = !1, showSummary: h = !0, inputSize: g = "medium", translation: _, meterColors: v, passwordMinLength: b = 8, checkColors: T = Wn, onPasswordChange: E }) {
|
|
2902
|
+
let O = {
|
|
2795
2903
|
...Hn,
|
|
2796
|
-
...
|
|
2797
|
-
},
|
|
2904
|
+
..._
|
|
2905
|
+
}, k = {
|
|
2906
|
+
...Un,
|
|
2907
|
+
...v
|
|
2908
|
+
}, A = `${i()}-password`, [M, N] = s(!1), [P, F] = s(""), L = e === void 0 ? P : e, R = a(() => Bn(L, b), [L, b]);
|
|
2798
2909
|
return /* @__PURE__ */ W(j, { children: [
|
|
2799
2910
|
/* @__PURE__ */ W(y, {
|
|
2800
2911
|
variant: "outlined",
|
|
@@ -2802,19 +2913,19 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
|
|
|
2802
2913
|
error: o,
|
|
2803
2914
|
children: [
|
|
2804
2915
|
/* @__PURE__ */ U(w, {
|
|
2805
|
-
htmlFor:
|
|
2806
|
-
size:
|
|
2807
|
-
children:
|
|
2916
|
+
htmlFor: A,
|
|
2917
|
+
size: g,
|
|
2918
|
+
children: O.label
|
|
2808
2919
|
}),
|
|
2809
2920
|
/* @__PURE__ */ U(D, {
|
|
2810
|
-
id:
|
|
2811
|
-
type:
|
|
2921
|
+
id: A,
|
|
2922
|
+
type: M ? "text" : "password",
|
|
2812
2923
|
fullWidth: !0,
|
|
2813
|
-
size:
|
|
2814
|
-
value:
|
|
2924
|
+
size: g,
|
|
2925
|
+
value: L,
|
|
2815
2926
|
onChange: (t) => {
|
|
2816
2927
|
let n = t.target.value;
|
|
2817
|
-
e === void 0 &&
|
|
2928
|
+
e === void 0 && F(n), E && E(n, Bn(n, b));
|
|
2818
2929
|
},
|
|
2819
2930
|
disabled: r,
|
|
2820
2931
|
inputRef: n,
|
|
@@ -2823,14 +2934,14 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
|
|
|
2823
2934
|
name: t,
|
|
2824
2935
|
autoComplete: u
|
|
2825
2936
|
},
|
|
2826
|
-
endAdornment:
|
|
2937
|
+
endAdornment: f ? /* @__PURE__ */ U(C, {
|
|
2827
2938
|
position: "end",
|
|
2828
2939
|
children: /* @__PURE__ */ U(S, {
|
|
2829
2940
|
"data-testid": "psm-toggle",
|
|
2830
2941
|
disabled: r,
|
|
2831
|
-
"aria-label":
|
|
2942
|
+
"aria-label": M ? O.hidePasswordLabel : O.showPasswordLabel,
|
|
2832
2943
|
onClick: () => {
|
|
2833
|
-
|
|
2944
|
+
N((e) => !e);
|
|
2834
2945
|
},
|
|
2835
2946
|
onMouseDown: (e) => {
|
|
2836
2947
|
e.preventDefault();
|
|
@@ -2839,28 +2950,29 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
|
|
|
2839
2950
|
e.preventDefault();
|
|
2840
2951
|
},
|
|
2841
2952
|
edge: "end",
|
|
2842
|
-
children: U(
|
|
2953
|
+
children: U(M ? Ne : Me, {})
|
|
2843
2954
|
})
|
|
2844
2955
|
}) : null,
|
|
2845
|
-
label:
|
|
2956
|
+
label: O.label
|
|
2846
2957
|
}),
|
|
2847
2958
|
c && /* @__PURE__ */ U(x, { children: c })
|
|
2848
2959
|
]
|
|
2849
2960
|
}),
|
|
2850
|
-
|
|
2851
|
-
percent:
|
|
2961
|
+
p && /* @__PURE__ */ U(Vn, {
|
|
2962
|
+
percent: R.percent,
|
|
2852
2963
|
color: ((e) => {
|
|
2853
2964
|
switch (e.meterStatus) {
|
|
2854
|
-
case "weak": return
|
|
2855
|
-
case "ok": return
|
|
2856
|
-
case "good": return
|
|
2857
|
-
case "very good": return
|
|
2965
|
+
case "weak": return k.weak;
|
|
2966
|
+
case "ok": return k.ok;
|
|
2967
|
+
case "good": return k.good;
|
|
2968
|
+
case "very good": return k.veryGood;
|
|
2858
2969
|
default: return "transparent";
|
|
2859
2970
|
}
|
|
2860
|
-
})(
|
|
2861
|
-
ariaLabel:
|
|
2971
|
+
})(R),
|
|
2972
|
+
ariaLabel: O.meterAriaLabel,
|
|
2973
|
+
segments: m
|
|
2862
2974
|
}),
|
|
2863
|
-
|
|
2975
|
+
h && /* @__PURE__ */ W(l, {
|
|
2864
2976
|
"data-testid": "psm-summary",
|
|
2865
2977
|
sx: {
|
|
2866
2978
|
mt: .5,
|
|
@@ -2873,40 +2985,48 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
|
|
|
2873
2985
|
display: "block",
|
|
2874
2986
|
fontSize: 14
|
|
2875
2987
|
},
|
|
2876
|
-
children:
|
|
2988
|
+
children: O.summaryHeaderLabel
|
|
2877
2989
|
}), /* @__PURE__ */ W(j, {
|
|
2878
2990
|
direction: "row",
|
|
2879
2991
|
spacing: 6,
|
|
2880
2992
|
children: [/* @__PURE__ */ W(j, {
|
|
2881
2993
|
direction: "column",
|
|
2882
2994
|
children: [
|
|
2883
|
-
/* @__PURE__ */ U(
|
|
2884
|
-
label:
|
|
2885
|
-
fulfilled:
|
|
2886
|
-
checkColors:
|
|
2995
|
+
/* @__PURE__ */ U(Gn, {
|
|
2996
|
+
label: O.summaryMinChars.replace("{n}", String(b)),
|
|
2997
|
+
fulfilled: R.length >= b,
|
|
2998
|
+
checkColors: T
|
|
2887
2999
|
}),
|
|
2888
|
-
/* @__PURE__ */ U(
|
|
2889
|
-
label:
|
|
2890
|
-
fulfilled:
|
|
2891
|
-
checkColors:
|
|
3000
|
+
/* @__PURE__ */ U(Gn, {
|
|
3001
|
+
label: O.summaryCapitalLetter,
|
|
3002
|
+
fulfilled: R.hasUpper,
|
|
3003
|
+
checkColors: T
|
|
2892
3004
|
}),
|
|
2893
|
-
/* @__PURE__ */ U(
|
|
2894
|
-
label:
|
|
2895
|
-
fulfilled:
|
|
2896
|
-
checkColors:
|
|
3005
|
+
/* @__PURE__ */ U(Gn, {
|
|
3006
|
+
label: O.summaryLowerCaseLetter,
|
|
3007
|
+
fulfilled: R.hasLower,
|
|
3008
|
+
checkColors: T
|
|
2897
3009
|
})
|
|
2898
3010
|
]
|
|
2899
3011
|
}), /* @__PURE__ */ W(j, {
|
|
2900
3012
|
direction: "column",
|
|
2901
|
-
children: [
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
3013
|
+
children: [
|
|
3014
|
+
/* @__PURE__ */ U(Gn, {
|
|
3015
|
+
label: O.summaryNumber,
|
|
3016
|
+
fulfilled: R.hasDigit,
|
|
3017
|
+
checkColors: T
|
|
3018
|
+
}),
|
|
3019
|
+
/* @__PURE__ */ U(Gn, {
|
|
3020
|
+
label: O.summarySpecialChar,
|
|
3021
|
+
fulfilled: R.hasSymbol,
|
|
3022
|
+
checkColors: T
|
|
3023
|
+
}),
|
|
3024
|
+
d?.map((e, t) => /* @__PURE__ */ U(Gn, {
|
|
3025
|
+
label: e.label,
|
|
3026
|
+
fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(L) : e.fulfilled,
|
|
3027
|
+
checkColors: T
|
|
3028
|
+
}, t))
|
|
3029
|
+
]
|
|
2910
3030
|
})]
|
|
2911
3031
|
})]
|
|
2912
3032
|
})
|
|
@@ -2914,7 +3034,7 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
|
|
|
2914
3034
|
}
|
|
2915
3035
|
//#endregion
|
|
2916
3036
|
//#region src/components/tag-selection/TagSelection.store.ts
|
|
2917
|
-
function
|
|
3037
|
+
function qn(e) {
|
|
2918
3038
|
return Ce((t) => ({
|
|
2919
3039
|
tags: e,
|
|
2920
3040
|
searchValue: "",
|
|
@@ -2952,7 +3072,7 @@ function Kn(e) {
|
|
|
2952
3072
|
}
|
|
2953
3073
|
//#endregion
|
|
2954
3074
|
//#region src/components/tag-selection/TagSelectionAutocomplete.tsx
|
|
2955
|
-
var
|
|
3075
|
+
var Jn = [
|
|
2956
3076
|
"default",
|
|
2957
3077
|
"primary",
|
|
2958
3078
|
"secondary",
|
|
@@ -2961,7 +3081,7 @@ var qn = [
|
|
|
2961
3081
|
"success",
|
|
2962
3082
|
"warning"
|
|
2963
3083
|
];
|
|
2964
|
-
function
|
|
3084
|
+
function Yn({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: u = "medium", disabled: d = !1, loading: p = !1, isMaxReached: m = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
|
|
2965
3085
|
let [_, v] = s("default"), [y, b] = s(!1), x = d || m, C = e.filter((e) => e.label.toLowerCase().includes(t.trim().toLowerCase())), w = h && t.trim() !== "" && C.length === 0, T = y && !w, E = () => {
|
|
2966
3086
|
a?.(t.trim(), _), v("default");
|
|
2967
3087
|
}, D = () => {
|
|
@@ -3060,7 +3180,7 @@ function Jn({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3060
3180
|
gap: .5,
|
|
3061
3181
|
alignItems: "center"
|
|
3062
3182
|
},
|
|
3063
|
-
children:
|
|
3183
|
+
children: Jn.map((e) => /* @__PURE__ */ U(f, {
|
|
3064
3184
|
size: u,
|
|
3065
3185
|
color: e,
|
|
3066
3186
|
label: e,
|
|
@@ -3073,7 +3193,7 @@ function Jn({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3073
3193
|
}
|
|
3074
3194
|
//#endregion
|
|
3075
3195
|
//#region src/components/tag-selection/TagSelectionChip.tsx
|
|
3076
|
-
function
|
|
3196
|
+
function Xn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
|
|
3077
3197
|
let a = !!(e.foregroundColor || e.backgroundColor);
|
|
3078
3198
|
return /* @__PURE__ */ U(f, {
|
|
3079
3199
|
size: r,
|
|
@@ -3100,7 +3220,7 @@ function Yn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled:
|
|
|
3100
3220
|
}
|
|
3101
3221
|
//#endregion
|
|
3102
3222
|
//#region src/components/tag-selection/TagSelectionSelectedTags.tsx
|
|
3103
|
-
function
|
|
3223
|
+
function Zn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: c = "bottom" }) {
|
|
3104
3224
|
let [u, d] = s(null), p = o === void 0 ? e : e.slice(0, o), m = o === void 0 ? [] : e.slice(o), h = !!u && m.length > 0, g = c === "top" ? {
|
|
3105
3225
|
vertical: "top",
|
|
3106
3226
|
horizontal: "left"
|
|
@@ -3130,7 +3250,7 @@ function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3130
3250
|
flexWrap: "wrap",
|
|
3131
3251
|
gap: 1
|
|
3132
3252
|
},
|
|
3133
|
-
children: [p.map((e) => /* @__PURE__ */ U(
|
|
3253
|
+
children: [p.map((e) => /* @__PURE__ */ U(Xn, {
|
|
3134
3254
|
tag: e,
|
|
3135
3255
|
onDelete: n,
|
|
3136
3256
|
chipSize: i,
|
|
@@ -3155,7 +3275,7 @@ function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3155
3275
|
gap: .5,
|
|
3156
3276
|
maxWidth: 320
|
|
3157
3277
|
},
|
|
3158
|
-
children: m.map((e) => /* @__PURE__ */ U(
|
|
3278
|
+
children: m.map((e) => /* @__PURE__ */ U(Xn, {
|
|
3159
3279
|
tag: e,
|
|
3160
3280
|
onDelete: a ? void 0 : n,
|
|
3161
3281
|
chipSize: i,
|
|
@@ -3168,7 +3288,7 @@ function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3168
3288
|
}
|
|
3169
3289
|
//#endregion
|
|
3170
3290
|
//#region src/components/tag-selection/TagSelection.types.ts
|
|
3171
|
-
var
|
|
3291
|
+
var Qn = {
|
|
3172
3292
|
selectedTagsLabel: "Selected tags",
|
|
3173
3293
|
autoCompleteLabel: "Search and add tags",
|
|
3174
3294
|
noSelectedTagsText: "No tags selected.",
|
|
@@ -3176,14 +3296,14 @@ var Zn = {
|
|
|
3176
3296
|
placeholder: "Type to search...",
|
|
3177
3297
|
loadingText: "Loading...",
|
|
3178
3298
|
maxTagsReachedText: "Maximum number of tags reached."
|
|
3179
|
-
},
|
|
3180
|
-
function
|
|
3181
|
-
let t = n(
|
|
3299
|
+
}, $n = e(null);
|
|
3300
|
+
function er(e) {
|
|
3301
|
+
let t = n($n);
|
|
3182
3302
|
if (!t) throw Error("TagSelectionStoreContext is missing.");
|
|
3183
3303
|
return Se(t, e);
|
|
3184
3304
|
}
|
|
3185
|
-
function
|
|
3186
|
-
let S =
|
|
3305
|
+
function tr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: o = "medium", chipSize: s = "small", disabled: c = !1, loading: u = !1, maxTags: d, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
|
|
3306
|
+
let S = er((e) => e.tags), C = er((e) => e.searchValue), w = er((e) => e.setTags), T = er((e) => e.setSearchValue), E = er((e) => e.selectTag), D = er((e) => e.deleteTag), O = er((e) => e.addTag);
|
|
3187
3307
|
r(() => {
|
|
3188
3308
|
w(e);
|
|
3189
3309
|
}, [e, w]);
|
|
@@ -3192,7 +3312,7 @@ function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3192
3312
|
};
|
|
3193
3313
|
return /* @__PURE__ */ U(l, {
|
|
3194
3314
|
sx: { width: "100%" },
|
|
3195
|
-
children: /* @__PURE__ */ W(j, { children: [t && /* @__PURE__ */ U(
|
|
3315
|
+
children: /* @__PURE__ */ W(j, { children: [t && /* @__PURE__ */ U(Zn, {
|
|
3196
3316
|
selectedTags: k,
|
|
3197
3317
|
translation: g,
|
|
3198
3318
|
onTagDelete: (e) => {
|
|
@@ -3208,7 +3328,7 @@ function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3208
3328
|
disabled: c,
|
|
3209
3329
|
maxVisibleChips: p,
|
|
3210
3330
|
popoverPlacement: m
|
|
3211
|
-
}), i && /* @__PURE__ */ U(
|
|
3331
|
+
}), i && /* @__PURE__ */ U(Yn, {
|
|
3212
3332
|
availableTags: A,
|
|
3213
3333
|
searchValue: C,
|
|
3214
3334
|
translation: g,
|
|
@@ -3245,14 +3365,14 @@ function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3245
3365
|
})] })
|
|
3246
3366
|
});
|
|
3247
3367
|
}
|
|
3248
|
-
function
|
|
3368
|
+
function nr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: r = !0, translation: i, inputSize: a = "medium", chipSize: o = "small", disabled: c = !1, loading: l = !1, maxTags: u, allowCreate: d = !1, maxVisibleChips: f, popoverPlacement: p = "bottom", listboxMaxHeight: m, onTagSelect: h, onTagDelete: g, onTagsChange: _, onSearchChange: v, onTagCreate: y }) {
|
|
3249
3369
|
let b = {
|
|
3250
|
-
...
|
|
3370
|
+
...Qn,
|
|
3251
3371
|
...i
|
|
3252
|
-
}, [x] = s(() =>
|
|
3253
|
-
return /* @__PURE__ */ U(
|
|
3372
|
+
}, [x] = s(() => qn(e));
|
|
3373
|
+
return /* @__PURE__ */ U($n.Provider, {
|
|
3254
3374
|
value: x,
|
|
3255
|
-
children: /* @__PURE__ */ U(
|
|
3375
|
+
children: /* @__PURE__ */ U(tr, {
|
|
3256
3376
|
tags: e,
|
|
3257
3377
|
showSelectedTags: t,
|
|
3258
3378
|
showSelectedTagsLabel: n,
|
|
@@ -3277,7 +3397,7 @@ function tr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3277
3397
|
}
|
|
3278
3398
|
//#endregion
|
|
3279
3399
|
//#region src/components/rich-text-editor/RichTextEditor.types.ts
|
|
3280
|
-
var
|
|
3400
|
+
var rr = {
|
|
3281
3401
|
showBold: !0,
|
|
3282
3402
|
showItalic: !0,
|
|
3283
3403
|
showUnderline: !0,
|
|
@@ -3296,7 +3416,7 @@ var nr = {
|
|
|
3296
3416
|
showUndoRedo: !0,
|
|
3297
3417
|
showClearFormat: !0,
|
|
3298
3418
|
showFullscreenButton: !1
|
|
3299
|
-
},
|
|
3419
|
+
}, ir = {
|
|
3300
3420
|
bold: "Bold",
|
|
3301
3421
|
italic: "Italic",
|
|
3302
3422
|
underline: "Underline",
|
|
@@ -3330,7 +3450,7 @@ var nr = {
|
|
|
3330
3450
|
};
|
|
3331
3451
|
//#endregion
|
|
3332
3452
|
//#region src/components/rich-text-editor/RichTextEditorContent.tsx
|
|
3333
|
-
function
|
|
3453
|
+
function ar({ editor: e, error: t, disabled: n, readonly: r }) {
|
|
3334
3454
|
return /* @__PURE__ */ U(l, {
|
|
3335
3455
|
sx: {
|
|
3336
3456
|
flex: 1,
|
|
@@ -3419,7 +3539,7 @@ function ir({ editor: e, error: t, disabled: n, readonly: r }) {
|
|
|
3419
3539
|
}
|
|
3420
3540
|
//#endregion
|
|
3421
3541
|
//#region src/components/rich-text-editor/RichTextEditorLinkDialog.tsx
|
|
3422
|
-
function
|
|
3542
|
+
function or({ open: e, onClose: t, editor: n, translation: i }) {
|
|
3423
3543
|
let [a, o] = s("");
|
|
3424
3544
|
r(() => {
|
|
3425
3545
|
if (e) {
|
|
@@ -3485,7 +3605,7 @@ function ar({ open: e, onClose: t, editor: n, translation: i }) {
|
|
|
3485
3605
|
}
|
|
3486
3606
|
//#endregion
|
|
3487
3607
|
//#region src/components/rich-text-editor/RichTextEditorColorPicker.tsx
|
|
3488
|
-
var
|
|
3608
|
+
var sr = [
|
|
3489
3609
|
"#000000",
|
|
3490
3610
|
"#434343",
|
|
3491
3611
|
"#666666",
|
|
@@ -3504,7 +3624,7 @@ var or = [
|
|
|
3504
3624
|
"#8a2be2",
|
|
3505
3625
|
"#ff1493",
|
|
3506
3626
|
"#a52a2a"
|
|
3507
|
-
],
|
|
3627
|
+
], cr = [
|
|
3508
3628
|
"#ffff00",
|
|
3509
3629
|
"#ffd700",
|
|
3510
3630
|
"#ffa500",
|
|
@@ -3524,7 +3644,7 @@ var or = [
|
|
|
3524
3644
|
"#ffffff",
|
|
3525
3645
|
"#000000"
|
|
3526
3646
|
];
|
|
3527
|
-
function
|
|
3647
|
+
function lr({ color: e, active: t, onClick: n }) {
|
|
3528
3648
|
return /* @__PURE__ */ U(F, {
|
|
3529
3649
|
title: e,
|
|
3530
3650
|
placement: "top",
|
|
@@ -3566,8 +3686,8 @@ function cr({ color: e, active: t, onClick: n }) {
|
|
|
3566
3686
|
})
|
|
3567
3687
|
});
|
|
3568
3688
|
}
|
|
3569
|
-
function
|
|
3570
|
-
let u = o(null), d = r === "highlight" ?
|
|
3689
|
+
function ur({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: s, removeLabel: c }) {
|
|
3690
|
+
let u = o(null), d = r === "highlight" ? cr : sr;
|
|
3571
3691
|
function f(e) {
|
|
3572
3692
|
a(e.target.value);
|
|
3573
3693
|
}
|
|
@@ -3591,7 +3711,7 @@ function lr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
|
|
|
3591
3711
|
gap: .5,
|
|
3592
3712
|
mb: 1
|
|
3593
3713
|
},
|
|
3594
|
-
children: d.map((e) => /* @__PURE__ */ U(
|
|
3714
|
+
children: d.map((e) => /* @__PURE__ */ U(lr, {
|
|
3595
3715
|
color: e,
|
|
3596
3716
|
active: i?.toLowerCase() === e.toLowerCase(),
|
|
3597
3717
|
onClick: (e) => {
|
|
@@ -3661,7 +3781,7 @@ function lr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
|
|
|
3661
3781
|
}
|
|
3662
3782
|
//#endregion
|
|
3663
3783
|
//#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
|
|
3664
|
-
function
|
|
3784
|
+
function dr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
3665
3785
|
return /* @__PURE__ */ U(F, {
|
|
3666
3786
|
title: e,
|
|
3667
3787
|
arrow: !0,
|
|
@@ -3693,7 +3813,7 @@ function ur({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
|
3693
3813
|
}) })
|
|
3694
3814
|
});
|
|
3695
3815
|
}
|
|
3696
|
-
function
|
|
3816
|
+
function fr({ level: e }) {
|
|
3697
3817
|
return /* @__PURE__ */ W(l, {
|
|
3698
3818
|
component: "span",
|
|
3699
3819
|
sx: {
|
|
@@ -3704,7 +3824,7 @@ function dr({ level: e }) {
|
|
|
3704
3824
|
children: ["H", e]
|
|
3705
3825
|
});
|
|
3706
3826
|
}
|
|
3707
|
-
function
|
|
3827
|
+
function pr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullscreen: i, onToggleFullscreen: a }) {
|
|
3708
3828
|
let [o, c] = s(!1), [u, d] = s(null), [f, p] = s(null), m = r || !e, h = e?.getAttributes("textStyle")?.color, g = e?.getAttributes("highlight")?.color, _ = t.showBold || t.showItalic || t.showUnderline || t.showStrike, y = t.showHeading1 || t.showHeading2 || t.showHeading3, b = t.showBulletList || t.showOrderedList, x = t.showBlockquote || t.showCodeBlock || t.showLink || t.showHorizontalRule, C = t.showTextColor || t.showHighlight, w = t.showUndoRedo || t.showClearFormat, T = [
|
|
3709
3829
|
_,
|
|
3710
3830
|
y,
|
|
@@ -3739,28 +3859,28 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3739
3859
|
gap: .25
|
|
3740
3860
|
},
|
|
3741
3861
|
children: [
|
|
3742
|
-
t.showBold && /* @__PURE__ */ U(
|
|
3862
|
+
t.showBold && /* @__PURE__ */ U(Z, {
|
|
3743
3863
|
label: n.bold,
|
|
3744
3864
|
icon: /* @__PURE__ */ U(Ke, { fontSize: "small" }),
|
|
3745
3865
|
onClick: () => e?.chain().focus().toggleBold().run(),
|
|
3746
3866
|
active: e?.isActive("bold"),
|
|
3747
3867
|
disabled: m
|
|
3748
3868
|
}),
|
|
3749
|
-
t.showItalic && /* @__PURE__ */ U(
|
|
3869
|
+
t.showItalic && /* @__PURE__ */ U(Z, {
|
|
3750
3870
|
label: n.italic,
|
|
3751
3871
|
icon: /* @__PURE__ */ U(qe, { fontSize: "small" }),
|
|
3752
3872
|
onClick: () => e?.chain().focus().toggleItalic().run(),
|
|
3753
3873
|
active: e?.isActive("italic"),
|
|
3754
3874
|
disabled: m
|
|
3755
3875
|
}),
|
|
3756
|
-
t.showUnderline && /* @__PURE__ */ U(
|
|
3876
|
+
t.showUnderline && /* @__PURE__ */ U(Z, {
|
|
3757
3877
|
label: n.underline,
|
|
3758
3878
|
icon: /* @__PURE__ */ U(Je, { fontSize: "small" }),
|
|
3759
3879
|
onClick: () => e?.chain().focus().toggleUnderline().run(),
|
|
3760
3880
|
active: e?.isActive("underline"),
|
|
3761
3881
|
disabled: m
|
|
3762
3882
|
}),
|
|
3763
|
-
t.showStrike && /* @__PURE__ */ U(
|
|
3883
|
+
t.showStrike && /* @__PURE__ */ U(Z, {
|
|
3764
3884
|
label: n.strike,
|
|
3765
3885
|
icon: /* @__PURE__ */ U(Ye, { fontSize: "small" }),
|
|
3766
3886
|
onClick: () => e?.chain().focus().toggleStrike().run(),
|
|
@@ -3776,23 +3896,23 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3776
3896
|
gap: .25
|
|
3777
3897
|
},
|
|
3778
3898
|
children: [
|
|
3779
|
-
t.showHeading1 && /* @__PURE__ */ U(
|
|
3899
|
+
t.showHeading1 && /* @__PURE__ */ U(Z, {
|
|
3780
3900
|
label: n.heading1,
|
|
3781
|
-
icon: /* @__PURE__ */ U(
|
|
3901
|
+
icon: /* @__PURE__ */ U(fr, { level: 1 }),
|
|
3782
3902
|
onClick: () => e?.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
3783
3903
|
active: e?.isActive("heading", { level: 1 }),
|
|
3784
3904
|
disabled: m
|
|
3785
3905
|
}),
|
|
3786
|
-
t.showHeading2 && /* @__PURE__ */ U(
|
|
3906
|
+
t.showHeading2 && /* @__PURE__ */ U(Z, {
|
|
3787
3907
|
label: n.heading2,
|
|
3788
|
-
icon: /* @__PURE__ */ U(
|
|
3908
|
+
icon: /* @__PURE__ */ U(fr, { level: 2 }),
|
|
3789
3909
|
onClick: () => e?.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
3790
3910
|
active: e?.isActive("heading", { level: 2 }),
|
|
3791
3911
|
disabled: m
|
|
3792
3912
|
}),
|
|
3793
|
-
t.showHeading3 && /* @__PURE__ */ U(
|
|
3913
|
+
t.showHeading3 && /* @__PURE__ */ U(Z, {
|
|
3794
3914
|
label: n.heading3,
|
|
3795
|
-
icon: /* @__PURE__ */ U(
|
|
3915
|
+
icon: /* @__PURE__ */ U(fr, { level: 3 }),
|
|
3796
3916
|
onClick: () => e?.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
3797
3917
|
active: e?.isActive("heading", { level: 3 }),
|
|
3798
3918
|
disabled: m
|
|
@@ -3805,13 +3925,13 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3805
3925
|
display: "flex",
|
|
3806
3926
|
gap: .25
|
|
3807
3927
|
},
|
|
3808
|
-
children: [t.showBulletList && /* @__PURE__ */ U(
|
|
3928
|
+
children: [t.showBulletList && /* @__PURE__ */ U(Z, {
|
|
3809
3929
|
label: n.bulletList,
|
|
3810
3930
|
icon: /* @__PURE__ */ U(Xe, { fontSize: "small" }),
|
|
3811
3931
|
onClick: () => e?.chain().focus().toggleBulletList().run(),
|
|
3812
3932
|
active: e?.isActive("bulletList"),
|
|
3813
3933
|
disabled: m
|
|
3814
|
-
}), t.showOrderedList && /* @__PURE__ */ U(
|
|
3934
|
+
}), t.showOrderedList && /* @__PURE__ */ U(Z, {
|
|
3815
3935
|
label: n.orderedList,
|
|
3816
3936
|
icon: /* @__PURE__ */ U(Ze, { fontSize: "small" }),
|
|
3817
3937
|
onClick: () => e?.chain().focus().toggleOrderedList().run(),
|
|
@@ -3826,28 +3946,28 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3826
3946
|
gap: .25
|
|
3827
3947
|
},
|
|
3828
3948
|
children: [
|
|
3829
|
-
t.showBlockquote && /* @__PURE__ */ U(
|
|
3949
|
+
t.showBlockquote && /* @__PURE__ */ U(Z, {
|
|
3830
3950
|
label: n.blockquote,
|
|
3831
3951
|
icon: /* @__PURE__ */ U(Qe, { fontSize: "small" }),
|
|
3832
3952
|
onClick: () => e?.chain().focus().toggleBlockquote().run(),
|
|
3833
3953
|
active: e?.isActive("blockquote"),
|
|
3834
3954
|
disabled: m
|
|
3835
3955
|
}),
|
|
3836
|
-
t.showCodeBlock && /* @__PURE__ */ U(
|
|
3956
|
+
t.showCodeBlock && /* @__PURE__ */ U(Z, {
|
|
3837
3957
|
label: n.codeBlock,
|
|
3838
3958
|
icon: /* @__PURE__ */ U($e, { fontSize: "small" }),
|
|
3839
3959
|
onClick: () => e?.chain().focus().toggleCodeBlock().run(),
|
|
3840
3960
|
active: e?.isActive("codeBlock"),
|
|
3841
3961
|
disabled: m
|
|
3842
3962
|
}),
|
|
3843
|
-
t.showLink && /* @__PURE__ */ U(
|
|
3963
|
+
t.showLink && /* @__PURE__ */ U(Z, {
|
|
3844
3964
|
label: n.link,
|
|
3845
3965
|
icon: /* @__PURE__ */ U(et, { fontSize: "small" }),
|
|
3846
3966
|
onClick: () => c(!0),
|
|
3847
3967
|
active: e?.isActive("link"),
|
|
3848
3968
|
disabled: m
|
|
3849
3969
|
}),
|
|
3850
|
-
t.showHorizontalRule && /* @__PURE__ */ U(
|
|
3970
|
+
t.showHorizontalRule && /* @__PURE__ */ U(Z, {
|
|
3851
3971
|
label: n.horizontalRule,
|
|
3852
3972
|
icon: /* @__PURE__ */ U(tt, { fontSize: "small" }),
|
|
3853
3973
|
onClick: () => e?.chain().focus().setHorizontalRule().run(),
|
|
@@ -3861,13 +3981,13 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3861
3981
|
display: "flex",
|
|
3862
3982
|
gap: .25
|
|
3863
3983
|
},
|
|
3864
|
-
children: [t.showTextColor && /* @__PURE__ */ U(
|
|
3984
|
+
children: [t.showTextColor && /* @__PURE__ */ U(dr, {
|
|
3865
3985
|
label: n.textColor,
|
|
3866
3986
|
icon: /* @__PURE__ */ U(nt, { fontSize: "small" }),
|
|
3867
3987
|
activeColor: h,
|
|
3868
3988
|
disabled: m,
|
|
3869
3989
|
onClick: (e) => d(e.currentTarget)
|
|
3870
|
-
}), t.showHighlight && /* @__PURE__ */ U(
|
|
3990
|
+
}), t.showHighlight && /* @__PURE__ */ U(dr, {
|
|
3871
3991
|
label: n.highlight,
|
|
3872
3992
|
icon: /* @__PURE__ */ U(rt, { fontSize: "small" }),
|
|
3873
3993
|
activeColor: g,
|
|
@@ -3881,17 +4001,17 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3881
4001
|
display: "flex",
|
|
3882
4002
|
gap: .25
|
|
3883
4003
|
},
|
|
3884
|
-
children: [t.showUndoRedo && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
4004
|
+
children: [t.showUndoRedo && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Z, {
|
|
3885
4005
|
label: n.undo,
|
|
3886
4006
|
icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
|
|
3887
4007
|
onClick: () => e?.chain().focus().undo().run(),
|
|
3888
4008
|
disabled: m || !e?.can().undo()
|
|
3889
|
-
}), /* @__PURE__ */ U(
|
|
4009
|
+
}), /* @__PURE__ */ U(Z, {
|
|
3890
4010
|
label: n.redo,
|
|
3891
4011
|
icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
|
|
3892
4012
|
onClick: () => e?.chain().focus().redo().run(),
|
|
3893
4013
|
disabled: m || !e?.can().redo()
|
|
3894
|
-
})] }), t.showClearFormat && /* @__PURE__ */ U(
|
|
4014
|
+
})] }), t.showClearFormat && /* @__PURE__ */ U(Z, {
|
|
3895
4015
|
label: n.clearFormat,
|
|
3896
4016
|
icon: /* @__PURE__ */ U(it, { fontSize: "small" }),
|
|
3897
4017
|
onClick: () => e?.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
@@ -3917,13 +4037,13 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3917
4037
|
})
|
|
3918
4038
|
]
|
|
3919
4039
|
}),
|
|
3920
|
-
t.showLink && e && /* @__PURE__ */ U(
|
|
4040
|
+
t.showLink && e && /* @__PURE__ */ U(or, {
|
|
3921
4041
|
open: o,
|
|
3922
4042
|
onClose: () => c(!1),
|
|
3923
4043
|
editor: e,
|
|
3924
4044
|
translation: n
|
|
3925
4045
|
}),
|
|
3926
|
-
t.showTextColor && /* @__PURE__ */ U(
|
|
4046
|
+
t.showTextColor && /* @__PURE__ */ U(ur, {
|
|
3927
4047
|
anchorEl: u,
|
|
3928
4048
|
open: !!u,
|
|
3929
4049
|
onClose: () => d(null),
|
|
@@ -3933,7 +4053,7 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3933
4053
|
onRemoveColor: () => e?.chain().focus().unsetColor().run(),
|
|
3934
4054
|
removeLabel: n.removeTextColor
|
|
3935
4055
|
}),
|
|
3936
|
-
t.showHighlight && /* @__PURE__ */ U(
|
|
4056
|
+
t.showHighlight && /* @__PURE__ */ U(ur, {
|
|
3937
4057
|
anchorEl: f,
|
|
3938
4058
|
open: !!f,
|
|
3939
4059
|
onClose: () => p(null),
|
|
@@ -3947,7 +4067,7 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
3947
4067
|
}
|
|
3948
4068
|
//#endregion
|
|
3949
4069
|
//#region src/components/rich-text-editor/RichTextEditorFooter.tsx
|
|
3950
|
-
function
|
|
4070
|
+
function mr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, showWordCount: a, wordCount: o, translation: s }) {
|
|
3951
4071
|
let c = i === void 0 ? s.characterCount.replace("{count}", String(r)) : s.characterCountMax.replace("{count}", String(r)).replace("{max}", String(i)), u = i !== void 0 && r >= i ? "error" : "text.secondary", d = s.wordCount.replace("{count}", String(o));
|
|
3952
4072
|
return /* @__PURE__ */ W(l, {
|
|
3953
4073
|
sx: {
|
|
@@ -3977,12 +4097,12 @@ function pr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxC
|
|
|
3977
4097
|
}
|
|
3978
4098
|
//#endregion
|
|
3979
4099
|
//#region src/components/rich-text-editor/RichTextEditor.tsx
|
|
3980
|
-
function
|
|
4100
|
+
function hr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxCharacters: a, name: o, placeholder: c, readonly: u = !1, showCharacterCount: d = !1, showToolbar: f = !0, showWordCount: p = !1, toolbarConfig: m, translation: h, value: g, width: _, onBlur: y, onChange: b, onFocus: x }) {
|
|
3981
4101
|
let S = {
|
|
3982
|
-
...
|
|
4102
|
+
...ir,
|
|
3983
4103
|
...h
|
|
3984
4104
|
}, C = {
|
|
3985
|
-
...
|
|
4105
|
+
...rr,
|
|
3986
4106
|
...m
|
|
3987
4107
|
}, [w, T] = s(!1), E = kt(n), D = kt(_), k = E === "auto", A = k ? void 0 : E ?? 200, j = a !== void 0 && a > 0 || d || p, M = Ie({
|
|
3988
4108
|
shouldRerenderOnTransaction: !0,
|
|
@@ -4054,21 +4174,21 @@ function mr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
|
|
|
4054
4174
|
borderWidth: 2
|
|
4055
4175
|
}
|
|
4056
4176
|
},
|
|
4057
|
-
children: [f && !u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
4177
|
+
children: [f && !u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(pr, {
|
|
4058
4178
|
editor: M,
|
|
4059
4179
|
toolbarConfig: C,
|
|
4060
4180
|
translation: S,
|
|
4061
4181
|
disabled: e,
|
|
4062
4182
|
isFullscreen: w,
|
|
4063
4183
|
onToggleFullscreen: () => T((e) => !e)
|
|
4064
|
-
}), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(
|
|
4184
|
+
}), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(ar, {
|
|
4065
4185
|
editor: M,
|
|
4066
4186
|
error: t,
|
|
4067
4187
|
disabled: e,
|
|
4068
4188
|
readonly: u
|
|
4069
4189
|
})]
|
|
4070
4190
|
}),
|
|
4071
|
-
F && /* @__PURE__ */ U(
|
|
4191
|
+
F && /* @__PURE__ */ U(mr, {
|
|
4072
4192
|
helperText: i,
|
|
4073
4193
|
error: t,
|
|
4074
4194
|
showCharacterCount: d || a !== void 0 && a > 0,
|
|
@@ -4088,13 +4208,13 @@ function mr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
|
|
|
4088
4208
|
}
|
|
4089
4209
|
//#endregion
|
|
4090
4210
|
//#region src/components/sql-editor/SqlEditor.types.ts
|
|
4091
|
-
var
|
|
4211
|
+
var gr = {
|
|
4092
4212
|
showFormat: !0,
|
|
4093
4213
|
showCopy: !0,
|
|
4094
4214
|
showClear: !0,
|
|
4095
4215
|
showExecute: !1,
|
|
4096
4216
|
showUndoRedo: !0
|
|
4097
|
-
},
|
|
4217
|
+
}, _r = {
|
|
4098
4218
|
format: "Format SQL",
|
|
4099
4219
|
copy: "Copy",
|
|
4100
4220
|
copySuccess: "Copied!",
|
|
@@ -4104,70 +4224,72 @@ var hr = {
|
|
|
4104
4224
|
redo: "Redo",
|
|
4105
4225
|
lineColumn: "Ln {line}, Col {col}",
|
|
4106
4226
|
errorCount: "{count} error(s)"
|
|
4107
|
-
},
|
|
4227
|
+
}, vr = {
|
|
4108
4228
|
standard: ut,
|
|
4109
4229
|
mysql: st,
|
|
4110
4230
|
postgresql: ct,
|
|
4111
4231
|
sqlite: lt,
|
|
4112
4232
|
mssql: ot
|
|
4113
4233
|
};
|
|
4114
|
-
function
|
|
4115
|
-
let
|
|
4234
|
+
function yr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, dialect: c = "standard", keywordColor: u, stringColor: d, identifierColor: f, schema: p, onExecute: m, onLint: h, onDiagnosticsChange: g, onViewReady: _, onCursorChange: v, onBlur: y, onFocus: b }) {
|
|
4235
|
+
let x = o(null), S = o(null), C = o(t), w = o(v), T = o(y), E = o(b), D = o(_), O = o(m), k = o(h), A = o(g), j = o(new ne()), M = o(new ne()), N = L(), P = N.palette.mode === "dark", F = !!h, I = JSON.stringify(p);
|
|
4116
4236
|
return r(() => {
|
|
4117
|
-
|
|
4237
|
+
C.current = t;
|
|
4118
4238
|
}, [t]), r(() => {
|
|
4119
|
-
C.current = _;
|
|
4120
|
-
}, [_]), r(() => {
|
|
4121
4239
|
w.current = v;
|
|
4122
4240
|
}, [v]), r(() => {
|
|
4123
4241
|
T.current = y;
|
|
4124
4242
|
}, [y]), r(() => {
|
|
4125
|
-
E.current =
|
|
4126
|
-
}, [
|
|
4127
|
-
D.current =
|
|
4243
|
+
E.current = b;
|
|
4244
|
+
}, [b]), r(() => {
|
|
4245
|
+
D.current = _;
|
|
4246
|
+
}, [_]), r(() => {
|
|
4247
|
+
O.current = m;
|
|
4128
4248
|
}, [m]), r(() => {
|
|
4129
|
-
|
|
4249
|
+
k.current = h;
|
|
4130
4250
|
}, [h]), r(() => {
|
|
4131
|
-
|
|
4132
|
-
|
|
4251
|
+
A.current = g;
|
|
4252
|
+
}, [g]), r(() => {
|
|
4253
|
+
if (!x.current) return;
|
|
4254
|
+
let t = S.current?.state.doc.toString() ?? e ?? "", r = u ?? N.palette.primary.main, o = d ?? N.palette.success.main, l = f ?? N.palette.info.main, m = ue.define([
|
|
4133
4255
|
{
|
|
4134
|
-
tag:
|
|
4256
|
+
tag: X.keyword,
|
|
4135
4257
|
color: r,
|
|
4136
4258
|
fontWeight: "bold"
|
|
4137
4259
|
},
|
|
4138
4260
|
{
|
|
4139
|
-
tag:
|
|
4261
|
+
tag: X.name,
|
|
4140
4262
|
color: l
|
|
4141
4263
|
},
|
|
4142
4264
|
{
|
|
4143
|
-
tag: [
|
|
4265
|
+
tag: [X.string, X.special(X.string)],
|
|
4144
4266
|
color: o,
|
|
4145
4267
|
fontWeight: "bold"
|
|
4146
4268
|
},
|
|
4147
4269
|
{
|
|
4148
|
-
tag:
|
|
4149
|
-
color:
|
|
4270
|
+
tag: X.number,
|
|
4271
|
+
color: N.palette.warning.main
|
|
4150
4272
|
},
|
|
4151
4273
|
{
|
|
4152
|
-
tag: [
|
|
4153
|
-
color:
|
|
4274
|
+
tag: [X.lineComment, X.blockComment],
|
|
4275
|
+
color: N.palette.text.disabled,
|
|
4154
4276
|
fontStyle: "italic"
|
|
4155
4277
|
},
|
|
4156
4278
|
{
|
|
4157
|
-
tag:
|
|
4158
|
-
color:
|
|
4279
|
+
tag: X.operator,
|
|
4280
|
+
color: N.palette.text.secondary
|
|
4159
4281
|
},
|
|
4160
4282
|
{
|
|
4161
|
-
tag: [
|
|
4162
|
-
color:
|
|
4283
|
+
tag: [X.function(X.variableName), X.function(X.name)],
|
|
4284
|
+
color: N.palette.secondary.main
|
|
4163
4285
|
},
|
|
4164
4286
|
{
|
|
4165
|
-
tag:
|
|
4166
|
-
color:
|
|
4287
|
+
tag: X.typeName,
|
|
4288
|
+
color: N.palette.info.main
|
|
4167
4289
|
},
|
|
4168
4290
|
{
|
|
4169
|
-
tag:
|
|
4170
|
-
color:
|
|
4291
|
+
tag: X.invalid,
|
|
4292
|
+
color: N.palette.error.main,
|
|
4171
4293
|
textDecoration: "underline wavy"
|
|
4172
4294
|
}
|
|
4173
4295
|
]), h = G.theme({
|
|
@@ -4179,64 +4301,64 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
4179
4301
|
".cm-scroller": { overflow: "auto" },
|
|
4180
4302
|
".cm-content": {
|
|
4181
4303
|
padding: "8px 4px",
|
|
4182
|
-
caretColor:
|
|
4304
|
+
caretColor: N.palette.text.primary
|
|
4183
4305
|
},
|
|
4184
4306
|
".cm-gutters": {
|
|
4185
|
-
backgroundColor:
|
|
4186
|
-
color:
|
|
4307
|
+
backgroundColor: P ? N.palette.grey[900] : N.palette.grey[50],
|
|
4308
|
+
color: N.palette.text.disabled,
|
|
4187
4309
|
border: "none",
|
|
4188
|
-
borderRight: `1px solid ${
|
|
4310
|
+
borderRight: `1px solid ${N.palette.divider}`
|
|
4189
4311
|
},
|
|
4190
4312
|
".cm-lineNumbers .cm-gutterElement": {
|
|
4191
|
-
|
|
4192
|
-
|
|
4313
|
+
paddingLeft: "4px",
|
|
4314
|
+
paddingRight: "8px"
|
|
4193
4315
|
},
|
|
4194
|
-
".cm-activeLineGutter": { backgroundColor:
|
|
4195
|
-
".cm-activeLine": { backgroundColor:
|
|
4196
|
-
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor:
|
|
4197
|
-
".cm-cursor, .cm-dropCursor": { borderLeftColor:
|
|
4316
|
+
".cm-activeLineGutter": { backgroundColor: N.palette.action.selected },
|
|
4317
|
+
".cm-activeLine": { backgroundColor: N.palette.action.hover },
|
|
4318
|
+
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: N.palette.primary.main + "40" },
|
|
4319
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: N.palette.text.primary },
|
|
4198
4320
|
"&.cm-focused": { outline: "none" },
|
|
4199
4321
|
".cm-placeholder": {
|
|
4200
|
-
color:
|
|
4322
|
+
color: N.palette.text.disabled,
|
|
4201
4323
|
fontStyle: "italic"
|
|
4202
4324
|
},
|
|
4203
4325
|
".cm-tooltip": {
|
|
4204
|
-
backgroundColor:
|
|
4205
|
-
border: `1px solid ${
|
|
4326
|
+
backgroundColor: N.palette.background.paper,
|
|
4327
|
+
border: `1px solid ${N.palette.divider}`,
|
|
4206
4328
|
borderRadius: "4px",
|
|
4207
|
-
boxShadow:
|
|
4329
|
+
boxShadow: N.shadows[4]
|
|
4208
4330
|
},
|
|
4209
|
-
".cm-tooltip-autocomplete > ul > li": { color:
|
|
4331
|
+
".cm-tooltip-autocomplete > ul > li": { color: N.palette.text.primary },
|
|
4210
4332
|
".cm-tooltip-autocomplete > ul > li[aria-selected]": {
|
|
4211
|
-
backgroundColor:
|
|
4212
|
-
color:
|
|
4333
|
+
backgroundColor: N.palette.primary.main + "20",
|
|
4334
|
+
color: N.palette.primary.main
|
|
4213
4335
|
},
|
|
4214
4336
|
".cm-completionMatchedText": {
|
|
4215
|
-
color:
|
|
4337
|
+
color: N.palette.primary.main,
|
|
4216
4338
|
textDecoration: "none",
|
|
4217
4339
|
fontWeight: "bold"
|
|
4218
4340
|
},
|
|
4219
4341
|
".cm-completionDetail": {
|
|
4220
|
-
color:
|
|
4342
|
+
color: N.palette.text.secondary,
|
|
4221
4343
|
fontStyle: "italic"
|
|
4222
4344
|
},
|
|
4223
4345
|
".cm-gutter-lint": { width: "16px" },
|
|
4224
|
-
".cm-lint-marker-error": { color:
|
|
4225
|
-
".cm-lint-marker-warning": { color:
|
|
4346
|
+
".cm-lint-marker-error": { color: N.palette.error.main },
|
|
4347
|
+
".cm-lint-marker-warning": { color: N.palette.warning.main },
|
|
4226
4348
|
".cm-tooltip.cm-tooltip-lint": {
|
|
4227
|
-
backgroundColor:
|
|
4228
|
-
border: `1px solid ${
|
|
4349
|
+
backgroundColor: N.palette.background.paper,
|
|
4350
|
+
border: `1px solid ${N.palette.divider}`,
|
|
4229
4351
|
borderRadius: "4px"
|
|
4230
4352
|
},
|
|
4231
|
-
".cm-diagnostic-error": { borderLeft: `3px solid ${
|
|
4232
|
-
".cm-diagnostic-warning": { borderLeft: `3px solid ${
|
|
4233
|
-
".cm-diagnostic-info": { borderLeft: `3px solid ${
|
|
4234
|
-
}, { dark:
|
|
4353
|
+
".cm-diagnostic-error": { borderLeft: `3px solid ${N.palette.error.main}` },
|
|
4354
|
+
".cm-diagnostic-warning": { borderLeft: `3px solid ${N.palette.warning.main}` },
|
|
4355
|
+
".cm-diagnostic-info": { borderLeft: `3px solid ${N.palette.info.main}` }
|
|
4356
|
+
}, { dark: P }), g = p ? Object.fromEntries(p.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
|
|
4235
4357
|
label: e.name,
|
|
4236
4358
|
detail: e.type,
|
|
4237
4359
|
type: "property"
|
|
4238
4360
|
}))])) : void 0, _ = async (e) => {
|
|
4239
|
-
let t =
|
|
4361
|
+
let t = k.current;
|
|
4240
4362
|
if (!t) return [];
|
|
4241
4363
|
let n = e.state.doc.toString();
|
|
4242
4364
|
try {
|
|
@@ -4249,63 +4371,67 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
4249
4371
|
message: t.message
|
|
4250
4372
|
};
|
|
4251
4373
|
});
|
|
4252
|
-
return
|
|
4374
|
+
return A.current?.(r.length), r;
|
|
4253
4375
|
} catch {
|
|
4254
4376
|
return [];
|
|
4255
4377
|
}
|
|
4256
|
-
}, v = [
|
|
4378
|
+
}, v = J.of([{
|
|
4379
|
+
key: "Mod-Enter",
|
|
4380
|
+
run: (e) => (O.current?.(e.state.doc.toString()), !0)
|
|
4381
|
+
}]), y = [
|
|
4257
4382
|
h,
|
|
4258
|
-
|
|
4383
|
+
de(m),
|
|
4259
4384
|
dt({
|
|
4260
|
-
dialect:
|
|
4385
|
+
dialect: vr[c],
|
|
4261
4386
|
schema: g
|
|
4262
4387
|
}),
|
|
4263
|
-
|
|
4388
|
+
oe(),
|
|
4264
4389
|
ft(),
|
|
4390
|
+
v,
|
|
4265
4391
|
J.of([
|
|
4266
|
-
...
|
|
4267
|
-
...
|
|
4392
|
+
...ae,
|
|
4393
|
+
...se,
|
|
4268
4394
|
...pt
|
|
4269
4395
|
]),
|
|
4270
|
-
|
|
4271
|
-
|
|
4396
|
+
j.current.of(G.editable.of(!i && !a)),
|
|
4397
|
+
M.current.of(Y.readOnly.of(a)),
|
|
4272
4398
|
K(),
|
|
4273
4399
|
...s ? [ee(), q()] : [],
|
|
4274
4400
|
...n ? [te(n)] : [],
|
|
4275
|
-
...
|
|
4401
|
+
...F ? [fe(), pe(_, { delay: 600 })] : [],
|
|
4276
4402
|
G.updateListener.of((e) => {
|
|
4277
|
-
e.docChanged &&
|
|
4403
|
+
e.docChanged && C.current?.(e.state.doc.toString());
|
|
4278
4404
|
let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
|
|
4279
|
-
|
|
4405
|
+
w.current(n.number, t - n.from + 1);
|
|
4280
4406
|
}),
|
|
4281
4407
|
G.domEventHandlers({
|
|
4282
4408
|
blur: () => {
|
|
4283
|
-
|
|
4409
|
+
T.current?.();
|
|
4284
4410
|
},
|
|
4285
4411
|
focus: () => {
|
|
4286
|
-
|
|
4412
|
+
E.current?.();
|
|
4287
4413
|
}
|
|
4288
4414
|
})
|
|
4289
|
-
],
|
|
4290
|
-
state:
|
|
4415
|
+
], b = new G({
|
|
4416
|
+
state: Y.create({
|
|
4291
4417
|
doc: t,
|
|
4292
|
-
extensions:
|
|
4418
|
+
extensions: y
|
|
4293
4419
|
}),
|
|
4294
|
-
parent:
|
|
4420
|
+
parent: x.current
|
|
4295
4421
|
});
|
|
4296
|
-
return
|
|
4297
|
-
|
|
4422
|
+
return S.current = b, D.current(b), () => {
|
|
4423
|
+
D.current(null), b.destroy(), S.current = null;
|
|
4298
4424
|
};
|
|
4299
4425
|
}, [
|
|
4300
|
-
|
|
4426
|
+
P,
|
|
4301
4427
|
c,
|
|
4302
|
-
|
|
4428
|
+
F,
|
|
4303
4429
|
u,
|
|
4304
4430
|
d,
|
|
4305
4431
|
f,
|
|
4306
|
-
|
|
4432
|
+
I
|
|
4307
4433
|
]), r(() => {
|
|
4308
|
-
let t =
|
|
4434
|
+
let t = S.current;
|
|
4309
4435
|
if (!t) return;
|
|
4310
4436
|
let n = t.state.doc.toString();
|
|
4311
4437
|
n !== (e ?? "") && t.dispatch({ changes: {
|
|
@@ -4314,16 +4440,16 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
4314
4440
|
insert: e ?? ""
|
|
4315
4441
|
} });
|
|
4316
4442
|
}, [e]), r(() => {
|
|
4317
|
-
|
|
4443
|
+
S.current?.dispatch({ effects: [j.current.reconfigure(G.editable.of(!i && !a)), M.current.reconfigure(Y.readOnly.of(a))] });
|
|
4318
4444
|
}, [i, a]), /* @__PURE__ */ U(l, {
|
|
4319
|
-
ref:
|
|
4445
|
+
ref: x,
|
|
4320
4446
|
sx: {
|
|
4321
4447
|
flex: 1,
|
|
4322
4448
|
overflow: "hidden",
|
|
4323
4449
|
display: "flex",
|
|
4324
4450
|
flexDirection: "column",
|
|
4325
4451
|
opacity: i ? .5 : 1,
|
|
4326
|
-
backgroundColor:
|
|
4452
|
+
backgroundColor: N.palette.background.paper,
|
|
4327
4453
|
"& .cm-editor": {
|
|
4328
4454
|
flex: 1,
|
|
4329
4455
|
display: "flex",
|
|
@@ -4334,14 +4460,14 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
4334
4460
|
}
|
|
4335
4461
|
//#endregion
|
|
4336
4462
|
//#region src/components/sql-editor/SqlEditorToolbar.tsx
|
|
4337
|
-
var
|
|
4463
|
+
var br = {
|
|
4338
4464
|
standard: "sql",
|
|
4339
4465
|
mysql: "mysql",
|
|
4340
4466
|
postgresql: "postgresql",
|
|
4341
4467
|
sqlite: "sqlite",
|
|
4342
4468
|
mssql: "tsql"
|
|
4343
4469
|
};
|
|
4344
|
-
function
|
|
4470
|
+
function xr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
|
|
4345
4471
|
let [o, c] = s(!1), u = i || !e.current;
|
|
4346
4472
|
function d() {
|
|
4347
4473
|
let t = e.current?.state.doc.toString() ?? "";
|
|
@@ -4359,18 +4485,18 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4359
4485
|
}
|
|
4360
4486
|
function p() {
|
|
4361
4487
|
let t = e.current;
|
|
4362
|
-
t && (
|
|
4488
|
+
t && (le(t), t.focus());
|
|
4363
4489
|
}
|
|
4364
4490
|
function m() {
|
|
4365
4491
|
let t = e.current;
|
|
4366
|
-
t && (
|
|
4492
|
+
t && (ce(t), t.focus());
|
|
4367
4493
|
}
|
|
4368
4494
|
function h() {
|
|
4369
4495
|
let t = e.current;
|
|
4370
4496
|
if (!t) return;
|
|
4371
4497
|
let n = t.state.doc.toString();
|
|
4372
4498
|
try {
|
|
4373
|
-
let e = ht(n, { language:
|
|
4499
|
+
let e = ht(n, { language: br[r] });
|
|
4374
4500
|
t.dispatch({ changes: {
|
|
4375
4501
|
from: 0,
|
|
4376
4502
|
to: t.state.doc.length,
|
|
@@ -4401,7 +4527,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4401
4527
|
display: "flex",
|
|
4402
4528
|
gap: .25
|
|
4403
4529
|
},
|
|
4404
|
-
children: /* @__PURE__ */ U(
|
|
4530
|
+
children: /* @__PURE__ */ U(Z, {
|
|
4405
4531
|
label: n.format,
|
|
4406
4532
|
icon: /* @__PURE__ */ U(be, { fontSize: "small" }),
|
|
4407
4533
|
onClick: h,
|
|
@@ -4418,7 +4544,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4418
4544
|
display: "flex",
|
|
4419
4545
|
gap: .25
|
|
4420
4546
|
},
|
|
4421
|
-
children: [t.showCopy && /* @__PURE__ */ U(
|
|
4547
|
+
children: [t.showCopy && /* @__PURE__ */ U(Z, {
|
|
4422
4548
|
label: o ? n.copySuccess : n.copy,
|
|
4423
4549
|
icon: o ? /* @__PURE__ */ U(ge, {
|
|
4424
4550
|
fontSize: "small",
|
|
@@ -4426,7 +4552,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4426
4552
|
}) : /* @__PURE__ */ U(he, { fontSize: "small" }),
|
|
4427
4553
|
onClick: d,
|
|
4428
4554
|
disabled: u
|
|
4429
|
-
}), t.showClear && /* @__PURE__ */ U(
|
|
4555
|
+
}), t.showClear && /* @__PURE__ */ U(Z, {
|
|
4430
4556
|
label: n.clear,
|
|
4431
4557
|
icon: /* @__PURE__ */ U(_e, { fontSize: "small" }),
|
|
4432
4558
|
onClick: f,
|
|
@@ -4443,12 +4569,12 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4443
4569
|
display: "flex",
|
|
4444
4570
|
gap: .25
|
|
4445
4571
|
},
|
|
4446
|
-
children: [/* @__PURE__ */ U(
|
|
4572
|
+
children: [/* @__PURE__ */ U(Z, {
|
|
4447
4573
|
label: n.undo,
|
|
4448
4574
|
icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
|
|
4449
4575
|
onClick: p,
|
|
4450
4576
|
disabled: u
|
|
4451
|
-
}), /* @__PURE__ */ U(
|
|
4577
|
+
}), /* @__PURE__ */ U(Z, {
|
|
4452
4578
|
label: n.redo,
|
|
4453
4579
|
icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
|
|
4454
4580
|
onClick: m,
|
|
@@ -4459,7 +4585,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4459
4585
|
orientation: "vertical",
|
|
4460
4586
|
flexItem: !0,
|
|
4461
4587
|
sx: { mx: .5 }
|
|
4462
|
-
}), /* @__PURE__ */ U(
|
|
4588
|
+
}), /* @__PURE__ */ U(Z, {
|
|
4463
4589
|
label: n.execute,
|
|
4464
4590
|
icon: /* @__PURE__ */ U(mt, { fontSize: "small" }),
|
|
4465
4591
|
onClick: g,
|
|
@@ -4471,7 +4597,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
|
|
|
4471
4597
|
}
|
|
4472
4598
|
//#endregion
|
|
4473
4599
|
//#region src/components/sql-editor/SqlEditorFooter.tsx
|
|
4474
|
-
function
|
|
4600
|
+
function Sr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
|
|
4475
4601
|
let c = s.lineColumn.replace("{line}", String(a)).replace("{col}", String(o)), u = s.errorCount.replace("{count}", String(i));
|
|
4476
4602
|
return /* @__PURE__ */ W(l, {
|
|
4477
4603
|
sx: {
|
|
@@ -4512,12 +4638,12 @@ function xr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, dia
|
|
|
4512
4638
|
}
|
|
4513
4639
|
//#endregion
|
|
4514
4640
|
//#region src/components/sql-editor/SqlEditor.tsx
|
|
4515
|
-
function
|
|
4641
|
+
function Cr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: c = !1, readonly: u = !1, error: d = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: y, translation: b, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
|
|
4516
4642
|
let D = {
|
|
4517
|
-
...
|
|
4643
|
+
..._r,
|
|
4518
4644
|
...b
|
|
4519
4645
|
}, k = {
|
|
4520
|
-
...
|
|
4646
|
+
...gr,
|
|
4521
4647
|
...y
|
|
4522
4648
|
}, A = kt(i), j = kt(a), M = A === "auto", N = M ? void 0 : A ?? 300, P = o(null), [F, I] = s({
|
|
4523
4649
|
line: 1,
|
|
@@ -4555,14 +4681,14 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
4555
4681
|
borderWidth: 2
|
|
4556
4682
|
}
|
|
4557
4683
|
},
|
|
4558
|
-
children: [!u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
4684
|
+
children: [!u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(xr, {
|
|
4559
4685
|
viewRef: P,
|
|
4560
4686
|
toolbarConfig: k,
|
|
4561
4687
|
translation: D,
|
|
4562
4688
|
dialect: m,
|
|
4563
4689
|
disabled: c,
|
|
4564
4690
|
onExecute: C
|
|
4565
|
-
}), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(
|
|
4691
|
+
}), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(yr, {
|
|
4566
4692
|
value: e,
|
|
4567
4693
|
onChange: n,
|
|
4568
4694
|
placeholder: r,
|
|
@@ -4574,6 +4700,7 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
4574
4700
|
stringColor: x?.string,
|
|
4575
4701
|
identifierColor: x?.identifier,
|
|
4576
4702
|
schema: S,
|
|
4703
|
+
onExecute: C,
|
|
4577
4704
|
onLint: w,
|
|
4578
4705
|
onDiagnosticsChange: w ? V : void 0,
|
|
4579
4706
|
onViewReady: z,
|
|
@@ -4582,7 +4709,7 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
4582
4709
|
onFocus: E
|
|
4583
4710
|
})]
|
|
4584
4711
|
}),
|
|
4585
|
-
G && /* @__PURE__ */ U(
|
|
4712
|
+
G && /* @__PURE__ */ U(Sr, {
|
|
4586
4713
|
helperText: f,
|
|
4587
4714
|
error: d,
|
|
4588
4715
|
showLineColumn: g,
|
|
@@ -4601,4 +4728,4 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
4601
4728
|
});
|
|
4602
4729
|
}
|
|
4603
4730
|
//#endregion
|
|
4604
|
-
export { St as ConfirmDialogProvider,
|
|
4731
|
+
export { St as ConfirmDialogProvider, Wn as DEFAULT_CHECK_COLORS, _t as DEFAULT_CONFIRM_DIALOG_TRANSLATION, en as DEFAULT_GANTT_TRANSLATIONS, wt as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, Tt as DEFAULT_JSON_EDITOR_TRANSLATION, Un as DEFAULT_METER_COLORS, Hn as DEFAULT_PASSWORD_TRANSLATIONS, rr as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, ir as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, gr as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, _r as DEFAULT_SQL_EDITOR_TRANSLATION, Qn as DEFAULT_TAG_SELECTION_TRANSLATION, Rn as GanttChart, jt as JsonEditor, Kn as PasswordStrengthMeter, hr as RichTextEditor, Cr as SqlEditor, nr as TagSelection, Ct as useConfirm, Q as useGanttChartStore, Nn as useGanttTheme, $ as useGanttTranslations, An as useRawGanttChartStore };
|