@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.
Files changed (77) hide show
  1. package/dist/DetailsPanel.es.js +684 -649
  2. package/dist/Feed.es.js +22 -22
  3. package/dist/ListTable.es.js +78 -67
  4. package/dist/ProjectTreeTable.es.js +2185 -2132
  5. package/dist/Slicer.es.js +152 -120
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +332 -329
  8. package/dist/chunks/Actions.es.js +7 -7
  9. package/dist/chunks/ColumnDropIndicator.es.js +127 -241
  10. package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
  11. package/dist/chunks/DetailsDialog.es.js +3 -3
  12. package/dist/chunks/DetailsPanelContext.es.js +155 -0
  13. package/dist/chunks/EntityPath.es.js +40 -40
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +3 -3
  16. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  17. package/dist/chunks/Feed.es.js +2208 -2611
  18. package/dist/chunks/FilterErrorActions.es.js +5 -5
  19. package/dist/chunks/GlobalContext.es.js +21 -21
  20. package/dist/chunks/InfoMessage.es.js +146 -0
  21. package/dist/chunks/Menu.es.js +6 -6
  22. package/dist/chunks/MenuContext.es.js +51 -240
  23. package/dist/chunks/MenuItem.es.js +1 -1
  24. package/dist/chunks/MetaWidget.es.js +3211 -3761
  25. package/dist/chunks/NewEntityContext.es.js +539 -544
  26. package/dist/chunks/PlayableIcon.es.js +4261 -1163
  27. package/dist/chunks/ProjectContext.es.js +2 -2
  28. package/dist/chunks/ProjectFoldersContext.es.js +84 -76
  29. package/dist/chunks/RepresentationsList.es.js +3 -3
  30. package/dist/chunks/ReviewablesSelector.es.js +396 -384
  31. package/dist/chunks/SimpleForm.es.js +9 -9
  32. package/dist/chunks/SimpleTable.es.js +286 -283
  33. package/dist/chunks/Slicer.es.js +1129 -689
  34. package/dist/chunks/TableSettingsFallback.es.js +6 -6
  35. package/dist/chunks/ThumbnailSimple.es.js +410 -61
  36. package/dist/chunks/VersionUploadContext.es.js +30 -30
  37. package/dist/chunks/ViewsContext.es.js +97 -97
  38. package/dist/chunks/Watchers.es.js +628 -598
  39. package/dist/chunks/entityDefinitions.es.js +276 -134
  40. package/dist/chunks/expandRelativeDates.es.js +27 -0
  41. package/dist/chunks/getBundleMode.es.js +16 -61
  42. package/dist/chunks/getUris.es.js +329 -322
  43. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  44. package/dist/chunks/searchTerms.es.js +186 -173
  45. package/dist/chunks/uriUtils.es.js +48 -0
  46. package/dist/chunks/useAttributeEnums.es.js +69 -61
  47. package/dist/chunks/useColumnDragRestriction.es.js +37 -27
  48. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  49. package/dist/chunks/useLocalStorage.es.js +8 -8
  50. package/dist/chunks/useSessionStorage.es.js +61 -0
  51. package/dist/chunks/viewUpdateHelper.es.js +8 -8
  52. package/dist/components.es.js +199 -194
  53. package/dist/context.es.js +60 -58
  54. package/dist/hooks.es.js +108 -101
  55. package/dist/index.es.js +20 -14
  56. package/dist/types/Actions.d.ts +16 -16
  57. package/dist/types/ContextMenu.d.ts +16 -16
  58. package/dist/types/DetailsPanel.d.ts +22 -16
  59. package/dist/types/EntityPickerDialog.d.ts +16 -16
  60. package/dist/types/Feed.d.ts +16 -16
  61. package/dist/types/ListTable.d.ts +16 -16
  62. package/dist/types/NewEntity.d.ts +16 -16
  63. package/dist/types/ProjectTreeTable.d.ts +48 -22
  64. package/dist/types/RepresentationsList.d.ts +19 -16
  65. package/dist/types/SimpleTable.d.ts +17 -16
  66. package/dist/types/Slicer.d.ts +119 -34
  67. package/dist/types/Views.d.ts +17 -17
  68. package/dist/types/api.d.ts +404 -95
  69. package/dist/types/components.d.ts +86 -25
  70. package/dist/types/context.d.ts +60 -17
  71. package/dist/types/hooks.d.ts +16 -16
  72. package/dist/types/index.d.ts +16 -16
  73. package/dist/types/util.d.ts +16 -16
  74. package/dist/util.es.js +108 -97
  75. package/package.json +26 -13
  76. package/dist/chunks/mentionTypeOptions.es.js +0 -15
  77. package/dist/chunks/useSlicerSplitter.es.js +0 -18
