@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
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { jsx as r, jsxs as q } from "react/jsx-runtime";
|
|
2
2
|
import { Button as G, Dropdown as de, Icon as E, DefaultValueTemplate as ue, Spacer as pe } from "@ynput/ayon-react-components";
|
|
3
3
|
import x, { keyframes as ge } from "styled-components";
|
|
4
|
-
import { useRef as fe, useMemo as f, useState as
|
|
5
|
-
import
|
|
4
|
+
import { useRef as fe, useMemo as f, useState as $, useEffect as me } from "react";
|
|
5
|
+
import B from "clsx";
|
|
6
6
|
import { toast as w } from "react-toastify";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { bi as he } from "./searchTerms.es.js";
|
|
8
|
+
import { d0 as be, bb as ve, cP as ye, bc as xe, b7 as Ae } from "./getUris.es.js";
|
|
9
9
|
import "primereact/confirmdialog";
|
|
10
10
|
import { upperFirst as Q } from "lodash";
|
|
11
11
|
import { u as we } from "./useActionTriggers.es.js";
|
|
12
12
|
import { S as R } from "./SimpleFormDialog.es.js";
|
|
13
13
|
import "uuid";
|
|
14
|
-
import
|
|
14
|
+
import "@module-federation/enhanced/runtime";
|
|
15
|
+
import { d as Ce } from "./DeleteEntitiesContextInstance.es.js";
|
|
16
|
+
import "semver";
|
|
17
|
+
import "./ContextMenuContextInstance.es.js";
|
|
18
|
+
import "react-dom";
|
|
19
|
+
import "react-redux";
|
|
15
20
|
const Se = x.div`
|
|
16
21
|
position: relative;
|
|
17
22
|
width: fit-content;
|
|
@@ -109,7 +114,7 @@ const Se = x.div`
|
|
|
109
114
|
`, U = ({ icon: o, isExecuting: s }) => {
|
|
110
115
|
let a;
|
|
111
116
|
return s ? a = /* @__PURE__ */ r(Ee, { icon: "sync" }) : o?.type === "material-symbols" && o?.name ? a = /* @__PURE__ */ r(E, { icon: o.name, style: { color: o.color } }) : o?.type === "url" ? a = /* @__PURE__ */ r("img", { src: o.url, title: "Action" }) : a = /* @__PURE__ */ r(E, { icon: "category" }), a;
|
|
112
|
-
},
|
|
117
|
+
}, Be = x.div`
|
|
113
118
|
display: flex;
|
|
114
119
|
flex-direction: row;
|
|
115
120
|
width: 100%;
|
|
@@ -127,7 +132,7 @@ const Se = x.div`
|
|
|
127
132
|
visibility: visible;
|
|
128
133
|
}
|
|
129
134
|
}
|
|
130
|
-
`,
|
|
135
|
+
`, Fe = ({
|
|
131
136
|
value: o,
|
|
132
137
|
label: s,
|
|
133
138
|
icon: a,
|
|
@@ -135,7 +140,7 @@ const Se = x.div`
|
|
|
135
140
|
hasConfig: p,
|
|
136
141
|
description: b,
|
|
137
142
|
onConfig: c
|
|
138
|
-
}) => u ? /* @__PURE__ */ r(ke, { children: Q(s) }) : /* @__PURE__ */ r(De, { children: /* @__PURE__ */ q(
|
|
143
|
+
}) => u ? /* @__PURE__ */ r(ke, { children: Q(s) }) : /* @__PURE__ */ r(De, { children: /* @__PURE__ */ q(Be, { "data-tooltip": b || "", "data-tooltip-delay": 0, children: [
|
|
139
144
|
/* @__PURE__ */ r(U, { icon: a }),
|
|
140
145
|
/* @__PURE__ */ r("span", { children: s }),
|
|
141
146
|
/* @__PURE__ */ r(pe, {}),
|
|
@@ -150,7 +155,7 @@ const Se = x.div`
|
|
|
150
155
|
style: { background: "none", padding: 0 }
|
|
151
156
|
}
|
|
152
157
|
)
|
|
153
|
-
] }) }),
|
|
158
|
+
] }) }), Oe = ({
|
|
154
159
|
options: o,
|
|
155
160
|
isLoading: s,
|
|
156
161
|
bundleMode: a,
|
|
@@ -167,12 +172,12 @@ const Se = x.div`
|
|
|
167
172
|
{
|
|
168
173
|
ref: d,
|
|
169
174
|
disabled: s,
|
|
170
|
-
className:
|
|
175
|
+
className: B("more", a),
|
|
171
176
|
options: o,
|
|
172
177
|
maxOptionsShown: 100,
|
|
173
178
|
value: [],
|
|
174
179
|
placeholder: "",
|
|
175
|
-
itemTemplate: (g) => /* @__PURE__ */ r(
|
|
180
|
+
itemTemplate: (g) => /* @__PURE__ */ r(Fe, { ...g, onConfig: m }),
|
|
176
181
|
valueTemplate: () => /* @__PURE__ */ r(ue, { placeholder: "", value: [], dropIcon: "category" }),
|
|
177
182
|
onChange: (g) => p(g[0]),
|
|
178
183
|
buttonProps: {
|
|
@@ -246,7 +251,7 @@ const Se = x.div`
|
|
|
246
251
|
isPlaceholder: !0,
|
|
247
252
|
icon: { type: "material-symbols", name: "sync" },
|
|
248
253
|
groupLabel: ""
|
|
249
|
-
},
|
|
254
|
+
}, oo = ({
|
|
250
255
|
entities: o,
|
|
251
256
|
entityType: s,
|
|
252
257
|
entitySubTypes: a,
|
|
@@ -260,7 +265,7 @@ const Se = x.div`
|
|
|
260
265
|
align: z,
|
|
261
266
|
pt: H
|
|
262
267
|
}) => {
|
|
263
|
-
const { user:
|
|
268
|
+
const { user: F } = Ce(), { handleActionPayload: J } = we({ onNavigate: m, onSetSearchParams: g, searchParams: b }), [K, O] = $(null), [W, S] = $(null), C = f(() => {
|
|
264
269
|
if (p)
|
|
265
270
|
return {
|
|
266
271
|
entityType: "project",
|
|
@@ -284,8 +289,8 @@ const Se = x.div`
|
|
|
284
289
|
), I = X?.bundles || [], V = f(() => {
|
|
285
290
|
if (!I?.length || d !== "developer") return null;
|
|
286
291
|
const e = I.filter((t) => t.isDev);
|
|
287
|
-
return e.length ? e.find((t) => t.activeUser ===
|
|
288
|
-
}, [I, d,
|
|
292
|
+
return e.length ? e.find((t) => t.activeUser === F?.name)?.name || e[0].name : null;
|
|
293
|
+
}, [I, d, F?.name]), j = f(() => d === "developer" ? V || "developer" : d, [d, V]), { data: Z, isFetching: M } = xe(
|
|
289
294
|
{
|
|
290
295
|
mode: "simple",
|
|
291
296
|
variant: j,
|
|
@@ -302,9 +307,9 @@ const Se = x.div`
|
|
|
302
307
|
)
|
|
303
308
|
],
|
|
304
309
|
[h]
|
|
305
|
-
),
|
|
310
|
+
), T = [...L, ...P], ee = f(() => {
|
|
306
311
|
const e = [];
|
|
307
|
-
return
|
|
312
|
+
return T.forEach((n) => {
|
|
308
313
|
if (!h[n] || !h[n].length) return;
|
|
309
314
|
e.push({
|
|
310
315
|
label: n,
|
|
@@ -328,7 +333,7 @@ const Se = x.div`
|
|
|
328
333
|
}), e;
|
|
329
334
|
}, [h, P, L]), oe = f(() => {
|
|
330
335
|
let e = A.filter((n) => n.featured).sort((n, t) => (n.order || 0) - (t.order || 0)).slice(0, c);
|
|
331
|
-
return e.length < c &&
|
|
336
|
+
return e.length < c && T.forEach((n) => {
|
|
332
337
|
if (e.length >= c) return;
|
|
333
338
|
const t = h[n];
|
|
334
339
|
if (!(!t || !t.length))
|
|
@@ -350,11 +355,11 @@ const Se = x.div`
|
|
|
350
355
|
addonVersion: i.addonVersion,
|
|
351
356
|
variant: i.variant,
|
|
352
357
|
identifier: i.identifier
|
|
353
|
-
},
|
|
354
|
-
t && (
|
|
358
|
+
}, _ = { ...C };
|
|
359
|
+
t && (_.formData = t);
|
|
355
360
|
let l = null;
|
|
356
361
|
try {
|
|
357
|
-
l = await ne({ actionContext:
|
|
362
|
+
l = await ne({ actionContext: _, ...v }).unwrap();
|
|
358
363
|
} catch (y) {
|
|
359
364
|
w.error(he(y) || "Error executing action");
|
|
360
365
|
return;
|
|
@@ -385,18 +390,18 @@ const Se = x.div`
|
|
|
385
390
|
}
|
|
386
391
|
}, ae = (e) => {
|
|
387
392
|
const n = A.find((t) => t.identifier === e);
|
|
388
|
-
n &&
|
|
393
|
+
n && O(n);
|
|
389
394
|
}, se = async (e, n) => {
|
|
390
395
|
D(e, null, n);
|
|
391
396
|
}, le = f(
|
|
392
397
|
() => Array(c).fill(N),
|
|
393
398
|
[c, N]
|
|
394
399
|
), k = M || u, ce = k ? le : oe;
|
|
395
|
-
return /* @__PURE__ */ q(Se, { className:
|
|
400
|
+
return /* @__PURE__ */ q(Se, { className: B("actions", { loading: k }), children: [
|
|
396
401
|
ce.map((e, n) => /* @__PURE__ */ r(
|
|
397
402
|
Ie,
|
|
398
403
|
{
|
|
399
|
-
className:
|
|
404
|
+
className: B("action", {
|
|
400
405
|
isPlaceholder: e.isPlaceholder
|
|
401
406
|
}),
|
|
402
407
|
"data-tooltip": e.groupLabel ? e.groupLabel + " " + e.label : e.label,
|
|
@@ -407,7 +412,7 @@ const Se = x.div`
|
|
|
407
412
|
e.identifier + "-" + n
|
|
408
413
|
)),
|
|
409
414
|
/* @__PURE__ */ r(
|
|
410
|
-
|
|
415
|
+
Oe,
|
|
411
416
|
{
|
|
412
417
|
options: ee,
|
|
413
418
|
isLoading: k && c > 0 || Y,
|
|
@@ -424,7 +429,7 @@ const Se = x.div`
|
|
|
424
429
|
{
|
|
425
430
|
action: K,
|
|
426
431
|
context: C,
|
|
427
|
-
onClose: () =>
|
|
432
|
+
onClose: () => O(null)
|
|
428
433
|
}
|
|
429
434
|
),
|
|
430
435
|
/* @__PURE__ */ r(
|
|
@@ -438,5 +443,5 @@ const Se = x.div`
|
|
|
438
443
|
] });
|
|
439
444
|
};
|
|
440
445
|
export {
|
|
441
|
-
|
|
446
|
+
oo as A
|
|
442
447
|
};
|