@ynput/ayon-frontend-shared 0.6.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 +292 -298
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +32 -35
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4451 -2965
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/chunks/Actions.es.js +9 -4
- 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/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +58 -53
- package/dist/chunks/EntityPickerDialog.es.js +24 -20
- package/dist/chunks/EntityTooltip.es.js +20 -13
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +1495 -1439
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -65
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2835 -4301
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +1532 -1594
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +457 -458
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +163 -154
- package/dist/chunks/TableSettingsFallback.es.js +25 -13
- package/dist/chunks/ThumbnailSimple.es.js +150 -261
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +384 -389
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +61 -16
- package/dist/chunks/getUris.es.js +737 -712
- package/dist/chunks/searchTerms.es.js +57 -56
- package/dist/chunks/useAttributeEnums.es.js +4 -4
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- 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 +67 -50
- package/dist/components.es.js +1425 -999
- package/dist/context.es.js +791 -80
- package/dist/hooks.es.js +115 -120
- package/dist/index.es.js +19 -23
- package/dist/types/Actions.d.ts +7 -7
- package/dist/types/ContextMenu.d.ts +11 -8
- package/dist/types/DetailsPanel.d.ts +102 -9
- package/dist/types/EntityPickerDialog.d.ts +7 -7
- package/dist/types/Feed.d.ts +11 -8
- package/dist/types/ListTable.d.ts +7 -7
- package/dist/types/NewEntity.d.ts +16 -10
- package/dist/types/ProjectTreeTable.d.ts +22 -115
- package/dist/types/RepresentationsList.d.ts +7 -7
- package/dist/types/SimpleTable.d.ts +11 -8
- package/dist/types/Slicer.d.ts +10 -7
- package/dist/types/Views.d.ts +10 -7
- package/dist/types/api.d.ts +132 -120
- package/dist/types/components.d.ts +13 -8
- package/dist/types/context.d.ts +56 -16
- package/dist/types/hooks.d.ts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/util.d.ts +12 -7
- package/dist/util.es.js +72 -71
- package/package.json +1 -1
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- package/dist/chunks/DetailsPanelContext.es.js +0 -155
- 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/uriUtils.es.js +0 -48
- package/dist/chunks/useColumnDragRestriction.es.js +0 -158
- package/dist/chunks/useLocalStorage.es.js +0 -355
- package/dist/chunks/useSessionStorage.es.js +0 -61
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,81 +1,96 @@
|
|
|
1
1
|
import "./searchTerms.es.js";
|
|
2
|
-
import { aP as A, ds as D, dv as
|
|
2
|
+
import { aP as A, ds as D, dv as b } from "./getUris.es.js";
|
|
3
3
|
import "primereact/confirmdialog";
|
|
4
|
-
import {
|
|
5
|
-
import { toast as
|
|
6
|
-
import { useCallback as
|
|
4
|
+
import { v4 as H } from "uuid";
|
|
5
|
+
import { toast as M } from "react-toastify";
|
|
6
|
+
import { useCallback as k, useState as P, useRef as R } from "react";
|
|
7
7
|
import { useStore as U } from "react-redux";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import "react/jsx-runtime";
|
|
9
|
+
import { e as T } from "./DeleteEntitiesContextInstance.es.js";
|
|
10
|
+
import "@ynput/ayon-react-components";
|
|
11
|
+
import "@module-federation/enhanced/runtime";
|
|
12
|
+
import "lodash";
|
|
13
|
+
import "./ContextMenuContextInstance.es.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "semver";
|
|
17
|
+
const q = () => H().replace(/-/g, ""), x = (e = {}) => ({
|
|
18
|
+
id: q(),
|
|
19
|
+
label: "Working",
|
|
20
|
+
working: !0,
|
|
21
|
+
settings: e
|
|
22
|
+
});
|
|
23
|
+
let v = !1;
|
|
24
|
+
const N = () => {
|
|
25
|
+
v || (v = !0, queueMicrotask(() => {
|
|
26
|
+
v = !1;
|
|
12
27
|
}));
|
|
13
|
-
},
|
|
28
|
+
}, $ = async (e, n, o, t = {}, a, g, f, i) => {
|
|
14
29
|
const {
|
|
15
30
|
viewSettings: c,
|
|
16
31
|
viewType: r,
|
|
17
32
|
projectName: V,
|
|
18
|
-
selectedView:
|
|
33
|
+
selectedView: s,
|
|
19
34
|
setSelectedView: u,
|
|
20
35
|
workingView: d,
|
|
21
36
|
onSettingsChanged: w,
|
|
22
37
|
isErrorWorkingView: l
|
|
23
38
|
} = a;
|
|
24
39
|
if (!r) throw new Error("No view type provided for updating view settings");
|
|
25
|
-
const p =
|
|
40
|
+
const p = s?.id, y = s?.working;
|
|
26
41
|
try {
|
|
27
42
|
n(o);
|
|
28
|
-
const { settings: S, workingViewId: W } = f(),
|
|
29
|
-
if (
|
|
43
|
+
const { settings: S, workingViewId: W } = f(), h = S ?? c;
|
|
44
|
+
if (h === void 0 && !l) {
|
|
30
45
|
console.warn(
|
|
31
46
|
"updateViewSettings: no settings baseline available, aborting to prevent data loss."
|
|
32
47
|
);
|
|
33
48
|
return;
|
|
34
49
|
}
|
|
35
|
-
const C = { ...
|
|
36
|
-
|
|
37
|
-
const E =
|
|
50
|
+
const C = { ...h, ...e }, I = x(C), m = W ?? d?.id;
|
|
51
|
+
m && (I.id = m);
|
|
52
|
+
const E = I.id, F = g(
|
|
38
53
|
{
|
|
39
|
-
payload:
|
|
54
|
+
payload: m ? { settings: C } : I,
|
|
40
55
|
viewType: r,
|
|
41
56
|
projectName: V
|
|
42
57
|
},
|
|
43
|
-
|
|
58
|
+
m
|
|
44
59
|
);
|
|
45
|
-
|
|
60
|
+
i(), (!y || s?.id !== m) && (s && w(!0), u(E)), await F, n(null), t.successMessage && M.success(t.successMessage);
|
|
46
61
|
} catch (S) {
|
|
47
|
-
n(null), p && u(p),
|
|
62
|
+
n(null), p && u(p), s && !y && w(!1);
|
|
48
63
|
const W = t.errorMessage || `Failed to update view settings: ${S}`;
|
|
49
|
-
|
|
64
|
+
M.error(W);
|
|
50
65
|
}
|
|
51
|
-
},
|
|
52
|
-
const [e] = A(), [n] = D(), o = T(), t = U(), a =
|
|
53
|
-
async (
|
|
66
|
+
}, z = () => {
|
|
67
|
+
const [e] = A(), [n] = D(), o = T(), t = U(), a = k(
|
|
68
|
+
async (i, c) => {
|
|
54
69
|
if (c) {
|
|
55
70
|
const r = {};
|
|
56
|
-
return ["label", "owner", "settings"].forEach((
|
|
57
|
-
|
|
71
|
+
return ["label", "owner", "settings"].forEach((s) => {
|
|
72
|
+
i.payload[s] !== void 0 && (r[s] = i.payload[s]);
|
|
58
73
|
}), await n({
|
|
59
|
-
viewType:
|
|
60
|
-
projectName:
|
|
74
|
+
viewType: i.viewType,
|
|
75
|
+
projectName: i.projectName,
|
|
61
76
|
viewId: c,
|
|
62
77
|
payload: r
|
|
63
78
|
}).unwrap();
|
|
64
79
|
} else
|
|
65
|
-
return await e(
|
|
80
|
+
return await e(i).unwrap();
|
|
66
81
|
},
|
|
67
82
|
[e, n]
|
|
68
|
-
), g =
|
|
69
|
-
const { viewType:
|
|
70
|
-
if (!
|
|
71
|
-
const
|
|
72
|
-
viewType:
|
|
83
|
+
), g = k(() => {
|
|
84
|
+
const { viewType: i, projectName: c, selectedView: r, workingView: V } = o;
|
|
85
|
+
if (!i) return {};
|
|
86
|
+
const s = t.getState(), u = b.endpoints.getWorkingView.select({
|
|
87
|
+
viewType: i,
|
|
73
88
|
projectName: c
|
|
74
|
-
})(
|
|
75
|
-
viewType:
|
|
89
|
+
})(s), w = u?.data?.id || V?.id, l = b.endpoints.getDefaultView.select({
|
|
90
|
+
viewType: i,
|
|
76
91
|
projectName: c
|
|
77
|
-
})(
|
|
78
|
-
return (!!w && p === w ||
|
|
92
|
+
})(s), p = l?.data?.id || r?.id;
|
|
93
|
+
return (!!w && p === w || v) && u?.data?.settings ? {
|
|
79
94
|
settings: u.data.settings,
|
|
80
95
|
workingViewId: w
|
|
81
96
|
} : l?.data?.settings ? {
|
|
@@ -84,13 +99,13 @@ const b = () => {
|
|
|
84
99
|
} : { workingViewId: w };
|
|
85
100
|
}, [t, o]);
|
|
86
101
|
return {
|
|
87
|
-
updateViewSettings:
|
|
88
|
-
async (...
|
|
102
|
+
updateViewSettings: k(
|
|
103
|
+
async (...i) => await $(...i, o, a, g, N),
|
|
89
104
|
[o, a, g]
|
|
90
105
|
),
|
|
91
106
|
onCreateView: a,
|
|
92
107
|
getLatestSettings: g,
|
|
93
|
-
markCacheDirty:
|
|
108
|
+
markCacheDirty: N
|
|
94
109
|
};
|
|
95
110
|
}, L = (e, n) => n.split(".").reduce((o, t) => o?.[t], e), j = (e, n, o) => {
|
|
96
111
|
const [t, ...a] = n.split(".");
|
|
@@ -98,10 +113,10 @@ const b = () => {
|
|
|
98
113
|
...e,
|
|
99
114
|
[t]: a.length ? j(e[t] || {}, a.join("."), o) : o
|
|
100
115
|
} : e;
|
|
101
|
-
},
|
|
102
|
-
const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: a, getLatestSettings: g } =
|
|
103
|
-
c.current = d,
|
|
104
|
-
}, []), u =
|
|
116
|
+
}, ae = (e, n) => {
|
|
117
|
+
const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: a, getLatestSettings: g } = z(), [f, i] = P(null), c = R(null), r = o, V = f !== null ? f : L(r, e) ?? n, s = k((d) => {
|
|
118
|
+
c.current = d, i(d);
|
|
119
|
+
}, []), u = k(
|
|
105
120
|
(d) => {
|
|
106
121
|
if (t || !r) return;
|
|
107
122
|
const w = g().settings ?? r, l = c.current !== null ? c.current : L(w, e) ?? n, p = typeof d == "function" ? d(
|
|
@@ -109,7 +124,7 @@ const b = () => {
|
|
|
109
124
|
) : d;
|
|
110
125
|
a(
|
|
111
126
|
j(w, e, p),
|
|
112
|
-
|
|
127
|
+
s,
|
|
113
128
|
p,
|
|
114
129
|
{}
|
|
115
130
|
);
|
|
@@ -120,14 +135,16 @@ const b = () => {
|
|
|
120
135
|
t,
|
|
121
136
|
e,
|
|
122
137
|
r,
|
|
123
|
-
|
|
138
|
+
s,
|
|
124
139
|
a
|
|
125
140
|
]
|
|
126
141
|
);
|
|
127
142
|
return [V, u];
|
|
128
143
|
};
|
|
129
144
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
145
|
+
z as a,
|
|
146
|
+
$ as b,
|
|
147
|
+
q as c,
|
|
148
|
+
x as g,
|
|
149
|
+
ae as u
|
|
133
150
|
};
|