@@ -1,38 +1,38 @@
1
- import X, { useState as x, useMemo as U, createContext as $, useContext as F, useCallback as M, useEffect as A, useRef as H } from "react";
1
+ import X, { useState as x, useMemo as U, createContext as $, useContext as F, useCallback as M, useEffect as A, useRef as G } from "react";
2
2
  import { jsxs as I, jsx as c, Fragment as Z } from "react/jsx-runtime";
3
3
  import { a as fe } from "./useCreateContextMenu.es.js";
4
- import { v4 as J } from "uuid";
4
+ import { v4 as Q } from "uuid";
5
5
  import { createPortal as he } from "react-dom";
6
6
  import { Dialog as me } from "primereact/dialog";
7
7
  import { Dialog as ge, InputText as re, Button as z } from "@ynput/ayon-react-components";
8
8
  import v from "styled-components";
9
- import { c0 as we, cJ as ye, dj as Ce, cG as xe } from "./getUris.es.js";
9
+ import { c2 as we, cL as ye, dl as Ce, cI as xe } from "./getUris.es.js";
10
10
  import { u as ve } from "./GlobalContext.es.js";
11
11
  import { toast as O } from "react-toastify";
12
12
  import { debounce as ee, isEqual as be } from "lodash";
13
13
  import "primereact/confirmdialog";
14
- import { bd as _, a as Pe, be as Ee } from "./searchTerms.es.js";
15
- import Se, { ReadyState as Te } from "react-use-websocket";
14
+ import { bf as _, a as Pe, ay as Ee, be as Se } from "./searchTerms.es.js";
15
+ import Te, { ReadyState as ke } from "react-use-websocket";
16
16
  import { p as j } from "./pluralize.es.js";
