@ynput/ayon-frontend-shared 0.6.4 → 0.6.5
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 +480 -477
- package/dist/ListTable.es.js +24 -25
- package/dist/NewEntity.es.js +6 -7
- package/dist/ProjectTreeTable.es.js +2016 -1996
- package/dist/Views.es.js +28 -28
- package/dist/api.es.js +291 -289
- package/dist/chunks/Actions.es.js +12 -12
- package/dist/chunks/ColumnDropIndicator.es.js +8 -9
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
- package/dist/chunks/DetailsDialog.es.js +1 -1
- package/dist/chunks/EmptyPlaceholder.es.js +13 -12
- package/dist/chunks/EntityPath.es.js +67 -67
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +8 -8
- package/dist/chunks/Feed.es.js +75 -76
- package/dist/chunks/MetaWidget.es.js +1283 -1279
- package/dist/chunks/PlayableIcon.es.js +458 -451
- package/dist/chunks/ProjectContext.es.js +20 -20
- package/dist/chunks/RepresentationsList.es.js +9 -9
- package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
- package/dist/chunks/Slicer.es.js +68 -69
- package/dist/chunks/ThumbnailSimple.es.js +4 -4
- package/dist/chunks/Watchers.es.js +104 -105
- package/dist/chunks/activeEntities.es.js +58 -0
- package/dist/chunks/columnConfigConverter.es.js +57 -63
- package/dist/chunks/getUris.es.js +886 -831
- package/dist/chunks/iconUtils.es.js +151 -0
- package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
- package/dist/chunks/searchTerms.es.js +329 -247
- package/dist/chunks/useAttributeEnums.es.js +34 -34
- package/dist/chunks/viewUpdateHelper.es.js +11 -11
- package/dist/components.es.js +340 -337
- package/dist/context.es.js +48 -48
- package/dist/hooks.es.js +34 -34
- package/dist/index.es.js +1 -1
- package/dist/types/ContextMenu.d.ts +1 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +4 -1
- package/dist/types/SimpleTable.d.ts +1 -1
- package/dist/types/Slicer.d.ts +5 -5
- package/dist/types/Views.d.ts +4 -4
- package/dist/types/api.d.ts +545 -171
- package/dist/types/components.d.ts +64 -9
- package/dist/types/context.d.ts +5 -5
- package/dist/types/util.d.ts +237 -2
- package/dist/util.es.js +127 -114
- package/package.json +1 -1
- package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
- package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as R, jsx as t, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as _, useState as x, useEffect as le, useLayoutEffect as ae, createElement as
|
|
2
|
+
import { useRef as _, useState as x, useEffect as le, useLayoutEffect as ae, createElement as he, Fragment as ke } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { dr as Me, bX as Ue, c9 as Fe, dd as Te, b0 as Le, aP as We, aK as Ve, dh as Ne } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
|
-
import { useSensors as $e, useSensor as
|
|
6
|
+
import { useSensors as $e, useSensor as me, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as Ke, DragOverlay as Ze } from "@dnd-kit/core";
|
|
7
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, e as
|
|
8
|
+
import { D as ze, R as Re, e as Xe, g as Je, L as Ye, h as oe, i as je, j as et, T as tt, k as ge, U as nt, P as rt, C as it, l as at, S as X, M as ve, m as be, n as J, o as ye, p as ot, F as st } from "./Watchers.es.js";
|
|
9
9
|
import { CSS as lt } from "@dnd-kit/utilities";
|
|
10
10
|
import { toast as A } 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";
|
|
14
14
|
import { camelCase as ut, upperFirst as pt } from "lodash";
|
|
15
|
-
import { Icon as Ce, Dialog as Se, InputText as xe, Toolbar as ft, Button as ce, SaveButton as
|
|
15
|
+
import { Icon as Ce, Dialog as Se, InputText as xe, Toolbar as ft, Button as ce, SaveButton as ht, FormRow as mt } from "@ynput/ayon-react-components";
|
|
16
16
|
import "@module-federation/enhanced/runtime";
|
|
17
17
|
import { v as Ee } from "./DeleteEntitiesContextInstance.es.js";
|
|
18
18
|
import "semver";
|
|
@@ -57,7 +57,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
57
57
|
(n) => n.processing && !a.find((I) => I.activityId === n.activityId) && i
|
|
58
58
|
), s = u.filter(
|
|
59
59
|
(n) => n.processing?.eventId
|
|
60
|
-
),
|
|
60
|
+
), h = u.filter(
|
|
61
61
|
(n) => !n.processing?.eventId
|
|
62
62
|
).filter(
|
|
63
63
|
(n) => n.availability === "conversionRequired"
|
|
@@ -66,7 +66,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
66
66
|
playable: a,
|
|
67
67
|
incompatible: y,
|
|
68
68
|
processing: s,
|
|
69
|
-
queued:
|
|
69
|
+
queued: h
|
|
70
70
|
};
|
|
71
71
|
}, xt = ({
|
|
72
72
|
onClose: r,
|
|
@@ -83,9 +83,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
83
83
|
f("");
|
|
84
84
|
};
|
|
85
85
|
}, [i, u.current]);
|
|
86
|
-
const [
|
|
86
|
+
const [h, { isLoading: n }] = Me(), I = async () => {
|
|
87
87
|
try {
|
|
88
|
-
await
|
|
88
|
+
await h({
|
|
89
89
|
projectName: a,
|
|
90
90
|
versionId: d,
|
|
91
91
|
activityId: g,
|
|
@@ -98,18 +98,18 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
98
98
|
}
|
|
99
99
|
}, E = (v) => {
|
|
100
100
|
v.preventDefault(), s && I();
|
|
101
|
-
},
|
|
101
|
+
}, m = () => {
|
|
102
102
|
f(""), r();
|
|
103
103
|
};
|
|
104
104
|
return /* @__PURE__ */ t(
|
|
105
105
|
Se,
|
|
106
106
|
{
|
|
107
107
|
onClose: r,
|
|
108
|
-
header: /* @__PURE__ */ t(
|
|
108
|
+
header: /* @__PURE__ */ t(Xe, { children: `Editing label: ${i}` }),
|
|
109
109
|
footer: /* @__PURE__ */ R(ft, { children: [
|
|
110
|
-
/* @__PURE__ */ t(ce, { label: "Cancel", onClick:
|
|
110
|
+
/* @__PURE__ */ t(ce, { label: "Cancel", onClick: m, variant: "text" }),
|
|
111
111
|
/* @__PURE__ */ t(
|
|
112
|
-
|
|
112
|
+
ht,
|
|
113
113
|
{
|
|
114
114
|
label: "Save",
|
|
115
115
|
active: !!s,
|
|
@@ -142,19 +142,19 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
142
142
|
isLoadingVersion: d,
|
|
143
143
|
scope: g
|
|
144
144
|
}) => {
|
|
145
|
-
const { onOpenViewer: y, user: u, viewer: s, dispatch: f } = Ee(), { data:
|
|
145
|
+
const { onOpenViewer: y, user: u, viewer: s, dispatch: f } = Ee(), { data: h, isLoading: n } = Ue({ projectName: r }, { skip: !r }), I = u.data?.isManager || u.data?.isAdmin || !n && (!h?.activities?.enabled || !!h?.activities?.activities?.includes("reviewable")), {
|
|
146
146
|
data: E,
|
|
147
|
-
isFetching:
|
|
147
|
+
isFetching: m,
|
|
148
148
|
currentData: v
|
|
149
149
|
} = Fe(
|
|
150
150
|
{ projectName: r, versionId: i },
|
|
151
151
|
{ skip: !i || !r }
|
|
152
|
-
), P = !1,
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
), P = !1, V = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, W] = x(null), [M, p] = x(null), c = $e(
|
|
153
|
+
me(Ae),
|
|
154
|
+
me(Oe, {
|
|
155
155
|
coordinateGetter: Be
|
|
156
156
|
})
|
|
157
|
-
), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, K =
|
|
157
|
+
), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, K = m && i !== $ || d, N = (e) => {
|
|
158
158
|
if (M) return console.log("Dragging, cannot open review");
|
|
159
159
|
const o = e.currentTarget.id;
|
|
160
160
|
if (!o || !a) return console.error("No reviewable id or product id");
|
|
@@ -239,7 +239,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
239
239
|
};
|
|
240
240
|
return /* @__PURE__ */ R(Q, { children: [
|
|
241
241
|
/* @__PURE__ */ t(
|
|
242
|
-
|
|
242
|
+
Je,
|
|
243
243
|
{
|
|
244
244
|
projectName: r,
|
|
245
245
|
versionId: i,
|
|
@@ -268,11 +268,11 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
268
268
|
{
|
|
269
269
|
projectName: r,
|
|
270
270
|
onClick: N,
|
|
271
|
-
isSelected:
|
|
271
|
+
isSelected: V.includes(e.fileId),
|
|
272
272
|
isDragging: !!M,
|
|
273
273
|
onContextMenu: G,
|
|
274
274
|
onEdit: (o) => {
|
|
275
|
-
o.stopPropagation(),
|
|
275
|
+
o.stopPropagation(), W(e.activityId);
|
|
276
276
|
},
|
|
277
277
|
...e
|
|
278
278
|
},
|
|
@@ -287,7 +287,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
287
287
|
projectName: r,
|
|
288
288
|
isDragOverlay: !0,
|
|
289
289
|
isDragging: !0,
|
|
290
|
-
isSelected:
|
|
290
|
+
isSelected: V.includes(C.fileId)
|
|
291
291
|
}
|
|
292
292
|
) : null })
|
|
293
293
|
]
|
|
@@ -331,7 +331,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
331
331
|
xt,
|
|
332
332
|
{
|
|
333
333
|
isOpen: !0,
|
|
334
|
-
onClose: () =>
|
|
334
|
+
onClose: () => W(null),
|
|
335
335
|
label: b.find((e) => e.activityId === k)?.label || "",
|
|
336
336
|
projectName: r,
|
|
337
337
|
versionId: i,
|
|
@@ -355,28 +355,28 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
355
355
|
}, [g]), le(() => {
|
|
356
356
|
if (i && y.current && s.startsWith(de) && !u.current) {
|
|
357
357
|
y.current.focus();
|
|
358
|
-
const
|
|
359
|
-
y.current.setSelectionRange(
|
|
358
|
+
const m = de.length, v = s.length;
|
|
359
|
+
y.current.setSelectionRange(m, v), u.current = !0;
|
|
360
360
|
} else i || (u.current = !1);
|
|
361
361
|
}, [i, s]);
|
|
362
|
-
const
|
|
362
|
+
const h = () => {
|
|
363
363
|
s.trim() && d && d(s.trim());
|
|
364
364
|
}, n = () => {
|
|
365
365
|
f(g), a && a();
|
|
366
366
|
}, I = s.trim().length > 0;
|
|
367
367
|
return /* @__PURE__ */ t(Se, { isOpen: i, onClose: n, header: "Upload Entity", footer: /* @__PURE__ */ R("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end" }, children: [
|
|
368
368
|
/* @__PURE__ */ t(ce, { variant: "text", onClick: n, children: "Cancel" }),
|
|
369
|
-
/* @__PURE__ */ t(ce, { variant: "filled", onClick:
|
|
370
|
-
] }), size: "sm", children: /* @__PURE__ */ t("div", { style: { padding: "16px 0" }, children: /* @__PURE__ */ t(
|
|
369
|
+
/* @__PURE__ */ t(ce, { variant: "filled", onClick: h, disabled: !I, children: "Upload" })
|
|
370
|
+
] }), size: "sm", children: /* @__PURE__ */ t("div", { style: { padding: "16px 0" }, children: /* @__PURE__ */ t(mt, { label: "Product Name", children: /* @__PURE__ */ t(
|
|
371
371
|
xe,
|
|
372
372
|
{
|
|
373
373
|
ref: y,
|
|
374
374
|
placeholder: "Enter product name...",
|
|
375
375
|
value: s,
|
|
376
|
-
onChange: (
|
|
376
|
+
onChange: (m) => f(m.target.value),
|
|
377
377
|
autoFocus: !0,
|
|
378
|
-
onKeyDown: (
|
|
379
|
-
|
|
378
|
+
onKeyDown: (m) => {
|
|
379
|
+
m.key === "Enter" && I ? (m.preventDefault(), h()) : m.key === "Escape" && (m.preventDefault(), n());
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
) }) }) });
|
|
@@ -392,7 +392,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
392
392
|
versionsInputRef: y,
|
|
393
393
|
onVersionCreated: u
|
|
394
394
|
}) => {
|
|
395
|
-
const { dispatch: s } = Ee(), f = Dt(), [
|
|
395
|
+
const { dispatch: s } = Ee(), f = Dt(), [h, n] = x(!1), [I, E] = x(null), m = _(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, $ = p?.id, q = !!(p && i !== "representation"), { handleFileUpload: K } = je({
|
|
396
396
|
projectName: d,
|
|
397
397
|
versionId: $,
|
|
398
398
|
taskId: c,
|
|
@@ -406,9 +406,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
406
406
|
F(e);
|
|
407
407
|
}
|
|
408
408
|
}), N = kt.filter((e) => e.id === "version" ? q : !0), w = () => {
|
|
409
|
-
P(null), n(!1), E(null),
|
|
409
|
+
P(null), n(!1), E(null), m.current = 0, F(0), k(!1), M(null);
|
|
410
410
|
}, Z = async (e) => {
|
|
411
|
-
if (!
|
|
411
|
+
if (!W || !p) {
|
|
412
412
|
k(!1), M(null);
|
|
413
413
|
return;
|
|
414
414
|
}
|
|
@@ -430,13 +430,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
430
430
|
// default product type for uploaded files
|
|
431
431
|
productBaseType: "review"
|
|
432
432
|
});
|
|
433
|
-
k(!1), await z(
|
|
433
|
+
k(!1), await z(W, l.id), M(null);
|
|
434
434
|
} catch (l) {
|
|
435
435
|
we(l, "creating product"), w();
|
|
436
436
|
}
|
|
437
437
|
}, Y = () => {
|
|
438
438
|
k(!1), M(null), w();
|
|
439
|
-
}, [j] =
|
|
439
|
+
}, [j] = We(), [ee] = Ve(), H = async (e) => {
|
|
440
440
|
if (!q || !p)
|
|
441
441
|
return A.error("Please select exactly one version to upload reviewables"), w();
|
|
442
442
|
if (f) {
|
|
@@ -511,13 +511,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
511
511
|
console.error(o), A.error(o.message), w();
|
|
512
512
|
}
|
|
513
513
|
}, [pe] = Ne(), te = (e) => {
|
|
514
|
-
e.preventDefault(),
|
|
514
|
+
e.preventDefault(), m.current++, m.current === 1 && n(!0);
|
|
515
515
|
}, ne = (e) => {
|
|
516
|
-
e.preventDefault(),
|
|
516
|
+
e.preventDefault(), m.current--, m.current === 0 && (n(!1), E(null));
|
|
517
517
|
}, re = (e) => {
|
|
518
518
|
e.preventDefault();
|
|
519
519
|
}, ie = (e) => {
|
|
520
|
-
if (e.preventDefault(),
|
|
520
|
+
if (e.preventDefault(), m.current = 0, n(!1), E(null), !(!e.dataTransfer.files || e.dataTransfer.files.length === 0)) {
|
|
521
521
|
if (I === "thumbnail") {
|
|
522
522
|
P("thumbnail");
|
|
523
523
|
const o = e.dataTransfer.files[0];
|
|
@@ -537,14 +537,14 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
537
537
|
/* @__PURE__ */ R(
|
|
538
538
|
et,
|
|
539
539
|
{
|
|
540
|
-
className: ue({ dragging:
|
|
540
|
+
className: ue({ dragging: h }),
|
|
541
541
|
onDragEnter: te,
|
|
542
542
|
onDragLeave: ne,
|
|
543
543
|
onDragOver: re,
|
|
544
544
|
onDrop: ie,
|
|
545
545
|
children: [
|
|
546
546
|
/* @__PURE__ */ t(tt, { children: /* @__PURE__ */ t("div", { children: r }) }),
|
|
547
|
-
|
|
547
|
+
h && /* @__PURE__ */ t(ge, { children: N.map((e) => /* @__PURE__ */ t(
|
|
548
548
|
Rt,
|
|
549
549
|
{
|
|
550
550
|
id: e.id,
|
|
@@ -562,7 +562,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
562
562
|
rt,
|
|
563
563
|
{
|
|
564
564
|
style: {
|
|
565
|
-
right: `${100 -
|
|
565
|
+
right: `${100 - V}%`
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
),
|
|
@@ -593,7 +593,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
593
593
|
Pt,
|
|
594
594
|
{
|
|
595
595
|
isOpen: O,
|
|
596
|
-
files:
|
|
596
|
+
files: W,
|
|
597
597
|
onSubmit: Z,
|
|
598
598
|
onCancel: Y
|
|
599
599
|
}
|
|
@@ -611,12 +611,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
611
611
|
entityType: y,
|
|
612
612
|
scope: u
|
|
613
613
|
}) => {
|
|
614
|
-
const s = _(null), [f,
|
|
614
|
+
const s = _(null), [f, h] = x(null), [n, I] = x(null), [E, m] = x(!1), v = _(null);
|
|
615
615
|
ae(() => {
|
|
616
|
-
I(null),
|
|
616
|
+
I(null), m(!0);
|
|
617
617
|
}, [a]), ae(() => {
|
|
618
618
|
if (!s.current) {
|
|
619
|
-
|
|
619
|
+
m(!1);
|
|
620
620
|
return;
|
|
621
621
|
}
|
|
622
622
|
const c = s.current, b = c.clientWidth, C = De(c);
|
|
@@ -630,46 +630,46 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
630
630
|
let w = Array.from($).slice(0, N).filter(
|
|
631
631
|
(Z) => Z.nodeType === Node.ELEMENT_NODE && Z.className.includes("full")
|
|
632
632
|
)?.length || 2;
|
|
633
|
-
w = Math.max(w, 1), I(w),
|
|
633
|
+
w = Math.max(w, 1), I(w), m(!1);
|
|
634
634
|
}, [s.current, E]), ae(() => {
|
|
635
635
|
if (!s.current || !v.current || !n) return;
|
|
636
636
|
const c = s.current, b = De(c) ?? 1 / 0, C = c.clientWidth - b;
|
|
637
637
|
C <= 0 || v.current.clientWidth - C;
|
|
638
638
|
}, [n]);
|
|
639
|
-
const P = n && a.length > n ? a.slice(-n) : a,
|
|
640
|
-
i &&
|
|
639
|
+
const P = n && a.length > n ? a.slice(-n) : a, V = n && a.length > n ? a.slice(0, -n) : [];
|
|
640
|
+
i && V.unshift({ type: "project", label: r, id: r });
|
|
641
641
|
let F, O = P;
|
|
642
642
|
y === "version" && a.length > 0 && (F = a[a.length - 1], O = P.slice(0, -1));
|
|
643
643
|
const k = (c) => {
|
|
644
644
|
const [, b] = Ie(c);
|
|
645
|
-
b && !f &&
|
|
646
|
-
},
|
|
645
|
+
b && !f && h(b);
|
|
646
|
+
}, W = () => h(null), M = (c) => {
|
|
647
647
|
const [b, C] = Ie(c);
|
|
648
648
|
if (!Mt.includes(C)) return;
|
|
649
|
-
!!b.closest("li") ?
|
|
649
|
+
!!b.closest("li") ? h(null) : f !== C && h(C);
|
|
650
650
|
}, p = { scope: u, projectName: r };
|
|
651
651
|
return /* @__PURE__ */ R(at, { className: ue({ loading: g }), id: "entity-path", ref: s, children: [
|
|
652
|
-
!i && /* @__PURE__ */ t(
|
|
653
|
-
!!
|
|
652
|
+
!i && /* @__PURE__ */ t(X, { children: r }),
|
|
653
|
+
!!V.length && /* @__PURE__ */ R(Q, { children: [
|
|
654
654
|
!i && /* @__PURE__ */ t(se, {}),
|
|
655
655
|
/* @__PURE__ */ R(
|
|
656
|
-
|
|
656
|
+
X,
|
|
657
657
|
{
|
|
658
658
|
className: "dropdown more",
|
|
659
659
|
id: "more",
|
|
660
660
|
onMouseEnter: k,
|
|
661
|
-
onMouseLeave:
|
|
661
|
+
onMouseLeave: W,
|
|
662
662
|
onClick: M,
|
|
663
663
|
children: [
|
|
664
664
|
"...",
|
|
665
|
-
f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children:
|
|
665
|
+
f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: V.map((c) => /* @__PURE__ */ he(J, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
|
|
666
666
|
]
|
|
667
667
|
}
|
|
668
668
|
)
|
|
669
669
|
] }),
|
|
670
670
|
O.map((c) => /* @__PURE__ */ R(ke, { children: [
|
|
671
671
|
/* @__PURE__ */ t(se, {}),
|
|
672
|
-
/* @__PURE__ */ t(
|
|
672
|
+
/* @__PURE__ */ t(J, { ...p, segment: c, className: "full", children: /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t("span", { className: "label", children: c.label }) }) })
|
|
673
673
|
] }, c.id)),
|
|
674
674
|
F && /* @__PURE__ */ R(Q, { children: [
|
|
675
675
|
/* @__PURE__ */ t(se, {}),
|
|
@@ -679,22 +679,22 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
679
679
|
className: "full dropdown",
|
|
680
680
|
id: "versions",
|
|
681
681
|
onMouseEnter: k,
|
|
682
|
-
onMouseLeave:
|
|
682
|
+
onMouseLeave: W,
|
|
683
683
|
onClick: M,
|
|
684
684
|
children: [
|
|
685
685
|
/* @__PURE__ */ t(
|
|
686
|
-
|
|
686
|
+
J,
|
|
687
687
|
{
|
|
688
688
|
...p,
|
|
689
689
|
segment: F,
|
|
690
690
|
isOpen: f === "versions",
|
|
691
|
-
children: /* @__PURE__ */ R(
|
|
691
|
+
children: /* @__PURE__ */ R(X, { children: [
|
|
692
692
|
/* @__PURE__ */ t(st, { ref: v, className: "label", children: F.label }),
|
|
693
693
|
/* @__PURE__ */ t(Ce, { icon: "expand_more" })
|
|
694
694
|
] })
|
|
695
695
|
}
|
|
696
696
|
),
|
|
697
|
-
f === "versions" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: d.map((c) => /* @__PURE__ */
|
|
697
|
+
f === "versions" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: d.map((c) => /* @__PURE__ */ he(J, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
|
|
698
698
|
]
|
|
699
699
|
}
|
|
700
700
|
)
|
|
@@ -703,8 +703,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
703
703
|
}, De = (r) => {
|
|
704
704
|
const i = r.parentElement;
|
|
705
705
|
if (!i) return;
|
|
706
|
-
const a = getComputedStyle(i), d = parseInt(a.paddingLeft) || 0, g = parseInt(a.paddingRight) || 0, y = parseInt(a.gap) || 0, u = i.clientWidth - d - g, s = Array.from(i.children).filter((
|
|
707
|
-
(
|
|
706
|
+
const a = getComputedStyle(i), d = parseInt(a.paddingLeft) || 0, g = parseInt(a.paddingRight) || 0, y = parseInt(a.gap) || 0, u = i.clientWidth - d - g, s = Array.from(i.children).filter((h) => h.id !== "entity-path"), f = Array.from(s).reduce(
|
|
707
|
+
(h, n) => h + n.clientWidth,
|
|
708
708
|
0
|
|
709
709
|
);
|
|
710
710
|
return u - f - y * (s.length - 1);
|
|
@@ -712,8 +712,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
712
712
|
const d = a - i;
|
|
713
713
|
let g = 0;
|
|
714
714
|
for (let s = 0; s < a - d; s++) {
|
|
715
|
-
const f = s > 1 ? s + d : s,
|
|
716
|
-
isNaN(
|
|
715
|
+
const f = s > 1 ? s + d : s, h = r[f]?.clientWidth;
|
|
716
|
+
isNaN(h) || (g += h);
|
|
717
717
|
}
|
|
718
718
|
return g + (4 * i - 1) + 40;
|
|
719
719
|
};
|
|
@@ -11,7 +11,7 @@ import { InputText as fe, theme as he, Dialog as me, SwitchButton as ge, Button
|
|
|
11
11
|
import M from "styled-components";
|
|
12
12
|
import { E as be } from "./EmptyPlaceholder.es.js";
|
|
13
13
|
import { E as V, a as ve } from "./EntityTooltip.es.js";
|
|
14
|
-
import {
|
|
14
|
+
import { cc as we } from "./getUris.es.js";
|
|
15
15
|
import "@module-federation/enhanced/runtime";
|
|
16
16
|
import { y as ke, x as xe } from "./DeleteEntitiesContextInstance.es.js";
|
|
17
17
|
import "semver";
|
|
@@ -2,7 +2,7 @@ import { jsx as I } from "react/jsx-runtime";
|
|
|
2
2
|
import { EntityCard as S } from "@ynput/ayon-react-components";
|
|
3
3
|
import U, { keyframes as W } from "styled-components";
|
|
4
4
|
import "./searchTerms.es.js";
|
|
5
|
-
import {
|
|
5
|
+
import { bE as L } from "./getUris.es.js";
|
|
6
6
|
import "primereact/confirmdialog";
|
|
7
7
|
import "react";
|
|
8
8
|
import "@module-federation/enhanced/runtime";
|
|
@@ -17,7 +17,7 @@ import "./ContextMenuContextInstance.es.js";
|
|
|
17
17
|
import "clsx";
|
|
18
18
|
import "react-dom";
|
|
19
19
|
import "react-redux";
|
|
20
|
-
const
|
|
20
|
+
const F = W`
|
|
21
21
|
from {
|
|
22
22
|
opacity: 0.4;
|
|
23
23
|
scale: 0.9;
|
|
@@ -25,7 +25,7 @@ from {
|
|
|
25
25
|
opacity: 1;
|
|
26
26
|
scale: 1;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`, G = U(S)`
|
|
29
29
|
position: fixed;
|
|
30
30
|
max-width: 220px;
|
|
31
31
|
z-index: 9999;
|
|
@@ -33,7 +33,7 @@ from {
|
|
|
33
33
|
translate: -50% calc(-100% - 4px);
|
|
34
34
|
transform-origin: bottom center;
|
|
35
35
|
|
|
36
|
-
animation: ${
|
|
36
|
+
animation: ${F} 100ms ease-out;
|
|
37
37
|
|
|
38
38
|
/* path always open */
|
|
39
39
|
.description {
|
|
@@ -42,7 +42,7 @@ from {
|
|
|
42
42
|
|
|
43
43
|
/* shadow */
|
|
44
44
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
|
45
|
-
`,
|
|
45
|
+
`, H = ["folder", "task", "version", "workfile"], nt = ({
|
|
46
46
|
entityType: t,
|
|
47
47
|
entityId: i,
|
|
48
48
|
projectName: c,
|
|
@@ -51,7 +51,7 @@ from {
|
|
|
51
51
|
onMouseEnter: d,
|
|
52
52
|
onMouseLeave: u
|
|
53
53
|
}) => {
|
|
54
|
-
const o = Y(), a = c || o?.projectName, p = !!t &&
|
|
54
|
+
const o = Y(), a = c || o?.projectName, p = !!t && H.includes(t), { data: m, isFetching: f } = L(
|
|
55
55
|
{ entityType: t, entityId: i, projectName: a },
|
|
56
56
|
{ skip: !p || !i || !a }
|
|
57
57
|
), n = 220;
|
|
@@ -81,7 +81,7 @@ from {
|
|
|
81
81
|
workfile: _("workfile")
|
|
82
82
|
};
|
|
83
83
|
return p ? /* @__PURE__ */ I(
|
|
84
|
-
|
|
84
|
+
G,
|
|
85
85
|
{
|
|
86
86
|
style: { left: e, top: l, maxWidth: n },
|
|
87
87
|
onMouseEnter: d,
|
|
@@ -101,6 +101,6 @@ from {
|
|
|
101
101
|
) : null;
|
|
102
102
|
};
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
H as E,
|
|
105
105
|
nt as a
|
|
106
106
|
};
|