@ynput/ayon-frontend-shared 0.8.1 → 0.10.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 (50) hide show
  1. package/dist/DetailsPanel.es.js +39 -39
  2. package/dist/ListTable.es.js +738 -651
  3. package/dist/NewEntity.es.js +4 -2
  4. package/dist/ProjectTreeTable.es.js +4208 -4185
  5. package/dist/ProjectsTable.es.js +5 -4
  6. package/dist/Slicer.es.js +327 -294
  7. package/dist/Views.es.js +725 -713
  8. package/dist/chunks/ColumnDropIndicator.es.js +33 -27
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
  10. package/dist/chunks/EntityPickerDialog.es.js +19 -19
  11. package/dist/chunks/Feed.es.js +112 -110
  12. package/dist/chunks/FilmstripEntityCard.es.js +2 -2
  13. package/dist/chunks/GroupSettingsFallback.es.js +3 -2
  14. package/dist/chunks/MetaWidget.es.js +828 -809
  15. package/dist/chunks/NewEntityContextInstance.es.js +6 -5
  16. package/dist/chunks/ReviewablesSelector.es.js +76 -76
  17. package/dist/chunks/SimpleTable.es.js +151 -149
  18. package/dist/chunks/Slicer.es.js +637 -617
  19. package/dist/chunks/TableExportContextInstance.es.js +415 -471
  20. package/dist/chunks/ThumbnailSimple.es.js +11 -11
  21. package/dist/chunks/Watchers.es.js +46 -46
  22. package/dist/chunks/getUris.es.js +1069 -1057
  23. package/dist/chunks/searchTerms.es.js +617 -581
  24. package/dist/chunks/useCreateContextMenu.es.js +15 -13
  25. package/dist/chunks/useLocalStorage.es.js +78 -0
  26. package/dist/components.es.js +916 -884
  27. package/dist/context.es.js +348 -337
  28. package/dist/hooks.es.js +218 -187
  29. package/dist/index.es.js +11 -10
  30. package/dist/types/Actions.d.ts +17 -16
  31. package/dist/types/ContextMenu.d.ts +18 -17
  32. package/dist/types/DetailsPanel.d.ts +17 -16
  33. package/dist/types/EntityPickerDialog.d.ts +17 -16
  34. package/dist/types/Feed.d.ts +18 -17
  35. package/dist/types/ListTable.d.ts +28 -18
  36. package/dist/types/NewEntity.d.ts +19 -16
  37. package/dist/types/ProjectTreeTable.d.ts +62 -19
  38. package/dist/types/ProjectsTable.d.ts +18 -17
  39. package/dist/types/RepresentationsList.d.ts +17 -16
  40. package/dist/types/SimpleTable.d.ts +18 -17
  41. package/dist/types/Slicer.d.ts +24 -17
  42. package/dist/types/Views.d.ts +23 -17
  43. package/dist/types/api.d.ts +18 -17
  44. package/dist/types/components.d.ts +64 -18
  45. package/dist/types/context.d.ts +28 -18
  46. package/dist/types/hooks.d.ts +20 -17
  47. package/dist/types/index.d.ts +17 -16
  48. package/dist/types/util.d.ts +38 -16
  49. package/dist/util.es.js +116 -113
  50. package/package.json +2 -2
@@ -2,10 +2,10 @@ import { jsxs as x, jsx as i, Fragment as Ee } from "react/jsx-runtime";
2
2
  import { Toolbar as nt, Panel as At, Button as ne, Spacer as st, Icon as Ie, getMixedCounts as Qe, getTextColor as Re, applyMixedChange as Ft, Dialog as jt, SEARCH_FILTER_ID as at, buildFilterId as Ae, getFilterFromId as Ot, SearchFilter as Rt, AssigneeField as Lt } from "@ynput/ayon-react-components";
3
3
  import { useEffect as Q, useMemo as w, useRef as le, useState as ie, useContext as Vt, useId as Ut, useCallback as $t } from "react";
4
4
  import E, { keyframes as Mt } from "styled-components";
5
- import { bz as _t, bH as Ht } from "./chunks/searchTerms.es.js";
5
+ import { bB as _t, bJ as Ht } from "./chunks/searchTerms.es.js";
6
6
  import { br as Bt, bP as Wt, c4 as zt, cA as ot, bz as it, v as Gt, bT as Qt, cf as qt } from "./chunks/getUris.es.js";
7
7
  import "primereact/confirmdialog";
