@ynput/ayon-frontend-shared 0.6.8 → 0.7.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.
Files changed (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. 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 { bj as he } from "./searchTerms.es.js";
8
- import { d3 as be, bc as ve, cS as ye, bd as xe, b8 as Ae } from "./getUris.es.js";
7
+ import { bt as he } from "./searchTerms.es.js";
8
+ import { d8 as be, bf as ve, cX as ye, bg as xe, bb 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 "./DeleteEntitiesContextInstance.es.js";
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
- }, je = ({ action: o, onClose: s, context: a }) => {
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
- }, Ve = ({
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
- }, oo = ({
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 }), [K, O] = $(null), [W, S] = $(null), C = f(() => {
269
+ const { user: F } = Ce(), { handleActionPayload: J } = we({ onNavigate: m, onSetSearchParams: g, searchParams: b }), [X, 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: X, isFetching: Y } = ye(
287
+ const { data: W, isFetching: Y } = ye(
287
288
  { archived: !1 },
288
289
  { skip: d !== "developer" }
289
- ), I = X?.bundles || [], j = f(() => {
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]), V = f(() => d === "developer" ? j || "developer" : d, [d, j]), { data: Z, isFetching: M } = xe(
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: V,
297
+ variant: j,
297
298
  actionContext: C
298
299
  },
299
300
  { skip: !C }
@@ -419,23 +420,23 @@ const Se = x.div`
419
420
  onAction: D,
420
421
  onConfig: ae,
421
422
  bundleMode: d,
422
- actionsVariant: V,
423
+ actionsVariant: j,
423
424
  align: z,
424
425
  ...H?.dropdown
425
426
  }
426
427
  ),
427
428
  /* @__PURE__ */ r(
428
- je,
429
+ Ve,
429
430
  {
430
- action: K,
431
+ action: X,
431
432
  context: C,
432
433
  onClose: () => O(null)
433
434
  }
434
435
  ),
435
436
  /* @__PURE__ */ r(
436
- Ve,
437
+ je,
437
438
  {
438
- interactiveForm: W,
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
- oo as A
447
+ no as A
447
448
  };
@@ -3,16 +3,14 @@ import "react-toastify";
3
3
  import "lodash";
4
4
  import "primereact/confirmdialog";
5
5
  import { g as p } from "./iconUtils.es.js";
6
- import { bk as E } from "./searchTerms.es.js";
6
+ import { bB as E } from "./searchTerms.es.js";
7
7
  import "uuid";
8
- import { jsx as k } from "react/jsx-runtime";
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";
12
12
  import "lexical";
13
13
  import "@lexical/markdown";
14
- import "@lexical/react/LexicalBlockWithAlignableContents";
15
- import "@lexical/react/LexicalDecoratorBlockNode";
16
14
  import "match-sorter";
17
15
  import "date-fns";
18
16
  import "@lexical/code";
@@ -20,23 +18,26 @@ import "@lexical/list";
20
18
  import "@lexical/rich-text";
21
19
  import "@lexical/selection";
22
20
  import "@lexical/utils";
21
+ import "@lexical/react/LexicalBlockWithAlignableContents";
22
+ import "@lexical/react/LexicalDecoratorBlockNode";
23
23
  import "./getUris.es.js";
24
- import "./DeleteEntitiesContextInstance.es.js";
25
- import { a as L, b as S } from "./MetaWidget.es.js";
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 D } from "@dnd-kit/core";
33
- import { a as I } from "./ColumnDropIndicator.styled.es.js";
34
- const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(o.data.type || "") && (!s || o.scope?.includes(s)) ? n ? E(o.data) : !0 : !1, gt = ({
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 } = L(), { attribFields: a } = S();
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) => B(r, t, o, s)).map((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, ht = ({
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]", Ct = () => {
158
- const { active: o, over: s } = D(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = v(null);
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__ */ k(I, { style: a }), document.body) : null;
179
+ }, [t, n]), a ? R(/* @__PURE__ */ L(D, { style: a }), document.body) : null;
179
180
  };
180
181
  export {
181
182
  _ as C,
182
- Ct as T,
183
+ bt as T,
183
184
  P as a,
184
- O as b,
185
- gt as c,
185
+ I as b,
186
+ ht as c,
186
187
  F as g,
187
- B as i,
188
- ht as u
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 "./DeleteEntitiesContextInstance.es.js";
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 u() {
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 F } from "react/jsx-runtime";
2
- import { useState as A, useMemo as D } from "react";
3
- import { Button as $ } from "@ynput/ayon-react-components";
4
- import { S as V, D as x, f as E, F as O, h as T, C as P, i as M, j as R, k as I, l as _ } from "./DeleteEntitiesContextInstance.es.js";
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
- "entityLinks"
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
- }, ne = (o, r) => {
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, ie = (o, r) => {
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 n = a.get(t.id), f = t.label || t.name || t.id, m = e ? `"${f}" contains ` : "Contains ";
122
- if (n && (n.totalFolderCount > 0 || n.totalTaskCount > 0 || n.totalProductCount > 0 || n.totalVersionCount > 0)) {
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
- n.totalFolderCount > 0 && c.push(u(n.totalFolderCount, "child folder")), n.totalTaskCount > 0 && c.push(u(n.totalTaskCount, "task")), n.totalProductCount > 0 && c.push(u(n.totalProductCount, "product")), n.totalVersionCount > 0 && c.push(u(n.totalVersionCount, "version")), s.push(`${m}${c.join(", ")}`);
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
- }, q = (o, r) => {
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: n,
142
- deleteLabel: f = "Delete forever",
153
+ expectedName: i,
154
+ deleteLabel: p = "Delete forever",
143
155
  message: m
144
- } = o, [p, c] = A(""), [y, j] = A({}), v = D(
145
- () => C.filter((i) => (t[i] || 0) > 0),
156
+ } = o, [f, c] = F(""), [v, x] = F({}), y = A(
157
+ () => C.filter((n) => (t[n] || 0) > 0),
146
158
  [t]
147
- ), h = D(() => H(t), [t]), b = h > E, w = !!n && !b, k = b ? v.every((i) => q(y[i], t[i])) : w ? p.trim() === n : !0, S = (i) => {
148
- i.key === "Enter" && k && (i.preventDefault(), r());
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
- V,
163
+ z,
152
164
  {
153
165
  size: "md",
154
166
  isOpen: !0,
155
- header: `${f} ${e}`,
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(F, { children: [
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
- n,
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: p,
174
- placeholder: n,
175
- onChange: (i) => c(i.target.value)
185
+ value: f,
186
+ placeholder: i,
187
+ onChange: (n) => c(n.target.value)
176
188
  }
177
189
  )
178
190
  ] }),
179
- b && /* @__PURE__ */ d(F, { children: [
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: v.map((i, L) => /* @__PURE__ */ d(R, { children: [
182
- /* @__PURE__ */ l("span", { children: `${i[0].toUpperCase()}${i.slice(1)}s - ${t[i]}` }),
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-${i}`,
187
- autoFocus: L === 0,
198
+ "data-testid": `delete-confirm-count-${n}`,
199
+ autoFocus: V === 0,
188
200
  inputMode: "numeric",
189
- value: y[i] ?? "",
190
- placeholder: `Number of ${i}s`,
191
- onChange: (z) => j((N) => ({ ...N, [i]: z.target.value }))
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
- ] }, i)) })
206
+ ] }, n)) })
195
207
  ] }),
