@ynput/ayon-frontend-shared 0.5.0 → 0.6.1
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/ContextMenu.es.js +34 -16
- package/dist/DetailsPanel.es.js +307 -311
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +99 -92
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4459 -2959
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +32 -27
- package/dist/chunks/ColumnDropIndicator.es.js +174 -328
- package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
- package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
- package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +74 -69
- package/dist/chunks/EntityPickerDialog.es.js +25 -21
- package/dist/chunks/EntityTooltip.es.js +29 -22
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +2321 -2668
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -256
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2895 -4919
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +4215 -1179
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +4 -4
- package/dist/chunks/ReviewablesSelector.es.js +468 -460
- package/dist/chunks/SimpleForm.es.js +18 -18
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +109 -98
- package/dist/chunks/TableSettingsFallback.es.js +22 -10
- package/dist/chunks/ThumbnailSimple.es.js +290 -52
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +669 -644
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +737 -710
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +179 -174
- package/dist/chunks/useAttributeEnums.es.js +9 -9
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useHierarchySelection.es.js +24 -0
- package/dist/chunks/useLoadModule.es.js +74 -0
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
- package/dist/chunks/versionUploadHelpers.es.js +16 -42
- package/dist/chunks/viewUpdateHelper.es.js +74 -57
- package/dist/components.es.js +1432 -1001
- package/dist/context.es.js +791 -78
- package/dist/hooks.es.js +95 -94
- package/dist/index.es.js +27 -26
- package/dist/types/Actions.d.ts +15 -15
- package/dist/types/ContextMenu.d.ts +19 -16
- package/dist/types/DetailsPanel.d.ts +110 -17
- package/dist/types/EntityPickerDialog.d.ts +15 -15
- package/dist/types/Feed.d.ts +19 -16
- package/dist/types/ListTable.d.ts +15 -15
- package/dist/types/NewEntity.d.ts +24 -18
- package/dist/types/ProjectTreeTable.d.ts +34 -123
- package/dist/types/RepresentationsList.d.ts +15 -15
- package/dist/types/SimpleTable.d.ts +19 -16
- package/dist/types/Slicer.d.ts +18 -15
- package/dist/types/Views.d.ts +19 -16
- package/dist/types/api.d.ts +515 -207
- package/dist/types/components.d.ts +84 -20
- package/dist/types/context.d.ts +108 -25
- package/dist/types/hooks.d.ts +15 -15
- package/dist/types/index.d.ts +15 -15
- package/dist/types/util.d.ts +20 -15
- package/dist/util.es.js +117 -105
- package/package.json +16 -4
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- package/dist/chunks/GlobalContext.es.js +0 -52
- package/dist/chunks/NewEntityContext.es.js +0 -1242
- package/dist/chunks/ProjectFoldersContext.es.js +0 -134
- package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
- package/dist/chunks/VersionUploadContext.es.js +0 -232
- package/dist/chunks/ViewsContext.es.js +0 -878
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useColumnDragRestriction.es.js +0 -148
- package/dist/chunks/useLocalStorage.es.js +0 -355
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -2,15 +2,22 @@ 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
|
-
import
|
|
7
|
+
import "react";
|
|
8
|
+
import "@module-federation/enhanced/runtime";
|
|
9
|
+
import { n as Y } from "./DeleteEntitiesContextInstance.es.js";
|
|
8
10
|
import "lodash";
|
|
9
11
|
import "react-toastify";
|
|
10
12
|
import { g as _ } from "./getEntityTypeIcon.es.js";
|
|
11
13
|
import "uuid";
|
|
12
14
|
import { g as z } from "./getThumbnailUrl.es.js";
|
|
13
|
-
|
|
15
|
+
import "semver";
|
|
16
|
+
import "./ContextMenuContextInstance.es.js";
|
|
17
|
+
import "clsx";
|
|
18
|
+
import "react-dom";
|
|
19
|
+
import "react-redux";
|
|
20
|
+
const D = W`
|
|
14
21
|
from {
|
|
15
22
|
opacity: 0.4;
|
|
16
23
|
scale: 0.9;
|
|
@@ -18,7 +25,7 @@ from {
|
|
|
18
25
|
opacity: 1;
|
|
19
26
|
scale: 1;
|
|
20
27
|
}
|
|
21
|
-
`,
|
|
28
|
+
`, F = U(S)`
|
|
22
29
|
position: fixed;
|
|
23
30
|
max-width: 220px;
|
|
24
31
|
z-index: 9999;
|
|
@@ -26,7 +33,7 @@ from {
|
|
|
26
33
|
translate: -50% calc(-100% - 4px);
|
|
27
34
|
transform-origin: bottom center;
|
|
28
35
|
|
|
29
|
-
animation: ${
|
|
36
|
+
animation: ${D} 100ms ease-out;
|
|
30
37
|
|
|
31
38
|
/* path always open */
|
|
32
39
|
.description {
|
|
@@ -35,20 +42,20 @@ from {
|
|
|
35
42
|
|
|
36
43
|
/* shadow */
|
|
37
44
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
|
38
|
-
`,
|
|
45
|
+
`, G = ["folder", "task", "version", "workfile"], nt = ({
|
|
39
46
|
entityType: t,
|
|
40
|
-
entityId:
|
|
41
|
-
projectName:
|
|
42
|
-
pos: { left:
|
|
47
|
+
entityId: i,
|
|
48
|
+
projectName: c,
|
|
49
|
+
pos: { left: e = 0, top: l = 0 } = {},
|
|
43
50
|
projectInfo: r,
|
|
44
51
|
onMouseEnter: d,
|
|
45
52
|
onMouseLeave: u
|
|
46
53
|
}) => {
|
|
47
|
-
const o = Y(), a =
|
|
48
|
-
{ entityType: t, entityId:
|
|
49
|
-
{ skip: !p || !
|
|
54
|
+
const o = Y(), a = c || o?.projectName, p = !!t && G.includes(t), { data: m, isFetching: f } = L(
|
|
55
|
+
{ entityType: t, entityId: i, projectName: a },
|
|
56
|
+
{ skip: !p || !i || !a }
|
|
50
57
|
), n = 220;
|
|
51
|
-
|
|
58
|
+
e + n / 2 > window.innerWidth && (e = window.innerWidth - n / 2);
|
|
52
59
|
const {
|
|
53
60
|
title: h,
|
|
54
61
|
subTitle: T,
|
|
@@ -60,23 +67,23 @@ from {
|
|
|
60
67
|
thumbnailId: b,
|
|
61
68
|
status: E,
|
|
62
69
|
thumbnailHash: P
|
|
63
|
-
} =
|
|
64
|
-
entityId:
|
|
70
|
+
} = m || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), O = m ? z({
|
|
71
|
+
entityId: i || "",
|
|
65
72
|
entityType: t,
|
|
66
73
|
thumbnailHash: P,
|
|
67
74
|
thumbnailId: b,
|
|
68
75
|
projectName: a || "",
|
|
69
76
|
placeholder: "none"
|
|
70
|
-
}) : null,
|
|
77
|
+
}) : null, C = {
|
|
71
78
|
task: j.find((s) => s.name === w)?.icon,
|
|
72
79
|
folder: N.find((s) => s.name === g)?.icon,
|
|
73
80
|
version: o?.getProductType(k).icon,
|
|
74
81
|
workfile: _("workfile")
|
|
75
82
|
};
|
|
76
83
|
return p ? /* @__PURE__ */ I(
|
|
77
|
-
|
|
84
|
+
F,
|
|
78
85
|
{
|
|
79
|
-
style: { left:
|
|
86
|
+
style: { left: e, top: l, maxWidth: n },
|
|
80
87
|
onMouseEnter: d,
|
|
81
88
|
onMouseLeave: u,
|
|
82
89
|
title: h,
|
|
@@ -88,12 +95,12 @@ from {
|
|
|
88
95
|
hidePriority: !0,
|
|
89
96
|
isLoading: f,
|
|
90
97
|
loadingSections: ["header", "title", "users", "status"],
|
|
91
|
-
titleIcon:
|
|
92
|
-
imageUrl:
|
|
98
|
+
titleIcon: C[t || ""],
|
|
99
|
+
imageUrl: O || void 0
|
|
93
100
|
}
|
|
94
101
|
) : null;
|
|
95
102
|
};
|
|
96
103
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
G as E,
|
|
105
|
+
nt as a
|
|
99
106
|
};
|
|
@@ -1,118 +1,60 @@
|
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef as U, useState as h, useEffect as x, useMemo as A } from "react";
|
|
3
3
|
import "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import "react-toastify";
|
|
6
6
|
import "uuid";
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"created",
|
|
24
|
-
"label_changed",
|
|
25
|
-
"renamed",
|
|
26
|
-
"type_changed",
|
|
27
|
-
"status_changed",
|
|
28
|
-
"tags_changed",
|
|
29
|
-
"attrib_changed",
|
|
30
|
-
"deleted"
|
|
31
|
-
].includes(e))
|
|
32
|
-
return e;
|
|
33
|
-
}, Y = ({ children: t, projectNames: e }) => {
|
|
34
|
-
const n = f(0), [l = m(!1), r] = P("autoSync"), [c, o] = x([]);
|
|
35
|
-
U(() => {
|
|
36
|
-
const i = C(
|
|
37
|
-
(a) => {
|
|
38
|
-
const p = a.map(({ project: s, topic: g, updateType: A, message: h }) => ({
|
|
39
|
-
id: ++n.current,
|
|
40
|
-
project: s,
|
|
41
|
-
topic: g,
|
|
42
|
-
updateType: A,
|
|
43
|
-
entityId: h.summary?.entityId,
|
|
44
|
-
message: h
|
|
7
|
+
import { be as f } from "./searchTerms.es.js";
|
|
8
|
+
import { c as I } from "./realtimeUpdatesUtils.es.js";
|
|
9
|
+
import { t as y, m as S, g as T, c as v, E as w } from "./DeleteEntitiesContextInstance.es.js";
|
|
10
|
+
import { u as C } from "./viewUpdateHelper.es.js";
|
|
11
|
+
const P = !0, Y = ({ children: l, projectNames: r }) => {
|
|
12
|
+
const a = U(0), [s = y(!1), p] = C("autoSync"), [u, m] = h([]);
|
|
13
|
+
x(() => {
|
|
14
|
+
const n = I(
|
|
15
|
+
(o) => {
|
|
16
|
+
const e = o.map(({ project: t, topic: i, updateType: b, message: d }) => ({
|
|
17
|
+
id: ++a.current,
|
|
18
|
+
project: t,
|
|
19
|
+
topic: i,
|
|
20
|
+
updateType: b,
|
|
21
|
+
entityId: d.summary?.entityId,
|
|
22
|
+
message: d
|
|
45
23
|
}));
|
|
46
|
-
|
|
24
|
+
m((t) => [...t, ...e]);
|
|
47
25
|
},
|
|
48
|
-
({ key:
|
|
26
|
+
({ key: o }) => String(o),
|
|
49
27
|
0
|
|
50
|
-
),
|
|
51
|
-
if (!
|
|
52
|
-
const
|
|
53
|
-
!
|
|
28
|
+
), c = f.subscribeAll((o, e) => {
|
|
29
|
+
if (!e?.topic || !S(e.project, r)) return;
|
|
30
|
+
const t = T(e.topic);
|
|
31
|
+
!t || s[t];
|
|
54
32
|
});
|
|
55
33
|
return () => {
|
|
56
|
-
|
|
34
|
+
f.unsubscribe(c), n.clear();
|
|
57
35
|
};
|
|
58
|
-
}, [
|
|
59
|
-
const
|
|
36
|
+
}, [s, r]);
|
|
37
|
+
const g = A(
|
|
60
38
|
() => ({
|
|
61
|
-
updates:
|
|
62
|
-
projectNames:
|
|
63
|
-
acknowledge: (
|
|
64
|
-
|
|
65
|
-
(
|
|
66
|
-
(
|
|
39
|
+
updates: u,
|
|
40
|
+
projectNames: r,
|
|
41
|
+
acknowledge: (n, c, o) => {
|
|
42
|
+
m(
|
|
43
|
+
(e) => e.filter(
|
|
44
|
+
(t) => t.id > o || !n.some((i) => v(t.topic, i)) || !S(t.project, c)
|
|
67
45
|
)
|
|
68
46
|
);
|
|
69
47
|
},
|
|
70
|
-
getLatestId: () =>
|
|
71
|
-
autoSyncSettings:
|
|
48
|
+
getLatestId: () => a.current,
|
|
49
|
+
autoSyncSettings: y(!0),
|
|
72
50
|
// force auto sync on always if the flag is set
|
|
73
|
-
setAutoSyncSettings:
|
|
51
|
+
setAutoSyncSettings: p
|
|
74
52
|
}),
|
|
75
|
-
[
|
|
53
|
+
[s, r, p, u]
|
|
76
54
|
);
|
|
77
|
-
return /* @__PURE__ */ E(
|
|
78
|
-
}, $ = ({
|
|
79
|
-
projectNames: t,
|
|
80
|
-
topics: e,
|
|
81
|
-
isSyncing: n = !1,
|
|
82
|
-
shouldSyncOnUpdate: l
|
|
83
|
-
}) => {
|
|
84
|
-
const r = _(S);
|
|
85
|
-
if (!r)
|
|
86
|
-
throw new Error("useSyncUpdates must be used within an EntityUpdatesProvider");
|
|
87
|
-
const c = t || r.projectNames, o = f(0), u = f(!1), i = r.updates.filter(
|
|
88
|
-
(d) => y(d.project, c) && e.some((a) => v(d.topic, a)) && (l?.(d) ?? !0)
|
|
89
|
-
);
|
|
90
|
-
return U(() => {
|
|
91
|
-
n && !u.current ? o.current = r.getLatestId() : !n && u.current && r.acknowledge(e, c, o.current), u.current = n;
|
|
92
|
-
}, [r, n, c, e]), {
|
|
93
|
-
updates: i,
|
|
94
|
-
hasUpdates: i.length > 0,
|
|
95
|
-
updateCount: i.length
|
|
96
|
-
};
|
|
97
|
-
}, q = () => {
|
|
98
|
-
const t = _(S);
|
|
99
|
-
if (!t)
|
|
100
|
-
throw new Error("useAutoSyncSettings must be used within an EntityUpdatesProvider");
|
|
101
|
-
const { autoSyncSettings: e, setAutoSyncSettings: n } = t;
|
|
102
|
-
return [e, (r) => {
|
|
103
|
-
const { settings: c, global: o } = r;
|
|
104
|
-
n(o !== void 0 ? m(o) : (u) => ({ ...u, ...c }));
|
|
105
|
-
}];
|
|
106
|
-
}, z = (t, e) => {
|
|
107
|
-
if (!e) return !1;
|
|
108
|
-
const n = w(t);
|
|
109
|
-
return n ? e[n] : !1;
|
|
55
|
+
return /* @__PURE__ */ E(w.Provider, { value: g, children: l });
|
|
110
56
|
};
|
|
111
57
|
export {
|
|
112
58
|
Y as E,
|
|
113
|
-
|
|
114
|
-
w as a,
|
|
115
|
-
$ as b,
|
|
116
|
-
z as g,
|
|
117
|
-
q as u
|
|
59
|
+
P as F
|
|
118
60
|
};
|