@ynput/ayon-frontend-shared 0.6.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 (89) hide show
  1. package/dist/ContextMenu.es.js +34 -16
  2. package/dist/DetailsPanel.es.js +292 -298
  3. package/dist/Feed.es.js +179 -50
  4. package/dist/ListTable.es.js +32 -35
  5. package/dist/NewEntity.es.js +1256 -11
  6. package/dist/ProjectTreeTable.es.js +4451 -2965
  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/chunks/Actions.es.js +9 -4
  11. package/dist/chunks/ColumnDropIndicator.es.js +174 -328
  12. package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
  13. package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
  14. package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
  15. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
  16. package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
  17. package/dist/chunks/EmptyPlaceholder.es.js +4 -4
  18. package/dist/chunks/EntityPath.es.js +58 -53
  19. package/dist/chunks/EntityPickerDialog.es.js +24 -20
  20. package/dist/chunks/EntityTooltip.es.js +20 -13
  21. package/dist/chunks/EntityUpdatesContext.es.js +38 -96
  22. package/dist/chunks/Feed.es.js +1495 -1439
  23. package/dist/chunks/FilterErrorActions.es.js +25 -229
  24. package/dist/chunks/Menu.es.js +21 -17
  25. package/dist/chunks/MenuContext.es.js +14 -65
  26. package/dist/chunks/MenuItem.es.js +34 -24
  27. package/dist/chunks/MetaWidget.es.js +2835 -4301
  28. package/dist/chunks/NewEntityContextInstance.es.js +11 -0
  29. package/dist/chunks/PlayableIcon.es.js +1532 -1594
  30. package/dist/chunks/ProjectContext.es.js +102 -66
  31. package/dist/chunks/RepresentationsList.es.js +1 -1
  32. package/dist/chunks/ReviewablesSelector.es.js +457 -458
  33. package/dist/chunks/SimpleForm.es.js +9 -9
  34. package/dist/chunks/SimpleTable.es.js +15 -13
  35. package/dist/chunks/Slicer.es.js +163 -154
  36. package/dist/chunks/TableSettingsFallback.es.js +25 -13
  37. package/dist/chunks/ThumbnailSimple.es.js +150 -261
  38. package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
  39. package/dist/chunks/VideoPlayer.es.js +24 -28
  40. package/dist/chunks/Watchers.es.js +384 -389
  41. package/dist/chunks/entityDefinitions.es.js +2 -350
  42. package/dist/chunks/extractVersionFromFilename.es.js +28 -0
  43. package/dist/chunks/getBundleMode.es.js +61 -16
  44. package/dist/chunks/getUris.es.js +737 -712
  45. package/dist/chunks/searchTerms.es.js +57 -56
  46. package/dist/chunks/useAttributeEnums.es.js +4 -4
  47. package/dist/chunks/useCreateContextMenu.es.js +66 -90
  48. package/dist/chunks/useHierarchySelection.es.js +24 -0
  49. package/dist/chunks/useLoadModule.es.js +74 -0
  50. package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
  51. package/dist/chunks/versionUploadHelpers.es.js +16 -42
  52. package/dist/chunks/viewUpdateHelper.es.js +67 -50
  53. package/dist/components.es.js +1425 -999
  54. package/dist/context.es.js +791 -80
  55. package/dist/hooks.es.js +115 -120
  56. package/dist/index.es.js +19 -23
  57. package/dist/types/Actions.d.ts +7 -7
  58. package/dist/types/ContextMenu.d.ts +11 -8
  59. package/dist/types/DetailsPanel.d.ts +102 -9
  60. package/dist/types/EntityPickerDialog.d.ts +7 -7
  61. package/dist/types/Feed.d.ts +11 -8
  62. package/dist/types/ListTable.d.ts +7 -7
  63. package/dist/types/NewEntity.d.ts +16 -10
  64. package/dist/types/ProjectTreeTable.d.ts +22 -115
  65. package/dist/types/RepresentationsList.d.ts +7 -7
  66. package/dist/types/SimpleTable.d.ts +11 -8
  67. package/dist/types/Slicer.d.ts +10 -7
  68. package/dist/types/Views.d.ts +10 -7
  69. package/dist/types/api.d.ts +132 -120
  70. package/dist/types/components.d.ts +13 -8
  71. package/dist/types/context.d.ts +56 -16
  72. package/dist/types/hooks.d.ts +7 -7
  73. package/dist/types/index.d.ts +7 -7
  74. package/dist/types/util.d.ts +12 -7
  75. package/dist/util.es.js +72 -71
  76. package/package.json +1 -1
  77. package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
  78. package/dist/chunks/DetailsPanelContext.es.js +0 -155
  79. package/dist/chunks/GlobalContext.es.js +0 -52
  80. package/dist/chunks/NewEntityContext.es.js +0 -1242
  81. package/dist/chunks/ProjectFoldersContext.es.js +0 -134
  82. package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
  83. package/dist/chunks/VersionUploadContext.es.js +0 -232
  84. package/dist/chunks/ViewsContext.es.js +0 -878
  85. package/dist/chunks/uriUtils.es.js +0 -48
  86. package/dist/chunks/useColumnDragRestriction.es.js +0 -158
  87. package/dist/chunks/useLocalStorage.es.js +0 -355
  88. package/dist/chunks/useSessionStorage.es.js +0 -61
  89. /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
