@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.
Files changed (92) hide show
  1. package/dist/ContextMenu.es.js +34 -16
  2. package/dist/DetailsPanel.es.js +307 -311
  3. package/dist/Feed.es.js +179 -50
  4. package/dist/ListTable.es.js +99 -92
  5. package/dist/NewEntity.es.js +1256 -11
  6. package/dist/ProjectTreeTable.es.js +4459 -2959
  7. package/dist/SimpleTable.es.js +8 -7
  8. package/dist/Slicer.es.js +451 -147
  9. package/dist/Views.es.js +918 -310
  10. package/dist/api.es.js +331 -329
  11. package/dist/chunks/Actions.es.js +32 -27
  12. package/dist/chunks/ColumnDropIndicator.es.js +174 -328
  13. package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
  14. package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
  15. package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
  16. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
  17. package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
  18. package/dist/chunks/DetailsDialog.es.js +3 -3
  19. package/dist/chunks/EmptyPlaceholder.es.js +4 -4
  20. package/dist/chunks/EntityPath.es.js +74 -69
  21. package/dist/chunks/EntityPickerDialog.es.js +25 -21
  22. package/dist/chunks/EntityTooltip.es.js +29 -22
  23. package/dist/chunks/EntityUpdatesContext.es.js +38 -96
  24. package/dist/chunks/Feed.es.js +2321 -2668
  25. package/dist/chunks/FilterErrorActions.es.js +25 -229
  26. package/dist/chunks/Menu.es.js +21 -17
  27. package/dist/chunks/MenuContext.es.js +14 -256
  28. package/dist/chunks/MenuItem.es.js +34 -24
  29. package/dist/chunks/MetaWidget.es.js +2895 -4919
  30. package/dist/chunks/NewEntityContextInstance.es.js +11 -0
  31. package/dist/chunks/PlayableIcon.es.js +4215 -1179
  32. package/dist/chunks/ProjectContext.es.js +102 -66
  33. package/dist/chunks/RepresentationsList.es.js +4 -4
  34. package/dist/chunks/ReviewablesSelector.es.js +468 -460
  35. package/dist/chunks/SimpleForm.es.js +18 -18
  36. package/dist/chunks/SimpleTable.es.js +15 -13
  37. package/dist/chunks/Slicer.es.js +109 -98
  38. package/dist/chunks/TableSettingsFallback.es.js +22 -10
  39. package/dist/chunks/ThumbnailSimple.es.js +290 -52
  40. package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
  41. package/dist/chunks/VideoPlayer.es.js +24 -28
  42. package/dist/chunks/Watchers.es.js +669 -644
  43. package/dist/chunks/entityDefinitions.es.js +2 -350
  44. package/dist/chunks/expandRelativeDates.es.js +27 -0
  45. package/dist/chunks/extractVersionFromFilename.es.js +28 -0
  46. package/dist/chunks/getBundleMode.es.js +1 -1
  47. package/dist/chunks/getUris.es.js +737 -710
  48. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  49. package/dist/chunks/searchTerms.es.js +179 -174
  50. package/dist/chunks/useAttributeEnums.es.js +9 -9
  51. package/dist/chunks/useCreateContextMenu.es.js +66 -90
  52. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  53. package/dist/chunks/useHierarchySelection.es.js +24 -0
  54. package/dist/chunks/useLoadModule.es.js +74 -0
  55. package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
  56. package/dist/chunks/versionUploadHelpers.es.js +16 -42
  57. package/dist/chunks/viewUpdateHelper.es.js +74 -57
  58. package/dist/components.es.js +1432 -1001
  59. package/dist/context.es.js +791 -78
  60. package/dist/hooks.es.js +95 -94
  61. package/dist/index.es.js +27 -26
  62. package/dist/types/Actions.d.ts +15 -15
  63. package/dist/types/ContextMenu.d.ts +19 -16
  64. package/dist/types/DetailsPanel.d.ts +110 -17
  65. package/dist/types/EntityPickerDialog.d.ts +15 -15
  66. package/dist/types/Feed.d.ts +19 -16
  67. package/dist/types/ListTable.d.ts +15 -15
  68. package/dist/types/NewEntity.d.ts +24 -18
  69. package/dist/types/ProjectTreeTable.d.ts +34 -123
  70. package/dist/types/RepresentationsList.d.ts +15 -15
  71. package/dist/types/SimpleTable.d.ts +19 -16
  72. package/dist/types/Slicer.d.ts +18 -15
  73. package/dist/types/Views.d.ts +19 -16
  74. package/dist/types/api.d.ts +515 -207
  75. package/dist/types/components.d.ts +84 -20
  76. package/dist/types/context.d.ts +108 -25
  77. package/dist/types/hooks.d.ts +15 -15
  78. package/dist/types/index.d.ts +15 -15
  79. package/dist/types/util.d.ts +20 -15
  80. package/dist/util.es.js +117 -105
  81. package/package.json +16 -4
  82. package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
  83. package/dist/chunks/GlobalContext.es.js +0 -52
  84. package/dist/chunks/NewEntityContext.es.js +0 -1242
  85. package/dist/chunks/ProjectFoldersContext.es.js +0 -134
  86. package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
  87. package/dist/chunks/VersionUploadContext.es.js +0 -232
  88. package/dist/chunks/ViewsContext.es.js +0 -878
  89. package/dist/chunks/mentionTypeOptions.es.js +0 -15
  90. package/dist/chunks/useColumnDragRestriction.es.js +0 -148
  91. package/dist/chunks/useLocalStorage.es.js +0 -355
  92. /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
