@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,72 +1,80 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { b0 as
|
|
3
|
-
import { W as
|
|
1
|
+
import { useMemo as g, useRef as w, useEffect as x } from "react";
|
|
2
|
+
import { b0 as G, bg as M, aw as N, ax as C, aW as I, bh as A, bi as O } from "./searchTerms.es.js";
|
|
3
|
+
import { W as B, ch as P, cu as q, ao as F, as as Q } from "./getUris.es.js";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
|
-
import { U
|
|
6
|
-
const
|
|
7
|
-
const { entity:
|
|
8
|
-
() =>
|
|
9
|
-
[
|
|
10
|
-
),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
import { U } from "./MetaWidget.es.js";
|
|
6
|
+
const z = [], K = 3, H = (s) => {
|
|
7
|
+
const { entity: i, groupBy: c, extraGroupBys: E, skip: p } = s, n = g(
|
|
8
|
+
() => c ? B(c, i) : null,
|
|
9
|
+
[c, i]
|
|
10
|
+
), h = g(() => {
|
|
11
|
+
if (!n) return;
|
|
12
|
+
const t = /* @__PURE__ */ new Set([n.field]), y = [];
|
|
13
|
+
for (const T of E ?? []) {
|
|
14
|
+
const v = B(T, i);
|
|
15
|
+
v && !t.has(v.field) && (t.add(v.field), y.push(v));
|
|
16
|
+
}
|
|
17
|
+
return [n, ...y];
|
|
18
|
+
}, [n, E, i]), u = !!p || !n, m = s.args.projectName, k = P(
|
|
19
|
+
{ ...s.entity === "task" ? s.args : { projectName: m }, targets: h },
|
|
20
|
+
{ skip: u || s.entity !== "task" }
|
|
21
|
+
), S = q(
|
|
22
|
+
{ ...s.entity === "version" ? s.args : { projectName: m }, targets: h },
|
|
23
|
+
{ skip: u || s.entity !== "version" }
|
|
24
|
+
), e = s.entity === "task" ? k : S, r = e.data ?? z, o = !!e.data, { counts: L, total: a, complete: l } = g(() => {
|
|
25
|
+
const t = F(r, n);
|
|
26
|
+
return t.ungrouped.count > 0 && t.counts.set(U, t.ungrouped), {
|
|
27
|
+
counts: o && t.counts.size > 0 ? t.counts : void 0,
|
|
20
28
|
total: t.total,
|
|
21
29
|
complete: t.complete
|
|
22
30
|
};
|
|
23
|
-
}, [
|
|
24
|
-
return
|
|
25
|
-
d.current.clear();
|
|
26
|
-
}, [
|
|
27
|
-
if (u || !
|
|
28
|
-
const t =
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
d.current.add(t), r.refetch();
|
|
31
|
+
}, [r, n, o]), f = w(/* @__PURE__ */ new Map()), d = w(/* @__PURE__ */ new Set()), R = g(() => JSON.stringify(s.args), [s.args]);
|
|
32
|
+
return x(() => {
|
|
33
|
+
f.current.clear(), d.current.clear();
|
|
34
|
+
}, [R]), x(() => {
|
|
35
|
+
if (u || !n || !o || e.isFetching || l) return;
|
|
36
|
+
const t = n.field;
|
|
37
|
+
if (d.current.has(t)) return;
|
|
38
|
+
if (r.some((T) => T.columnName === Q(t))) {
|
|
39
|
+
d.current.add(t);
|
|
40
|
+
return;
|
|
35
41
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
const y = f.current.get(t) ?? 0;
|
|
43
|
+
y >= K || (f.current.set(t, y + 1), e.refetch());
|
|
44
|
+
}, [u, n, o, e.isFetching, l, r, e.refetch]), {
|
|
45
|
+
counts: L,
|
|
46
|
+
complete: l,
|
|
47
|
+
total: a,
|
|
48
|
+
isLoading: !u && (e.isLoading || e.isFetching),
|
|
49
|
+
isSupported: !!n
|
|
42
50
|
};
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
if (!
|
|
48
|
-
const
|
|
49
|
-
({ name:
|
|
50
|
-
)?.acceptedParams,
|
|
51
|
-
|
|
52
|
-
}), { requests: [...
|
|
53
|
-
}, [
|
|
54
|
-
{ requests:
|
|
55
|
-
{ skip: !
|
|
51
|
+
}, J = (s, { projectName: i, request: c = "all" } = {}) => {
|
|
52
|
+
const E = c === "all" ? "all" : [...c].sort().join("\0"), { data: p, isError: n } = G(), h = !!p || n, { requests: u, keyByName: m } = g(() => {
|
|
53
|
+
const e = c === "all" ? null : new Set(c), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
54
|
+
return s.forEach((a) => {
|
|
55
|
+
if (!M(a.data) || e && !e.has(a.name)) return;
|
|
56
|
+
const l = p?.find(
|
|
57
|
+
({ name: R }) => R === a.data?.enumResolver
|
|
58
|
+
)?.acceptedParams, f = N(a.data, { projectName: i }, l), d = C(f);
|
|
59
|
+
o.set(a.name, d), r.has(d) || r.set(d, f);
|
|
60
|
+
}), { requests: [...r].sort(([a], [l]) => a.localeCompare(l)).map(([, a]) => a), keyByName: o };
|
|
61
|
+
}, [s, E, i, p]), { data: k, isError: S } = I(
|
|
62
|
+
{ requests: u },
|
|
63
|
+
{ skip: !u.length || !h }
|
|
56
64
|
);
|
|
57
|
-
return
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
60
|
-
const
|
|
61
|
-
return
|
|
62
|
-
...
|
|
65
|
+
return g(() => m.size ? s.map((e) => {
|
|
66
|
+
const r = m.get(e.name);
|
|
67
|
+
if (!r) return e;
|
|
68
|
+
const o = k?.[r];
|
|
69
|
+
return o ? {
|
|
70
|
+
...e,
|
|
63
71
|
enumIsLoading: !1,
|
|
64
|
-
enumError:
|
|
65
|
-
data: { ...
|
|
66
|
-
} :
|
|
67
|
-
}) :
|
|
72
|
+
enumError: o.error ? A(o.error) : void 0,
|
|
73
|
+
data: { ...e.data, enum: O(o.items) }
|
|
74
|
+
} : S ? { ...e, enumIsLoading: !1, enumError: A() } : { ...e, enumIsLoading: !0 };
|
|
75
|
+
}) : s, [s, m, k, S]);
|
|
68
76
|
};
|
|
69
77
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
H as a,
|
|
79
|
+
J as u
|
|
72
80
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { registerRemotes as
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as k, useState as m, useEffect as S, useContext as I, useRef as A, useCallback as C, useMemo as E } from "react";
|
|
3
|
+
import { registerRemotes as O, loadRemote as j } from "@module-federation/enhanced/runtime";
|
|
4
4
|
import "./searchTerms.es.js";
|
|
5
|
-
import {
|
|
5
|
+
import { cP as M } from "./getUris.es.js";
|
|
6
6
|
import "primereact/confirmdialog";
|
|
7
7
|
import { u as F } from "./GlobalContext.es.js";
|
|
8
8
|
import D from "semver";
|
|
9
|
-
const x =
|
|
9
|
+
const x = k({
|
|
10
10
|
isLoading: !0,
|
|
11
11
|
modules: [],
|
|
12
12
|
remotesInitialized: !1
|
|
@@ -34,7 +34,7 @@ const x = P({
|
|
|
34
34
|
modules: v
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
|
-
}),
|
|
37
|
+
}), O(
|
|
38
38
|
l.map((s) => ({
|
|
39
39
|
name: s.remote,
|
|
40
40
|
alias: s.remote,
|
|
@@ -42,7 +42,7 @@ const x = P({
|
|
|
42
42
|
type: "module"
|
|
43
43
|
}))
|
|
44
44
|
), i(!0);
|
|
45
|
-
}, [o, c, d, n]), /* @__PURE__ */
|
|
45
|
+
}, [o, c, d, n]), /* @__PURE__ */ P(
|
|
46
46
|
x.Provider,
|
|
47
47
|
{
|
|
48
48
|
value: {
|
|
@@ -231,7 +231,7 @@ const x = P({
|
|
|
231
231
|
description: "Aggregate each column totals, averages, distributions in a summary footer.",
|
|
232
232
|
bullet: "Per-column summary footer"
|
|
233
233
|
}
|
|
234
|
-
}, z =
|
|
234
|
+
}, z = k(void 0), X = ({
|
|
235
235
|
children: e,
|
|
236
236
|
debug: t
|
|
237
237
|
}) => {
|
|
@@ -264,7 +264,7 @@ const x = P({
|
|
|
264
264
|
}
|
|
265
265
|
})();
|
|
266
266
|
}, [t, L, f, u]);
|
|
267
|
-
const
|
|
267
|
+
const R = E(
|
|
268
268
|
() => ({
|
|
269
269
|
powerLicense: p,
|
|
270
270
|
isLoading: w,
|
|
@@ -276,7 +276,7 @@ const x = P({
|
|
|
276
276
|
}),
|
|
277
277
|
[p, o, r, i, w]
|
|
278
278
|
);
|
|
279
|
-
return /* @__PURE__ */
|
|
279
|
+
return /* @__PURE__ */ P(z.Provider, { value: R, children: e });
|
|
280
280
|
}, Y = () => {
|
|
281
281
|
const e = I(z);
|
|
282
282
|
if (e === void 0)
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "./searchTerms.es.js";
|
|
2
|
-
import {
|
|
2
|
+
import { aP as A, dr as D, du as M } from "./getUris.es.js";
|
|
3
3
|
import "primereact/confirmdialog";
|
|
4
4
|
import { g as H, u as T } from "./ViewsContext.es.js";
|
|
5
5
|
import { toast as N } from "react-toastify";
|
|
6
|
-
import { useCallback as v, useState as
|
|
6
|
+
import { useCallback as v, useState as P, useRef as R } from "react";
|
|
7
7
|
import { useStore as U } from "react-redux";
|
|
8
8
|
let m = !1;
|
|
9
9
|
const b = () => {
|
|
10
10
|
m || (m = !0, queueMicrotask(() => {
|
|
11
11
|
m = !1;
|
|
12
12
|
}));
|
|
13
|
-
},
|
|
13
|
+
}, q = async (e, n, o, t = {}, a, u, f, s) => {
|
|
14
14
|
const {
|
|
15
15
|
viewSettings: c,
|
|
16
16
|
viewType: r,
|
|
17
17
|
projectName: V,
|
|
18
18
|
selectedView: i,
|
|
19
|
-
setSelectedView:
|
|
19
|
+
setSelectedView: g,
|
|
20
20
|
workingView: d,
|
|
21
21
|
onSettingsChanged: w,
|
|
22
22
|
isErrorWorkingView: l
|
|
@@ -34,7 +34,7 @@ const b = () => {
|
|
|
34
34
|
}
|
|
35
35
|
const C = { ...I, ...e }, h = H(C), k = W ?? d?.id;
|
|
36
36
|
k && (h.id = k);
|
|
37
|
-
const E = h.id, F =
|
|
37
|
+
const E = h.id, F = u(
|
|
38
38
|
{
|
|
39
39
|
payload: k ? { settings: C } : h,
|
|
40
40
|
viewType: r,
|
|
@@ -42,13 +42,13 @@ const b = () => {
|
|
|
42
42
|
},
|
|
43
43
|
k
|
|
44
44
|
);
|
|
45
|
-
s(), (!y || i?.id !== k) && (i && w(!0),
|
|
45
|
+
s(), (!y || i?.id !== k) && (i && w(!0), g(E)), await F, n(null), t.successMessage && N.success(t.successMessage);
|
|
46
46
|
} catch (S) {
|
|
47
|
-
n(null), p &&
|
|
47
|
+
n(null), p && g(p), i && !y && w(!1);
|
|
48
48
|
const W = t.errorMessage || `Failed to update view settings: ${S}`;
|
|
49
49
|
N.error(W);
|
|
50
50
|
}
|
|
51
|
-
},
|
|
51
|
+
}, x = () => {
|
|
52
52
|
const [e] = A(), [n] = D(), o = T(), t = U(), a = v(
|
|
53
53
|
async (s, c) => {
|
|
54
54
|
if (c) {
|
|
@@ -65,18 +65,18 @@ const b = () => {
|
|
|
65
65
|
return await e(s).unwrap();
|
|
66
66
|
},
|
|
67
67
|
[e, n]
|
|
68
|
-
),
|
|
68
|
+
), u = v(() => {
|
|
69
69
|
const { viewType: s, projectName: c, selectedView: r, workingView: V } = o;
|
|
70
70
|
if (!s) return {};
|
|
71
|
-
const i = t.getState(),
|
|
71
|
+
const i = t.getState(), g = M.endpoints.getWorkingView.select({
|
|
72
72
|
viewType: s,
|
|
73
73
|
projectName: c
|
|
74
|
-
})(i), w =
|
|
74
|
+
})(i), w = g?.data?.id || V?.id, l = M.endpoints.getDefaultView.select({
|
|
75
75
|
viewType: s,
|
|
76
76
|
projectName: c
|
|
77
77
|
})(i), p = l?.data?.id || r?.id;
|
|
78
|
-
return (!!w && p === w || m) &&
|
|
79
|
-
settings:
|
|
78
|
+
return (!!w && p === w || m) && g?.data?.settings ? {
|
|
79
|
+
settings: g.data.settings,
|
|
80
80
|
workingViewId: w
|
|
81
81
|
} : l?.data?.settings ? {
|
|
82
82
|
settings: l.data.settings,
|
|
@@ -85,11 +85,11 @@ const b = () => {
|
|
|
85
85
|
}, [t, o]);
|
|
86
86
|
return {
|
|
87
87
|
updateViewSettings: v(
|
|
88
|
-
async (...s) => await
|
|
89
|
-
[o, a,
|
|
88
|
+
async (...s) => await q(...s, o, a, u, b),
|
|
89
|
+
[o, a, u]
|
|
90
90
|
),
|
|
91
91
|
onCreateView: a,
|
|
92
|
-
getLatestSettings:
|
|
92
|
+
getLatestSettings: u,
|
|
93
93
|
markCacheDirty: b
|
|
94
94
|
};
|
|
95
95
|
}, L = (e, n) => n.split(".").reduce((o, t) => o?.[t], e), j = (e, n, o) => {
|
|
@@ -99,12 +99,12 @@ const b = () => {
|
|
|
99
99
|
[t]: a.length ? j(e[t] || {}, a.join("."), o) : o
|
|
100
100
|
} : e;
|
|
101
101
|
}, X = (e, n) => {
|
|
102
|
-
const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: a, getLatestSettings:
|
|
102
|
+
const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: a, getLatestSettings: u } = x(), [f, s] = P(null), c = R(null), r = o, V = f !== null ? f : L(r, e) ?? n, i = v((d) => {
|
|
103
103
|
c.current = d, s(d);
|
|
104
|
-
}, []),
|
|
104
|
+
}, []), g = v(
|
|
105
105
|
(d) => {
|
|
106
106
|
if (t || !r) return;
|
|
107
|
-
const w =
|
|
107
|
+
const w = u().settings ?? r, l = c.current !== null ? c.current : L(w, e) ?? n, p = typeof d == "function" ? d(
|
|
108
108
|
l
|
|
109
109
|
) : d;
|
|
110
110
|
a(
|
|
@@ -116,7 +116,7 @@ const b = () => {
|
|
|
116
116
|
},
|
|
117
117
|
[
|
|
118
118
|
n,
|
|
119
|
-
|
|
119
|
+
u,
|
|
120
120
|
t,
|
|
121
121
|
e,
|
|
122
122
|
r,
|
|
@@ -124,10 +124,10 @@ const b = () => {
|
|
|
124
124
|
a
|
|
125
125
|
]
|
|
126
126
|
);
|
|
127
|
-
return [V,
|
|
127
|
+
return [V, g];
|
|
128
128
|
};
|
|
129
129
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
x as a,
|
|
131
|
+
q as b,
|
|
132
132
|
X as u
|
|
133
133
|
};
|