@ynput/ayon-frontend-shared 0.7.5 → 0.8.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 +471 -469
- package/dist/Feed.es.js +1 -1
- package/dist/ListTable.es.js +20 -20
- package/dist/NewEntity.es.js +7 -7
- package/dist/ProjectTreeTable.es.js +2523 -2502
- package/dist/ProjectsTable.es.js +5 -5
- package/dist/Slicer.es.js +28 -25
- 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 +4 -4
- package/dist/chunks/ColumnHeaderMenuUI.es.js +4 -5
- 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 +482 -462
- package/dist/chunks/EntityTooltip.es.js +18 -19
- package/dist/chunks/Feed.es.js +1382 -1355
- package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
- package/dist/chunks/FilterErrorActions.es.js +3 -4
- package/dist/chunks/GroupSettingsFallback.es.js +4 -4
- package/dist/chunks/Menu.es.js +242 -240
- package/dist/chunks/MetaWidget.es.js +1948 -1875
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +1260 -1190
- package/dist/chunks/SimpleTable.es.js +303 -297
- package/dist/chunks/Slicer.es.js +420 -413
- package/dist/chunks/TableExportContextInstance.es.js +622 -378
- package/dist/chunks/TableSettingsFallback.es.js +3 -4
- package/dist/chunks/ThumbnailSimple.es.js +114 -99
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/VideoPlayer.es.js +8 -9
- package/dist/chunks/Watchers.es.js +929 -872
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- 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 +773 -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 +1391 -1253
- package/dist/context.es.js +645 -668
- package/dist/hooks.es.js +193 -171
- package/dist/index.es.js +4 -4
- package/dist/types/Actions.d.ts +10 -8
- package/dist/types/DetailsPanel.d.ts +54 -76
- package/dist/types/EntityPickerDialog.d.ts +51 -2
- 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 +318 -212
- 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 +3164 -2363
- package/dist/types/components.d.ts +537 -497
- package/dist/types/context.d.ts +293 -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/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
- 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
|
};
|