@ynput/ayon-frontend-shared 0.6.6 → 0.6.7

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 (42) hide show
  1. package/dist/DetailsPanel.es.js +3 -3
  2. package/dist/NewEntity.es.js +15 -15
  3. package/dist/ProjectTreeTable.es.js +500 -495
  4. package/dist/Slicer.es.js +11 -11
  5. package/dist/Views.es.js +213 -206
  6. package/dist/chunks/CodeEditor.es.js +30 -0
  7. package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
  8. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  9. package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
  10. package/dist/chunks/EntityPath.es.js +2 -2
  11. package/dist/chunks/EntityTooltip.es.js +1 -1
  12. package/dist/chunks/Feed.es.js +1875 -1857
  13. package/dist/chunks/JsonViewer.es.js +1 -1
  14. package/dist/chunks/Menu.es.js +1 -1
  15. package/dist/chunks/MenuItem.es.js +25 -25
  16. package/dist/chunks/MetaWidget.es.js +1537 -1516
  17. package/dist/chunks/PlayableIcon.es.js +127 -127
  18. package/dist/chunks/ReviewablesSelector.es.js +199 -196
  19. package/dist/chunks/SimpleTable.es.js +110 -110
  20. package/dist/chunks/Slicer.es.js +22 -22
  21. package/dist/chunks/TableSettingsFallback.es.js +1 -1
  22. package/dist/chunks/ThumbnailSimple.es.js +2 -2
  23. package/dist/chunks/VideoPlayer.es.js +1 -1
  24. package/dist/chunks/Watchers.es.js +19 -19
  25. package/dist/chunks/afterStartup.es.js +13 -0
  26. package/dist/chunks/getUris.es.js +790 -827
  27. package/dist/chunks/searchTerms.es.js +1 -3
  28. package/dist/chunks/useHierarchySelection.es.js +2 -2
  29. package/dist/chunks/useLoadModule.es.js +24 -23
  30. package/dist/components.es.js +202 -200
  31. package/dist/context.es.js +521 -492
  32. package/dist/hooks.es.js +190 -166
  33. package/dist/types/ContextMenu.d.ts +1 -0
  34. package/dist/types/ProjectTreeTable.d.ts +1 -0
  35. package/dist/types/Views.d.ts +11 -0
  36. package/dist/types/api.d.ts +198 -1174
  37. package/dist/types/components.d.ts +5 -1
  38. package/dist/types/context.d.ts +1 -0
  39. package/dist/types/hooks.d.ts +25 -1
  40. package/dist/types/util.d.ts +10 -0
  41. package/dist/util.es.js +44 -41
  42. package/package.json +2 -2
@@ -4,15 +4,15 @@ import { Splitter as et, SplitterPanel as tt } from "primereact/splitter";
4
4
  import H from "styled-components";
5
5
  import { h as nt, P as st, d as Ie, U as ze } from "./MetaWidget.es.js";
6
6
  import "@module-federation/enhanced/runtime";
7
- import { bi as Re, br as ot, bj as Ue, bp as at, bu as it } from "./searchTerms.es.js";
8
- import { dn as He, cH as rt, bU as lt, bz as ct } from "./getUris.es.js";
7
+ import { toast as Re } from "react-toastify";
8
+ import { InputText as ot, Button as at, Icon as it } from "@ynput/ayon-react-components";
9
+ import { bi as ke, br as rt, bj as Ue, bp as lt, bu as ct } from "./searchTerms.es.js";
10
+ import { dn as He, cH as dt, bU as ut, bz as pt } from "./getUris.es.js";
9
11
  import "primereact/confirmdialog";
10
- import { q as Ve, y as Ce, x as ue, d as dt, a as we, v as ut, a5 as pt, a4 as ft, u as mt, ac as ht } from "./DeleteEntitiesContextInstance.es.js";
12
+ import { p as Ve, y as Ce, x as ue, d as ft, a as we, o as mt, a5 as ht, a4 as gt, u as yt, ac as bt } from "./DeleteEntitiesContextInstance.es.js";
11
13
  import "lodash";
12
- import { toast as ke } from "react-toastify";
13
14
  import "uuid";
14
15
  import "semver";
15
- import { InputText as gt, Button as yt, Icon as bt } from "@ynput/ayon-react-components";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import W from "clsx";
18
18
  import "react-dom";
@@ -155,7 +155,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
155
155
  }
156
156
  r?.(i);
