@ynput/ayon-frontend-shared 0.6.9 → 0.7.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 +44 -27
- package/dist/DetailsPanel.es.js +767 -740
- package/dist/ListTable.es.js +430 -430
- package/dist/NewEntity.es.js +43 -42
- package/dist/ProjectTreeTable.es.js +3496 -3342
- package/dist/Slicer.es.js +301 -276
- package/dist/Views.es.js +537 -521
- package/dist/api.es.js +429 -412
- package/dist/chunks/Actions.es.js +19 -18
- package/dist/chunks/ColumnDropIndicator.es.js +19 -18
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
- package/dist/chunks/DetailsDialog.es.js +26 -24
- package/dist/chunks/EmptyPlaceholder.es.js +3 -3
- package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
- package/dist/chunks/EntityPath.es.js +72 -71
- package/dist/chunks/EntityPickerDialog.es.js +88 -83
- package/dist/chunks/EntityTooltip.es.js +11 -10
- package/dist/chunks/EntityUpdatesContext.es.js +11 -11
- package/dist/chunks/Feed.es.js +864 -859
- package/dist/chunks/FilterErrorActions.es.js +4 -3
- package/dist/chunks/Menu.es.js +633 -289
- package/dist/chunks/MenuContext.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +2751 -2217
- package/dist/chunks/PlayableIcon.es.js +79 -78
- package/dist/chunks/ProjectContext.es.js +7 -7
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +625 -609
- package/dist/chunks/SimpleForm.es.js +1 -1
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +954 -821
- package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
- package/dist/chunks/TableSettingsFallback.es.js +4 -3
- package/dist/chunks/ThumbnailSimple.es.js +96 -95
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +850 -797
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getEntityTypeIcon.es.js +5 -4
- package/dist/chunks/getUris.es.js +3704 -3504
- package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
- package/dist/chunks/searchTerms.es.js +649 -563
- package/dist/chunks/sortLists.es.js +22 -0
- package/dist/chunks/useAttributeEnums.es.js +21 -21
- package/dist/chunks/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +19 -18
- package/dist/components.es.js +628 -593
- package/dist/context.es.js +525 -499
- package/dist/hooks.es.js +54 -53
- package/dist/index.es.js +4 -4
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +144 -14
- package/dist/types/SimpleTable.d.ts +2 -1
- package/dist/types/Slicer.d.ts +32 -5
- package/dist/types/Views.d.ts +6 -0
- package/dist/types/api.d.ts +2252 -510
- package/dist/types/components.d.ts +52 -4
- package/dist/types/context.d.ts +96 -2
- package/dist/types/hooks.d.ts +36 -1
- package/dist/types/util.d.ts +54 -0
- package/dist/util.es.js +129 -119
- package/package.json +4 -4
- package/dist/chunks/MenuItem.es.js +0 -420
|
@@ -4,19 +4,20 @@ import x, { keyframes as ge } from "styled-components";
|
|
|
4
4
|
import { useRef as fe, useMemo as f, useState as $, useEffect as me } from "react";
|
|
5
5
|
import B from "clsx";
|
|
6
6
|
import { toast as w } from "react-toastify";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { bt as he } from "./searchTerms.es.js";
|
|
8
|
+
import { da as be, bg as ve, cY as ye, bh as xe, bc 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
14
|
import "@module-federation/enhanced/runtime";
|
|
15
|
-
import { d as Ce } from "./
|
|
15
|
+
import { d as Ce } from "./TableExportContextInstance.es.js";
|
|
16
16
|
import "semver";
|
|
17
17
|
import "./ContextMenuContextInstance.es.js";
|
|
18
18
|
import "react-dom";
|
|
19
19
|
import "react-redux";
|
|
20
|
+
import "react-router-dom";
|
|
20
21
|
const Se = x.div`
|
|
21
22
|
position: relative;
|
|
22
23
|
width: fit-content;
|
|
@@ -188,7 +189,7 @@ const Se = x.div`
|
|
|
188
189
|
...c
|
|
189
190
|
}
|
|
190
191
|
);
|
|
191
|
-
},
|
|
192
|
+
}, Ve = ({ action: o, onClose: s, context: a }) => {
|
|
192
193
|
const u = f(() => !o || !(o.addonName && o.addonVersion) ? null : {
|
|
193
194
|
addonName: o.addonName,
|
|
194
195
|
addonVersion: o.addonVersion,
|
|
@@ -222,7 +223,7 @@ const Se = x.div`
|
|
|
222
223
|
cancelIcon: "close"
|
|
223
224
|
}
|
|
224
225
|
);
|
|
225
|
-
},
|
|
226
|
+
}, je = ({
|
|
226
227
|
interactiveForm: o,
|
|
227
228
|
onClose: s,
|
|
228
229
|
onSubmit: a
|
|
@@ -251,7 +252,7 @@ const Se = x.div`
|
|
|
251
252
|
isPlaceholder: !0,
|
|
252
253
|
icon: { type: "material-symbols", name: "sync" },
|
|
253
254
|
groupLabel: ""
|
|
254
|
-
},
|
|
255
|
+
}, no = ({
|
|
255
256
|
entities: o,
|
|
256
257
|
entityType: s,
|
|
257
258
|
entitySubTypes: a,
|
|
@@ -265,7 +266,7 @@ const Se = x.div`
|
|
|
265
266
|
align: z,
|
|
266
267
|
pt: H
|
|
267
268
|
}) => {
|
|
268
|
-
const { user: F } = Ce(), { handleActionPayload: J } = we({ onNavigate: m, onSetSearchParams: g, searchParams: b }), [
|
|
269
|
+
const { user: F } = Ce(), { handleActionPayload: J } = we({ onNavigate: m, onSetSearchParams: g, searchParams: b }), [Y, O] = $(null), [K, S] = $(null), C = f(() => {
|
|
269
270
|
if (p)
|
|
270
271
|
return {
|
|
271
272
|
entityType: "project",
|
|
@@ -283,17 +284,17 @@ const Se = x.div`
|
|
|
283
284
|
me(() => {
|
|
284
285
|
S(null);
|
|
285
286
|
}, [JSON.stringify(C)]);
|
|
286
|
-
const { data:
|
|
287
|
+
const { data: W, isFetching: X } = ye(
|
|
287
288
|
{ archived: !1 },
|
|
288
289
|
{ skip: d !== "developer" }
|
|
289
|
-
), I =
|
|
290
|
+
), I = W?.bundles || [], V = f(() => {
|
|
290
291
|
if (!I?.length || d !== "developer") return null;
|
|
291
292
|
const e = I.filter((t) => t.isDev);
|
|
292
293
|
return e.length ? e.find((t) => t.activeUser === F?.name)?.name || e[0].name : null;
|
|
293
|
-
}, [I, d, F?.name]),
|
|
294
|
+
}, [I, d, F?.name]), j = f(() => d === "developer" ? V || "developer" : d, [d, V]), { data: Z, isFetching: M } = xe(
|
|
294
295
|
{
|
|
295
296
|
mode: "simple",
|
|
296
|
-
variant:
|
|
297
|
+
variant: j,
|
|
297
298
|
actionContext: C
|
|
298
299
|
},
|
|
299
300
|
{ skip: !C }
|
|
@@ -415,27 +416,27 @@ const Se = x.div`
|
|
|
415
416
|
Oe,
|
|
416
417
|
{
|
|
417
418
|
options: ee,
|
|
418
|
-
isLoading: k && c > 0 ||
|
|
419
|
+
isLoading: k && c > 0 || X,
|
|
419
420
|
onAction: D,
|
|
420
421
|
onConfig: ae,
|
|
421
422
|
bundleMode: d,
|
|
422
|
-
actionsVariant:
|
|
423
|
+
actionsVariant: j,
|
|
423
424
|
align: z,
|
|
424
425
|
...H?.dropdown
|
|
425
426
|
}
|
|
426
427
|
),
|
|
427
428
|
/* @__PURE__ */ r(
|
|
428
|
-
|
|
429
|
+
Ve,
|
|
429
430
|
{
|
|
430
|
-
action:
|
|
431
|
+
action: Y,
|
|
431
432
|
context: C,
|
|
432
433
|
onClose: () => O(null)
|
|
433
434
|
}
|
|
434
435
|
),
|
|
435
436
|
/* @__PURE__ */ r(
|
|
436
|
-
|
|
437
|
+
je,
|
|
437
438
|
{
|
|
438
|
-
interactiveForm:
|
|
439
|
+
interactiveForm: K,
|
|
439
440
|
onClose: () => S(null),
|
|
440
441
|
onSubmit: se
|
|
441
442
|
}
|
|
@@ -443,5 +444,5 @@ const Se = x.div`
|
|
|
443
444
|
] });
|
|
444
445
|
};
|
|
445
446
|
export {
|
|
446
|
-
|
|
447
|
+
no as A
|
|
447
448
|
};
|
|
@@ -3,9 +3,9 @@ import "react-toastify";
|
|
|
3
3
|
import "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { g as p } from "./iconUtils.es.js";
|
|
6
|
-
import {
|
|
6
|
+
import { bB as E } from "./searchTerms.es.js";
|
|
7
7
|
import "uuid";
|
|
8
|
-
import { jsx as
|
|
8
|
+
import { jsx as L } from "react/jsx-runtime";
|
|
9
9
|
import "clsx";
|
|
10
10
|
import "./PlayableIcon.es.js";
|
|
11
11
|
import "@ynput/ayon-react-components";
|
|
@@ -21,22 +21,23 @@ import "@lexical/utils";
|
|
|
21
21
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
22
22
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
23
23
|
import "./getUris.es.js";
|
|
24
|
-
import "./
|
|
25
|
-
import { a as
|
|
24
|
+
import "./TableExportContextInstance.es.js";
|
|
25
|
+
import { a as S, b as k } from "./MetaWidget.es.js";
|
|
26
26
|
import "@module-federation/enhanced/runtime";
|
|
27
27
|
import "semver";
|
|
28
28
|
import "./ContextMenuContextInstance.es.js";
|
|
29
29
|
import { createPortal as R } from "react-dom";
|
|
30
30
|
import "react-redux";
|
|
31
|
+
import "react-router-dom";
|
|
31
32
|
import "@tanstack/react-table";
|
|
32
|
-
import { useDndContext as
|
|
33
|
-
import { a as
|
|
34
|
-
const
|
|
33
|
+
import { useDndContext as B } from "@dnd-kit/core";
|
|
34
|
+
import { a as D } from "./ColumnDropIndicator.styled.es.js";
|
|
35
|
+
const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(o.data.type || "") && (!s || o.scope?.includes(s)) ? n ? E(o.data) : !0 : !1, ht = ({
|
|
35
36
|
allowedTypes: o,
|
|
36
37
|
enumOnly: s,
|
|
37
38
|
scope: t
|
|
38
39
|
}) => {
|
|
39
|
-
const { columnOrder: n } =
|
|
40
|
+
const { columnOrder: n } = S(), { attribFields: a } = k();
|
|
40
41
|
return A(
|
|
41
42
|
() => [
|
|
42
43
|
{
|
|
@@ -87,7 +88,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
|
|
|
87
88
|
icon: p("tags"),
|
|
88
89
|
scopes: ["task", "version", "folder", "product"]
|
|
89
90
|
},
|
|
90
|
-
...a.filter((r) =>
|
|
91
|
+
...a.filter((r) => O(r, t, o, s)).map((r) => ({
|
|
91
92
|
value: "attrib." + r.name,
|
|
92
93
|
label: r.data.title || r.name,
|
|
93
94
|
icon: p(r.name)
|
|
@@ -98,7 +99,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
|
|
|
98
99
|
}),
|
|
99
100
|
[a, n, o, s, t]
|
|
100
101
|
);
|
|
101
|
-
}, P = "data-column-dnd-container", y = 100,
|
|
102
|
+
}, P = "data-column-dnd-container", y = 100, Ct = ({
|
|
102
103
|
columnPinning: o,
|
|
103
104
|
columnSizing: s
|
|
104
105
|
}) => {
|
|
@@ -154,8 +155,8 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
|
|
|
154
155
|
top: n.top,
|
|
155
156
|
height: n.height
|
|
156
157
|
};
|
|
157
|
-
}, _ = "th[data-column-id]",
|
|
158
|
-
const { active: o, over: s } =
|
|
158
|
+
}, _ = "th[data-column-id]", bt = () => {
|
|
159
|
+
const { active: o, over: s } = B(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = v(null);
|
|
159
160
|
return T(() => {
|
|
160
161
|
if (!t || !n || t === n) {
|
|
161
162
|
r(null);
|
|
@@ -175,15 +176,15 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
|
|
|
175
176
|
m = requestAnimationFrame(u);
|
|
176
177
|
};
|
|
177
178
|
return u(), () => cancelAnimationFrame(m);
|
|
178
|
-
}, [t, n]), a ? R(/* @__PURE__ */
|
|
179
|
+
}, [t, n]), a ? R(/* @__PURE__ */ L(D, { style: a }), document.body) : null;
|
|
179
180
|
};
|
|
180
181
|
export {
|
|
181
182
|
_ as C,
|
|
182
|
-
|
|
183
|
+
bt as T,
|
|
183
184
|
P as a,
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
I as b,
|
|
186
|
+
ht as c,
|
|
186
187
|
F as g,
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
O as i,
|
|
189
|
+
Ct as u
|
|
189
190
|
};
|
|
@@ -6,7 +6,7 @@ import "@ynput/ayon-react-components";
|
|
|
6
6
|
import "./searchTerms.es.js";
|
|
7
7
|
import "./getUris.es.js";
|
|
8
8
|
import "primereact/confirmdialog";
|
|
9
|
-
import { u as f } from "./
|
|
9
|
+
import { u as f } from "./TableExportContextInstance.es.js";
|
|
10
10
|
import "lodash";
|
|
11
11
|
import "uuid";
|
|
12
12
|
import "semver";
|
|
@@ -14,8 +14,8 @@ import "./ContextMenuContextInstance.es.js";
|
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "react-redux";
|
|
17
|
+
import "react-router-dom";
|
|
17
18
|
import { M as c, a as g } from "./Menu.es.js";
|
|
18
|
-
import "./MenuItem.es.js";
|
|
19
19
|
import { C } from "./ColumnDropIndicator.styled.es.js";
|
|
20
20
|
const q = ({ menuItems: e, menuId: t, className: p }) => {
|
|
21
21
|
const { toggleMenuOpen: r, menuOpen: m } = f(), i = u(null), s = m === t;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as e, useContext as n } from "react";
|
|
2
|
-
const o = e(void 0);
|
|
3
|
-
function
|
|
2
|
+
const u = "data-context-menu-target", o = e(void 0);
|
|
3
|
+
function s() {
|
|
4
4
|
const t = n(o);
|
|
5
5
|
if (t === void 0)
|
|
6
6
|
throw new Error("useContextMenu must be used within a ContextMenuProvider");
|
|
@@ -8,5 +8,6 @@ function u() {
|
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
10
|
o as C,
|
|
11
|
-
u
|
|
11
|
+
u as a,
|
|
12
|
+
s as u
|
|
12
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, jsxs as d, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { S as
|
|
1
|
+
import { jsx as l, jsxs as d, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F, useMemo as A } from "react";
|
|
3
|
+
import { Button as D } from "@ynput/ayon-react-components";
|
|
4
|
+
import { S as z, D as N, f as $, F as O, h as T, C as P, i as M, j as R, k as I, l as _ } from "./TableExportContextInstance.es.js";
|
|
5
5
|
import "lodash";
|
|
6
6
|
import "primereact/confirmdialog";
|
|
7
7
|
import "react-toastify";
|
|
@@ -21,7 +21,9 @@ const te = [
|
|
|
21
21
|
"listAttributes",
|
|
22
22
|
"commentCategories",
|
|
23
23
|
"columnSummaries",
|
|
24
|
-
"
|
|
24
|
+
"listValues",
|
|
25
|
+
"entityLinks",
|
|
26
|
+
"tableExport"
|
|
25
27
|
], oe = {
|
|
26
28
|
annotations: {
|
|
27
29
|
label: "Annotations",
|
|
@@ -83,10 +85,20 @@ const te = [
|
|
|
83
85
|
description: "Aggregate each column totals, averages, distributions in a summary footer.",
|
|
84
86
|
bullet: "Per-column summary footer"
|
|
85
87
|
},
|
|
88
|
+
listValues: {
|
|
89
|
+
label: "List Values",
|
|
90
|
+
description: "Keep separate attribute values in each list and compare them with the entities or another list.",
|
|
91
|
+
bullet: "Per-list values and compare view"
|
|
92
|
+
},
|
|
86
93
|
entityLinks: {
|
|
87
94
|
label: "Entity Links",
|
|
88
95
|
description: "Press G on any entity for a graph of everything linked to it, or L to see and edit its links in columns, including the links of everything below a folder.",
|
|
89
96
|
bullet: "See and edit links of any entity"
|
|
97
|
+
},
|
|
98
|
+
tableExport: {
|
|
99
|
+
label: "Table Export",
|
|
100
|
+
description: "Export a table or the selected rows to Excel or CSV, with every row and inherited attribute, ready to import back.",
|
|
101
|
+
bullet: "Export tables to Excel and CSV"
|
|
90
102
|
}
|
|
91
103
|
}, C = [
|
|
92
104
|
"folder",
|
|
@@ -106,7 +118,7 @@ const te = [
|
|
|
106
118
|
(e) => u(r[e], e)
|
|
107
119
|
);
|
|
108
120
|
return G(a);
|
|
109
|
-
},
|
|
121
|
+
}, ie = (o, r) => {
|
|
110
122
|
const a = {}, e = (s, t) => {
|
|
111
123
|
t > 0 && (a[s] = (a[s] || 0) + t);
|
|
112
124
|
};
|
|
@@ -114,19 +126,19 @@ const te = [
|
|
|
114
126
|
for (const s of r)
|
|
115
127
|
e("folder", s.totalFolderCount), e("task", s.totalTaskCount), e("product", s.totalProductCount), e("version", s.totalVersionCount);
|
|
116
128
|
return a;
|
|
117
|
-
}, H = (o) => C.reduce((r, a) => r + (o[a] || 0), 0), g = 8,
|
|
129
|
+
}, H = (o) => C.reduce((r, a) => r + (o[a] || 0), 0), g = 8, ne = (o, r) => {
|
|
118
130
|
if (o.length === 0) return [];
|
|
119
131
|
const a = new Map(r.map((t) => [t.id, t])), e = o.length > 1, s = [];
|
|
120
132
|
for (const t of o) {
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
133
|
+
const i = a.get(t.id), p = t.label || t.name || t.id, m = e ? `"${p}" contains ` : "Contains ";
|
|
134
|
+
if (i && (i.totalFolderCount > 0 || i.totalTaskCount > 0 || i.totalProductCount > 0 || i.totalVersionCount > 0)) {
|
|
123
135
|
const c = [];
|
|
124
|
-
|
|
136
|
+
i.totalFolderCount > 0 && c.push(u(i.totalFolderCount, "child folder")), i.totalTaskCount > 0 && c.push(u(i.totalTaskCount, "task")), i.totalProductCount > 0 && c.push(u(i.totalProductCount, "product")), i.totalVersionCount > 0 && c.push(u(i.totalVersionCount, "version")), s.push(`${m}${c.join(", ")}`);
|
|
125
137
|
} else
|
|
126
138
|
t.hasChildren && s.push(`${m}child folders`), t.taskNames && t.taskNames.length > 0 && s.push(`${m}${u(t.taskNames.length, "task")}`);
|
|
127
139
|
}
|
|
128
140
|
return s.length > g ? [...s.slice(0, g), `…and ${s.length - g} more`] : s;
|
|
129
|
-
},
|
|
141
|
+
}, K = (o, r) => {
|
|
130
142
|
const a = (o ?? "").trim();
|
|
131
143
|
return a !== "" && Number(a) === r;
|
|
132
144
|
}, re = ({
|
|
@@ -138,30 +150,30 @@ const te = [
|
|
|
138
150
|
entityLabel: e,
|
|
139
151
|
childrenDetails: s,
|
|
140
152
|
expectedCounts: t,
|
|
141
|
-
expectedName:
|
|
142
|
-
deleteLabel:
|
|
153
|
+
expectedName: i,
|
|
154
|
+
deleteLabel: p = "Delete forever",
|
|
143
155
|
message: m
|
|
144
|
-
} = o, [
|
|
145
|
-
() => C.filter((
|
|
156
|
+
} = o, [f, c] = F(""), [v, x] = F({}), y = A(
|
|
157
|
+
() => C.filter((n) => (t[n] || 0) > 0),
|
|
146
158
|
[t]
|
|
147
|
-
),
|
|
148
|
-
|
|
159
|
+
), b = A(() => H(t), [t]), h = b > $, w = !!i && !h, k = h ? y.every((n) => K(v[n], t[n])) : w ? f.trim() === i : !0, S = (n) => {
|
|
160
|
+
n.key === "Enter" && k && (n.preventDefault(), r());
|
|
149
161
|
};
|
|
150
162
|
return /* @__PURE__ */ l(
|
|
151
|
-
|
|
163
|
+
z,
|
|
152
164
|
{
|
|
153
165
|
size: "md",
|
|
154
166
|
isOpen: !0,
|
|
155
|
-
header: `${
|
|
167
|
+
header: `${p} ${e}`,
|
|
156
168
|
onClose: a,
|
|
157
169
|
footer: (
|
|
158
170
|
// keydown lives here, not on the dialog — dialog spreads rest props over its own
|
|
159
171
|
// handler and would lose escape-to-close
|
|
160
172
|
/* @__PURE__ */ d(O, { onKeyDown: S, children: [
|
|
161
|
-
w && /* @__PURE__ */ d(
|
|
173
|
+
w && /* @__PURE__ */ d(E, { children: [
|
|
162
174
|
/* @__PURE__ */ d(T, { htmlFor: "delete-confirm-name-input", children: [
|
|
163
175
|
"To confirm delete action, type '",
|
|
164
|
-
|
|
176
|
+
i,
|
|
165
177
|
"' in the box below"
|
|
166
178
|
] }),
|
|
167
179
|
/* @__PURE__ */ l(
|
|
@@ -170,37 +182,37 @@ const te = [
|
|
|
170
182
|
id: "delete-confirm-name-input",
|
|
171
183
|
"data-testid": "delete-confirm-name-input",
|
|
172
184
|
autoFocus: !0,
|
|
173
|
-
value:
|
|
174
|
-
placeholder:
|
|
175
|
-
onChange: (
|
|
185
|
+
value: f,
|
|
186
|
+
placeholder: i,
|
|
187
|
+
onChange: (n) => c(n.target.value)
|
|
176
188
|
}
|
|
177
189
|
)
|
|
178
190
|
] }),
|
|
179
|
-
|
|
191
|
+
h && /* @__PURE__ */ d(E, { children: [
|
|
180
192
|
/* @__PURE__ */ l(T, { as: "p", children: "To confirm, type how many of each will be deleted, children included" }),
|
|
181
|
-
/* @__PURE__ */ l(M, { children:
|
|
182
|
-
/* @__PURE__ */ l("span", { children: `${
|
|
193
|
+
/* @__PURE__ */ l(M, { children: y.map((n, V) => /* @__PURE__ */ d(R, { children: [
|
|
194
|
+
/* @__PURE__ */ l("span", { children: `${n[0].toUpperCase()}${n.slice(1)}s - ${t[n]}` }),
|
|
183
195
|
/* @__PURE__ */ l(
|
|
184
196
|
I,
|
|
185
197
|
{
|
|
186
|
-
"data-testid": `delete-confirm-count-${
|
|
187
|
-
autoFocus:
|
|
198
|
+
"data-testid": `delete-confirm-count-${n}`,
|
|
199
|
+
autoFocus: V === 0,
|
|
188
200
|
inputMode: "numeric",
|
|
189
|
-
value:
|
|
190
|
-
placeholder: `Number of ${
|
|
191
|
-
onChange: (
|
|
201
|
+
value: v[n] ?? "",
|
|
202
|
+
placeholder: `Number of ${n}s`,
|
|
203
|
+
onChange: (j) => x((L) => ({ ...L, [n]: j.target.value }))
|
|
192
204
|
}
|
|
193
205
|
)
|
|
194
|
-
] },
|
|
206
|
+
] }, n)) })
|
|
195
207
|
] }),
|
|
196
208
|
/* @__PURE__ */ d(_, { children: [
|
|
197
|
-
/* @__PURE__ */ l(
|
|
209
|
+
/* @__PURE__ */ l(D, { label: "Cancel", onClick: a }),
|
|
198
210
|
/* @__PURE__ */ l(
|
|
199
|
-
|
|
211
|
+
D,
|
|
200
212
|
{
|
|
201
213
|
"data-testid": "delete-confirm-submit",
|
|
202
214
|
variant: "danger",
|
|
203
|
-
label:
|
|
215
|
+
label: p,
|
|
204
216
|
onClick: r,
|
|
205
217
|
disabled: !k
|
|
206
218
|
}
|
|
@@ -209,14 +221,14 @@ const te = [
|
|
|
209
221
|
] })
|
|
210
222
|
),
|
|
211
223
|
children: /* @__PURE__ */ l(
|
|
212
|
-
|
|
224
|
+
N,
|
|
213
225
|
{
|
|
214
226
|
entityLabel: e,
|
|
215
227
|
childrenDetails: s,
|
|
216
228
|
message: m,
|
|
217
|
-
totalLine:
|
|
229
|
+
totalLine: b > $ ? (
|
|
218
230
|
// versions cascaded from products are not countable, so the total is a floor
|
|
219
|
-
`This deletes ${(t.product || 0) > 0 ? "at least " : ""}${
|
|
231
|
+
`This deletes ${(t.product || 0) > 0 ? "at least " : ""}${b} entities in total.`
|
|
220
232
|
) : void 0
|
|
221
233
|
}
|
|
222
234
|
)
|
|
@@ -227,9 +239,9 @@ export {
|
|
|
227
239
|
C as D,
|
|
228
240
|
te as a,
|
|
229
241
|
re as b,
|
|
230
|
-
|
|
242
|
+
ne as c,
|
|
231
243
|
se as d,
|
|
232
|
-
|
|
244
|
+
ie as e,
|
|
233
245
|
oe as p,
|
|
234
246
|
H as s
|
|
235
247
|
};
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { toast as
|
|
2
|
+
import { toast as u } from "react-toastify";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { bG as c } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
|
-
import { Dialog as
|
|
7
|
-
import { J as
|
|
8
|
-
const
|
|
9
|
-
projectName:
|
|
10
|
-
entityType:
|
|
11
|
-
entityIds:
|
|
12
|
-
visible:
|
|
13
|
-
onHide:
|
|
6
|
+
import { Dialog as g } from "@ynput/ayon-react-components";
|
|
7
|
+
import { J as h } from "./JsonViewer.es.js";
|
|
8
|
+
const G = ({
|
|
9
|
+
projectName: l,
|
|
10
|
+
entityType: t,
|
|
11
|
+
entityIds: n,
|
|
12
|
+
visible: e,
|
|
13
|
+
onHide: d,
|
|
14
|
+
data: i,
|
|
15
|
+
header: m
|
|
14
16
|
}) => {
|
|
15
17
|
const {
|
|
16
|
-
data:
|
|
17
|
-
isLoading:
|
|
18
|
-
isError:
|
|
19
|
-
error:
|
|
20
|
-
} =
|
|
21
|
-
{ projectName:
|
|
22
|
-
{ skip: !
|
|
23
|
-
);
|
|
24
|
-
return
|
|
25
|
-
|
|
18
|
+
data: f = {},
|
|
19
|
+
isLoading: a,
|
|
20
|
+
isError: s,
|
|
21
|
+
error: p
|
|
22
|
+
} = c(
|
|
23
|
+
{ projectName: l, entityType: t, entityId: n?.[0] },
|
|
24
|
+
{ skip: !e || i !== void 0 }
|
|
25
|
+
), r = i ?? f;
|
|
26
|
+
return s && u.error(`Unable to load detail. ${p}`), !e || Array.isArray(r) && r.length < 1 ? null : /* @__PURE__ */ o(
|
|
27
|
+
g,
|
|
26
28
|
{
|
|
27
29
|
isOpen: !0,
|
|
28
|
-
onClose:
|
|
30
|
+
onClose: d,
|
|
29
31
|
size: "lg",
|
|
30
32
|
style: { width: "50vw" },
|
|
31
|
-
header: `${
|
|
32
|
-
children:
|
|
33
|
+
header: m ?? `${t} detail`,
|
|
34
|
+
children: a || s ? /* @__PURE__ */ o("pre", { children: a ? "loading..." : "error..." }) : /* @__PURE__ */ o(h, { value: r })
|
|
33
35
|
}
|
|
34
36
|
);
|
|
35
37
|
};
|
|
36
38
|
export {
|
|
37
|
-
|
|
39
|
+
G as D
|
|
38
40
|
};
|
|
@@ -5,7 +5,7 @@ import "lodash";
|
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
6
|
import "react-toastify";
|
|
7
7
|
import "uuid";
|
|
8
|
-
import {
|
|
8
|
+
import { bt as g } from "./searchTerms.es.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import u from "styled-components";
|
|
11
11
|
const l = u.div`
|
|
@@ -51,7 +51,7 @@ const l = u.div`
|
|
|
51
51
|
margin-top: -16px;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
`,
|
|
54
|
+
`, R = ({
|
|
55
55
|
icon: d,
|
|
56
56
|
message: o,
|
|
57
57
|
error: n,
|
|
@@ -75,6 +75,6 @@ const l = u.div`
|
|
|
75
75
|
t
|
|
76
76
|
] });
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
R as E,
|
|
79
79
|
l as P
|
|
80
80
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
import { E as o } from "./EmptyPlaceholder.es.js";
|
|
3
|
+
const i = e(o)`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
flex-grow: 1;
|
|
8
|
+
position: relative;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
transform: none;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
.icon {
|
|
16
|
+
font-size: 34px;
|
|
17
|
+
}
|
|
18
|
+
h3 {
|
|
19
|
+
font-size: 18px;
|
|
20
|
+
}
|
|
21
|
+
`, a = e.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
flex-grow: 1;
|
|
25
|
+
|
|
26
|
+
position: relative;
|
|
27
|
+
height: 100%;
|
|
28
|
+
border-radius: var(--border-radius-m);
|
|
29
|
+
|
|
30
|
+
background: var(--md-sys-color-surface-container-low);
|
|
31
|
+
.header {
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 9.4px 8px;
|
|
34
|
+
text-transform: capitalize;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
export {
|
|
38
|
+
i as E,
|
|
39
|
+
a
|
|
40
|
+
};
|