8
- import { o as Kt, y as Jt, H as Xt, G as Yt, z as Zt, w as rt, A as en, B as tn, E as nn, I as sn, J as an, K as on, N as rn, W as ln, s as cn } from "./chunks/Watchers.es.js";
8
+ import { o as Kt, y as Jt, H as Yt, G as Xt, z as Zt, w as rt, A as en, B as tn, E as nn, I as sn, J as an, K as on, N as rn, W as ln, s as cn } from "./chunks/Watchers.es.js";
9
9
  import { O as Ga, Q as Qa, V as qa, X as Ka, T as Ja } from "./chunks/Watchers.es.js";
10
10
  import { E as dn, R as un, a as pn } from "./chunks/EntityPath.es.js";
11
11
  import { union as ke, upperFirst as lt } from "lodash";
@@ -15,7 +15,7 @@ import { a as mn, b as hn, A as qe, e as gn } from "./chunks/activeEntities.es.j
15
15
  import "axios";
16
16
  import "@module-federation/enhanced/runtime";
17
17
  import { menuItemsAt as Ne } from "@ynput/ayon-addon/host";
18
- import { m as se, u as fn, T as bn, af as vn, a6 as yn, ah as kn, a5 as Ke, G as wn, ag as xn, $ as Sn } from "./chunks/TableExportContextInstance.es.js";
18
+ import { m as se, u as fn, T as bn, ac as vn, a3 as yn, ae as kn, a2 as Ke, z as wn, ad as xn, Y as Sn } from "./chunks/TableExportContextInstance.es.js";
19
19
  import "semver";
20
20
  import { T as Cn } from "./chunks/ThumbnailUploaderContext.es.js";
21
21
  import "react-dom";
@@ -47,7 +47,7 @@ import "react-redux";
47
47
  import "custom-protocol-check";
48
48
  import "./chunks/SimpleForm.es.js";
49
49
  import { Dialog as Jn } from "primereact/dialog";