17
- const Y = [
17
+ const J = [
18
18
  "folder",
19
19
  "task",
20
20
  "product",
21
21
  "version",
22
22
  "representation",
23
23
  "workfile"
24
- ], te = 1, ke = (e) => e.length <= 1 ? e.join("") : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`, De = (e) => {
24
+ ], te = 1, De = (e) => e.length <= 1 ? e.join("") : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`, Ie = (e) => {
25
25
  if (e.length === 1) {
26
26
  const t = e[0];
27
27
  return `${t.entityType} "${t.label || t.name || t.id}"`;
28
28
  }
29
29
  const s = {};
30
30
  for (const t of e) s[t.entityType] = (s[t.entityType] || 0) + 1;
31
- const i = Y.filter((t) => s[t] > 0).map(
31
+ const i = J.filter((t) => s[t] > 0).map(
32
32
  (t) => j(s[t], t)
33
33
  );
34
- return ke(i);
35
- }, Ie = (e, s) => {
34
+ return De(i);
35
+ }, Re = (e, s) => {
36
36
  const i = {}, t = (o, n) => {
37
37
  n > 0 && (i[o] = (i[o] || 0) + n);
38
38
  };
@@ -40,7 +40,7 @@ const Y = [
40
40
  for (const o of s)
41
41
  t("folder", o.totalFolderCount), t("task", o.totalTaskCount), t("product", o.totalProductCount), t("version", o.totalVersionCount);
42
42
  return i;
43
- }, Re = (e) => Y.reduce((s, i) => s + (e[i] || 0), 0), Q = 8, $e = (e, s) => {
43
+ }, $e = (e) => J.reduce((s, i) => s + (e[i] || 0), 0), Y = 8, Le = (e, s) => {
44
44
  if (e.length === 0) return [];
45
45
  const i = new Map(s.map((n) => [n.id, n])), t = e.length > 1, o = [];
46
46
  for (const n of e) {
@@ -51,49 +51,49 @@ const Y = [
51
51
  } else
52
52
  n.hasChildren && o.push(`${m}child folders`), n.taskNames && n.taskNames.length > 0 && o.push(`${m}${j(n.taskNames.length, "task")}`);
53
53
  }
54
- return o.length > Q ? [
55
- ...o.slice(0, Q),
56
- `…and ${o.length - Q} more`
54
+ return o.length > Y ? [
55
+ ...o.slice(0, Y),
56
+ `…and ${o.length - Y} more`
57
57
  ] : o;
58
- }, Le = v.div`
58
+ }, Oe = v.div`
59
59
  min-width: 350px;
60
- `, Oe = v.div`
60
+ `, Fe = v.div`
61
61
  margin-top: 12px;
62
62
  min-height: 60px;
63
63
  min-width: 350px;
64
- `, Fe = v.p`
64
+ `, Ne = v.p`
65
65
  font-weight: 600;
66
66
  margin-bottom: 4px;
67
- `, Ne = v.p`
67
+ `, Ae = v.p`
68
68
  margin-top: 12px;
69
69
  font-weight: 600;
70
70
  color: var(--md-sys-color-error);
71
- `, Ae = ({
71
+ `, je = ({
72
72
  entityLabel: e,
73
73
  childrenDetails: s,
74
74
  totalLine: i,
75
75
  message: t
76
- }) => /* @__PURE__ */ I(Le, { children: [
76
+ }) => /* @__PURE__ */ I(Oe, { children: [
77
77
  /* @__PURE__ */ c("p", { children: t || `Are you sure you want to delete ${e}? This action cannot be undone.` }),
78
- s.length > 0 && /* @__PURE__ */ I(Oe, { children: [
79
- /* @__PURE__ */ c(Fe, { children: "The following will also be affected:" }),
78
+ s.length > 0 && /* @__PURE__ */ I(Fe, { children: [
79
+ /* @__PURE__ */ c(Ne, { children: "The following will also be affected:" }),
80
80
  s.map((o, n) => /* @__PURE__ */ c("p", { children: o }, n))
81
81
  ] }),
82
- i && /* @__PURE__ */ c(Ne, { children: i })
83
- ] }), je = v(ge)`
82
+ i && /* @__PURE__ */ c(Ae, { children: i })
83
+ ] }), Me = v(ge)`
84
84
  max-height: min(600px, 90vh);
85
- `, Me = v.div`
85
+ `, We = v.div`
86
86
  display: flex;
87
87
  flex-direction: column;
88
88
  width: 100%;
89
89
  `, oe = v.label`
90
90
  margin: 2px 0 14px 0;
91
- `, We = v.div`
91
+ `, _e = v.div`
92
92
  display: flex;
93
93
  padding-top: 14px;
94
94
  gap: 8px;
95
95
  justify-content: flex-end;
96
- `, _e = v.div`
96
+ `, Ue = v.div`
97
97
  display: flex;
98
98
  flex-direction: column;
99
99
  gap: 8px;
@@ -102,18 +102,18 @@ const Y = [
102
102
  /* scroll container clips the inputs' 2px focus outline — inset it, then pull back to keep alignment */
103
103
  padding: 4px;
104
104
  margin: -4px;
105
- `, Ue = v.label`
105
+ `, qe = v.label`
106
106
  display: flex;
107
107
  align-items: center;
108
108
  justify-content: space-between;
109
109
  gap: 12px;
110
- `, qe = v(re)`
111
- width: 180px;
112
110
  `, Ve = v(re)`
111
+ width: 180px;
112
+ `, ze = v(re)`
113
113
  width: 100%;
114
114
  /* room for the 2px focus outline */
115
115
  margin: 2px 0;
116
- `, ze = (e, s) => {
116
+ `, Be = (e, s) => {
117
117
  const i = (e ?? "").trim();
118
118
  return i !== "" && Number(i) === s;
119
119
  }, ne = ({
@@ -129,13 +129,13 @@ const Y = [
129
129
  deleteLabel: y = "Delete forever",
130
130
  message: m
131
131
  } = e, [C, u] = x(""), [p, a] = x({}), g = U(
132
- () => Y.filter((d) => (n[d] || 0) > 0),
132
+ () => J.filter((d) => (n[d] || 0) > 0),
133
133
  [n]
134
- ), f = U(() => Re(n), [n]), b = f > te, h = !!r && !b, S = b ? g.every((d) => ze(p[d], n[d])) : h ? C.trim() === r : !0, T = (d) => {
134
+ ), f = U(() => $e(n), [n]), b = f > te, h = !!r && !b, S = b ? g.every((d) => Be(p[d], n[d])) : h ? C.trim() === r : !0, T = (d) => {
135
135
  d.key === "Enter" && S && (d.preventDefault(), s());
136
136
  };
137
137
  return /* @__PURE__ */ c(
138
- je,
138
+ Me,
139
139
  {
140
140
  size: "md",
141
141
  isOpen: !0,
@@ -144,7 +144,7 @@ const Y = [
144
144
  footer: (
145
145
  // keydown lives here, not on the dialog — dialog spreads rest props over its own
146
146
  // handler and would lose escape-to-close
147
- /* @__PURE__ */ I(Me, { onKeyDown: T, children: [
147
+ /* @__PURE__ */ I(We, { onKeyDown: T, children: [
148
148
  h && /* @__PURE__ */ I(Z, { children: [
149
149
  /* @__PURE__ */ I(oe, { htmlFor: "delete-confirm-name-input", children: [
150
150
  "To confirm delete action, type '",
@@ -152,7 +152,7 @@ const Y = [
152
152
  "' in the box below"
153
153
  ] }),
154
154
  /* @__PURE__ */ c(
155
- Ve,
155
+ ze,
156
156
  {
157
157
  id: "delete-confirm-name-input",
158
158
  "data-testid": "delete-confirm-name-input",
@@ -165,10 +165,10 @@ const Y = [
165
165
  ] }),
166
166
  b && /* @__PURE__ */ I(Z, { children: [
167
167
  /* @__PURE__ */ c(oe, { as: "p", children: "To confirm, type how many of each will be deleted, children included" }),
168
- /* @__PURE__ */ c(_e, { children: g.map((d, P) => /* @__PURE__ */ I(Ue, { children: [
168
+ /* @__PURE__ */ c(Ue, { children: g.map((d, P) => /* @__PURE__ */ I(qe, { children: [
169
169
  /* @__PURE__ */ c("span", { children: `${d[0].toUpperCase()}${d.slice(1)}s - ${n[d]}` }),
170
170
  /* @__PURE__ */ c(
171
- qe,
171
+ Ve,
172
172
  {
173
173
  "data-testid": `delete-confirm-count-${d}`,
174
174
  autoFocus: P === 0,
@@ -180,7 +180,7 @@ const Y = [
180
180
  )
181
181
  ] }, d)) })
182
182
  ] }),
183
- /* @__PURE__ */ I(We, { children: [
183
+ /* @__PURE__ */ I(_e, { children: [
184
184
  /* @__PURE__ */ c(z, { label: "Cancel", onClick: i }),
185
185
  /* @__PURE__ */ c(
186
186
  z,
@@ -196,7 +196,7 @@ const Y = [
196
196
  ] })
197
197
  ),
198
198
  children: /* @__PURE__ */ c(
199
- Ae,
199
+ je,
200
200
  {
201
201
  entityLabel: t,
202
202
  childrenDetails: o,
@@ -209,9 +209,9 @@ const Y = [
209
209
  )
210
210
  }
211
211
  );
212
- }, gt = $(
212
+ }, wt = $(
213
213
  void 0
214
- ), ie = $({}), wt = ({
214
+ ), ie = $({}), yt = ({
215
215
  children: e,
216
216
  thumbnailInputRef: s,
217
217
  versionsInputRef: i,
@@ -251,12 +251,12 @@ const Y = [
251
251
  children: e
252
252
  }
253
253
  );
254
- }, yt = () => {
254
+ }, Ct = () => {
255
255
  const e = ie;
256
256
  if (!e)
257
257
  throw new Error("useThumbnailUploadContext must be used within a ThumbnailUploadProvider");
258
258
  return e;
259
- }, le = $(void 0), Ct = ({ children: e }) => {
259
+ }, le = $(void 0), xt = ({ children: e }) => {
260
260
  const [s, i] = x(!1), [t, o] = x(null), [n, r] = x(null), y = () => {
261
261
  i(!0), o(null);
262
262
  }, m = () => {
@@ -285,23 +285,23 @@ const Y = [
285
285
  children: e
286
286
  }
287
287
  );
288
- }, xt = () => {
288
+ }, vt = () => {
289
289
  const e = F(le);
290
290
  if (e === void 0)
291
291
  throw new Error("useSettingsPanel must be used within a SettingsPanelProvider");
292
292
  return e;
293
293
  }, ae = $(void 0);
294
- function vt({ children: e }) {
294
+ function bt({ children: e }) {
295
295
  const s = window.location.protocol === "https:" || window.location.hostname === "localhost", i = "documentPictureInPicture" in window && s, [t, o] = x(null), [n, r] = x(null), y = M(() => {
296
296
  r(null), t != null && (t.close(), o(null));
297
297
  }, [t, n]), m = M(
298
298
  async (u, p) => {
299
299
  if (!i) {
300
- r(J());
300
+ r(Q());
301
301
  return;
302
302
  }
303
303
  if (t != null) {
304
- console.log("pipWindow is already open"), r(J());
304
+ console.log("pipWindow is already open"), r(Q());
305
305
  return;
306
306
  }
307
307
  const a = await window.documentPictureInPicture.requestWindow({
@@ -310,7 +310,7 @@ function vt({ children: e }) {
310
310
  });
311
311
  a.addEventListener("pagehide", () => {
312
312
  o(null), r(null);
313
- }), o(a), r(J());
313
+ }), o(a), r(Q());
314
314
  },
315
315
  [t, n]
316
316
  );
@@ -344,7 +344,7 @@ function vt({ children: e }) {
344
344
  }), [y, i, t, m]);
345
345
  return /* @__PURE__ */ c(ae.Provider, { value: C, children: e });
346
346
  }
347
- function Be() {
347
+ function He() {
348
348
  const e = F(ae);
349
349
  if (e === void 0)
350
350
  throw new Error("usePiPWindow must be used within a PiPContext");
@@ -353,7 +353,7 @@ function Be() {
353
353
  function Ge({ pipWindow: e, children: s }) {
354
354
  return he(s, e.document.body);
355
355
  }
356
- const He = v(me)`
356
+ const Qe = v(me)`
357
357
  width: 25vw;
358
358
  height: 70vh;
359
359
  border: solid 1px var(--md-sys-color-outline-variant);
@@ -366,7 +366,7 @@ const He = v(me)`
366
366
  opacity: 1;
367
367
  }
368
368
  }
369
- `, Je = v(z)`
369
+ `, Ye = v(z)`
370
370
  width: 26px;
371
371
  height: 26px;
372
372
  margin-left: auto;
@@ -382,12 +382,12 @@ const He = v(me)`
382
382
  &:hover {
383
383
  background-color: #3d3e40;
384
384
  }
385
- `, bt = ({ children: e }) => {
386
- const { pipWindow: s, pipId: i, isSupported: t, closePipWindow: o } = Be(), n = i && X.isValidElement(e) ? X.cloneElement(e, { id: i }) : e;
385
+ `, Pt = ({ children: e }) => {
386
+ const { pipWindow: s, pipId: i, isSupported: t, closePipWindow: o } = He(), n = i && X.isValidElement(e) ? X.cloneElement(e, { id: i }) : e;
387
387
  return !t && i ? /* @__PURE__ */ c(
388
- He,
388
+ Qe,
389
389
  {
390
- header: /* @__PURE__ */ c(Je, { icon: "close", className: "close", onClick: o }),
390
+ header: /* @__PURE__ */ c(Ye, { icon: "close", className: "close", onClick: o }),
391
391
  headerStyle: {
392
392
  padding: 4,
393
393
  backgroundColor: "#202124",
@@ -411,7 +411,7 @@ const He = v(me)`
411
411
  children: n
412
412
  }
413
413
  ) : s && /* @__PURE__ */ c(Ge, { pipWindow: s, children: /* @__PURE__ */ c("div", { className: "pipRoot", children: n }) });
414
- }, ce = $(void 0), Pt = ({
414
+ }, ce = $(void 0), Et = ({
415
415
  children: e,
416
416
  projectName: s,
417
417
  // utils
@@ -435,33 +435,33 @@ const He = v(me)`
435
435
  children: e
436
436
  }
437
437
  );
438
- }, Et = () => {
438
+ }, St = () => {
439
439
  const e = F(ce);
440
440
  if (!e)
441
441
  throw new Error("useAddonProjectContext must be used within a AddonProjectContext");
442
442
  return e;
443
- }, de = $(void 0), St = ({ children: e, ...s }) => /* @__PURE__ */ c(de.Provider, { value: { ...s }, children: e }), Tt = () => {
443
+ }, de = $(void 0), Tt = ({ children: e, ...s }) => /* @__PURE__ */ c(de.Provider, { value: { ...s }, children: e }), kt = () => {
444
444
  const e = F(de);
445
445
  if (!e)
446
446
  throw new Error("useAddonContext must be used within a AddonContext");
447
447
  return e;
448
- }, Qe = () => /* @__PURE__ */ I("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
448
+ }, Je = () => /* @__PURE__ */ I("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
449
449
  "Refresh to see latest changes.",
450
450
  /* @__PURE__ */ c(z, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
451
- ] }), ue = $(void 0), Ye = window.location.protocol.replace("http", "ws"), Ke = `${Ye}//${window.location.host}/ws`, kt = ({
451
+ ] }), ue = $(void 0), Ke = window.location.protocol.replace("http", "ws"), Xe = `${Ke}//${window.location.host}/ws`, Dt = ({
452
452
  children: e,
453
453
  userName: s,
454
454
  projectName: i,
455
455
  dispatch: t
456
456
  }) => {
457
- const [o, n] = x(!1), [r, y] = x([]), [m] = ye(), C = H(!1);
457
+ const [o, n] = x(!1), [r, y] = x([]), [m] = ye(), C = G(!1);
458
458
  A(() => {
459
459
  C.current = o;
460
460
  }, [o]);
461
461
  const u = {
462
462
  shouldReconnect: () => !s || !localStorage.getItem("accessToken") ? !1 : (m({ full: !1 }).unwrap(), !0)
463
- }, { sendMessage: p, readyState: a, getWebSocket: g } = Se(
464
- Ke,
463
+ }, { sendMessage: p, readyState: a, getWebSocket: g } = Te(
464
+ Xe,
465
465
  u,
466
466
  !!s
467
467
  ), f = () => {
@@ -477,7 +477,7 @@ const He = v(me)`
477
477
  A(() => {
478
478
  console.debug("Topics changed", r), f();
479
479
  }, [r, i]);
480
- const b = H(r);
480
+ const b = G(r);
481
481
  b.current = r;
482
482
  const h = U(
483
483
  () => ee((E) => {
@@ -490,12 +490,12 @@ const He = v(me)`
490
490
  }), [h]);
491
491
  const [S, T] = x(!1), [d, P] = x(!1);
492
492
  A(() => {
493
- S && !d && (O.warning(/* @__PURE__ */ c(Qe, {}), {
493
+ S && !d && (O.warning(/* @__PURE__ */ c(Je, {}), {
494
494
  autoClose: !1,
495
495
  closeButton: !1
496
496
  }), P(!0));
497
497
  }, [S, d]);
498
- const k = H({ callCount: 0, lastCall: Date.now() }), N = ee(() => {
498
+ const k = G({ callCount: 0, lastCall: Date.now() }), N = ee(() => {
499
499
  console.log("Resetting API state due to server restart"), n(!1), t(Pe.util.resetApiState());
500
500
  }, 1e3), q = M(
501
501
  (E) => {
@@ -506,8 +506,8 @@ const He = v(me)`
506
506
  let l;
507
507
  try {
508
508
  l = JSON.parse(E.data);
509
- } catch (G) {
510
- console.error("Failed to parse websocket message:", G, E.data);
509
+ } catch (H) {
510
+ console.error("Failed to parse websocket message:", H, E.data);
511
511
  return;
512
512
  }
513
513
  const { topic: w, sender: D, summary: R, status: L } = l || {};
@@ -526,7 +526,7 @@ const He = v(me)`
526
526
  [n]
527
527
  );
528
528
  return A(() => {
529
- a === Te.OPEN && (g().onmessage = q, f(), _.publish("client.connected", {
529
+ a === ke.OPEN && (g().onmessage = q, f(), _.publish("client.connected", {
530
530
  topic: "client.connected"
531
531
  }));
532
532
  }, [a, g]), /* @__PURE__ */ c(
@@ -540,26 +540,26 @@ const He = v(me)`
540
540
  children: e
541
541
  }
542
542
  );
543
- }, Dt = () => {
543
+ }, It = () => {
544
544
  const e = F(ue);
545
545
  if (e === void 0)
546
546
  throw new Error("useSocketContext must be used within a SocketProvider");
547
547
  return e;
548
- }, It = $(void 0), Xe = /* @__PURE__ */ new Set([
548
+ }, Rt = $(void 0), Ze = /* @__PURE__ */ new Set([
549
549
  "folder",
550
550
  "task",
551
551
  "product",
552
552
  "version",
553
553
  "representation",
554
554
  "workfile"
555
- ]), Rt = (e) => !!e && Xe.has(e), K = $(null), se = [
555
+ ]), $t = (e) => !!e && Ze.has(e), K = $(null), se = [
556
556
  "representation",
557
557
  "version",
558
558
  "workfile",
559
559
  "product",
560
560
  "task",
561
561
  "folder"
562
- ], Ze = "delete-folder-with-children", $t = ({ children: e }) => {
562
+ ], et = "delete-folder-with-children", Lt = ({ children: e }) => {
563
563
  const [s] = Ce(), [i] = xe(), [t, o] = x(null), [n, r] = x(null), y = M(
564
564
  (p) => new Promise((a) => r({ payload: p, resolve: a })),
565
565
  []
@@ -583,7 +583,7 @@ const He = v(me)`
583
583
  }
584
584
  await Promise.all(
585
585
  Array.from(D.entries()).map(([R, L]) => {
586
- const G = [...L].sort(
586
+ const H = [...L].sort(
587
587
  (V, pe) => se.indexOf(V.entityType) - se.indexOf(pe.entityType)
588
588
  ).map((V) => ({
589
589
  type: "delete",
@@ -592,7 +592,7 @@ const He = v(me)`
592
592
  force: w
593
593
  }));
594
594
  return s({
595
- operationsRequestModel: { operations: G },
595
+ operationsRequestModel: { operations: H },
596
596
  projectName: R
597
597
  }).unwrap();
598
598
  })
@@ -601,7 +601,7 @@ const He = v(me)`
601
601
  try {
602
602
  await S(h, !1), a?.onSuccess?.();
603
603
  } catch (l) {
604
- throw { message: Ee(l) || "Failed to delete entities", ...l };
604
+ throw { message: Se(l) || "Failed to delete entities", ...l };
605
605
  }
606
606
  }, d = () => S(
607
607
  h.filter((l) => l.entityType === "folder" || l.entityType === "task"),
@@ -627,20 +627,20 @@ const He = v(me)`
627
627
  console.warn("Failed to fetch folder delete info, falling back to local data", w);
628
628
  }
629
629
  }
630
- const N = $e(P, k), q = h.filter((l) => l.entityType === "product").length;
630
+ const N = Le(P, k), q = h.filter((l) => l.entityType === "product").length;
631
631
  q > 0 && N.push(
632
632
  q > 1 ? "Deleting these products also deletes all their versions" : "Deleting this product also deletes all its versions"
633
633
  );
634
- const E = De(h), W = h.length === 1 ? h[0] : void 0;
634
+ const E = Ie(h), W = h.length === 1 ? h[0] : void 0;
635
635
  o({
636
636
  payload: {
637
637
  entityLabel: E,
638
638
  childrenDetails: N,
639
- expectedCounts: Ie(h, k),
639
+ expectedCounts: Re(h, k),
640
640
  expectedName: W && (W.label || W.name || W.id)
641
641
  },
642
642
  accept: T,
643
- recover: async (l) => l?.errorCodes?.includes(Ze) ? await y({
643
+ recover: async (l) => Ee(l).includes(et) ? await y({
644
644
  entityLabel: E,
645
645
  message: `Are you really sure you want to delete ${E} and all of its dependencies? This cannot be undone. (NOT RECOMMENDED)`,
646
646
  childrenDetails: [],
@@ -709,40 +709,40 @@ const He = v(me)`
709
709
  }
710
710
  )
711
711
  ] });
712
- }, Lt = () => {
712
+ }, Ot = () => {
713
713
  const e = F(K);
714
714
  if (!e)
715
715
  throw new Error("useDeleteEntitiesContext must be used within a DeleteEntitiesProvider");
716
716
  return e;
717
- }, Ot = () => F(K);
717
+ }, Ft = () => F(K);
718
718
  export {
719
- Pt as A,
720
- $t as D,
721
- It as E,
722
- vt as P,
723
- Qe as R,
724
- gt as S,
719
+ Et as A,
720
+ Lt as D,
721
+ Rt as E,
722
+ bt as P,
723
+ Je as R,
724
+ wt as S,
725
725
  ie as T,
726
- St as a,
727
- bt as b,
728
- Ct as c,
729
- kt as d,
730
- wt as e,
731
- Et as f,
732
- Lt as g,
733
- Ot as h,
734
- Rt as i,
735
- Be as j,
736
- xt as k,
737
- Dt as l,
738
- yt as m,
726
+ Tt as a,
727
+ Pt as b,
728
+ xt as c,
729
+ Dt as d,
730
+ yt as e,
731
+ St as f,
732
+ Ot as g,
733
+ Ft as h,
734
+ $t as i,
735
+ He as j,
736
+ vt as k,
737
+ It as l,
738
+ Ct as m,
739
739
  te as n,
740
- Y as o,
741
- Ae as p,
740
+ J as o,
741
+ je as p,
742
742
  ne as q,
743
- $e as r,
744
- De as s,
745
- Ie as t,
746
- Tt as u,
747
- Re as v
743
+ Le as r,
744
+ Ie as s,
745
+ Re as t,
746
+ kt as u,
747
+ $e as v
748
748
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { toast as d } from "react-toastify";
3
3
  import "./searchTerms.es.js";
4
- import { bz as p } from "./getUris.es.js";
4
+ import { bB as p } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
6
  import { Dialog as f } from "@ynput/ayon-react-components";
7
7
  import { J as u } from "./JsonViewer.es.js";
8
- const z = ({
8
+ const A = ({
9
9
  projectName: s,
10
10
  entityType: e,
11
11
  entityIds: l,
@@ -34,5 +34,5 @@ const z = ({
34
34
  );
35
35
  };
36
36
  export {
37
- z as D
37
+ A as D
38
38
  };