@ynput/ayon-frontend-shared 0.7.6 → 0.8.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/DetailsPanel.es.js +361 -355
- package/dist/Feed.es.js +1 -1
- package/dist/ListTable.es.js +18 -18
- package/dist/NewEntity.es.js +30 -30
- package/dist/ProjectTreeTable.es.js +984 -974
- package/dist/ProjectsTable.es.js +3 -3
- package/dist/Slicer.es.js +53 -50
- package/dist/Views.es.js +150 -151
- package/dist/api.es.js +166 -165
- package/dist/chunks/Actions.es.js +9 -10
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/ColumnHeaderMenuUI.es.js +3 -4
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +2 -2
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +7 -7
- package/dist/chunks/EntityPath.es.js +38 -39
- package/dist/chunks/EntityPickerDialog.es.js +65 -66
- package/dist/chunks/EntityTooltip.es.js +18 -19
- package/dist/chunks/Feed.es.js +1381 -1355
- package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
- package/dist/chunks/FilterErrorActions.es.js +2 -3
- package/dist/chunks/GroupSettingsFallback.es.js +2 -2
- package/dist/chunks/Menu.es.js +52 -53
- package/dist/chunks/MetaWidget.es.js +1948 -1875
- package/dist/chunks/ProjectFoldersContext.es.js +40 -40
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +759 -742
- package/dist/chunks/SimpleTable.es.js +2 -1
- package/dist/chunks/Slicer.es.js +49 -50
- package/dist/chunks/TableExportContextInstance.es.js +600 -402
- package/dist/chunks/TableSettingsFallback.es.js +3 -4
- package/dist/chunks/ThumbnailSimple.es.js +114 -99
- package/dist/chunks/VideoPlayer.es.js +8 -9
- package/dist/chunks/Watchers.es.js +928 -871
- package/dist/chunks/expandRelativeDates.es.js +1 -1
- package/dist/chunks/getThumbnailUrl.es.js +33 -21
- package/dist/chunks/getUris.es.js +1580 -1610
- package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
- package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
- package/dist/chunks/searchTerms.es.js +774 -696
- package/dist/chunks/useAttributeEnums.es.js +22 -22
- package/dist/chunks/useDateRangeFilter.es.js +1 -1
- package/dist/chunks/useHierarchySelection.es.js +3 -4
- package/dist/chunks/useLoadModule.es.js +3 -4
- package/dist/components.es.js +1261 -1206
- package/dist/context.es.js +615 -540
- package/dist/hooks.es.js +193 -171
- package/dist/index.es.js +2 -2
- package/dist/types/Actions.d.ts +10 -8
- package/dist/types/DetailsPanel.d.ts +54 -76
- package/dist/types/EntityPickerDialog.d.ts +12 -6
- package/dist/types/Feed.d.ts +24 -24
- package/dist/types/ListTable.d.ts +33 -27
- package/dist/types/NewEntity.d.ts +26 -39
- package/dist/types/ProjectTreeTable.d.ts +275 -194
- package/dist/types/ProjectsTable.d.ts +6 -6
- package/dist/types/RepresentationsList.d.ts +4 -0
- package/dist/types/Slicer.d.ts +63 -246
- package/dist/types/Views.d.ts +71 -298
- package/dist/types/api.d.ts +3165 -2363
- package/dist/types/components.d.ts +444 -473
- package/dist/types/context.d.ts +285 -572
- package/dist/types/hooks.d.ts +76 -47
- package/dist/types/index.d.ts +6 -0
- package/dist/types/util.d.ts +141 -120
- package/dist/util.es.js +71 -68
- package/package.json +6 -6
- package/dist/chunks/EntityUpdatesContext.es.js +0 -61
- package/dist/chunks/PlayableIcon.es.js +0 -5020
- package/dist/chunks/viewUpdateHelper.es.js +0 -153
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as R, jsx as t, Fragment as Q } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as _, useState as x, useEffect as le, useLayoutEffect as ae, createElement as me, Fragment as ke } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { dA as Me, c2 as Ue, cg as Fe, dm as Te, b4 as Le, aT as We, aO as Ve, dr as Ne } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
|
-
import { useSensors as
|
|
7
|
-
import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as
|
|
8
|
-
import { D as
|
|
6
|
+
import { useSensors as Ae, useSensor as he, PointerSensor as $e, KeyboardSensor as Oe, DndContext as qe, closestCenter as Ke, DragOverlay as Ze } from "@dnd-kit/core";
|
|
7
|
+
import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as He } from "@dnd-kit/sortable";
|
|
8
|
+
import { D as ze, R as Re, a as Je, b as Xe, L as Ye, c as oe, u as je, d as et, T as tt, e as ge, U as nt, P as rt, C as it, f as at, S as J, M as ve, g as be, h as X, i as ye, j as ot, F as st } from "./Watchers.es.js";
|
|
9
9
|
import { CSS as lt } from "@dnd-kit/utilities";
|
|
10
|
-
import { toast as
|
|
10
|
+
import { toast as $ } from "react-toastify";
|
|
11
11
|
import { u as ct } from "./useCreateContextMenu.es.js";
|
|
12
12
|
import { c as dt } from "./confirmDelete.es.js";
|
|
13
13
|
import "uuid";
|
|
@@ -16,17 +16,16 @@ import ft from "axios";
|
|
|
16
16
|
import { Icon as Ce, Dialog as Se, InputText as xe, Toolbar as mt, Button as ce, SaveButton as ht, FormRow as gt } from "@ynput/ayon-react-components";
|
|
17
17
|
import "@module-federation/enhanced/runtime";
|
|
18
18
|
import "@ynput/ayon-addon/host";
|
|
19
|
-
import {
|
|
19
|
+
import { m as Ee } from "./TableExportContextInstance.es.js";
|
|
20
20
|
import "semver";
|
|
21
21
|
import "react-dom";
|
|
22
|
-
import "react-redux";
|
|
23
22
|
import "react-router-dom";
|
|
24
23
|
import ue from "clsx";
|
|
25
24
|
import "./ContextMenuContextInstance.es.js";
|
|
26
25
|
import { s as vt, a as bt, h as we, g as yt, b as wt } from "./versionUploadHelpers.es.js";
|
|
27
26
|
import { p as It } from "./parseFilename.es.js";
|
|
28
27
|
import { u as Dt } from "./VersionUploadContextInstance.es.js";
|
|
29
|
-
const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PURE__ */ R(
|
|
28
|
+
const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PURE__ */ R(ze, { className: ue(d, { active: a }), ...g, children: [
|
|
30
29
|
/* @__PURE__ */ t(Ce, { icon: i }),
|
|
31
30
|
/* @__PURE__ */ t("span", { children: r })
|
|
32
31
|
] }), Ct = ({ ...r }) => {
|
|
@@ -94,9 +93,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
94
93
|
updateReviewablesRequest: {
|
|
95
94
|
label: s
|
|
96
95
|
}
|
|
97
|
-
}).unwrap(),
|
|
96
|
+
}).unwrap(), $.success("Reviewable updated successfully"), r();
|
|
98
97
|
} catch {
|
|
99
|
-
|
|
98
|
+
$.error("Failed to update reviewable");
|
|
100
99
|
}
|
|
101
100
|
}, E = (v) => {
|
|
102
101
|
v.preventDefault(), s && I();
|
|
@@ -137,7 +136,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
137
136
|
) })
|
|
138
137
|
}
|
|
139
138
|
);
|
|
140
|
-
},
|
|
139
|
+
}, on = ({
|
|
141
140
|
projectName: r,
|
|
142
141
|
versionId: i,
|
|
143
142
|
productId: a,
|
|
@@ -151,12 +150,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
151
150
|
} = Fe(
|
|
152
151
|
{ projectName: r, versionId: i },
|
|
153
152
|
{ skip: !i || !r }
|
|
154
|
-
), P = !1, V = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, W] = x(null), [M, p] = x(null), c =
|
|
155
|
-
he(
|
|
153
|
+
), P = !1, V = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, W] = x(null), [M, p] = x(null), c = Ae(
|
|
154
|
+
he($e),
|
|
156
155
|
he(Oe, {
|
|
157
156
|
coordinateGetter: Be
|
|
158
157
|
})
|
|
159
|
-
), b = E?.reviewables || [], C = b.find((e) => e.fileId === M),
|
|
158
|
+
), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), A = v?.id, K = h && i !== A || d, N = (e) => {
|
|
160
159
|
if (M) return console.log("Dragging, cannot open review");
|
|
161
160
|
const o = e.currentTarget.id;
|
|
162
161
|
if (!o || !a) return console.error("No reviewable id or product id");
|
|
@@ -175,19 +174,19 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
175
174
|
const { active: o } = e;
|
|
176
175
|
p(o.id);
|
|
177
176
|
}
|
|
178
|
-
const [
|
|
177
|
+
const [H] = Te(), z = async (e) => {
|
|
179
178
|
const { active: o, over: l } = e;
|
|
180
179
|
if (l?.id && o.id !== l.id) {
|
|
181
180
|
console.log("update review position");
|
|
182
|
-
const D = w.findIndex((L) => L.fileId === o.id), U = w.findIndex((L) => L.fileId === l.id), S =
|
|
181
|
+
const D = w.findIndex((L) => L.fileId === o.id), U = w.findIndex((L) => L.fileId === l.id), S = He(w, D, U).map((L) => L.activityId);
|
|
183
182
|
try {
|
|
184
|
-
|
|
183
|
+
H({
|
|
185
184
|
projectName: r,
|
|
186
185
|
versionId: i,
|
|
187
186
|
sortReviewablesRequest: { sort: S }
|
|
188
187
|
}).unwrap();
|
|
189
188
|
} catch {
|
|
190
|
-
|
|
189
|
+
$.error("Error sorting reviewables");
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
p(null);
|
|
@@ -209,7 +208,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
209
208
|
try {
|
|
210
209
|
await ne({ activityId: e, projectName: r }).unwrap();
|
|
211
210
|
} catch {
|
|
212
|
-
|
|
211
|
+
$.error("Failed to delete reviewable");
|
|
213
212
|
}
|
|
214
213
|
}
|
|
215
214
|
});
|
|
@@ -257,7 +256,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
257
256
|
sensors: c,
|
|
258
257
|
collisionDetection: Ke,
|
|
259
258
|
onDragStart: ee,
|
|
260
|
-
onDragEnd:
|
|
259
|
+
onDragEnd: z,
|
|
261
260
|
onDragCancel: () => p(null),
|
|
262
261
|
children: [
|
|
263
262
|
/* @__PURE__ */ t(
|
|
@@ -385,7 +384,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
385
384
|
}, kt = [
|
|
386
385
|
{ id: "thumbnail", label: "Upload thumbnail", icon: "add_photo_alternate" },
|
|
387
386
|
{ id: "version", label: "Upload version", icon: "layers" }
|
|
388
|
-
],
|
|
387
|
+
], sn = ({
|
|
389
388
|
children: r = [],
|
|
390
389
|
entityType: i,
|
|
391
390
|
entities: a = [],
|
|
@@ -394,9 +393,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
394
393
|
versionsInputRef: y,
|
|
395
394
|
onVersionCreated: u
|
|
396
395
|
}) => {
|
|
397
|
-
const { dispatch: s } = Ee(), f = Dt(), [m, n] = x(!1), [I, E] = x(null), h = _(0), [v, P] = x(null), [V, F] = x(0), [O, k] = x(!1), [W, M] = x(null), p = a.length === 1 ? a[0] : null, c = p?.task?.id, b = p?.folder?.id, C = p?.product?.id,
|
|
396
|
+
const { dispatch: s } = Ee(), f = Dt(), [m, n] = x(!1), [I, E] = x(null), h = _(0), [v, P] = x(null), [V, F] = x(0), [O, k] = x(!1), [W, M] = x(null), p = a.length === 1 ? a[0] : null, c = p?.task?.id, b = p?.folder?.id, C = p?.product?.id, A = p?.id, q = !!(p && i !== "representation"), { handleFileUpload: K } = je({
|
|
398
397
|
projectName: d,
|
|
399
|
-
versionId:
|
|
398
|
+
versionId: A,
|
|
400
399
|
taskId: c,
|
|
401
400
|
folderId: b,
|
|
402
401
|
productId: C,
|
|
@@ -416,7 +415,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
416
415
|
}
|
|
417
416
|
const o = vt(e);
|
|
418
417
|
if (!o.trim()) {
|
|
419
|
-
|
|
418
|
+
$.error(
|
|
420
419
|
"Product name must contain valid characters (letters, numbers, underscore, or hyphen)"
|
|
421
420
|
);
|
|
422
421
|
return;
|
|
@@ -432,15 +431,15 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
432
431
|
// default product type for uploaded files
|
|
433
432
|
productBaseType: "review"
|
|
434
433
|
});
|
|
435
|
-
k(!1), await
|
|
434
|
+
k(!1), await z(W, l.id), M(null);
|
|
436
435
|
} catch (l) {
|
|
437
436
|
we(l, "creating product"), w();
|
|
438
437
|
}
|
|
439
438
|
}, Y = () => {
|
|
440
439
|
k(!1), M(null), w();
|
|
441
|
-
}, [j] = We(), [ee] = Ve(),
|
|
440
|
+
}, [j] = We(), [ee] = Ve(), H = async (e) => {
|
|
442
441
|
if (!q || !p)
|
|
443
|
-
return
|
|
442
|
+
return $.error("Please select exactly one version to upload reviewables"), w();
|
|
444
443
|
if (f) {
|
|
445
444
|
const D = Array.from(e).map((S) => ({
|
|
446
445
|
file: S,
|
|
@@ -468,8 +467,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
468
467
|
M(e), k(!0);
|
|
469
468
|
return;
|
|
470
469
|
}
|
|
471
|
-
await
|
|
472
|
-
},
|
|
470
|
+
await z(e, o);
|
|
471
|
+
}, z = async (e, o) => {
|
|
473
472
|
try {
|
|
474
473
|
const l = yt(p.product?.latestVersion), D = await wt(j, d, {
|
|
475
474
|
productId: o,
|
|
@@ -510,7 +509,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
510
509
|
}));
|
|
511
510
|
n(!1), w();
|
|
512
511
|
} catch (o) {
|
|
513
|
-
console.error(o),
|
|
512
|
+
console.error(o), $.error(o.message), w();
|
|
514
513
|
}
|
|
515
514
|
}, [pe] = Ne(), te = (e) => {
|
|
516
515
|
e.preventDefault(), h.current++, h.current === 1 && n(!0);
|
|
@@ -528,12 +527,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
528
527
|
if (I === "version") {
|
|
529
528
|
P("version");
|
|
530
529
|
const o = e.dataTransfer.files;
|
|
531
|
-
|
|
530
|
+
H(o);
|
|
532
531
|
}
|
|
533
532
|
}
|
|
534
533
|
}, G = async (e, o) => {
|
|
535
534
|
const l = e.target.files;
|
|
536
|
-
!l || l.length === 0 || (o === "version" && (P("version"),
|
|
535
|
+
!l || l.length === 0 || (o === "version" && (P("version"), H(l)), o === "thumbnail" && (P("thumbnail"), B(l[0])));
|
|
537
536
|
};
|
|
538
537
|
return /* @__PURE__ */ R(Q, { children: [
|
|
539
538
|
/* @__PURE__ */ R(
|
|
@@ -604,7 +603,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
604
603
|
}, se = () => /* @__PURE__ */ t("span", { className: "slash", children: "/" }), Mt = ["more", "versions"], Ie = (r) => {
|
|
605
604
|
const i = r.target, a = i.closest(".dropdown")?.id || "";
|
|
606
605
|
return [i, a];
|
|
607
|
-
},
|
|
606
|
+
}, ln = ({
|
|
608
607
|
projectName: r,
|
|
609
608
|
hideProjectName: i,
|
|
610
609
|
segments: a,
|
|
@@ -623,13 +622,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
623
622
|
}
|
|
624
623
|
const c = s.current, b = c.clientWidth, C = De(c);
|
|
625
624
|
if (!C) return;
|
|
626
|
-
const
|
|
625
|
+
const A = c.children;
|
|
627
626
|
let q = b;
|
|
628
627
|
const K = c.childElementCount;
|
|
629
628
|
let N = K;
|
|
630
629
|
for (; q > C && N > 0; )
|
|
631
|
-
N -= 2, q = Ut(
|
|
632
|
-
let w = Array.from(
|
|
630
|
+
N -= 2, q = Ut(A, N, K);
|
|
631
|
+
let w = Array.from(A).slice(0, N).filter(
|
|
633
632
|
(Z) => Z.nodeType === Node.ELEMENT_NODE && Z.className.includes("full")
|
|
634
633
|
)?.length || 2;
|
|
635
634
|
w = Math.max(w, 1), I(w), h(!1);
|
|
@@ -720,8 +719,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
720
719
|
return g + (4 * i - 1) + 40;
|
|
721
720
|
};
|
|
722
721
|
export {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
722
|
+
sn as E,
|
|
723
|
+
on as R,
|
|
724
|
+
ln as a,
|
|
726
725
|
St as g
|
|
727
726
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as B, jsx as w, Fragment as ue } from "react/jsx-runtime";
|
|
2
|
-
import { useState as L, useRef as
|
|
2
|
+
import { useState as L, useRef as z, useCallback as M, useEffect as N, useMemo as E } from "react";
|
|
3
3
|
import { upperFirst as Z } from "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import "react-toastify";
|
|
@@ -8,22 +8,21 @@ import { bw as pe } from "./searchTerms.es.js";
|
|
|
8
8
|
import "axios";
|
|
9
9
|
import { createPortal as fe } from "react-dom";
|
|
10
10
|
import { b as y, H as ee, a as me, S as he, e as ge } from "./SimpleTable.es.js";
|
|
11
|
-
import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as
|
|
11
|
+
import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as H } from "@ynput/ayon-react-components";
|
|
12
12
|
import S from "styled-components";
|
|
13
13
|
import { E as xe } from "./EmptyPlaceholder.es.js";
|
|
14
|
-
import { a as
|
|
15
|
-
import {
|
|
14
|
+
import { a as U, E as Pe } from "./EntityTooltip.es.js";
|
|
15
|
+
import { cj as Te } from "./getUris.es.js";
|
|
16
16
|
import "@module-federation/enhanced/runtime";
|
|
17
17
|
import "@ynput/ayon-addon/host";
|
|
18
|
-
import {
|
|
18
|
+
import { s as Ie, q as Ce, k as Fe, t as Re } from "./TableExportContextInstance.es.js";
|
|
19
19
|
import "semver";
|
|
20
20
|
import "./ContextMenuContextInstance.es.js";
|
|
21
21
|
import "clsx";
|
|
22
|
-
import "react-redux";
|
|
23
22
|
import "react-router-dom";
|
|
24
23
|
import { g as A } from "./getThumbnailUrl.es.js";
|
|
25
24
|
import { g as te } from "./getEntityTypeIcon.es.js";
|
|
26
|
-
import { P as
|
|
25
|
+
import { P as je, a as X } from "./ProjectFoldersContext.es.js";
|
|
27
26
|
const I = {
|
|
28
27
|
folder: ["folder"],
|
|
29
28
|
product: ["folder", "product"],
|
|
@@ -31,7 +30,7 @@ const I = {
|
|
|
31
30
|
representation: ["folder", "product", "version", "representation"],
|
|
32
31
|
task: ["folder", "task"],
|
|
33
32
|
workfile: ["folder", "task", "workfile"]
|
|
34
|
-
},
|
|
33
|
+
}, De = (e, s, n) => e.map((t) => {
|
|
35
34
|
const c = n?.find((a) => a.name === t.subType);
|
|
36
35
|
return {
|
|
37
36
|
id: t.id,
|
|
@@ -52,7 +51,7 @@ const I = {
|
|
|
52
51
|
tooltip: t.entityType === "product" ? t.thumbnail : void 0
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
|
-
}),
|
|
54
|
+
}), Oe = (e, s, n) => e.map((t) => {
|
|
56
55
|
const c = n.find((a) => a.name === t.folderType);
|
|
57
56
|
return {
|
|
58
57
|
id: t.id,
|
|
@@ -164,11 +163,11 @@ const I = {
|
|
|
164
163
|
] }),
|
|
165
164
|
typeof s == "string" && /* @__PURE__ */ w(Me, { value: s, onChange: n, onClose: () => n(void 0) })
|
|
166
165
|
] });
|
|
167
|
-
},
|
|
168
|
-
const n =
|
|
166
|
+
}, Ge = 150, We = (e, s) => {
|
|
167
|
+
const n = U.includes(e) || e === "product", [t, c] = L(null), a = z(), i = M(() => clearTimeout(a.current), []), o = M(() => {
|
|
169
168
|
i(), c(null);
|
|
170
169
|
}, [i]), p = M(() => {
|
|
171
|
-
i(), a.current = setTimeout(() => c(null),
|
|
170
|
+
i(), a.current = setTimeout(() => c(null), Ge);
|
|
172
171
|
}, [i]);
|
|
173
172
|
N(() => o, [o, e]), N(() => {
|
|
174
173
|
if (t)
|
|
@@ -177,7 +176,7 @@ const I = {
|
|
|
177
176
|
const m = M(
|
|
178
177
|
(d) => {
|
|
179
178
|
const r = s?.find((u) => u.id === d)?.data?.tooltip || { entityType: e, entityId: d };
|
|
180
|
-
return
|
|
179
|
+
return U.includes(r.entityType) && r.entityId ? r : null;
|
|
181
180
|
},
|
|
182
181
|
[s, e]
|
|
183
182
|
), h = M(
|
|
@@ -199,7 +198,7 @@ const I = {
|
|
|
199
198
|
onMouseLeave: p,
|
|
200
199
|
tooltipProps: { onMouseEnter: i, onMouseLeave: o }
|
|
201
200
|
};
|
|
202
|
-
},
|
|
201
|
+
}, Ye = ({
|
|
203
202
|
entityType: e,
|
|
204
203
|
projectName: s,
|
|
205
204
|
tableData: n,
|
|
@@ -212,7 +211,7 @@ const I = {
|
|
|
212
211
|
onRowSubmit: m,
|
|
213
212
|
onScrollBottom: h
|
|
214
213
|
}) => {
|
|
215
|
-
const d =
|
|
214
|
+
const d = We(e, n), g = (r) => {
|
|
216
215
|
r.preventDefault();
|
|
217
216
|
const u = r.currentTarget.id, k = n.find((f) => f.id === u);
|
|
218
217
|
u && !k?.isDisabled && m?.(u);
|
|
@@ -261,7 +260,7 @@ const I = {
|
|
|
261
260
|
document.body
|
|
262
261
|
)
|
|
263
262
|
] });
|
|
264
|
-
},
|
|
263
|
+
}, ze = ({
|
|
265
264
|
projectName: e,
|
|
266
265
|
folderTypes: s,
|
|
267
266
|
includeColors: n = !1,
|
|
@@ -289,18 +288,18 @@ const I = {
|
|
|
289
288
|
parents: r.parents
|
|
290
289
|
}
|
|
291
290
|
}), h = (r, u = "id", k = "parentId") => {
|
|
292
|
-
const f = /* @__PURE__ */ new Map(), T = [],
|
|
291
|
+
const f = /* @__PURE__ */ new Map(), T = [], j = [...r].sort(
|
|
293
292
|
(b, x) => (b.label || b.name).localeCompare(x.label || x.name)
|
|
294
293
|
);
|
|
295
|
-
for (let b = 0; b <
|
|
296
|
-
const x =
|
|
294
|
+
for (let b = 0; b < j.length; b++) {
|
|
295
|
+
const x = j[b], C = x[u], P = {
|
|
297
296
|
...m(x),
|
|
298
297
|
subRows: []
|
|
299
298
|
};
|
|
300
299
|
f.set(C, P);
|
|
301
300
|
}
|
|
302
|
-
for (let b = 0; b <
|
|
303
|
-
const x =
|
|
301
|
+
for (let b = 0; b < j.length; b++) {
|
|
302
|
+
const x = j[b], C = x[u], P = x[k], R = f.get(C);
|
|
304
303
|
if (P) {
|
|
305
304
|
const K = f.get(P);
|
|
306
305
|
K && K.subRows.push(R);
|
|
@@ -335,7 +334,7 @@ const I = {
|
|
|
335
334
|
data: p,
|
|
336
335
|
folders: m,
|
|
337
336
|
isFetching: h
|
|
338
|
-
} =
|
|
337
|
+
} = ze({
|
|
339
338
|
projectName: e,
|
|
340
339
|
folderTypes: o?.folderTypes || [],
|
|
341
340
|
includeColors: !0,
|
|
@@ -348,7 +347,7 @@ const I = {
|
|
|
348
347
|
),
|
|
349
348
|
[m, n.folder]
|
|
350
349
|
), g = E(
|
|
351
|
-
() => n.folder ?
|
|
350
|
+
() => n.folder ? Oe(d, e, o?.folderTypes || []) : p,
|
|
352
351
|
[d, p, n.folder, o, e]
|
|
353
352
|
), r = {
|
|
354
353
|
data: d,
|
|
@@ -375,7 +374,7 @@ const I = {
|
|
|
375
374
|
),
|
|
376
375
|
o?.productTypes,
|
|
377
376
|
k
|
|
378
|
-
),
|
|
377
|
+
), j = _(
|
|
379
378
|
e,
|
|
380
379
|
"version",
|
|
381
380
|
n.version,
|
|
@@ -393,7 +392,7 @@ const I = {
|
|
|
393
392
|
!i.includes("representation"),
|
|
394
393
|
u(
|
|
395
394
|
I.representation[I.representation.length - 2],
|
|
396
|
-
|
|
395
|
+
j.data
|
|
397
396
|
)
|
|
398
397
|
), b = _(
|
|
399
398
|
e,
|
|
@@ -409,7 +408,7 @@ const I = {
|
|
|
409
408
|
folder: r,
|
|
410
409
|
task: f,
|
|
411
410
|
product: T,
|
|
412
|
-
version:
|
|
411
|
+
version: j,
|
|
413
412
|
representation: F,
|
|
414
413
|
workfile: b
|
|
415
414
|
};
|
|
@@ -428,7 +427,7 @@ const I = {
|
|
|
428
427
|
skip: t
|
|
429
428
|
}
|
|
430
429
|
), u = E(() => p?.pages.flatMap((f) => f.entities) || [], [p]), k = E(
|
|
431
|
-
() =>
|
|
430
|
+
() => De(u, e, a),
|
|
432
431
|
[u, e, a]
|
|
433
432
|
);
|
|
434
433
|
return {
|
|
@@ -457,7 +456,7 @@ const I = {
|
|
|
457
456
|
rowSelection: n,
|
|
458
457
|
setEntityRowSelection: t
|
|
459
458
|
}) => {
|
|
460
|
-
const c =
|
|
459
|
+
const c = z({
|
|
461
460
|
selectedNames: {},
|
|
462
461
|
pendingNameMatches: {},
|
|
463
462
|
skipDetection: !1,
|
|
@@ -515,14 +514,14 @@ const I = {
|
|
|
515
514
|
a.skipDetection = !0, t(r, o);
|
|
516
515
|
}
|
|
517
516
|
}, [e, s, t]);
|
|
518
|
-
}, J = (e = {}) => Object.keys(e).filter((s) => e[s]),
|
|
517
|
+
}, J = (e = {}) => Object.keys(e).filter((s) => e[s]), qe = ({
|
|
519
518
|
entityHierarchy: e,
|
|
520
519
|
entityData: s,
|
|
521
520
|
rowSelection: n,
|
|
522
521
|
setEntityRowSelection: t,
|
|
523
522
|
initialSelection: c
|
|
524
523
|
}) => {
|
|
525
|
-
const a =
|
|
524
|
+
const a = z(null);
|
|
526
525
|
N(() => {
|
|
527
526
|
const i = a.current ??= Object.fromEntries(
|
|
528
527
|
e.map((o) => [o, new Set(J(c?.[o]))])
|
|
@@ -544,7 +543,7 @@ const I = {
|
|
|
544
543
|
);
|
|
545
544
|
}
|
|
546
545
|
}, [e, s, n, t, c]);
|
|
547
|
-
},
|
|
546
|
+
}, He = 600, Ue = S.div`
|
|
548
547
|
display: grid;
|
|
549
548
|
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
|
550
549
|
gap: var(--base-gap-large);
|
|
@@ -561,10 +560,10 @@ const I = {
|
|
|
561
560
|
}
|
|
562
561
|
}
|
|
563
562
|
}
|
|
564
|
-
`,
|
|
565
|
-
const s = Fe(), n = Re(), t = /* @__PURE__ */ w(
|
|
566
|
-
return s?.projectName !== e.projectName ? /* @__PURE__ */ w(
|
|
567
|
-
},
|
|
563
|
+
`, Tt = (e) => {
|
|
564
|
+
const s = Fe(), n = Re(), t = /* @__PURE__ */ w(Xe, { ...e });
|
|
565
|
+
return s?.projectName !== e.projectName ? /* @__PURE__ */ w(je, { projectName: e.projectName, children: /* @__PURE__ */ w(X, { projectName: e.projectName, children: t }) }) : n?.projectName !== e.projectName ? /* @__PURE__ */ w(X, { projectName: e.projectName, children: t }) : t;
|
|
566
|
+
}, Xe = ({
|
|
568
567
|
projectName: e,
|
|
569
568
|
entityType: s,
|
|
570
569
|
initialSelection: n,
|
|
@@ -589,9 +588,9 @@ const I = {
|
|
|
589
588
|
version: n?.version || {},
|
|
590
589
|
representation: n?.representation || {},
|
|
591
590
|
workfile: n?.workfile || {}
|
|
592
|
-
}, [T,
|
|
593
|
-
|
|
594
|
-
...
|
|
591
|
+
}, [T, j] = L(f), F = (l, v) => {
|
|
592
|
+
j((D) => ({
|
|
593
|
+
...D,
|
|
595
594
|
[v]: l
|
|
596
595
|
}));
|
|
597
596
|
}, [b, x] = L({
|
|
@@ -602,55 +601,55 @@ const I = {
|
|
|
602
601
|
representation: void 0,
|
|
603
602
|
workfile: void 0
|
|
604
603
|
}), C = (l, v) => {
|
|
605
|
-
x((
|
|
606
|
-
...
|
|
604
|
+
x((D) => ({
|
|
605
|
+
...D,
|
|
607
606
|
[v]: l
|
|
608
607
|
}));
|
|
609
608
|
}, P = Object.fromEntries(
|
|
610
609
|
Object.entries(T).map(([l, v]) => [
|
|
611
610
|
l,
|
|
612
|
-
Object.keys(v).filter((
|
|
611
|
+
Object.keys(v).filter((D) => v[D])
|
|
613
612
|
])
|
|
614
|
-
), R = I[s], K = !!d && R.includes("product"), [
|
|
613
|
+
), R = I[s], K = !!d && R.includes("product"), [G, oe] = L(g), O = Ae({
|
|
615
614
|
entityType: s,
|
|
616
615
|
projectName: e,
|
|
617
616
|
search: b,
|
|
618
617
|
selection: P,
|
|
619
|
-
reviewablesOnly: K &&
|
|
618
|
+
reviewablesOnly: K && G,
|
|
620
619
|
includeTask: r
|
|
621
|
-
}),
|
|
622
|
-
const v =
|
|
620
|
+
}), W = h && s === "version" ? O.version.data.filter((l) => "hasReviewables" in l && l.hasReviewables === !1).map((l) => l.id) : [], Y = W.length > 0 ? Array.from(/* @__PURE__ */ new Set([...o, ...W])) : o, ne = (l) => W.includes(l) ? "Version has no reviewables" : m?.(l), se = (l) => {
|
|
621
|
+
const v = O[l];
|
|
623
622
|
v?.hasNextPage && !v.isFetchingNextPage && v.fetchNextPage?.();
|
|
624
623
|
}, [re, ae] = Ve({
|
|
625
624
|
foldersSelection: f.folder,
|
|
626
|
-
foldersData:
|
|
625
|
+
foldersData: O.folder
|
|
627
626
|
});
|
|
628
627
|
Qe({
|
|
629
628
|
entityHierarchy: R,
|
|
630
|
-
entityData:
|
|
629
|
+
entityData: O,
|
|
631
630
|
rowSelection: T,
|
|
632
631
|
setEntityRowSelection: F
|
|
633
|
-
}),
|
|
632
|
+
}), qe({
|
|
634
633
|
entityHierarchy: R,
|
|
635
|
-
entityData:
|
|
634
|
+
entityData: O,
|
|
636
635
|
rowSelection: T,
|
|
637
636
|
setEntityRowSelection: F,
|
|
638
637
|
initialSelection: n
|
|
639
638
|
});
|
|
640
|
-
const V = (l, v,
|
|
641
|
-
const $ =
|
|
639
|
+
const V = (l, v, D) => {
|
|
640
|
+
const $ = D || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0, q = {
|
|
642
641
|
...l,
|
|
643
642
|
isDisabled: $,
|
|
644
643
|
disabledMessage: ce
|
|
645
644
|
};
|
|
646
|
-
return l.subRows && l.subRows.length > 0 && (
|
|
645
|
+
return l.subRows && l.subRows.length > 0 && (q.subRows = l.subRows.map(
|
|
647
646
|
(de) => V(de, v, $)
|
|
648
|
-
)),
|
|
649
|
-
}, ie = (l) => !
|
|
650
|
-
const v =
|
|
647
|
+
)), q;
|
|
648
|
+
}, ie = (l) => !Y || Y.length === 0 ? l : l.map((v) => V(v, Y, !1)), Q = (l) => {
|
|
649
|
+
const v = O[s].data;
|
|
651
650
|
c(
|
|
652
651
|
l,
|
|
653
|
-
l.map((
|
|
652
|
+
l.map((D) => v.find(($) => $.id === D))
|
|
654
653
|
);
|
|
655
654
|
}, le = () => {
|
|
656
655
|
if (!P[s]?.length)
|
|
@@ -666,11 +665,11 @@ const I = {
|
|
|
666
665
|
header: `Select ${Z(s)}`,
|
|
667
666
|
isOpen: !0,
|
|
668
667
|
size: "full",
|
|
669
|
-
style: { height: "80vh", maxWidth: R.length *
|
|
668
|
+
style: { height: "80vh", maxWidth: R.length * He },
|
|
670
669
|
footer: /* @__PURE__ */ B(ue, { children: [
|
|
671
|
-
a && i && /* @__PURE__ */ w(
|
|
670
|
+
a && i && /* @__PURE__ */ w(H, { label: "Move to root", variant: "text", onClick: i }),
|
|
672
671
|
/* @__PURE__ */ w(
|
|
673
|
-
|
|
672
|
+
H,
|
|
674
673
|
{
|
|
675
674
|
label: `Select ${s}${t ? "s" : ""}`,
|
|
676
675
|
variant: "filled",
|
|
@@ -685,8 +684,8 @@ const I = {
|
|
|
685
684
|
ke,
|
|
686
685
|
{
|
|
687
686
|
label: "Show reviewables only",
|
|
688
|
-
value:
|
|
689
|
-
onClick: () => oe(!
|
|
687
|
+
value: G,
|
|
688
|
+
onClick: () => oe(!G),
|
|
690
689
|
style: {
|
|
691
690
|
width: "fit-content",
|
|
692
691
|
marginLeft: "auto",
|
|
@@ -694,7 +693,7 @@ const I = {
|
|
|
694
693
|
}
|
|
695
694
|
}
|
|
696
695
|
),
|
|
697
|
-
/* @__PURE__ */ w(
|
|
696
|
+
/* @__PURE__ */ w(Ue, { children: R.map((l) => /* @__PURE__ */ w(
|
|
698
697
|
ge,
|
|
699
698
|
{
|
|
700
699
|
rowSelection: T[l] || {},
|
|
@@ -702,12 +701,12 @@ const I = {
|
|
|
702
701
|
expanded: l === "folder" ? re : void 0,
|
|
703
702
|
setExpanded: l === "folder" ? ae : void 0,
|
|
704
703
|
children: /* @__PURE__ */ w(
|
|
705
|
-
|
|
704
|
+
Ye,
|
|
706
705
|
{
|
|
707
706
|
entityType: l,
|
|
708
707
|
projectName: e,
|
|
709
708
|
search: b[l],
|
|
710
|
-
tableData: ie(
|
|
709
|
+
tableData: ie(O[l]?.table || []),
|
|
711
710
|
isFolderHierarchy: l === "folder" && !b.folder,
|
|
712
711
|
onSearch: (v) => C(v, l),
|
|
713
712
|
isMultiSelect: l === s ? !!t : !0,
|
|
@@ -724,8 +723,8 @@ const I = {
|
|
|
724
723
|
);
|
|
725
724
|
};
|
|
726
725
|
export {
|
|
727
|
-
|
|
726
|
+
Tt as E,
|
|
728
727
|
Me as T,
|
|
729
728
|
I as e,
|
|
730
|
-
|
|
729
|
+
ze as u
|
|
731
730
|
};
|