@ynput/ayon-frontend-shared 0.4.7 → 0.6.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 -649
- package/dist/Feed.es.js +22 -22
- package/dist/ListTable.es.js +78 -67
- package/dist/ProjectTreeTable.es.js +2185 -2132
- package/dist/Slicer.es.js +152 -120
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +332 -329
- package/dist/chunks/Actions.es.js +7 -7
- package/dist/chunks/ColumnDropIndicator.es.js +127 -241
- package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/DetailsPanelContext.es.js +155 -0
- package/dist/chunks/EntityPath.es.js +40 -40
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +3 -3
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +2208 -2611
- package/dist/chunks/FilterErrorActions.es.js +5 -5
- package/dist/chunks/GlobalContext.es.js +21 -21
- package/dist/chunks/InfoMessage.es.js +146 -0
- package/dist/chunks/Menu.es.js +6 -6
- package/dist/chunks/MenuContext.es.js +51 -240
- package/dist/chunks/MenuItem.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +3211 -3761
- package/dist/chunks/NewEntityContext.es.js +539 -544
- package/dist/chunks/PlayableIcon.es.js +4261 -1163
- package/dist/chunks/ProjectContext.es.js +2 -2
- package/dist/chunks/ProjectFoldersContext.es.js +84 -76
- package/dist/chunks/RepresentationsList.es.js +3 -3
- package/dist/chunks/ReviewablesSelector.es.js +396 -384
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +286 -283
- package/dist/chunks/Slicer.es.js +1129 -689
- package/dist/chunks/TableSettingsFallback.es.js +6 -6
- package/dist/chunks/ThumbnailSimple.es.js +410 -61
- package/dist/chunks/VersionUploadContext.es.js +30 -30
- package/dist/chunks/ViewsContext.es.js +97 -97
- package/dist/chunks/Watchers.es.js +628 -598
- package/dist/chunks/entityDefinitions.es.js +276 -134
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/getBundleMode.es.js +16 -61
- package/dist/chunks/getUris.es.js +329 -322
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +186 -173
- package/dist/chunks/uriUtils.es.js +48 -0
- package/dist/chunks/useAttributeEnums.es.js +69 -61
- package/dist/chunks/useColumnDragRestriction.es.js +37 -27
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useLocalStorage.es.js +8 -8
- package/dist/chunks/useSessionStorage.es.js +61 -0
- package/dist/chunks/viewUpdateHelper.es.js +8 -8
- package/dist/components.es.js +199 -194
- package/dist/context.es.js +60 -58
- package/dist/hooks.es.js +108 -101
- package/dist/index.es.js +20 -14
- package/dist/types/Actions.d.ts +16 -16
- package/dist/types/ContextMenu.d.ts +16 -16
- package/dist/types/DetailsPanel.d.ts +22 -16
- package/dist/types/EntityPickerDialog.d.ts +16 -16
- package/dist/types/Feed.d.ts +16 -16
- package/dist/types/ListTable.d.ts +16 -16
- package/dist/types/NewEntity.d.ts +16 -16
- package/dist/types/ProjectTreeTable.d.ts +48 -22
- package/dist/types/RepresentationsList.d.ts +19 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +119 -34
- package/dist/types/Views.d.ts +17 -17
- package/dist/types/api.d.ts +404 -95
- package/dist/types/components.d.ts +86 -25
- package/dist/types/context.d.ts +60 -17
- package/dist/types/hooks.d.ts +16 -16
- package/dist/types/index.d.ts +16 -16
- package/dist/types/util.d.ts +16 -16
- package/dist/util.es.js +108 -97
- package/package.json +26 -13
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useSlicerSplitter.es.js +0 -18
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as E,
|
|
2
|
+
import { createContext as E, useContext as T, useCallback as a } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { c2 as G, b$ as Q, dy as F } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
6
|
import "lodash";
|
|
7
7
|
import "react-toastify";
|
|
@@ -1,90 +1,98 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as k, useState as z, useEffect as B, useMemo as a, useContext as E } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { bJ as N } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
|
-
import { P as
|
|
7
|
-
const Q = (
|
|
8
|
-
const d =
|
|
9
|
-
return
|
|
10
|
-
const
|
|
11
|
-
!
|
|
12
|
-
}, [Object.values(
|
|
13
|
-
},
|
|
14
|
-
projectName:
|
|
15
|
-
children:
|
|
6
|
+
import { P as y } from "./ProjectFoldersContextInstance.es.js";
|
|
7
|
+
const Q = (s, h) => {
|
|
8
|
+
const d = k(null), [b, l] = z(!1);
|
|
9
|
+
return B(() => {
|
|
10
|
+
const u = d.current;
|
|
11
|
+
!u || Object.keys(s).some((c) => u[c] !== s[c]) || Object.keys(u).some((c) => u[c] !== s[c]) ? (d.current = { ...s }, l(h)) : h || l(!1);
|
|
12
|
+
}, [Object.values(s).join(","), h]), b;
|
|
13
|
+
}, D = ({
|
|
14
|
+
projectName: s,
|
|
15
|
+
children: h
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
18
|
data: { folders: d = [] } = {},
|
|
19
19
|
isLoading: b,
|
|
20
20
|
isFetching: l,
|
|
21
|
-
isSuccess:
|
|
21
|
+
isSuccess: u,
|
|
22
22
|
isUninitialized: w,
|
|
23
23
|
error: c,
|
|
24
24
|
refetch: S
|
|
25
|
-
} = N({ projectName:
|
|
26
|
-
const
|
|
27
|
-
for (const
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
}, [d]),
|
|
31
|
-
() => (
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
let
|
|
35
|
-
for (; o.size > 0 &&
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
for (const
|
|
41
|
-
|
|
42
|
-
([O]) => O ===
|
|
43
|
-
)?.[1], o.delete(
|
|
44
|
-
|
|
25
|
+
} = N({ projectName: s, attrib: !0 }), F = Q({ projectName: s }, l || b), f = a(() => {
|
|
26
|
+
const e = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const t of d)
|
|
28
|
+
e.set(t.id, t);
|
|
29
|
+
return e;
|
|
30
|
+
}, [d]), P = a(() => (e) => f.get(e), [f]), C = a(
|
|
31
|
+
() => (e, t, n = {}) => {
|
|
32
|
+
if (!t.length) return {};
|
|
33
|
+
const r = {}, o = new Set(t), p = /* @__PURE__ */ new Set();
|
|
34
|
+
let g = e;
|
|
35
|
+
for (; o.size > 0 && g && !p.has(g); ) {
|
|
36
|
+
p.add(g);
|
|
37
|
+
const i = f.get(g);
|
|
38
|
+
if (!i) break;
|
|
39
|
+
const L = i.attrib || {};
|
|
40
|
+
for (const m of Array.from(o))
|
|
41
|
+
i.ownAttrib?.includes(m) && m in L && (r[m] = Object.entries(L).find(
|
|
42
|
+
([O]) => O === m
|
|
43
|
+
)?.[1], o.delete(m));
|
|
44
|
+
g = i.parentId;
|
|
45
45
|
}
|
|
46
|
-
for (const
|
|
47
|
-
|
|
48
|
-
for (const
|
|
49
|
-
|
|
50
|
-
return
|
|
46
|
+
for (const i of Array.from(o))
|
|
47
|
+
i in n && (r[i] = n[i], o.delete(i));
|
|
48
|
+
for (const i of o)
|
|
49
|
+
r[i] = null;
|
|
50
|
+
return r;
|
|
51
51
|
},
|
|
52
52
|
[f]
|
|
53
|
-
), I =
|
|
54
|
-
() => (
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
for (;
|
|
58
|
-
|
|
59
|
-
const o = f.get(
|
|
53
|
+
), I = a(
|
|
54
|
+
() => (e) => {
|
|
55
|
+
const t = [], n = /* @__PURE__ */ new Set();
|
|
56
|
+
let r = e;
|
|
57
|
+
for (; r && !n.has(r); ) {
|
|
58
|
+
n.add(r);
|
|
59
|
+
const o = f.get(r);
|
|
60
60
|
if (!o?.parentId) break;
|
|
61
|
-
|
|
61
|
+
t.push(o.parentId), r = o.parentId;
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return t;
|
|
64
64
|
},
|
|
65
65
|
[f]
|
|
66
|
-
), v =
|
|
67
|
-
() => (
|
|
68
|
-
const
|
|
69
|
-
return
|
|
66
|
+
), v = a(
|
|
67
|
+
() => (e) => {
|
|
68
|
+
const t = new Set(e);
|
|
69
|
+
return e.filter((n) => !I(n).some((r) => t.has(r)));
|
|
70
70
|
},
|
|
71
71
|
[I]
|
|
72
|
-
),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
), x = a(() => {
|
|
73
|
+
const e = /* @__PURE__ */ new Map();
|
|
74
|
+
for (const t of d) {
|
|
75
|
+
if (!t.parentId) continue;
|
|
76
|
+
const n = e.get(t.parentId);
|
|
77
|
+
n ? n.push(t.id) : e.set(t.parentId, [t.id]);
|
|
78
|
+
}
|
|
79
|
+
return e;
|
|
80
|
+
}, [d]), j = a(
|
|
81
|
+
() => (e, t = !1) => {
|
|
82
|
+
const n = t ? [...e] : [], r = [...e];
|
|
83
|
+
for (; r.length > 0; ) {
|
|
84
|
+
const o = r.shift();
|
|
85
|
+
for (const p of x.get(o) || [])
|
|
86
|
+
n.push(p), r.push(p);
|
|
79
87
|
}
|
|
80
|
-
return
|
|
88
|
+
return n;
|
|
81
89
|
},
|
|
82
|
-
[
|
|
83
|
-
),
|
|
90
|
+
[x]
|
|
91
|
+
), A = () => S().unwrap(), M = a(
|
|
84
92
|
() => ({
|
|
85
93
|
folders: d,
|
|
86
|
-
getFolderById:
|
|
87
|
-
findNonInheritedValues:
|
|
94
|
+
getFolderById: P,
|
|
95
|
+
findNonInheritedValues: C,
|
|
88
96
|
getParentFolderIds: I,
|
|
89
97
|
getFolderIdsWithoutChildren: v,
|
|
90
98
|
getChildFolderIds: j,
|
|
@@ -92,35 +100,35 @@ const Q = (n, p) => {
|
|
|
92
100
|
// first time and when args change
|
|
93
101
|
isFetching: l,
|
|
94
102
|
// any background fetching
|
|
95
|
-
isSuccess:
|
|
103
|
+
isSuccess: u,
|
|
96
104
|
isUninitialized: w,
|
|
97
105
|
error: c,
|
|
98
|
-
refetch:
|
|
106
|
+
refetch: A
|
|
99
107
|
}),
|
|
100
108
|
[
|
|
101
109
|
d,
|
|
102
|
-
C,
|
|
103
110
|
P,
|
|
111
|
+
C,
|
|
104
112
|
I,
|
|
105
113
|
v,
|
|
106
114
|
j,
|
|
107
115
|
F,
|
|
108
116
|
l,
|
|
109
|
-
|
|
117
|
+
u,
|
|
110
118
|
w,
|
|
111
119
|
c,
|
|
112
|
-
|
|
120
|
+
A
|
|
113
121
|
]
|
|
114
122
|
);
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
123
|
+
return /* @__PURE__ */ R(y.Provider, { value: M, children: h });
|
|
124
|
+
}, H = () => {
|
|
125
|
+
const s = E(y);
|
|
126
|
+
if (s === void 0)
|
|
119
127
|
throw new Error("useProjectFoldersContext must be used within a ProjectFoldersContextProvider");
|
|
120
|
-
return
|
|
128
|
+
return s;
|
|
121
129
|
};
|
|
122
130
|
export {
|
|
123
|
-
|
|
131
|
+
D as P,
|
|
124
132
|
Q as a,
|
|
125
|
-
|
|
133
|
+
H as u
|
|
126
134
|
};
|
|
@@ -12,7 +12,7 @@ import "uuid";
|
|
|
12
12
|
import "./searchTerms.es.js";
|
|
13
13
|
import { a as E } from "./useCreateContextMenu.es.js";
|
|
14
14
|
import { D as F } from "./DetailsDialog.es.js";
|
|
15
|
-
import {
|
|
15
|
+
import { b$ as H } from "./getUris.es.js";
|
|
16
16
|
const I = (d = []) => {
|
|
17
17
|
let n = [];
|
|
18
18
|
for (const t of d) {
|
|
@@ -52,7 +52,7 @@ const I = (d = []) => {
|
|
|
52
52
|
header: "productType",
|
|
53
53
|
width: 110
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], Z = ({ entities: d = [] }) => {
|
|
56
56
|
const n = u(() => I(d) || [], [d]), [t, s] = w(!1), c = n.find((e) => e.id === t)?.projectName, [a, p] = w([]), b = u(() => S(n, "name"), [n]), f = (e) => {
|
|
57
57
|
p([e]);
|
|
58
58
|
}, x = (e) => {
|
|
@@ -126,5 +126,5 @@ const I = (d = []) => {
|
|
|
126
126
|
] });
|
|
127
127
|
};
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
Z as R
|
|
130
130
|
};
|