@ynput/ayon-frontend-shared 0.7.6 → 0.8.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 (70) hide show
  1. package/dist/DetailsPanel.es.js +361 -355
  2. package/dist/Feed.es.js +1 -1
  3. package/dist/ListTable.es.js +18 -18
  4. package/dist/NewEntity.es.js +30 -30
  5. package/dist/ProjectTreeTable.es.js +984 -974
  6. package/dist/ProjectsTable.es.js +3 -3
  7. package/dist/Slicer.es.js +53 -50
  8. package/dist/Views.es.js +150 -151
  9. package/dist/api.es.js +166 -165
  10. package/dist/chunks/Actions.es.js +9 -10
  11. package/dist/chunks/ColumnDropIndicator.es.js +2 -2
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +3 -4
  13. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +2 -2
  14. package/dist/chunks/DetailsDialog.es.js +3 -3
  15. package/dist/chunks/EmptyPlaceholder.es.js +7 -7
  16. package/dist/chunks/EntityPath.es.js +38 -39
  17. package/dist/chunks/EntityPickerDialog.es.js +65 -66
  18. package/dist/chunks/EntityTooltip.es.js +18 -19
  19. package/dist/chunks/Feed.es.js +1381 -1355
  20. package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
  21. package/dist/chunks/FilterErrorActions.es.js +2 -3
  22. package/dist/chunks/GroupSettingsFallback.es.js +2 -2
  23. package/dist/chunks/Menu.es.js +52 -53
  24. package/dist/chunks/MetaWidget.es.js +1948 -1875
  25. package/dist/chunks/ProjectFoldersContext.es.js +40 -40
  26. package/dist/chunks/RepresentationsList.es.js +1 -1
  27. package/dist/chunks/ReviewablesSelector.es.js +759 -742
  28. package/dist/chunks/SimpleTable.es.js +2 -1
  29. package/dist/chunks/Slicer.es.js +49 -50
  30. package/dist/chunks/TableExportContextInstance.es.js +600 -402
  31. package/dist/chunks/TableSettingsFallback.es.js +3 -4
  32. package/dist/chunks/ThumbnailSimple.es.js +114 -99
  33. package/dist/chunks/VideoPlayer.es.js +8 -9
  34. package/dist/chunks/Watchers.es.js +928 -871
  35. package/dist/chunks/expandRelativeDates.es.js +1 -1
  36. package/dist/chunks/getThumbnailUrl.es.js +33 -21
  37. package/dist/chunks/getUris.es.js +1580 -1610
  38. package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
  39. package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
  40. package/dist/chunks/searchTerms.es.js +773 -696
  41. package/dist/chunks/useAttributeEnums.es.js +22 -22
  42. package/dist/chunks/useDateRangeFilter.es.js +1 -1
  43. package/dist/chunks/useHierarchySelection.es.js +3 -4
  44. package/dist/chunks/useLoadModule.es.js +3 -4
  45. package/dist/components.es.js +475 -467
  46. package/dist/context.es.js +615 -540
  47. package/dist/hooks.es.js +193 -171
  48. package/dist/index.es.js +2 -2
  49. package/dist/types/Actions.d.ts +10 -8
  50. package/dist/types/DetailsPanel.d.ts +54 -76
  51. package/dist/types/EntityPickerDialog.d.ts +12 -6
  52. package/dist/types/Feed.d.ts +24 -24
  53. package/dist/types/ListTable.d.ts +33 -27
  54. package/dist/types/NewEntity.d.ts +26 -39
  55. package/dist/types/ProjectTreeTable.d.ts +199 -195
  56. package/dist/types/ProjectsTable.d.ts +6 -6
  57. package/dist/types/RepresentationsList.d.ts +4 -0
  58. package/dist/types/Slicer.d.ts +63 -246
  59. package/dist/types/Views.d.ts +71 -298
  60. package/dist/types/api.d.ts +3164 -2363
  61. package/dist/types/components.d.ts +327 -474
  62. package/dist/types/context.d.ts +285 -572
  63. package/dist/types/hooks.d.ts +76 -47
  64. package/dist/types/index.d.ts +6 -0
  65. package/dist/types/util.d.ts +141 -120
  66. package/dist/util.es.js +71 -68
  67. package/package.json +6 -6
  68. package/dist/chunks/EntityUpdatesContext.es.js +0 -61
  69. package/dist/chunks/PlayableIcon.es.js +0 -5020
  70. package/dist/chunks/viewUpdateHelper.es.js +0 -153