157
157
  } catch (c) {
158
- let s = Re(c) || "Failed to move entities";
158
+ let s = ke(c) || "Failed to move entities";
159
159
  if (s.includes("already exists"))
160
160
  if (t.entities.length > 1)
161
161
  s = "Cannot move some entities - one or more entities with the same name already exist in the target location";
@@ -166,7 +166,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
166
166
  const y = s.match(/name '.*?, (.+?)' already exists/);
167
167
  s = `Cannot move "${y ? y[1] : "this folder"}" - a folder with this name already exists in the target location`;
168
168
  }
169
- ke.error(s);
169
+ Re.error(s);
170
170
  } finally {
171
171
  a();
172
172
  }
@@ -194,8 +194,8 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
194
194
  throw new Error(s || "Some move operations failed");
195
195
  }
196
196
  } catch (g) {
197
- let i = Re(g) || "Failed to move entities to root";
198
- ke.error(i);
197
+ let i = ke(g) || "Failed to move entities to root";
198
+ Re.error(i);
199
199
  } finally {
200
200
  a();
201
201
  }
@@ -275,7 +275,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
275
275
  }
276
276
  ) : null;
277
277
  }, Vt = ({ projectName: e, useExtraSlices: t }) => {
278
- const [a, { isLoading: r, isFetching: u }] = rt(), { formatAssignees: l } = t();
278
+ const [a, { isLoading: r, isFetching: u }] = dt(), { formatAssignees: l } = t();
279
279
  return {
280
280
  getData: async () => {
281
281
  const b = await a({ projectName: e || "" }, !0).unwrap();
@@ -286,15 +286,15 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
286
286
  }, Bt = ({ scopes: e, useExtraSlices: t }) => {
287
287
  const { isLoading: a, productTypes: r, ...u } = ue(), { formatStatuses: l, formatTaskTypes: m, formatProductTypes: b, formatTypes: f, formatAttribute: p } = t();
288
288
  return { project: u, getStatuses: async () => l(u, e), getTypes: async () => f(u), getTaskTypes: async () => m(u), getProductTypes: async () => b(r), getAttribute: async (i) => p ? p(i).map(
289
- (c) => ot(c.icon ?? void 0) ? { ...c, icon: void 0, img: c.icon, imgShape: "circle" } : c
289
+ (c) => rt(c.icon ?? void 0) ? { ...c, icon: void 0, img: c.icon, imgShape: "circle" } : c
290
290
  ) : void 0, isLoading: a };
291
291
  }, Gt = ({ entityTypes: e, request: t }) => {
292
292
  const {
293
293
  attributes: a,
294
294
  isLoading: { siteInfo: r }
295
- } = dt(), u = Ye(st), l = u?.attribFields?.length ? u.attribFields : a, { projectName: m } = ue();
295
+ } = ft(), u = Ye(st), l = u?.attribFields?.length ? u.attribFields : a, { projectName: m } = ue();
296
296
  return { attributes: Lt(l, { projectName: m, request: t ?? [] }).filter((p) => Ue(p.data)).filter((p) => e.some((h) => p.scope?.includes(h))).map(
297
- (p) => p.data.enum?.some((h) => h.hidden) ? { ...p, data: { ...p.data, enum: at(p.data.enum) } } : p
297
+ (p) => p.data.enum?.some((h) => h.hidden) ? { ...p, data: { ...p.data, enum: lt(p.data.enum) } } : p
298
298
  ), isLoading: r };
299
299
  }, Kt = "snippet_folder", de = "folder", Wt = (e) => `${de}-${e}`, _e = (e) => e.entityListType === "review-session" ? "subscriptions" : ge(e.entityType), ve = (e) => [...e].sort((t, a) => {
300
300
  if (t.active && !a.active) return -1;
@@ -306,13 +306,13 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
306
306
  data: r,
307
307
  isLoading: u,
308
308
  isFetching: l
309
- } = lt(
309
+ } = ut(
310
310
  { projectName: t || "" },
311
311
  {
312
312
  initialPageParam: { cursor: "" },
313
313
  skip: !t || !e
314
314
  }
315
- ), { data: m = [], isLoading: b } = ct(
315
+ ), { data: m = [], isLoading: b } = pt(
316
316
  { projectName: t || "" },
317
317
  { skip: !t || !a || !e }
318
318
  ), f = O(() => {
@@ -680,7 +680,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
680
680
  flex: 1;
681
681
  min-width: 0;
682
682
  }
683
- `, nn = H(gt)`
683
+ `, nn = H(ot)`
684
684
  flex: 1;
685
685
  min-width: 0;
686
686
  height: 28px;
@@ -689,7 +689,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
689
689
  const u = () => r(e ? void 0 : ""), l = (b) => {
690
690
  b.key === "Escape" && r(void 0);
691
691
  }, m = (b) => {
692
- const f = it(b.clipboardData.getData("text"));
692
+ const f = ct(b.clipboardData.getData("text"));
693
693
  if (f === null) return;
694
694
  b.preventDefault();
695
695
  const p = b.currentTarget, h = p.selectionStart ?? t.length, w = p.selectionEnd ?? t.length, d = h + f.length;
@@ -720,7 +720,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
720
720
  }, xe = (e, t) => {
721
721
  e.toggleExpanded(t), e.subRows?.forEach((a) => xe(a, t));
722
722
  }, Oe = (e) => e.map((t) => t.id).filter(Boolean), on = (e, t, a, r) => {
723
- const { onOpenNew: u } = Mt(), { projectName: l } = ue(), { setEntities: m } = ut(), b = _t(), [f] = He(), { deleteEntities: p } = pt(), [h, w] = U(null), d = A(
723
+ const { onOpenNew: u } = Mt(), { projectName: l } = ue(), { setEntities: m } = mt(), b = _t(), [f] = He(), { deleteEntities: p } = ht(), [h, w] = U(null), d = A(
724
724
  (c, s) => s.map((o) => t?.get(o) || (o === c.id ? c : void 0)).filter((o) => !!o),
725
725
  [t]
726
726
  ), S = O(
@@ -879,7 +879,7 @@ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.in
879
879
  onSubmitRename: g,
880
880
  onCancelRename: () => w(null)
881
881
  };
882
- }, an = H(yt)`
882
+ }, an = H(at)`
883
883
  /* put above the menu so it's still clickable */
884
884
  /* NOTE: this will need fixing as this also puts it above dialogs */
885
885
  /* z-index: 1001; */
@@ -951,7 +951,7 @@ const rn = (e, t, a) => {
951
951
  ).join(", ")} since last sync`;
952
952
  }, cn = Je(
953
953
  ({ projectNames: e, topics: t, onSync: a, shouldSyncOnUpdate: r, hideWhenNoUpdates: u = !1, ...l }, m) => {
954
- const [b, f] = U(!1), [p, h] = ft(), { setMenuOpen: w } = mt(), d = ye(null), S = ye(), g = Xe();
954
+ const [b, f] = U(!1), [p, h] = gt(), { setMenuOpen: w } = yt(), d = ye(null), S = ye(), g = Xe();
955
955
  se(() => () => {
956
956
  const v = S.current;
957
957
  S.current = void 0, v !== void 0 && clearTimeout(v);
@@ -963,7 +963,7 @@ const rn = (e, t, a) => {
963
963
  } finally {
964
964
  f(!1);
965
965
  }
966
- }, { updates: c, hasUpdates: s } = ht({
966
+ }, { updates: c, hasUpdates: s } = bt({
967
967
  projectNames: e,
968
968
  topics: t,
969
969
  isSyncing: b,
@@ -1061,7 +1061,7 @@ const rn = (e, t, a) => {
1061
1061
  title: i.label || i.name,
1062
1062
  "aria-label": i.label || i.name,
1063
1063
  children: [
1064
- i.startContent ?? (i.img ? /* @__PURE__ */ E("img", { src: i.img, alt: "" }) : i.icon && /* @__PURE__ */ E(bt, { icon: i.icon, style: { color: i.iconColor } })),
1064
+ i.startContent ?? (i.img ? /* @__PURE__ */ E("img", { src: i.img, alt: "" }) : i.icon && /* @__PURE__ */ E(it, { icon: i.icon, style: { color: i.iconColor } })),
1065
1065
  !(p && m(i)) && /* @__PURE__ */ E("span", { children: i.label || i.name })
1066
1066
  ]
1067
1067
  },
@@ -3,12 +3,12 @@ import { R as e, P as n } from "./ReviewablesSelector.es.js";
3
3
  import "react";
4
4
  import "@ynput/ayon-react-components";
5
5
  import "@module-federation/enhanced/runtime";
6
+ import "react-toastify";
6
7
  import "./searchTerms.es.js";
7
8
  import "./getUris.es.js";
8
9
  import "primereact/confirmdialog";
9
10
  import { a as c } from "./DeleteEntitiesContextInstance.es.js";
10
11
  import "lodash";
11
- import "react-toastify";
12
12
  import "uuid";
13
13
  import "semver";
14
14
  import "./ContextMenuContextInstance.es.js";
@@ -7,11 +7,11 @@ import "primereact/confirmdialog";
7
7
  import "lodash";
8
8
  import { e as F } from "./expandRelativeDates.es.js";
9
9
  import "@module-federation/enhanced/runtime";
10
- import "./DeleteEntitiesContextInstance.es.js";
11
10
  import "react-toastify";
11
+ import { Icon as w, Dialog as N, FormRow as v, InputDate as x, SaveButton as B } from "@ynput/ayon-react-components";
12
+ import "./DeleteEntitiesContextInstance.es.js";
12
13
  import "uuid";
13
14
  import "semver";
14
- import { Icon as w, Dialog as N, FormRow as v, InputDate as x, SaveButton as B } from "@ynput/ayon-react-components";
15
15
  import "./ContextMenuContextInstance.es.js";
16
16
  import "clsx";
17
17
  import "react-redux";
@@ -5,6 +5,7 @@ import { toast as A } from "react-toastify";
5
5
  import { clearMemoizedPlayables as c, Player as h, compactPlayerControls as E } from "@ynput/ayon-player";
6
6
  import { ClipType as F } from "@ynput/ayon-player/model";
7
7
  import "@module-federation/enhanced/runtime";
8
+ import "@ynput/ayon-react-components";
8
9
  import "./searchTerms.es.js";
9
10
  import "./getUris.es.js";
10
11
  import "primereact/confirmdialog";
@@ -12,7 +13,6 @@ import { d as D } from "./DeleteEntitiesContextInstance.es.js";
12
13
  import "lodash";
13
14
  import "uuid";
14
15
  import "semver";
15
- import "@ynput/ayon-react-components";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import "clsx";
18
18
  import "react-dom";
@@ -13,7 +13,7 @@ import { o as Be, M as He, T as _e, n as Qe, B as qe, D as Ge } from "./MetaWidg
13
13
  import "./PlayableIcon.es.js";
14
14
  import { dh as Ke, bW as Ye, c8 as me, bg as Ze, ao as Je, bv as Xe, d5 as et } from "./getUris.es.js";
15
15
  import "@module-federation/enhanced/runtime";
16
- import { v as Y, d as tt, x as ot, T as rt } from "./DeleteEntitiesContextInstance.es.js";
16
+ import { o as Y, d as tt, x as ot, T as rt } from "./DeleteEntitiesContextInstance.es.js";
17
17
  import "semver";
18
18
  import "./ContextMenuContextInstance.es.js";
19
19
  import "react-dom";
@@ -1543,7 +1543,7 @@ const ee = [], pt = (e) => {
1543
1543
  /* remove animation */
1544
1544
  animation: none;
1545
1545
  /* full */
1546
- font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 20;
1546
+ font-variation-settings: 'FILL' 1;
1547
1547
  }
1548
1548
  }
1549
1549
 
@@ -2411,27 +2411,27 @@ export {
2411
2411
  nr as V,
2412
2412
  Sr as W,
2413
2413
  Xo as X,
2414
- yt as a,
2415
- Vo as b,
2416
- xt as c,
2417
- wt as d,
2418
- gr as e,
2419
- Bo as f,
2420
- hr as g,
2421
- ne as h,
2422
- Yt as i,
2423
- ir as j,
2424
- sr as k,
2425
- fr as l,
2426
- wr as m,
2427
- Er as n,
2428
- kr as o,
2429
- vr as p,
2414
+ gr as a,
2415
+ hr as b,
2416
+ ne as c,
2417
+ ir as d,
2418
+ sr as e,
2419
+ fr as f,
2420
+ wr as g,
2421
+ Er as h,
2422
+ kr as i,
2423
+ vr as j,
2424
+ Bo as k,
2425
+ mt as l,
2426
+ yt as m,
2427
+ Vo as n,
2428
+ xt as o,
2429
+ wt as p,
2430
2430
  Ft as q,
2431
2431
  At as r,
2432
2432
  Ho as s,
2433
2433
  he as t,
2434
- mt as u,
2434
+ Yt as u,
2435
2435
  Ut as v,
2436
2436
  Tr as w,
2437
2437
  eo as x,
@@ -0,0 +1,13 @@
1
+ const o = 3e3, a = (t, i = 3e3) => {
2
+ let e;
3
+ const l = setTimeout(() => {
4
+ "requestIdleCallback" in window ? e = window.requestIdleCallback(t, { timeout: 2e3 }) : t();
5
+ }, i);
6
+ return () => {
7
+ clearTimeout(l), e !== void 0 && window.cancelIdleCallback(e);
8
+ };
9
+ };
10
+ export {
11
+ o as S,
12
+ a
13
+ };