50
- function Xn({
50
+ function Yn({
51
51
  entityData: e,
52
52
  project: n,
53
53
  activeEntityType: t,
@@ -63,7 +63,7 @@ function Xn({
63
63
  l !== u && window.history.replaceState(window.history.state, "", l);
64
64
  }, [e, n, t, o]);
65
65
  }
66
- const Yn = E(nt)`
66
+ const Xn = E(nt)`
67
67
  display: flex;
68
68
  justify-content: space-between;
69
69
  align-items: flex-start;
@@ -332,10 +332,10 @@ const Yn = E(nt)`
332
332
  ), F = w(() => t.map((d) => d.status), [t]), pe = w(() => t.map((d) => d.attrib?.priority), [t]), K = w(() => t.map((d) => d.tags), [t]), me = w(
333
333
  () => r.reduce((d, P) => (d[P.name] = P, d), {}),
334
334
  [r]
335
- ), X = w(() => ke(...K), [K]), he = t.every((d) => d.projectName === R?.projectName), j = In(
335
+ ), Y = w(() => ke(...K), [K]), he = t.every((d) => d.projectName === R?.projectName), j = In(
336
336
  he ? R?.projectName : void 0,
337
337
  r
338
- ), z = t.length > 1, Y = w(() => Qe(K), [K]), xe = w(
338
+ ), z = t.length > 1, X = w(() => Qe(K), [K]), xe = w(
339
339
  () => Qe(t.map((d) => d.task?.assignees || [])),
340
340
  [t]
341
341
  ), ge = !z && !!R?.hasReviewables, ve = ue.length === 1, { attribAccess: S, updateEntity: fe } = Jt({
@@ -367,7 +367,7 @@ const Yn = E(nt)`
367
367
  P.length && Ce.push(...P.map((W) => ({ name: W, fullName: W })));
368
368
  }
369
369
  const { title: ee, subTitle: M } = gt(t, e), te = y?.length !== 0 && y?.find((d) => d.name === F[0]);
370
- return /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ i(
370
+ return /* @__PURE__ */ i(Yt, { children: /* @__PURE__ */ i(
371
371
  dn,
372
372
  {
373
373
  entities: t,
@@ -376,7 +376,7 @@ const Yn = E(nt)`
376
376
  thumbnailInputRef: V,
377
377
  versionsInputRef: U,
378
378
  onVersionCreated: (d) => N?.(d, "version"),
379
- children: /* @__PURE__ */ x(Yt, { className: be("details-panel-header", { isCompact: u }), children: [
379
+ children: /* @__PURE__ */ x(Xt, { className: be("details-panel-header", { isCompact: u }), children: [
380
380
  /* @__PURE__ */ x(
381
381
  Zt,
382
382
  {
@@ -410,9 +410,9 @@ const Yn = E(nt)`
410
410
  editable: !0,
411
411
  editor: !0,
412
412
  onChange: (d) => {
413
- j?.addTags(d.filter((P) => !X.includes(P))), oe("tags", d);
413
+ j?.addTags(d.filter((P) => !Y.includes(P))), oe("tags", d);
414
414
  },
415
- mixedCounts: z ? Y : void 0,
415
+ mixedCounts: z ? X : void 0,
416
416
  mixedTotal: t.length,
417
417
  mixedLabel: `${e}s`,
418
418
  onMixedChange: (d) => Z("tags", d),
@@ -534,7 +534,7 @@ const Yn = E(nt)`
534
534
 
535
535
  height: 100%;
536
536
  overflow: hidden;
537
- `, Xe = E.div`
537
+ `, Ye = E.div`
538
538
  position: relative;
539
539
  flex: 1;
540
540
  display: flex;
@@ -557,7 +557,7 @@ const Yn = E(nt)`
557
557
  if (!o) return null;
558
558
  let s = "Reviewables";
559
559
  return e.length > 1 && (s += ` (${o.name})`), e.some((a) => a.entityType !== "version") ? null : /* @__PURE__ */ x(ds, { children: [
560
- /* @__PURE__ */ x(Xe, { children: [
560
+ /* @__PURE__ */ x(Ye, { children: [
561
561
  /* @__PURE__ */ i("h4", { children: s }),
562
562
  /* @__PURE__ */ i(
563
563
  un,
@@ -570,7 +570,7 @@ const Yn = E(nt)`
570
570
  }
571
571
  )
572
572
  ] }),
573
- /* @__PURE__ */ x(Xe, { children: [
573
+ /* @__PURE__ */ x(Ye, { children: [
574
574
  /* @__PURE__ */ i("h4", { children: "Representations" }),
575
575
  /* @__PURE__ */ i(Rn, { entities: e })
576
576
  ] })
@@ -723,7 +723,7 @@ const Yn = E(nt)`
723
723
  display: flex;
724
724
  flex-direction: column;
725
725
  gap: 16px;
726
- `, Ye = E.div`
726
+ `, Xe = E.div`
727
727
  display: flex;
728
728
  flex-direction: column;
729
729
  gap: 6px;
@@ -765,14 +765,14 @@ const Yn = E(nt)`
765
765
  Hn(r, !0), o();
766
766
  };
767
767
  return /* @__PURE__ */ i(jt, { isOpen: !0, onClose: o, size: "sm", header: "Share", children: /* @__PURE__ */ x(bs, { children: [
768
- /* @__PURE__ */ x(Ye, { children: [
768
+ /* @__PURE__ */ x(Xe, { children: [
769
769
  /* @__PURE__ */ i(Ze, { children: "Link" }),
770
770
  /* @__PURE__ */ x(et, { type: "button", onClick: () => a(e), "aria-label": "Copy link", children: [
771
771
  /* @__PURE__ */ i("span", { className: "value", children: e }),
772
772
  /* @__PURE__ */ i(Ie, { icon: "content_copy" })
773
773
  ] })
774
774
  ] }),
775
- /* @__PURE__ */ x(Ye, { children: [
775
+ /* @__PURE__ */ x(Xe, { children: [
776
776
  /* @__PURE__ */ i(Ze, { children: "Markdown Link" }),
777
777
  /* @__PURE__ */ x(et, { type: "button", onClick: () => a(s), "aria-label": "Copy markdown link", children: [
778
778
  /* @__PURE__ */ i("span", { className: "value", children: s }),
@@ -826,7 +826,7 @@ const Yn = E(nt)`
826
826
  };
827
827
  }).filter((B) => B !== null), [a, n, e, s]), pe = !!ue && F.length > 0, K = () => {
828
828
  C(!1), ue?.deleteEntities(F);
829
- }, { contributions: me } = dt("detailsPanel.menuItem"), X = w(
829
+ }, { contributions: me } = dt("detailsPanel.menuItem"), Y = w(
830
830
  () => me.filter(
831
831
  (k) => !k.entityTypes?.length || k.entityTypes.includes(e)
832
832
  ),
@@ -851,23 +851,23 @@ const Yn = E(nt)`
851
851
  [he]
852
852
  ), z = w(
853
853
  () => [
854
- ...Ne(X, "top"),
855
- ...Ne(X, "bottom")
854
+ ...Ne(Y, "top"),
855
+ ...Ne(Y, "bottom")
856
856
  ].filter((k) => k.pinned),
857
- [X]
858
- ), Y = w(
859
- () => X.filter((k) => !k.pinned),
860
- [X]
857
+ [Y]
858
+ ), X = w(
859
+ () => Y.filter((k) => !k.pinned),
860
+ [Y]
861
861
  ), xe = w(
862
- () => Ne(Y, "top").map(j),
863
- [Y, j]
862
+ () => Ne(X, "top").map(j),
863
+ [X, j]
864
864
  ), ge = w(
865
- () => Ne(Y, "bottom").map(j),
866
- [Y, j]
865
+ () => Ne(X, "bottom").map(j),
866
+ [X, j]
867
867
  );
868
868
  Q(() => {
869
- A && Y.forEach((k) => Le(k.run));
870
- }, [A, Y]);
869
+ A && X.forEach((k) => Le(k.run));
870
+ }, [A, X]);
871
871
  const { items: ve } = fs({
872
872
  entityType: e,
873
873
  entityId: n,
@@ -1633,9 +1633,9 @@ const Yn = E(nt)`
1633
1633
  setEntities: pe,
1634
1634
  slideOut: K,
1635
1635
  useSearchParams: me,
1636
- SubtasksManager: X,
1636
+ SubtasksManager: Y,
1637
1637
  useNavigate: he
1638
- } = se(), { currentTab: j, setTab: z, isFeed: Y } = kn(N), [xe, ge] = me(), ve = le(!1), S = F?.entityType ?? e, fe = F?.entities ?? o, k = F?.entitySubTypes ?? n, B = F?.entities ? [] : t, _ = F?.entities ? F.entities.map((p) => p.projectName) : m;
1638
+ } = se(), { currentTab: j, setTab: z, isFeed: X } = kn(N), [xe, ge] = me(), ve = le(!1), S = F?.entityType ?? e, fe = F?.entities ?? o, k = F?.entitySubTypes ?? n, B = F?.entities ? [] : t, _ = F?.entities ? F.entities.map((p) => p.projectName) : m;
1639
1639
  hn(
1640
1640
  S ? fe.map((p) => ({ ...p, entityType: S })) : [],
1641
1641
  h ? qe.slideOut : qe.detailsPanel
@@ -1708,7 +1708,7 @@ const Yn = E(nt)`
1708
1708
  }), () => {
1709
1709
  He("");
1710
1710
  };
1711
- }, [M, _, S]), Xn({
1711
+ }, [M, _, S]), Yn({
1712
1712
  entityData: Te,
1713
1713
  project: Pe,
1714
1714
  activeEntityType: S,
@@ -1784,7 +1784,7 @@ const Yn = E(nt)`
1784
1784
  versionsInputRef: We,
1785
1785
  canUploadVersion: It,
1786
1786
  children: /* @__PURE__ */ x(ts, { className: "details-panel", children: [
1787
- /* @__PURE__ */ x(Yn, { children: [
1787
+ /* @__PURE__ */ x(Xn, { children: [
1788
1788
  /* @__PURE__ */ i(
1789
1789
  pn,
1790
1790
  {
@@ -1877,7 +1877,7 @@ const Yn = E(nt)`
1877
1877
  }
1878
1878
  ),
1879
1879
  /* @__PURE__ */ x(ct, { projectName: H, children: [
1880
- Y && !d && /* @__PURE__ */ i(
1880
+ X && !d && /* @__PURE__ */ i(
1881
1881
  bt,
1882
1882
  {
1883
1883
  entityType: S,
@@ -1896,7 +1896,7 @@ const Yn = E(nt)`
1896
1896
  isSlideOut: h
1897
1897
  }
1898
1898
  ),
1899
- j === "subtasks" && S === "task" && G?.id && X && /* @__PURE__ */ i(
1899
+ j === "subtasks" && S === "task" && G?.id && Y && /* @__PURE__ */ i(
1900
1900
  Vs,
1901
1901
  {
1902
1902
  projectName: H,
@@ -1904,7 +1904,7 @@ const Yn = E(nt)`
1904
1904
  taskName: G.name,
1905
1905
  folderId: G.folder?.id,
1906
1906
  subtasks: G.task?.subtasks || [],
1907
- SubtasksManager: X,
1907
+ SubtasksManager: Y,
1908
1908
  useNavigate: he,
1909
1909
  onNotFound: () => z("feed")
1910
1910
  }
@@ -2194,9 +2194,9 @@ export {
2194
2194
  Ba as DetailsPanelFloating,
2195
2195
  Ha as DetailsPanelSlideOut,
2196
2196
  qa as Footer,
2197
- Yt as Grid,
2197
+ Xt as Grid,
2198
2198
  Zt as Header,
2199
- Xt as HeaderContainer,
2199
+ Yt as HeaderContainer,
2200
2200
  Ka as LabelWrapper,
2201
2201
  rn as PriorityEnumDropdown,
2202
2202
  sn as ReadOnlyTags,