@@ -16,10 +16,9 @@ import "semver";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import "clsx";
18
18
  import "react-dom";
19
- import "react-redux";
20
19
  import "react-router-dom";
21
20
  import { u as a } from "./addonColumnTags.es.js";
22
- const A = ({ errorMessage: o }) => {
21
+ const g = ({ errorMessage: o }) => {
23
22
  const t = a();
24
23
  if (!o) return null;
25
24
  const p = () => t?.openSupport(
@@ -43,5 +42,5 @@ Error: ${o}`
43
42
  ] });
44
43
  };
45
44
  export {
46
- A as F
45
+ g as F
47
46
  };
@@ -8,7 +8,7 @@ import "./SimpleForm.es.js";
8
8
  import "./MetaWidget.es.js";
9
9
  import "react-dom";
10
10
  import "date-fns";
11
- import "./PlayableIcon.es.js";
11
+ import "./FilmstripEntityCard.es.js";
12
12
  import "./TableExportContextInstance.es.js";
13
13
  import "lodash";
14
14
  import "primereact/confirmdialog";
@@ -32,7 +32,6 @@ import "@module-federation/enhanced/runtime";
32
32
  import "@ynput/ayon-addon/host";
33
33
  import "semver";
34
34
  import "./ContextMenuContextInstance.es.js";
35
- import "react-redux";
36
35
  import "react-router-dom";
37
36
  import "./EmptyPlaceholder.es.js";
38
37
  import "./EmptyPlaceholderFlex.styled.es.js";
@@ -45,6 +44,7 @@ import "./EntityTooltip.es.js";
45
44
  import "./addonColumnTags.es.js";
46
45
  import "@ynput/ayon-addon";
47
46
  import "@tanstack/react-table";
47
+ import "react-redux";
48
48
  import "./EntityPickerDialog.es.js";
49
49
  import { T as a } from "./TableSettingsFallback.es.js";
50
50
  import "remark-gfm";
@@ -1,4 +1,4 @@
1
- import { jsxs as Q, jsx as u, Fragment as Me } from "react/jsx-runtime";
1
+ import { jsxs as Q, jsx as p, Fragment as Me } from "react/jsx-runtime";
2
2
  import te, { forwardRef as ke, useRef as oe, useEffect as Y, useLayoutEffect as le, useState as ce, useCallback as Ee } from "react";
3
3
  import { Button as de, Icon as K, ShortcutTag as Le } from "@ynput/ayon-react-components";
4
4
  import A, { keyframes as Pe } from "styled-components";
@@ -11,13 +11,12 @@ import "react-toastify";
11
11
  import "./searchTerms.es.js";
12
12
  import "./getUris.es.js";
13
13
  import "primereact/confirmdialog";
14
- import { b as ne, u as pe } from "./TableExportContextInstance.es.js";
15
14
  import "uuid";
16
15
  import "axios";
16
+ import { b as ne, u as ue } from "./TableExportContextInstance.es.js";
17
17
  import "semver";
18
18
  import "./ContextMenuContextInstance.es.js";
19
19
  import { createPortal as Se } from "react-dom";
20
- import "react-redux";
21
20
  import { c as Te } from "./copyToClipboard.es.js";
22
21
  const z = 42, Ne = 8, U = z + Ne, Ae = A.dialog`
23
22
  position: fixed;
@@ -321,14 +320,14 @@ const z = 42, Ne = 8, U = z + Ne, Ae = A.dialog`
321
320
  display: flex;
322
321
  }
323
322
  }
324
- `, ue = ke(
323
+ `, pe = ke(
325
324
  ({
326
325
  label: a,
327
326
  icon: i,
328
327
  hoverIcon: r,
329
328
  img: n,
330
329
  highlighted: f,
331
- notification: p,
330
+ notification: u,
332
331
  selected: l,
333
332
  danger: t,
334
333
  items: g = [],
@@ -352,7 +351,7 @@ const z = 42, Ne = 8, U = z + Ne, Ae = A.dialog`
352
351
  {
353
352
  highlighted: f,
354
353
  selected: l,
355
- notification: p,
354
+ notification: u,
356
355
  danger: t,
357
356
  dev: m,
358
357
  disabled: e,
@@ -363,19 +362,19 @@ const z = 42, Ne = 8, U = z + Ne, Ae = A.dialog`
363
362
  ...N,
364
363
  "aria-label": J.join(", "),
365
364
  children: [
366
- i && /* @__PURE__ */ u(K, { icon: i, className: r ? "hover-swap-default" : void 0 }),
367
- r && /* @__PURE__ */ u(K, { icon: r, className: "hover-swap" }),
368
- n && /* @__PURE__ */ u($e, { src: n, alt: `${a} icon` }),
369
- J.map((b, x) => /* @__PURE__ */ u("span", { children: b }, x)),
370
- L && /* @__PURE__ */ u(Le, { style: { minWidth: 22, textAlign: "center" }, align: "right", children: L }),
371
- (d || w) && /* @__PURE__ */ u(
365
+ i && /* @__PURE__ */ p(K, { icon: i, className: r ? "hover-swap-default" : void 0 }),
366
+ r && /* @__PURE__ */ p(K, { icon: r, className: "hover-swap" }),
367
+ n && /* @__PURE__ */ p($e, { src: n, alt: `${a} icon` }),
368
+ J.map((b, x) => /* @__PURE__ */ p("span", { children: b }, x)),
369
+ L && /* @__PURE__ */ p(Le, { style: { minWidth: 22, textAlign: "center" }, align: "right", children: L }),
370
+ (d || w) && /* @__PURE__ */ p(
372
371
  K,
373
372
  {
374
373
  icon: "check",
375
374
  style: { marginLeft: "auto", visibility: d ? "visible" : "hidden" }
376
375
  }
377
376
  ),
378
- !!y.length && /* @__PURE__ */ u(Fe, { children: y.map((b) => /* @__PURE__ */ u(
377
+ !!y.length && /* @__PURE__ */ p(Fe, { children: y.map((b) => /* @__PURE__ */ p(
379
378
  We,
380
379
  {
381
380
  variant: "text",
@@ -390,22 +389,22 @@ const z = 42, Ne = 8, U = z + Ne, Ae = A.dialog`
390
389
  },
391
390
  b.icon
392
391
  )) }),