196
208
  /* @__PURE__ */ d(_, { children: [
197
- /* @__PURE__ */ l($, { label: "Cancel", onClick: a }),
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: f,
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
- x,
224
+ N,
213
225
  {
214
226
  entityLabel: e,
215
227
  childrenDetails: s,
216
228
  message: m,
217
- totalLine: h > E ? (
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 " : ""}${h} entities in total.`
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
- ie as c,
242
+ ne as c,
231
243
  se as d,
232
- ne as e,
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 d } from "react-toastify";
2
+ import { toast as u } from "react-toastify";
3
3
  import "./searchTerms.es.js";
4
- import { bC as p } from "./getUris.es.js";
4
+ import { bF as c } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
- import { Dialog as f } from "@ynput/ayon-react-components";
7
- import { J as u } from "./JsonViewer.es.js";
8
- const A = ({
9
- projectName: s,
10
- entityType: e,
11
- entityIds: l,
12
- visible: t,
13
- onHide: n
6
+ import { Dialog as g } from "@ynput/ayon-react-components";
7
+ import { J as h } from "./JsonViewer.es.js";
8
+ const J = ({
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: r = {},
17
- isLoading: i,
18
- isError: a,
19
- error: m
20
- } = p(
21
- { projectName: s, entityType: e, entityId: l?.[0] },
22
- { skip: !t }
23
- );
24
- return a && d.error(`Unable to load detail. ${m}`), !t || Array.isArray(r) && r.length < 1 ? null : /* @__PURE__ */ o(
25
- f,
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: n,
30
+ onClose: d,
29
31
  size: "lg",
30
32
  style: { width: "50vw" },
31
- header: `${e} detail`,
32
- children: i || a ? /* @__PURE__ */ o("pre", { children: i ? "loading..." : "error..." }) : /* @__PURE__ */ o(u, { value: r })
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
- A as D
39
+ J 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 { bj as g } from "./searchTerms.es.js";
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
- `, P = ({
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
- P as E,
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
+ };