@ynput/ayon-frontend-shared 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +88 -86
- package/dist/Feed.es.js +22 -22
- package/dist/ListTable.es.js +77 -67
- package/dist/ProjectTreeTable.es.js +1164 -1150
- package/dist/Slicer.es.js +2 -2
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +23 -23
- package/dist/chunks/DeleteEntitiesContext.es.js +115 -115
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/DetailsPanelContext.es.js +155 -0
- package/dist/chunks/EntityPath.es.js +20 -20
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +12 -12
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +2208 -2611
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GlobalContext.es.js +14 -14
- package/dist/chunks/Menu.es.js +1 -1
- package/dist/chunks/MenuContext.es.js +51 -242
- package/dist/chunks/MenuItem.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +3341 -3899
- package/dist/chunks/NewEntityContext.es.js +40 -40
- package/dist/chunks/PlayableIcon.es.js +4261 -1163
- package/dist/chunks/ProjectContext.es.js +13 -13
- package/dist/chunks/ProjectFoldersContext.es.js +5 -5
- package/dist/chunks/RepresentationsList.es.js +3 -3
- package/dist/chunks/ReviewablesSelector.es.js +85 -76
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +1 -1
- package/dist/chunks/Slicer.es.js +173 -171
- package/dist/chunks/TableSettingsFallback.es.js +6 -6
- package/dist/chunks/ThumbnailSimple.es.js +410 -61
- package/dist/chunks/VersionUploadContext.es.js +29 -29
- package/dist/chunks/ViewsContext.es.js +90 -90
- package/dist/chunks/Watchers.es.js +628 -598
- package/dist/chunks/entityDefinitions.es.js +31 -31
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/getBundleMode.es.js +16 -61
- package/dist/chunks/getUris.es.js +271 -269
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +177 -173
- package/dist/chunks/uriUtils.es.js +48 -0
- package/dist/chunks/useAttributeEnums.es.js +11 -11
- package/dist/chunks/useColumnDragRestriction.es.js +37 -27
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useLocalStorage.es.js +9 -9
- package/dist/chunks/useSessionStorage.es.js +61 -0
- package/dist/chunks/viewUpdateHelper.es.js +19 -19
- package/dist/components.es.js +165 -160
- package/dist/context.es.js +60 -58
- package/dist/hooks.es.js +104 -98
- package/dist/index.es.js +18 -13
- package/dist/types/Actions.d.ts +16 -16
- package/dist/types/ContextMenu.d.ts +16 -16
- package/dist/types/DetailsPanel.d.ts +16 -16
- package/dist/types/EntityPickerDialog.d.ts +16 -16
- package/dist/types/Feed.d.ts +16 -16
- package/dist/types/ListTable.d.ts +16 -16
- package/dist/types/NewEntity.d.ts +16 -16
- package/dist/types/ProjectTreeTable.d.ts +20 -16
- package/dist/types/RepresentationsList.d.ts +16 -16
- package/dist/types/SimpleTable.d.ts +16 -16
- package/dist/types/Slicer.d.ts +16 -16
- package/dist/types/Views.d.ts +17 -17
- package/dist/types/api.d.ts +391 -95
- package/dist/types/components.d.ts +79 -20
- package/dist/types/context.d.ts +60 -17
- package/dist/types/hooks.d.ts +16 -16
- package/dist/types/index.d.ts +16 -16
- package/dist/types/util.d.ts +16 -16
- package/dist/util.es.js +108 -97
- package/package.json +16 -4
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { jsx as ie } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as oe, useState as p, useCallback as c, useEffect as j } from "react";
|
|
3
|
+
import { a as re, r as ae, w as ce } from "./useLocalStorage.es.js";
|
|
4
|
+
import { D as N, c as ue } from "./MenuContext.es.js";
|
|
5
|
+
import { u as C } from "./useSessionStorage.es.js";
|
|
6
|
+
import "lodash";
|
|
7
|
+
import "primereact/confirmdialog";
|
|
8
|
+
import "react-toastify";
|
|
9
|
+
import "uuid";
|
|
10
|
+
import { g as le } from "./getBundleMode.es.js";
|
|
11
|
+
import "./searchTerms.es.js";
|
|
12
|
+
const pe = ["feed", "subtasks", "details", "files"], U = (e) => typeof e == "string" && pe.includes(e), Le = (e) => {
|
|
13
|
+
const { startFrame: i, endFrame: r } = e.activityData || {}, o = e.origin?.id ?? e.entityId;
|
|
14
|
+
if (!Number.isSafeInteger(i) || !o) return null;
|
|
15
|
+
const s = i, u = Number.isSafeInteger(r) ? Math.max(s, r) : s;
|
|
16
|
+
return { entityId: o, startFrame: s, endFrame: u };
|
|
17
|
+
}, Oe = ({
|
|
18
|
+
children: e,
|
|
19
|
+
defaultTab: i = "feed",
|
|
20
|
+
hasLicense: r,
|
|
21
|
+
debug: o = {},
|
|
22
|
+
...s
|
|
23
|
+
}) => {
|
|
24
|
+
const u = s.user, m = le(u), f = "isGuest" in o ? o.isGuest : u?.data?.isGuest, { powerLicense: b, setPowerpackDialog: D } = re(), d = "hasLicense" in o ? o.hasLicense : !!b || r, [a, v] = p({}), [_, G] = p([]), [M, R] = p([]), Y = c(
|
|
25
|
+
(t) => a[t] ? a[t] : !1,
|
|
26
|
+
[a]
|
|
27
|
+
), H = c(
|
|
28
|
+
(t, l) => {
|
|
29
|
+
const n = { ...a };
|
|
30
|
+
n[t] = l, v(n);
|
|
31
|
+
},
|
|
32
|
+
[a]
|
|
33
|
+
), [S, K] = C(T, {}), q = c(
|
|
34
|
+
(t) => {
|
|
35
|
+
const l = S[t];
|
|
36
|
+
return U(l) ? l : i;
|
|
37
|
+
},
|
|
38
|
+
[S, i]
|
|
39
|
+
), [w, I] = p(null), z = c((t) => {
|
|
40
|
+
I(t);
|
|
41
|
+
}, []), E = c(() => {
|
|
42
|
+
I(null), w && O([]);
|
|
43
|
+
}, []);
|
|
44
|
+
j(() => {
|
|
45
|
+
E();
|
|
46
|
+
}, [s.useLocation().pathname]);
|
|
47
|
+
const [J, B] = p(null), Q = c((t) => {
|
|
48
|
+
B(t);
|
|
49
|
+
}, []), V = c(() => {
|
|
50
|
+
B(null);
|
|
51
|
+
}, []), [W, L] = p(null), [X, O] = p([]), { uriType: Z, uri: $, entity: y, getUriEntities: ee } = ue(), [g] = s.useSearchParams(), P = g.get("project"), h = g.get("type"), F = g.get("id"), A = g.get("activity");
|
|
52
|
+
j(() => {
|
|
53
|
+
if (!(!P && !h && !F)) {
|
|
54
|
+
if (Z === "entity" && y && y.entityType !== "product") {
|
|
55
|
+
ee().then((t) => {
|
|
56
|
+
if (t.length === 0) return;
|
|
57
|
+
const l = t.find((ne) => ne.uri === $), n = l?.entities?.[0];
|
|
58
|
+
if (!l || !n) return;
|
|
59
|
+
const k = n?.projectName || y.projectName || "", x = n.representationId || n.versionId || n.productId || n.taskId || n.folderId;
|
|
60
|
+
if (!k || !x) return;
|
|
61
|
+
const se = {
|
|
62
|
+
entityType: y.entityType,
|
|
63
|
+
entities: [
|
|
64
|
+
{
|
|
65
|
+
id: x,
|
|
66
|
+
projectName: k
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
source: "uri"
|
|
70
|
+
};
|
|
71
|
+
L(se);
|
|
72
|
+
}).catch((t) => {
|
|
73
|
+
console.warn("Failed to get URI entities:", t);
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
P && h && F && (L({
|
|
78
|
+
entityType: h,
|
|
79
|
+
entities: [
|
|
80
|
+
{
|
|
81
|
+
id: F,
|
|
82
|
+
projectName: P
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
source: "url"
|
|
86
|
+
}), A && (O([A]), K({
|
|
87
|
+
...S,
|
|
88
|
+
overview: "feed"
|
|
89
|
+
})));
|
|
90
|
+
}
|
|
91
|
+
}, [P, h, F]);
|
|
92
|
+
const te = {
|
|
93
|
+
// open state for the panel by scope
|
|
94
|
+
panelOpenByScope: a,
|
|
95
|
+
getOpenForScope: Y,
|
|
96
|
+
setPanelOpen: H,
|
|
97
|
+
setPanelOpenByScope: v,
|
|
98
|
+
// tab preferences
|
|
99
|
+
tabsByScope: S,
|
|
100
|
+
getTabForScope: q,
|
|
101
|
+
// slide out state
|
|
102
|
+
slideOut: w,
|
|
103
|
+
openSlideOut: z,
|
|
104
|
+
closeSlideOut: E,
|
|
105
|
+
// highlighted activities
|
|
106
|
+
highlightedActivities: X,
|
|
107
|
+
setHighlightedActivities: O,
|
|
108
|
+
// PiP state
|
|
109
|
+
pip: J,
|
|
110
|
+
openPip: Q,
|
|
111
|
+
closePip: V,
|
|
112
|
+
// entities state
|
|
113
|
+
entities: W,
|
|
114
|
+
setEntities: L,
|
|
115
|
+
feedAnnotations: _,
|
|
116
|
+
setFeedAnnotations: G,
|
|
117
|
+
feedFrameLinks: M,
|
|
118
|
+
setFeedFrameLinks: R,
|
|
119
|
+
bundleMode: m,
|
|
120
|
+
isGuest: f,
|
|
121
|
+
hasLicense: d,
|
|
122
|
+
onPowerFeature: D,
|
|
123
|
+
...s
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ ie(N.Provider, { value: te, children: e });
|
|
126
|
+
}, de = () => {
|
|
127
|
+
const e = oe(N);
|
|
128
|
+
if (e === void 0)
|
|
129
|
+
throw new Error("useDetailsPanel must be used within a DetailsPanelProvider");
|
|
130
|
+
return e;
|
|
131
|
+
}, T = "details/tabs-by-scope", ve = (e, i) => {
|
|
132
|
+
const r = ae(T, {});
|
|
133
|
+
ce(T, { ...r, [e]: i });
|
|
134
|
+
}, we = (e) => {
|
|
135
|
+
const { getOpenForScope: i, setPanelOpen: r, getTabForScope: o } = de(), [s, u] = C(T, {}), m = s[e], f = U(m) ? m : o(e), b = c(
|
|
136
|
+
(d) => {
|
|
137
|
+
u((a) => ({ ...a, [e]: d }));
|
|
138
|
+
},
|
|
139
|
+
[e, u]
|
|
140
|
+
), D = f === "feed";
|
|
141
|
+
return {
|
|
142
|
+
isOpen: i(e),
|
|
143
|
+
setOpen: (d) => r(e, d),
|
|
144
|
+
currentTab: f,
|
|
145
|
+
setTab: b,
|
|
146
|
+
isFeed: D
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export {
|
|
150
|
+
Oe as D,
|
|
151
|
+
we as a,
|
|
152
|
+
Le as g,
|
|
153
|
+
ve as s,
|
|
154
|
+
de as u
|
|
155
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
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 he, Fragment as ke } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { dp as Me, bV as Ue, c7 as Fe, db as Te, a$ as Le, aO as Ve, aJ as We, df as Ne } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
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";
|
|
@@ -13,7 +13,7 @@ import { c as dt } from "./confirmDelete.es.js";
|
|
|
13
13
|
import "uuid";
|
|
14
14
|
import { camelCase as ut, upperFirst as pt } from "lodash";
|
|
15
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
|
-
import {
|
|
16
|
+
import { u as Ee } from "./DetailsPanelContext.es.js";
|
|
17
17
|
import ue from "clsx";
|
|
18
18
|
import gt from "axios";
|
|
19
19
|
import { s as vt, b as bt, h as we, g as yt, c as wt } from "./versionUploadHelpers.es.js";
|
|
@@ -144,7 +144,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
144
144
|
} = Fe(
|
|
145
145
|
{ projectName: r, versionId: i },
|
|
146
146
|
{ skip: !i || !r }
|
|
147
|
-
), P = !1,
|
|
147
|
+
), P = !1, W = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, V] = x(null), [M, p] = x(null), c = $e(
|
|
148
148
|
me(Ae),
|
|
149
149
|
me(Oe, {
|
|
150
150
|
coordinateGetter: Be
|
|
@@ -263,11 +263,11 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
263
263
|
{
|
|
264
264
|
projectName: r,
|
|
265
265
|
onClick: N,
|
|
266
|
-
isSelected:
|
|
266
|
+
isSelected: W.includes(e.fileId),
|
|
267
267
|
isDragging: !!M,
|
|
268
268
|
onContextMenu: G,
|
|
269
269
|
onEdit: (o) => {
|
|
270
|
-
o.stopPropagation(),
|
|
270
|
+
o.stopPropagation(), V(e.activityId);
|
|
271
271
|
},
|
|
272
272
|
...e
|
|
273
273
|
},
|
|
@@ -282,7 +282,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
282
282
|
projectName: r,
|
|
283
283
|
isDragOverlay: !0,
|
|
284
284
|
isDragging: !0,
|
|
285
|
-
isSelected:
|
|
285
|
+
isSelected: W.includes(C.fileId)
|
|
286
286
|
}
|
|
287
287
|
) : null })
|
|
288
288
|
]
|
|
@@ -326,7 +326,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
326
326
|
xt,
|
|
327
327
|
{
|
|
328
328
|
isOpen: !0,
|
|
329
|
-
onClose: () =>
|
|
329
|
+
onClose: () => V(null),
|
|
330
330
|
label: b.find((e) => e.activityId === k)?.label || "",
|
|
331
331
|
projectName: r,
|
|
332
332
|
versionId: i,
|
|
@@ -387,7 +387,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
387
387
|
versionsInputRef: y,
|
|
388
388
|
onVersionCreated: u
|
|
389
389
|
}) => {
|
|
390
|
-
const { dispatch: s } = Ee(), f = Dt(), [h, n] = x(!1), [I, E] = x(null), m = _(0), [v, P] = x(null), [
|
|
390
|
+
const { dispatch: s } = Ee(), f = Dt(), [h, n] = x(!1), [I, E] = x(null), m = _(0), [v, P] = x(null), [W, F] = x(0), [O, k] = x(!1), [V, 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({
|
|
391
391
|
projectName: d,
|
|
392
392
|
versionId: $,
|
|
393
393
|
taskId: c,
|
|
@@ -403,7 +403,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
403
403
|
}), N = kt.filter((e) => e.id === "version" ? q : !0), w = () => {
|
|
404
404
|
P(null), n(!1), E(null), m.current = 0, F(0), k(!1), M(null);
|
|
405
405
|
}, Z = async (e) => {
|
|
406
|
-
if (!
|
|
406
|
+
if (!V || !p) {
|
|
407
407
|
k(!1), M(null);
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
@@ -425,13 +425,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
425
425
|
// default product type for uploaded files
|
|
426
426
|
productBaseType: "review"
|
|
427
427
|
});
|
|
428
|
-
k(!1), await z(
|
|
428
|
+
k(!1), await z(V, l.id), M(null);
|
|
429
429
|
} catch (l) {
|
|
430
430
|
we(l, "creating product"), w();
|
|
431
431
|
}
|
|
432
432
|
}, Y = () => {
|
|
433
433
|
k(!1), M(null), w();
|
|
434
|
-
}, [j] =
|
|
434
|
+
}, [j] = Ve(), [ee] = We(), H = async (e) => {
|
|
435
435
|
if (!q || !p)
|
|
436
436
|
return A.error("Please select exactly one version to upload reviewables"), w();
|
|
437
437
|
if (f) {
|
|
@@ -557,7 +557,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
557
557
|
rt,
|
|
558
558
|
{
|
|
559
559
|
style: {
|
|
560
|
-
right: `${100 -
|
|
560
|
+
right: `${100 - W}%`
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
),
|
|
@@ -588,7 +588,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
588
588
|
Pt,
|
|
589
589
|
{
|
|
590
590
|
isOpen: O,
|
|
591
|
-
files:
|
|
591
|
+
files: V,
|
|
592
592
|
onSubmit: Z,
|
|
593
593
|
onCancel: Y
|
|
594
594
|
}
|
|
@@ -631,21 +631,21 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
631
631
|
const c = s.current, b = De(c) ?? 1 / 0, C = c.clientWidth - b;
|
|
632
632
|
C <= 0 || v.current.clientWidth - C;
|
|
633
633
|
}, [n]);
|
|
634
|
-
const P = n && a.length > n ? a.slice(-n) : a,
|
|
635
|
-
i &&
|
|
634
|
+
const P = n && a.length > n ? a.slice(-n) : a, W = n && a.length > n ? a.slice(0, -n) : [];
|
|
635
|
+
i && W.unshift({ type: "project", label: r, id: r });
|
|
636
636
|
let F, O = P;
|
|
637
637
|
y === "version" && a.length > 0 && (F = a[a.length - 1], O = P.slice(0, -1));
|
|
638
638
|
const k = (c) => {
|
|
639
639
|
const [, b] = Ie(c);
|
|
640
640
|
b && !f && h(b);
|
|
641
|
-
},
|
|
641
|
+
}, V = () => h(null), M = (c) => {
|
|
642
642
|
const [b, C] = Ie(c);
|
|
643
643
|
if (!Mt.includes(C)) return;
|
|
644
644
|
!!b.closest("li") ? h(null) : f !== C && h(C);
|
|
645
645
|
}, p = { scope: u, projectName: r };
|
|
646
646
|
return /* @__PURE__ */ R(at, { className: ue({ loading: g }), id: "entity-path", ref: s, children: [
|
|
647
647
|
!i && /* @__PURE__ */ t(J, { children: r }),
|
|
648
|
-
!!
|
|
648
|
+
!!W.length && /* @__PURE__ */ R(Q, { children: [
|
|
649
649
|
!i && /* @__PURE__ */ t(se, {}),
|
|
650
650
|
/* @__PURE__ */ R(
|
|
651
651
|
J,
|
|
@@ -653,11 +653,11 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
653
653
|
className: "dropdown more",
|
|
654
654
|
id: "more",
|
|
655
655
|
onMouseEnter: k,
|
|
656
|
-
onMouseLeave:
|
|
656
|
+
onMouseLeave: V,
|
|
657
657
|
onClick: M,
|
|
658
658
|
children: [
|
|
659
659
|
"...",
|
|
660
|
-
f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children:
|
|
660
|
+
f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: W.map((c) => /* @__PURE__ */ he(X, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
|
|
661
661
|
]
|
|
662
662
|
}
|
|
663
663
|
)
|
|
@@ -674,7 +674,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
674
674
|
className: "full dropdown",
|
|
675
675
|
id: "versions",
|
|
676
676
|
onMouseEnter: k,
|
|
677
|
-
onMouseLeave:
|
|
677
|
+
onMouseLeave: V,
|
|
678
678
|
onClick: M,
|
|
679
679
|
children: [
|
|
680
680
|
/* @__PURE__ */ t(
|
|
@@ -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 { ca as we } from "./getUris.es.js";
|
|
15
15
|
import { a as ke } from "./ProjectContext.es.js";
|
|
16
16
|
import { u as xe } from "./ProjectFoldersContext.es.js";
|
|
17
17
|
import { g as W } from "./getThumbnailUrl.es.js";
|
|
@@ -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 { bD as L } from "./getUris.es.js";
|
|
6
6
|
import "primereact/confirmdialog";
|
|
7
7
|
import { u as Y } from "./ProjectContext.es.js";
|
|
8
8
|
import "lodash";
|
|
@@ -10,7 +10,7 @@ import "react-toastify";
|
|
|
10
10
|
import { g as _ } from "./getEntityTypeIcon.es.js";
|
|
11
11
|
import "uuid";
|
|
12
12
|
import { g as z } from "./getThumbnailUrl.es.js";
|
|
13
|
-
const
|
|
13
|
+
const D = W`
|
|
14
14
|
from {
|
|
15
15
|
opacity: 0.4;
|
|
16
16
|
scale: 0.9;
|
|
@@ -18,7 +18,7 @@ from {
|
|
|
18
18
|
opacity: 1;
|
|
19
19
|
scale: 1;
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`, F = U(S)`
|
|
22
22
|
position: fixed;
|
|
23
23
|
max-width: 220px;
|
|
24
24
|
z-index: 9999;
|
|
@@ -26,7 +26,7 @@ from {
|
|
|
26
26
|
translate: -50% calc(-100% - 4px);
|
|
27
27
|
transform-origin: bottom center;
|
|
28
28
|
|
|
29
|
-
animation: ${
|
|
29
|
+
animation: ${D} 100ms ease-out;
|
|
30
30
|
|
|
31
31
|
/* path always open */
|
|
32
32
|
.description {
|
|
@@ -35,7 +35,7 @@ from {
|
|
|
35
35
|
|
|
36
36
|
/* shadow */
|
|
37
37
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
|
38
|
-
`,
|
|
38
|
+
`, G = ["folder", "task", "version", "workfile"], tt = ({
|
|
39
39
|
entityType: t,
|
|
40
40
|
entityId: e,
|
|
41
41
|
projectName: m,
|
|
@@ -44,7 +44,7 @@ from {
|
|
|
44
44
|
onMouseEnter: d,
|
|
45
45
|
onMouseLeave: u
|
|
46
46
|
}) => {
|
|
47
|
-
const o = Y(), a = m || o?.projectName, p = !!t &&
|
|
47
|
+
const o = Y(), a = m || o?.projectName, p = !!t && G.includes(t), { data: c, isFetching: f } = L(
|
|
48
48
|
{ entityType: t, entityId: e, projectName: a },
|
|
49
49
|
{ skip: !p || !e || !a }
|
|
50
50
|
), n = 220;
|
|
@@ -60,21 +60,21 @@ from {
|
|
|
60
60
|
thumbnailId: b,
|
|
61
61
|
status: E,
|
|
62
62
|
thumbnailHash: P
|
|
63
|
-
} = c || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E),
|
|
63
|
+
} = c || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), O = c ? z({
|
|
64
64
|
entityId: e || "",
|
|
65
65
|
entityType: t,
|
|
66
66
|
thumbnailHash: P,
|
|
67
67
|
thumbnailId: b,
|
|
68
68
|
projectName: a || "",
|
|
69
69
|
placeholder: "none"
|
|
70
|
-
}) : null,
|
|
70
|
+
}) : null, C = {
|
|
71
71
|
task: j.find((s) => s.name === w)?.icon,
|
|
72
72
|
folder: N.find((s) => s.name === g)?.icon,
|
|
73
73
|
version: o?.getProductType(k).icon,
|
|
74
74
|
workfile: _("workfile")
|
|
75
75
|
};
|
|
76
76
|
return p ? /* @__PURE__ */ I(
|
|
77
|
-
|
|
77
|
+
F,
|
|
78
78
|
{
|
|
79
79
|
style: { left: i, top: l, maxWidth: n },
|
|
80
80
|
onMouseEnter: d,
|
|
@@ -88,12 +88,12 @@ from {
|
|
|
88
88
|
hidePriority: !0,
|
|
89
89
|
isLoading: f,
|
|
90
90
|
loadingSections: ["header", "title", "users", "status"],
|
|
91
|
-
titleIcon:
|
|
92
|
-
imageUrl:
|
|
91
|
+
titleIcon: C[t || ""],
|
|
92
|
+
imageUrl: O || void 0
|
|
93
93
|
}
|
|
94
94
|
) : null;
|
|
95
95
|
};
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
G as E,
|
|
98
98
|
tt as a
|
|
99
99
|
};
|
|
@@ -4,7 +4,7 @@ import "lodash";
|
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import "react-toastify";
|
|
6
6
|
import "uuid";
|
|
7
|
-
import {
|
|
7
|
+
import { bf as b } from "./searchTerms.es.js";
|
|
8
8
|
import { c as C } from "./realtimeUpdatesUtils.es.js";
|
|
9
9
|
import { E as S } from "./DeleteEntitiesContext.es.js";
|
|
10
10
|
import { u as P } from "./viewUpdateHelper.es.js";
|