393
- C && /* @__PURE__ */ u(K, { icon: "bolt", className: "power-bolt" }),
394
- !!g.length && /* @__PURE__ */ u(K, { icon: "arrow_right", className: "more" })
392
+ C && /* @__PURE__ */ p(K, { icon: "bolt", className: "power-bolt" }),
393
+ !!g.length && /* @__PURE__ */ p(K, { icon: "arrow_right", className: "more" })
395
394
  ]
396
395
  }
397
396
  );
398
- return h ? /* @__PURE__ */ u(Ce, { to: h, target: N.target, children: S }) : S;
397
+ return h ? /* @__PURE__ */ p(Ce, { to: h, target: N.target, children: S }) : S;
399
398
  }
400
399
  );
401
- ue.displayName = "MenuItem";
400
+ pe.displayName = "MenuItem";
402
401
  const ae = ({
403
402
  items: a,
404
403
  handleClick: i,
405
404
  onSubMenu: r,
406
405
  onSubMenuLayout: n,
407
406
  subMenu: f,
408
- level: p,
407
+ level: u,
409
408
  id: l = "root-menu",
410
409
  parentRef: t,
411
410
  parentEl: g,
@@ -438,7 +437,7 @@ const ae = ({
438
437
  maxHeight: B - W - M
439
438
  },
440
439
  items: S,
441
- level: p,
440
+ level: u,
442
441
  placement: R,
443
442
  // Pass the actual menu-item element so sub-menu measurement uses the <li>
444
443
  // instead of whatever inner span the mouse event bubbled from.
@@ -469,7 +468,7 @@ const ae = ({
469
468
  { top: re, left: se, maxHeight: O - G - E },
470
469
  o
471
470
  );
472
- }, [f, a, t, l, h, c?.top, c?.left, n]), /* @__PURE__ */ u(
471
+ }, [f, a, t, l, h, c?.top, c?.left, n]), /* @__PURE__ */ p(
473
472
  He,
474
473
  {
475
474
  style: { paddingLeft: f ? 16 : 0, ...c },
@@ -478,10 +477,10 @@ const ae = ({
478
477
  onMouseLeave: J,
479
478
  ...w,
480
479
  ref: N,
481
- children: /* @__PURE__ */ u(_e, { children: a.filter((v) => !v.hidden).map((v, C) => {
480
+ children: /* @__PURE__ */ p(_e, { children: a.filter((v) => !v.hidden).map((v, C) => {
482
481
  if (v.node)
483
482
  return v.node;
484
- if (v?.id === "divider" || v?.separator) return /* @__PURE__ */ u("hr", {}, C);
483
+ if (v?.id === "divider" || v?.separator) return /* @__PURE__ */ p("hr", {}, C);
485
484
  const {
486
485
  label: S,
487
486
  icon: b,
@@ -502,8 +501,8 @@ const ae = ({
502
501
  } = v, { powerLicense: j } = ne(), $ = !j && T, R = (o) => {
503
502
  o.preventDefault(), o.stopPropagation(), T && d?.(T), L?.();
504
503
  };
505
- return /* @__PURE__ */ u(
506
- ue,
504
+ return /* @__PURE__ */ p(
505
+ pe,
507
506
  {
508
507
  tabIndex: 0,
509
508
  label: S,
@@ -530,7 +529,7 @@ const ae = ({
530
529
  onMouseLeave: (o) => q(o, k, []),
531
530
  className: `${e} ${I.className || ""}`,
532
531
  ...I,
533
- children: !!P.length && /* @__PURE__ */ u(K, { icon: "arrow_right", style: { marginLeft: "auto" } })
532
+ children: !!P.length && /* @__PURE__ */ p(K, { icon: "arrow_right", style: { marginLeft: "auto" } })
534
533
  },
535
534
  `${k}-${C}`
536
535
  );
@@ -540,7 +539,7 @@ const ae = ({
540
539
  };
541
540
  function qe(a, i, r = "right") {
542
541
  if (!a) return null;
543
- const n = a.getBoundingClientRect(), f = i?.getBoundingClientRect(), p = f?.width || 200, l = f?.height || 300, t = 8, g = window.innerWidth, c = window.innerHeight;
542
+ const n = a.getBoundingClientRect(), f = i?.getBoundingClientRect(), u = f?.width || 200, l = f?.height || 300, t = 8, g = window.innerWidth, c = window.innerHeight;
544
543
  let h = n.bottom + 8 - z, m;
545
544
  const L = U - z;
546
545
  if (h + z + l > c - t) {
@@ -548,23 +547,23 @@ function qe(a, i, r = "right") {
548
547
  e >= L && (h = e);
549
548
  }
550
549
  if (h = Math.max(L, h), r === "right") {
551
- const e = n.right - p;
550
+ const e = n.right - u;
552
551
  e >= t ? m = e : m = n.left;
553
552
  } else {
554
553
  const e = n.left;
555
- e + p <= g - t ? m = e : m = n.right - p;
554
+ e + u <= g - t ? m = e : m = n.right - u;
556
555
  }
557
- return m !== void 0 && (m = Math.max(t, Math.min(m, g - p - t))), { top: h, left: m, maxHeight: c - (h + z) - t };
556
+ return m !== void 0 && (m = Math.max(t, Math.min(m, g - u - t))), { top: h, left: m, maxHeight: c - (h + z) - t };
558
557
  }
559
558
  function Ve(a, i, r = "right") {
560
- const [n, f] = ce(null), p = oe(null), l = Ee(() => {
559
+ const [n, f] = ce(null), u = oe(null), l = Ee(() => {
561
560
  let t = a;
562
561
  if (!t && i && (t = document.getElementById(i)), !t) {
563
562
  i && console.warn(`Target element with id '${i}' not found`);
564
563
  return;
565
564
  }
566
- if (!p.current) return;
567
- const g = qe(t, p.current, r);
565
+ if (!u.current) return;
566
+ const g = qe(t, u.current, r);
568
567
  g && f(
569
568
  (c) => c && Math.abs(c.top - g.top) < 1 && Math.abs((c.left ?? 0) - (g.left ?? 0)) < 1 && Math.abs((c.maxHeight ?? 0) - (g.maxHeight ?? 0)) < 1 ? c : g
570
569
  );
@@ -577,32 +576,32 @@ function Ve(a, i, r = "right") {
577
576
  window.removeEventListener("resize", t), window.removeEventListener("scroll", t);
578
577
  };
579
578
  }, [l]), Y(() => {
580
- if (!p.current) return;
579
+ if (!u.current) return;
581
580
  const t = new ResizeObserver(() => {
582
581
  l();
583
582
  });
584
- return t.observe(p.current), () => {
583
+ return t.observe(u.current), () => {
585
584
  t.disconnect();
586
585
  };
587
- }, [l]), { position: n, menuRef: p };
586
+ }, [l]), { position: n, menuRef: u };
588
587
  }
589
- const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
588
+ const je = "ayon-menu-dialog", me = "ayon-menu-content", gt = ({
590
589
  id: a,
591
590
  target: i,
592
591
  targetId: r = "",
593
592
  align: n = "right",
594
593
  theme: f = "light",
595
- isOpen: p,
594
+ isOpen: u,
596
595
  onDismiss: l,
597
596
  children: t,
598
597
  ...g
599
598
  }) => {
600
- const { menuOpen: c, setMenuOpen: h, navigate: m } = pe(), L = p ?? c === a, e = () => {
601
- p !== void 0 ? l?.() : h(!1);
599
+ const { menuOpen: c, setMenuOpen: h, navigate: m } = ue(), L = u ?? c === a, e = () => {
600
+ u !== void 0 ? l?.() : h(!1);
602
601
  }, s = (d) => {
603
602
  console.log("navigate and close"), e(), !m && d ? console.log("navigate not found") : m && d && m(d);
604
603
  };
605
- return L ? /* @__PURE__ */ u(
604
+ return L ? /* @__PURE__ */ p(
606
605
  Ge,
607
606
  {
608
607
  handleClose: e,
@@ -621,7 +620,7 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
621
620
  target: r,
622
621
  targetId: n,
623
622
  align: f = "right",
624
- children: p,
623
+ children: u,
625
624
  ...l
626
625
  }) => {
627
626
  const { position: t, menuRef: g } = Ve(r ?? null, n ?? "", f);
@@ -633,13 +632,13 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
633
632
  e.preventDefault(), e.stopPropagation(), a(), (r ?? (n ? document.getElementById(n) : null))?.focus();
634
633
  }, h = (e) => {
635
634
  e.target === e.currentTarget && a();
636
- }, m = te.Children.map(p, (e, s) => te.isValidElement(e) ? te.cloneElement(e, {
635
+ }, m = te.Children.map(u, (e, s) => te.isValidElement(e) ? te.cloneElement(e, {
637
636
  onClose: a,
638
637
  index: s,
639
638
  navigate: i
640
639
  }) : e);
641
640
  return Se(
642
- /* @__PURE__ */ u(
641
+ /* @__PURE__ */ p(
643
642
  Ae,
644
643
  {
645
644
  open: !0,
@@ -647,7 +646,7 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
647
646
  onKeyDown: c,
648
647
  ...l,
649
648
  id: je,
650
- children: /* @__PURE__ */ u(
649
+ children: /* @__PURE__ */ p(
651
650
  Oe,
652
651
  {
653
652
  id: me,
@@ -669,8 +668,8 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
669
668
  }
670
669
  }, Ke = (a = [], i = []) => a.length === i.length && a.every((r, n) => r.icon === i[n].icon && r.tooltip === i[n].tooltip), Ue = (a, i) => a.length === i.length && a.every(
671
670
  (r, n) => r.id === i[n].id && r.icon === i[n].icon && r.selected === i[n].selected && r.active === i[n].active && Ke(r.endActions, i[n].endActions)
672
- ), vt = ({ menu: a = [], onClose: i, header: r, footer: n = "" }) => {
673
- const { setPowerpackDialog: f } = ne(), { setMenuOpen: p } = pe(), [l, t] = ce([]), g = (e, s, d, w) => {
671
+ ), ht = ({ menu: a = [], onClose: i, header: r, footer: n = "" }) => {
672
+ const { setPowerpackDialog: f } = ne(), { setMenuOpen: u } = ue(), [l, t] = ce([]), g = (e, s, d, w) => {
674
673
  if (d) return i?.();
675
674
  s?.(e), !w && i && i();
676
675
  }, c = (e, s) => {
@@ -713,7 +712,7 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
713
712
  return /* @__PURE__ */ Q(Me, { children: [
714
713
  /* @__PURE__ */ Q(Ie, { children: [
715
714
  r && r,
716
- /* @__PURE__ */ u(
715
+ /* @__PURE__ */ p(
717
716
  ae,
718
717
  {
719
718
  items: a,
@@ -721,15 +720,15 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
721
720
  onSubMenu: m,
722
721
  level: 0,
723
722
  setPowerpackDialog: f,
724
- onMenuClose: () => p(!1)
723
+ onMenuClose: () => u(!1)
725
724
  }
726
725
  ),
727
726
  n && /* @__PURE__ */ Q(ze, { children: [
728
727
  n,
729
- /* @__PURE__ */ u(de, { icon: "content_copy", variant: "text", onClick: () => Te(n) })
728
+ /* @__PURE__ */ p(de, { icon: "content_copy", variant: "text", onClick: () => Te(n) })
730
729
  ] })
731
730
  ] }),
732
- l.map((e, s) => /* @__PURE__ */ u(
731
+ l.map((e, s) => /* @__PURE__ */ p(
733
732
  ae,
734
733
  {
735
734
  ...e,
@@ -740,7 +739,7 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
740
739
  onSubMenu: m,
741
740
  onSubMenuLayout: L,
742
741
  onClose: () => t(l.filter((d) => d.id !== e.id)),
743
- onMenuClose: () => p(!1),
742
+ onMenuClose: () => u(!1),
744
743
  onChange: c,
745
744
  setPowerpackDialog: f,
746
745
  itemClassName: void 0,
@@ -751,8 +750,8 @@ const je = "ayon-menu-dialog", me = "ayon-menu-content", ht = ({
751
750
  ] });
752
751
  };
753
752
  export {
754
- ht as M,
755
- vt as a,
753
+ gt as M,
754
+ ht as a,
756
755
  me as b,
757
756
  je as c,
758
757
  ae as d