@ynput/ayon-frontend-shared 0.4.7 → 0.5.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 -651
- package/dist/ListTable.es.js +8 -7
- package/dist/ProjectTreeTable.es.js +2223 -2184
- package/dist/Slicer.es.js +152 -120
- package/dist/api.es.js +202 -201
- package/dist/chunks/Actions.es.js +20 -20
- package/dist/chunks/ColumnDropIndicator.es.js +127 -241
- package/dist/chunks/DeleteEntitiesContext.es.js +36 -36
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EntityPath.es.js +22 -22
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +12 -12
- package/dist/chunks/Feed.es.js +2 -2
- package/dist/chunks/FilterErrorActions.es.js +5 -5
- package/dist/chunks/GlobalContext.es.js +14 -14
- package/dist/chunks/InfoMessage.es.js +146 -0
- package/dist/chunks/Menu.es.js +5 -5
- package/dist/chunks/MenuContext.es.js +75 -73
- package/dist/chunks/MetaWidget.es.js +1968 -1960
- package/dist/chunks/NewEntityContext.es.js +538 -543
- package/dist/chunks/PlayableIcon.es.js +54 -54
- package/dist/chunks/ProjectContext.es.js +12 -12
- package/dist/chunks/ProjectFoldersContext.es.js +84 -76
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +387 -384
- package/dist/chunks/SimpleTable.es.js +286 -283
- package/dist/chunks/Slicer.es.js +1121 -683
- package/dist/chunks/VersionUploadContext.es.js +26 -26
- package/dist/chunks/ViewsContext.es.js +31 -31
- package/dist/chunks/Watchers.es.js +1 -1
- package/dist/chunks/entityDefinitions.es.js +275 -133
- package/dist/chunks/getUris.es.js +236 -231
- package/dist/chunks/searchTerms.es.js +9 -0
- package/dist/chunks/useAttributeEnums.es.js +69 -61
- package/dist/chunks/useLocalStorage.es.js +10 -10
- package/dist/chunks/viewUpdateHelper.es.js +23 -23
- package/dist/components.es.js +166 -166
- package/dist/hooks.es.js +44 -43
- package/dist/index.es.js +11 -10
- package/dist/types/DetailsPanel.d.ts +6 -0
- package/dist/types/ProjectTreeTable.d.ts +28 -6
- package/dist/types/RepresentationsList.d.ts +3 -0
- package/dist/types/SimpleTable.d.ts +1 -0
- package/dist/types/Slicer.d.ts +103 -18
- package/dist/types/api.d.ts +13 -0
- package/dist/types/components.d.ts +7 -5
- package/package.json +11 -10
- package/dist/chunks/useSlicerSplitter.es.js +0 -18
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import X, { useState as x, useMemo as U, createContext as $, useContext as F, useCallback as M, useEffect as A, useRef as
|
|
1
|
+
import X, { useState as x, useMemo as U, createContext as $, useContext as F, useCallback as M, useEffect as A, useRef as G } from "react";
|
|
2
2
|
import { jsxs as I, jsx as c, Fragment as Z } from "react/jsx-runtime";
|
|
3
3
|
import { a as fe } from "./useCreateContextMenu.es.js";
|
|
4
|
-
import { v4 as
|
|
4
|
+
import { v4 as K } from "uuid";
|
|
5
5
|
import { createPortal as he } from "react-dom";
|
|
6
6
|
import { Dialog as me } from "primereact/dialog";
|
|
7
|
-
import { Dialog as ge, InputText as re, Button as
|
|
7
|
+
import { Dialog as ge, InputText as re, Button as H } from "@ynput/ayon-react-components";
|
|
8
8
|
import v from "styled-components";
|
|
9
|
-
import {
|
|
9
|
+
import { c1 as we, cK as ye, dk as Ce, cH as xe } from "./getUris.es.js";
|
|
10
10
|
import { u as ve } from "./GlobalContext.es.js";
|
|
11
11
|
import { toast as O } from "react-toastify";
|
|
12
12
|
import { debounce as ee, isEqual as be } from "lodash";
|
|
@@ -113,7 +113,7 @@ const Y = [
|
|
|
113
113
|
width: 100%;
|
|
114
114
|
/* room for the 2px focus outline */
|
|
115
115
|
margin: 2px 0;
|
|
116
|
-
`,
|
|
116
|
+
`, He = (e, s) => {
|
|
117
117
|
const i = (e ?? "").trim();
|
|
118
118
|
return i !== "" && Number(i) === s;
|
|
119
119
|
}, ne = ({
|
|
@@ -131,7 +131,7 @@ const Y = [
|
|
|
131
131
|
} = e, [C, u] = x(""), [p, a] = x({}), g = U(
|
|
132
132
|
() => Y.filter((d) => (n[d] || 0) > 0),
|
|
133
133
|
[n]
|
|
134
|
-
), f = U(() => Re(n), [n]), b = f > te, h = !!r && !b, S = b ? g.every((d) =>
|
|
134
|
+
), f = U(() => Re(n), [n]), b = f > te, h = !!r && !b, S = b ? g.every((d) => He(p[d], n[d])) : h ? C.trim() === r : !0, T = (d) => {
|
|
135
135
|
d.key === "Enter" && S && (d.preventDefault(), s());
|
|
136
136
|
};
|
|
137
137
|
return /* @__PURE__ */ c(
|
|
@@ -181,9 +181,9 @@ const Y = [
|
|
|
181
181
|
] }, d)) })
|
|
182
182
|
] }),
|
|
183
183
|
/* @__PURE__ */ I(We, { children: [
|
|
184
|
-
/* @__PURE__ */ c(
|
|
184
|
+
/* @__PURE__ */ c(H, { label: "Cancel", onClick: i }),
|
|
185
185
|
/* @__PURE__ */ c(
|
|
186
|
-
|
|
186
|
+
H,
|
|
187
187
|
{
|
|
188
188
|
"data-testid": "delete-confirm-submit",
|
|
189
189
|
variant: "danger",
|
|
@@ -297,11 +297,11 @@ function vt({ children: e }) {
|
|
|
297
297
|
}, [t, n]), m = M(
|
|
298
298
|
async (u, p) => {
|
|
299
299
|
if (!i) {
|
|
300
|
-
r(
|
|
300
|
+
r(K());
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
303
|
if (t != null) {
|
|
304
|
-
console.log("pipWindow is already open"), r(
|
|
304
|
+
console.log("pipWindow is already open"), r(K());
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
307
|
const a = await window.documentPictureInPicture.requestWindow({
|
|
@@ -310,7 +310,7 @@ function vt({ children: e }) {
|
|
|
310
310
|
});
|
|
311
311
|
a.addEventListener("pagehide", () => {
|
|
312
312
|
o(null), r(null);
|
|
313
|
-
}), o(a), r(
|
|
313
|
+
}), o(a), r(K());
|
|
314
314
|
},
|
|
315
315
|
[t, n]
|
|
316
316
|
);
|
|
@@ -344,16 +344,16 @@ function vt({ children: e }) {
|
|
|
344
344
|
}), [y, i, t, m]);
|
|
345
345
|
return /* @__PURE__ */ c(ae.Provider, { value: C, children: e });
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function ze() {
|
|
348
348
|
const e = F(ae);
|
|
349
349
|
if (e === void 0)
|
|
350
350
|
throw new Error("usePiPWindow must be used within a PiPContext");
|
|
351
351
|
return e;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Be({ pipWindow: e, children: s }) {
|
|
354
354
|
return he(s, e.document.body);
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const Ge = v(me)`
|
|
357
357
|
width: 25vw;
|
|
358
358
|
height: 70vh;
|
|
359
359
|
border: solid 1px var(--md-sys-color-outline-variant);
|
|
@@ -366,7 +366,7 @@ const He = v(me)`
|
|
|
366
366
|
opacity: 1;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
`,
|
|
369
|
+
`, Ke = v(H)`
|
|
370
370
|
width: 26px;
|
|
371
371
|
height: 26px;
|
|
372
372
|
margin-left: auto;
|
|
@@ -383,11 +383,11 @@ const He = v(me)`
|
|
|
383
383
|
background-color: #3d3e40;
|
|
384
384
|
}
|
|
385
385
|
`, bt = ({ children: e }) => {
|
|
386
|
-
const { pipWindow: s, pipId: i, isSupported: t, closePipWindow: o } =
|
|
386
|
+
const { pipWindow: s, pipId: i, isSupported: t, closePipWindow: o } = ze(), n = i && X.isValidElement(e) ? X.cloneElement(e, { id: i }) : e;
|
|
387
387
|
return !t && i ? /* @__PURE__ */ c(
|
|
388
|
-
|
|
388
|
+
Ge,
|
|
389
389
|
{
|
|
390
|
-
header: /* @__PURE__ */ c(
|
|
390
|
+
header: /* @__PURE__ */ c(Ke, { icon: "close", className: "close", onClick: o }),
|
|
391
391
|
headerStyle: {
|
|
392
392
|
padding: 4,
|
|
393
393
|
backgroundColor: "#202124",
|
|
@@ -410,7 +410,7 @@ const He = v(me)`
|
|
|
410
410
|
position: "right",
|
|
411
411
|
children: n
|
|
412
412
|
}
|
|
413
|
-
) : s && /* @__PURE__ */ c(
|
|
413
|
+
) : s && /* @__PURE__ */ c(Be, { pipWindow: s, children: /* @__PURE__ */ c("div", { className: "pipRoot", children: n }) });
|
|
414
414
|
}, ce = $(void 0), Pt = ({
|
|
415
415
|
children: e,
|
|
416
416
|
projectName: s,
|
|
@@ -447,21 +447,21 @@ const He = v(me)`
|
|
|
447
447
|
return e;
|
|
448
448
|
}, Qe = () => /* @__PURE__ */ I("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
449
449
|
"Refresh to see latest changes.",
|
|
450
|
-
/* @__PURE__ */ c(
|
|
451
|
-
] }), ue = $(void 0), Ye = window.location.protocol.replace("http", "ws"),
|
|
450
|
+
/* @__PURE__ */ c(H, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
|
|
451
|
+
] }), ue = $(void 0), Ye = window.location.protocol.replace("http", "ws"), Je = `${Ye}//${window.location.host}/ws`, kt = ({
|
|
452
452
|
children: e,
|
|
453
453
|
userName: s,
|
|
454
454
|
projectName: i,
|
|
455
455
|
dispatch: t
|
|
456
456
|
}) => {
|
|
457
|
-
const [o, n] = x(!1), [r, y] = x([]), [m] = ye(), C =
|
|
457
|
+
const [o, n] = x(!1), [r, y] = x([]), [m] = ye(), C = G(!1);
|
|
458
458
|
A(() => {
|
|
459
459
|
C.current = o;
|
|
460
460
|
}, [o]);
|
|
461
461
|
const u = {
|
|
462
462
|
shouldReconnect: () => !s || !localStorage.getItem("accessToken") ? !1 : (m({ full: !1 }).unwrap(), !0)
|
|
463
463
|
}, { sendMessage: p, readyState: a, getWebSocket: g } = Se(
|
|
464
|
-
|
|
464
|
+
Je,
|
|
465
465
|
u,
|
|
466
466
|
!!s
|
|
467
467
|
), f = () => {
|
|
@@ -477,7 +477,7 @@ const He = v(me)`
|
|
|
477
477
|
A(() => {
|
|
478
478
|
console.debug("Topics changed", r), f();
|
|
479
479
|
}, [r, i]);
|
|
480
|
-
const b =
|
|
480
|
+
const b = G(r);
|
|
481
481
|
b.current = r;
|
|
482
482
|
const h = U(
|
|
483
483
|
() => ee((E) => {
|
|
@@ -495,7 +495,7 @@ const He = v(me)`
|
|
|
495
495
|
closeButton: !1
|
|
496
496
|
}), P(!0));
|
|
497
497
|
}, [S, d]);
|
|
498
|
-
const k =
|
|
498
|
+
const k = G({ callCount: 0, lastCall: Date.now() }), N = ee(() => {
|
|
499
499
|
console.log("Resetting API state due to server restart"), n(!1), t(Pe.util.resetApiState());
|
|
500
500
|
}, 1e3), q = M(
|
|
501
501
|
(E) => {
|
|
@@ -506,8 +506,8 @@ const He = v(me)`
|
|
|
506
506
|
let l;
|
|
507
507
|
try {
|
|
508
508
|
l = JSON.parse(E.data);
|
|
509
|
-
} catch (
|
|
510
|
-
console.error("Failed to parse websocket message:",
|
|
509
|
+
} catch (B) {
|
|
510
|
+
console.error("Failed to parse websocket message:", B, E.data);
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
513
|
const { topic: w, sender: D, summary: R, status: L } = l || {};
|
|
@@ -520,8 +520,8 @@ const He = v(me)`
|
|
|
520
520
|
if (D !== window.senderId) return;
|
|
521
521
|
} else if (D === window.senderId)
|
|
522
522
|
return;
|
|
523
|
-
const
|
|
524
|
-
|
|
523
|
+
const z = Date.now();
|
|
524
|
+
z - k.current.lastCall < 1e3 ? k.current.callCount += 1 : k.current.callCount = 0, console.log("Event RX", l), k.current.lastCall = z, w === "shout" && l?.summary?.text && O.info(R.text), _.publish(w, l);
|
|
525
525
|
},
|
|
526
526
|
[n]
|
|
527
527
|
);
|
|
@@ -552,7 +552,7 @@ const He = v(me)`
|
|
|
552
552
|
"version",
|
|
553
553
|
"representation",
|
|
554
554
|
"workfile"
|
|
555
|
-
]), Rt = (e) => !!e && Xe.has(e),
|
|
555
|
+
]), Rt = (e) => !!e && Xe.has(e), J = $(null), se = [
|
|
556
556
|
"representation",
|
|
557
557
|
"version",
|
|
558
558
|
"workfile",
|
|
@@ -583,7 +583,7 @@ const He = v(me)`
|
|
|
583
583
|
}
|
|
584
584
|
await Promise.all(
|
|
585
585
|
Array.from(D.entries()).map(([R, L]) => {
|
|
586
|
-
const
|
|
586
|
+
const B = [...L].sort(
|
|
587
587
|
(V, pe) => se.indexOf(V.entityType) - se.indexOf(pe.entityType)
|
|
588
588
|
).map((V) => ({
|
|
589
589
|
type: "delete",
|
|
@@ -592,7 +592,7 @@ const He = v(me)`
|
|
|
592
592
|
force: w
|
|
593
593
|
}));
|
|
594
594
|
return s({
|
|
595
|
-
operationsRequestModel: { operations:
|
|
595
|
+
operationsRequestModel: { operations: B },
|
|
596
596
|
projectName: R
|
|
597
597
|
}).unwrap();
|
|
598
598
|
})
|
|
@@ -686,7 +686,7 @@ const He = v(me)`
|
|
|
686
686
|
});
|
|
687
687
|
}
|
|
688
688
|
}, [t]), u = U(() => ({ deleteEntities: m }), [m]);
|
|
689
|
-
return /* @__PURE__ */ I(
|
|
689
|
+
return /* @__PURE__ */ I(J.Provider, { value: u, children: [
|
|
690
690
|
e,
|
|
691
691
|
t && /* @__PURE__ */ c(
|
|
692
692
|
ne,
|
|
@@ -710,11 +710,11 @@ const He = v(me)`
|
|
|
710
710
|
)
|
|
711
711
|
] });
|
|
712
712
|
}, Lt = () => {
|
|
713
|
-
const e = F(
|
|
713
|
+
const e = F(J);
|
|
714
714
|
if (!e)
|
|
715
715
|
throw new Error("useDeleteEntitiesContext must be used within a DeleteEntitiesProvider");
|
|
716
716
|
return e;
|
|
717
|
-
}, Ot = () => F(
|
|
717
|
+
}, Ot = () => F(J);
|
|
718
718
|
export {
|
|
719
719
|
Pt as A,
|
|
720
720
|
$t as D,
|
|
@@ -732,7 +732,7 @@ export {
|
|
|
732
732
|
Lt as g,
|
|
733
733
|
Ot as h,
|
|
734
734
|
Rt as i,
|
|
735
|
-
|
|
735
|
+
ze as j,
|
|
736
736
|
xt as k,
|
|
737
737
|
Dt as l,
|
|
738
738
|
yt as m,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { toast as d } from "react-toastify";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { bA as p } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
6
|
import { Dialog as f } from "@ynput/ayon-react-components";
|
|
7
7
|
import { J as u } from "./JsonViewer.es.js";
|
|
8
|
-
const
|
|
8
|
+
const x = ({
|
|
9
9
|
projectName: s,
|
|
10
10
|
entityType: e,
|
|
11
11
|
entityIds: l,
|
|
@@ -34,5 +34,5 @@ const z = ({
|
|
|
34
34
|
);
|
|
35
35
|
};
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
x as D
|
|
38
38
|
};
|
|
@@ -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 { dn as Me, bU as Ue, c6 as Fe, da as Te, a$ as Le, aO as We, aJ as Ve, de 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";
|
|
@@ -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(), () => {
|
|
@@ -149,7 +149,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
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),
|
|
@@ -275,7 +275,7 @@ 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,
|
|
@@ -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,
|
|
@@ -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), [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({
|
|
391
391
|
projectName: d,
|
|
392
392
|
versionId: $,
|
|
393
393
|
taskId: c,
|
|
@@ -402,7 +402,7 @@ 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
|
-
},
|
|
405
|
+
}, Z = async (e) => {
|
|
406
406
|
if (!W || !p) {
|
|
407
407
|
k(!1), M(null);
|
|
408
408
|
return;
|
|
@@ -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
|
}
|
|
@@ -589,7 +589,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
|
|
|
589
589
|
{
|
|
590
590
|
isOpen: O,
|
|
591
591
|
files: W,
|
|
592
|
-
onSubmit:
|
|
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(() => {
|
|
@@ -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 { c9 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 { bC 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 F = 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
|
+
`, G = 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: ${F} 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
|
+
`, H = ["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 && H.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), C = 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, O = {
|
|
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
|
+
G,
|
|
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: O[t || ""],
|
|
92
|
+
imageUrl: C || void 0
|
|
93
93
|
}
|
|
94
94
|
) : null;
|
|
95
95
|
};
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
H as E,
|
|
98
98
|
tt as a
|
|
99
99
|
};
|
package/dist/chunks/Feed.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import $t, { useState as H, useEffect as K, lazy as Vn, Suspense as jn, useRef a
|
|
|
4
4
|
import { p as en, U as tn, P as qn, u as we, F as st, s as nn, A as et, R as Hn, L as Gn, t as Wn, V as Qn, v as Lt, w as Yn, x as Kn, M as Xn, I as Jn, Q as Zn, q as eo, y as to, z as no, B as oo, S as ro, E as io, G as ao, n as so, H as co, J as lo, K as po, T as uo, O as Ot, W as mo, X as ho, Y as go, Z as fo, _ as yo, $ as vo, a0 as bo, f as wo, l as xo } from "./PlayableIcon.es.js";
|
|
5
5
|
import { Icon as Q, Button as Be, Dialog as Ao, getFileSizeString as Co, theme as ko, getTextColor as Et, Dropdown as To, UserImage as on, SaveButton as So, SEARCH_FILTER_ID as rn, buildFilterId as Ut, getFilterFromId as Eo, SearchFilter as Do } from "@ynput/ayon-react-components";
|
|
6
6
|
import { aP as No, be as zt } from "./searchTerms.es.js";
|
|
7
|
-
import {
|
|
7
|
+
import { bl as Io, bf as Fo, bU as Mo } from "./getUris.es.js";
|
|
8
8
|
import "primereact/confirmdialog";
|
|
9
9
|
import { a as Po } from "./EntityTooltip.es.js";
|
|
10
10
|
import G, { clsx as an } from "clsx";
|
|
@@ -18,7 +18,7 @@ import $o, { Quill as Ge } from "react-quill-ayon";
|
|
|
18
18
|
import y, { keyframes as Lo, css as Dt } from "styled-components";
|
|
19
19
|
import Oo from "@uiw/react-textarea-code-editor";
|
|
20
20
|
import { E as Ct } from "./EmptyPlaceholder.es.js";
|
|
21
|
-
import {
|
|
21
|
+
import { a as Uo, M as zo } from "./Menu.es.js";
|
|
22
22
|
import { c as We, u as Vo } from "./MenuContext.es.js";
|
|
23
23
|
import { matchSorter as jo } from "match-sorter";
|
|
24
24
|
import { isValid as He, isSameMinute as Bo, isBefore as qo, formatISO as Ho, differenceInMinutes as Go, differenceInSeconds as Wo, compareAsc as Qo } from "date-fns";
|
|
@@ -7,7 +7,7 @@ import { c as B } from "./copyToClipboard.es.js";
|
|
|
7
7
|
import "uuid";
|
|
8
8
|
import "./searchTerms.es.js";
|
|
9
9
|
import { useState as l, useEffect as u, useContext as k } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { bE as G } from "./getUris.es.js";
|
|
11
11
|
import { u as J } from "./GlobalContext.es.js";
|
|
12
12
|
import { F as w } from "./ColumnDropIndicator.es.js";
|
|
13
13
|
const ie = ({ children: i }) => {
|
|
@@ -152,9 +152,9 @@ const ie = ({ children: i }) => {
|
|
|
152
152
|
...t && { articleId: t }
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
-
}, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"),
|
|
155
|
+
}, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"), j = (e) => h instanceof HTMLElement && (h.style.display = e ? "block" : "none");
|
|
156
156
|
u(() => {
|
|
157
|
-
!n || !c ||
|
|
157
|
+
!n || !c || j(f);
|
|
158
158
|
}, [n, c, f]), u(() => {
|
|
159
159
|
if (!n || !c) return;
|
|
160
160
|
const e = window;
|
|
@@ -162,7 +162,7 @@ const ie = ({ children: i }) => {
|
|
|
162
162
|
b(!1);
|
|
163
163
|
});
|
|
164
164
|
}, [n, c]);
|
|
165
|
-
const
|
|
165
|
+
const D = (e = "Home", t) => {
|
|
166
166
|
const a = window;
|
|
167
167
|
if (typeof a.Featurebase != "function") {
|
|
168
168
|
window.alert("Featurebase SDK is not loaded yet. Please try again later."), console.warn("Featurebase SDK is not loaded yet.");
|
|
@@ -200,7 +200,7 @@ const ie = ({ children: i }) => {
|
|
|
200
200
|
w.Provider,
|
|
201
201
|
{
|
|
202
202
|
value: {
|
|
203
|
-
openSupport:
|
|
203
|
+
openSupport: D,
|
|
204
204
|
openFeedback: N,
|
|
205
205
|
openPortal: A,
|
|
206
206
|
messengerLoaded: c,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as v, useContext as x, useMemo as I } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cf as C, bo as G, cR as P, cA as b } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
|
-
const a = v(void 0),
|
|
6
|
+
const a = v(void 0), M = ({ children: r, skip: t = !1 }) => {
|
|
7
7
|
const {
|
|
8
|
-
data:
|
|
9
|
-
isLoading:
|
|
10
|
-
error:
|
|
11
|
-
} = C({ full: !0 }, { skip:
|
|
8
|
+
data: e = {},
|
|
9
|
+
isLoading: i,
|
|
10
|
+
error: n
|
|
11
|
+
} = C({ full: !0 }, { skip: t }), { data: s, isLoading: u, error: c } = G(), {
|
|
12
12
|
data: o = [],
|
|
13
13
|
isLoading: l,
|
|
14
14
|
error: d
|
|
15
|
-
} = P({}, { skip:
|
|
15
|
+
} = P({}, { skip: t }), f = I(() => o.filter((L) => L.active), [o]), {
|
|
16
16
|
data: m,
|
|
17
17
|
isLoading: p,
|
|
18
18
|
error: j
|
|
@@ -21,8 +21,8 @@ const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
|
|
|
21
21
|
a.Provider,
|
|
22
22
|
{
|
|
23
23
|
value: {
|
|
24
|
-
siteInfo:
|
|
25
|
-
attributes:
|
|
24
|
+
siteInfo: e,
|
|
25
|
+
attributes: e?.attributes || [],
|
|
26
26
|
user: s,
|
|
27
27
|
cloudInfo: m,
|
|
28
28
|
projects: {
|
|
@@ -30,13 +30,13 @@ const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
|
|
|
30
30
|
active: f
|
|
31
31
|
},
|
|
32
32
|
isLoading: {
|
|
33
|
-
siteInfo:
|
|
33
|
+
siteInfo: i,
|
|
34
34
|
user: u,
|
|
35
35
|
cloudInfo: p,
|
|
36
36
|
projects: l
|
|
37
37
|
},
|
|
38
38
|
error: {
|
|
39
|
-
siteInfo:
|
|
39
|
+
siteInfo: n,
|
|
40
40
|
user: c,
|
|
41
41
|
cloudInfo: j,
|
|
42
42
|
projects: d
|
|
@@ -45,8 +45,8 @@ const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
|
|
|
45
45
|
children: r
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
},
|
|
48
|
+
}, R = () => x(a) || {};
|
|
49
49
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
M as G,
|
|
51
|
+
R as u
|
|
52
52
|
};
|