@ynput/ayon-frontend-shared 0.6.0 → 0.6.1
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/dist/ContextMenu.es.js +34 -16
- package/dist/DetailsPanel.es.js +292 -298
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +32 -35
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4451 -2965
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/chunks/Actions.es.js +9 -4
- package/dist/chunks/ColumnDropIndicator.es.js +174 -328
- package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
- package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
- package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +58 -53
- package/dist/chunks/EntityPickerDialog.es.js +24 -20
- package/dist/chunks/EntityTooltip.es.js +20 -13
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +1495 -1439
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -65
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2835 -4301
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +1532 -1594
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +457 -458
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +163 -154
- package/dist/chunks/TableSettingsFallback.es.js +25 -13
- package/dist/chunks/ThumbnailSimple.es.js +150 -261
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +384 -389
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +61 -16
- package/dist/chunks/getUris.es.js +737 -712
- package/dist/chunks/searchTerms.es.js +57 -56
- package/dist/chunks/useAttributeEnums.es.js +4 -4
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useHierarchySelection.es.js +24 -0
- package/dist/chunks/useLoadModule.es.js +74 -0
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
- package/dist/chunks/versionUploadHelpers.es.js +16 -42
- package/dist/chunks/viewUpdateHelper.es.js +67 -50
- package/dist/components.es.js +1425 -999
- package/dist/context.es.js +791 -80
- package/dist/hooks.es.js +115 -120
- package/dist/index.es.js +19 -23
- package/dist/types/Actions.d.ts +7 -7
- package/dist/types/ContextMenu.d.ts +11 -8
- package/dist/types/DetailsPanel.d.ts +102 -9
- package/dist/types/EntityPickerDialog.d.ts +7 -7
- package/dist/types/Feed.d.ts +11 -8
- package/dist/types/ListTable.d.ts +7 -7
- package/dist/types/NewEntity.d.ts +16 -10
- package/dist/types/ProjectTreeTable.d.ts +22 -115
- package/dist/types/RepresentationsList.d.ts +7 -7
- package/dist/types/SimpleTable.d.ts +11 -8
- package/dist/types/Slicer.d.ts +10 -7
- package/dist/types/Views.d.ts +10 -7
- package/dist/types/api.d.ts +132 -120
- package/dist/types/components.d.ts +13 -8
- package/dist/types/context.d.ts +56 -16
- package/dist/types/hooks.d.ts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/util.d.ts +12 -7
- package/dist/util.es.js +72 -71
- package/package.json +1 -1
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- package/dist/chunks/DetailsPanelContext.es.js +0 -155
- package/dist/chunks/GlobalContext.es.js +0 -52
- package/dist/chunks/NewEntityContext.es.js +0 -1242
- package/dist/chunks/ProjectFoldersContext.es.js +0 -134
- package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
- package/dist/chunks/VersionUploadContext.es.js +0 -232
- package/dist/chunks/ViewsContext.es.js +0 -878
- package/dist/chunks/uriUtils.es.js +0 -48
- package/dist/chunks/useColumnDragRestriction.es.js +0 -158
- package/dist/chunks/useLocalStorage.es.js +0 -355
- package/dist/chunks/useSessionStorage.es.js +0 -61
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import { jsxs as k, jsx as n, Fragment as me } from "react/jsx-runtime";
|
|
2
2
|
import g, { css as xt, keyframes as Gn } from "styled-components";
|
|
3
3
|
import { forwardRef as le, useRef as K, useState as U, useEffect as J, useMemo as X, Fragment as Yn, useCallback as ee, useImperativeHandle as qn } from "react";
|
|
4
|
-
import { Icon as G, InputNumber as on, Button as H, IconSelect as Wn, InputText as
|
|
4
|
+
import { Icon as G, InputNumber as on, Button as H, IconSelect as Wn, InputText as Ae, Dialog as qe, FormLayout as wt, FormRow as te, Dropdown as pe, LockedInput as Xn, InputSwitch as De, Spacer as rn, SaveButton as an, theme as fe, SettingsSortingDropdown as Qn } from "@ynput/ayon-react-components";
|
|
5
5
|
import { U as Jn } from "./PlayableIcon.es.js";
|
|
6
6
|
import Q from "clsx";
|
|
7
7
|
import { kebabCase as $e, isEqual as Rt, uniqueId as je, startCase as St, camelCase as at, upperFirst as Zn } from "lodash";
|
|
8
8
|
import { createPortal as sn } from "react-dom";
|
|
9
|
-
import { DndContext as kt, closestCenter as Ct, DragOverlay as
|
|
10
|
-
import { useSortable as
|
|
9
|
+
import { DndContext as kt, closestCenter as Ct, DragOverlay as It, useSensors as ln, useSensor as cn, PointerSensor as dn } from "@dnd-kit/core";
|
|
10
|
+
import { useSortable as Et, SortableContext as Ke, verticalListSortingStrategy as Ge, arrayMove as un } from "@dnd-kit/sortable";
|
|
11
11
|
import { CSS as Tt } from "@dnd-kit/utilities";
|
|
12
12
|
import { I as eo } from "./InfoMessage.es.js";
|
|
13
13
|
import { S as pn } from "./SimpleForm.es.js";
|
|
14
|
-
import {
|
|
14
|
+
import { br as to, aY as no, bp as mn, bn as gn, bq as $t, bg as oo, b1 as ro, bm as hn, bj as vn, bi as io } from "./searchTerms.es.js";
|
|
15
15
|
import { bj as ao, bp as so, cB as lo, bd as co, dz as ae, cj as uo } from "./getUris.es.js";
|
|
16
16
|
import "primereact/confirmdialog";
|
|
17
17
|
import { u as po, g as mo, v as go } from "./Watchers.es.js";
|
|
18
18
|
import { matchSorter as Ft } from "match-sorter";
|
|
19
19
|
import { J as ho } from "./JsonViewer.es.js";
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
20
|
+
import "@module-federation/enhanced/runtime";
|
|
21
|
+
import { d as fn, a as vo, a9 as We, u as Xe, x as bn } from "./DeleteEntitiesContextInstance.es.js";
|
|
22
|
+
import { toast as fo } from "react-toastify";
|
|
23
23
|
import "uuid";
|
|
24
|
-
import
|
|
24
|
+
import "semver";
|
|
25
|
+
import "./ContextMenuContextInstance.es.js";
|
|
26
|
+
import "react-redux";
|
|
27
|
+
import { g as ve } from "./parseHtmlToPlainTextWithLinks.es.js";
|
|
25
28
|
import { Link as bo } from "react-router-dom";
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
29
|
+
import { aT as Z, a as ke, b as Qe, a$ as yo, b4 as xo, as as xe, aU as oe, aa as wo, aX as Mt, aV as Vt, aY as Bt, b5 as So } from "./MetaWidget.es.js";
|
|
30
|
+
import "@tanstack/react-table";
|
|
28
31
|
import "date-fns";
|
|
29
32
|
import "lexical";
|
|
30
33
|
import "@lexical/markdown";
|
|
@@ -35,28 +38,20 @@ import "@lexical/list";
|
|
|
35
38
|
import "@lexical/rich-text";
|
|
36
39
|
import "@lexical/selection";
|
|
37
40
|
import "@lexical/utils";
|
|
38
|
-
import {
|
|
39
|
-
import "@tanstack/react-table";
|
|
40
|
-
import { a as ko } from "./useCreateContextMenu.es.js";
|
|
41
|
-
import "@module-federation/enhanced/runtime";
|
|
42
|
-
import "semver";
|
|
43
|
-
import "./ProjectFoldersContextInstance.es.js";
|
|
44
|
-
import { u as Qe } from "./MenuContext.es.js";
|
|
45
|
-
import "react-redux";
|
|
46
|
-
import "./ViewsContext.es.js";
|
|
47
|
-
import { T as Co, E as Eo } from "./EntityPickerDialog.es.js";
|
|
41
|
+
import { T as ko, E as Co } from "./EntityPickerDialog.es.js";
|
|
48
42
|
import { useDebounce as Io } from "primereact/hooks";
|
|
49
|
-
import {
|
|
43
|
+
import { c as Eo, a as yn, C as xn, g as To } from "./ColumnDropIndicator.es.js";
|
|
50
44
|
import "@tanstack/react-virtual";
|
|
51
|
-
import {
|
|
45
|
+
import { a as No } from "./ColumnDropIndicator.styled.es.js";
|
|
52
46
|
import { g as wn } from "./getEntityTypeIcon.es.js";
|
|
53
|
-
import "./EmptyPlaceholder.es.js";
|
|
54
|
-
import { M as _o, a as Ao, c as Do } from "./Menu.es.js";
|
|
55
|
-
import { D as Lo, R as Oo } from "./realtimeUpdatesUtils.es.js";
|
|
56
47
|
import "./MenuItem.es.js";
|
|
57
|
-
import
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
48
|
+
import "./EmptyPlaceholder.es.js";
|
|
49
|
+
import { M as Po, a as _o, c as Do } from "./Menu.es.js";
|
|
50
|
+
import { D as Ao, R as Oo } from "./realtimeUpdatesUtils.es.js";
|
|
51
|
+
import { a as Sn } from "./VersionUploadContextInstance.es.js";
|
|
52
|
+
import { Skeleton as Lo } from "primereact/skeleton";
|
|
53
|
+
import Ro from "react-perfect-scrollbar";
|
|
54
|
+
import { u as $o } from "./useCreateContextMenu.es.js";
|
|
60
55
|
const Fo = g.div`
|
|
61
56
|
display: flex;
|
|
62
57
|
width: 100%;
|
|
@@ -83,7 +78,7 @@ const Fo = g.div`
|
|
|
83
78
|
border-radius: 4px;
|
|
84
79
|
min-height: ${(e) => e.$minHeight};
|
|
85
80
|
background-color: var(--md-sys-color-surface-container);
|
|
86
|
-
`,
|
|
81
|
+
`, ss = ({
|
|
87
82
|
showSidebar: e = !0,
|
|
88
83
|
sidebarConfig: t = {},
|
|
89
84
|
gridConfig: o = { columns: 3, rows: 3 },
|
|
@@ -104,7 +99,7 @@ const Fo = g.div`
|
|
|
104
99
|
b
|
|
105
100
|
)) })
|
|
106
101
|
] });
|
|
107
|
-
},
|
|
102
|
+
}, ls = g.div`
|
|
108
103
|
position: relative;
|
|
109
104
|
width: 100%;
|
|
110
105
|
|
|
@@ -112,7 +107,7 @@ const Fo = g.div`
|
|
|
112
107
|
min-height: 32px;
|
|
113
108
|
max-height: 32px;
|
|
114
109
|
}
|
|
115
|
-
`,
|
|
110
|
+
`, cs = g.ul`
|
|
116
111
|
position: absolute;
|
|
117
112
|
top: 100%;
|
|
118
113
|
left: 0;
|
|
@@ -216,12 +211,7 @@ const Fo = g.div`
|
|
|
216
211
|
}
|
|
217
212
|
);
|
|
218
213
|
return i === "user" ? /* @__PURE__ */ n(Jn, { name: v, fullName: s ? o : void 0, size: r }) : i === "group" ? b("shield_person", "Access group") : i === "team" ? b("groups", "Team") : i === "guest" || t === zo ? b("badge", "Guest user") : t === Ho ? b("groups", "Everyone with access to the project") : b("person");
|
|
219
|
-
},
|
|
220
|
-
0: "No access",
|
|
221
|
-
10: "Viewer",
|
|
222
|
-
20: "Editor",
|
|
223
|
-
30: "Admin"
|
|
224
|
-
}, vs = le(
|
|
214
|
+
}, ds = le(
|
|
225
215
|
({
|
|
226
216
|
name: e,
|
|
227
217
|
label: t,
|
|
@@ -259,16 +249,16 @@ const Fo = g.div`
|
|
|
259
249
|
width: 100%;
|
|
260
250
|
}
|
|
261
251
|
`, Yo = ({ value: e = {}, isMin: t, isFloat: o = !1, onChange: r }) => {
|
|
262
|
-
const { le: a, lt: s, ge: i, gt: v } = e, b = i ?? v, c = a ?? s, u = K(null), l = t ? b : c, m = t ? "g" : "l", x = m + "e", d = m + "t", [h,
|
|
252
|
+
const { le: a, lt: s, ge: i, gt: v } = e, b = i ?? v, c = a ?? s, u = K(null), l = t ? b : c, m = t ? "g" : "l", x = m + "e", d = m + "t", [h, I] = U(e[x] != null || !o);
|
|
263
253
|
J(() => {
|
|
264
|
-
o ? (l !== void 0 && r({ [x]: String(l), [d]: void 0 }),
|
|
254
|
+
o ? (l !== void 0 && r({ [x]: String(l), [d]: void 0 }), I(!0)) : (r({ [x]: parseInt(String(l))?.toString(), [d]: void 0 }), I(!0));
|
|
265
255
|
}, [o]);
|
|
266
256
|
const S = ($) => {
|
|
267
257
|
const N = $.target.value;
|
|
268
258
|
r(o ? h ? { [x]: N, [d]: void 0 } : { [x]: void 0, [d]: N } : { [x]: N, [d]: void 0 }), u.current && u.current.setCustomValidity("");
|
|
269
259
|
}, f = () => {
|
|
270
260
|
const $ = !h;
|
|
271
|
-
|
|
261
|
+
I($), r($ ? { [d]: void 0, [x]: l } : { [d]: l, [x]: void 0 });
|
|
272
262
|
}, p = t ? "greater" : "less", y = t ? ">" : "<", w = t ? "≥" : "≤", P = `Determines if the value should be '${p} than or equal to' (${w}) or 'strictly ${p} than' (${y}). Currently: ${h ? w : y}`;
|
|
273
263
|
return /* @__PURE__ */ k(Go, { children: [
|
|
274
264
|
/* @__PURE__ */ n(
|
|
@@ -410,7 +400,7 @@ const Fo = g.div`
|
|
|
410
400
|
&:hover {
|
|
411
401
|
background-color: var(--md-sys-color-surface-container-high-hover);
|
|
412
402
|
}
|
|
413
|
-
`, Gt = g(
|
|
403
|
+
`, Gt = g(Ae)`
|
|
414
404
|
background-color: var(--md-sys-color-surface-container-low);
|
|
415
405
|
border-color: var(--md-sys-color-outline-variant);
|
|
416
406
|
flex-grow: 1;
|
|
@@ -456,7 +446,7 @@ const Fo = g.div`
|
|
|
456
446
|
pt: u,
|
|
457
447
|
...l
|
|
458
448
|
}) => {
|
|
459
|
-
const { label: m, value: x, icon: d, color: h, isNewAttribute:
|
|
449
|
+
const { label: m, value: x, icon: d, color: h, isNewAttribute: I } = e, S = K(null), f = K(null), p = K(null), y = K(null);
|
|
460
450
|
return J(() => {
|
|
461
451
|
(v || e.isNewAttribute) && S.current?.select();
|
|
462
452
|
}, [v, e.isNewAttribute]), J(() => {
|
|
@@ -478,19 +468,19 @@ const Fo = g.div`
|
|
|
478
468
|
{
|
|
479
469
|
ref: S,
|
|
480
470
|
value: m,
|
|
481
|
-
autoFocus: v ||
|
|
471
|
+
autoFocus: v || I,
|
|
482
472
|
...u?.label?.input,
|
|
483
473
|
className: Q(u?.label?.input?.className),
|
|
484
474
|
onChange: (w) => {
|
|
485
|
-
if (!
|
|
475
|
+
if (!I)
|
|
486
476
|
return t && t(["label"], [w.target.value]);
|
|
487
477
|
f.current && (f.current.value = $e(w.target.value)), t && t(["label", "value"], [w.target.value, $e(w.target.value)]);
|
|
488
478
|
},
|
|
489
479
|
onBlur: (w) => {
|
|
490
|
-
|
|
480
|
+
I ? o && o(["label", "value"], [w.target.value, $e(w.target.value)]) : o && o(["label"], [w.target.value]);
|
|
491
481
|
},
|
|
492
482
|
onKeyDown: (w) => {
|
|
493
|
-
w.key === "Enter" && (w.stopPropagation(),
|
|
483
|
+
w.key === "Enter" && (w.stopPropagation(), I ? o && o(
|
|
494
484
|
["label", "value"],
|
|
495
485
|
[
|
|
496
486
|
w.target.value,
|
|
@@ -619,12 +609,12 @@ const Fo = g.div`
|
|
|
619
609
|
pt: i,
|
|
620
610
|
...v
|
|
621
611
|
}) => {
|
|
622
|
-
const { id: b, label: c, icon: u, color: l, isExpanded: m } = e, { attributes: x, listeners: d, setNodeRef: h, transform:
|
|
612
|
+
const { id: b, label: c, icon: u, color: l, isExpanded: m } = e, { attributes: x, listeners: d, setNodeRef: h, transform: I, transition: S } = Et({
|
|
623
613
|
id: b,
|
|
624
614
|
animateLayoutChanges: () => !1
|
|
625
615
|
}), f = {
|
|
626
616
|
transition: S,
|
|
627
|
-
transform: Tt.Translate.toString(
|
|
617
|
+
transform: Tt.Translate.toString(I)
|
|
628
618
|
};
|
|
629
619
|
return /* @__PURE__ */ k(
|
|
630
620
|
Xo,
|
|
@@ -694,13 +684,13 @@ const Fo = g.div`
|
|
|
694
684
|
}) => {
|
|
695
685
|
const [i, v] = U(t), b = (h) => {
|
|
696
686
|
v(h);
|
|
697
|
-
const
|
|
698
|
-
Rt(
|
|
687
|
+
const I = a(i), S = a(h);
|
|
688
|
+
Rt(I, S) || o(S);
|
|
699
689
|
};
|
|
700
690
|
return J(() => {
|
|
701
691
|
v((h) => {
|
|
702
|
-
const
|
|
703
|
-
return Rt(
|
|
692
|
+
const I = a(h), S = a(t);
|
|
693
|
+
return Rt(I, S) ? h : s ? s(h, t) : t;
|
|
704
694
|
});
|
|
705
695
|
}, [t, s, a]), {
|
|
706
696
|
items: i,
|
|
@@ -710,36 +700,36 @@ const Fo = g.div`
|
|
|
710
700
|
handleRemoveItem: (h) => () => {
|
|
711
701
|
b([...i.slice(0, h), ...i.slice(h + 1)]);
|
|
712
702
|
},
|
|
713
|
-
handleChangeItem: (h) => (
|
|
703
|
+
handleChangeItem: (h) => (I, S) => {
|
|
714
704
|
let f = { ...i[h] };
|
|
715
|
-
|
|
705
|
+
I.map((p, y) => f[p] = S[y]), b([...i.slice(0, h), f, ...i.slice(h + 1)]);
|
|
716
706
|
},
|
|
717
|
-
handleCommitItem: (h) => (
|
|
707
|
+
handleCommitItem: (h) => (I, S) => {
|
|
718
708
|
if (!r) return;
|
|
719
709
|
let f = { ...i[h] };
|
|
720
|
-
|
|
710
|
+
I.map((y, w) => f[y] = S[w]);
|
|
721
711
|
const p = [...i.slice(0, h), f, ...i.slice(h + 1)];
|
|
722
712
|
r(a(p));
|
|
723
713
|
},
|
|
724
|
-
handleDuplicateItem: (h,
|
|
714
|
+
handleDuplicateItem: (h, I) => {
|
|
725
715
|
b([
|
|
726
716
|
...i.slice(0, h + 1),
|
|
727
|
-
{ ...i[h], id: je(), ...
|
|
717
|
+
{ ...i[h], id: je(), ...I },
|
|
728
718
|
...i.slice(h + 1)
|
|
729
719
|
]);
|
|
730
720
|
},
|
|
731
721
|
handleDraggableEnd: (h) => {
|
|
732
722
|
if (!h.over)
|
|
733
723
|
return;
|
|
734
|
-
const
|
|
724
|
+
const I = i.find((y) => y.id == h.active.id), S = i.indexOf(I), f = i.find((y) => y.id == h.over.id), p = i.indexOf(f);
|
|
735
725
|
S < p ? b([
|
|
736
726
|
...i.slice(0, S),
|
|
737
727
|
...i.slice(S + 1, p + 1),
|
|
738
|
-
|
|
728
|
+
I,
|
|
739
729
|
...i.slice(p + 1)
|
|
740
730
|
]) : b([
|
|
741
731
|
...i.slice(0, p),
|
|
742
|
-
|
|
732
|
+
I,
|
|
743
733
|
...i.slice(p, S),
|
|
744
734
|
...i.slice(S + 1)
|
|
745
735
|
]);
|
|
@@ -806,8 +796,8 @@ const Fo = g.div`
|
|
|
806
796
|
}, x = (S) => {
|
|
807
797
|
h(null), l(S);
|
|
808
798
|
}, [d, h] = U();
|
|
809
|
-
let
|
|
810
|
-
return d && (
|
|
799
|
+
let I;
|
|
800
|
+
return d && (I = s.find((S) => S.id === d)), /* @__PURE__ */ n(me, { children: /* @__PURE__ */ k(Wo, { ...a, children: [
|
|
811
801
|
/* @__PURE__ */ k(
|
|
812
802
|
kt,
|
|
813
803
|
{
|
|
@@ -842,7 +832,7 @@ const Fo = g.div`
|
|
|
842
832
|
`DraggableAttributeEnum_${S.id}`
|
|
843
833
|
)) }),
|
|
844
834
|
sn(
|
|
845
|
-
/* @__PURE__ */ n(
|
|
835
|
+
/* @__PURE__ */ n(It, { style: {}, children: I && /* @__PURE__ */ n(qt, { item: I, ...r?.item }) }),
|
|
846
836
|
document.body
|
|
847
837
|
)
|
|
848
838
|
]
|
|
@@ -861,7 +851,7 @@ const Fo = g.div`
|
|
|
861
851
|
}
|
|
862
852
|
)
|
|
863
853
|
] }) });
|
|
864
|
-
}, Je = g.div`
|
|
854
|
+
}, In = ({ icon: e, color: t, reserveSpace: o }) => to(e) ? /* @__PURE__ */ n("img", { src: e, alt: "" }) : e ? /* @__PURE__ */ n(G, { icon: e, style: { color: t } }) : o ? /* @__PURE__ */ n("span", { className: "icon-slot" }) : null, Je = g.div`
|
|
865
855
|
display: flex;
|
|
866
856
|
align-items: center;
|
|
867
857
|
gap: var(--base-gap-small);
|
|
@@ -886,7 +876,7 @@ const Fo = g.div`
|
|
|
886
876
|
flex: none;
|
|
887
877
|
width: 20px;
|
|
888
878
|
}
|
|
889
|
-
`,
|
|
879
|
+
`, dr = 8, En = 10, ur = g.div`
|
|
890
880
|
display: flex;
|
|
891
881
|
gap: var(--base-gap-large);
|
|
892
882
|
flex: 1;
|
|
@@ -957,7 +947,7 @@ const Fo = g.div`
|
|
|
957
947
|
onChange: (a) => t(a[0]),
|
|
958
948
|
onClear: () => t(void 0),
|
|
959
949
|
placeholder: "No project",
|
|
960
|
-
searchOnNumber:
|
|
950
|
+
searchOnNumber: En,
|
|
961
951
|
widthExpand: !0
|
|
962
952
|
}
|
|
963
953
|
);
|
|
@@ -974,7 +964,7 @@ const Fo = g.div`
|
|
|
974
964
|
onChange: (s) => t(s[0]),
|
|
975
965
|
onClear: () => t(void 0),
|
|
976
966
|
placeholder: r ? "Loading..." : "No user",
|
|
977
|
-
searchOnNumber:
|
|
967
|
+
searchOnNumber: En,
|
|
978
968
|
widthExpand: !0
|
|
979
969
|
}
|
|
980
970
|
);
|
|
@@ -984,12 +974,16 @@ const Fo = g.div`
|
|
|
984
974
|
}, yr = ["label", (e) => String(e.value), "description", "fulltext"], xr = ({ resolver: e, settings: t, onClose: o }) => {
|
|
985
975
|
const [r, a] = U({}), [s, i] = U(t), [v, b] = U(""), { user: c } = fn(), u = e.settingsForm || [], l = new Set(u.map((T) => T.name)), m = e.acceptedParams || {}, x = !!c?.data?.isAdmin, d = Object.keys(m).filter(
|
|
986
976
|
(T) => !l.has(T) && (T !== "user" || x)
|
|
987
|
-
), h = x && !("user" in m),
|
|
977
|
+
), h = x && !("user" in m), I = X(
|
|
988
978
|
() => ({ ...s, ...r }),
|
|
989
979
|
[s, r]
|
|
990
|
-
), {
|
|
980
|
+
), {
|
|
981
|
+
data: S,
|
|
982
|
+
isFetching: f,
|
|
983
|
+
isError: p
|
|
984
|
+
} = no({
|
|
991
985
|
enumName: e.name,
|
|
992
|
-
params:
|
|
986
|
+
params: I
|
|
993
987
|
}), y = X(
|
|
994
988
|
() => mn(S?.items || []).map((T) => ({
|
|
995
989
|
...T,
|
|
@@ -1004,7 +998,7 @@ const Fo = g.div`
|
|
|
1004
998
|
[y, P]
|
|
1005
999
|
), N = $.some((T) => !!T.icon), B = (T) => {
|
|
1006
1000
|
T.stopPropagation(), T.key === "Escape" && o();
|
|
1007
|
-
},
|
|
1001
|
+
}, O = () => !d.length && !h ? /* @__PURE__ */ n(we, { children: "This resolver has no context params." }) : /* @__PURE__ */ k(wt, { children: [
|
|
1008
1002
|
h && /* @__PURE__ */ n(te, { label: "user", children: /* @__PURE__ */ n(
|
|
1009
1003
|
Tn,
|
|
1010
1004
|
{
|
|
@@ -1034,7 +1028,7 @@ const Fo = g.div`
|
|
|
1034
1028
|
] });
|
|
1035
1029
|
}
|
|
1036
1030
|
return $.length ? $.map((T) => /* @__PURE__ */ k(vr, { title: T.description, children: [
|
|
1037
|
-
/* @__PURE__ */ n(
|
|
1031
|
+
/* @__PURE__ */ n(In, { icon: T.icon, color: T.color, reserveSpace: N }),
|
|
1038
1032
|
/* @__PURE__ */ n("span", { className: "label", children: T.label }),
|
|
1039
1033
|
/* @__PURE__ */ n("span", { className: "value", children: String(T.value) })
|
|
1040
1034
|
] }, String(T.value))) : /* @__PURE__ */ k(we, { children: [
|
|
@@ -1056,7 +1050,7 @@ const Fo = g.div`
|
|
|
1056
1050
|
/* @__PURE__ */ k(pr, { children: [
|
|
1057
1051
|
/* @__PURE__ */ k(st, { children: [
|
|
1058
1052
|
/* @__PURE__ */ n(lt, { children: "Context Params" }),
|
|
1059
|
-
|
|
1053
|
+
O()
|
|
1060
1054
|
] }),
|
|
1061
1055
|
/* @__PURE__ */ k(st, { children: [
|
|
1062
1056
|
/* @__PURE__ */ n(lt, { children: "Form" }),
|
|
@@ -1069,7 +1063,7 @@ const Fo = g.div`
|
|
|
1069
1063
|
] }),
|
|
1070
1064
|
/* @__PURE__ */ k(mr, { children: [
|
|
1071
1065
|
/* @__PURE__ */ n(
|
|
1072
|
-
|
|
1066
|
+
Ae,
|
|
1073
1067
|
{
|
|
1074
1068
|
value: v,
|
|
1075
1069
|
placeholder: "Search items...",
|
|
@@ -1086,7 +1080,7 @@ const Fo = g.div`
|
|
|
1086
1080
|
}, Ve = "__custom__", ct = 5, wr = [], Sr = "No preview items found.", kr = 5, Cr = {
|
|
1087
1081
|
project_name: "The select options will change based on the project it is used in.",
|
|
1088
1082
|
user: "The select options will change based on the current user."
|
|
1089
|
-
},
|
|
1083
|
+
}, Ir = g.div`
|
|
1090
1084
|
display: flex;
|
|
1091
1085
|
flex-direction: column;
|
|
1092
1086
|
gap: var(--base-gap-large);
|
|
@@ -1101,7 +1095,7 @@ const Fo = g.div`
|
|
|
1101
1095
|
padding: var(--padding-m);
|
|
1102
1096
|
border-radius: var(--border-radius-m);
|
|
1103
1097
|
background-color: var(--md-sys-color-surface-container);
|
|
1104
|
-
`,
|
|
1098
|
+
`, Er = g.button`
|
|
1105
1099
|
display: flex;
|
|
1106
1100
|
align-items: center;
|
|
1107
1101
|
align-self: flex-start;
|
|
@@ -1165,10 +1159,10 @@ const Fo = g.div`
|
|
|
1165
1159
|
const l = c.length - ct, m = c.slice(0, ct).map((d) => ({ option: d, icon: gn(d.icon) })), x = m.some(({ icon: d }) => !!d);
|
|
1166
1160
|
return /* @__PURE__ */ k(Be, { children: [
|
|
1167
1161
|
m.map(({ option: d, icon: h }) => /* @__PURE__ */ k(Je, { children: [
|
|
1168
|
-
/* @__PURE__ */ n(
|
|
1162
|
+
/* @__PURE__ */ n(In, { icon: h, color: d.color, reserveSpace: x }),
|
|
1169
1163
|
/* @__PURE__ */ n("span", { className: "label", children: d.label })
|
|
1170
1164
|
] }, String(d.value))),
|
|
1171
|
-
l > 0 && /* @__PURE__ */ k(
|
|
1165
|
+
l > 0 && /* @__PURE__ */ k(Er, { type: "button", onClick: r, children: [
|
|
1172
1166
|
"+",
|
|
1173
1167
|
l,
|
|
1174
1168
|
" more"
|
|
@@ -1188,8 +1182,8 @@ const Fo = g.div`
|
|
|
1188
1182
|
value: p.name,
|
|
1189
1183
|
label: p.label || St(p.name)
|
|
1190
1184
|
}))
|
|
1191
|
-
], x = t || Ve, d = i.find((p) => p.name === t), h = d?.settingsForm || wr,
|
|
1192
|
-
return /* @__PURE__ */ k(
|
|
1185
|
+
], x = t || Ve, d = i.find((p) => p.name === t), h = d?.settingsForm || wr, I = o || {}, S = hn(d?.acceptedParams).map((p) => Cr[p]).join(" ");
|
|
1186
|
+
return /* @__PURE__ */ k(Ir, { children: [
|
|
1193
1187
|
/* @__PURE__ */ n(
|
|
1194
1188
|
pe,
|
|
1195
1189
|
{
|
|
@@ -1234,7 +1228,7 @@ const Fo = g.div`
|
|
|
1234
1228
|
pn,
|
|
1235
1229
|
{
|
|
1236
1230
|
fields: h,
|
|
1237
|
-
values:
|
|
1231
|
+
values: I,
|
|
1238
1232
|
onChange: s
|
|
1239
1233
|
},
|
|
1240
1234
|
t
|
|
@@ -1245,7 +1239,7 @@ const Fo = g.div`
|
|
|
1245
1239
|
{
|
|
1246
1240
|
resolver: d.name,
|
|
1247
1241
|
acceptedParams: d.acceptedParams,
|
|
1248
|
-
settings:
|
|
1242
|
+
settings: I,
|
|
1249
1243
|
onShowMore: l
|
|
1250
1244
|
}
|
|
1251
1245
|
),
|
|
@@ -1264,7 +1258,7 @@ const Fo = g.div`
|
|
|
1264
1258
|
xr,
|
|
1265
1259
|
{
|
|
1266
1260
|
resolver: d,
|
|
1267
|
-
settings:
|
|
1261
|
+
settings: I,
|
|
1268
1262
|
onClose: () => u(!1)
|
|
1269
1263
|
}
|
|
1270
1264
|
)
|
|
@@ -1293,13 +1287,13 @@ const Fo = g.div`
|
|
|
1293
1287
|
{ value: "number", label: "Number", icon: ve("number", "integer") },
|
|
1294
1288
|
{ value: "checkbox", label: "Checkbox", icon: ve("checkbox", "boolean") },
|
|
1295
1289
|
{ value: "datetime", label: "Date and time", icon: ve("datetime", "datetime") }
|
|
1296
|
-
],
|
|
1290
|
+
], Dr = {
|
|
1297
1291
|
text: ["minLength", "maxLength", "regex"],
|
|
1298
1292
|
select: ["enum"],
|
|
1299
1293
|
number: ["ge", "gt", "le", "lt"],
|
|
1300
1294
|
checkbox: [],
|
|
1301
1295
|
datetime: []
|
|
1302
|
-
},
|
|
1296
|
+
}, Ar = {
|
|
1303
1297
|
checkbox: ["example"]
|
|
1304
1298
|
}, vt = (e, t, o) => {
|
|
1305
1299
|
switch (e) {
|
|
@@ -1317,7 +1311,7 @@ const Fo = g.div`
|
|
|
1317
1311
|
default:
|
|
1318
1312
|
return "text";
|
|
1319
1313
|
}
|
|
1320
|
-
},
|
|
1314
|
+
}, Or = (e, t) => {
|
|
1321
1315
|
switch (e) {
|
|
1322
1316
|
case "text":
|
|
1323
1317
|
return "string";
|
|
@@ -1330,15 +1324,15 @@ const Fo = g.div`
|
|
|
1330
1324
|
case "datetime":
|
|
1331
1325
|
return "datetime";
|
|
1332
1326
|
}
|
|
1333
|
-
},
|
|
1327
|
+
}, Lr = [
|
|
1334
1328
|
"string",
|
|
1335
1329
|
"integer",
|
|
1336
1330
|
"float",
|
|
1337
1331
|
"boolean",
|
|
1338
1332
|
"datetime",
|
|
1339
1333
|
"list_of_strings"
|
|
1340
|
-
],
|
|
1341
|
-
if (!e || !
|
|
1334
|
+
], us = (e, t, o) => {
|
|
1335
|
+
if (!e || !Lr.includes(e)) return e ?? "";
|
|
1342
1336
|
if (e === "list_of_strings") return "Select (multiple)";
|
|
1343
1337
|
const r = vt(e, t, o);
|
|
1344
1338
|
return ze.find((a) => a.value === r)?.label ?? e;
|
|
@@ -1401,7 +1395,7 @@ const Fo = g.div`
|
|
|
1401
1395
|
const i = s;
|
|
1402
1396
|
i === "data" && t.data && o.data ? o.data = { ...o.data, ...t.data } : t[i] !== void 0 && (o[i] = t[i]);
|
|
1403
1397
|
}), o;
|
|
1404
|
-
},
|
|
1398
|
+
}, ps = ({
|
|
1405
1399
|
attribute: e,
|
|
1406
1400
|
defaultData: t,
|
|
1407
1401
|
existingNames: o,
|
|
@@ -1420,20 +1414,20 @@ const Fo = g.div`
|
|
|
1420
1414
|
...c
|
|
1421
1415
|
}), [l, m] = U(u), [x, d] = U(
|
|
1422
1416
|
() => vt(u?.data?.type, u?.data?.enum, u?.data?.enumResolver)
|
|
1423
|
-
), [h,
|
|
1417
|
+
), [h, I] = U(() => u?.data?.type === "float");
|
|
1424
1418
|
J(() => {
|
|
1425
1419
|
e && (m(e), d(
|
|
1426
1420
|
vt(e.data?.type, e.data?.enum, e.data?.enumResolver)
|
|
1427
|
-
),
|
|
1421
|
+
), I(e.data?.type === "float"));
|
|
1428
1422
|
}, [e]);
|
|
1429
1423
|
const S = !e, f = (C, _) => {
|
|
1430
|
-
m((
|
|
1424
|
+
m((L) => L && { ...L, [C]: _ });
|
|
1431
1425
|
}, p = (C, _) => {
|
|
1432
|
-
m((
|
|
1433
|
-
if (!
|
|
1434
|
-
return
|
|
1435
|
-
const M = { ...
|
|
1436
|
-
return { ...
|
|
1426
|
+
m((L) => {
|
|
1427
|
+
if (!L || !L.data)
|
|
1428
|
+
return L;
|
|
1429
|
+
const M = { ...L.data, [C]: _ };
|
|
1430
|
+
return { ...L, data: M };
|
|
1437
1431
|
});
|
|
1438
1432
|
};
|
|
1439
1433
|
let y = "";
|
|
@@ -1469,11 +1463,11 @@ const Fo = g.div`
|
|
|
1469
1463
|
(!C?.scope || C?.scope?.some((_) => l?.scope?.includes(_))) && $.push(C.value);
|
|
1470
1464
|
});
|
|
1471
1465
|
const N = [
|
|
1472
|
-
...
|
|
1466
|
+
...Dr[x] ?? [],
|
|
1473
1467
|
...x === "select" && l?.data?.type === "list_of_strings" ? ["minItems", "maxItems"] : []
|
|
1474
|
-
], B =
|
|
1468
|
+
], B = Ar[x] ?? [];
|
|
1475
1469
|
$ = [...$, ...N].filter((C) => !B.includes(C));
|
|
1476
|
-
const
|
|
1470
|
+
const O = {
|
|
1477
1471
|
enum: (C = [], _) => /* @__PURE__ */ n(
|
|
1478
1472
|
_r,
|
|
1479
1473
|
{
|
|
@@ -1482,21 +1476,21 @@ const Fo = g.div`
|
|
|
1482
1476
|
enumResolverSettings: l?.data?.enumResolverSettings,
|
|
1483
1477
|
onChangeEnum: _,
|
|
1484
1478
|
onChangeResolver: z,
|
|
1485
|
-
onChangeResolverSettings: (
|
|
1479
|
+
onChangeResolverSettings: (L) => p("enumResolverSettings", L)
|
|
1486
1480
|
}
|
|
1487
1481
|
),
|
|
1488
1482
|
inherit: (C, _) => /* @__PURE__ */ n(
|
|
1489
|
-
|
|
1483
|
+
De,
|
|
1490
1484
|
{
|
|
1491
1485
|
checked: C,
|
|
1492
|
-
onChange: (
|
|
1486
|
+
onChange: (L) => _(L.target.checked)
|
|
1493
1487
|
}
|
|
1494
1488
|
),
|
|
1495
1489
|
booleanDefault: (C, _) => /* @__PURE__ */ n(
|
|
1496
|
-
|
|
1490
|
+
De,
|
|
1497
1491
|
{
|
|
1498
1492
|
checked: C,
|
|
1499
|
-
onChange: (
|
|
1493
|
+
onChange: (L) => _(L.target.checked)
|
|
1500
1494
|
}
|
|
1501
1495
|
)
|
|
1502
1496
|
}, z = (C) => {
|
|
@@ -1506,7 +1500,7 @@ const Fo = g.div`
|
|
|
1506
1500
|
p("title", _), S && f("name", at(_));
|
|
1507
1501
|
}, V = (C) => {
|
|
1508
1502
|
const _ = C[0];
|
|
1509
|
-
d(_), p("type",
|
|
1503
|
+
d(_), p("type", Or(_, h)), _ !== "select" && (p("enum", void 0), p("enumResolver", void 0), p("enumResolverSettings", void 0), p("minItems", void 0), p("maxItems", void 0)), _ !== "text" && l?.data?.regex && p("regex", ""), p("widget", void 0);
|
|
1510
1504
|
}, R = ze.find((C) => C.value === x)?.widgets;
|
|
1511
1505
|
return /* @__PURE__ */ n(
|
|
1512
1506
|
qe,
|
|
@@ -1522,7 +1516,7 @@ const Fo = g.div`
|
|
|
1522
1516
|
C.key === "Enter" && (C.metaKey || C.ctrlKey) && (C.preventDefault(), w());
|
|
1523
1517
|
},
|
|
1524
1518
|
children: l && /* @__PURE__ */ k(wt, { children: [
|
|
1525
|
-
!s.includes("title") && /* @__PURE__ */ n(te, { label: "Title", children: /* @__PURE__ */ n(
|
|
1519
|
+
!s.includes("title") && /* @__PURE__ */ n(te, { label: "Title", children: /* @__PURE__ */ n(Ae, { value: l?.data.title, onChange: T, autoFocus: !0 }) }, "title"),
|
|
1526
1520
|
!s.includes("name") && /* @__PURE__ */ n(te, { label: "Name", children: /* @__PURE__ */ n(
|
|
1527
1521
|
Xn,
|
|
1528
1522
|
{
|
|
@@ -1572,7 +1566,7 @@ const Fo = g.div`
|
|
|
1572
1566
|
)
|
|
1573
1567
|
] }) }),
|
|
1574
1568
|
!s.includes("type") && x === "select" && /* @__PURE__ */ n(te, { label: "Multi-select", "data-tooltip": "Allow multiple values to be selected", children: /* @__PURE__ */ n(
|
|
1575
|
-
|
|
1569
|
+
De,
|
|
1576
1570
|
{
|
|
1577
1571
|
checked: l.data.type === "list_of_strings",
|
|
1578
1572
|
disabled: l.builtin || !S,
|
|
@@ -1583,24 +1577,24 @@ const Fo = g.div`
|
|
|
1583
1577
|
}
|
|
1584
1578
|
) }),
|
|
1585
1579
|
!s.includes("type") && x === "number" && /* @__PURE__ */ n(te, { label: "Decimal", children: /* @__PURE__ */ n(
|
|
1586
|
-
|
|
1580
|
+
De,
|
|
1587
1581
|
{
|
|
1588
1582
|
checked: h,
|
|
1589
1583
|
disabled: l.builtin || !S,
|
|
1590
1584
|
onChange: (C) => {
|
|
1591
1585
|
const _ = C.target.checked;
|
|
1592
|
-
|
|
1586
|
+
I(_), p("type", _ ? "float" : "integer");
|
|
1593
1587
|
}
|
|
1594
1588
|
}
|
|
1595
1589
|
) }),
|
|
1596
1590
|
$.map((C) => {
|
|
1597
1591
|
if (s.includes(C)) return null;
|
|
1598
|
-
let _ = null,
|
|
1592
|
+
let _ = null, L = Zn(C);
|
|
1599
1593
|
if (C === "enum" || C === "inherit") {
|
|
1600
|
-
const M =
|
|
1594
|
+
const M = O[C];
|
|
1601
1595
|
_ = M(l?.data[C], (Y) => p(C, Y));
|
|
1602
1596
|
} else if (C === "default" && l?.data?.type === "boolean")
|
|
1603
|
-
_ =
|
|
1597
|
+
_ = O.booleanDefault(
|
|
1604
1598
|
l?.data[C],
|
|
1605
1599
|
(M) => p(C, M)
|
|
1606
1600
|
);
|
|
@@ -1623,7 +1617,7 @@ const Fo = g.div`
|
|
|
1623
1617
|
});
|
|
1624
1618
|
}
|
|
1625
1619
|
}
|
|
1626
|
-
),
|
|
1620
|
+
), L = C === "ge" ? "Min" : "Max";
|
|
1627
1621
|
} else {
|
|
1628
1622
|
const M = (Y) => {
|
|
1629
1623
|
const ne = Y.target.value;
|
|
@@ -1642,7 +1636,7 @@ const Fo = g.div`
|
|
|
1642
1636
|
}
|
|
1643
1637
|
};
|
|
1644
1638
|
_ = /* @__PURE__ */ n(
|
|
1645
|
-
|
|
1639
|
+
Ae,
|
|
1646
1640
|
{
|
|
1647
1641
|
value: String(l?.data[C] ?? ""),
|
|
1648
1642
|
onChange: M
|
|
@@ -1652,7 +1646,7 @@ const Fo = g.div`
|
|
|
1652
1646
|
return /* @__PURE__ */ n(
|
|
1653
1647
|
te,
|
|
1654
1648
|
{
|
|
1655
|
-
label:
|
|
1649
|
+
label: L,
|
|
1656
1650
|
style: {
|
|
1657
1651
|
alignItems: "flex-start"
|
|
1658
1652
|
},
|
|
@@ -1674,10 +1668,10 @@ const Fo = g.div`
|
|
|
1674
1668
|
opacity: 1;
|
|
1675
1669
|
transform: translateY(0);
|
|
1676
1670
|
}
|
|
1677
|
-
`,
|
|
1671
|
+
`, ms = g.div`
|
|
1678
1672
|
position: relative;
|
|
1679
1673
|
display: inline-flex;
|
|
1680
|
-
`,
|
|
1674
|
+
`, gs = g.button`
|
|
1681
1675
|
background: none;
|
|
1682
1676
|
border: none;
|
|
1683
1677
|
padding: 0;
|
|
@@ -1709,7 +1703,7 @@ const Fo = g.div`
|
|
|
1709
1703
|
width: 24px;
|
|
1710
1704
|
height: 24px;
|
|
1711
1705
|
}
|
|
1712
|
-
`,
|
|
1706
|
+
`, hs = g(G)`
|
|
1713
1707
|
width: 20px;
|
|
1714
1708
|
height: 20px;
|
|
1715
1709
|
min-width: 20px;
|
|
@@ -1725,7 +1719,7 @@ const Fo = g.div`
|
|
|
1725
1719
|
&:hover {
|
|
1726
1720
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1727
1721
|
}
|
|
1728
|
-
`,
|
|
1722
|
+
`, vs = g.div`
|
|
1729
1723
|
position: fixed;
|
|
1730
1724
|
z-index: 1001;
|
|
1731
1725
|
background-color: var(--md-sys-color-surface-container-highest);
|
|
@@ -1740,13 +1734,13 @@ const Fo = g.div`
|
|
|
1740
1734
|
&.left {
|
|
1741
1735
|
transform-origin: top left;
|
|
1742
1736
|
}
|
|
1743
|
-
`,
|
|
1737
|
+
`, fs = g.div`
|
|
1744
1738
|
display: flex;
|
|
1745
1739
|
flex-direction: column;
|
|
1746
1740
|
gap: var(--base-gap-small);
|
|
1747
1741
|
padding: var(--padding-m);
|
|
1748
1742
|
position: relative;
|
|
1749
|
-
`,
|
|
1743
|
+
`, bs = g(H)`
|
|
1750
1744
|
&.hasIcon {
|
|
1751
1745
|
padding: 4px;
|
|
1752
1746
|
}
|
|
@@ -1762,7 +1756,7 @@ const Fo = g.div`
|
|
|
1762
1756
|
&:hover {
|
|
1763
1757
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1764
1758
|
}
|
|
1765
|
-
`,
|
|
1759
|
+
`, ys = g.div`
|
|
1766
1760
|
display: flex;
|
|
1767
1761
|
flex-direction: column;
|
|
1768
1762
|
gap: 4px;
|
|
@@ -1771,7 +1765,7 @@ const Fo = g.div`
|
|
|
1771
1765
|
${fe.labelSmall}
|
|
1772
1766
|
color: var(--md-sys-color-outline);
|
|
1773
1767
|
}
|
|
1774
|
-
`,
|
|
1768
|
+
`, xs = g.input`
|
|
1775
1769
|
background-color: var(--md-sys-color-surface-container-low);
|
|
1776
1770
|
border: 1px solid var(--md-sys-color-outline-variant);
|
|
1777
1771
|
border-radius: var(--border-radius-m);
|
|
@@ -1793,7 +1787,7 @@ const Fo = g.div`
|
|
|
1793
1787
|
cursor: pointer;
|
|
1794
1788
|
filter: invert(0.5);
|
|
1795
1789
|
}
|
|
1796
|
-
`,
|
|
1790
|
+
`, ws = g(H)`
|
|
1797
1791
|
&:hover {
|
|
1798
1792
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1799
1793
|
}
|
|
@@ -1813,14 +1807,14 @@ const Fo = g.div`
|
|
|
1813
1807
|
|
|
1814
1808
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
1815
1809
|
font-weight: 700;
|
|
1816
|
-
`,
|
|
1810
|
+
`, Ss = le(
|
|
1817
1811
|
({ tooltip: e, ...t }, o) => /* @__PURE__ */ n(Hr, { "data-tooltip": e, "data-tooltip-delay": 0, ...t, ref: o, children: "Early preview" })
|
|
1818
1812
|
), ft = [
|
|
1819
1813
|
{ value: "hero", label: "Hero", short: "Hero", icon: "star" },
|
|
1820
1814
|
{ value: "latestDone", label: "Latest Done", short: "Done", icon: "check_circle" },
|
|
1821
1815
|
{ value: "latest", label: "Latest", short: "Latest", icon: "fiber_new" }
|
|
1822
|
-
],
|
|
1823
|
-
const { attributes: o, listeners: r, setNodeRef: a, transform: s, transition: i, isDragging: v } =
|
|
1816
|
+
], ks = ft.map((e) => e.value), zr = ({ id: e, label: t }) => {
|
|
1817
|
+
const { attributes: o, listeners: r, setNodeRef: a, transform: s, transition: i, isDragging: v } = Et({
|
|
1824
1818
|
id: e
|
|
1825
1819
|
}), b = {
|
|
1826
1820
|
transform: Tt.Transform.toString(s),
|
|
@@ -1840,7 +1834,7 @@ const Fo = g.div`
|
|
|
1840
1834
|
] })
|
|
1841
1835
|
}
|
|
1842
1836
|
);
|
|
1843
|
-
},
|
|
1837
|
+
}, Cs = ({ value: e, onChange: t }) => {
|
|
1844
1838
|
const [o, r] = U(null), a = ln(
|
|
1845
1839
|
cn(dn, {
|
|
1846
1840
|
activationConstraint: {
|
|
@@ -1860,7 +1854,7 @@ const Fo = g.div`
|
|
|
1860
1854
|
if (l && u.id !== l.id) {
|
|
1861
1855
|
const m = s.findIndex((d) => d.value === u.id), x = s.findIndex((d) => d.value === l.id);
|
|
1862
1856
|
if (m !== -1 && x !== -1) {
|
|
1863
|
-
const h = un(s, m, x).map((
|
|
1857
|
+
const h = un(s, m, x).map((I) => I.value);
|
|
1864
1858
|
t(h);
|
|
1865
1859
|
}
|
|
1866
1860
|
}
|
|
@@ -1894,7 +1888,7 @@ const Fo = g.div`
|
|
|
1894
1888
|
children: /* @__PURE__ */ n(Kr, { children: s.map((c) => /* @__PURE__ */ n(zr, { id: c.value, label: c.label }, c.value)) })
|
|
1895
1889
|
}
|
|
1896
1890
|
),
|
|
1897
|
-
/* @__PURE__ */ n(
|
|
1891
|
+
/* @__PURE__ */ n(It, { children: b && /* @__PURE__ */ k(Nn, { className: "overlay", children: [
|
|
1898
1892
|
/* @__PURE__ */ n(Pn, { children: /* @__PURE__ */ n(G, { icon: "drag_indicator" }) }),
|
|
1899
1893
|
/* @__PURE__ */ n(_n, { children: b.label })
|
|
1900
1894
|
] }) })
|
|
@@ -1958,7 +1952,7 @@ const Fo = g.div`
|
|
|
1958
1952
|
.icon {
|
|
1959
1953
|
cursor: pointer;
|
|
1960
1954
|
}
|
|
1961
|
-
`,
|
|
1955
|
+
`, Is = le(
|
|
1962
1956
|
({ tooltip: e = "This page will deprecated in a future version", ...t }, o) => /* @__PURE__ */ n(G, { icon: "ad_off", "data-tooltip": e, ...t, ref: o })
|
|
1963
1957
|
), qr = g(H)`
|
|
1964
1958
|
transition: color 0.2s, background-color 0.2s, opacity 0.2s;
|
|
@@ -1993,9 +1987,9 @@ const Fo = g.div`
|
|
|
1993
1987
|
&.rounded {
|
|
1994
1988
|
border-radius: var(--border-radius-xl);
|
|
1995
1989
|
}
|
|
1996
|
-
`,
|
|
1990
|
+
`, Es = le(
|
|
1997
1991
|
({ feature: e, variant: t = "outline", rounded: o = !0, bolt: r = !1, ...a }, s) => {
|
|
1998
|
-
const { setPowerpackDialog: i } =
|
|
1992
|
+
const { setPowerpackDialog: i } = vo(), v = (b) => {
|
|
1999
1993
|
i(e), a.onClick?.(b);
|
|
2000
1994
|
};
|
|
2001
1995
|
return /* @__PURE__ */ k(
|
|
@@ -2027,12 +2021,12 @@ const Fo = g.div`
|
|
|
2027
2021
|
{ skip: !o || !r?.instanceId }
|
|
2028
2022
|
), s = new URL(Wr), i = r?.instanceId, v = a || 10;
|
|
2029
2023
|
return s.searchParams.append("seats", v.toString()), i && s.searchParams.append("instance_id", i), e && s.searchParams.append("addon", e), s.toString();
|
|
2030
|
-
},
|
|
2024
|
+
}, Ts = le(
|
|
2031
2025
|
({ children: e, addon: t, ...o }, r) => {
|
|
2032
2026
|
const a = Xr({ addon: t });
|
|
2033
2027
|
return /* @__PURE__ */ n("a", { href: a, target: "_blank", rel: "noopener noreferrer", ...o, ref: r, children: e });
|
|
2034
2028
|
}
|
|
2035
|
-
),
|
|
2029
|
+
), Ns = g(qe)`
|
|
2036
2030
|
background: linear-gradient(180deg, rgb(0 121 181 / 0%) -12.03%, rgb(4 255 227 / 26%) 105.38%),
|
|
2037
2031
|
#15171c;
|
|
2038
2032
|
|
|
@@ -2054,7 +2048,7 @@ const Fo = g.div`
|
|
|
2054
2048
|
.cancelButton {
|
|
2055
2049
|
background-color: unset;
|
|
2056
2050
|
}
|
|
2057
|
-
`,
|
|
2051
|
+
`, Ps = g.div`
|
|
2058
2052
|
display: flex;
|
|
2059
2053
|
flex-direction: column;
|
|
2060
2054
|
align-items: center;
|
|
@@ -2084,7 +2078,7 @@ const Fo = g.div`
|
|
|
2084
2078
|
font-size: 32px;
|
|
2085
2079
|
color: var(--md-sys-color-tertiary);
|
|
2086
2080
|
}
|
|
2087
|
-
`,
|
|
2081
|
+
`, _s = g.div`
|
|
2088
2082
|
width: 100%;
|
|
2089
2083
|
|
|
2090
2084
|
h3 {
|
|
@@ -2112,7 +2106,7 @@ const Fo = g.div`
|
|
|
2112
2106
|
gap: 8px;
|
|
2113
2107
|
}
|
|
2114
2108
|
}
|
|
2115
|
-
`,
|
|
2109
|
+
`, Ds = g.div`
|
|
2116
2110
|
cursor: pointer;
|
|
2117
2111
|
text-align: center;
|
|
2118
2112
|
margin-top: 16px;
|
|
@@ -2134,14 +2128,14 @@ const Fo = g.div`
|
|
|
2134
2128
|
&:hover {
|
|
2135
2129
|
background-color: var(--md-sys-color-tertiary-hover);
|
|
2136
2130
|
}
|
|
2137
|
-
`,
|
|
2131
|
+
`, As = le(({ ...e }, t) => /* @__PURE__ */ n(Qr, { ...e, children: "Try for free!" })), Jr = g.div`
|
|
2138
2132
|
display: flex;
|
|
2139
2133
|
flex-direction: column;
|
|
2140
2134
|
gap: 8px;
|
|
2141
2135
|
border-radius: var(--border-radius-l);
|
|
2142
2136
|
background-color: var(--md-sys-color-secondary-container);
|
|
2143
2137
|
padding: var(--padding-m);
|
|
2144
|
-
`,
|
|
2138
|
+
`, Os = le(
|
|
2145
2139
|
({ requiredVersion: e, addonName: t, addonLabel: o, ...r }, a) => {
|
|
2146
2140
|
const s = t || "powerpack", i = o || "Power Features";
|
|
2147
2141
|
return e ? /* @__PURE__ */ k(Jr, { ...r, ref: a, children: [
|
|
@@ -2154,7 +2148,25 @@ const Fo = g.div`
|
|
|
2154
2148
|
] }) })
|
|
2155
2149
|
] }) : `Required ${i} version installed already.`;
|
|
2156
2150
|
}
|
|
2157
|
-
), Zr = g
|
|
2151
|
+
), Zr = g(H)`
|
|
2152
|
+
width: 100%;
|
|
2153
|
+
justify-content: flex-start;
|
|
2154
|
+
margin-bottom: 8px;
|
|
2155
|
+
text-align: left;
|
|
2156
|
+
display: flex;
|
|
2157
|
+
gap: var(--base-gap-small);
|
|
2158
|
+
padding-right: var(--padding-s);
|
|
2159
|
+
padding-left: var(--padding-m);
|
|
2160
|
+
|
|
2161
|
+
.title {
|
|
2162
|
+
flex: 1;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
.preview,
|
|
2166
|
+
.arrow {
|
|
2167
|
+
color: var(--md-sys-color-outline);
|
|
2168
|
+
}
|
|
2169
|
+
`, ei = g.div`
|
|
2158
2170
|
height: 100%;
|
|
2159
2171
|
/* fixed floor so the panel doesn't resize as its content changes */
|
|
2160
2172
|
min-width: 260px;
|
|
@@ -2164,7 +2176,7 @@ const Fo = g.div`
|
|
|
2164
2176
|
z-index: 10;
|
|
2165
2177
|
display: flex;
|
|
2166
2178
|
flex-direction: column;
|
|
2167
|
-
`,
|
|
2179
|
+
`, ti = g.div`
|
|
2168
2180
|
display: flex;
|
|
2169
2181
|
align-items: center;
|
|
2170
2182
|
gap: var(--base-gap-small);
|
|
@@ -2180,38 +2192,20 @@ const Fo = g.div`
|
|
|
2180
2192
|
}
|
|
2181
2193
|
`, Xt = g(H)`
|
|
2182
2194
|
padding: 4px !important;
|
|
2183
|
-
`,
|
|
2195
|
+
`, ni = g.h3`
|
|
2184
2196
|
margin: 0;
|
|
2185
2197
|
flex: 1;
|
|
2186
|
-
`,
|
|
2198
|
+
`, oi = g.div`
|
|
2187
2199
|
padding: 8px;
|
|
2188
2200
|
flex: 1;
|
|
2189
2201
|
overflow-y: auto;
|
|
2190
|
-
`, oi = g(H)`
|
|
2191
|
-
width: 100%;
|
|
2192
|
-
justify-content: flex-start;
|
|
2193
|
-
margin-bottom: 8px;
|
|
2194
|
-
text-align: left;
|
|
2195
|
-
display: flex;
|
|
2196
|
-
gap: var(--base-gap-small);
|
|
2197
|
-
padding-right: var(--padding-s);
|
|
2198
|
-
padding-left: var(--padding-m);
|
|
2199
|
-
|
|
2200
|
-
.title {
|
|
2201
|
-
flex: 1;
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
.preview,
|
|
2205
|
-
.arrow {
|
|
2206
|
-
color: var(--md-sys-color-outline);
|
|
2207
|
-
}
|
|
2208
2202
|
`, ri = ({ settings: e, order: t }) => {
|
|
2209
|
-
const { isPanelOpen: o, selectedSetting: r, closePanel: a, backToMainMenu: s, selectSetting: i } =
|
|
2203
|
+
const { isPanelOpen: o, selectedSetting: r, closePanel: a, backToMainMenu: s, selectSetting: i } = We(), v = () => r && e.find((m) => m.id === r)?.title || "Settings", b = t ? e.toSorted((l, m) => {
|
|
2210
2204
|
const x = l.id ? t.indexOf(l.id) : -1, d = m.id ? t.indexOf(m.id) : -1;
|
|
2211
2205
|
return x === -1 && d === -1 ? 0 : x === -1 ? 1 : d === -1 ? -1 : x - d;
|
|
2212
2206
|
}) : e, c = e.find((l) => l.id === r), u = () => r ? e.find((m) => m.id === r)?.component : /* @__PURE__ */ n(me, { children: b.map(
|
|
2213
2207
|
(m, x) => m.title ? /* @__PURE__ */ k(
|
|
2214
|
-
|
|
2208
|
+
Zr,
|
|
2215
2209
|
{
|
|
2216
2210
|
onClick: () => i(m.id),
|
|
2217
2211
|
variant: "text",
|
|
@@ -2226,14 +2220,14 @@ const Fo = g.div`
|
|
|
2226
2220
|
m.id
|
|
2227
2221
|
) : /* @__PURE__ */ n(Yn, { children: m.component }, m.id)
|
|
2228
2222
|
) });
|
|
2229
|
-
return /* @__PURE__ */ k(
|
|
2230
|
-
/* @__PURE__ */ k(
|
|
2223
|
+
return /* @__PURE__ */ k(ei, { open: o, children: [
|
|
2224
|
+
/* @__PURE__ */ k(ti, { children: [
|
|
2231
2225
|
r && /* @__PURE__ */ n(Xt, { variant: "text", icon: "arrow_back", onClick: s }),
|
|
2232
|
-
/* @__PURE__ */ n(
|
|
2226
|
+
/* @__PURE__ */ n(ni, { children: v() }),
|
|
2233
2227
|
c?.headerActions,
|
|
2234
2228
|
/* @__PURE__ */ n(Xt, { variant: "text", icon: "close", onClick: a })
|
|
2235
2229
|
] }),
|
|
2236
|
-
/* @__PURE__ */ n(
|
|
2230
|
+
/* @__PURE__ */ n(oi, { children: u() })
|
|
2237
2231
|
] });
|
|
2238
2232
|
}, dt = g.ul`
|
|
2239
2233
|
display: flex;
|
|
@@ -2314,7 +2308,7 @@ const Fo = g.div`
|
|
|
2314
2308
|
&.active {
|
|
2315
2309
|
opacity: 1;
|
|
2316
2310
|
}
|
|
2317
|
-
`,
|
|
2311
|
+
`, Dn = le(
|
|
2318
2312
|
({
|
|
2319
2313
|
item: e,
|
|
2320
2314
|
actions: t,
|
|
@@ -2362,7 +2356,7 @@ const Fo = g.div`
|
|
|
2362
2356
|
]
|
|
2363
2357
|
}
|
|
2364
2358
|
)
|
|
2365
|
-
), li = g(
|
|
2359
|
+
), li = g(Dn)`
|
|
2366
2360
|
&:hover {
|
|
2367
2361
|
.pin-action {
|
|
2368
2362
|
opacity: 1;
|
|
@@ -2483,7 +2477,7 @@ const Fo = g.div`
|
|
|
2483
2477
|
onPaintEnter: c,
|
|
2484
2478
|
onDragStart: u
|
|
2485
2479
|
}) => {
|
|
2486
|
-
const { attributes: l, listeners: m, setNodeRef: x, transform: d, transition: h, isDragging:
|
|
2480
|
+
const { attributes: l, listeners: m, setNodeRef: x, transform: d, transition: h, isDragging: I } = Et({
|
|
2487
2481
|
id: e
|
|
2488
2482
|
}), S = {
|
|
2489
2483
|
transform: Tt.Transform.toString(d),
|
|
@@ -2494,7 +2488,7 @@ const Fo = g.div`
|
|
|
2494
2488
|
{
|
|
2495
2489
|
ref: x,
|
|
2496
2490
|
style: S,
|
|
2497
|
-
className:
|
|
2491
|
+
className: I ? "dragging" : "",
|
|
2498
2492
|
id: `column-settings-${e}`,
|
|
2499
2493
|
children: /* @__PURE__ */ n(
|
|
2500
2494
|
bt,
|
|
@@ -2519,10 +2513,10 @@ const Fo = g.div`
|
|
|
2519
2513
|
z-index: 1;
|
|
2520
2514
|
opacity: 0;
|
|
2521
2515
|
}
|
|
2522
|
-
`,
|
|
2516
|
+
`, An = "text_fields", On = ({
|
|
2523
2517
|
field: e,
|
|
2524
2518
|
parentScope: t
|
|
2525
|
-
}) => e ? Z(e) : t ? wn(t) :
|
|
2519
|
+
}) => e ? Z(e) : t ? wn(t) : An, di = (e) => e.length === 1 ? `${e[0].charAt(0).toUpperCase() + e[0].slice(1)} attributes` : "Attributes", Ln = (e = [], t = []) => [
|
|
2526
2520
|
{
|
|
2527
2521
|
id: "attributes",
|
|
2528
2522
|
label: di(e),
|
|
@@ -2540,7 +2534,7 @@ const Fo = g.div`
|
|
|
2540
2534
|
match: (r) => r.parentScope === o
|
|
2541
2535
|
})
|
|
2542
2536
|
)
|
|
2543
|
-
], Rn = (e, t = []) =>
|
|
2537
|
+
], Rn = (e, t = []) => Ln(t, [e]).find((o) => o.match(e)), $n = ({
|
|
2544
2538
|
columns: e,
|
|
2545
2539
|
onToggle: t,
|
|
2546
2540
|
isColumnVisible: o,
|
|
@@ -2555,24 +2549,24 @@ const Fo = g.div`
|
|
|
2555
2549
|
return {
|
|
2556
2550
|
id: d.value,
|
|
2557
2551
|
label: d.label,
|
|
2558
|
-
icon: d.icon ??
|
|
2552
|
+
icon: d.icon ?? On(d),
|
|
2559
2553
|
hoverIcon: s ? "drag_indicator" : void 0,
|
|
2560
2554
|
disableClose: !0,
|
|
2561
2555
|
active: h,
|
|
2562
2556
|
reserveActiveSlot: !0,
|
|
2563
2557
|
onClick: () => t(d.value),
|
|
2564
|
-
onPointerDown: (
|
|
2565
|
-
r?.(d.value), s?.(d,
|
|
2558
|
+
onPointerDown: (I) => {
|
|
2559
|
+
r?.(d.value), s?.(d, I);
|
|
2566
2560
|
},
|
|
2567
|
-
onPointerEnter: (
|
|
2561
|
+
onPointerEnter: (I) => a?.(d.value, I.buttons > 0)
|
|
2568
2562
|
};
|
|
2569
|
-
}, c =
|
|
2563
|
+
}, c = Ln(i, e), u = new Map(c.map((d) => [d.id, []])), l = [];
|
|
2570
2564
|
e.forEach((d) => {
|
|
2571
|
-
const h = c.find((
|
|
2565
|
+
const h = c.find((I) => I.match(d));
|
|
2572
2566
|
h ? u.get(h.id)?.push(d) : l.push(d);
|
|
2573
2567
|
});
|
|
2574
2568
|
const m = c.filter((d) => u.get(d.id)?.length).map((d) => {
|
|
2575
|
-
const h = u.get(d.id),
|
|
2569
|
+
const h = u.get(d.id), I = h.filter((p) => !!p.attrib), S = h.filter((p) => !p.attrib).toSorted((p, y) => p.label.localeCompare(y.label)).map(b);
|
|
2576
2570
|
if (!d.id.startsWith("parent-"))
|
|
2577
2571
|
return {
|
|
2578
2572
|
id: d.id,
|
|
@@ -2587,12 +2581,12 @@ const Fo = g.div`
|
|
|
2587
2581
|
icon: d.icon,
|
|
2588
2582
|
items: [
|
|
2589
2583
|
...S,
|
|
2590
|
-
...
|
|
2584
|
+
...I.length ? [
|
|
2591
2585
|
{
|
|
2592
2586
|
id: `${d.id}-attributes`,
|
|
2593
2587
|
label: `${f.charAt(0).toUpperCase()}${f.slice(1)} attributes`,
|
|
2594
2588
|
icon: "text_fields",
|
|
2595
|
-
items:
|
|
2589
|
+
items: I.map(b)
|
|
2596
2590
|
}
|
|
2597
2591
|
] : []
|
|
2598
2592
|
]
|
|
@@ -2602,10 +2596,10 @@ const Fo = g.div`
|
|
|
2602
2596
|
(d) => d.length
|
|
2603
2597
|
).flatMap((d, h) => h ? [{ id: "divider" }, ...d] : d);
|
|
2604
2598
|
}, yt = ({ menuId: e, menuItems: t }) => {
|
|
2605
|
-
const { menuOpen: o, setMenuOpen: r } =
|
|
2599
|
+
const { menuOpen: o, setMenuOpen: r } = Xe();
|
|
2606
2600
|
return J(() => {
|
|
2607
2601
|
!t.length && o === e && r(!1);
|
|
2608
|
-
}, [t.length, o, e, r]), /* @__PURE__ */ n(
|
|
2602
|
+
}, [t.length, o, e, r]), /* @__PURE__ */ n(Po, { targetId: e, id: e, align: "left", children: /* @__PURE__ */ n(_o, { menu: t, onClose: () => r(!1) }) });
|
|
2609
2603
|
}, ui = 300, Fn = ({
|
|
2610
2604
|
columnVisibility: e,
|
|
2611
2605
|
defaultColumnVisibility: t,
|
|
@@ -2651,7 +2645,7 @@ const Fo = g.div`
|
|
|
2651
2645
|
return l($, f);
|
|
2652
2646
|
});
|
|
2653
2647
|
}
|
|
2654
|
-
}, []),
|
|
2648
|
+
}, []), I = ee((f) => {
|
|
2655
2649
|
if (performance.now() < b.current) {
|
|
2656
2650
|
b.current = 0;
|
|
2657
2651
|
return;
|
|
@@ -2665,14 +2659,14 @@ const Fo = g.div`
|
|
|
2665
2659
|
isVisible: (f) => ae(S, f, t),
|
|
2666
2660
|
onPaintStart: d,
|
|
2667
2661
|
onPaintEnter: h,
|
|
2668
|
-
toggle:
|
|
2662
|
+
toggle: I,
|
|
2669
2663
|
cancelPaint: x,
|
|
2670
2664
|
isPainting: !!a
|
|
2671
2665
|
};
|
|
2672
2666
|
}, Ue = "add-column-menu-list", pi = [], mi = (e, t) => e.parentScope && e.attrib ? `${e.parentScope.charAt(0).toUpperCase()}${e.parentScope.slice(1)} attributes` : Rn(e, t)?.label, He = (e, t) => {
|
|
2673
2667
|
const o = mi(e, t);
|
|
2674
|
-
return { ...e, icon: e.icon ??
|
|
2675
|
-
},
|
|
2668
|
+
return { ...e, icon: e.icon ?? On(e), ...o ? { path: o } : {} };
|
|
2669
|
+
}, Ls = ({
|
|
2676
2670
|
icon: e,
|
|
2677
2671
|
label: t,
|
|
2678
2672
|
checked: o,
|
|
@@ -2680,14 +2674,14 @@ const Fo = g.div`
|
|
|
2680
2674
|
disabled: a,
|
|
2681
2675
|
...s
|
|
2682
2676
|
}) => /* @__PURE__ */ n(
|
|
2683
|
-
|
|
2677
|
+
Dn,
|
|
2684
2678
|
{
|
|
2685
2679
|
item: { value: t, label: t, icon: e },
|
|
2686
2680
|
isDisabled: a,
|
|
2687
2681
|
style: { paddingRight: 8 },
|
|
2688
2682
|
disableHover: !0,
|
|
2689
2683
|
endContent: /* @__PURE__ */ n(
|
|
2690
|
-
|
|
2684
|
+
De,
|
|
2691
2685
|
{
|
|
2692
2686
|
checked: o,
|
|
2693
2687
|
disabled: a,
|
|
@@ -2713,7 +2707,7 @@ const Fo = g.div`
|
|
|
2713
2707
|
columnSummaries: x,
|
|
2714
2708
|
columnSummaryScopes: d,
|
|
2715
2709
|
columnSummaryFormats: h,
|
|
2716
|
-
groupByConfig:
|
|
2710
|
+
groupByConfig: I,
|
|
2717
2711
|
addColumnMenuItems: S,
|
|
2718
2712
|
onColumnDragStart: f,
|
|
2719
2713
|
isColumnDragging: p,
|
|
@@ -2721,10 +2715,10 @@ const Fo = g.div`
|
|
|
2721
2715
|
search: w,
|
|
2722
2716
|
onSearchChange: P
|
|
2723
2717
|
}) => {
|
|
2724
|
-
const [$, N] = U(null), [B,
|
|
2718
|
+
const [$, N] = U(null), [B, O] = U(!1), [z, T] = U(!1), [V, F] = U(!1), R = (E) => !!c && E === "name", {
|
|
2725
2719
|
baseVisibility: C,
|
|
2726
2720
|
displayVisibility: _,
|
|
2727
|
-
isVisible:
|
|
2721
|
+
isVisible: L,
|
|
2728
2722
|
onPaintStart: M,
|
|
2729
2723
|
onPaintEnter: Y,
|
|
2730
2724
|
toggle: ne,
|
|
@@ -2734,14 +2728,14 @@ const Fo = g.div`
|
|
|
2734
2728
|
defaultColumnVisibility: m,
|
|
2735
2729
|
updateColumnVisibility: r,
|
|
2736
2730
|
isLocked: R
|
|
2737
|
-
}), { toggleMenuOpen: be } =
|
|
2731
|
+
}), { toggleMenuOpen: be } = Xe(), ye = K(null), ue = K({ columnVisibility: o, updateColumnVisibility: r });
|
|
2738
2732
|
ue.current = { columnVisibility: o, updateColumnVisibility: r };
|
|
2739
|
-
const
|
|
2733
|
+
const Oe = K(null);
|
|
2740
2734
|
J(() => {
|
|
2741
|
-
if (!t ||
|
|
2742
|
-
|
|
2743
|
-
const { columnVisibility:
|
|
2744
|
-
ae(
|
|
2735
|
+
if (!t || Oe.current === t || !e.some((j) => j.value === t)) return;
|
|
2736
|
+
Oe.current = t;
|
|
2737
|
+
const { columnVisibility: E, updateColumnVisibility: D } = ue.current;
|
|
2738
|
+
ae(E, t, m) || D({ ...E, [t]: !0 });
|
|
2745
2739
|
}, [t, e, m]), J(() => {
|
|
2746
2740
|
!ye.current || !t || ye.current.querySelector(`#column-settings-${t}`)?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2747
2741
|
}, [t, o]);
|
|
@@ -2751,54 +2745,54 @@ const Fo = g.div`
|
|
|
2751
2745
|
distance: 5
|
|
2752
2746
|
}
|
|
2753
2747
|
})
|
|
2754
|
-
),
|
|
2755
|
-
const
|
|
2756
|
-
(W) => ae(
|
|
2757
|
-
),
|
|
2748
|
+
), Le = C, Ce = (E) => !L(E), { visibleColumns: ge, pinnedColumns: ce } = X(() => {
|
|
2749
|
+
const E = e.filter(
|
|
2750
|
+
(W) => ae(Le, W.value, m)
|
|
2751
|
+
), D = E.filter((W) => a.left?.includes(W.value));
|
|
2758
2752
|
return {
|
|
2759
|
-
visibleColumns:
|
|
2760
|
-
pinnedColumns:
|
|
2753
|
+
visibleColumns: E.filter((W) => !a.left?.includes(W.value)),
|
|
2754
|
+
pinnedColumns: D
|
|
2761
2755
|
};
|
|
2762
|
-
}, [e,
|
|
2763
|
-
const
|
|
2764
|
-
return i.length > 0 &&
|
|
2765
|
-
const W = i.indexOf(
|
|
2756
|
+
}, [e, Le, a, m]), ie = X(() => {
|
|
2757
|
+
const E = [...ge];
|
|
2758
|
+
return i.length > 0 && E.sort((D, j) => {
|
|
2759
|
+
const W = i.indexOf(D.value), se = i.indexOf(j.value);
|
|
2766
2760
|
return W === -1 ? 1 : se === -1 ? -1 : W - se;
|
|
2767
|
-
}),
|
|
2768
|
-
}, [ge, i]),
|
|
2769
|
-
const
|
|
2770
|
-
return i.length > 0 &&
|
|
2771
|
-
const W = i.indexOf(
|
|
2761
|
+
}), E;
|
|
2762
|
+
}, [ge, i]), Ie = X(() => {
|
|
2763
|
+
const E = [...ce];
|
|
2764
|
+
return i.length > 0 && E.sort((D, j) => {
|
|
2765
|
+
const W = i.indexOf(D.value), se = i.indexOf(j.value);
|
|
2772
2766
|
return W === -1 ? 1 : se === -1 ? -1 : W - se;
|
|
2773
|
-
}),
|
|
2774
|
-
}, [ce, i]),
|
|
2775
|
-
() => ie.map((
|
|
2767
|
+
}), E;
|
|
2768
|
+
}, [ce, i]), A = X(
|
|
2769
|
+
() => ie.map((E) => E.value),
|
|
2776
2770
|
[ie]
|
|
2777
2771
|
), q = X(
|
|
2778
|
-
() =>
|
|
2779
|
-
[
|
|
2772
|
+
() => Ie.map((E) => E.value),
|
|
2773
|
+
[Ie]
|
|
2780
2774
|
), he = X(() => {
|
|
2781
2775
|
if (typeof w != "string") return [];
|
|
2782
|
-
const
|
|
2783
|
-
return e.map((
|
|
2784
|
-
const j = [
|
|
2785
|
-
return
|
|
2786
|
-
}).toSorted((
|
|
2787
|
-
}, [e, w, y]),
|
|
2776
|
+
const E = w.toLowerCase().split(/\s+/).filter(Boolean);
|
|
2777
|
+
return e.map((D) => ({ ...D, path: Rn(D, y)?.label })).filter((D) => {
|
|
2778
|
+
const j = [D.path, D.label].filter(Boolean).join(" / ").toLowerCase();
|
|
2779
|
+
return E.every((W) => j.includes(W));
|
|
2780
|
+
}).toSorted((D, j) => +!!D.path - +!!j.path);
|
|
2781
|
+
}, [e, w, y]), Ee = X(
|
|
2788
2782
|
() => $n({
|
|
2789
2783
|
columns: e,
|
|
2790
2784
|
onToggle: ne,
|
|
2791
|
-
isColumnVisible:
|
|
2785
|
+
isColumnVisible: L,
|
|
2792
2786
|
onPaintStart: M,
|
|
2793
2787
|
onPaintEnter: Y,
|
|
2794
2788
|
scopes: y
|
|
2795
2789
|
}),
|
|
2796
2790
|
[e, _, ne, M, Y, y]
|
|
2797
|
-
), Te = S ??
|
|
2791
|
+
), Te = S ?? Ee, _t = typeof w == "string" ? /* @__PURE__ */ n(
|
|
2798
2792
|
vi,
|
|
2799
2793
|
{
|
|
2800
2794
|
value: w,
|
|
2801
|
-
onChange: (
|
|
2795
|
+
onChange: (E) => P?.(E),
|
|
2802
2796
|
onClose: () => P?.(null)
|
|
2803
2797
|
}
|
|
2804
2798
|
) : /* @__PURE__ */ n(
|
|
@@ -2811,7 +2805,7 @@ const Fo = g.div`
|
|
|
2811
2805
|
onClick: () => be(Ue),
|
|
2812
2806
|
children: "Add column"
|
|
2813
2807
|
}
|
|
2814
|
-
),
|
|
2808
|
+
), Dt = (E) => ({
|
|
2815
2809
|
columnVisibility: { ...o },
|
|
2816
2810
|
columnOrder: [...i],
|
|
2817
2811
|
columnPinning: { ...a },
|
|
@@ -2820,49 +2814,49 @@ const Fo = g.div`
|
|
|
2820
2814
|
columnSummaryScopes: d,
|
|
2821
2815
|
columnSummaryFormats: h,
|
|
2822
2816
|
groupBy: c,
|
|
2823
|
-
groupByConfig:
|
|
2817
|
+
groupByConfig: I,
|
|
2824
2818
|
sorting: u,
|
|
2825
2819
|
rowHeight: l,
|
|
2826
|
-
...
|
|
2827
|
-
}), et = (
|
|
2828
|
-
const
|
|
2829
|
-
if (
|
|
2830
|
-
|
|
2820
|
+
...E
|
|
2821
|
+
}), et = (E) => {
|
|
2822
|
+
const D = { ...a };
|
|
2823
|
+
if (D.left?.includes(E)) {
|
|
2824
|
+
D.left = D.left.filter((j) => j !== E), s(D);
|
|
2831
2825
|
return;
|
|
2832
2826
|
}
|
|
2833
|
-
if (
|
|
2834
|
-
s(
|
|
2827
|
+
if (D.left = [...D.left || [], E], ae(o, E, m)) {
|
|
2828
|
+
s(D);
|
|
2835
2829
|
return;
|
|
2836
2830
|
}
|
|
2837
2831
|
v(
|
|
2838
|
-
|
|
2839
|
-
columnPinning:
|
|
2840
|
-
columnVisibility: { ...o, [
|
|
2832
|
+
Dt({
|
|
2833
|
+
columnPinning: D,
|
|
2834
|
+
columnVisibility: { ...o, [E]: !0 }
|
|
2841
2835
|
})
|
|
2842
2836
|
);
|
|
2843
|
-
}, Bn = (
|
|
2844
|
-
const
|
|
2845
|
-
N(
|
|
2846
|
-
}, Un = (
|
|
2847
|
-
const { active:
|
|
2848
|
-
if (j &&
|
|
2837
|
+
}, Bn = (E) => {
|
|
2838
|
+
const D = E.active.id;
|
|
2839
|
+
N(D), T(a.left?.includes(D) || !1), re();
|
|
2840
|
+
}, Un = (E) => {
|
|
2841
|
+
const { active: D, over: j } = E;
|
|
2842
|
+
if (j && D.id !== j.id) {
|
|
2849
2843
|
const W = ae(
|
|
2850
2844
|
o,
|
|
2851
2845
|
j.id,
|
|
2852
2846
|
m
|
|
2853
2847
|
), se = a.left?.includes(j.id) || !1;
|
|
2854
|
-
|
|
2848
|
+
O(W && se), F(W && !se);
|
|
2855
2849
|
} else
|
|
2856
2850
|
F(!1);
|
|
2857
|
-
}, Hn = (
|
|
2858
|
-
|
|
2859
|
-
const { active:
|
|
2860
|
-
if (j &&
|
|
2851
|
+
}, Hn = (E) => {
|
|
2852
|
+
O(!1), T(!1), F(!1);
|
|
2853
|
+
const { active: D, over: j } = E;
|
|
2854
|
+
if (j && D.id !== j.id) {
|
|
2861
2855
|
const W = [...ge, ...ce].find(
|
|
2862
|
-
(de) => de.value ===
|
|
2856
|
+
(de) => de.value === D.id
|
|
2863
2857
|
), se = [...ge, ...ce].find((de) => de.value === j.id);
|
|
2864
2858
|
if (W && se) {
|
|
2865
|
-
const de =
|
|
2859
|
+
const de = D.id, tt = j.id, zn = ae(
|
|
2866
2860
|
o,
|
|
2867
2861
|
de,
|
|
2868
2862
|
m
|
|
@@ -2870,17 +2864,17 @@ const Fo = g.div`
|
|
|
2870
2864
|
o,
|
|
2871
2865
|
tt,
|
|
2872
2866
|
m
|
|
2873
|
-
), nt = a.left?.includes(de) || !1, ot = a.left?.includes(tt) || !1, Ne =
|
|
2867
|
+
), nt = a.left?.includes(de) || !1, ot = a.left?.includes(tt) || !1, Ne = Dt({});
|
|
2874
2868
|
if (zn && jn) {
|
|
2875
2869
|
let Pe = [...Ne.columnPinning.left || []];
|
|
2876
2870
|
nt !== ot && (nt && !ot ? Pe = Pe.filter((it) => it !== de) : !nt && ot && (Pe = [...Pe, de]));
|
|
2877
|
-
const rt = [...q, ...
|
|
2878
|
-
if (
|
|
2879
|
-
console.error("Invalid column order state"),
|
|
2871
|
+
const rt = [...q, ...A], At = rt.indexOf(de), Ot = rt.indexOf(tt);
|
|
2872
|
+
if (At === -1 || Ot === -1) {
|
|
2873
|
+
console.error("Invalid column order state"), fo.error("Invalid column order state");
|
|
2880
2874
|
return;
|
|
2881
2875
|
}
|
|
2882
|
-
const
|
|
2883
|
-
Ne.columnOrder =
|
|
2876
|
+
const Lt = un(rt, At, Ot), Kn = Lt.filter((it) => Pe.includes(it));
|
|
2877
|
+
Ne.columnOrder = Lt, Ne.columnPinning = {
|
|
2884
2878
|
...Ne.columnPinning,
|
|
2885
2879
|
left: Kn
|
|
2886
2880
|
}, v(Ne);
|
|
@@ -2888,29 +2882,29 @@ const Fo = g.div`
|
|
|
2888
2882
|
}
|
|
2889
2883
|
}
|
|
2890
2884
|
N(null);
|
|
2891
|
-
}, Re = $ ? [...ge, ...ce].find((
|
|
2885
|
+
}, Re = $ ? [...ge, ...ce].find((E) => E.value === $) : null;
|
|
2892
2886
|
return typeof w == "string" ? /* @__PURE__ */ k(Jt, { ref: ye, "data-column-drag-origin": !0, children: [
|
|
2893
2887
|
_t,
|
|
2894
2888
|
/* @__PURE__ */ n(yt, { menuId: Ue, menuItems: Te }),
|
|
2895
2889
|
/* @__PURE__ */ k(ut, { children: [
|
|
2896
2890
|
/* @__PURE__ */ n(pt, { children: "All Columns" }),
|
|
2897
|
-
/* @__PURE__ */ n(dt, { children: he.map((
|
|
2891
|
+
/* @__PURE__ */ n(dt, { children: he.map((E) => /* @__PURE__ */ n(
|
|
2898
2892
|
bt,
|
|
2899
2893
|
{
|
|
2900
|
-
id: `column-settings-${
|
|
2901
|
-
column: He(
|
|
2902
|
-
isPinned: a.left?.includes(
|
|
2903
|
-
isHidden: Ce(
|
|
2904
|
-
isHighlighted: t ===
|
|
2905
|
-
isDisabled: R(
|
|
2894
|
+
id: `column-settings-${E.value}`,
|
|
2895
|
+
column: He(E, y),
|
|
2896
|
+
isPinned: a.left?.includes(E.value) || !1,
|
|
2897
|
+
isHidden: Ce(E.value),
|
|
2898
|
+
isHighlighted: t === E.value,
|
|
2899
|
+
isDisabled: R(E.value),
|
|
2906
2900
|
hideDragHandle: !0,
|
|
2907
2901
|
onTogglePinning: et,
|
|
2908
2902
|
onToggleVisibility: ne,
|
|
2909
2903
|
onPaintStart: M,
|
|
2910
2904
|
onPaintEnter: Y,
|
|
2911
|
-
onDragStart: (
|
|
2905
|
+
onDragStart: (D) => f?.(E, D)
|
|
2912
2906
|
},
|
|
2913
|
-
|
|
2907
|
+
E.value
|
|
2914
2908
|
)) })
|
|
2915
2909
|
] })
|
|
2916
2910
|
] }) : /* @__PURE__ */ n(
|
|
@@ -2929,24 +2923,24 @@ const Fo = g.div`
|
|
|
2929
2923
|
/* @__PURE__ */ n(
|
|
2930
2924
|
Ke,
|
|
2931
2925
|
{
|
|
2932
|
-
items:
|
|
2926
|
+
items: Ie.map((E) => E.value),
|
|
2933
2927
|
strategy: Ge,
|
|
2934
|
-
children: /* @__PURE__ */ n(dt, { children:
|
|
2928
|
+
children: /* @__PURE__ */ n(dt, { children: Ie.map((E) => /* @__PURE__ */ n(
|
|
2935
2929
|
Qt,
|
|
2936
2930
|
{
|
|
2937
|
-
id:
|
|
2938
|
-
column: He(
|
|
2931
|
+
id: E.value,
|
|
2932
|
+
column: He(E, y),
|
|
2939
2933
|
isPinned: !0,
|
|
2940
|
-
isHidden: Ce(
|
|
2941
|
-
isDisabled: R(
|
|
2942
|
-
isHighlighted: t ===
|
|
2934
|
+
isHidden: Ce(E.value),
|
|
2935
|
+
isDisabled: R(E.value),
|
|
2936
|
+
isHighlighted: t === E.value,
|
|
2943
2937
|
onTogglePinning: et,
|
|
2944
2938
|
onToggleVisibility: ne,
|
|
2945
2939
|
onPaintStart: M,
|
|
2946
2940
|
onPaintEnter: Y,
|
|
2947
|
-
onDragStart: (
|
|
2941
|
+
onDragStart: (D) => f?.(E, D)
|
|
2948
2942
|
},
|
|
2949
|
-
|
|
2943
|
+
E.value
|
|
2950
2944
|
)) })
|
|
2951
2945
|
}
|
|
2952
2946
|
)
|
|
@@ -2956,29 +2950,29 @@ const Fo = g.div`
|
|
|
2956
2950
|
/* @__PURE__ */ n(
|
|
2957
2951
|
Ke,
|
|
2958
2952
|
{
|
|
2959
|
-
items: ie.map((
|
|
2953
|
+
items: ie.map((E) => E.value),
|
|
2960
2954
|
strategy: Ge,
|
|
2961
|
-
children: /* @__PURE__ */ n(dt, { children: ie.map((
|
|
2955
|
+
children: /* @__PURE__ */ n(dt, { children: ie.map((E) => /* @__PURE__ */ n(
|
|
2962
2956
|
Qt,
|
|
2963
2957
|
{
|
|
2964
|
-
id:
|
|
2965
|
-
column: He(
|
|
2958
|
+
id: E.value,
|
|
2959
|
+
column: He(E, y),
|
|
2966
2960
|
isPinned: !1,
|
|
2967
|
-
isHidden: Ce(
|
|
2968
|
-
isHighlighted: t ===
|
|
2969
|
-
isDisabled: R(
|
|
2961
|
+
isHidden: Ce(E.value),
|
|
2962
|
+
isHighlighted: t === E.value,
|
|
2963
|
+
isDisabled: R(E.value),
|
|
2970
2964
|
onTogglePinning: et,
|
|
2971
2965
|
onToggleVisibility: ne,
|
|
2972
2966
|
onPaintStart: M,
|
|
2973
2967
|
onPaintEnter: Y,
|
|
2974
|
-
onDragStart: (
|
|
2968
|
+
onDragStart: (D) => f?.(E, D)
|
|
2975
2969
|
},
|
|
2976
|
-
|
|
2970
|
+
E.value
|
|
2977
2971
|
)) })
|
|
2978
2972
|
}
|
|
2979
2973
|
)
|
|
2980
2974
|
] }),
|
|
2981
|
-
/* @__PURE__ */ n(
|
|
2975
|
+
/* @__PURE__ */ n(It, { children: Re && !p && /* @__PURE__ */ n(
|
|
2982
2976
|
bt,
|
|
2983
2977
|
{
|
|
2984
2978
|
column: He(Re, y),
|
|
@@ -3013,7 +3007,7 @@ const Fo = g.div`
|
|
|
3013
3007
|
padding: 4px 0;
|
|
3014
3008
|
`, hi = g(H)`
|
|
3015
3009
|
justify-content: flex-start;
|
|
3016
|
-
`, vi = g(
|
|
3010
|
+
`, vi = g(ko)`
|
|
3017
3011
|
padding: 0;
|
|
3018
3012
|
|
|
3019
3013
|
input {
|
|
@@ -3130,10 +3124,10 @@ const Fo = g.div`
|
|
|
3130
3124
|
const h = ee((y) => {
|
|
3131
3125
|
const w = parseInt(y.target.value, 10);
|
|
3132
3126
|
d(!0), m(w);
|
|
3133
|
-
}, []),
|
|
3127
|
+
}, []), I = Io(l, b);
|
|
3134
3128
|
J(() => {
|
|
3135
3129
|
x && t(l);
|
|
3136
|
-
}, [
|
|
3130
|
+
}, [I, t, x, l]);
|
|
3137
3131
|
const S = ee(() => {
|
|
3138
3132
|
u(!0);
|
|
3139
3133
|
}, []), f = ee(() => {
|
|
@@ -3169,7 +3163,7 @@ const Fo = g.div`
|
|
|
3169
3163
|
updateShowHierarchy: c,
|
|
3170
3164
|
hierarchyOptions: u,
|
|
3171
3165
|
hierarchyActive: l
|
|
3172
|
-
} =
|
|
3166
|
+
} = Qe(), m = Eo({ scope: e });
|
|
3173
3167
|
if (!v) return null;
|
|
3174
3168
|
const { GroupSettings: x, requiredVersion: d } = v || {}, h = !!c, S = h ? [...u || [
|
|
3175
3169
|
{ value: Se, label: "Hierarchy", icon: "account_tree" },
|
|
@@ -3210,7 +3204,7 @@ const Fo = g.div`
|
|
|
3210
3204
|
)
|
|
3211
3205
|
};
|
|
3212
3206
|
}, Ci = (e = []) => {
|
|
3213
|
-
const { sorting: t, updateSorting: o } = ke(), { attribFields: r, scopes: a } =
|
|
3207
|
+
const { sorting: t, updateSorting: o } = ke(), { attribFields: r, scopes: a } = Qe(), s = [
|
|
3214
3208
|
...yo(a, e),
|
|
3215
3209
|
...r.filter(
|
|
3216
3210
|
(l) => l.scope?.some((m) => a.includes(m)) && !xo(l)
|
|
@@ -3242,12 +3236,12 @@ const Fo = g.div`
|
|
|
3242
3236
|
}
|
|
3243
3237
|
)
|
|
3244
3238
|
};
|
|
3245
|
-
}, Pt = [
|
|
3239
|
+
}, Pt = [Ao, Oo], en = 5, Ii = `#${Do}, [data-column-drag-origin]`, Ei = (e, t) => {
|
|
3246
3240
|
const r = document.querySelector(`[${yn}]`)?.getBoundingClientRect();
|
|
3247
3241
|
if (!r || e < r.left || e > r.right || t < r.top || t > r.bottom) return;
|
|
3248
|
-
const a = Array.from(
|
|
3249
|
-
|
|
3250
|
-
)
|
|
3242
|
+
const a = Array.from(document.querySelectorAll(xn)).filter(
|
|
3243
|
+
(v) => !Pt.includes(v.dataset.columnId || "")
|
|
3244
|
+
), s = a.find((v) => {
|
|
3251
3245
|
const b = v.getBoundingClientRect();
|
|
3252
3246
|
return e >= b.left && e < b.right;
|
|
3253
3247
|
});
|
|
@@ -3255,13 +3249,13 @@ const Fo = g.div`
|
|
|
3255
3249
|
const i = a[a.length - 1];
|
|
3256
3250
|
return e >= i.getBoundingClientRect().right ? i : a[0];
|
|
3257
3251
|
}, tn = (e, t) => {
|
|
3258
|
-
const o = document.elementsFromPoint(e, t).map((i) => i.closest?.(xn)).find(Boolean) ??
|
|
3252
|
+
const o = document.elementsFromPoint(e, t).map((i) => i.closest?.(xn)).find(Boolean) ?? Ei(e, t), r = o?.dataset.columnId;
|
|
3259
3253
|
if (!o || !r || Pt.includes(r)) return null;
|
|
3260
3254
|
const a = o.getBoundingClientRect(), s = e < a.left + a.width / 2 ? "left" : "right";
|
|
3261
3255
|
return {
|
|
3262
3256
|
columnId: r,
|
|
3263
3257
|
side: s,
|
|
3264
|
-
line:
|
|
3258
|
+
line: To(o, s)
|
|
3265
3259
|
};
|
|
3266
3260
|
}, Ti = (e, t) => {
|
|
3267
3261
|
const o = e.length ? e : t;
|
|
@@ -3281,7 +3275,7 @@ const Fo = g.div`
|
|
|
3281
3275
|
rowHeight: u,
|
|
3282
3276
|
setColumnsConfig: l,
|
|
3283
3277
|
getAllColumns: m
|
|
3284
|
-
} = ke(), { setMenuOpen: x } =
|
|
3278
|
+
} = ke(), { setMenuOpen: x } = Xe(), [d, h] = U(null), I = K(null), S = K(null);
|
|
3285
3279
|
S.current = d;
|
|
3286
3280
|
const f = K({
|
|
3287
3281
|
columnVisibility: e,
|
|
@@ -3314,31 +3308,31 @@ const Fo = g.div`
|
|
|
3314
3308
|
getAllColumns: m
|
|
3315
3309
|
};
|
|
3316
3310
|
const p = ee((N, B) => {
|
|
3317
|
-
const
|
|
3311
|
+
const O = f.current, z = Ti(O.columnOrder, O.getAllColumns()).filter(
|
|
3318
3312
|
(C) => C !== N && !Pt.includes(C)
|
|
3319
|
-
), T = z.indexOf(B.columnId), V = T === -1 ? z.length : T + (B.side === "left" ? 0 : 1), F = [...z.slice(0, V), N, ...z.slice(V)], R = new Set(
|
|
3320
|
-
R.has(B.columnId) ? R.add(N) : R.delete(N),
|
|
3321
|
-
columnVisibility: { ...
|
|
3313
|
+
), T = z.indexOf(B.columnId), V = T === -1 ? z.length : T + (B.side === "left" ? 0 : 1), F = [...z.slice(0, V), N, ...z.slice(V)], R = new Set(O.columnPinning.left || []);
|
|
3314
|
+
R.has(B.columnId) ? R.add(N) : R.delete(N), O.setColumnsConfig({
|
|
3315
|
+
columnVisibility: { ...O.columnVisibility, [N]: !0 },
|
|
3322
3316
|
columnOrder: F,
|
|
3323
|
-
columnPinning: { ...
|
|
3324
|
-
columnSizing:
|
|
3325
|
-
columnSummaries:
|
|
3326
|
-
columnSummaryScopes:
|
|
3327
|
-
columnSummaryFormats:
|
|
3328
|
-
groupBy:
|
|
3329
|
-
groupByConfig:
|
|
3330
|
-
sorting:
|
|
3331
|
-
rowHeight:
|
|
3317
|
+
columnPinning: { ...O.columnPinning, left: F.filter((C) => R.has(C)) },
|
|
3318
|
+
columnSizing: O.columnSizing,
|
|
3319
|
+
columnSummaries: O.columnSummaries,
|
|
3320
|
+
columnSummaryScopes: O.columnSummaryScopes,
|
|
3321
|
+
columnSummaryFormats: O.columnSummaryFormats,
|
|
3322
|
+
groupBy: O.groupBy,
|
|
3323
|
+
groupByConfig: O.groupByConfig,
|
|
3324
|
+
sorting: O.sorting,
|
|
3325
|
+
rowHeight: O.rowHeight
|
|
3332
3326
|
});
|
|
3333
3327
|
}, []), y = ee(() => {
|
|
3334
|
-
|
|
3328
|
+
I.current = null, S.current && h(null);
|
|
3335
3329
|
}, []), w = ee((N, B) => {
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3330
|
+
const O = B.currentTarget, z = O.getBoundingClientRect();
|
|
3331
|
+
I.current = {
|
|
3338
3332
|
column: N,
|
|
3339
3333
|
x: B.clientX,
|
|
3340
3334
|
y: B.clientY,
|
|
3341
|
-
origin:
|
|
3335
|
+
origin: O.closest(Ii),
|
|
3342
3336
|
immediate: !!B.target.closest?.(".hover-swap"),
|
|
3343
3337
|
grab: {
|
|
3344
3338
|
x: B.clientX - z.left,
|
|
@@ -3356,22 +3350,22 @@ const Fo = g.div`
|
|
|
3356
3350
|
);
|
|
3357
3351
|
return;
|
|
3358
3352
|
}
|
|
3359
|
-
const R =
|
|
3353
|
+
const R = I.current;
|
|
3360
3354
|
R && (Math.abs(V - R.x) < en && Math.abs(F - R.y) < en || !R.immediate && N(V, F, R.origin) || h({ column: R.column, x: V, y: F, grab: R.grab, target: tn(V, F) }));
|
|
3361
|
-
},
|
|
3355
|
+
}, O = () => {
|
|
3362
3356
|
const T = S.current;
|
|
3363
|
-
|
|
3357
|
+
I.current = null, T && (_i(), T.target && (p(T.column.value, T.target), x(!1)), h(null));
|
|
3364
3358
|
}, z = (T) => {
|
|
3365
3359
|
T.key === "Escape" && y();
|
|
3366
3360
|
};
|
|
3367
|
-
return window.addEventListener("pointermove", B), window.addEventListener("pointerup",
|
|
3368
|
-
window.removeEventListener("pointermove", B), window.removeEventListener("pointerup",
|
|
3361
|
+
return window.addEventListener("pointermove", B), window.addEventListener("pointerup", O), window.addEventListener("pointercancel", y), window.addEventListener("keydown", z), () => {
|
|
3362
|
+
window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", O), window.removeEventListener("pointercancel", y), window.removeEventListener("keydown", z);
|
|
3369
3363
|
};
|
|
3370
3364
|
}, [p, y, x]);
|
|
3371
3365
|
const P = d ? document.querySelector(`[${yn}]`)?.getBoundingClientRect() : void 0, $ = d ? sn(
|
|
3372
3366
|
/* @__PURE__ */ k(me, { children: [
|
|
3373
3367
|
P && /* @__PURE__ */ n(
|
|
3374
|
-
|
|
3368
|
+
Di,
|
|
3375
3369
|
{
|
|
3376
3370
|
style: {
|
|
3377
3371
|
left: P.left,
|
|
@@ -3382,7 +3376,7 @@ const Fo = g.div`
|
|
|
3382
3376
|
}
|
|
3383
3377
|
),
|
|
3384
3378
|
/* @__PURE__ */ k(
|
|
3385
|
-
|
|
3379
|
+
Ai,
|
|
3386
3380
|
{
|
|
3387
3381
|
style: {
|
|
3388
3382
|
left: d.x - d.grab.x,
|
|
@@ -3406,14 +3400,14 @@ const Fo = g.div`
|
|
|
3406
3400
|
t.stopPropagation(), t.preventDefault();
|
|
3407
3401
|
};
|
|
3408
3402
|
window.addEventListener("click", e, !0), setTimeout(() => window.removeEventListener("click", e, !0), 0);
|
|
3409
|
-
},
|
|
3403
|
+
}, Di = g.div`
|
|
3410
3404
|
position: fixed;
|
|
3411
3405
|
box-sizing: border-box;
|
|
3412
3406
|
z-index: 999;
|
|
3413
3407
|
pointer-events: none;
|
|
3414
3408
|
border-radius: 4px;
|
|
3415
3409
|
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
|
|
3416
|
-
`,
|
|
3410
|
+
`, Ai = g.div`
|
|
3417
3411
|
position: fixed;
|
|
3418
3412
|
box-sizing: border-box;
|
|
3419
3413
|
z-index: 2000;
|
|
@@ -3444,13 +3438,19 @@ const Fo = g.div`
|
|
|
3444
3438
|
columnVisibility: r,
|
|
3445
3439
|
defaultColumnVisibility: a,
|
|
3446
3440
|
updateColumnVisibility: s
|
|
3447
|
-
}), { armDrag: x, cancelDrag: d, isDragging: h, dragOverlay:
|
|
3441
|
+
}), { armDrag: x, cancelDrag: d, isDragging: h, dragOverlay: I } = Ni(), S = K({ isPainting: m, isDragging: h, cancelPaint: l });
|
|
3448
3442
|
S.current = { isPainting: m, isDragging: h, cancelPaint: l };
|
|
3449
|
-
const f = ee(
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3443
|
+
const f = ee(
|
|
3444
|
+
(w, P) => {
|
|
3445
|
+
S.current.isDragging || (P && d(), c(w, P));
|
|
3446
|
+
},
|
|
3447
|
+
[d, c]
|
|
3448
|
+
), p = ee(
|
|
3449
|
+
(w, P) => {
|
|
3450
|
+
S.current.isPainting || x(w, P);
|
|
3451
|
+
},
|
|
3452
|
+
[x]
|
|
3453
|
+
), y = X(
|
|
3454
3454
|
() => $n({
|
|
3455
3455
|
columns: e,
|
|
3456
3456
|
onToggle: u,
|
|
@@ -3476,17 +3476,17 @@ const Fo = g.div`
|
|
|
3476
3476
|
return {
|
|
3477
3477
|
menuItems: y,
|
|
3478
3478
|
hasMenuItems: !!y.length,
|
|
3479
|
-
dragOverlay:
|
|
3479
|
+
dragOverlay: I,
|
|
3480
3480
|
onColumnDragStart: x,
|
|
3481
3481
|
isColumnDragging: h
|
|
3482
3482
|
};
|
|
3483
|
-
},
|
|
3484
|
-
extraColumns: e =
|
|
3485
|
-
hiddenColumns: t =
|
|
3483
|
+
}, Oi = [], Li = [], Vn = ({
|
|
3484
|
+
extraColumns: e = Oi,
|
|
3485
|
+
hiddenColumns: t = Li,
|
|
3486
3486
|
includeLinks: o = !0,
|
|
3487
3487
|
parentColumns: r = []
|
|
3488
3488
|
}) => {
|
|
3489
|
-
const { linkTypes: a } = bn(), { attribFields: s, scopes: i } =
|
|
3489
|
+
const { linkTypes: a } = bn(), { attribFields: s, scopes: i } = Qe(), v = X(
|
|
3490
3490
|
() => [
|
|
3491
3491
|
{
|
|
3492
3492
|
value: "thumbnail",
|
|
@@ -3606,7 +3606,7 @@ const Fo = g.div`
|
|
|
3606
3606
|
),
|
|
3607
3607
|
...e.map((c) => ({
|
|
3608
3608
|
...c,
|
|
3609
|
-
icon: c.icon ??
|
|
3609
|
+
icon: c.icon ?? An
|
|
3610
3610
|
}))
|
|
3611
3611
|
],
|
|
3612
3612
|
[i, s, a, o, r, e]
|
|
@@ -3619,8 +3619,8 @@ const Fo = g.div`
|
|
|
3619
3619
|
min-width: 120px;
|
|
3620
3620
|
`, $i = g(H)`
|
|
3621
3621
|
padding: 4px !important;
|
|
3622
|
-
`,
|
|
3623
|
-
const { togglePanel: r, isPanelOpen: a } =
|
|
3622
|
+
`, Rs = ({ defaultSelected: e, className: t, ...o }) => {
|
|
3623
|
+
const { togglePanel: r, isPanelOpen: a } = We();
|
|
3624
3624
|
return /* @__PURE__ */ n(
|
|
3625
3625
|
Ri,
|
|
3626
3626
|
{
|
|
@@ -3631,7 +3631,7 @@ const Fo = g.div`
|
|
|
3631
3631
|
children: "Customize"
|
|
3632
3632
|
}
|
|
3633
3633
|
);
|
|
3634
|
-
},
|
|
3634
|
+
}, $s = ({
|
|
3635
3635
|
settings: e = [],
|
|
3636
3636
|
extraColumns: t,
|
|
3637
3637
|
hiddenColumns: o,
|
|
@@ -3645,13 +3645,13 @@ const Fo = g.div`
|
|
|
3645
3645
|
parentColumns: u,
|
|
3646
3646
|
columnIdAliases: l
|
|
3647
3647
|
}) => {
|
|
3648
|
-
const { scopes: m } =
|
|
3648
|
+
const { scopes: m } = Qe(), {
|
|
3649
3649
|
columnVisibility: x,
|
|
3650
3650
|
defaultColumnVisibility: d,
|
|
3651
3651
|
rowHeight: h = 34,
|
|
3652
|
-
updateRowHeight:
|
|
3652
|
+
updateRowHeight: I,
|
|
3653
3653
|
updateRowHeightWithPersistence: S
|
|
3654
|
-
} = ke(), { isPanelOpen: f, selectedSetting: p } =
|
|
3654
|
+
} = ke(), { isPanelOpen: f, selectedSetting: p } = We(), [y, w] = U(null);
|
|
3655
3655
|
J(() => {
|
|
3656
3656
|
y !== null && (!f || p !== "columns") && w(null);
|
|
3657
3657
|
}, [f, p, y]);
|
|
@@ -3664,8 +3664,8 @@ const Fo = g.div`
|
|
|
3664
3664
|
hiddenColumns: o,
|
|
3665
3665
|
includeLinks: s,
|
|
3666
3666
|
parentColumns: u
|
|
3667
|
-
}), B = a && So(a, l),
|
|
3668
|
-
(
|
|
3667
|
+
}), B = a && So(a, l), O = N.filter(
|
|
3668
|
+
(L) => ae(x, L.value, d)
|
|
3669
3669
|
).length, {
|
|
3670
3670
|
menuItems: z,
|
|
3671
3671
|
dragOverlay: T,
|
|
@@ -3680,7 +3680,7 @@ const Fo = g.div`
|
|
|
3680
3680
|
id: "columns",
|
|
3681
3681
|
title: "Columns",
|
|
3682
3682
|
icon: "view_column",
|
|
3683
|
-
preview: `${
|
|
3683
|
+
preview: `${O}/${N.length}`,
|
|
3684
3684
|
headerActions: /* @__PURE__ */ n(
|
|
3685
3685
|
$i,
|
|
3686
3686
|
{
|
|
@@ -3716,7 +3716,7 @@ const Fo = g.div`
|
|
|
3716
3716
|
Si,
|
|
3717
3717
|
{
|
|
3718
3718
|
value: h,
|
|
3719
|
-
onChange:
|
|
3719
|
+
onChange: I,
|
|
3720
3720
|
onChangeComplete: S,
|
|
3721
3721
|
title: "Row height",
|
|
3722
3722
|
id: "row-height-slider"
|
|
@@ -3724,10 +3724,10 @@ const Fo = g.div`
|
|
|
3724
3724
|
)
|
|
3725
3725
|
}
|
|
3726
3726
|
].filter(Boolean);
|
|
3727
|
-
return e.forEach((
|
|
3728
|
-
if (r.includes(
|
|
3729
|
-
const M = _.findIndex((Y) => Y && "id" in Y && Y.id ===
|
|
3730
|
-
M !== -1 ? _[M] =
|
|
3727
|
+
return e.forEach((L) => {
|
|
3728
|
+
if (r.includes(L.id)) return;
|
|
3729
|
+
const M = _.findIndex((Y) => Y && "id" in Y && Y.id === L.id);
|
|
3730
|
+
M !== -1 ? _[M] = L : _.push(L);
|
|
3731
3731
|
}), /* @__PURE__ */ n(ri, { settings: _, order: v });
|
|
3732
3732
|
}, gt = "add-column-menu-table", Fi = g.div`
|
|
3733
3733
|
position: absolute;
|
|
@@ -3739,14 +3739,14 @@ const Fo = g.div`
|
|
|
3739
3739
|
padding: 2px;
|
|
3740
3740
|
border-radius: 12px;
|
|
3741
3741
|
}
|
|
3742
|
-
`,
|
|
3742
|
+
`, Fs = ({
|
|
3743
3743
|
extraColumns: e,
|
|
3744
3744
|
hiddenColumns: t,
|
|
3745
3745
|
includeLinks: o,
|
|
3746
3746
|
extraMenuItems: r,
|
|
3747
3747
|
parentColumns: a
|
|
3748
3748
|
}) => {
|
|
3749
|
-
const { isPanelOpen: s } =
|
|
3749
|
+
const { isPanelOpen: s } = We(), { toggleMenuOpen: i } = Xe(), { visibleColumns: v, scopes: b } = Vn({
|
|
3750
3750
|
extraColumns: e,
|
|
3751
3751
|
hiddenColumns: t,
|
|
3752
3752
|
includeLinks: o,
|
|
@@ -3771,7 +3771,7 @@ const Fo = g.div`
|
|
|
3771
3771
|
/* @__PURE__ */ n(yt, { menuId: gt, menuItems: c }),
|
|
3772
3772
|
l
|
|
3773
3773
|
] });
|
|
3774
|
-
},
|
|
3774
|
+
}, Ms = g.a`
|
|
3775
3775
|
color: var(--md-sys-color-primary, #0066cc);
|
|
3776
3776
|
text-decoration: none;
|
|
3777
3777
|
cursor: pointer;
|
|
@@ -3796,7 +3796,7 @@ const Fo = g.div`
|
|
|
3796
3796
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
|
-
`,
|
|
3799
|
+
`, Vs = le(
|
|
3800
3800
|
({ showGrid: e, onChange: t, ...o }, r) => (J(() => {
|
|
3801
3801
|
const a = (s) => {
|
|
3802
3802
|
const i = s.target;
|
|
@@ -3920,7 +3920,7 @@ const Fo = g.div`
|
|
|
3920
3920
|
onCloseVersionUpload: x,
|
|
3921
3921
|
extractAndSetVersionFromFiles: d,
|
|
3922
3922
|
dispatch: h,
|
|
3923
|
-
taskId:
|
|
3923
|
+
taskId: I,
|
|
3924
3924
|
linkedTask: S,
|
|
3925
3925
|
isLoadingTask: f,
|
|
3926
3926
|
setTaskId: p,
|
|
@@ -3929,54 +3929,54 @@ const Fo = g.div`
|
|
|
3929
3929
|
folderProducts: P,
|
|
3930
3930
|
isFolderProductsLoading: $,
|
|
3931
3931
|
matchedProduct: N
|
|
3932
|
-
} = Sn(), [B,
|
|
3933
|
-
() => P.map((
|
|
3932
|
+
} = Sn(), [B, O] = U(!1), z = X(
|
|
3933
|
+
() => P.map((A) => ({ value: A.name, label: A.name })),
|
|
3934
3934
|
[P]
|
|
3935
3935
|
), T = ee(
|
|
3936
|
-
(
|
|
3937
|
-
t("name",
|
|
3936
|
+
(A) => {
|
|
3937
|
+
t("name", A.length > 0 ? A[0] : "");
|
|
3938
3938
|
},
|
|
3939
3939
|
[t]
|
|
3940
3940
|
), V = N?.latestVersion ? `v${String(N.latestVersion.version).padStart(3, "0")}` : "", { data: F, isFetching: R } = uo(
|
|
3941
|
-
{ projectName: a, taskId:
|
|
3942
|
-
{ skip: !
|
|
3943
|
-
), C = f || !!
|
|
3941
|
+
{ projectName: a, taskId: I },
|
|
3942
|
+
{ skip: !I }
|
|
3943
|
+
), C = f || !!I && R && !S, _ = F?.folderId || w, L = bn(), M = F?.label || F?.name || S?.label || S?.name || "", Y = F?.taskType || S?.taskType, ne = Y ? L.getTaskType(Y) : void 0, re = ne?.icon || "task_alt", be = F?.path ? F.path.substring(0, F.path.lastIndexOf("/")) : "", ye = L.getProductTypeOptions(), ue = X(() => L.productTypes.reduce((A, q) => (A[q.name] = q, A), {}), [L.productTypes]);
|
|
3944
3944
|
J(() => {
|
|
3945
|
-
const
|
|
3946
|
-
if (e.productType !==
|
|
3947
|
-
const
|
|
3945
|
+
const A = b.current, q = ue[A]?.name || "", he = ue[e.productType]?.name || "";
|
|
3946
|
+
if (e.productType !== A && q && e.name.startsWith(q)) {
|
|
3947
|
+
const Ee = e.name.slice(q.length), Te = he + Ee;
|
|
3948
3948
|
t("name", Te);
|
|
3949
3949
|
}
|
|
3950
3950
|
b.current = e.productType;
|
|
3951
3951
|
}, [e.productType, e.name, t]);
|
|
3952
|
-
const
|
|
3953
|
-
|
|
3954
|
-
const q =
|
|
3952
|
+
const Oe = (A) => {
|
|
3953
|
+
A.preventDefault();
|
|
3954
|
+
const q = A.nativeEvent.submitter;
|
|
3955
3955
|
q && q.closest(".dropdown") || o(e);
|
|
3956
|
-
}, Ze = (
|
|
3957
|
-
const q = parseInt(
|
|
3956
|
+
}, Ze = (A) => {
|
|
3957
|
+
const q = parseInt(A.target.value, 10);
|
|
3958
3958
|
isNaN(q) || t("version", q);
|
|
3959
|
-
},
|
|
3960
|
-
t("name",
|
|
3961
|
-
}, Ce = (
|
|
3962
|
-
|
|
3959
|
+
}, Le = (A) => {
|
|
3960
|
+
t("name", A.target.value);
|
|
3961
|
+
}, Ce = (A) => {
|
|
3962
|
+
A.length > 0 && t("productType", A[0]);
|
|
3963
3963
|
}, ge = () => {
|
|
3964
|
-
const
|
|
3965
|
-
t("name",
|
|
3964
|
+
const A = ue[e.productType]?.name || "", q = e.name || "", he = q.charAt(0).toUpperCase() + q.slice(1), Ee = A + he;
|
|
3965
|
+
t("name", Ee);
|
|
3966
3966
|
}, ce = () => {
|
|
3967
|
-
const
|
|
3968
|
-
return e.name && !e.name.startsWith(
|
|
3967
|
+
const A = ue[e.productType]?.name || "";
|
|
3968
|
+
return e.name && !e.name.startsWith(A);
|
|
3969
3969
|
}, ie = !!i;
|
|
3970
3970
|
return /* @__PURE__ */ k(
|
|
3971
3971
|
Vi,
|
|
3972
3972
|
{
|
|
3973
3973
|
id: "upload-version-form",
|
|
3974
3974
|
ref: u,
|
|
3975
|
-
onSubmit:
|
|
3975
|
+
onSubmit: Oe,
|
|
3976
3976
|
noValidate: !0,
|
|
3977
|
-
onKeyDown: (
|
|
3978
|
-
if (
|
|
3979
|
-
|
|
3977
|
+
onKeyDown: (A) => {
|
|
3978
|
+
if (A.key === "Enter" && (A.metaKey || A.ctrlKey)) {
|
|
3979
|
+
A.preventDefault(), o(e);
|
|
3980
3980
|
return;
|
|
3981
3981
|
}
|
|
3982
3982
|
},
|
|
@@ -3985,10 +3985,10 @@ const Fo = g.div`
|
|
|
3985
3985
|
!r.includes("name") && /* @__PURE__ */ n(te, { label: "Product Name", children: /* @__PURE__ */ k(zi, { children: [
|
|
3986
3986
|
/* @__PURE__ */ k("div", { children: [
|
|
3987
3987
|
/* @__PURE__ */ n(
|
|
3988
|
-
|
|
3988
|
+
Ae,
|
|
3989
3989
|
{
|
|
3990
3990
|
value: e.name,
|
|
3991
|
-
onChange:
|
|
3991
|
+
onChange: Le,
|
|
3992
3992
|
placeholder: "Enter product name",
|
|
3993
3993
|
minLength: 1,
|
|
3994
3994
|
autoFocus: !0,
|
|
@@ -4021,7 +4021,7 @@ const Fo = g.div`
|
|
|
4021
4021
|
widthExpand: !1,
|
|
4022
4022
|
disabled: $ || P.length === 0,
|
|
4023
4023
|
"aria-label": "Select existing product",
|
|
4024
|
-
valueTemplate: (
|
|
4024
|
+
valueTemplate: (A, q, he) => /* @__PURE__ */ n(
|
|
4025
4025
|
H,
|
|
4026
4026
|
{
|
|
4027
4027
|
icon: "inventory_2",
|
|
@@ -4062,12 +4062,12 @@ const Fo = g.div`
|
|
|
4062
4062
|
disabled: ie
|
|
4063
4063
|
}
|
|
4064
4064
|
) }),
|
|
4065
|
-
/* @__PURE__ */ n(te, { label: "Task", children: /* @__PURE__ */ n(Gi, { children: C ? /* @__PURE__ */ n(
|
|
4065
|
+
/* @__PURE__ */ n(te, { label: "Task", children: /* @__PURE__ */ n(Gi, { children: C ? /* @__PURE__ */ n(Lo, { height: "20px" }) : I && M ? /* @__PURE__ */ k(me, { children: [
|
|
4066
4066
|
/* @__PURE__ */ k(
|
|
4067
4067
|
Yi,
|
|
4068
4068
|
{
|
|
4069
4069
|
type: "button",
|
|
4070
|
-
onClick: () =>
|
|
4070
|
+
onClick: () => O(!0),
|
|
4071
4071
|
disabled: ie,
|
|
4072
4072
|
variant: "text",
|
|
4073
4073
|
children: [
|
|
@@ -4102,24 +4102,24 @@ const Fo = g.div`
|
|
|
4102
4102
|
icon: "link",
|
|
4103
4103
|
label: "Link task",
|
|
4104
4104
|
variant: "text",
|
|
4105
|
-
onClick: () =>
|
|
4105
|
+
onClick: () => O(!0),
|
|
4106
4106
|
disabled: ie
|
|
4107
4107
|
}
|
|
4108
4108
|
) }) })
|
|
4109
4109
|
] }),
|
|
4110
4110
|
B && /* @__PURE__ */ n(
|
|
4111
|
-
|
|
4111
|
+
Co,
|
|
4112
4112
|
{
|
|
4113
4113
|
projectName: a,
|
|
4114
4114
|
entityType: "task",
|
|
4115
4115
|
initialSelection: {
|
|
4116
4116
|
..._ ? { folder: { [_]: !0 } } : {},
|
|
4117
|
-
...
|
|
4117
|
+
...I ? { task: { [I]: !0 } } : {}
|
|
4118
4118
|
},
|
|
4119
|
-
onSubmit: (
|
|
4120
|
-
|
|
4119
|
+
onSubmit: (A) => {
|
|
4120
|
+
A.length > 0 && p(A[0]), O(!1);
|
|
4121
4121
|
},
|
|
4122
|
-
onClose: () =>
|
|
4122
|
+
onClose: () => O(!1)
|
|
4123
4123
|
}
|
|
4124
4124
|
),
|
|
4125
4125
|
/* @__PURE__ */ n(te, { label: "Reviewable files" }),
|
|
@@ -4155,7 +4155,7 @@ const Fo = g.div`
|
|
|
4155
4155
|
color: var(--md-sys-color-on-error-container);
|
|
4156
4156
|
padding: var(--padding-s);
|
|
4157
4157
|
border-radius: var(--border-radius-m);
|
|
4158
|
-
`,
|
|
4158
|
+
`, Bs = () => {
|
|
4159
4159
|
const {
|
|
4160
4160
|
isOpen: e,
|
|
4161
4161
|
onCloseVersionUpload: t,
|
|
@@ -4171,7 +4171,7 @@ const Fo = g.div`
|
|
|
4171
4171
|
createdProductId: l,
|
|
4172
4172
|
createdVersionId: m,
|
|
4173
4173
|
matchedProduct: x
|
|
4174
|
-
} = Sn(), d = o || l, h = m,
|
|
4174
|
+
} = Sn(), d = o || l, h = m, I = typeof u == "string" ? u.length > 0 : !!u, S = /* @__PURE__ */ k("div", { style: { display: "flex", flexDirection: "row", gap: 8 }, children: [
|
|
4175
4175
|
/* @__PURE__ */ n(rn, {}),
|
|
4176
4176
|
/* @__PURE__ */ n(H, { onClick: t, label: "Cancel", variant: "text" }),
|
|
4177
4177
|
/* @__PURE__ */ n(
|
|
@@ -4209,7 +4209,7 @@ const Fo = g.div`
|
|
|
4209
4209
|
productId: d
|
|
4210
4210
|
}
|
|
4211
4211
|
),
|
|
4212
|
-
|
|
4212
|
+
I && /* @__PURE__ */ n(Zi, { className: "error", children: io(u) })
|
|
4213
4213
|
]
|
|
4214
4214
|
}
|
|
4215
4215
|
);
|
|
@@ -4219,7 +4219,7 @@ const Fo = g.div`
|
|
|
4219
4219
|
z-index: 1000;
|
|
4220
4220
|
overflow: hidden;
|
|
4221
4221
|
padding-bottom: var(--padding-m);
|
|
4222
|
-
`, ta = g(
|
|
4222
|
+
`, ta = g(Ro)`
|
|
4223
4223
|
display: flex;
|
|
4224
4224
|
flex-direction: column;
|
|
4225
4225
|
justify-content: flex-start;
|
|
@@ -4316,7 +4316,7 @@ function aa({
|
|
|
4316
4316
|
selectionVariant: c = "primary",
|
|
4317
4317
|
shortcut: u
|
|
4318
4318
|
}) {
|
|
4319
|
-
const [l] =
|
|
4319
|
+
const [l] = $o();
|
|
4320
4320
|
return /* @__PURE__ */ k(
|
|
4321
4321
|
na,
|
|
4322
4322
|
{
|
|
@@ -4340,7 +4340,7 @@ function aa({
|
|
|
4340
4340
|
e
|
|
4341
4341
|
);
|
|
4342
4342
|
}
|
|
4343
|
-
const
|
|
4343
|
+
const Us = le(({
|
|
4344
4344
|
reviewables: e = [],
|
|
4345
4345
|
selected: t = [],
|
|
4346
4346
|
projectName: o,
|
|
@@ -4389,11 +4389,11 @@ const Ys = le(({
|
|
|
4389
4389
|
}
|
|
4390
4390
|
};
|
|
4391
4391
|
if (!e.length) return /* @__PURE__ */ n("div", {});
|
|
4392
|
-
const
|
|
4393
|
-
if (e.length < 2 ||
|
|
4392
|
+
const I = e.findIndex(({ fileId: f }) => t.includes(f)), S = (f) => {
|
|
4393
|
+
if (e.length < 2 || I === -1) return;
|
|
4394
4394
|
const p = e.length;
|
|
4395
|
-
if (f === (
|
|
4396
|
-
if (f === (
|
|
4395
|
+
if (f === (I - 1 + p) % p) return "W";
|
|
4396
|
+
if (f === (I + 1) % p) return "S";
|
|
4397
4397
|
};
|
|
4398
4398
|
return /* @__PURE__ */ k(ea, { children: [
|
|
4399
4399
|
/* @__PURE__ */ k(
|
|
@@ -4437,56 +4437,55 @@ const Ys = le(({
|
|
|
4437
4437
|
] });
|
|
4438
4438
|
});
|
|
4439
4439
|
export {
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4440
|
+
ds as A,
|
|
4441
|
+
Us as B,
|
|
4442
|
+
ls as C,
|
|
4443
|
+
vs as D,
|
|
4444
4444
|
Ho as E,
|
|
4445
|
-
|
|
4445
|
+
_s as F,
|
|
4446
4446
|
Ut as G,
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
Ms as k,
|
|
4447
|
+
Zr as H,
|
|
4448
|
+
Ls as I,
|
|
4449
|
+
ri as J,
|
|
4450
|
+
Dn as K,
|
|
4451
|
+
Is as L,
|
|
4452
|
+
Ps as M,
|
|
4453
|
+
Ko as N,
|
|
4454
|
+
Si as O,
|
|
4455
|
+
Es as P,
|
|
4456
|
+
Ms as Q,
|
|
4457
|
+
Os as R,
|
|
4458
|
+
cs as S,
|
|
4459
|
+
gs as T,
|
|
4460
|
+
Ht as U,
|
|
4461
|
+
Vs as V,
|
|
4462
|
+
zt as W,
|
|
4463
|
+
Bs as X,
|
|
4464
|
+
us as Y,
|
|
4465
|
+
ms as a,
|
|
4466
|
+
fs as b,
|
|
4467
|
+
bs as c,
|
|
4468
|
+
ys as d,
|
|
4469
|
+
xs as e,
|
|
4470
|
+
ws as f,
|
|
4471
|
+
hs as g,
|
|
4472
|
+
Ns as h,
|
|
4473
|
+
Ds as i,
|
|
4474
|
+
Ts as j,
|
|
4475
|
+
As as k,
|
|
4477
4476
|
ft as l,
|
|
4478
|
-
|
|
4479
|
-
|
|
4477
|
+
Fs as m,
|
|
4478
|
+
ss as n,
|
|
4480
4479
|
ps as o,
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4480
|
+
gi as p,
|
|
4481
|
+
fi as q,
|
|
4482
|
+
Rs as r,
|
|
4483
|
+
ks as s,
|
|
4484
|
+
zo as t,
|
|
4485
|
+
Ss as u,
|
|
4486
|
+
cr as v,
|
|
4487
|
+
or as w,
|
|
4488
|
+
Cs as x,
|
|
4489
|
+
jt as y,
|
|
4490
|
+
$s as z
|
|
4492
4491
|
};
|