@ynput/ayon-frontend-shared 0.4.7 → 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 +684 -649
- package/dist/Feed.es.js +22 -22
- package/dist/ListTable.es.js +78 -67
- package/dist/ProjectTreeTable.es.js +2185 -2132
- package/dist/Slicer.es.js +152 -120
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +332 -329
- package/dist/chunks/Actions.es.js +7 -7
- package/dist/chunks/ColumnDropIndicator.es.js +127 -241
- package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/DetailsPanelContext.es.js +155 -0
- package/dist/chunks/EntityPath.es.js +40 -40
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +3 -3
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +2208 -2611
- package/dist/chunks/FilterErrorActions.es.js +5 -5
- package/dist/chunks/GlobalContext.es.js +21 -21
- package/dist/chunks/InfoMessage.es.js +146 -0
- package/dist/chunks/Menu.es.js +6 -6
- package/dist/chunks/MenuContext.es.js +51 -240
- package/dist/chunks/MenuItem.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +3211 -3761
- package/dist/chunks/NewEntityContext.es.js +539 -544
- package/dist/chunks/PlayableIcon.es.js +4261 -1163
- package/dist/chunks/ProjectContext.es.js +2 -2
- package/dist/chunks/ProjectFoldersContext.es.js +84 -76
- package/dist/chunks/RepresentationsList.es.js +3 -3
- package/dist/chunks/ReviewablesSelector.es.js +396 -384
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +286 -283
- package/dist/chunks/Slicer.es.js +1129 -689
- package/dist/chunks/TableSettingsFallback.es.js +6 -6
- package/dist/chunks/ThumbnailSimple.es.js +410 -61
- package/dist/chunks/VersionUploadContext.es.js +30 -30
- package/dist/chunks/ViewsContext.es.js +97 -97
- package/dist/chunks/Watchers.es.js +628 -598
- package/dist/chunks/entityDefinitions.es.js +276 -134
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/getBundleMode.es.js +16 -61
- package/dist/chunks/getUris.es.js +329 -322
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +186 -173
- package/dist/chunks/uriUtils.es.js +48 -0
- package/dist/chunks/useAttributeEnums.es.js +69 -61
- package/dist/chunks/useColumnDragRestriction.es.js +37 -27
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useLocalStorage.es.js +8 -8
- package/dist/chunks/useSessionStorage.es.js +61 -0
- package/dist/chunks/viewUpdateHelper.es.js +8 -8
- package/dist/components.es.js +199 -194
- package/dist/context.es.js +60 -58
- package/dist/hooks.es.js +108 -101
- package/dist/index.es.js +20 -14
- package/dist/types/Actions.d.ts +16 -16
- package/dist/types/ContextMenu.d.ts +16 -16
- package/dist/types/DetailsPanel.d.ts +22 -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 +48 -22
- package/dist/types/RepresentationsList.d.ts +19 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +119 -34
- package/dist/types/Views.d.ts +17 -17
- package/dist/types/api.d.ts +404 -95
- package/dist/types/components.d.ts +86 -25
- 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 +26 -13
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useSlicerSplitter.es.js +0 -18
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as R, jsx as t, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { useRef 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 { 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
|
-
import { useSensors as $e, useSensor as me, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as
|
|
7
|
-
import { useSortable 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
|
+
import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as He } from "@dnd-kit/sortable";
|
|
8
8
|
import { D as ze, R as Re, e as Je, g as Xe, 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 J, M as ve, m as be, n as X, 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";
|
|
@@ -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";
|
|
@@ -23,7 +23,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
23
23
|
/* @__PURE__ */ t(Ce, { icon: i }),
|
|
24
24
|
/* @__PURE__ */ t("span", { children: r })
|
|
25
25
|
] }), Ct = ({ ...r }) => {
|
|
26
|
-
const { attributes: i, listeners: a, setNodeRef: d, transform: g, transition: y, isDragging: u } =
|
|
26
|
+
const { attributes: i, listeners: a, setNodeRef: d, transform: g, transition: y, isDragging: u } = _e({
|
|
27
27
|
id: r.fileId,
|
|
28
28
|
animateLayoutChanges: () => !1
|
|
29
29
|
}), s = {
|
|
@@ -71,7 +71,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
71
71
|
activityId: g,
|
|
72
72
|
...y
|
|
73
73
|
}) => {
|
|
74
|
-
const u =
|
|
74
|
+
const u = _(null), [s, f] = x("");
|
|
75
75
|
le(() => {
|
|
76
76
|
if (u.current)
|
|
77
77
|
return f(i), u.current?.select(), () => {
|
|
@@ -144,12 +144,12 @@ 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
|
|
151
151
|
})
|
|
152
|
-
), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id,
|
|
152
|
+
), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, K = m && i !== $ || d, N = (e) => {
|
|
153
153
|
if (M) return console.log("Dragging, cannot open review");
|
|
154
154
|
const o = e.currentTarget.id;
|
|
155
155
|
if (!o || !a) return console.error("No reviewable id or product id");
|
|
@@ -160,7 +160,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
160
160
|
versionIds: [i],
|
|
161
161
|
reviewableIds: [o]
|
|
162
162
|
});
|
|
163
|
-
}, { playable: w, incompatible:
|
|
163
|
+
}, { playable: w, incompatible: Z, processing: Y, queued: j } = St(
|
|
164
164
|
b,
|
|
165
165
|
P
|
|
166
166
|
);
|
|
@@ -243,12 +243,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
243
243
|
folderId: s?.folderId,
|
|
244
244
|
dispatch: f,
|
|
245
245
|
readOnly: !I,
|
|
246
|
-
children:
|
|
246
|
+
children: K ? Array.from({ length: 3 }).map((e, o) => /* @__PURE__ */ t(Ye, { className: "loading" }, o)) : /* @__PURE__ */ R(Q, { children: [
|
|
247
247
|
/* @__PURE__ */ R(
|
|
248
248
|
qe,
|
|
249
249
|
{
|
|
250
250
|
sensors: c,
|
|
251
|
-
collisionDetection:
|
|
251
|
+
collisionDetection: Ke,
|
|
252
252
|
onDragStart: ee,
|
|
253
253
|
onDragEnd: z,
|
|
254
254
|
onDragCancel: () => p(null),
|
|
@@ -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
|
},
|
|
@@ -275,14 +275,14 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
275
275
|
))
|
|
276
276
|
}
|
|
277
277
|
),
|
|
278
|
-
/* @__PURE__ */ t(
|
|
278
|
+
/* @__PURE__ */ t(Ze, { modifiers: B, children: C ? /* @__PURE__ */ t(
|
|
279
279
|
Re,
|
|
280
280
|
{
|
|
281
281
|
...C,
|
|
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
|
]
|
|
@@ -307,7 +307,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
307
307
|
},
|
|
308
308
|
e.fileId
|
|
309
309
|
)),
|
|
310
|
-
|
|
310
|
+
Z.map((e) => /* @__PURE__ */ t(
|
|
311
311
|
oe,
|
|
312
312
|
{
|
|
313
313
|
name: e.filename,
|
|
@@ -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,
|
|
@@ -344,7 +344,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
344
344
|
onCancel: a,
|
|
345
345
|
onSubmit: d
|
|
346
346
|
}) => {
|
|
347
|
-
const g = Et(r?.[0]), y =
|
|
347
|
+
const g = Et(r?.[0]), y = _(null), u = _(!1), [s, f] = x(g);
|
|
348
348
|
le(() => {
|
|
349
349
|
f(g), u.current = !1;
|
|
350
350
|
}, [g]), le(() => {
|
|
@@ -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 =
|
|
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,
|
|
@@ -402,8 +402,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
402
402
|
}
|
|
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
|
-
},
|
|
406
|
-
if (!
|
|
405
|
+
}, Z = async (e) => {
|
|
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) {
|
|
@@ -470,7 +470,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
470
470
|
// previous version could have a taskId or we are uploading on a task
|
|
471
471
|
version: l
|
|
472
472
|
});
|
|
473
|
-
await
|
|
473
|
+
await K(e, D.id), w(), u?.(D.id);
|
|
474
474
|
} catch (l) {
|
|
475
475
|
we(l, "uploading version"), w();
|
|
476
476
|
}
|
|
@@ -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,8 +588,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
588
588
|
Pt,
|
|
589
589
|
{
|
|
590
590
|
isOpen: O,
|
|
591
|
-
files:
|
|
592
|
-
onSubmit:
|
|
591
|
+
files: V,
|
|
592
|
+
onSubmit: Z,
|
|
593
593
|
onCancel: Y
|
|
594
594
|
}
|
|
595
595
|
)
|
|
@@ -606,7 +606,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
606
606
|
entityType: y,
|
|
607
607
|
scope: u
|
|
608
608
|
}) => {
|
|
609
|
-
const s =
|
|
609
|
+
const s = _(null), [f, h] = x(null), [n, I] = x(null), [E, m] = x(!1), v = _(null);
|
|
610
610
|
ae(() => {
|
|
611
611
|
I(null), m(!0);
|
|
612
612
|
}, [a]), ae(() => {
|
|
@@ -618,12 +618,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
618
618
|
if (!C) return;
|
|
619
619
|
const $ = c.children;
|
|
620
620
|
let q = b;
|
|
621
|
-
const
|
|
622
|
-
let N =
|
|
621
|
+
const K = c.childElementCount;
|
|
622
|
+
let N = K;
|
|
623
623
|
for (; q > C && N > 0; )
|
|
624
|
-
N -= 2, q = Ut($, N,
|
|
624
|
+
N -= 2, q = Ut($, N, K);
|
|
625
625
|
let w = Array.from($).slice(0, N).filter(
|
|
626
|
-
(
|
|
626
|
+
(Z) => Z.nodeType === Node.ELEMENT_NODE && Z.className.includes("full")
|
|
627
627
|
)?.length || 2;
|
|
628
628
|
w = Math.max(w, 1), I(w), m(!1);
|
|
629
629
|
}, [s.current, E]), ae(() => {
|
|
@@ -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;
|
|
@@ -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 {
|
|
@@ -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";
|