@ynput/ayon-frontend-shared 0.5.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 +307 -311
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +99 -92
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4459 -2959
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +32 -27
- 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/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +74 -69
- package/dist/chunks/EntityPickerDialog.es.js +25 -21
- package/dist/chunks/EntityTooltip.es.js +29 -22
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +2321 -2668
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -256
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2895 -4919
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +4215 -1179
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +4 -4
- package/dist/chunks/ReviewablesSelector.es.js +468 -460
- package/dist/chunks/SimpleForm.es.js +18 -18
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +109 -98
- package/dist/chunks/TableSettingsFallback.es.js +22 -10
- package/dist/chunks/ThumbnailSimple.es.js +290 -52
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +669 -644
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +737 -710
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +179 -174
- package/dist/chunks/useAttributeEnums.es.js +9 -9
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- 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 +74 -57
- package/dist/components.es.js +1432 -1001
- package/dist/context.es.js +791 -78
- package/dist/hooks.es.js +95 -94
- package/dist/index.es.js +27 -26
- package/dist/types/Actions.d.ts +15 -15
- package/dist/types/ContextMenu.d.ts +19 -16
- package/dist/types/DetailsPanel.d.ts +110 -17
- package/dist/types/EntityPickerDialog.d.ts +15 -15
- package/dist/types/Feed.d.ts +19 -16
- package/dist/types/ListTable.d.ts +15 -15
- package/dist/types/NewEntity.d.ts +24 -18
- package/dist/types/ProjectTreeTable.d.ts +34 -123
- package/dist/types/RepresentationsList.d.ts +15 -15
- package/dist/types/SimpleTable.d.ts +19 -16
- package/dist/types/Slicer.d.ts +18 -15
- package/dist/types/Views.d.ts +19 -16
- package/dist/types/api.d.ts +515 -207
- package/dist/types/components.d.ts +84 -20
- package/dist/types/context.d.ts +108 -25
- package/dist/types/hooks.d.ts +15 -15
- package/dist/types/index.d.ts +15 -15
- package/dist/types/util.d.ts +20 -15
- package/dist/util.es.js +117 -105
- package/package.json +16 -4
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- 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/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useColumnDragRestriction.es.js +0 -148
- package/dist/chunks/useLocalStorage.es.js +0 -355
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,53 +1,57 @@
|
|
|
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 {
|
|
15
|
-
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
|
+
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 { u as fn } from "./GlobalContext.es.js";
|
|
21
|
-
import { toast as vo } from "react-toastify";
|
|
22
|
-
import { g as ve } from "./parseHtmlToPlainTextWithLinks.es.js";
|
|
23
|
-
import "uuid";
|
|
24
|
-
import { u as fo } from "./useLocalStorage.es.js";
|
|
25
|
-
import { Link as bo } from "react-router-dom";
|
|
26
|
-
import { aT as Z, u as ke, a as We, b2 as yo, b7 as xo, aj as xe, aU as oe, _ as wo, a_ as Mt, aX as Vt, a$ as Bt, ba as So } from "./MetaWidget.es.js";
|
|
27
|
-
import { k as Xe } from "./DeleteEntitiesContext.es.js";
|
|
28
|
-
import "date-fns";
|
|
29
|
-
import { a as bn } from "./ProjectContext.es.js";
|
|
30
|
-
import "@tanstack/react-table";
|
|
31
|
-
import { a as ko } from "./useCreateContextMenu.es.js";
|
|
32
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
|
+
import "uuid";
|
|
33
24
|
import "semver";
|
|
34
|
-
import "./
|
|
35
|
-
import { u as Qe } from "./MenuContext.es.js";
|
|
25
|
+
import "./ContextMenuContextInstance.es.js";
|
|
36
26
|
import "react-redux";
|
|
37
|
-
import "./
|
|
38
|
-
import {
|
|
27
|
+
import { g as ve } from "./parseHtmlToPlainTextWithLinks.es.js";
|
|
28
|
+
import { Link as bo } from "react-router-dom";
|
|
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";
|
|
31
|
+
import "date-fns";
|
|
32
|
+
import "lexical";
|
|
33
|
+
import "@lexical/markdown";
|
|
34
|
+
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
35
|
+
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
36
|
+
import "@lexical/code";
|
|
37
|
+
import "@lexical/list";
|
|
38
|
+
import "@lexical/rich-text";
|
|
39
|
+
import "@lexical/selection";
|
|
40
|
+
import "@lexical/utils";
|
|
41
|
+
import { T as ko, E as Co } from "./EntityPickerDialog.es.js";
|
|
39
42
|
import { useDebounce as Io } from "primereact/hooks";
|
|
40
|
-
import {
|
|
43
|
+
import { c as Eo, a as yn, C as xn, g as To } from "./ColumnDropIndicator.es.js";
|
|
41
44
|
import "@tanstack/react-virtual";
|
|
42
|
-
import {
|
|
45
|
+
import { a as No } from "./ColumnDropIndicator.styled.es.js";
|
|
43
46
|
import { g as wn } from "./getEntityTypeIcon.es.js";
|
|
44
|
-
import "./EmptyPlaceholder.es.js";
|
|
45
|
-
import { M as _o, a as Ao, c as Do } from "./Menu.es.js";
|
|
46
|
-
import { D as Lo, R as Oo } from "./realtimeUpdatesUtils.es.js";
|
|
47
47
|
import "./MenuItem.es.js";
|
|
48
|
-
import
|
|
49
|
-
import {
|
|
50
|
-
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";
|
|
51
55
|
const Fo = g.div`
|
|
52
56
|
display: flex;
|
|
53
57
|
width: 100%;
|
|
@@ -74,7 +78,7 @@ const Fo = g.div`
|
|
|
74
78
|
border-radius: 4px;
|
|
75
79
|
min-height: ${(e) => e.$minHeight};
|
|
76
80
|
background-color: var(--md-sys-color-surface-container);
|
|
77
|
-
`,
|
|
81
|
+
`, ss = ({
|
|
78
82
|
showSidebar: e = !0,
|
|
79
83
|
sidebarConfig: t = {},
|
|
80
84
|
gridConfig: o = { columns: 3, rows: 3 },
|
|
@@ -95,7 +99,7 @@ const Fo = g.div`
|
|
|
95
99
|
b
|
|
96
100
|
)) })
|
|
97
101
|
] });
|
|
98
|
-
},
|
|
102
|
+
}, ls = g.div`
|
|
99
103
|
position: relative;
|
|
100
104
|
width: 100%;
|
|
101
105
|
|
|
@@ -103,7 +107,7 @@ const Fo = g.div`
|
|
|
103
107
|
min-height: 32px;
|
|
104
108
|
max-height: 32px;
|
|
105
109
|
}
|
|
106
|
-
`,
|
|
110
|
+
`, cs = g.ul`
|
|
107
111
|
position: absolute;
|
|
108
112
|
top: 100%;
|
|
109
113
|
left: 0;
|
|
@@ -207,12 +211,7 @@ const Fo = g.div`
|
|
|
207
211
|
}
|
|
208
212
|
);
|
|
209
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");
|
|
210
|
-
},
|
|
211
|
-
0: "No access",
|
|
212
|
-
10: "Viewer",
|
|
213
|
-
20: "Editor",
|
|
214
|
-
30: "Admin"
|
|
215
|
-
}, ss = le(
|
|
214
|
+
}, ds = le(
|
|
216
215
|
({
|
|
217
216
|
name: e,
|
|
218
217
|
label: t,
|
|
@@ -250,16 +249,16 @@ const Fo = g.div`
|
|
|
250
249
|
width: 100%;
|
|
251
250
|
}
|
|
252
251
|
`, Yo = ({ value: e = {}, isMin: t, isFloat: o = !1, onChange: r }) => {
|
|
253
|
-
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);
|
|
254
253
|
J(() => {
|
|
255
|
-
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));
|
|
256
255
|
}, [o]);
|
|
257
256
|
const S = ($) => {
|
|
258
257
|
const N = $.target.value;
|
|
259
258
|
r(o ? h ? { [x]: N, [d]: void 0 } : { [x]: void 0, [d]: N } : { [x]: N, [d]: void 0 }), u.current && u.current.setCustomValidity("");
|
|
260
259
|
}, f = () => {
|
|
261
260
|
const $ = !h;
|
|
262
|
-
|
|
261
|
+
I($), r($ ? { [d]: void 0, [x]: l } : { [d]: l, [x]: void 0 });
|
|
263
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}`;
|
|
264
263
|
return /* @__PURE__ */ k(Go, { children: [
|
|
265
264
|
/* @__PURE__ */ n(
|
|
@@ -401,7 +400,7 @@ const Fo = g.div`
|
|
|
401
400
|
&:hover {
|
|
402
401
|
background-color: var(--md-sys-color-surface-container-high-hover);
|
|
403
402
|
}
|
|
404
|
-
`, Gt = g(
|
|
403
|
+
`, Gt = g(Ae)`
|
|
405
404
|
background-color: var(--md-sys-color-surface-container-low);
|
|
406
405
|
border-color: var(--md-sys-color-outline-variant);
|
|
407
406
|
flex-grow: 1;
|
|
@@ -447,7 +446,7 @@ const Fo = g.div`
|
|
|
447
446
|
pt: u,
|
|
448
447
|
...l
|
|
449
448
|
}) => {
|
|
450
|
-
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);
|
|
451
450
|
return J(() => {
|
|
452
451
|
(v || e.isNewAttribute) && S.current?.select();
|
|
453
452
|
}, [v, e.isNewAttribute]), J(() => {
|
|
@@ -469,19 +468,19 @@ const Fo = g.div`
|
|
|
469
468
|
{
|
|
470
469
|
ref: S,
|
|
471
470
|
value: m,
|
|
472
|
-
autoFocus: v ||
|
|
471
|
+
autoFocus: v || I,
|
|
473
472
|
...u?.label?.input,
|
|
474
473
|
className: Q(u?.label?.input?.className),
|
|
475
474
|
onChange: (w) => {
|
|
476
|
-
if (!
|
|
475
|
+
if (!I)
|
|
477
476
|
return t && t(["label"], [w.target.value]);
|
|
478
477
|
f.current && (f.current.value = $e(w.target.value)), t && t(["label", "value"], [w.target.value, $e(w.target.value)]);
|
|
479
478
|
},
|
|
480
479
|
onBlur: (w) => {
|
|
481
|
-
|
|
480
|
+
I ? o && o(["label", "value"], [w.target.value, $e(w.target.value)]) : o && o(["label"], [w.target.value]);
|
|
482
481
|
},
|
|
483
482
|
onKeyDown: (w) => {
|
|
484
|
-
w.key === "Enter" && (w.stopPropagation(),
|
|
483
|
+
w.key === "Enter" && (w.stopPropagation(), I ? o && o(
|
|
485
484
|
["label", "value"],
|
|
486
485
|
[
|
|
487
486
|
w.target.value,
|
|
@@ -610,12 +609,12 @@ const Fo = g.div`
|
|
|
610
609
|
pt: i,
|
|
611
610
|
...v
|
|
612
611
|
}) => {
|
|
613
|
-
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({
|
|
614
613
|
id: b,
|
|
615
614
|
animateLayoutChanges: () => !1
|
|
616
615
|
}), f = {
|
|
617
616
|
transition: S,
|
|
618
|
-
transform: Tt.Translate.toString(
|
|
617
|
+
transform: Tt.Translate.toString(I)
|
|
619
618
|
};
|
|
620
619
|
return /* @__PURE__ */ k(
|
|
621
620
|
Xo,
|
|
@@ -685,13 +684,13 @@ const Fo = g.div`
|
|
|
685
684
|
}) => {
|
|
686
685
|
const [i, v] = U(t), b = (h) => {
|
|
687
686
|
v(h);
|
|
688
|
-
const
|
|
689
|
-
Rt(
|
|
687
|
+
const I = a(i), S = a(h);
|
|
688
|
+
Rt(I, S) || o(S);
|
|
690
689
|
};
|
|
691
690
|
return J(() => {
|
|
692
691
|
v((h) => {
|
|
693
|
-
const
|
|
694
|
-
return Rt(
|
|
692
|
+
const I = a(h), S = a(t);
|
|
693
|
+
return Rt(I, S) ? h : s ? s(h, t) : t;
|
|
695
694
|
});
|
|
696
695
|
}, [t, s, a]), {
|
|
697
696
|
items: i,
|
|
@@ -701,36 +700,36 @@ const Fo = g.div`
|
|
|
701
700
|
handleRemoveItem: (h) => () => {
|
|
702
701
|
b([...i.slice(0, h), ...i.slice(h + 1)]);
|
|
703
702
|
},
|
|
704
|
-
handleChangeItem: (h) => (
|
|
703
|
+
handleChangeItem: (h) => (I, S) => {
|
|
705
704
|
let f = { ...i[h] };
|
|
706
|
-
|
|
705
|
+
I.map((p, y) => f[p] = S[y]), b([...i.slice(0, h), f, ...i.slice(h + 1)]);
|
|
707
706
|
},
|
|
708
|
-
handleCommitItem: (h) => (
|
|
707
|
+
handleCommitItem: (h) => (I, S) => {
|
|
709
708
|
if (!r) return;
|
|
710
709
|
let f = { ...i[h] };
|
|
711
|
-
|
|
710
|
+
I.map((y, w) => f[y] = S[w]);
|
|
712
711
|
const p = [...i.slice(0, h), f, ...i.slice(h + 1)];
|
|
713
712
|
r(a(p));
|
|
714
713
|
},
|
|
715
|
-
handleDuplicateItem: (h,
|
|
714
|
+
handleDuplicateItem: (h, I) => {
|
|
716
715
|
b([
|
|
717
716
|
...i.slice(0, h + 1),
|
|
718
|
-
{ ...i[h], id: je(), ...
|
|
717
|
+
{ ...i[h], id: je(), ...I },
|
|
719
718
|
...i.slice(h + 1)
|
|
720
719
|
]);
|
|
721
720
|
},
|
|
722
721
|
handleDraggableEnd: (h) => {
|
|
723
722
|
if (!h.over)
|
|
724
723
|
return;
|
|
725
|
-
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);
|
|
726
725
|
S < p ? b([
|
|
727
726
|
...i.slice(0, S),
|
|
728
727
|
...i.slice(S + 1, p + 1),
|
|
729
|
-
|
|
728
|
+
I,
|
|
730
729
|
...i.slice(p + 1)
|
|
731
730
|
]) : b([
|
|
732
731
|
...i.slice(0, p),
|
|
733
|
-
|
|
732
|
+
I,
|
|
734
733
|
...i.slice(p, S),
|
|
735
734
|
...i.slice(S + 1)
|
|
736
735
|
]);
|
|
@@ -797,8 +796,8 @@ const Fo = g.div`
|
|
|
797
796
|
}, x = (S) => {
|
|
798
797
|
h(null), l(S);
|
|
799
798
|
}, [d, h] = U();
|
|
800
|
-
let
|
|
801
|
-
return d && (
|
|
799
|
+
let I;
|
|
800
|
+
return d && (I = s.find((S) => S.id === d)), /* @__PURE__ */ n(me, { children: /* @__PURE__ */ k(Wo, { ...a, children: [
|
|
802
801
|
/* @__PURE__ */ k(
|
|
803
802
|
kt,
|
|
804
803
|
{
|
|
@@ -833,7 +832,7 @@ const Fo = g.div`
|
|
|
833
832
|
`DraggableAttributeEnum_${S.id}`
|
|
834
833
|
)) }),
|
|
835
834
|
sn(
|
|
836
|
-
/* @__PURE__ */ n(
|
|
835
|
+
/* @__PURE__ */ n(It, { style: {}, children: I && /* @__PURE__ */ n(qt, { item: I, ...r?.item }) }),
|
|
837
836
|
document.body
|
|
838
837
|
)
|
|
839
838
|
]
|
|
@@ -852,7 +851,7 @@ const Fo = g.div`
|
|
|
852
851
|
}
|
|
853
852
|
)
|
|
854
853
|
] }) });
|
|
855
|
-
}, 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`
|
|
856
855
|
display: flex;
|
|
857
856
|
align-items: center;
|
|
858
857
|
gap: var(--base-gap-small);
|
|
@@ -877,7 +876,7 @@ const Fo = g.div`
|
|
|
877
876
|
flex: none;
|
|
878
877
|
width: 20px;
|
|
879
878
|
}
|
|
880
|
-
`,
|
|
879
|
+
`, dr = 8, En = 10, ur = g.div`
|
|
881
880
|
display: flex;
|
|
882
881
|
gap: var(--base-gap-large);
|
|
883
882
|
flex: 1;
|
|
@@ -948,7 +947,7 @@ const Fo = g.div`
|
|
|
948
947
|
onChange: (a) => t(a[0]),
|
|
949
948
|
onClear: () => t(void 0),
|
|
950
949
|
placeholder: "No project",
|
|
951
|
-
searchOnNumber:
|
|
950
|
+
searchOnNumber: En,
|
|
952
951
|
widthExpand: !0
|
|
953
952
|
}
|
|
954
953
|
);
|
|
@@ -965,7 +964,7 @@ const Fo = g.div`
|
|
|
965
964
|
onChange: (s) => t(s[0]),
|
|
966
965
|
onClear: () => t(void 0),
|
|
967
966
|
placeholder: r ? "Loading..." : "No user",
|
|
968
|
-
searchOnNumber:
|
|
967
|
+
searchOnNumber: En,
|
|
969
968
|
widthExpand: !0
|
|
970
969
|
}
|
|
971
970
|
);
|
|
@@ -975,12 +974,16 @@ const Fo = g.div`
|
|
|
975
974
|
}, yr = ["label", (e) => String(e.value), "description", "fulltext"], xr = ({ resolver: e, settings: t, onClose: o }) => {
|
|
976
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(
|
|
977
976
|
(T) => !l.has(T) && (T !== "user" || x)
|
|
978
|
-
), h = x && !("user" in m),
|
|
977
|
+
), h = x && !("user" in m), I = X(
|
|
979
978
|
() => ({ ...s, ...r }),
|
|
980
979
|
[s, r]
|
|
981
|
-
), {
|
|
980
|
+
), {
|
|
981
|
+
data: S,
|
|
982
|
+
isFetching: f,
|
|
983
|
+
isError: p
|
|
984
|
+
} = no({
|
|
982
985
|
enumName: e.name,
|
|
983
|
-
params:
|
|
986
|
+
params: I
|
|
984
987
|
}), y = X(
|
|
985
988
|
() => mn(S?.items || []).map((T) => ({
|
|
986
989
|
...T,
|
|
@@ -995,7 +998,7 @@ const Fo = g.div`
|
|
|
995
998
|
[y, P]
|
|
996
999
|
), N = $.some((T) => !!T.icon), B = (T) => {
|
|
997
1000
|
T.stopPropagation(), T.key === "Escape" && o();
|
|
998
|
-
},
|
|
1001
|
+
}, O = () => !d.length && !h ? /* @__PURE__ */ n(we, { children: "This resolver has no context params." }) : /* @__PURE__ */ k(wt, { children: [
|
|
999
1002
|
h && /* @__PURE__ */ n(te, { label: "user", children: /* @__PURE__ */ n(
|
|
1000
1003
|
Tn,
|
|
1001
1004
|
{
|
|
@@ -1025,7 +1028,7 @@ const Fo = g.div`
|
|
|
1025
1028
|
] });
|
|
1026
1029
|
}
|
|
1027
1030
|
return $.length ? $.map((T) => /* @__PURE__ */ k(vr, { title: T.description, children: [
|
|
1028
|
-
/* @__PURE__ */ n(
|
|
1031
|
+
/* @__PURE__ */ n(In, { icon: T.icon, color: T.color, reserveSpace: N }),
|
|
1029
1032
|
/* @__PURE__ */ n("span", { className: "label", children: T.label }),
|
|
1030
1033
|
/* @__PURE__ */ n("span", { className: "value", children: String(T.value) })
|
|
1031
1034
|
] }, String(T.value))) : /* @__PURE__ */ k(we, { children: [
|
|
@@ -1047,7 +1050,7 @@ const Fo = g.div`
|
|
|
1047
1050
|
/* @__PURE__ */ k(pr, { children: [
|
|
1048
1051
|
/* @__PURE__ */ k(st, { children: [
|
|
1049
1052
|
/* @__PURE__ */ n(lt, { children: "Context Params" }),
|
|
1050
|
-
|
|
1053
|
+
O()
|
|
1051
1054
|
] }),
|
|
1052
1055
|
/* @__PURE__ */ k(st, { children: [
|
|
1053
1056
|
/* @__PURE__ */ n(lt, { children: "Form" }),
|
|
@@ -1060,7 +1063,7 @@ const Fo = g.div`
|
|
|
1060
1063
|
] }),
|
|
1061
1064
|
/* @__PURE__ */ k(mr, { children: [
|
|
1062
1065
|
/* @__PURE__ */ n(
|
|
1063
|
-
|
|
1066
|
+
Ae,
|
|
1064
1067
|
{
|
|
1065
1068
|
value: v,
|
|
1066
1069
|
placeholder: "Search items...",
|
|
@@ -1077,7 +1080,7 @@ const Fo = g.div`
|
|
|
1077
1080
|
}, Ve = "__custom__", ct = 5, wr = [], Sr = "No preview items found.", kr = 5, Cr = {
|
|
1078
1081
|
project_name: "The select options will change based on the project it is used in.",
|
|
1079
1082
|
user: "The select options will change based on the current user."
|
|
1080
|
-
},
|
|
1083
|
+
}, Ir = g.div`
|
|
1081
1084
|
display: flex;
|
|
1082
1085
|
flex-direction: column;
|
|
1083
1086
|
gap: var(--base-gap-large);
|
|
@@ -1092,7 +1095,7 @@ const Fo = g.div`
|
|
|
1092
1095
|
padding: var(--padding-m);
|
|
1093
1096
|
border-radius: var(--border-radius-m);
|
|
1094
1097
|
background-color: var(--md-sys-color-surface-container);
|
|
1095
|
-
`,
|
|
1098
|
+
`, Er = g.button`
|
|
1096
1099
|
display: flex;
|
|
1097
1100
|
align-items: center;
|
|
1098
1101
|
align-self: flex-start;
|
|
@@ -1156,10 +1159,10 @@ const Fo = g.div`
|
|
|
1156
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);
|
|
1157
1160
|
return /* @__PURE__ */ k(Be, { children: [
|
|
1158
1161
|
m.map(({ option: d, icon: h }) => /* @__PURE__ */ k(Je, { children: [
|
|
1159
|
-
/* @__PURE__ */ n(
|
|
1162
|
+
/* @__PURE__ */ n(In, { icon: h, color: d.color, reserveSpace: x }),
|
|
1160
1163
|
/* @__PURE__ */ n("span", { className: "label", children: d.label })
|
|
1161
1164
|
] }, String(d.value))),
|
|
1162
|
-
l > 0 && /* @__PURE__ */ k(
|
|
1165
|
+
l > 0 && /* @__PURE__ */ k(Er, { type: "button", onClick: r, children: [
|
|
1163
1166
|
"+",
|
|
1164
1167
|
l,
|
|
1165
1168
|
" more"
|
|
@@ -1179,8 +1182,8 @@ const Fo = g.div`
|
|
|
1179
1182
|
value: p.name,
|
|
1180
1183
|
label: p.label || St(p.name)
|
|
1181
1184
|
}))
|
|
1182
|
-
], x = t || Ve, d = i.find((p) => p.name === t), h = d?.settingsForm || wr,
|
|
1183
|
-
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: [
|
|
1184
1187
|
/* @__PURE__ */ n(
|
|
1185
1188
|
pe,
|
|
1186
1189
|
{
|
|
@@ -1225,7 +1228,7 @@ const Fo = g.div`
|
|
|
1225
1228
|
pn,
|
|
1226
1229
|
{
|
|
1227
1230
|
fields: h,
|
|
1228
|
-
values:
|
|
1231
|
+
values: I,
|
|
1229
1232
|
onChange: s
|
|
1230
1233
|
},
|
|
1231
1234
|
t
|
|
@@ -1236,7 +1239,7 @@ const Fo = g.div`
|
|
|
1236
1239
|
{
|
|
1237
1240
|
resolver: d.name,
|
|
1238
1241
|
acceptedParams: d.acceptedParams,
|
|
1239
|
-
settings:
|
|
1242
|
+
settings: I,
|
|
1240
1243
|
onShowMore: l
|
|
1241
1244
|
}
|
|
1242
1245
|
),
|
|
@@ -1255,7 +1258,7 @@ const Fo = g.div`
|
|
|
1255
1258
|
xr,
|
|
1256
1259
|
{
|
|
1257
1260
|
resolver: d,
|
|
1258
|
-
settings:
|
|
1261
|
+
settings: I,
|
|
1259
1262
|
onClose: () => u(!1)
|
|
1260
1263
|
}
|
|
1261
1264
|
)
|
|
@@ -1284,13 +1287,13 @@ const Fo = g.div`
|
|
|
1284
1287
|
{ value: "number", label: "Number", icon: ve("number", "integer") },
|
|
1285
1288
|
{ value: "checkbox", label: "Checkbox", icon: ve("checkbox", "boolean") },
|
|
1286
1289
|
{ value: "datetime", label: "Date and time", icon: ve("datetime", "datetime") }
|
|
1287
|
-
],
|
|
1290
|
+
], Dr = {
|
|
1288
1291
|
text: ["minLength", "maxLength", "regex"],
|
|
1289
1292
|
select: ["enum"],
|
|
1290
1293
|
number: ["ge", "gt", "le", "lt"],
|
|
1291
1294
|
checkbox: [],
|
|
1292
1295
|
datetime: []
|
|
1293
|
-
},
|
|
1296
|
+
}, Ar = {
|
|
1294
1297
|
checkbox: ["example"]
|
|
1295
1298
|
}, vt = (e, t, o) => {
|
|
1296
1299
|
switch (e) {
|
|
@@ -1308,7 +1311,7 @@ const Fo = g.div`
|
|
|
1308
1311
|
default:
|
|
1309
1312
|
return "text";
|
|
1310
1313
|
}
|
|
1311
|
-
},
|
|
1314
|
+
}, Or = (e, t) => {
|
|
1312
1315
|
switch (e) {
|
|
1313
1316
|
case "text":
|
|
1314
1317
|
return "string";
|
|
@@ -1321,15 +1324,15 @@ const Fo = g.div`
|
|
|
1321
1324
|
case "datetime":
|
|
1322
1325
|
return "datetime";
|
|
1323
1326
|
}
|
|
1324
|
-
},
|
|
1327
|
+
}, Lr = [
|
|
1325
1328
|
"string",
|
|
1326
1329
|
"integer",
|
|
1327
1330
|
"float",
|
|
1328
1331
|
"boolean",
|
|
1329
1332
|
"datetime",
|
|
1330
1333
|
"list_of_strings"
|
|
1331
|
-
],
|
|
1332
|
-
if (!e || !
|
|
1334
|
+
], us = (e, t, o) => {
|
|
1335
|
+
if (!e || !Lr.includes(e)) return e ?? "";
|
|
1333
1336
|
if (e === "list_of_strings") return "Select (multiple)";
|
|
1334
1337
|
const r = vt(e, t, o);
|
|
1335
1338
|
return ze.find((a) => a.value === r)?.label ?? e;
|
|
@@ -1392,7 +1395,7 @@ const Fo = g.div`
|
|
|
1392
1395
|
const i = s;
|
|
1393
1396
|
i === "data" && t.data && o.data ? o.data = { ...o.data, ...t.data } : t[i] !== void 0 && (o[i] = t[i]);
|
|
1394
1397
|
}), o;
|
|
1395
|
-
},
|
|
1398
|
+
}, ps = ({
|
|
1396
1399
|
attribute: e,
|
|
1397
1400
|
defaultData: t,
|
|
1398
1401
|
existingNames: o,
|
|
@@ -1411,20 +1414,20 @@ const Fo = g.div`
|
|
|
1411
1414
|
...c
|
|
1412
1415
|
}), [l, m] = U(u), [x, d] = U(
|
|
1413
1416
|
() => vt(u?.data?.type, u?.data?.enum, u?.data?.enumResolver)
|
|
1414
|
-
), [h,
|
|
1417
|
+
), [h, I] = U(() => u?.data?.type === "float");
|
|
1415
1418
|
J(() => {
|
|
1416
1419
|
e && (m(e), d(
|
|
1417
1420
|
vt(e.data?.type, e.data?.enum, e.data?.enumResolver)
|
|
1418
|
-
),
|
|
1421
|
+
), I(e.data?.type === "float"));
|
|
1419
1422
|
}, [e]);
|
|
1420
1423
|
const S = !e, f = (C, _) => {
|
|
1421
|
-
m((
|
|
1424
|
+
m((L) => L && { ...L, [C]: _ });
|
|
1422
1425
|
}, p = (C, _) => {
|
|
1423
|
-
m((
|
|
1424
|
-
if (!
|
|
1425
|
-
return
|
|
1426
|
-
const M = { ...
|
|
1427
|
-
return { ...
|
|
1426
|
+
m((L) => {
|
|
1427
|
+
if (!L || !L.data)
|
|
1428
|
+
return L;
|
|
1429
|
+
const M = { ...L.data, [C]: _ };
|
|
1430
|
+
return { ...L, data: M };
|
|
1428
1431
|
});
|
|
1429
1432
|
};
|
|
1430
1433
|
let y = "";
|
|
@@ -1460,11 +1463,11 @@ const Fo = g.div`
|
|
|
1460
1463
|
(!C?.scope || C?.scope?.some((_) => l?.scope?.includes(_))) && $.push(C.value);
|
|
1461
1464
|
});
|
|
1462
1465
|
const N = [
|
|
1463
|
-
...
|
|
1466
|
+
...Dr[x] ?? [],
|
|
1464
1467
|
...x === "select" && l?.data?.type === "list_of_strings" ? ["minItems", "maxItems"] : []
|
|
1465
|
-
], B =
|
|
1468
|
+
], B = Ar[x] ?? [];
|
|
1466
1469
|
$ = [...$, ...N].filter((C) => !B.includes(C));
|
|
1467
|
-
const
|
|
1470
|
+
const O = {
|
|
1468
1471
|
enum: (C = [], _) => /* @__PURE__ */ n(
|
|
1469
1472
|
_r,
|
|
1470
1473
|
{
|
|
@@ -1473,21 +1476,21 @@ const Fo = g.div`
|
|
|
1473
1476
|
enumResolverSettings: l?.data?.enumResolverSettings,
|
|
1474
1477
|
onChangeEnum: _,
|
|
1475
1478
|
onChangeResolver: z,
|
|
1476
|
-
onChangeResolverSettings: (
|
|
1479
|
+
onChangeResolverSettings: (L) => p("enumResolverSettings", L)
|
|
1477
1480
|
}
|
|
1478
1481
|
),
|
|
1479
1482
|
inherit: (C, _) => /* @__PURE__ */ n(
|
|
1480
|
-
|
|
1483
|
+
De,
|
|
1481
1484
|
{
|
|
1482
1485
|
checked: C,
|
|
1483
|
-
onChange: (
|
|
1486
|
+
onChange: (L) => _(L.target.checked)
|
|
1484
1487
|
}
|
|
1485
1488
|
),
|
|
1486
1489
|
booleanDefault: (C, _) => /* @__PURE__ */ n(
|
|
1487
|
-
|
|
1490
|
+
De,
|
|
1488
1491
|
{
|
|
1489
1492
|
checked: C,
|
|
1490
|
-
onChange: (
|
|
1493
|
+
onChange: (L) => _(L.target.checked)
|
|
1491
1494
|
}
|
|
1492
1495
|
)
|
|
1493
1496
|
}, z = (C) => {
|
|
@@ -1497,7 +1500,7 @@ const Fo = g.div`
|
|
|
1497
1500
|
p("title", _), S && f("name", at(_));
|
|
1498
1501
|
}, V = (C) => {
|
|
1499
1502
|
const _ = C[0];
|
|
1500
|
-
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);
|
|
1501
1504
|
}, R = ze.find((C) => C.value === x)?.widgets;
|
|
1502
1505
|
return /* @__PURE__ */ n(
|
|
1503
1506
|
qe,
|
|
@@ -1513,7 +1516,7 @@ const Fo = g.div`
|
|
|
1513
1516
|
C.key === "Enter" && (C.metaKey || C.ctrlKey) && (C.preventDefault(), w());
|
|
1514
1517
|
},
|
|
1515
1518
|
children: l && /* @__PURE__ */ k(wt, { children: [
|
|
1516
|
-
!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"),
|
|
1517
1520
|
!s.includes("name") && /* @__PURE__ */ n(te, { label: "Name", children: /* @__PURE__ */ n(
|
|
1518
1521
|
Xn,
|
|
1519
1522
|
{
|
|
@@ -1563,7 +1566,7 @@ const Fo = g.div`
|
|
|
1563
1566
|
)
|
|
1564
1567
|
] }) }),
|
|
1565
1568
|
!s.includes("type") && x === "select" && /* @__PURE__ */ n(te, { label: "Multi-select", "data-tooltip": "Allow multiple values to be selected", children: /* @__PURE__ */ n(
|
|
1566
|
-
|
|
1569
|
+
De,
|
|
1567
1570
|
{
|
|
1568
1571
|
checked: l.data.type === "list_of_strings",
|
|
1569
1572
|
disabled: l.builtin || !S,
|
|
@@ -1574,24 +1577,24 @@ const Fo = g.div`
|
|
|
1574
1577
|
}
|
|
1575
1578
|
) }),
|
|
1576
1579
|
!s.includes("type") && x === "number" && /* @__PURE__ */ n(te, { label: "Decimal", children: /* @__PURE__ */ n(
|
|
1577
|
-
|
|
1580
|
+
De,
|
|
1578
1581
|
{
|
|
1579
1582
|
checked: h,
|
|
1580
1583
|
disabled: l.builtin || !S,
|
|
1581
1584
|
onChange: (C) => {
|
|
1582
1585
|
const _ = C.target.checked;
|
|
1583
|
-
|
|
1586
|
+
I(_), p("type", _ ? "float" : "integer");
|
|
1584
1587
|
}
|
|
1585
1588
|
}
|
|
1586
1589
|
) }),
|
|
1587
1590
|
$.map((C) => {
|
|
1588
1591
|
if (s.includes(C)) return null;
|
|
1589
|
-
let _ = null,
|
|
1592
|
+
let _ = null, L = Zn(C);
|
|
1590
1593
|
if (C === "enum" || C === "inherit") {
|
|
1591
|
-
const M =
|
|
1594
|
+
const M = O[C];
|
|
1592
1595
|
_ = M(l?.data[C], (Y) => p(C, Y));
|
|
1593
1596
|
} else if (C === "default" && l?.data?.type === "boolean")
|
|
1594
|
-
_ =
|
|
1597
|
+
_ = O.booleanDefault(
|
|
1595
1598
|
l?.data[C],
|
|
1596
1599
|
(M) => p(C, M)
|
|
1597
1600
|
);
|
|
@@ -1614,7 +1617,7 @@ const Fo = g.div`
|
|
|
1614
1617
|
});
|
|
1615
1618
|
}
|
|
1616
1619
|
}
|
|
1617
|
-
),
|
|
1620
|
+
), L = C === "ge" ? "Min" : "Max";
|
|
1618
1621
|
} else {
|
|
1619
1622
|
const M = (Y) => {
|
|
1620
1623
|
const ne = Y.target.value;
|
|
@@ -1633,7 +1636,7 @@ const Fo = g.div`
|
|
|
1633
1636
|
}
|
|
1634
1637
|
};
|
|
1635
1638
|
_ = /* @__PURE__ */ n(
|
|
1636
|
-
|
|
1639
|
+
Ae,
|
|
1637
1640
|
{
|
|
1638
1641
|
value: String(l?.data[C] ?? ""),
|
|
1639
1642
|
onChange: M
|
|
@@ -1643,7 +1646,7 @@ const Fo = g.div`
|
|
|
1643
1646
|
return /* @__PURE__ */ n(
|
|
1644
1647
|
te,
|
|
1645
1648
|
{
|
|
1646
|
-
label:
|
|
1649
|
+
label: L,
|
|
1647
1650
|
style: {
|
|
1648
1651
|
alignItems: "flex-start"
|
|
1649
1652
|
},
|
|
@@ -1665,10 +1668,10 @@ const Fo = g.div`
|
|
|
1665
1668
|
opacity: 1;
|
|
1666
1669
|
transform: translateY(0);
|
|
1667
1670
|
}
|
|
1668
|
-
`,
|
|
1671
|
+
`, ms = g.div`
|
|
1669
1672
|
position: relative;
|
|
1670
1673
|
display: inline-flex;
|
|
1671
|
-
`,
|
|
1674
|
+
`, gs = g.button`
|
|
1672
1675
|
background: none;
|
|
1673
1676
|
border: none;
|
|
1674
1677
|
padding: 0;
|
|
@@ -1700,7 +1703,7 @@ const Fo = g.div`
|
|
|
1700
1703
|
width: 24px;
|
|
1701
1704
|
height: 24px;
|
|
1702
1705
|
}
|
|
1703
|
-
`,
|
|
1706
|
+
`, hs = g(G)`
|
|
1704
1707
|
width: 20px;
|
|
1705
1708
|
height: 20px;
|
|
1706
1709
|
min-width: 20px;
|
|
@@ -1716,7 +1719,7 @@ const Fo = g.div`
|
|
|
1716
1719
|
&:hover {
|
|
1717
1720
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1718
1721
|
}
|
|
1719
|
-
`,
|
|
1722
|
+
`, vs = g.div`
|
|
1720
1723
|
position: fixed;
|
|
1721
1724
|
z-index: 1001;
|
|
1722
1725
|
background-color: var(--md-sys-color-surface-container-highest);
|
|
@@ -1731,13 +1734,13 @@ const Fo = g.div`
|
|
|
1731
1734
|
&.left {
|
|
1732
1735
|
transform-origin: top left;
|
|
1733
1736
|
}
|
|
1734
|
-
`,
|
|
1737
|
+
`, fs = g.div`
|
|
1735
1738
|
display: flex;
|
|
1736
1739
|
flex-direction: column;
|
|
1737
1740
|
gap: var(--base-gap-small);
|
|
1738
1741
|
padding: var(--padding-m);
|
|
1739
1742
|
position: relative;
|
|
1740
|
-
`,
|
|
1743
|
+
`, bs = g(H)`
|
|
1741
1744
|
&.hasIcon {
|
|
1742
1745
|
padding: 4px;
|
|
1743
1746
|
}
|
|
@@ -1753,7 +1756,7 @@ const Fo = g.div`
|
|
|
1753
1756
|
&:hover {
|
|
1754
1757
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1755
1758
|
}
|
|
1756
|
-
`,
|
|
1759
|
+
`, ys = g.div`
|
|
1757
1760
|
display: flex;
|
|
1758
1761
|
flex-direction: column;
|
|
1759
1762
|
gap: 4px;
|
|
@@ -1762,7 +1765,7 @@ const Fo = g.div`
|
|
|
1762
1765
|
${fe.labelSmall}
|
|
1763
1766
|
color: var(--md-sys-color-outline);
|
|
1764
1767
|
}
|
|
1765
|
-
`,
|
|
1768
|
+
`, xs = g.input`
|
|
1766
1769
|
background-color: var(--md-sys-color-surface-container-low);
|
|
1767
1770
|
border: 1px solid var(--md-sys-color-outline-variant);
|
|
1768
1771
|
border-radius: var(--border-radius-m);
|
|
@@ -1784,7 +1787,7 @@ const Fo = g.div`
|
|
|
1784
1787
|
cursor: pointer;
|
|
1785
1788
|
filter: invert(0.5);
|
|
1786
1789
|
}
|
|
1787
|
-
`,
|
|
1790
|
+
`, ws = g(H)`
|
|
1788
1791
|
&:hover {
|
|
1789
1792
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1790
1793
|
}
|
|
@@ -1804,14 +1807,14 @@ const Fo = g.div`
|
|
|
1804
1807
|
|
|
1805
1808
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
1806
1809
|
font-weight: 700;
|
|
1807
|
-
`,
|
|
1810
|
+
`, Ss = le(
|
|
1808
1811
|
({ tooltip: e, ...t }, o) => /* @__PURE__ */ n(Hr, { "data-tooltip": e, "data-tooltip-delay": 0, ...t, ref: o, children: "Early preview" })
|
|
1809
1812
|
), ft = [
|
|
1810
1813
|
{ value: "hero", label: "Hero", short: "Hero", icon: "star" },
|
|
1811
1814
|
{ value: "latestDone", label: "Latest Done", short: "Done", icon: "check_circle" },
|
|
1812
1815
|
{ value: "latest", label: "Latest", short: "Latest", icon: "fiber_new" }
|
|
1813
|
-
],
|
|
1814
|
-
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({
|
|
1815
1818
|
id: e
|
|
1816
1819
|
}), b = {
|
|
1817
1820
|
transform: Tt.Transform.toString(s),
|
|
@@ -1831,7 +1834,7 @@ const Fo = g.div`
|
|
|
1831
1834
|
] })
|
|
1832
1835
|
}
|
|
1833
1836
|
);
|
|
1834
|
-
},
|
|
1837
|
+
}, Cs = ({ value: e, onChange: t }) => {
|
|
1835
1838
|
const [o, r] = U(null), a = ln(
|
|
1836
1839
|
cn(dn, {
|
|
1837
1840
|
activationConstraint: {
|
|
@@ -1851,7 +1854,7 @@ const Fo = g.div`
|
|
|
1851
1854
|
if (l && u.id !== l.id) {
|
|
1852
1855
|
const m = s.findIndex((d) => d.value === u.id), x = s.findIndex((d) => d.value === l.id);
|
|
1853
1856
|
if (m !== -1 && x !== -1) {
|
|
1854
|
-
const h = un(s, m, x).map((
|
|
1857
|
+
const h = un(s, m, x).map((I) => I.value);
|
|
1855
1858
|
t(h);
|
|
1856
1859
|
}
|
|
1857
1860
|
}
|
|
@@ -1885,7 +1888,7 @@ const Fo = g.div`
|
|
|
1885
1888
|
children: /* @__PURE__ */ n(Kr, { children: s.map((c) => /* @__PURE__ */ n(zr, { id: c.value, label: c.label }, c.value)) })
|
|
1886
1889
|
}
|
|
1887
1890
|
),
|
|
1888
|
-
/* @__PURE__ */ n(
|
|
1891
|
+
/* @__PURE__ */ n(It, { children: b && /* @__PURE__ */ k(Nn, { className: "overlay", children: [
|
|
1889
1892
|
/* @__PURE__ */ n(Pn, { children: /* @__PURE__ */ n(G, { icon: "drag_indicator" }) }),
|
|
1890
1893
|
/* @__PURE__ */ n(_n, { children: b.label })
|
|
1891
1894
|
] }) })
|
|
@@ -1949,7 +1952,7 @@ const Fo = g.div`
|
|
|
1949
1952
|
.icon {
|
|
1950
1953
|
cursor: pointer;
|
|
1951
1954
|
}
|
|
1952
|
-
`,
|
|
1955
|
+
`, Is = le(
|
|
1953
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 })
|
|
1954
1957
|
), qr = g(H)`
|
|
1955
1958
|
transition: color 0.2s, background-color 0.2s, opacity 0.2s;
|
|
@@ -1984,9 +1987,9 @@ const Fo = g.div`
|
|
|
1984
1987
|
&.rounded {
|
|
1985
1988
|
border-radius: var(--border-radius-xl);
|
|
1986
1989
|
}
|
|
1987
|
-
`,
|
|
1990
|
+
`, Es = le(
|
|
1988
1991
|
({ feature: e, variant: t = "outline", rounded: o = !0, bolt: r = !1, ...a }, s) => {
|
|
1989
|
-
const { setPowerpackDialog: i } =
|
|
1992
|
+
const { setPowerpackDialog: i } = vo(), v = (b) => {
|
|
1990
1993
|
i(e), a.onClick?.(b);
|
|
1991
1994
|
};
|
|
1992
1995
|
return /* @__PURE__ */ k(
|
|
@@ -2018,12 +2021,12 @@ const Fo = g.div`
|
|
|
2018
2021
|
{ skip: !o || !r?.instanceId }
|
|
2019
2022
|
), s = new URL(Wr), i = r?.instanceId, v = a || 10;
|
|
2020
2023
|
return s.searchParams.append("seats", v.toString()), i && s.searchParams.append("instance_id", i), e && s.searchParams.append("addon", e), s.toString();
|
|
2021
|
-
},
|
|
2024
|
+
}, Ts = le(
|
|
2022
2025
|
({ children: e, addon: t, ...o }, r) => {
|
|
2023
2026
|
const a = Xr({ addon: t });
|
|
2024
2027
|
return /* @__PURE__ */ n("a", { href: a, target: "_blank", rel: "noopener noreferrer", ...o, ref: r, children: e });
|
|
2025
2028
|
}
|
|
2026
|
-
),
|
|
2029
|
+
), Ns = g(qe)`
|
|
2027
2030
|
background: linear-gradient(180deg, rgb(0 121 181 / 0%) -12.03%, rgb(4 255 227 / 26%) 105.38%),
|
|
2028
2031
|
#15171c;
|
|
2029
2032
|
|
|
@@ -2045,7 +2048,7 @@ const Fo = g.div`
|
|
|
2045
2048
|
.cancelButton {
|
|
2046
2049
|
background-color: unset;
|
|
2047
2050
|
}
|
|
2048
|
-
`,
|
|
2051
|
+
`, Ps = g.div`
|
|
2049
2052
|
display: flex;
|
|
2050
2053
|
flex-direction: column;
|
|
2051
2054
|
align-items: center;
|
|
@@ -2075,7 +2078,7 @@ const Fo = g.div`
|
|
|
2075
2078
|
font-size: 32px;
|
|
2076
2079
|
color: var(--md-sys-color-tertiary);
|
|
2077
2080
|
}
|
|
2078
|
-
`,
|
|
2081
|
+
`, _s = g.div`
|
|
2079
2082
|
width: 100%;
|
|
2080
2083
|
|
|
2081
2084
|
h3 {
|
|
@@ -2103,7 +2106,7 @@ const Fo = g.div`
|
|
|
2103
2106
|
gap: 8px;
|
|
2104
2107
|
}
|
|
2105
2108
|
}
|
|
2106
|
-
`,
|
|
2109
|
+
`, Ds = g.div`
|
|
2107
2110
|
cursor: pointer;
|
|
2108
2111
|
text-align: center;
|
|
2109
2112
|
margin-top: 16px;
|
|
@@ -2125,14 +2128,14 @@ const Fo = g.div`
|
|
|
2125
2128
|
&:hover {
|
|
2126
2129
|
background-color: var(--md-sys-color-tertiary-hover);
|
|
2127
2130
|
}
|
|
2128
|
-
`,
|
|
2131
|
+
`, As = le(({ ...e }, t) => /* @__PURE__ */ n(Qr, { ...e, children: "Try for free!" })), Jr = g.div`
|
|
2129
2132
|
display: flex;
|
|
2130
2133
|
flex-direction: column;
|
|
2131
2134
|
gap: 8px;
|
|
2132
2135
|
border-radius: var(--border-radius-l);
|
|
2133
2136
|
background-color: var(--md-sys-color-secondary-container);
|
|
2134
2137
|
padding: var(--padding-m);
|
|
2135
|
-
`,
|
|
2138
|
+
`, Os = le(
|
|
2136
2139
|
({ requiredVersion: e, addonName: t, addonLabel: o, ...r }, a) => {
|
|
2137
2140
|
const s = t || "powerpack", i = o || "Power Features";
|
|
2138
2141
|
return e ? /* @__PURE__ */ k(Jr, { ...r, ref: a, children: [
|
|
@@ -2145,7 +2148,25 @@ const Fo = g.div`
|
|
|
2145
2148
|
] }) })
|
|
2146
2149
|
] }) : `Required ${i} version installed already.`;
|
|
2147
2150
|
}
|
|
2148
|
-
), 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`
|
|
2149
2170
|
height: 100%;
|
|
2150
2171
|
/* fixed floor so the panel doesn't resize as its content changes */
|
|
2151
2172
|
min-width: 260px;
|
|
@@ -2155,7 +2176,7 @@ const Fo = g.div`
|
|
|
2155
2176
|
z-index: 10;
|
|
2156
2177
|
display: flex;
|
|
2157
2178
|
flex-direction: column;
|
|
2158
|
-
`,
|
|
2179
|
+
`, ti = g.div`
|
|
2159
2180
|
display: flex;
|
|
2160
2181
|
align-items: center;
|
|
2161
2182
|
gap: var(--base-gap-small);
|
|
@@ -2171,38 +2192,20 @@ const Fo = g.div`
|
|
|
2171
2192
|
}
|
|
2172
2193
|
`, Xt = g(H)`
|
|
2173
2194
|
padding: 4px !important;
|
|
2174
|
-
`,
|
|
2195
|
+
`, ni = g.h3`
|
|
2175
2196
|
margin: 0;
|
|
2176
2197
|
flex: 1;
|
|
2177
|
-
`,
|
|
2198
|
+
`, oi = g.div`
|
|
2178
2199
|
padding: 8px;
|
|
2179
2200
|
flex: 1;
|
|
2180
2201
|
overflow-y: auto;
|
|
2181
|
-
`, oi = g(H)`
|
|
2182
|
-
width: 100%;
|
|
2183
|
-
justify-content: flex-start;
|
|
2184
|
-
margin-bottom: 8px;
|
|
2185
|
-
text-align: left;
|
|
2186
|
-
display: flex;
|
|
2187
|
-
gap: var(--base-gap-small);
|
|
2188
|
-
padding-right: var(--padding-s);
|
|
2189
|
-
padding-left: var(--padding-m);
|
|
2190
|
-
|
|
2191
|
-
.title {
|
|
2192
|
-
flex: 1;
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
.preview,
|
|
2196
|
-
.arrow {
|
|
2197
|
-
color: var(--md-sys-color-outline);
|
|
2198
|
-
}
|
|
2199
2202
|
`, ri = ({ settings: e, order: t }) => {
|
|
2200
|
-
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) => {
|
|
2201
2204
|
const x = l.id ? t.indexOf(l.id) : -1, d = m.id ? t.indexOf(m.id) : -1;
|
|
2202
2205
|
return x === -1 && d === -1 ? 0 : x === -1 ? 1 : d === -1 ? -1 : x - d;
|
|
2203
2206
|
}) : e, c = e.find((l) => l.id === r), u = () => r ? e.find((m) => m.id === r)?.component : /* @__PURE__ */ n(me, { children: b.map(
|
|
2204
2207
|
(m, x) => m.title ? /* @__PURE__ */ k(
|
|
2205
|
-
|
|
2208
|
+
Zr,
|
|
2206
2209
|
{
|
|
2207
2210
|
onClick: () => i(m.id),
|
|
2208
2211
|
variant: "text",
|
|
@@ -2217,14 +2220,14 @@ const Fo = g.div`
|
|
|
2217
2220
|
m.id
|
|
2218
2221
|
) : /* @__PURE__ */ n(Yn, { children: m.component }, m.id)
|
|
2219
2222
|
) });
|
|
2220
|
-
return /* @__PURE__ */ k(
|
|
2221
|
-
/* @__PURE__ */ k(
|
|
2223
|
+
return /* @__PURE__ */ k(ei, { open: o, children: [
|
|
2224
|
+
/* @__PURE__ */ k(ti, { children: [
|
|
2222
2225
|
r && /* @__PURE__ */ n(Xt, { variant: "text", icon: "arrow_back", onClick: s }),
|
|
2223
|
-
/* @__PURE__ */ n(
|
|
2226
|
+
/* @__PURE__ */ n(ni, { children: v() }),
|
|
2224
2227
|
c?.headerActions,
|
|
2225
2228
|
/* @__PURE__ */ n(Xt, { variant: "text", icon: "close", onClick: a })
|
|
2226
2229
|
] }),
|
|
2227
|
-
/* @__PURE__ */ n(
|
|
2230
|
+
/* @__PURE__ */ n(oi, { children: u() })
|
|
2228
2231
|
] });
|
|
2229
2232
|
}, dt = g.ul`
|
|
2230
2233
|
display: flex;
|
|
@@ -2305,7 +2308,7 @@ const Fo = g.div`
|
|
|
2305
2308
|
&.active {
|
|
2306
2309
|
opacity: 1;
|
|
2307
2310
|
}
|
|
2308
|
-
`,
|
|
2311
|
+
`, Dn = le(
|
|
2309
2312
|
({
|
|
2310
2313
|
item: e,
|
|
2311
2314
|
actions: t,
|
|
@@ -2353,7 +2356,7 @@ const Fo = g.div`
|
|
|
2353
2356
|
]
|
|
2354
2357
|
}
|
|
2355
2358
|
)
|
|
2356
|
-
), li = g(
|
|
2359
|
+
), li = g(Dn)`
|
|
2357
2360
|
&:hover {
|
|
2358
2361
|
.pin-action {
|
|
2359
2362
|
opacity: 1;
|
|
@@ -2474,7 +2477,7 @@ const Fo = g.div`
|
|
|
2474
2477
|
onPaintEnter: c,
|
|
2475
2478
|
onDragStart: u
|
|
2476
2479
|
}) => {
|
|
2477
|
-
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({
|
|
2478
2481
|
id: e
|
|
2479
2482
|
}), S = {
|
|
2480
2483
|
transform: Tt.Transform.toString(d),
|
|
@@ -2485,7 +2488,7 @@ const Fo = g.div`
|
|
|
2485
2488
|
{
|
|
2486
2489
|
ref: x,
|
|
2487
2490
|
style: S,
|
|
2488
|
-
className:
|
|
2491
|
+
className: I ? "dragging" : "",
|
|
2489
2492
|
id: `column-settings-${e}`,
|
|
2490
2493
|
children: /* @__PURE__ */ n(
|
|
2491
2494
|
bt,
|
|
@@ -2510,10 +2513,10 @@ const Fo = g.div`
|
|
|
2510
2513
|
z-index: 1;
|
|
2511
2514
|
opacity: 0;
|
|
2512
2515
|
}
|
|
2513
|
-
`,
|
|
2516
|
+
`, An = "text_fields", On = ({
|
|
2514
2517
|
field: e,
|
|
2515
2518
|
parentScope: t
|
|
2516
|
-
}) => 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 = []) => [
|
|
2517
2520
|
{
|
|
2518
2521
|
id: "attributes",
|
|
2519
2522
|
label: di(e),
|
|
@@ -2531,7 +2534,7 @@ const Fo = g.div`
|
|
|
2531
2534
|
match: (r) => r.parentScope === o
|
|
2532
2535
|
})
|
|
2533
2536
|
)
|
|
2534
|
-
], Rn = (e, t = []) =>
|
|
2537
|
+
], Rn = (e, t = []) => Ln(t, [e]).find((o) => o.match(e)), $n = ({
|
|
2535
2538
|
columns: e,
|
|
2536
2539
|
onToggle: t,
|
|
2537
2540
|
isColumnVisible: o,
|
|
@@ -2546,24 +2549,24 @@ const Fo = g.div`
|
|
|
2546
2549
|
return {
|
|
2547
2550
|
id: d.value,
|
|
2548
2551
|
label: d.label,
|
|
2549
|
-
icon: d.icon ??
|
|
2552
|
+
icon: d.icon ?? On(d),
|
|
2550
2553
|
hoverIcon: s ? "drag_indicator" : void 0,
|
|
2551
2554
|
disableClose: !0,
|
|
2552
2555
|
active: h,
|
|
2553
2556
|
reserveActiveSlot: !0,
|
|
2554
2557
|
onClick: () => t(d.value),
|
|
2555
|
-
onPointerDown: (
|
|
2556
|
-
r?.(d.value), s?.(d,
|
|
2558
|
+
onPointerDown: (I) => {
|
|
2559
|
+
r?.(d.value), s?.(d, I);
|
|
2557
2560
|
},
|
|
2558
|
-
onPointerEnter: (
|
|
2561
|
+
onPointerEnter: (I) => a?.(d.value, I.buttons > 0)
|
|
2559
2562
|
};
|
|
2560
|
-
}, c =
|
|
2563
|
+
}, c = Ln(i, e), u = new Map(c.map((d) => [d.id, []])), l = [];
|
|
2561
2564
|
e.forEach((d) => {
|
|
2562
|
-
const h = c.find((
|
|
2565
|
+
const h = c.find((I) => I.match(d));
|
|
2563
2566
|
h ? u.get(h.id)?.push(d) : l.push(d);
|
|
2564
2567
|
});
|
|
2565
2568
|
const m = c.filter((d) => u.get(d.id)?.length).map((d) => {
|
|
2566
|
-
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);
|
|
2567
2570
|
if (!d.id.startsWith("parent-"))
|
|
2568
2571
|
return {
|
|
2569
2572
|
id: d.id,
|
|
@@ -2578,12 +2581,12 @@ const Fo = g.div`
|
|
|
2578
2581
|
icon: d.icon,
|
|
2579
2582
|
items: [
|
|
2580
2583
|
...S,
|
|
2581
|
-
...
|
|
2584
|
+
...I.length ? [
|
|
2582
2585
|
{
|
|
2583
2586
|
id: `${d.id}-attributes`,
|
|
2584
2587
|
label: `${f.charAt(0).toUpperCase()}${f.slice(1)} attributes`,
|
|
2585
2588
|
icon: "text_fields",
|
|
2586
|
-
items:
|
|
2589
|
+
items: I.map(b)
|
|
2587
2590
|
}
|
|
2588
2591
|
] : []
|
|
2589
2592
|
]
|
|
@@ -2593,10 +2596,10 @@ const Fo = g.div`
|
|
|
2593
2596
|
(d) => d.length
|
|
2594
2597
|
).flatMap((d, h) => h ? [{ id: "divider" }, ...d] : d);
|
|
2595
2598
|
}, yt = ({ menuId: e, menuItems: t }) => {
|
|
2596
|
-
const { menuOpen: o, setMenuOpen: r } =
|
|
2599
|
+
const { menuOpen: o, setMenuOpen: r } = Xe();
|
|
2597
2600
|
return J(() => {
|
|
2598
2601
|
!t.length && o === e && r(!1);
|
|
2599
|
-
}, [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) }) });
|
|
2600
2603
|
}, ui = 300, Fn = ({
|
|
2601
2604
|
columnVisibility: e,
|
|
2602
2605
|
defaultColumnVisibility: t,
|
|
@@ -2642,7 +2645,7 @@ const Fo = g.div`
|
|
|
2642
2645
|
return l($, f);
|
|
2643
2646
|
});
|
|
2644
2647
|
}
|
|
2645
|
-
}, []),
|
|
2648
|
+
}, []), I = ee((f) => {
|
|
2646
2649
|
if (performance.now() < b.current) {
|
|
2647
2650
|
b.current = 0;
|
|
2648
2651
|
return;
|
|
@@ -2656,14 +2659,14 @@ const Fo = g.div`
|
|
|
2656
2659
|
isVisible: (f) => ae(S, f, t),
|
|
2657
2660
|
onPaintStart: d,
|
|
2658
2661
|
onPaintEnter: h,
|
|
2659
|
-
toggle:
|
|
2662
|
+
toggle: I,
|
|
2660
2663
|
cancelPaint: x,
|
|
2661
2664
|
isPainting: !!a
|
|
2662
2665
|
};
|
|
2663
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) => {
|
|
2664
2667
|
const o = mi(e, t);
|
|
2665
|
-
return { ...e, icon: e.icon ??
|
|
2666
|
-
},
|
|
2668
|
+
return { ...e, icon: e.icon ?? On(e), ...o ? { path: o } : {} };
|
|
2669
|
+
}, Ls = ({
|
|
2667
2670
|
icon: e,
|
|
2668
2671
|
label: t,
|
|
2669
2672
|
checked: o,
|
|
@@ -2671,14 +2674,14 @@ const Fo = g.div`
|
|
|
2671
2674
|
disabled: a,
|
|
2672
2675
|
...s
|
|
2673
2676
|
}) => /* @__PURE__ */ n(
|
|
2674
|
-
|
|
2677
|
+
Dn,
|
|
2675
2678
|
{
|
|
2676
2679
|
item: { value: t, label: t, icon: e },
|
|
2677
2680
|
isDisabled: a,
|
|
2678
2681
|
style: { paddingRight: 8 },
|
|
2679
2682
|
disableHover: !0,
|
|
2680
2683
|
endContent: /* @__PURE__ */ n(
|
|
2681
|
-
|
|
2684
|
+
De,
|
|
2682
2685
|
{
|
|
2683
2686
|
checked: o,
|
|
2684
2687
|
disabled: a,
|
|
@@ -2704,7 +2707,7 @@ const Fo = g.div`
|
|
|
2704
2707
|
columnSummaries: x,
|
|
2705
2708
|
columnSummaryScopes: d,
|
|
2706
2709
|
columnSummaryFormats: h,
|
|
2707
|
-
groupByConfig:
|
|
2710
|
+
groupByConfig: I,
|
|
2708
2711
|
addColumnMenuItems: S,
|
|
2709
2712
|
onColumnDragStart: f,
|
|
2710
2713
|
isColumnDragging: p,
|
|
@@ -2712,10 +2715,10 @@ const Fo = g.div`
|
|
|
2712
2715
|
search: w,
|
|
2713
2716
|
onSearchChange: P
|
|
2714
2717
|
}) => {
|
|
2715
|
-
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", {
|
|
2716
2719
|
baseVisibility: C,
|
|
2717
2720
|
displayVisibility: _,
|
|
2718
|
-
isVisible:
|
|
2721
|
+
isVisible: L,
|
|
2719
2722
|
onPaintStart: M,
|
|
2720
2723
|
onPaintEnter: Y,
|
|
2721
2724
|
toggle: ne,
|
|
@@ -2725,14 +2728,14 @@ const Fo = g.div`
|
|
|
2725
2728
|
defaultColumnVisibility: m,
|
|
2726
2729
|
updateColumnVisibility: r,
|
|
2727
2730
|
isLocked: R
|
|
2728
|
-
}), { toggleMenuOpen: be } =
|
|
2731
|
+
}), { toggleMenuOpen: be } = Xe(), ye = K(null), ue = K({ columnVisibility: o, updateColumnVisibility: r });
|
|
2729
2732
|
ue.current = { columnVisibility: o, updateColumnVisibility: r };
|
|
2730
|
-
const
|
|
2733
|
+
const Oe = K(null);
|
|
2731
2734
|
J(() => {
|
|
2732
|
-
if (!t ||
|
|
2733
|
-
|
|
2734
|
-
const { columnVisibility:
|
|
2735
|
-
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 });
|
|
2736
2739
|
}, [t, e, m]), J(() => {
|
|
2737
2740
|
!ye.current || !t || ye.current.querySelector(`#column-settings-${t}`)?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2738
2741
|
}, [t, o]);
|
|
@@ -2742,54 +2745,54 @@ const Fo = g.div`
|
|
|
2742
2745
|
distance: 5
|
|
2743
2746
|
}
|
|
2744
2747
|
})
|
|
2745
|
-
),
|
|
2746
|
-
const
|
|
2747
|
-
(W) => ae(
|
|
2748
|
-
),
|
|
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));
|
|
2749
2752
|
return {
|
|
2750
|
-
visibleColumns:
|
|
2751
|
-
pinnedColumns:
|
|
2753
|
+
visibleColumns: E.filter((W) => !a.left?.includes(W.value)),
|
|
2754
|
+
pinnedColumns: D
|
|
2752
2755
|
};
|
|
2753
|
-
}, [e,
|
|
2754
|
-
const
|
|
2755
|
-
return i.length > 0 &&
|
|
2756
|
-
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);
|
|
2757
2760
|
return W === -1 ? 1 : se === -1 ? -1 : W - se;
|
|
2758
|
-
}),
|
|
2759
|
-
}, [ge, i]),
|
|
2760
|
-
const
|
|
2761
|
-
return i.length > 0 &&
|
|
2762
|
-
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);
|
|
2763
2766
|
return W === -1 ? 1 : se === -1 ? -1 : W - se;
|
|
2764
|
-
}),
|
|
2765
|
-
}, [ce, i]),
|
|
2766
|
-
() => ie.map((
|
|
2767
|
+
}), E;
|
|
2768
|
+
}, [ce, i]), A = X(
|
|
2769
|
+
() => ie.map((E) => E.value),
|
|
2767
2770
|
[ie]
|
|
2768
2771
|
), q = X(
|
|
2769
|
-
() =>
|
|
2770
|
-
[
|
|
2772
|
+
() => Ie.map((E) => E.value),
|
|
2773
|
+
[Ie]
|
|
2771
2774
|
), he = X(() => {
|
|
2772
2775
|
if (typeof w != "string") return [];
|
|
2773
|
-
const
|
|
2774
|
-
return e.map((
|
|
2775
|
-
const j = [
|
|
2776
|
-
return
|
|
2777
|
-
}).toSorted((
|
|
2778
|
-
}, [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(
|
|
2779
2782
|
() => $n({
|
|
2780
2783
|
columns: e,
|
|
2781
2784
|
onToggle: ne,
|
|
2782
|
-
isColumnVisible:
|
|
2785
|
+
isColumnVisible: L,
|
|
2783
2786
|
onPaintStart: M,
|
|
2784
2787
|
onPaintEnter: Y,
|
|
2785
2788
|
scopes: y
|
|
2786
2789
|
}),
|
|
2787
2790
|
[e, _, ne, M, Y, y]
|
|
2788
|
-
), Te = S ??
|
|
2791
|
+
), Te = S ?? Ee, _t = typeof w == "string" ? /* @__PURE__ */ n(
|
|
2789
2792
|
vi,
|
|
2790
2793
|
{
|
|
2791
2794
|
value: w,
|
|
2792
|
-
onChange: (
|
|
2795
|
+
onChange: (E) => P?.(E),
|
|
2793
2796
|
onClose: () => P?.(null)
|
|
2794
2797
|
}
|
|
2795
2798
|
) : /* @__PURE__ */ n(
|
|
@@ -2802,7 +2805,7 @@ const Fo = g.div`
|
|
|
2802
2805
|
onClick: () => be(Ue),
|
|
2803
2806
|
children: "Add column"
|
|
2804
2807
|
}
|
|
2805
|
-
),
|
|
2808
|
+
), Dt = (E) => ({
|
|
2806
2809
|
columnVisibility: { ...o },
|
|
2807
2810
|
columnOrder: [...i],
|
|
2808
2811
|
columnPinning: { ...a },
|
|
@@ -2811,49 +2814,49 @@ const Fo = g.div`
|
|
|
2811
2814
|
columnSummaryScopes: d,
|
|
2812
2815
|
columnSummaryFormats: h,
|
|
2813
2816
|
groupBy: c,
|
|
2814
|
-
groupByConfig:
|
|
2817
|
+
groupByConfig: I,
|
|
2815
2818
|
sorting: u,
|
|
2816
2819
|
rowHeight: l,
|
|
2817
|
-
...
|
|
2818
|
-
}), et = (
|
|
2819
|
-
const
|
|
2820
|
-
if (
|
|
2821
|
-
|
|
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);
|
|
2822
2825
|
return;
|
|
2823
2826
|
}
|
|
2824
|
-
if (
|
|
2825
|
-
s(
|
|
2827
|
+
if (D.left = [...D.left || [], E], ae(o, E, m)) {
|
|
2828
|
+
s(D);
|
|
2826
2829
|
return;
|
|
2827
2830
|
}
|
|
2828
2831
|
v(
|
|
2829
|
-
|
|
2830
|
-
columnPinning:
|
|
2831
|
-
columnVisibility: { ...o, [
|
|
2832
|
+
Dt({
|
|
2833
|
+
columnPinning: D,
|
|
2834
|
+
columnVisibility: { ...o, [E]: !0 }
|
|
2832
2835
|
})
|
|
2833
2836
|
);
|
|
2834
|
-
}, Bn = (
|
|
2835
|
-
const
|
|
2836
|
-
N(
|
|
2837
|
-
}, Un = (
|
|
2838
|
-
const { active:
|
|
2839
|
-
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) {
|
|
2840
2843
|
const W = ae(
|
|
2841
2844
|
o,
|
|
2842
2845
|
j.id,
|
|
2843
2846
|
m
|
|
2844
2847
|
), se = a.left?.includes(j.id) || !1;
|
|
2845
|
-
|
|
2848
|
+
O(W && se), F(W && !se);
|
|
2846
2849
|
} else
|
|
2847
2850
|
F(!1);
|
|
2848
|
-
}, Hn = (
|
|
2849
|
-
|
|
2850
|
-
const { active:
|
|
2851
|
-
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) {
|
|
2852
2855
|
const W = [...ge, ...ce].find(
|
|
2853
|
-
(de) => de.value ===
|
|
2856
|
+
(de) => de.value === D.id
|
|
2854
2857
|
), se = [...ge, ...ce].find((de) => de.value === j.id);
|
|
2855
2858
|
if (W && se) {
|
|
2856
|
-
const de =
|
|
2859
|
+
const de = D.id, tt = j.id, zn = ae(
|
|
2857
2860
|
o,
|
|
2858
2861
|
de,
|
|
2859
2862
|
m
|
|
@@ -2861,17 +2864,17 @@ const Fo = g.div`
|
|
|
2861
2864
|
o,
|
|
2862
2865
|
tt,
|
|
2863
2866
|
m
|
|
2864
|
-
), 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({});
|
|
2865
2868
|
if (zn && jn) {
|
|
2866
2869
|
let Pe = [...Ne.columnPinning.left || []];
|
|
2867
2870
|
nt !== ot && (nt && !ot ? Pe = Pe.filter((it) => it !== de) : !nt && ot && (Pe = [...Pe, de]));
|
|
2868
|
-
const rt = [...q, ...
|
|
2869
|
-
if (
|
|
2870
|
-
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");
|
|
2871
2874
|
return;
|
|
2872
2875
|
}
|
|
2873
|
-
const
|
|
2874
|
-
Ne.columnOrder =
|
|
2876
|
+
const Lt = un(rt, At, Ot), Kn = Lt.filter((it) => Pe.includes(it));
|
|
2877
|
+
Ne.columnOrder = Lt, Ne.columnPinning = {
|
|
2875
2878
|
...Ne.columnPinning,
|
|
2876
2879
|
left: Kn
|
|
2877
2880
|
}, v(Ne);
|
|
@@ -2879,29 +2882,29 @@ const Fo = g.div`
|
|
|
2879
2882
|
}
|
|
2880
2883
|
}
|
|
2881
2884
|
N(null);
|
|
2882
|
-
}, Re = $ ? [...ge, ...ce].find((
|
|
2885
|
+
}, Re = $ ? [...ge, ...ce].find((E) => E.value === $) : null;
|
|
2883
2886
|
return typeof w == "string" ? /* @__PURE__ */ k(Jt, { ref: ye, "data-column-drag-origin": !0, children: [
|
|
2884
2887
|
_t,
|
|
2885
2888
|
/* @__PURE__ */ n(yt, { menuId: Ue, menuItems: Te }),
|
|
2886
2889
|
/* @__PURE__ */ k(ut, { children: [
|
|
2887
2890
|
/* @__PURE__ */ n(pt, { children: "All Columns" }),
|
|
2888
|
-
/* @__PURE__ */ n(dt, { children: he.map((
|
|
2891
|
+
/* @__PURE__ */ n(dt, { children: he.map((E) => /* @__PURE__ */ n(
|
|
2889
2892
|
bt,
|
|
2890
2893
|
{
|
|
2891
|
-
id: `column-settings-${
|
|
2892
|
-
column: He(
|
|
2893
|
-
isPinned: a.left?.includes(
|
|
2894
|
-
isHidden: Ce(
|
|
2895
|
-
isHighlighted: t ===
|
|
2896
|
-
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),
|
|
2897
2900
|
hideDragHandle: !0,
|
|
2898
2901
|
onTogglePinning: et,
|
|
2899
2902
|
onToggleVisibility: ne,
|
|
2900
2903
|
onPaintStart: M,
|
|
2901
2904
|
onPaintEnter: Y,
|
|
2902
|
-
onDragStart: (
|
|
2905
|
+
onDragStart: (D) => f?.(E, D)
|
|
2903
2906
|
},
|
|
2904
|
-
|
|
2907
|
+
E.value
|
|
2905
2908
|
)) })
|
|
2906
2909
|
] })
|
|
2907
2910
|
] }) : /* @__PURE__ */ n(
|
|
@@ -2920,24 +2923,24 @@ const Fo = g.div`
|
|
|
2920
2923
|
/* @__PURE__ */ n(
|
|
2921
2924
|
Ke,
|
|
2922
2925
|
{
|
|
2923
|
-
items:
|
|
2926
|
+
items: Ie.map((E) => E.value),
|
|
2924
2927
|
strategy: Ge,
|
|
2925
|
-
children: /* @__PURE__ */ n(dt, { children:
|
|
2928
|
+
children: /* @__PURE__ */ n(dt, { children: Ie.map((E) => /* @__PURE__ */ n(
|
|
2926
2929
|
Qt,
|
|
2927
2930
|
{
|
|
2928
|
-
id:
|
|
2929
|
-
column: He(
|
|
2931
|
+
id: E.value,
|
|
2932
|
+
column: He(E, y),
|
|
2930
2933
|
isPinned: !0,
|
|
2931
|
-
isHidden: Ce(
|
|
2932
|
-
isDisabled: R(
|
|
2933
|
-
isHighlighted: t ===
|
|
2934
|
+
isHidden: Ce(E.value),
|
|
2935
|
+
isDisabled: R(E.value),
|
|
2936
|
+
isHighlighted: t === E.value,
|
|
2934
2937
|
onTogglePinning: et,
|
|
2935
2938
|
onToggleVisibility: ne,
|
|
2936
2939
|
onPaintStart: M,
|
|
2937
2940
|
onPaintEnter: Y,
|
|
2938
|
-
onDragStart: (
|
|
2941
|
+
onDragStart: (D) => f?.(E, D)
|
|
2939
2942
|
},
|
|
2940
|
-
|
|
2943
|
+
E.value
|
|
2941
2944
|
)) })
|
|
2942
2945
|
}
|
|
2943
2946
|
)
|
|
@@ -2947,29 +2950,29 @@ const Fo = g.div`
|
|
|
2947
2950
|
/* @__PURE__ */ n(
|
|
2948
2951
|
Ke,
|
|
2949
2952
|
{
|
|
2950
|
-
items: ie.map((
|
|
2953
|
+
items: ie.map((E) => E.value),
|
|
2951
2954
|
strategy: Ge,
|
|
2952
|
-
children: /* @__PURE__ */ n(dt, { children: ie.map((
|
|
2955
|
+
children: /* @__PURE__ */ n(dt, { children: ie.map((E) => /* @__PURE__ */ n(
|
|
2953
2956
|
Qt,
|
|
2954
2957
|
{
|
|
2955
|
-
id:
|
|
2956
|
-
column: He(
|
|
2958
|
+
id: E.value,
|
|
2959
|
+
column: He(E, y),
|
|
2957
2960
|
isPinned: !1,
|
|
2958
|
-
isHidden: Ce(
|
|
2959
|
-
isHighlighted: t ===
|
|
2960
|
-
isDisabled: R(
|
|
2961
|
+
isHidden: Ce(E.value),
|
|
2962
|
+
isHighlighted: t === E.value,
|
|
2963
|
+
isDisabled: R(E.value),
|
|
2961
2964
|
onTogglePinning: et,
|
|
2962
2965
|
onToggleVisibility: ne,
|
|
2963
2966
|
onPaintStart: M,
|
|
2964
2967
|
onPaintEnter: Y,
|
|
2965
|
-
onDragStart: (
|
|
2968
|
+
onDragStart: (D) => f?.(E, D)
|
|
2966
2969
|
},
|
|
2967
|
-
|
|
2970
|
+
E.value
|
|
2968
2971
|
)) })
|
|
2969
2972
|
}
|
|
2970
2973
|
)
|
|
2971
2974
|
] }),
|
|
2972
|
-
/* @__PURE__ */ n(
|
|
2975
|
+
/* @__PURE__ */ n(It, { children: Re && !p && /* @__PURE__ */ n(
|
|
2973
2976
|
bt,
|
|
2974
2977
|
{
|
|
2975
2978
|
column: He(Re, y),
|
|
@@ -3004,7 +3007,7 @@ const Fo = g.div`
|
|
|
3004
3007
|
padding: 4px 0;
|
|
3005
3008
|
`, hi = g(H)`
|
|
3006
3009
|
justify-content: flex-start;
|
|
3007
|
-
`, vi = g(
|
|
3010
|
+
`, vi = g(ko)`
|
|
3008
3011
|
padding: 0;
|
|
3009
3012
|
|
|
3010
3013
|
input {
|
|
@@ -3121,10 +3124,10 @@ const Fo = g.div`
|
|
|
3121
3124
|
const h = ee((y) => {
|
|
3122
3125
|
const w = parseInt(y.target.value, 10);
|
|
3123
3126
|
d(!0), m(w);
|
|
3124
|
-
}, []),
|
|
3127
|
+
}, []), I = Io(l, b);
|
|
3125
3128
|
J(() => {
|
|
3126
3129
|
x && t(l);
|
|
3127
|
-
}, [
|
|
3130
|
+
}, [I, t, x, l]);
|
|
3128
3131
|
const S = ee(() => {
|
|
3129
3132
|
u(!0);
|
|
3130
3133
|
}, []), f = ee(() => {
|
|
@@ -3160,7 +3163,7 @@ const Fo = g.div`
|
|
|
3160
3163
|
updateShowHierarchy: c,
|
|
3161
3164
|
hierarchyOptions: u,
|
|
3162
3165
|
hierarchyActive: l
|
|
3163
|
-
} =
|
|
3166
|
+
} = Qe(), m = Eo({ scope: e });
|
|
3164
3167
|
if (!v) return null;
|
|
3165
3168
|
const { GroupSettings: x, requiredVersion: d } = v || {}, h = !!c, S = h ? [...u || [
|
|
3166
3169
|
{ value: Se, label: "Hierarchy", icon: "account_tree" },
|
|
@@ -3201,7 +3204,7 @@ const Fo = g.div`
|
|
|
3201
3204
|
)
|
|
3202
3205
|
};
|
|
3203
3206
|
}, Ci = (e = []) => {
|
|
3204
|
-
const { sorting: t, updateSorting: o } = ke(), { attribFields: r, scopes: a } =
|
|
3207
|
+
const { sorting: t, updateSorting: o } = ke(), { attribFields: r, scopes: a } = Qe(), s = [
|
|
3205
3208
|
...yo(a, e),
|
|
3206
3209
|
...r.filter(
|
|
3207
3210
|
(l) => l.scope?.some((m) => a.includes(m)) && !xo(l)
|
|
@@ -3233,12 +3236,12 @@ const Fo = g.div`
|
|
|
3233
3236
|
}
|
|
3234
3237
|
)
|
|
3235
3238
|
};
|
|
3236
|
-
}, Pt = [
|
|
3239
|
+
}, Pt = [Ao, Oo], en = 5, Ii = `#${Do}, [data-column-drag-origin]`, Ei = (e, t) => {
|
|
3237
3240
|
const r = document.querySelector(`[${yn}]`)?.getBoundingClientRect();
|
|
3238
3241
|
if (!r || e < r.left || e > r.right || t < r.top || t > r.bottom) return;
|
|
3239
|
-
const a = Array.from(
|
|
3240
|
-
|
|
3241
|
-
)
|
|
3242
|
+
const a = Array.from(document.querySelectorAll(xn)).filter(
|
|
3243
|
+
(v) => !Pt.includes(v.dataset.columnId || "")
|
|
3244
|
+
), s = a.find((v) => {
|
|
3242
3245
|
const b = v.getBoundingClientRect();
|
|
3243
3246
|
return e >= b.left && e < b.right;
|
|
3244
3247
|
});
|
|
@@ -3246,13 +3249,13 @@ const Fo = g.div`
|
|
|
3246
3249
|
const i = a[a.length - 1];
|
|
3247
3250
|
return e >= i.getBoundingClientRect().right ? i : a[0];
|
|
3248
3251
|
}, tn = (e, t) => {
|
|
3249
|
-
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;
|
|
3250
3253
|
if (!o || !r || Pt.includes(r)) return null;
|
|
3251
3254
|
const a = o.getBoundingClientRect(), s = e < a.left + a.width / 2 ? "left" : "right";
|
|
3252
3255
|
return {
|
|
3253
3256
|
columnId: r,
|
|
3254
3257
|
side: s,
|
|
3255
|
-
line:
|
|
3258
|
+
line: To(o, s)
|
|
3256
3259
|
};
|
|
3257
3260
|
}, Ti = (e, t) => {
|
|
3258
3261
|
const o = e.length ? e : t;
|
|
@@ -3272,7 +3275,7 @@ const Fo = g.div`
|
|
|
3272
3275
|
rowHeight: u,
|
|
3273
3276
|
setColumnsConfig: l,
|
|
3274
3277
|
getAllColumns: m
|
|
3275
|
-
} = ke(), { setMenuOpen: x } =
|
|
3278
|
+
} = ke(), { setMenuOpen: x } = Xe(), [d, h] = U(null), I = K(null), S = K(null);
|
|
3276
3279
|
S.current = d;
|
|
3277
3280
|
const f = K({
|
|
3278
3281
|
columnVisibility: e,
|
|
@@ -3305,31 +3308,31 @@ const Fo = g.div`
|
|
|
3305
3308
|
getAllColumns: m
|
|
3306
3309
|
};
|
|
3307
3310
|
const p = ee((N, B) => {
|
|
3308
|
-
const
|
|
3311
|
+
const O = f.current, z = Ti(O.columnOrder, O.getAllColumns()).filter(
|
|
3309
3312
|
(C) => C !== N && !Pt.includes(C)
|
|
3310
|
-
), 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(
|
|
3311
|
-
R.has(B.columnId) ? R.add(N) : R.delete(N),
|
|
3312
|
-
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 },
|
|
3313
3316
|
columnOrder: F,
|
|
3314
|
-
columnPinning: { ...
|
|
3315
|
-
columnSizing:
|
|
3316
|
-
columnSummaries:
|
|
3317
|
-
columnSummaryScopes:
|
|
3318
|
-
columnSummaryFormats:
|
|
3319
|
-
groupBy:
|
|
3320
|
-
groupByConfig:
|
|
3321
|
-
sorting:
|
|
3322
|
-
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
|
|
3323
3326
|
});
|
|
3324
3327
|
}, []), y = ee(() => {
|
|
3325
|
-
|
|
3328
|
+
I.current = null, S.current && h(null);
|
|
3326
3329
|
}, []), w = ee((N, B) => {
|
|
3327
|
-
const
|
|
3328
|
-
|
|
3330
|
+
const O = B.currentTarget, z = O.getBoundingClientRect();
|
|
3331
|
+
I.current = {
|
|
3329
3332
|
column: N,
|
|
3330
3333
|
x: B.clientX,
|
|
3331
3334
|
y: B.clientY,
|
|
3332
|
-
origin:
|
|
3335
|
+
origin: O.closest(Ii),
|
|
3333
3336
|
immediate: !!B.target.closest?.(".hover-swap"),
|
|
3334
3337
|
grab: {
|
|
3335
3338
|
x: B.clientX - z.left,
|
|
@@ -3347,22 +3350,22 @@ const Fo = g.div`
|
|
|
3347
3350
|
);
|
|
3348
3351
|
return;
|
|
3349
3352
|
}
|
|
3350
|
-
const R =
|
|
3353
|
+
const R = I.current;
|
|
3351
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) }));
|
|
3352
|
-
},
|
|
3355
|
+
}, O = () => {
|
|
3353
3356
|
const T = S.current;
|
|
3354
|
-
|
|
3357
|
+
I.current = null, T && (_i(), T.target && (p(T.column.value, T.target), x(!1)), h(null));
|
|
3355
3358
|
}, z = (T) => {
|
|
3356
3359
|
T.key === "Escape" && y();
|
|
3357
3360
|
};
|
|
3358
|
-
return window.addEventListener("pointermove", B), window.addEventListener("pointerup",
|
|
3359
|
-
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);
|
|
3360
3363
|
};
|
|
3361
3364
|
}, [p, y, x]);
|
|
3362
3365
|
const P = d ? document.querySelector(`[${yn}]`)?.getBoundingClientRect() : void 0, $ = d ? sn(
|
|
3363
3366
|
/* @__PURE__ */ k(me, { children: [
|
|
3364
3367
|
P && /* @__PURE__ */ n(
|
|
3365
|
-
|
|
3368
|
+
Di,
|
|
3366
3369
|
{
|
|
3367
3370
|
style: {
|
|
3368
3371
|
left: P.left,
|
|
@@ -3373,7 +3376,7 @@ const Fo = g.div`
|
|
|
3373
3376
|
}
|
|
3374
3377
|
),
|
|
3375
3378
|
/* @__PURE__ */ k(
|
|
3376
|
-
|
|
3379
|
+
Ai,
|
|
3377
3380
|
{
|
|
3378
3381
|
style: {
|
|
3379
3382
|
left: d.x - d.grab.x,
|
|
@@ -3397,14 +3400,14 @@ const Fo = g.div`
|
|
|
3397
3400
|
t.stopPropagation(), t.preventDefault();
|
|
3398
3401
|
};
|
|
3399
3402
|
window.addEventListener("click", e, !0), setTimeout(() => window.removeEventListener("click", e, !0), 0);
|
|
3400
|
-
},
|
|
3403
|
+
}, Di = g.div`
|
|
3401
3404
|
position: fixed;
|
|
3402
3405
|
box-sizing: border-box;
|
|
3403
3406
|
z-index: 999;
|
|
3404
3407
|
pointer-events: none;
|
|
3405
3408
|
border-radius: 4px;
|
|
3406
3409
|
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
|
|
3407
|
-
`,
|
|
3410
|
+
`, Ai = g.div`
|
|
3408
3411
|
position: fixed;
|
|
3409
3412
|
box-sizing: border-box;
|
|
3410
3413
|
z-index: 2000;
|
|
@@ -3435,13 +3438,19 @@ const Fo = g.div`
|
|
|
3435
3438
|
columnVisibility: r,
|
|
3436
3439
|
defaultColumnVisibility: a,
|
|
3437
3440
|
updateColumnVisibility: s
|
|
3438
|
-
}), { 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 });
|
|
3439
3442
|
S.current = { isPainting: m, isDragging: h, cancelPaint: l };
|
|
3440
|
-
const f = ee(
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
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(
|
|
3445
3454
|
() => $n({
|
|
3446
3455
|
columns: e,
|
|
3447
3456
|
onToggle: u,
|
|
@@ -3467,17 +3476,17 @@ const Fo = g.div`
|
|
|
3467
3476
|
return {
|
|
3468
3477
|
menuItems: y,
|
|
3469
3478
|
hasMenuItems: !!y.length,
|
|
3470
|
-
dragOverlay:
|
|
3479
|
+
dragOverlay: I,
|
|
3471
3480
|
onColumnDragStart: x,
|
|
3472
3481
|
isColumnDragging: h
|
|
3473
3482
|
};
|
|
3474
|
-
},
|
|
3475
|
-
extraColumns: e =
|
|
3476
|
-
hiddenColumns: t =
|
|
3483
|
+
}, Oi = [], Li = [], Vn = ({
|
|
3484
|
+
extraColumns: e = Oi,
|
|
3485
|
+
hiddenColumns: t = Li,
|
|
3477
3486
|
includeLinks: o = !0,
|
|
3478
3487
|
parentColumns: r = []
|
|
3479
3488
|
}) => {
|
|
3480
|
-
const { linkTypes: a } = bn(), { attribFields: s, scopes: i } =
|
|
3489
|
+
const { linkTypes: a } = bn(), { attribFields: s, scopes: i } = Qe(), v = X(
|
|
3481
3490
|
() => [
|
|
3482
3491
|
{
|
|
3483
3492
|
value: "thumbnail",
|
|
@@ -3597,7 +3606,7 @@ const Fo = g.div`
|
|
|
3597
3606
|
),
|
|
3598
3607
|
...e.map((c) => ({
|
|
3599
3608
|
...c,
|
|
3600
|
-
icon: c.icon ??
|
|
3609
|
+
icon: c.icon ?? An
|
|
3601
3610
|
}))
|
|
3602
3611
|
],
|
|
3603
3612
|
[i, s, a, o, r, e]
|
|
@@ -3610,8 +3619,8 @@ const Fo = g.div`
|
|
|
3610
3619
|
min-width: 120px;
|
|
3611
3620
|
`, $i = g(H)`
|
|
3612
3621
|
padding: 4px !important;
|
|
3613
|
-
`,
|
|
3614
|
-
const { togglePanel: r, isPanelOpen: a } =
|
|
3622
|
+
`, Rs = ({ defaultSelected: e, className: t, ...o }) => {
|
|
3623
|
+
const { togglePanel: r, isPanelOpen: a } = We();
|
|
3615
3624
|
return /* @__PURE__ */ n(
|
|
3616
3625
|
Ri,
|
|
3617
3626
|
{
|
|
@@ -3622,7 +3631,7 @@ const Fo = g.div`
|
|
|
3622
3631
|
children: "Customize"
|
|
3623
3632
|
}
|
|
3624
3633
|
);
|
|
3625
|
-
},
|
|
3634
|
+
}, $s = ({
|
|
3626
3635
|
settings: e = [],
|
|
3627
3636
|
extraColumns: t,
|
|
3628
3637
|
hiddenColumns: o,
|
|
@@ -3636,13 +3645,13 @@ const Fo = g.div`
|
|
|
3636
3645
|
parentColumns: u,
|
|
3637
3646
|
columnIdAliases: l
|
|
3638
3647
|
}) => {
|
|
3639
|
-
const { scopes: m } =
|
|
3648
|
+
const { scopes: m } = Qe(), {
|
|
3640
3649
|
columnVisibility: x,
|
|
3641
3650
|
defaultColumnVisibility: d,
|
|
3642
3651
|
rowHeight: h = 34,
|
|
3643
|
-
updateRowHeight:
|
|
3652
|
+
updateRowHeight: I,
|
|
3644
3653
|
updateRowHeightWithPersistence: S
|
|
3645
|
-
} = ke(), { isPanelOpen: f, selectedSetting: p } =
|
|
3654
|
+
} = ke(), { isPanelOpen: f, selectedSetting: p } = We(), [y, w] = U(null);
|
|
3646
3655
|
J(() => {
|
|
3647
3656
|
y !== null && (!f || p !== "columns") && w(null);
|
|
3648
3657
|
}, [f, p, y]);
|
|
@@ -3655,8 +3664,8 @@ const Fo = g.div`
|
|
|
3655
3664
|
hiddenColumns: o,
|
|
3656
3665
|
includeLinks: s,
|
|
3657
3666
|
parentColumns: u
|
|
3658
|
-
}), B = a && So(a, l),
|
|
3659
|
-
(
|
|
3667
|
+
}), B = a && So(a, l), O = N.filter(
|
|
3668
|
+
(L) => ae(x, L.value, d)
|
|
3660
3669
|
).length, {
|
|
3661
3670
|
menuItems: z,
|
|
3662
3671
|
dragOverlay: T,
|
|
@@ -3671,7 +3680,7 @@ const Fo = g.div`
|
|
|
3671
3680
|
id: "columns",
|
|
3672
3681
|
title: "Columns",
|
|
3673
3682
|
icon: "view_column",
|
|
3674
|
-
preview: `${
|
|
3683
|
+
preview: `${O}/${N.length}`,
|
|
3675
3684
|
headerActions: /* @__PURE__ */ n(
|
|
3676
3685
|
$i,
|
|
3677
3686
|
{
|
|
@@ -3707,7 +3716,7 @@ const Fo = g.div`
|
|
|
3707
3716
|
Si,
|
|
3708
3717
|
{
|
|
3709
3718
|
value: h,
|
|
3710
|
-
onChange:
|
|
3719
|
+
onChange: I,
|
|
3711
3720
|
onChangeComplete: S,
|
|
3712
3721
|
title: "Row height",
|
|
3713
3722
|
id: "row-height-slider"
|
|
@@ -3715,10 +3724,10 @@ const Fo = g.div`
|
|
|
3715
3724
|
)
|
|
3716
3725
|
}
|
|
3717
3726
|
].filter(Boolean);
|
|
3718
|
-
return e.forEach((
|
|
3719
|
-
if (r.includes(
|
|
3720
|
-
const M = _.findIndex((Y) => Y && "id" in Y && Y.id ===
|
|
3721
|
-
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);
|
|
3722
3731
|
}), /* @__PURE__ */ n(ri, { settings: _, order: v });
|
|
3723
3732
|
}, gt = "add-column-menu-table", Fi = g.div`
|
|
3724
3733
|
position: absolute;
|
|
@@ -3730,14 +3739,14 @@ const Fo = g.div`
|
|
|
3730
3739
|
padding: 2px;
|
|
3731
3740
|
border-radius: 12px;
|
|
3732
3741
|
}
|
|
3733
|
-
`,
|
|
3742
|
+
`, Fs = ({
|
|
3734
3743
|
extraColumns: e,
|
|
3735
3744
|
hiddenColumns: t,
|
|
3736
3745
|
includeLinks: o,
|
|
3737
3746
|
extraMenuItems: r,
|
|
3738
3747
|
parentColumns: a
|
|
3739
3748
|
}) => {
|
|
3740
|
-
const { isPanelOpen: s } =
|
|
3749
|
+
const { isPanelOpen: s } = We(), { toggleMenuOpen: i } = Xe(), { visibleColumns: v, scopes: b } = Vn({
|
|
3741
3750
|
extraColumns: e,
|
|
3742
3751
|
hiddenColumns: t,
|
|
3743
3752
|
includeLinks: o,
|
|
@@ -3762,7 +3771,7 @@ const Fo = g.div`
|
|
|
3762
3771
|
/* @__PURE__ */ n(yt, { menuId: gt, menuItems: c }),
|
|
3763
3772
|
l
|
|
3764
3773
|
] });
|
|
3765
|
-
},
|
|
3774
|
+
}, Ms = g.a`
|
|
3766
3775
|
color: var(--md-sys-color-primary, #0066cc);
|
|
3767
3776
|
text-decoration: none;
|
|
3768
3777
|
cursor: pointer;
|
|
@@ -3787,7 +3796,7 @@ const Fo = g.div`
|
|
|
3787
3796
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
3788
3797
|
}
|
|
3789
3798
|
}
|
|
3790
|
-
`,
|
|
3799
|
+
`, Vs = le(
|
|
3791
3800
|
({ showGrid: e, onChange: t, ...o }, r) => (J(() => {
|
|
3792
3801
|
const a = (s) => {
|
|
3793
3802
|
const i = s.target;
|
|
@@ -3911,7 +3920,7 @@ const Fo = g.div`
|
|
|
3911
3920
|
onCloseVersionUpload: x,
|
|
3912
3921
|
extractAndSetVersionFromFiles: d,
|
|
3913
3922
|
dispatch: h,
|
|
3914
|
-
taskId:
|
|
3923
|
+
taskId: I,
|
|
3915
3924
|
linkedTask: S,
|
|
3916
3925
|
isLoadingTask: f,
|
|
3917
3926
|
setTaskId: p,
|
|
@@ -3920,54 +3929,54 @@ const Fo = g.div`
|
|
|
3920
3929
|
folderProducts: P,
|
|
3921
3930
|
isFolderProductsLoading: $,
|
|
3922
3931
|
matchedProduct: N
|
|
3923
|
-
} = Sn(), [B,
|
|
3924
|
-
() => P.map((
|
|
3932
|
+
} = Sn(), [B, O] = U(!1), z = X(
|
|
3933
|
+
() => P.map((A) => ({ value: A.name, label: A.name })),
|
|
3925
3934
|
[P]
|
|
3926
3935
|
), T = ee(
|
|
3927
|
-
(
|
|
3928
|
-
t("name",
|
|
3936
|
+
(A) => {
|
|
3937
|
+
t("name", A.length > 0 ? A[0] : "");
|
|
3929
3938
|
},
|
|
3930
3939
|
[t]
|
|
3931
3940
|
), V = N?.latestVersion ? `v${String(N.latestVersion.version).padStart(3, "0")}` : "", { data: F, isFetching: R } = uo(
|
|
3932
|
-
{ projectName: a, taskId:
|
|
3933
|
-
{ skip: !
|
|
3934
|
-
), 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]);
|
|
3935
3944
|
J(() => {
|
|
3936
|
-
const
|
|
3937
|
-
if (e.productType !==
|
|
3938
|
-
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;
|
|
3939
3948
|
t("name", Te);
|
|
3940
3949
|
}
|
|
3941
3950
|
b.current = e.productType;
|
|
3942
3951
|
}, [e.productType, e.name, t]);
|
|
3943
|
-
const
|
|
3944
|
-
|
|
3945
|
-
const q =
|
|
3952
|
+
const Oe = (A) => {
|
|
3953
|
+
A.preventDefault();
|
|
3954
|
+
const q = A.nativeEvent.submitter;
|
|
3946
3955
|
q && q.closest(".dropdown") || o(e);
|
|
3947
|
-
}, Ze = (
|
|
3948
|
-
const q = parseInt(
|
|
3956
|
+
}, Ze = (A) => {
|
|
3957
|
+
const q = parseInt(A.target.value, 10);
|
|
3949
3958
|
isNaN(q) || t("version", q);
|
|
3950
|
-
},
|
|
3951
|
-
t("name",
|
|
3952
|
-
}, Ce = (
|
|
3953
|
-
|
|
3959
|
+
}, Le = (A) => {
|
|
3960
|
+
t("name", A.target.value);
|
|
3961
|
+
}, Ce = (A) => {
|
|
3962
|
+
A.length > 0 && t("productType", A[0]);
|
|
3954
3963
|
}, ge = () => {
|
|
3955
|
-
const
|
|
3956
|
-
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);
|
|
3957
3966
|
}, ce = () => {
|
|
3958
|
-
const
|
|
3959
|
-
return e.name && !e.name.startsWith(
|
|
3967
|
+
const A = ue[e.productType]?.name || "";
|
|
3968
|
+
return e.name && !e.name.startsWith(A);
|
|
3960
3969
|
}, ie = !!i;
|
|
3961
3970
|
return /* @__PURE__ */ k(
|
|
3962
3971
|
Vi,
|
|
3963
3972
|
{
|
|
3964
3973
|
id: "upload-version-form",
|
|
3965
3974
|
ref: u,
|
|
3966
|
-
onSubmit:
|
|
3975
|
+
onSubmit: Oe,
|
|
3967
3976
|
noValidate: !0,
|
|
3968
|
-
onKeyDown: (
|
|
3969
|
-
if (
|
|
3970
|
-
|
|
3977
|
+
onKeyDown: (A) => {
|
|
3978
|
+
if (A.key === "Enter" && (A.metaKey || A.ctrlKey)) {
|
|
3979
|
+
A.preventDefault(), o(e);
|
|
3971
3980
|
return;
|
|
3972
3981
|
}
|
|
3973
3982
|
},
|
|
@@ -3976,10 +3985,10 @@ const Fo = g.div`
|
|
|
3976
3985
|
!r.includes("name") && /* @__PURE__ */ n(te, { label: "Product Name", children: /* @__PURE__ */ k(zi, { children: [
|
|
3977
3986
|
/* @__PURE__ */ k("div", { children: [
|
|
3978
3987
|
/* @__PURE__ */ n(
|
|
3979
|
-
|
|
3988
|
+
Ae,
|
|
3980
3989
|
{
|
|
3981
3990
|
value: e.name,
|
|
3982
|
-
onChange:
|
|
3991
|
+
onChange: Le,
|
|
3983
3992
|
placeholder: "Enter product name",
|
|
3984
3993
|
minLength: 1,
|
|
3985
3994
|
autoFocus: !0,
|
|
@@ -4012,7 +4021,7 @@ const Fo = g.div`
|
|
|
4012
4021
|
widthExpand: !1,
|
|
4013
4022
|
disabled: $ || P.length === 0,
|
|
4014
4023
|
"aria-label": "Select existing product",
|
|
4015
|
-
valueTemplate: (
|
|
4024
|
+
valueTemplate: (A, q, he) => /* @__PURE__ */ n(
|
|
4016
4025
|
H,
|
|
4017
4026
|
{
|
|
4018
4027
|
icon: "inventory_2",
|
|
@@ -4053,12 +4062,12 @@ const Fo = g.div`
|
|
|
4053
4062
|
disabled: ie
|
|
4054
4063
|
}
|
|
4055
4064
|
) }),
|
|
4056
|
-
/* @__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: [
|
|
4057
4066
|
/* @__PURE__ */ k(
|
|
4058
4067
|
Yi,
|
|
4059
4068
|
{
|
|
4060
4069
|
type: "button",
|
|
4061
|
-
onClick: () =>
|
|
4070
|
+
onClick: () => O(!0),
|
|
4062
4071
|
disabled: ie,
|
|
4063
4072
|
variant: "text",
|
|
4064
4073
|
children: [
|
|
@@ -4093,24 +4102,24 @@ const Fo = g.div`
|
|
|
4093
4102
|
icon: "link",
|
|
4094
4103
|
label: "Link task",
|
|
4095
4104
|
variant: "text",
|
|
4096
|
-
onClick: () =>
|
|
4105
|
+
onClick: () => O(!0),
|
|
4097
4106
|
disabled: ie
|
|
4098
4107
|
}
|
|
4099
4108
|
) }) })
|
|
4100
4109
|
] }),
|
|
4101
4110
|
B && /* @__PURE__ */ n(
|
|
4102
|
-
|
|
4111
|
+
Co,
|
|
4103
4112
|
{
|
|
4104
4113
|
projectName: a,
|
|
4105
4114
|
entityType: "task",
|
|
4106
4115
|
initialSelection: {
|
|
4107
4116
|
..._ ? { folder: { [_]: !0 } } : {},
|
|
4108
|
-
...
|
|
4117
|
+
...I ? { task: { [I]: !0 } } : {}
|
|
4109
4118
|
},
|
|
4110
|
-
onSubmit: (
|
|
4111
|
-
|
|
4119
|
+
onSubmit: (A) => {
|
|
4120
|
+
A.length > 0 && p(A[0]), O(!1);
|
|
4112
4121
|
},
|
|
4113
|
-
onClose: () =>
|
|
4122
|
+
onClose: () => O(!1)
|
|
4114
4123
|
}
|
|
4115
4124
|
),
|
|
4116
4125
|
/* @__PURE__ */ n(te, { label: "Reviewable files" }),
|
|
@@ -4146,7 +4155,7 @@ const Fo = g.div`
|
|
|
4146
4155
|
color: var(--md-sys-color-on-error-container);
|
|
4147
4156
|
padding: var(--padding-s);
|
|
4148
4157
|
border-radius: var(--border-radius-m);
|
|
4149
|
-
`,
|
|
4158
|
+
`, Bs = () => {
|
|
4150
4159
|
const {
|
|
4151
4160
|
isOpen: e,
|
|
4152
4161
|
onCloseVersionUpload: t,
|
|
@@ -4162,7 +4171,7 @@ const Fo = g.div`
|
|
|
4162
4171
|
createdProductId: l,
|
|
4163
4172
|
createdVersionId: m,
|
|
4164
4173
|
matchedProduct: x
|
|
4165
|
-
} = 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: [
|
|
4166
4175
|
/* @__PURE__ */ n(rn, {}),
|
|
4167
4176
|
/* @__PURE__ */ n(H, { onClick: t, label: "Cancel", variant: "text" }),
|
|
4168
4177
|
/* @__PURE__ */ n(
|
|
@@ -4200,7 +4209,7 @@ const Fo = g.div`
|
|
|
4200
4209
|
productId: d
|
|
4201
4210
|
}
|
|
4202
4211
|
),
|
|
4203
|
-
|
|
4212
|
+
I && /* @__PURE__ */ n(Zi, { className: "error", children: io(u) })
|
|
4204
4213
|
]
|
|
4205
4214
|
}
|
|
4206
4215
|
);
|
|
@@ -4210,7 +4219,7 @@ const Fo = g.div`
|
|
|
4210
4219
|
z-index: 1000;
|
|
4211
4220
|
overflow: hidden;
|
|
4212
4221
|
padding-bottom: var(--padding-m);
|
|
4213
|
-
`, ta = g(
|
|
4222
|
+
`, ta = g(Ro)`
|
|
4214
4223
|
display: flex;
|
|
4215
4224
|
flex-direction: column;
|
|
4216
4225
|
justify-content: flex-start;
|
|
@@ -4307,7 +4316,7 @@ function aa({
|
|
|
4307
4316
|
selectionVariant: c = "primary",
|
|
4308
4317
|
shortcut: u
|
|
4309
4318
|
}) {
|
|
4310
|
-
const [l] =
|
|
4319
|
+
const [l] = $o();
|
|
4311
4320
|
return /* @__PURE__ */ k(
|
|
4312
4321
|
na,
|
|
4313
4322
|
{
|
|
@@ -4331,7 +4340,7 @@ function aa({
|
|
|
4331
4340
|
e
|
|
4332
4341
|
);
|
|
4333
4342
|
}
|
|
4334
|
-
const
|
|
4343
|
+
const Us = le(({
|
|
4335
4344
|
reviewables: e = [],
|
|
4336
4345
|
selected: t = [],
|
|
4337
4346
|
projectName: o,
|
|
@@ -4380,11 +4389,11 @@ const Ms = le(({
|
|
|
4380
4389
|
}
|
|
4381
4390
|
};
|
|
4382
4391
|
if (!e.length) return /* @__PURE__ */ n("div", {});
|
|
4383
|
-
const
|
|
4384
|
-
if (e.length < 2 ||
|
|
4392
|
+
const I = e.findIndex(({ fileId: f }) => t.includes(f)), S = (f) => {
|
|
4393
|
+
if (e.length < 2 || I === -1) return;
|
|
4385
4394
|
const p = e.length;
|
|
4386
|
-
if (f === (
|
|
4387
|
-
if (f === (
|
|
4395
|
+
if (f === (I - 1 + p) % p) return "W";
|
|
4396
|
+
if (f === (I + 1) % p) return "S";
|
|
4388
4397
|
};
|
|
4389
4398
|
return /* @__PURE__ */ k(ea, { children: [
|
|
4390
4399
|
/* @__PURE__ */ k(
|
|
@@ -4428,56 +4437,55 @@ const Ms = le(({
|
|
|
4428
4437
|
] });
|
|
4429
4438
|
});
|
|
4430
4439
|
export {
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4440
|
+
ds as A,
|
|
4441
|
+
Us as B,
|
|
4442
|
+
ls as C,
|
|
4443
|
+
vs as D,
|
|
4435
4444
|
Ho as E,
|
|
4436
|
-
|
|
4445
|
+
_s as F,
|
|
4437
4446
|
Ut as G,
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
Ps 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,
|
|
4468
4476
|
ft as l,
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4477
|
+
Fs as m,
|
|
4478
|
+
ss as n,
|
|
4479
|
+
ps as o,
|
|
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
|
|
4483
4491
|
};
|