@ynput/ayon-frontend-shared 0.4.7 → 0.5.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 (48) hide show
  1. package/dist/DetailsPanel.es.js +684 -651
  2. package/dist/ListTable.es.js +8 -7
  3. package/dist/ProjectTreeTable.es.js +2223 -2184
  4. package/dist/Slicer.es.js +152 -120
  5. package/dist/api.es.js +202 -201
  6. package/dist/chunks/Actions.es.js +20 -20
  7. package/dist/chunks/ColumnDropIndicator.es.js +127 -241
  8. package/dist/chunks/DeleteEntitiesContext.es.js +36 -36
  9. package/dist/chunks/DetailsDialog.es.js +3 -3
  10. package/dist/chunks/EntityPath.es.js +22 -22
  11. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  12. package/dist/chunks/EntityTooltip.es.js +12 -12
  13. package/dist/chunks/Feed.es.js +2 -2
  14. package/dist/chunks/FilterErrorActions.es.js +5 -5
  15. package/dist/chunks/GlobalContext.es.js +14 -14
  16. package/dist/chunks/InfoMessage.es.js +146 -0
  17. package/dist/chunks/Menu.es.js +5 -5
  18. package/dist/chunks/MenuContext.es.js +75 -73
  19. package/dist/chunks/MetaWidget.es.js +1968 -1960
  20. package/dist/chunks/NewEntityContext.es.js +538 -543
  21. package/dist/chunks/PlayableIcon.es.js +54 -54
  22. package/dist/chunks/ProjectContext.es.js +12 -12
  23. package/dist/chunks/ProjectFoldersContext.es.js +84 -76
  24. package/dist/chunks/RepresentationsList.es.js +1 -1
  25. package/dist/chunks/ReviewablesSelector.es.js +387 -384
  26. package/dist/chunks/SimpleTable.es.js +286 -283
  27. package/dist/chunks/Slicer.es.js +1121 -683
  28. package/dist/chunks/VersionUploadContext.es.js +26 -26
  29. package/dist/chunks/ViewsContext.es.js +31 -31
  30. package/dist/chunks/Watchers.es.js +1 -1
  31. package/dist/chunks/entityDefinitions.es.js +275 -133
  32. package/dist/chunks/getUris.es.js +236 -231
  33. package/dist/chunks/searchTerms.es.js +9 -0
  34. package/dist/chunks/useAttributeEnums.es.js +69 -61
  35. package/dist/chunks/useLocalStorage.es.js +10 -10
  36. package/dist/chunks/viewUpdateHelper.es.js +23 -23
  37. package/dist/components.es.js +166 -166
  38. package/dist/hooks.es.js +44 -43
  39. package/dist/index.es.js +11 -10
  40. package/dist/types/DetailsPanel.d.ts +6 -0
  41. package/dist/types/ProjectTreeTable.d.ts +28 -6
  42. package/dist/types/RepresentationsList.d.ts +3 -0
  43. package/dist/types/SimpleTable.d.ts +1 -0
  44. package/dist/types/Slicer.d.ts +103 -18
  45. package/dist/types/api.d.ts +13 -0
  46. package/dist/types/components.d.ts +7 -5
  47. package/package.json +11 -10
  48. package/dist/chunks/useSlicerSplitter.es.js +0 -18
@@ -1,12 +1,12 @@
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 K } from "uuid";
5
5
  import { createPortal as he } from "react-dom";
6
6
  import { Dialog as me } from "primereact/dialog";
7
- import { Dialog as ge, InputText as re, Button as z } from "@ynput/ayon-react-components";
7
+ import { Dialog as ge, InputText as re, Button as H } 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 { c1 as we, cK as ye, dk as Ce, cH 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";
@@ -113,7 +113,7 @@ const Y = [
113
113
  width: 100%;
114
114
  /* room for the 2px focus outline */
115
115
  margin: 2px 0;
116
- `, ze = (e, s) => {
116
+ `, He = (e, s) => {
117
117
  const i = (e ?? "").trim();
118
118
  return i !== "" && Number(i) === s;
119
119
  }, ne = ({
@@ -131,7 +131,7 @@ const Y = [
131
131
  } = e, [C, u] = x(""), [p, a] = x({}), g = U(
132
132
  () => Y.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(() => Re(n), [n]), b = f > te, h = !!r && !b, S = b ? g.every((d) => He(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(
@@ -181,9 +181,9 @@ const Y = [
181
181
  ] }, d)) })
182
182
  ] }),