@@ -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 { bA 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 x = ({
8
+ const A = ({
9
9
  projectName: s,
10
10
  entityType: e,
11
11
  entityIds: l,
@@ -34,5 +34,5 @@ const x = ({
34
34
  );
35
35
  };
36
36
  export {
37
- x as D
37
+ A as D
38
38
  };
@@ -1,13 +1,13 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
2
  import { theme as h, Icon as s } from "@ynput/ayon-react-components";
3
- import g from "styled-components";
4
3
  import i from "clsx";
5
4
  import "lodash";
6
5
  import "primereact/confirmdialog";
7
6
  import "react-toastify";
8
7
  import "uuid";
9
- import { be as u } from "./searchTerms.es.js";
10
- const l = g.div`
8
+ import { bi as g } from "./searchTerms.es.js";
9
+ import u from "styled-components";
10
+ const l = u.div`
11
11
  position: absolute;
12
12
  /* center */
13
13
  top: 30%;
@@ -64,7 +64,7 @@ const l = g.div`
64
64
  /* @__PURE__ */ r("h3", { children: "Something went wrong." }),
65
65
  /* @__PURE__ */ e("span", { className: "error-message", ...p?.error, children: [
66
66
  "ERROR: ",
67
- u(n) || "Unknown error"
67
+ g(n) || "Unknown error"
68
68
  ] }),
69
69
  m && /* @__PURE__ */ r("span", { children: "This should not happen. Please send a screenshot to the Ynput team!" }),
70
70
  a
@@ -1,24 +1,29 @@
1
1
  import { jsxs as R, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
- import { useRef as _, useState as x, useEffect as le, useLayoutEffect as ae, createElement as he, Fragment as ke } from "react";
2
+ import { useRef as _, useState as x, useEffect as le, useLayoutEffect as ae, createElement as me, Fragment as ke } from "react";
3
3
  import "./searchTerms.es.js";
4
- import { dn as Me, bU as Ue, c6 as Fe, da as Te, a$ as Le, aO as We, aJ as Ve, de as Ne } from "./getUris.es.js";
4
+ import { dp as Me, bV as Ue, c7 as Fe, db as Te, a$ as Le, aO as Ve, aJ as We, df as Ne } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
- import { useSensors as $e, useSensor as me, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as Ke, DragOverlay as Ze } from "@dnd-kit/core";
6
+ import { useSensors as $e, useSensor as he, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as Ke, DragOverlay as Ze } from "@dnd-kit/core";
7
7
  import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as He } from "@dnd-kit/sortable";
8
8
  import { D as ze, R as Re, e as Je, g as Xe, L as Ye, h as oe, i as je, j as et, T as tt, k as ge, U as nt, P as rt, C as it, l as at, S as J, M as ve, m as be, n as X, o as ye, p as ot, F as st } from "./Watchers.es.js";
9
9
  import { CSS as lt } from "@dnd-kit/utilities";
10
10
  import { toast as A } from "react-toastify";
11
- import { a as ct } from "./useCreateContextMenu.es.js";
11
+ import { u as ct } from "./useCreateContextMenu.es.js";
12
12
  import { c as dt } from "./confirmDelete.es.js";
13
13
  import "uuid";
14
14
  import { camelCase as ut, upperFirst as pt } from "lodash";
15
- import { Icon as Ce, Dialog as Se, InputText as xe, Toolbar as ft, Button as ce, SaveButton as ht, FormRow as mt } from "@ynput/ayon-react-components";
16
- import { c as Ee } from "./MenuContext.es.js";
15
+ import { Icon as Ce, Dialog as Se, InputText as xe, Toolbar as ft, Button as ce, SaveButton as mt, FormRow as ht } from "@ynput/ayon-react-components";
16
+ import "@module-federation/enhanced/runtime";
17
+ import { v as Ee } from "./DeleteEntitiesContextInstance.es.js";
18
+ import "semver";
19
+ import "react-dom";
20
+ import "react-redux";
17
21
  import ue from "clsx";
18
22
  import gt from "axios";
19
- import { s as vt, b as bt, h as we, g as yt, c as wt } from "./versionUploadHelpers.es.js";
23
+ import "./ContextMenuContextInstance.es.js";
24
+ import { s as vt, a as bt, h as we, g as yt, b as wt } from "./versionUploadHelpers.es.js";
20
25
  import { p as It } from "./parseFilename.es.js";
21
- import { u as Dt } from "./VersionUploadContext.es.js";
26
+ import { u as Dt } from "./VersionUploadContextInstance.es.js";
22
27
  const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PURE__ */ R(ze, { className: ue(d, { active: a }), ...g, children: [
23
28
  /* @__PURE__ */ t(Ce, { icon: i }),
24
29
  /* @__PURE__ */ t("span", { children: r })
@@ -52,7 +57,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
52
57
  (n) => n.processing && !a.find((I) => I.activityId === n.activityId) && i
53
58
  ), s = u.filter(
54
59
  (n) => n.processing?.eventId
55
- ), h = u.filter(
60
+ ), m = u.filter(
56
61
  (n) => !n.processing?.eventId
57
62
  ).filter(
58
63
  (n) => n.availability === "conversionRequired"
@@ -61,7 +66,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
61
66
  playable: a,
62
67
  incompatible: y,
63
68
  processing: s,
64
- queued: h
69
+ queued: m
65
70
  };
66
71
  }, xt = ({
67
72
  onClose: r,
@@ -78,9 +83,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
78
83
  f("");
79
84
  };
80
85
  }, [i, u.current]);
81
- const [h, { isLoading: n }] = Me(), I = async () => {
86
+ const [m, { isLoading: n }] = Me(), I = async () => {
82
87
  try {
83
- await h({
88
+ await m({
84
89
  projectName: a,
85
90
  versionId: d,
86
91
  activityId: g,
@@ -93,7 +98,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
93
98
  }
94
99
  }, E = (v) => {
95
100
  v.preventDefault(), s && I();
96
- }, m = () => {
101
+ }, h = () => {
97
102
  f(""), r();
98
103
  };
99
104
  return /* @__PURE__ */ t(
@@ -102,9 +107,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
102
107
  onClose: r,
103
108
  header: /* @__PURE__ */ t(Je, { children: `Editing label: ${i}` }),
104
109
  footer: /* @__PURE__ */ R(ft, { children: [
105
- /* @__PURE__ */ t(ce, { label: "Cancel", onClick: m, variant: "text" }),
110
+ /* @__PURE__ */ t(ce, { label: "Cancel", onClick: h, variant: "text" }),
106
111
  /* @__PURE__ */ t(
107
- ht,
112
+ mt,
108
113
  {
109
114
  label: "Save",
110
115
  active: !!s,
@@ -130,26 +135,26 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
130
135
  ) })
131
136
  }
132
137
  );
133
- }, jt = ({
138
+ }, an = ({
134
139
  projectName: r,
135
140
  versionId: i,
136
141
  productId: a,
137
142
  isLoadingVersion: d,
138
143
  scope: g
139
144
  }) => {
140
- const { onOpenViewer: y, user: u, viewer: s, dispatch: f } = Ee(), { data: h, isLoading: n } = Ue({ projectName: r }, { skip: !r }), I = u.data?.isManager || u.data?.isAdmin || !n && (!h?.activities?.enabled || !!h?.activities?.activities?.includes("reviewable")), {
145
+ const { onOpenViewer: y, user: u, viewer: s, dispatch: f } = Ee(), { data: m, isLoading: n } = Ue({ projectName: r }, { skip: !r }), I = u.data?.isManager || u.data?.isAdmin || !n && (!m?.activities?.enabled || !!m?.activities?.activities?.includes("reviewable")), {
141
146
  data: E,
142
- isFetching: m,
147
+ isFetching: h,
143
148
  currentData: v
144
149
  } = Fe(
145
150
  { projectName: r, versionId: i },
146
151
  { skip: !i || !r }
147
- ), P = !1, V = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, W] = x(null), [M, p] = x(null), c = $e(
148
- me(Ae),
149
- me(Oe, {
152
+ ), P = !1, W = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, V] = x(null), [M, p] = x(null), c = $e(
153
+ he(Ae),
154
+ he(Oe, {
150
155
  coordinateGetter: Be
151
156
  })
152
- ), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, K = m && i !== $ || d, N = (e) => {
157
+ ), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, K = h && i !== $ || d, N = (e) => {
153
158
  if (M) return console.log("Dragging, cannot open review");
154
159
  const o = e.currentTarget.id;
155
160
  if (!o || !a) return console.error("No reviewable id or product id");
@@ -263,11 +268,11 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
263
268
  {
264
269
  projectName: r,
265
270
  onClick: N,
266
- isSelected: V.includes(e.fileId),
271
+ isSelected: W.includes(e.fileId),
267
272
  isDragging: !!M,
268
273
  onContextMenu: G,
269
274
  onEdit: (o) => {
270
- o.stopPropagation(), W(e.activityId);
275
+ o.stopPropagation(), V(e.activityId);
271
276
  },
272
277
  ...e
273
278
  },
@@ -282,7 +287,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
282
287
  projectName: r,
283
288
  isDragOverlay: !0,
284
289
  isDragging: !0,
285
- isSelected: V.includes(C.fileId)
290
+ isSelected: W.includes(C.fileId)
286
291
  }
287
292
  ) : null })
288
293
  ]
@@ -326,7 +331,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
326
331
  xt,
327
332
  {
328
333
  isOpen: !0,
329
- onClose: () => W(null),
334
+ onClose: () => V(null),
330
335
  label: b.find((e) => e.activityId === k)?.label || "",
331
336
  projectName: r,
332
337
  versionId: i,
@@ -350,35 +355,35 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
350
355
  }, [g]), le(() => {
351
356
  if (i && y.current && s.startsWith(de) && !u.current) {
352
357
  y.current.focus();
353
- const m = de.length, v = s.length;
354
- y.current.setSelectionRange(m, v), u.current = !0;
358
+ const h = de.length, v = s.length;
359
+ y.current.setSelectionRange(h, v), u.current = !0;
355
360
  } else i || (u.current = !1);
356
361
  }, [i, s]);
357
- const h = () => {
362
+ const m = () => {
358
363
  s.trim() && d && d(s.trim());
359
364
  }, n = () => {
360
365
  f(g), a && a();
361
366
  }, I = s.trim().length > 0;
362
367
  return /* @__PURE__ */ t(Se, { isOpen: i, onClose: n, header: "Upload Entity", footer: /* @__PURE__ */ R("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end" }, children: [
363
368
  /* @__PURE__ */ t(ce, { variant: "text", onClick: n, children: "Cancel" }),
364
- /* @__PURE__ */ t(ce, { variant: "filled", onClick: h, disabled: !I, children: "Upload" })
365
- ] }), size: "sm", children: /* @__PURE__ */ t("div", { style: { padding: "16px 0" }, children: /* @__PURE__ */ t(mt, { label: "Product Name", children: /* @__PURE__ */ t(
369
+ /* @__PURE__ */ t(ce, { variant: "filled", onClick: m, disabled: !I, children: "Upload" })
370
+ ] }), size: "sm", children: /* @__PURE__ */ t("div", { style: { padding: "16px 0" }, children: /* @__PURE__ */ t(ht, { label: "Product Name", children: /* @__PURE__ */ t(
366
371
  xe,
367
372
  {
368
373
  ref: y,
369
374
  placeholder: "Enter product name...",
370
375
  value: s,
371
- onChange: (m) => f(m.target.value),
376
+ onChange: (h) => f(h.target.value),
372
377
  autoFocus: !0,
373
- onKeyDown: (m) => {
374
- m.key === "Enter" && I ? (m.preventDefault(), h()) : m.key === "Escape" && (m.preventDefault(), n());
378
+ onKeyDown: (h) => {
379
+ h.key === "Enter" && I ? (h.preventDefault(), m()) : h.key === "Escape" && (h.preventDefault(), n());
375
380
  }
376
381
  }
377
382
  ) }) }) });
378
383
  }, kt = [
379
384
  { id: "thumbnail", label: "Upload thumbnail", icon: "add_photo_alternate" },
380
385
  { id: "version", label: "Upload version", icon: "layers" }
381
- ], en = ({
386
+ ], on = ({
382
387
  children: r = [],
383
388
  entityType: i,
384
389
  entities: a = [],
@@ -387,7 +392,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
387
392
  versionsInputRef: y,
388
393
  onVersionCreated: u
389
394
  }) => {
390
- const { dispatch: s } = Ee(), f = Dt(), [h, n] = x(!1), [I, E] = x(null), m = _(0), [v, P] = x(null), [V, F] = x(0), [O, k] = x(!1), [W, M] = x(null), p = a.length === 1 ? a[0] : null, c = p?.task?.id, b = p?.folder?.id, C = p?.product?.id, $ = p?.id, q = !!(p && i !== "representation"), { handleFileUpload: K } = je({
395
+ const { dispatch: s } = Ee(), f = Dt(), [m, n] = x(!1), [I, E] = x(null), h = _(0), [v, P] = x(null), [W, F] = x(0), [O, k] = x(!1), [V, M] = x(null), p = a.length === 1 ? a[0] : null, c = p?.task?.id, b = p?.folder?.id, C = p?.product?.id, $ = p?.id, q = !!(p && i !== "representation"), { handleFileUpload: K } = je({
391
396
  projectName: d,
392
397
  versionId: $,
393
398
  taskId: c,
@@ -401,9 +406,9 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
401
406
  F(e);
402
407
  }
403
408
  }), N = kt.filter((e) => e.id === "version" ? q : !0), w = () => {
404
- P(null), n(!1), E(null), m.current = 0, F(0), k(!1), M(null);
409
+ P(null), n(!1), E(null), h.current = 0, F(0), k(!1), M(null);
405
410
  }, Z = async (e) => {
406
- if (!W || !p) {
411
+ if (!V || !p) {
407
412
  k(!1), M(null);
408
413
  return;
409
414
  }
@@ -425,13 +430,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
425
430
  // default product type for uploaded files
426
431
  productBaseType: "review"
427
432
  });
428
- k(!1), await z(W, l.id), M(null);
433
+ k(!1), await z(V, l.id), M(null);
429
434
  } catch (l) {
430
435
  we(l, "creating product"), w();
431
436
  }
432
437
  }, Y = () => {
433
438
  k(!1), M(null), w();
434
- }, [j] = We(), [ee] = Ve(), H = async (e) => {
439
+ }, [j] = Ve(), [ee] = We(), H = async (e) => {
435
440
  if (!q || !p)
436
441
  return A.error("Please select exactly one version to upload reviewables"), w();
437
442
  if (f) {
@@ -506,13 +511,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
506
511
  console.error(o), A.error(o.message), w();
507
512
  }
508
513
  }, [pe] = Ne(), te = (e) => {
509
- e.preventDefault(), m.current++, m.current === 1 && n(!0);
514
+ e.preventDefault(), h.current++, h.current === 1 && n(!0);
510
515
  }, ne = (e) => {
511
- e.preventDefault(), m.current--, m.current === 0 && (n(!1), E(null));
516
+ e.preventDefault(), h.current--, h.current === 0 && (n(!1), E(null));
512
517
  }, re = (e) => {
513
518
  e.preventDefault();
514
519
  }, ie = (e) => {
515
- if (e.preventDefault(), m.current = 0, n(!1), E(null), !(!e.dataTransfer.files || e.dataTransfer.files.length === 0)) {
520
+ if (e.preventDefault(), h.current = 0, n(!1), E(null), !(!e.dataTransfer.files || e.dataTransfer.files.length === 0)) {
516
521
  if (I === "thumbnail") {
517
522
  P("thumbnail");
518
523
  const o = e.dataTransfer.files[0];
@@ -532,14 +537,14 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
532
537
  /* @__PURE__ */ R(
533
538
  et,
534
539
  {
535
- className: ue({ dragging: h }),
540
+ className: ue({ dragging: m }),
536
541
  onDragEnter: te,
537
542
  onDragLeave: ne,
538
543
  onDragOver: re,
539
544
  onDrop: ie,
540
545
  children: [
541
546
  /* @__PURE__ */ t(tt, { children: /* @__PURE__ */ t("div", { children: r }) }),
542
- h && /* @__PURE__ */ t(ge, { children: N.map((e) => /* @__PURE__ */ t(
547
+ m && /* @__PURE__ */ t(ge, { children: N.map((e) => /* @__PURE__ */ t(
543
548
  Rt,
544
549
  {
545
550
  id: e.id,
@@ -557,7 +562,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
557
562
  rt,
558
563
  {
559
564
  style: {
560
- right: `${100 - V}%`
565
+ right: `${100 - W}%`
561
566
  }
562
567
  }
563
568
  ),
@@ -588,7 +593,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
588
593
  Pt,
589
594
  {
590
595
  isOpen: O,
591
- files: W,
596
+ files: V,
592
597
  onSubmit: Z,
593
598
  onCancel: Y
594
599
  }
@@ -597,7 +602,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
597
602
  }, se = () => /* @__PURE__ */ t("span", { className: "slash", children: "/" }), Mt = ["more", "versions"], Ie = (r) => {
598
603
  const i = r.target, a = i.closest(".dropdown")?.id || "";
599
604
  return [i, a];
600
- }, tn = ({
605
+ }, sn = ({
601
606
  projectName: r,
602
607
  hideProjectName: i,
603
608
  segments: a,
@@ -606,12 +611,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
606
611
  entityType: y,
607
612
  scope: u
608
613
  }) => {
609
- const s = _(null), [f, h] = x(null), [n, I] = x(null), [E, m] = x(!1), v = _(null);
614
+ const s = _(null), [f, m] = x(null), [n, I] = x(null), [E, h] = x(!1), v = _(null);
610
615
  ae(() => {
611
- I(null), m(!0);
616
+ I(null), h(!0);
612
617
  }, [a]), ae(() => {
613
618
  if (!s.current) {
614
- m(!1);
619
+ h(!1);
615
620
  return;
616
621
  }
617
622
  const c = s.current, b = c.clientWidth, C = De(c);
@@ -625,27 +630,27 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
625
630
  let w = Array.from($).slice(0, N).filter(
626
631
  (Z) => Z.nodeType === Node.ELEMENT_NODE && Z.className.includes("full")
627
632
  )?.length || 2;
628
- w = Math.max(w, 1), I(w), m(!1);
633
+ w = Math.max(w, 1), I(w), h(!1);
629
634
  }, [s.current, E]), ae(() => {
630
635
  if (!s.current || !v.current || !n) return;
631
636
  const c = s.current, b = De(c) ?? 1 / 0, C = c.clientWidth - b;
632
637
  C <= 0 || v.current.clientWidth - C;
633
638
  }, [n]);
634
- const P = n && a.length > n ? a.slice(-n) : a, V = n && a.length > n ? a.slice(0, -n) : [];
635
- i && V.unshift({ type: "project", label: r, id: r });
639
+ const P = n && a.length > n ? a.slice(-n) : a, W = n && a.length > n ? a.slice(0, -n) : [];
640
+ i && W.unshift({ type: "project", label: r, id: r });
636
641
  let F, O = P;
637
642
  y === "version" && a.length > 0 && (F = a[a.length - 1], O = P.slice(0, -1));
638
643
  const k = (c) => {
639
644
  const [, b] = Ie(c);
640
- b && !f && h(b);
641
- }, W = () => h(null), M = (c) => {
645
+ b && !f && m(b);
646
+ }, V = () => m(null), M = (c) => {
642
647
  const [b, C] = Ie(c);
643
648
  if (!Mt.includes(C)) return;
644
- !!b.closest("li") ? h(null) : f !== C && h(C);
649
+ !!b.closest("li") ? m(null) : f !== C && m(C);
645
650
  }, p = { scope: u, projectName: r };
646
651
  return /* @__PURE__ */ R(at, { className: ue({ loading: g }), id: "entity-path", ref: s, children: [
647
652
  !i && /* @__PURE__ */ t(J, { children: r }),
648
- !!V.length && /* @__PURE__ */ R(Q, { children: [
653
+ !!W.length && /* @__PURE__ */ R(Q, { children: [
649
654
  !i && /* @__PURE__ */ t(se, {}),
650
655
  /* @__PURE__ */ R(
651
656
  J,
@@ -653,11 +658,11 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
653
658
  className: "dropdown more",
654
659
  id: "more",
655
660
  onMouseEnter: k,
656
- onMouseLeave: W,
661
+ onMouseLeave: V,
657
662
  onClick: M,
658
663
  children: [
659
664
  "...",
660
- f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: V.map((c) => /* @__PURE__ */ he(X, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
665
+ f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: W.map((c) => /* @__PURE__ */ me(X, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
661
666
  ]
662
667
  }
663
668
  )
@@ -674,7 +679,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
674
679
  className: "full dropdown",
675
680
  id: "versions",
676
681
  onMouseEnter: k,
677
- onMouseLeave: W,
682
+ onMouseLeave: V,
678
683
  onClick: M,
679
684
  children: [
680
685
  /* @__PURE__ */ t(
@@ -689,7 +694,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
689
694
  ] })
690
695
  }
691
696
  ),
692
- f === "versions" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: d.map((c) => /* @__PURE__ */ he(X, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
697
+ f === "versions" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: d.map((c) => /* @__PURE__ */ me(X, { ...p, segment: c, key: c.id }, /* @__PURE__ */ t(ye, { children: c.label }))) }) })
693
698
  ]
694
699
  }
695
700
  )
@@ -698,8 +703,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
698
703
  }, De = (r) => {
699
704
  const i = r.parentElement;
700
705
  if (!i) return;
701
- const a = getComputedStyle(i), d = parseInt(a.paddingLeft) || 0, g = parseInt(a.paddingRight) || 0, y = parseInt(a.gap) || 0, u = i.clientWidth - d - g, s = Array.from(i.children).filter((h) => h.id !== "entity-path"), f = Array.from(s).reduce(
702
- (h, n) => h + n.clientWidth,
706
+ const a = getComputedStyle(i), d = parseInt(a.paddingLeft) || 0, g = parseInt(a.paddingRight) || 0, y = parseInt(a.gap) || 0, u = i.clientWidth - d - g, s = Array.from(i.children).filter((m) => m.id !== "entity-path"), f = Array.from(s).reduce(
707
+ (m, n) => m + n.clientWidth,
703
708
  0
704
709
  );
705
710
  return u - f - y * (s.length - 1);
@@ -707,14 +712,14 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
707
712
  const d = a - i;
708
713
  let g = 0;
709
714
  for (let s = 0; s < a - d; s++) {
710
- const f = s > 1 ? s + d : s, h = r[f]?.clientWidth;
711
- isNaN(h) || (g += h);
715
+ const f = s > 1 ? s + d : s, m = r[f]?.clientWidth;
716
+ isNaN(m) || (g += m);
712
717
  }
713
718
  return g + (4 * i - 1) + 40;
714
719
  };
715
720
  export {
716
- en as E,
717
- jt as R,
718
- tn as a,
721
+ on as E,
722
+ an as R,
723
+ sn as a,
719
724
  St as g
720
725
  };
@@ -6,14 +6,18 @@ import "react-toastify";
6
6
  import "uuid";
7
7
  import "./searchTerms.es.js";
8
8
  import { createPortal as ce } from "react-dom";
9
- import { b as X, H as q, a as de, S as ue, d as pe } from "./SimpleTable.es.js";
9
+ import { b as X, H as q, a as de, S as ue, e as pe } from "./SimpleTable.es.js";
10
10
  import { InputText as fe, theme as he, Dialog as me, SwitchButton as ge, Button as A } from "@ynput/ayon-react-components";
11
11
  import M from "styled-components";
12
12
  import { E as be } from "./EmptyPlaceholder.es.js";
13
13
  import { E as V, a as ve } from "./EntityTooltip.es.js";
14
- import { c9 as we } from "./getUris.es.js";
15
- import { a as ke } from "./ProjectContext.es.js";
16
- import { u as xe } from "./ProjectFoldersContext.es.js";
14
+ import { ca as we } from "./getUris.es.js";
15
+ import "@module-federation/enhanced/runtime";
16
+ import { y as ke, x as xe } from "./DeleteEntitiesContextInstance.es.js";
17
+ import "semver";
18
+ import "./ContextMenuContextInstance.es.js";
19
+ import "clsx";
20
+ import "react-redux";
17
21
  import { g as W } from "./getThumbnailUrl.es.js";
18
22
  import { g as J } from "./getEntityTypeIcon.es.js";
19
23
  import { matchSorter as Te } from "match-sorter";
@@ -260,7 +264,7 @@ const I = {
260
264
  includeColors: o = !1,
261
265
  includeThumbnails: e = !1
262
266
  }) => {
263
- const { folders: i, isLoading: s } = xe(), l = (a) => r.find((w) => w.name === a)?.icon || "folder", n = (a) => o ? r.find((w) => w.name === a)?.color : void 0, u = (a) => !e || !t ? null : W({
267
+ const { folders: i, isLoading: s } = ke(), l = (a) => r.find((w) => w.name === a)?.icon || "folder", n = (a) => o ? r.find((w) => w.name === a)?.color : void 0, u = (a) => !e || !t ? null : W({
264
268
  projectName: t,
265
269
  entityType: "folder",
266
270
  entityId: a.id,
@@ -316,7 +320,7 @@ const I = {
316
320
  getData: g,
317
321
  isFetching: s
318
322
  };
319
- }, $e = ({
323
+ }, ye = ({
320
324
  projectName: t,
321
325
  entityType: r,
322
326
  search: o,
@@ -324,7 +328,7 @@ const I = {
324
328
  reviewablesOnly: i,
325
329
  includeTask: s
326
330
  }) => {
327
- const l = I[r] || [], n = ke(), {
331
+ const l = I[r] || [], n = xe(), {
328
332
  data: u,
329
333
  folders: f,
330
334
  isFetching: h
@@ -345,14 +349,14 @@ const I = {
345
349
  }, p = (x, C = []) => {
346
350
  const T = e[x];
347
351
  return T?.length > 0 ? T : C ? C.map((R) => R.id) : void 0;
348
- }, w = { includeTask: s, hasReviewables: i || void 0 }, v = $(
352
+ }, w = { includeTask: s, hasReviewables: i || void 0 }, v = y(
349
353
  t,
350
354
  "task",
351
355
  o.task,
352
356
  !l.includes("task"),
353
357
  p(I.task[I.task.length - 2], c),
354
358
  n?.taskTypes
355
- ), P = $(
359
+ ), P = y(
356
360
  t,
357
361
  "product",
358
362
  o.product,
@@ -363,7 +367,7 @@ const I = {
363
367
  ),
364
368
  n?.productTypes,
365
369
  w
366
- ), F = $(
370
+ ), F = y(
367
371
  t,
368
372
  "version",
369
373
  o.version,
@@ -374,7 +378,7 @@ const I = {
374
378
  ),
375
379
  void 0,
376
380
  w
377
- ), D = $(
381
+ ), D = y(
378
382
  t,
379
383
  "representation",
380
384
  o.representation,
@@ -383,7 +387,7 @@ const I = {
383
387
  I.representation[I.representation.length - 2],
384
388
  F.data
385
389
  )
386
- ), m = $(
390
+ ), m = y(
387
391
  t,
388
392
  "workfile",
389
393
  o.workfile,
@@ -401,7 +405,7 @@ const I = {
401
405
  representation: D,
402
406
  workfile: m
403
407
  };
404
- }, $ = (t, r, o, e, i, s, { includeTask: l, hasReviewables: n } = {}) => {
408
+ }, y = (t, r, o, e, i, s, { includeTask: l, hasReviewables: n } = {}) => {
405
409
  const { data: u, isFetching: f, hasNextPage: h, fetchNextPage: c, isFetchingNextPage: g, error: a } = we(
406
410
  {
407
411
  projectName: t,
@@ -428,7 +432,7 @@ const I = {
428
432
  fetchNextPage: c,
429
433
  error: a
430
434
  };
431
- }, ye = ({
435
+ }, $e = ({
432
436
  foldersSelection: t,
433
437
  foldersData: r
434
438
  }) => {
@@ -540,7 +544,7 @@ const I = {
540
544
  }
541
545
  }
542
546
  }
543
- `, dt = ({
547
+ `, ht = ({
544
548
  projectName: t,
545
549
  entityType: r,
546
550
  initialSelection: o,
@@ -587,17 +591,17 @@ const I = {
587
591
  d,
588
592
  Object.keys(b).filter((O) => b[O])
589
593
  ])
590
- ), R = I[r], K = !!c && R.includes("product"), [y, Z] = B(g), L = $e({
594
+ ), R = I[r], K = !!c && R.includes("product"), [$, Z] = B(g), L = ye({
591
595
  entityType: r,
592
596
  projectName: t,
593
597
  search: m,
594
598
  selection: T,
595
- reviewablesOnly: K && y,
599
+ reviewablesOnly: K && $,
596
600
  includeTask: a
597
601
  }), _ = h && r === "version" ? L.version.data.filter((d) => "hasReviewables" in d && d.hasReviewables === !1).map((d) => d.id) : [], G = _.length > 0 ? Array.from(/* @__PURE__ */ new Set([...n, ..._])) : n, ee = (d) => _.includes(d) ? "Version has no reviewables" : f?.(d), te = (d) => {
598
602
  const b = L[d];
599
603
  b?.hasNextPage && !b.isFetchingNextPage && b.fetchNextPage?.();
600
- }, [oe, ne] = ye({
604
+ }, [oe, ne] = $e({
601
605
  foldersSelection: v.folder,
602
606
  foldersData: L.folder
603
607
  });
@@ -654,8 +658,8 @@ const I = {
654
658
  ge,
655
659
  {
656
660
  label: "Show reviewables only",
657
- value: y,
658
- onClick: () => Z(!y),
661
+ value: $,
662
+ onClick: () => Z(!$),
659
663
  style: {
660
664
  width: "fit-content",
661
665
  marginLeft: "auto",
@@ -693,7 +697,7 @@ const I = {
693
697
  );
694
698
  };
695
699
  export {
696
- dt as E,
700
+ ht as E,
697
701
  Fe as T,
698
702
  Ke as u
699
703
  };