@@ -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
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 { u as Ee } from "./DetailsPanelContext.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
152
  ), P = !1, W = s?.reviewableIds || [], F = u.name, O = u.data?.isUser, [k, V] = x(null), [M, p] = x(null), c = $e(
148
- me(Ae),
149
- me(Oe, {
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");
@@ -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), [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({
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,7 +406,7 @@ 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
411
  if (!V || !p) {
407
412
  k(!1), M(null);
@@ -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,
@@ -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,7 +630,7 @@ 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;
@@ -637,11 +642,11 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
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
- }, V = () => 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 }),
@@ -657,7 +662,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
657
662
  onClick: M,
658
663
  children: [
659
664
  "...",
660
- f === "more" && /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(be, { children: W.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
  )
@@ -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
14
  import { ca as we } from "./getUris.es.js";
15
- import { a as ke } from "./ProjectContext.es.js";
16
- import { u as xe } from "./ProjectFoldersContext.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
  };
@@ -4,12 +4,19 @@ import U, { keyframes as W } from "styled-components";
4
4
  import "./searchTerms.es.js";
5
5
  import { bD as L } from "./getUris.es.js";
6
6
  import "primereact/confirmdialog";
7
- import { u as Y } from "./ProjectContext.es.js";
7
+ import "react";
8
+ import "@module-federation/enhanced/runtime";
9
+ import { n as Y } from "./DeleteEntitiesContextInstance.es.js";
8
10
  import "lodash";
9
11
  import "react-toastify";
10
12
  import { g as _ } from "./getEntityTypeIcon.es.js";
11
13
  import "uuid";
12
14
  import { g as z } from "./getThumbnailUrl.es.js";
15
+ import "semver";
16
+ import "./ContextMenuContextInstance.es.js";
17
+ import "clsx";
18
+ import "react-dom";
19
+ import "react-redux";
13
20
  const D = W`
14
21
  from {
15
22
  opacity: 0.4;
@@ -35,20 +42,20 @@ from {
35
42
 
36
43
  /* shadow */
37
44
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
38
- `, G = ["folder", "task", "version", "workfile"], tt = ({
45
+ `, G = ["folder", "task", "version", "workfile"], nt = ({
39
46
  entityType: t,
40
- entityId: e,
41
- projectName: m,
42
- pos: { left: i = 0, top: l = 0 } = {},
47
+ entityId: i,
48
+ projectName: c,
49
+ pos: { left: e = 0, top: l = 0 } = {},
43
50
  projectInfo: r,
44
51
  onMouseEnter: d,
45
52
  onMouseLeave: u
46
53
  }) => {
47
- const o = Y(), a = m || o?.projectName, p = !!t && G.includes(t), { data: c, isFetching: f } = L(
48
- { entityType: t, entityId: e, projectName: a },
49
- { skip: !p || !e || !a }
54
+ const o = Y(), a = c || o?.projectName, p = !!t && G.includes(t), { data: m, isFetching: f } = L(
55
+ { entityType: t, entityId: i, projectName: a },
56
+ { skip: !p || !i || !a }
50
57
  ), n = 220;
51
- i + n / 2 > window.innerWidth && (i = window.innerWidth - n / 2);
58
+ e + n / 2 > window.innerWidth && (e = window.innerWidth - n / 2);
52
59
  const {
53
60
  title: h,
54
61
  subTitle: T,
@@ -60,8 +67,8 @@ from {
60
67
  thumbnailId: b,
61
68
  status: E,
62
69
  thumbnailHash: P
63
- } = c || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), O = c ? z({
64
- entityId: e || "",
70
+ } = m || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), O = m ? z({
71
+ entityId: i || "",
65
72
  entityType: t,
66
73
  thumbnailHash: P,
67
74
  thumbnailId: b,
@@ -76,7 +83,7 @@ from {
76
83
  return p ? /* @__PURE__ */ I(
77
84
  F,
78
85
  {
79
- style: { left: i, top: l, maxWidth: n },
86
+ style: { left: e, top: l, maxWidth: n },
80
87
  onMouseEnter: d,
81
88
  onMouseLeave: u,
82
89
  title: h,
@@ -95,5 +102,5 @@ from {
95
102
  };
96
103
  export {
97
104
  G as E,
98
- tt as a
105
+ nt as a
99
106
  };