183
183
  /* @__PURE__ */ I(We, { children: [
184
- /* @__PURE__ */ c(z, { label: "Cancel", onClick: i }),
184
+ /* @__PURE__ */ c(H, { label: "Cancel", onClick: i }),
185
185
  /* @__PURE__ */ c(
186
- z,
186
+ H,
187
187
  {
188
188
  "data-testid": "delete-confirm-submit",
189
189
  variant: "danger",
@@ -297,11 +297,11 @@ function vt({ children: e }) {
297
297
  }, [t, n]), m = M(
298
298
  async (u, p) => {
299
299
  if (!i) {
300
- r(J());
300
+ r(K());
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(K());
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(K());
314
314
  },
315
315
  [t, n]
316
316
  );
@@ -344,16 +344,16 @@ 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 ze() {
348
348
  const e = F(ae);
349
349
  if (e === void 0)
350
350
  throw new Error("usePiPWindow must be used within a PiPContext");
351
351
  return e;
352
352
  }
353
- function Ge({ pipWindow: e, children: s }) {
353
+ function Be({ pipWindow: e, children: s }) {
354
354
  return he(s, e.document.body);
355
355
  }
356
- const He = v(me)`
356
+ const Ge = 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
+ `, Ke = v(H)`
370
370
  width: 26px;
371
371
  height: 26px;
372
372
  margin-left: auto;
@@ -383,11 +383,11 @@ const He = v(me)`
383
383
  background-color: #3d3e40;
384
384
  }
385
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;
386
+ const { pipWindow: s, pipId: i, isSupported: t, closePipWindow: o } = ze(), n = i && X.isValidElement(e) ? X.cloneElement(e, { id: i }) : e;
387
387
  return !t && i ? /* @__PURE__ */ c(
388
- He,
388
+ Ge,
389
389
  {
390
- header: /* @__PURE__ */ c(Je, { icon: "close", className: "close", onClick: o }),
390
+ header: /* @__PURE__ */ c(Ke, { icon: "close", className: "close", onClick: o }),
391
391
  headerStyle: {
392
392
  padding: 4,
393
393
  backgroundColor: "#202124",
@@ -410,7 +410,7 @@ const He = v(me)`
410
410
  position: "right",
411
411
  children: n
412
412
  }
413
- ) : s && /* @__PURE__ */ c(Ge, { pipWindow: s, children: /* @__PURE__ */ c("div", { className: "pipRoot", children: n }) });
413
+ ) : s && /* @__PURE__ */ c(Be, { pipWindow: s, children: /* @__PURE__ */ c("div", { className: "pipRoot", children: n }) });
414
414
  }, ce = $(void 0), Pt = ({
415
415
  children: e,
416
416
  projectName: s,
@@ -447,21 +447,21 @@ const He = v(me)`
447
447
  return e;
448
448
  }, Qe = () => /* @__PURE__ */ I("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
449
449
  "Refresh to see latest changes.",
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 = ({
450
+ /* @__PURE__ */ c(H, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
451
+ ] }), ue = $(void 0), Ye = window.location.protocol.replace("http", "ws"), Je = `${Ye}//${window.location.host}/ws`, kt = ({
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
463
  }, { sendMessage: p, readyState: a, getWebSocket: g } = Se(
464
- Ke,
464
+ Je,
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) => {
@@ -495,7 +495,7 @@ const He = v(me)`
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 (B) {
510
+ console.error("Failed to parse websocket message:", B, E.data);
511
511
  return;
512
512
  }
513
513
  const { topic: w, sender: D, summary: R, status: L } = l || {};
@@ -520,8 +520,8 @@ const He = v(me)`
520
520
  if (D !== window.senderId) return;
521
521
  } else if (D === window.senderId)
522
522
  return;
523
- const B = Date.now();
524
- B - k.current.lastCall < 1e3 ? k.current.callCount += 1 : k.current.callCount = 0, console.log("Event RX", l), k.current.lastCall = B, w === "shout" && l?.summary?.text && O.info(R.text), _.publish(w, l);
523
+ const z = Date.now();
524
+ z - k.current.lastCall < 1e3 ? k.current.callCount += 1 : k.current.callCount = 0, console.log("Event RX", l), k.current.lastCall = z, w === "shout" && l?.summary?.text && O.info(R.text), _.publish(w, l);
525
525
  },
526
526
  [n]
527
527
  );
@@ -552,7 +552,7 @@ const He = v(me)`
552
552
  "version",
553
553
  "representation",
554
554
  "workfile"
555
- ]), Rt = (e) => !!e && Xe.has(e), K = $(null), se = [
555
+ ]), Rt = (e) => !!e && Xe.has(e), J = $(null), se = [
556
556
  "representation",
557
557
  "version",
558
558
  "workfile",
@@ -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 B = [...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: B },
596
596
  projectName: R
597
597
  }).unwrap();
598
598
  })
@@ -686,7 +686,7 @@ const He = v(me)`
686
686
  });
687
687
  }
688
688
  }, [t]), u = U(() => ({ deleteEntities: m }), [m]);
689
- return /* @__PURE__ */ I(K.Provider, { value: u, children: [
689
+ return /* @__PURE__ */ I(J.Provider, { value: u, children: [
690
690
  e,
691
691
  t && /* @__PURE__ */ c(
692
692
  ne,
@@ -710,11 +710,11 @@ const He = v(me)`
710
710
  )
711
711
  ] });
712
712
  }, Lt = () => {
713
- const e = F(K);
713
+ const e = F(J);
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
+ }, Ot = () => F(J);
718
718
  export {
719
719
  Pt as A,
720
720
  $t as D,
@@ -732,7 +732,7 @@ export {
732
732
  Lt as g,
733
733
  Ot as h,
734
734
  Rt as i,
735
- Be as j,
735
+ ze as j,
736
736
  xt as k,
737
737
  Dt as l,
738
738
  yt as m,
@@ -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 { bA 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 x = ({
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
+ x as D
38
38
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as R, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
- import { useRef as Z, 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 he, Fragment as ke } from "react";
3
3
  import "./searchTerms.es.js";
4
- import { dm as Me, bT as Ue, c5 as Fe, d9 as Te, a_ as Le, aN as We, aI as Ve, dd as Ne } from "./getUris.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";
5
5
  import "primereact/confirmdialog";
6
- import { useSensors as $e, useSensor as me, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as _e, DragOverlay as Ke } from "@dnd-kit/core";
7
- import { useSortable as Ze, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as He } from "@dnd-kit/sortable";
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";
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";
@@ -23,7 +23,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
23
23
  /* @__PURE__ */ t(Ce, { icon: i }),
24
24
  /* @__PURE__ */ t("span", { children: r })
25
25
  ] }), Ct = ({ ...r }) => {
26
- const { attributes: i, listeners: a, setNodeRef: d, transform: g, transition: y, isDragging: u } = Ze({
26
+ const { attributes: i, listeners: a, setNodeRef: d, transform: g, transition: y, isDragging: u } = _e({
27
27
  id: r.fileId,
28
28
  animateLayoutChanges: () => !1
29
29
  }), s = {
@@ -71,7 +71,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
71
71
  activityId: g,
72
72
  ...y
73
73
  }) => {
74
- const u = Z(null), [s, f] = x("");
74
+ const u = _(null), [s, f] = x("");
75
75
  le(() => {
76
76
  if (u.current)
77
77
  return f(i), u.current?.select(), () => {
@@ -149,7 +149,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
149
149
  me(Oe, {
150
150
  coordinateGetter: Be
151
151
  })
152
- ), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, _ = m && i !== $ || d, N = (e) => {
152
+ ), b = E?.reviewables || [], C = b.find((e) => e.fileId === M), $ = v?.id, K = m && i !== $ || d, N = (e) => {
153
153
  if (M) return console.log("Dragging, cannot open review");
154
154
  const o = e.currentTarget.id;
155
155
  if (!o || !a) return console.error("No reviewable id or product id");
@@ -160,7 +160,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
160
160
  versionIds: [i],
161
161
  reviewableIds: [o]
162
162
  });
163
- }, { playable: w, incompatible: K, processing: Y, queued: j } = St(
163
+ }, { playable: w, incompatible: Z, processing: Y, queued: j } = St(
164
164
  b,
165
165
  P
166
166
  );
@@ -243,12 +243,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
243
243
  folderId: s?.folderId,
244
244
  dispatch: f,
245
245
  readOnly: !I,
246
- children: _ ? Array.from({ length: 3 }).map((e, o) => /* @__PURE__ */ t(Ye, { className: "loading" }, o)) : /* @__PURE__ */ R(Q, { children: [
246
+ children: K ? Array.from({ length: 3 }).map((e, o) => /* @__PURE__ */ t(Ye, { className: "loading" }, o)) : /* @__PURE__ */ R(Q, { children: [
247
247
  /* @__PURE__ */ R(
248
248
  qe,
249
249
  {
250
250
  sensors: c,
251
- collisionDetection: _e,
251
+ collisionDetection: Ke,
252
252
  onDragStart: ee,
253
253
  onDragEnd: z,
254
254
  onDragCancel: () => p(null),
@@ -275,7 +275,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
275
275
  ))
276
276
  }
277
277
  ),
278
- /* @__PURE__ */ t(Ke, { modifiers: B, children: C ? /* @__PURE__ */ t(
278
+ /* @__PURE__ */ t(Ze, { modifiers: B, children: C ? /* @__PURE__ */ t(
279
279
  Re,
280
280
  {
281
281
  ...C,
@@ -307,7 +307,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
307
307
  },
308
308
  e.fileId
309
309
  )),
310
- K.map((e) => /* @__PURE__ */ t(
310
+ Z.map((e) => /* @__PURE__ */ t(
311
311
  oe,
312
312
  {
313
313
  name: e.filename,
@@ -344,7 +344,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
344
344
  onCancel: a,
345
345
  onSubmit: d
346
346
  }) => {
347
- const g = Et(r?.[0]), y = Z(null), u = Z(!1), [s, f] = x(g);
347
+ const g = Et(r?.[0]), y = _(null), u = _(!1), [s, f] = x(g);
348
348
  le(() => {
349
349
  f(g), u.current = !1;
350
350
  }, [g]), le(() => {
@@ -387,7 +387,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
387
387
  versionsInputRef: y,
388
388
  onVersionCreated: u
389
389
  }) => {
390
- const { dispatch: s } = Ee(), f = Dt(), [h, n] = x(!1), [I, E] = x(null), m = Z(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: _ } = je({
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({
391
391
  projectName: d,
392
392
  versionId: $,
393
393
  taskId: c,
@@ -402,7 +402,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
402
402
  }
403
403
  }), N = kt.filter((e) => e.id === "version" ? q : !0), w = () => {
404
404
  P(null), n(!1), E(null), m.current = 0, F(0), k(!1), M(null);
405
- }, K = async (e) => {
405
+ }, Z = async (e) => {
406
406
  if (!W || !p) {
407
407
  k(!1), M(null);
408
408
  return;
@@ -470,7 +470,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
470
470
  // previous version could have a taskId or we are uploading on a task
471
471
  version: l
472
472
  });
473
- await _(e, D.id), w(), u?.(D.id);
473
+ await K(e, D.id), w(), u?.(D.id);
474
474
  } catch (l) {
475
475
  we(l, "uploading version"), w();
476
476
  }
@@ -589,7 +589,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
589
589
  {
590
590
  isOpen: O,
591
591
  files: W,
592
- onSubmit: K,
592
+ onSubmit: Z,
593
593
  onCancel: Y
594
594
  }
595
595
  )
@@ -606,7 +606,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
606
606
  entityType: y,
607
607
  scope: u
608
608
  }) => {
609
- const s = Z(null), [f, h] = x(null), [n, I] = x(null), [E, m] = x(!1), v = Z(null);
609
+ const s = _(null), [f, h] = x(null), [n, I] = x(null), [E, m] = x(!1), v = _(null);
610
610
  ae(() => {
611
611
  I(null), m(!0);
612
612
  }, [a]), ae(() => {
@@ -618,12 +618,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
618
618
  if (!C) return;
619
619
  const $ = c.children;
620
620
  let q = b;
621
- const _ = c.childElementCount;
622
- let N = _;
621
+ const K = c.childElementCount;
622
+ let N = K;
623
623
  for (; q > C && N > 0; )
624
- N -= 2, q = Ut($, N, _);
624
+ N -= 2, q = Ut($, N, K);
625
625
  let w = Array.from($).slice(0, N).filter(
626
- (K) => K.nodeType === Node.ELEMENT_NODE && K.className.includes("full")
626
+ (Z) => Z.nodeType === Node.ELEMENT_NODE && Z.className.includes("full")
627
627
  )?.length || 2;
628
628
  w = Math.max(w, 1), I(w), m(!1);
629
629
  }, [s.current, E]), ae(() => {
@@ -11,7 +11,7 @@ import { InputText as fe, theme as he, Dialog as me, SwitchButton as ge, Button
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 { c8 as we } from "./getUris.es.js";
14
+ import { c9 as we } from "./getUris.es.js";
15
15
  import { a as ke } from "./ProjectContext.es.js";
16
16
  import { u as xe } from "./ProjectFoldersContext.es.js";
17
17
  import { g as W } from "./getThumbnailUrl.es.js";
@@ -2,7 +2,7 @@ import { jsx as I } from "react/jsx-runtime";
2
2
  import { EntityCard as S } from "@ynput/ayon-react-components";
3
3
  import U, { keyframes as W } from "styled-components";
4
4
  import "./searchTerms.es.js";
5
- import { bB as L } from "./getUris.es.js";
5
+ import { bC as L } from "./getUris.es.js";
6
6
  import "primereact/confirmdialog";
7
7
  import { u as Y } from "./ProjectContext.es.js";
8
8
  import "lodash";
@@ -10,7 +10,7 @@ import "react-toastify";
10
10
  import { g as _ } from "./getEntityTypeIcon.es.js";
11
11
  import "uuid";
12
12
  import { g as z } from "./getThumbnailUrl.es.js";
13
- const B = W`
13
+ const F = W`
14
14
  from {
15
15
  opacity: 0.4;
16
16
  scale: 0.9;
@@ -18,7 +18,7 @@ from {
18
18
  opacity: 1;
19
19
  scale: 1;
20
20
  }
21
- `, F = U(S)`
21
+ `, G = U(S)`
22
22
  position: fixed;
23
23
  max-width: 220px;
24
24
  z-index: 9999;
@@ -26,7 +26,7 @@ from {
26
26
  translate: -50% calc(-100% - 4px);
27
27
  transform-origin: bottom center;
28
28
 
29
- animation: ${B} 100ms ease-out;
29
+ animation: ${F} 100ms ease-out;
30
30
 
31
31
  /* path always open */
32
32
  .description {
@@ -35,7 +35,7 @@ from {
35
35
 
36
36
  /* shadow */
37
37
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
38
- `, G = ["folder", "task", "version", "workfile"], tt = ({
38
+ `, H = ["folder", "task", "version", "workfile"], tt = ({
39
39
  entityType: t,
40
40
  entityId: e,
41
41
  projectName: m,
@@ -44,7 +44,7 @@ from {
44
44
  onMouseEnter: d,
45
45
  onMouseLeave: u
46
46
  }) => {
47
- const o = Y(), a = m || o?.projectName, p = !!t && G.includes(t), { data: c, isFetching: f } = L(
47
+ const o = Y(), a = m || o?.projectName, p = !!t && H.includes(t), { data: c, isFetching: f } = L(
48
48
  { entityType: t, entityId: e, projectName: a },
49
49
  { skip: !p || !e || !a }
50
50
  ), n = 220;
@@ -60,21 +60,21 @@ from {
60
60
  thumbnailId: b,
61
61
  status: E,
62
62
  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({
63
+ } = c || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), C = c ? z({
64
64
  entityId: e || "",
65
65
  entityType: t,
66
66
  thumbnailHash: P,
67
67
  thumbnailId: b,
68
68
  projectName: a || "",
69
69
  placeholder: "none"
70
- }) : null, C = {
70
+ }) : null, O = {
71
71
  task: j.find((s) => s.name === w)?.icon,
72
72
  folder: N.find((s) => s.name === g)?.icon,
73
73
  version: o?.getProductType(k).icon,
74
74
  workfile: _("workfile")
75
75
  };
76
76
  return p ? /* @__PURE__ */ I(
77
- F,
77
+ G,
78
78
  {
79
79
  style: { left: i, top: l, maxWidth: n },
80
80
  onMouseEnter: d,
@@ -88,12 +88,12 @@ from {
88
88
  hidePriority: !0,
89
89
  isLoading: f,
90
90
  loadingSections: ["header", "title", "users", "status"],
91
- titleIcon: C[t || ""],
92
- imageUrl: O || void 0
91
+ titleIcon: O[t || ""],
92
+ imageUrl: C || void 0
93
93
  }
94
94
  ) : null;
95
95
  };
96
96
  export {
97
- G as E,
97
+ H as E,
98
98
  tt as a
99
99
  };
@@ -4,7 +4,7 @@ import $t, { useState as H, useEffect as K, lazy as Vn, Suspense as jn, useRef a
4
4
  import { p as en, U as tn, P as qn, u as we, F as st, s as nn, A as et, R as Hn, L as Gn, t as Wn, V as Qn, v as Lt, w as Yn, x as Kn, M as Xn, I as Jn, Q as Zn, q as eo, y as to, z as no, B as oo, S as ro, E as io, G as ao, n as so, H as co, J as lo, K as po, T as uo, O as Ot, W as mo, X as ho, Y as go, Z as fo, _ as yo, $ as vo, a0 as bo, f as wo, l as xo } from "./PlayableIcon.es.js";
5
5
  import { Icon as Q, Button as Be, Dialog as Ao, getFileSizeString as Co, theme as ko, getTextColor as Et, Dropdown as To, UserImage as on, SaveButton as So, SEARCH_FILTER_ID as rn, buildFilterId as Ut, getFilterFromId as Eo, SearchFilter as Do } from "@ynput/ayon-react-components";
6
6
  import { aP as No, be as zt } from "./searchTerms.es.js";
7
- import { bk as Io, be as Fo, bT as Mo } from "./getUris.es.js";
7
+ import { bl as Io, bf as Fo, bU as Mo } from "./getUris.es.js";
8
8
  import "primereact/confirmdialog";
9
9
  import { a as Po } from "./EntityTooltip.es.js";
10
10
  import G, { clsx as an } from "clsx";
@@ -18,7 +18,7 @@ import $o, { Quill as Ge } from "react-quill-ayon";
18
18
  import y, { keyframes as Lo, css as Dt } from "styled-components";
19
19
  import Oo from "@uiw/react-textarea-code-editor";
20
20
  import { E as Ct } from "./EmptyPlaceholder.es.js";
21
- import { c as Uo, d as zo } from "./Menu.es.js";
21
+ import { a as Uo, M as zo } from "./Menu.es.js";
22
22
  import { c as We, u as Vo } from "./MenuContext.es.js";
23
23
  import { matchSorter as jo } from "match-sorter";
24
24
  import { isValid as He, isSameMinute as Bo, isBefore as qo, formatISO as Ho, differenceInMinutes as Go, differenceInSeconds as Wo, compareAsc as Qo } from "date-fns";
@@ -7,7 +7,7 @@ import { c as B } from "./copyToClipboard.es.js";
7
7
  import "uuid";
8
8
  import "./searchTerms.es.js";
9
9
  import { useState as l, useEffect as u, useContext as k } from "react";
10
- import { bD as G } from "./getUris.es.js";
10
+ import { bE as G } from "./getUris.es.js";
11
11
  import { u as J } from "./GlobalContext.es.js";
12
12
  import { F as w } from "./ColumnDropIndicator.es.js";
13
13
  const ie = ({ children: i }) => {
@@ -152,9 +152,9 @@ const ie = ({ children: i }) => {
152
152
  ...t && { articleId: t }
153
153
  }
154
154
  });
155
- }, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"), D = (e) => h instanceof HTMLElement && (h.style.display = e ? "block" : "none");
155
+ }, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"), j = (e) => h instanceof HTMLElement && (h.style.display = e ? "block" : "none");
156
156
  u(() => {
157
- !n || !c || D(f);
157
+ !n || !c || j(f);
158
158
  }, [n, c, f]), u(() => {
159
159
  if (!n || !c) return;
160
160
  const e = window;
@@ -162,7 +162,7 @@ const ie = ({ children: i }) => {
162
162
  b(!1);
163
163
  });
164
164
  }, [n, c]);
165
- const j = (e = "Home", t) => {
165
+ const D = (e = "Home", t) => {
166
166
  const a = window;
167
167
  if (typeof a.Featurebase != "function") {
168
168
  window.alert("Featurebase SDK is not loaded yet. Please try again later."), console.warn("Featurebase SDK is not loaded yet.");
@@ -200,7 +200,7 @@ const ie = ({ children: i }) => {
200
200
  w.Provider,
201
201
  {
202
202
  value: {
203
- openSupport: j,
203
+ openSupport: D,
204
204
  openFeedback: N,
205
205
  openPortal: A,
206
206
  messengerLoaded: c,
@@ -1,18 +1,18 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { createContext as v, useContext as x, useMemo as I } from "react";
3
3
  import "./searchTerms.es.js";
4
- import { ce as C, bn as G, cQ as P, cz as b } from "./getUris.es.js";
4
+ import { cf as C, bo as G, cR as P, cA as b } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
- const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
6
+ const a = v(void 0), M = ({ children: r, skip: t = !1 }) => {
7
7
  const {
8
- data: t = {},
9
- isLoading: n,
10
- error: i
11
- } = C({ full: !0 }, { skip: e }), { data: s, isLoading: u, error: c } = G(), {
8
+ data: e = {},
9
+ isLoading: i,
10
+ error: n
11
+ } = C({ full: !0 }, { skip: t }), { data: s, isLoading: u, error: c } = G(), {
12
12
  data: o = [],
13
13
  isLoading: l,
14
14
  error: d
15
- } = P({}, { skip: e }), f = I(() => o.filter((L) => L.active), [o]), {
15
+ } = P({}, { skip: t }), f = I(() => o.filter((L) => L.active), [o]), {
16
16
  data: m,
17
17
  isLoading: p,
18
18
  error: j
@@ -21,8 +21,8 @@ const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
21
21
  a.Provider,
22
22
  {
23
23
  value: {
24
- siteInfo: t,
25
- attributes: t?.attributes || [],
24
+ siteInfo: e,
25
+ attributes: e?.attributes || [],
26
26
  user: s,
27
27
  cloudInfo: m,
28
28
  projects: {
@@ -30,13 +30,13 @@ const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
30
30
  active: f
31
31
  },
32
32
  isLoading: {
33
- siteInfo: n,
33
+ siteInfo: i,
34
34
  user: u,
35
35
  cloudInfo: p,
36
36
  projects: l
37
37
  },
38
38
  error: {
39
- siteInfo: i,
39
+ siteInfo: n,
40
40
  user: c,
41
41
  cloudInfo: j,
42
42
  projects: d
@@ -45,8 +45,8 @@ const a = v(void 0), A = ({ children: r, skip: e = !1 }) => {
45
45
  children: r
46
46
  }
47
47
  );
48
- }, M = () => x(a) || {};
48
+ }, R = () => x(a) || {};
49
49
  export {
50
- A as G,
51
- M as u
50
+ M as G,
51
+ R as u
52
52
  };