@ynput/ayon-frontend-shared 0.5.0 → 0.6.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 (74) hide show
  1. package/dist/DetailsPanel.es.js +88 -86
  2. package/dist/Feed.es.js +22 -22
  3. package/dist/ListTable.es.js +77 -67
  4. package/dist/ProjectTreeTable.es.js +1164 -1150
  5. package/dist/Slicer.es.js +2 -2
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +331 -329
  8. package/dist/chunks/Actions.es.js +23 -23
  9. package/dist/chunks/DeleteEntitiesContext.es.js +115 -115
  10. package/dist/chunks/DetailsDialog.es.js +3 -3
  11. package/dist/chunks/DetailsPanelContext.es.js +155 -0
  12. package/dist/chunks/EntityPath.es.js +20 -20
  13. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  14. package/dist/chunks/EntityTooltip.es.js +12 -12
  15. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  16. package/dist/chunks/Feed.es.js +2208 -2611
  17. package/dist/chunks/FilterErrorActions.es.js +1 -1
  18. package/dist/chunks/GlobalContext.es.js +14 -14
  19. package/dist/chunks/Menu.es.js +1 -1
  20. package/dist/chunks/MenuContext.es.js +51 -242
  21. package/dist/chunks/MenuItem.es.js +1 -1
  22. package/dist/chunks/MetaWidget.es.js +3341 -3899
  23. package/dist/chunks/NewEntityContext.es.js +40 -40
  24. package/dist/chunks/PlayableIcon.es.js +4261 -1163
  25. package/dist/chunks/ProjectContext.es.js +13 -13
  26. package/dist/chunks/ProjectFoldersContext.es.js +5 -5
  27. package/dist/chunks/RepresentationsList.es.js +3 -3
  28. package/dist/chunks/ReviewablesSelector.es.js +85 -76
  29. package/dist/chunks/SimpleForm.es.js +9 -9
  30. package/dist/chunks/SimpleTable.es.js +1 -1
  31. package/dist/chunks/Slicer.es.js +173 -171
  32. package/dist/chunks/TableSettingsFallback.es.js +6 -6
  33. package/dist/chunks/ThumbnailSimple.es.js +410 -61
  34. package/dist/chunks/VersionUploadContext.es.js +29 -29
  35. package/dist/chunks/ViewsContext.es.js +90 -90
  36. package/dist/chunks/Watchers.es.js +628 -598
  37. package/dist/chunks/entityDefinitions.es.js +31 -31
  38. package/dist/chunks/expandRelativeDates.es.js +27 -0
  39. package/dist/chunks/getBundleMode.es.js +16 -61
  40. package/dist/chunks/getUris.es.js +271 -269
  41. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  42. package/dist/chunks/searchTerms.es.js +177 -173
  43. package/dist/chunks/uriUtils.es.js +48 -0
  44. package/dist/chunks/useAttributeEnums.es.js +11 -11
  45. package/dist/chunks/useColumnDragRestriction.es.js +37 -27
  46. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  47. package/dist/chunks/useLocalStorage.es.js +9 -9
  48. package/dist/chunks/useSessionStorage.es.js +61 -0
  49. package/dist/chunks/viewUpdateHelper.es.js +19 -19
  50. package/dist/components.es.js +165 -160
  51. package/dist/context.es.js +60 -58
  52. package/dist/hooks.es.js +104 -98
  53. package/dist/index.es.js +18 -13
  54. package/dist/types/Actions.d.ts +16 -16
  55. package/dist/types/ContextMenu.d.ts +16 -16
  56. package/dist/types/DetailsPanel.d.ts +16 -16
  57. package/dist/types/EntityPickerDialog.d.ts +16 -16
  58. package/dist/types/Feed.d.ts +16 -16
  59. package/dist/types/ListTable.d.ts +16 -16
  60. package/dist/types/NewEntity.d.ts +16 -16
  61. package/dist/types/ProjectTreeTable.d.ts +20 -16
  62. package/dist/types/RepresentationsList.d.ts +16 -16
  63. package/dist/types/SimpleTable.d.ts +16 -16
  64. package/dist/types/Slicer.d.ts +16 -16
  65. package/dist/types/Views.d.ts +17 -17
  66. package/dist/types/api.d.ts +391 -95
  67. package/dist/types/components.d.ts +79 -20
  68. package/dist/types/context.d.ts +60 -17
  69. package/dist/types/hooks.d.ts +16 -16
  70. package/dist/types/index.d.ts +16 -16
  71. package/dist/types/util.d.ts +16 -16
  72. package/dist/util.es.js +108 -97
  73. package/package.json +16 -4
  74. package/dist/chunks/mentionTypeOptions.es.js +0 -15
@@ -1,12 +1,12 @@
1
1
  import { jsxs as k, jsx as i, Fragment as Ne } from "react/jsx-runtime";
2
2
  import { Toolbar as Me, Panel as gt, Button as X, Spacer as He, Icon as fe, getTextColor as Be, Dialog as ft, SEARCH_FILTER_ID as We, buildFilterId as ke, getFilterFromId as bt, SearchFilter as vt, AssigneeField as yt } from "@ynput/ayon-react-components";
3
- import { useEffect as W, useRef as Y, useMemo as I, useState as K, useContext as kt, useId as wt } from "react";
3
+ import { useEffect as W, useRef as Y, useMemo as P, useState as K, useContext as kt, useId as wt } from "react";
4
4
  import S, { keyframes as xt } from "styled-components";
5
5
  import "./chunks/searchTerms.es.js";
6
- import { bk as St, bI as Ct, bW as Tt, cq as ze, bs as Ge, s as Nt, bM as Dt, c5 as It } from "./chunks/getUris.es.js";
6
+ import { bl as St, bJ as Ct, bX as Tt, cr as ze, bt as Ge, s as Nt, bN as Dt, c6 as Pt } from "./chunks/getUris.es.js";
7
7
  import "primereact/confirmdialog";
8
- import { c as Pt, a as Et, H as Ft, G as jt, y as At, w as Qe, z as Ot, A as Rt, B as Ut, E as Vt, I as Lt, J as $t, W as _t, s as Mt } from "./chunks/Watchers.es.js";
9
- import { K as wa, N as xa, O as Sa, Q as Ca, T as Ta } from "./chunks/Watchers.es.js";
8
+ import { c as It, a as Et, H as Ft, G as jt, y as At, w as Qe, z as Ot, A as Rt, B as Ut, E as Vt, I as Lt, J as $t, W as _t, s as Mt } from "./chunks/Watchers.es.js";
9
+ import { K as Sa, N as Ca, O as Ta, Q as Na, T as Da } from "./chunks/Watchers.es.js";
10
10
  import { E as Ht, R as Bt, a as Wt } from "./chunks/EntityPath.es.js";
11
11
  import { T as zt, h as Gt, i as Qt, j as qt, e as Kt, b as Jt } from "./chunks/DeleteEntitiesContext.es.js";
12
12
  import { union as we, upperFirst as qe } from "lodash";
@@ -14,24 +14,26 @@ import "react-toastify";
14
14
  import "uuid";
15
15
  import { g as Xt, e as Yt } from "./chunks/extractEntityHierarchyFromParents.es.js";
16
16
  import { P as Ke } from "./chunks/ProjectContext.es.js";
17
- import { c as G, u as Zt, d as en, e as tn } from "./chunks/MenuContext.es.js";
17
+ import { u as G, a as Zt } from "./chunks/DetailsPanelContext.es.js";
18
+ import { u as en, c as tn } from "./chunks/MenuContext.es.js";
18
19
  import oe from "clsx";
19
20
  import { A as nn } from "./chunks/Actions.es.js";
20
21
  import { g as xe } from "./chunks/getEntityTypeIcon.es.js";
21
- import { P as sn, a as Je, m as an } from "./chunks/PlayableIcon.es.js";
22
- import { R as on } from "./chunks/RepresentationsList.es.js";
23
- import { I as rn } from "./chunks/InfoMessage.es.js";
24
- import { M as ln, a as cn } from "./chunks/Menu.es.js";
25
- import { D as dn } from "./chunks/DetailsDialog.es.js";
26
- import { u as un } from "./chunks/VersionUploadContext.es.js";
27
- import { p as pn } from "./chunks/pluralize.es.js";
28
- import { c as mn } from "./chunks/copyToClipboard.es.js";
29
- import { a as hn } from "./chunks/ProjectFoldersContext.es.js";
30
- import { F as gn, a as fn } from "./chunks/Feed.es.js";
31
- import { l as bn, e as vn } from "./chunks/MetaWidget.es.js";
22
+ import { P as sn } from "./chunks/PlayableIcon.es.js";
23
+ import { R as an } from "./chunks/RepresentationsList.es.js";
24
+ import { I as on } from "./chunks/InfoMessage.es.js";
25
+ import { M as rn, a as ln } from "./chunks/Menu.es.js";
26
+ import { D as cn } from "./chunks/DetailsDialog.es.js";
27
+ import { u as dn } from "./chunks/VersionUploadContext.es.js";
28
+ import { p as un } from "./chunks/pluralize.es.js";
29
+ import { c as pn } from "./chunks/copyToClipboard.es.js";
30
+ import { a as mn } from "./chunks/ProjectFoldersContext.es.js";
31
+ import { F as hn } from "./chunks/Feed.es.js";
32
+ import { a as Je, A as gn, C as fn } from "./chunks/ThumbnailSimple.es.js";
33
+ import { j as bn, d as vn } from "./chunks/MetaWidget.es.js";
32
34
  import { t as yn, c as kn } from "./chunks/queryFilterToClientFilter.es.js";
33
35
  import { u as wn } from "./chunks/useDateRangeFilter.es.js";
34
- import { C as xn } from "./chunks/ThumbnailSimple.es.js";
36
+ import { e as xn } from "./chunks/expandRelativeDates.es.js";
35
37
  import "./chunks/useLocalStorage.es.js";
36
38
  import "@module-federation/enhanced/runtime";
37
39
  import "semver";
@@ -91,20 +93,20 @@ const Tn = S(Me)`
91
93
  padding: 0px;
92
94
  box-shadow: -2px 0 6px #00000047;
93
95
  z-index: 300;
94
- `, In = S(Me)`
96
+ `, Pn = S(Me)`
95
97
  border-radius: 8px 8px 0 0;
96
98
  gap: var(--base-gap-small) !important;
97
99
  position: relative;
98
100
  z-index: 100;
99
101
  grid-column: span 2;
100
- `, Pn = ["product", "representation"], En = ["task"], Fn = ({
102
+ `, In = ["product", "representation"], En = ["task"], Fn = ({
101
103
  entityType: e,
102
104
  currentTab: n,
103
105
  onTabChange: t,
104
106
  isLoading: o
105
107
  }) => {
106
- const s = !Pn.includes(e), a = En.includes(e);
107
- return /* @__PURE__ */ k(In, { className: o ? "loading" : "", children: [
108
+ const s = !In.includes(e), a = En.includes(e);
109
+ return /* @__PURE__ */ k(Pn, { className: o ? "loading" : "", children: [
108
110
  s && /* @__PURE__ */ i(
109
111
  X,
110
112
  {
@@ -271,10 +273,10 @@ const Tn = S(Me)`
271
273
  thumbnailInputRef: A,
272
274
  versionsInputRef: R
273
275
  }) => {
274
- const { useSearchParams: E, useNavigate: l, bundleMode: d } = G(), h = l(), [C, j] = E(), T = Y(null), v = I(() => Ye(g), [g]), w = Pt(
276
+ const { useSearchParams: E, useNavigate: l, bundleMode: d } = G(), h = l(), [C, j] = E(), T = Y(null), v = P(() => Ye(g), [g]), w = It(
275
277
  t.map((m) => m.projectName),
276
278
  [e]
277
- ), O = I(() => e === "task" ? we(...t.map((m) => m.task?.assignees || [])) : e === "version" ? we(
279
+ ), O = P(() => e === "task" ? we(...t.map((m) => m.task?.assignees || [])) : e === "version" ? we(
278
280
  ...t.map((m) => {
279
281
  const D = m.version?.author;
280
282
  return Array.isArray(D) ? D : D ? [D] : [];
@@ -299,10 +301,10 @@ const Tn = S(Me)`
299
301
  });
300
302
  const Z = t.length > 1 ? void 0 : U?.projectName;
301
303
  t.filter((m) => m.projectName === U?.projectName && m.id).map((m) => m.id);
302
- const { data: ee } = St({ attributeName: "priority" }), te = Xt(ee, e), ne = I(
304
+ const { data: ee } = St({ attributeName: "priority" }), te = Xt(ee, e), ne = P(
303
305
  () => Xe(t, e, v),
304
306
  [t, e, v]
305
- ), P = I(() => t.map((m) => m.status), [t]), se = I(() => t.map((m) => m.attrib?.priority), [t]), ie = I(() => t.map((m) => m.tags), [t]), le = I(
307
+ ), I = P(() => t.map((m) => m.status), [t]), se = P(() => t.map((m) => m.attrib?.priority), [t]), ie = P(() => t.map((m) => m.tags), [t]), le = P(
306
308
  () => r.reduce((m, D) => (m[D.name] = D, m), {}),
307
309
  [r]
308
310
  ), Q = t.length > 1, re = !Q && !!U?.hasReviewables, L = ne.length === 1, { updateEntity: V } = Et({
@@ -326,7 +328,7 @@ const Tn = S(Me)`
326
328
  const m = s.map((H) => H.name), D = O.filter((H) => !m.includes(H));
327
329
  D.length && de.push(...D.map((H) => ({ name: H, fullName: H })));
328
330
  }
329
- const { title: N, subTitle: me } = Ze(t, e), he = w?.length !== 0 && w?.find((m) => m.name === P[0]);
331
+ const { title: N, subTitle: me } = Ze(t, e), he = w?.length !== 0 && w?.find((m) => m.name === I[0]);
330
332
  return /* @__PURE__ */ i(Ft, { children: /* @__PURE__ */ i(
331
333
  Ht,
332
334
  {
@@ -397,7 +399,7 @@ const Tn = S(Me)`
397
399
  /* @__PURE__ */ i(
398
400
  Vt,
399
401
  {
400
- value: P,
402
+ value: I,
401
403
  options: w || [],
402
404
  disabledValues: a,
403
405
  invert: !0,
@@ -502,7 +504,7 @@ const Tn = S(Me)`
502
504
  ] }),
503
505
  /* @__PURE__ */ k(Ve, { children: [
504
506
  /* @__PURE__ */ i("h4", { children: "Representations" }),
505
- /* @__PURE__ */ i(on, { entities: e })
507
+ /* @__PURE__ */ i(an, { entities: e })
506
508
  ] })
507
509
  ] });
508
510
  }, Ln = (e) => {
@@ -515,7 +517,7 @@ const Tn = S(Me)`
515
517
  }) => {
516
518
  const t = n?.(e.id);
517
519
  return /* @__PURE__ */ i(
518
- rn,
520
+ on,
519
521
  {
520
522
  variant: "info",
521
523
  compact: !0,
@@ -530,7 +532,7 @@ const Tn = S(Me)`
530
532
  }
531
533
  );
532
534
  }, _n = () => ({
533
- onOpenVersionUpload: un()?.onOpenVersionUpload ?? null
535
+ onOpenVersionUpload: dn()?.onOpenVersionUpload ?? null
534
536
  }), Mn = (e, n, t) => {
535
537
  const o = e === "folder" || e === "task" ? "overview" : e === "product" || e === "version" || e === "representation" ? "products" : null;
536
538
  return o ? `${typeof window < "u" ? window.location.origin : ""}/projects/${t}/${o}?project=${t}&type=${e}&id=${n}` : null;
@@ -554,12 +556,12 @@ const Tn = S(Me)`
554
556
  onViewData: E,
555
557
  onDelete: l
556
558
  }) => {
557
- const d = I(() => o.length ? o.filter((h) => !!h?.entityId).map((h) => ({
559
+ const d = P(() => o.length ? o.filter((h) => !!h?.entityId).map((h) => ({
558
560
  entityId: h.entityId,
559
561
  entityType: h.entityType || e,
560
562
  hasReviewables: h.hasReviewables
561
563
  })) : n ? [{ entityId: n, entityType: e }] : [], [o, n, e]);
562
- return I(() => {
564
+ return P(() => {
563
565
  const h = [];
564
566
  if (p && h.push({
565
567
  id: "open-in-viewer",
@@ -616,7 +618,7 @@ const Tn = S(Me)`
616
618
  icon: "database",
617
619
  onClick: E
618
620
  }), b && s.length > 0) {
619
- const T = new Set(s.map((O) => O.entityType)), v = T.size === 1 ? [...T][0] : "item", w = s.length === 1 ? `Delete ${v}` : `Delete ${pn(s.length, v)}`;
621
+ const T = new Set(s.map((O) => O.entityType)), v = T.size === 1 ? [...T][0] : "item", w = s.length === 1 ? `Delete ${v}` : `Delete ${un(s.length, v)}`;
620
622
  h.push({
621
623
  id: "delete",
622
624
  label: w,
@@ -688,7 +690,7 @@ const Tn = S(Me)`
688
690
  `, Wn = ({ link: e, entityLabel: n, visible: t, onHide: o }) => {
689
691
  if (!t) return null;
690
692
  const s = `[${n}](${e})`, a = (r) => {
691
- mn(r, !0), o();
693
+ pn(r, !0), o();
692
694
  };
693
695
  return /* @__PURE__ */ i(ft, { isOpen: !0, onClose: o, size: "sm", header: "Share", children: /* @__PURE__ */ k(Bn, { children: [
694
696
  /* @__PURE__ */ k(Le, { children: [
@@ -734,12 +736,12 @@ const Tn = S(Me)`
734
736
  taskId: u,
735
737
  folderId: g
736
738
  }) => {
737
- const f = Y(null), [x, A] = K(!1), [R, E] = K(null), { menuOpen: l, toggleMenuOpen: d, setMenuOpen: h } = Zt(), { triggerThumbnailUpload: C, canUploadVersion: j } = kt(zt), { onOpenVersionUpload: T } = _n(), v = wt(), w = I(() => {
739
+ const f = Y(null), [x, A] = K(!1), [R, E] = K(null), { menuOpen: l, toggleMenuOpen: d, setMenuOpen: h } = en(), { triggerThumbnailUpload: C, canUploadVersion: j } = kt(zt), { onOpenVersionUpload: T } = _n(), v = wt(), w = P(() => {
738
740
  const L = n || t?.[0] || "noentity";
739
741
  return `details-more-menu-${v}-${L}-${s || "noproject"}`;
740
742
  }, [v, n, t, s]), O = l === w, U = !!n && !!s && !!C, _ = !!j && !!T, Z = () => {
741
743
  T?.({ productId: b, taskId: u, folderId: g });
742
- }, ee = n && s ? zn(e, n, s, b) : null, te = !!p && !!ee, ne = Gt(), P = I(() => (a.length ? a : n ? [{ entityId: n, entityType: e, projectName: s }] : []).map((V) => {
744
+ }, ee = n && s ? zn(e, n, s, b) : null, te = !!p && !!ee, ne = Gt(), I = P(() => (a.length ? a : n ? [{ entityId: n, entityType: e, projectName: s }] : []).map((V) => {
743
745
  const q = V.entityType || e, ce = V.projectName || s;
744
746
  return !Qt(q) || !V.entityId || !ce ? null : {
745
747
  id: V.entityId,
@@ -750,14 +752,14 @@ const Tn = S(Me)`
750
752
  folderId: V.folderId,
751
753
  parentId: V.parentId
752
754
  };
753
- }).filter((V) => V !== null), [a, n, e, s]), se = !!ne && P.length > 0, ie = () => {
754
- h(!1), ne?.deleteEntities(P);
755
+ }).filter((V) => V !== null), [a, n, e, s]), se = !!ne && I.length > 0, ie = () => {
756
+ h(!1), ne?.deleteEntities(I);
755
757
  }, { items: le } = Hn({
756
758
  entityType: e,
757
759
  entityId: n,
758
760
  projectName: s,
759
761
  selectedEntities: a,
760
- deleteEntities: P,
762
+ deleteEntities: I,
761
763
  canUploadThumbnail: U,
762
764
  canUploadVersion: _,
763
765
  canOpenPip: !!c,
@@ -785,9 +787,9 @@ const Tn = S(Me)`
785
787
  onClick: () => d(w)
786
788
  }
787
789
  ),
788
- /* @__PURE__ */ i(ln, { id: w, target: f.current, align: "right", children: /* @__PURE__ */ i(cn, { menu: le, onClose: () => h(!1) }) }),
790
+ /* @__PURE__ */ i(rn, { id: w, target: f.current, align: "right", children: /* @__PURE__ */ i(ln, { menu: le, onClose: () => h(!1) }) }),
789
791
  x && s && Q.length > 0 && /* @__PURE__ */ i(
790
- dn,
792
+ cn,
791
793
  {
792
794
  projectName: s,
793
795
  entityType: e,
@@ -838,24 +840,24 @@ const Tn = S(Me)`
838
840
  // @ts-expect-error - patch is not part of the query args
839
841
  { projectName: t, patch: ["id", "name", "label"] },
840
842
  { skip: !t || o }
841
- ), r = hn(
843
+ ), r = mn(
842
844
  { projectName: t || "", isLoading: o },
843
845
  a
844
846
  ), { data: c } = Tt(
845
847
  { productId: e.product?.id || "", projectName: t },
846
848
  { skip: n !== "version" || !e.product?.id }
847
- ), p = I(
849
+ ), p = P(
848
850
  () => c?.project.product?.versionList ? [...c.project.product?.versionList || []].sort((g, f) => g.name === "HERO" ? -1 : f.name === "HERO" ? 1 : f.name.localeCompare(g.name)).map((g) => ({
849
851
  type: "version",
850
852
  label: g.name,
851
853
  id: g.id
852
854
  })) : [],
853
855
  [c]
854
- ), b = I(
856
+ ), b = P(
855
857
  () => new Map(s.map((g) => [g.id, g])),
856
858
  [s]
857
859
  );
858
- return [I(
860
+ return [P(
859
861
  () => r ? [] : qn(e, b),
860
862
  [r, s, e]
861
863
  ), p];
@@ -889,8 +891,8 @@ const Tn = S(Me)`
889
891
  ...u,
890
892
  ...b,
891
893
  children: [
892
- /* @__PURE__ */ i(gn, { ...b, statuses: b.statuses }),
893
- /* @__PURE__ */ i(fn, {})
894
+ /* @__PURE__ */ i(hn, { ...b, statuses: b.statuses }),
895
+ /* @__PURE__ */ i(gn, {})
894
896
  ]
895
897
  }
896
898
  );
@@ -1305,7 +1307,7 @@ const Tn = S(Me)`
1305
1307
  doneCount: a = 0,
1306
1308
  onSearchTextChange: r
1307
1309
  }) => {
1308
- const c = I(
1310
+ const c = P(
1309
1311
  () => [
1310
1312
  {
1311
1313
  id: "isDone",
@@ -1349,7 +1351,7 @@ const Tn = S(Me)`
1349
1351
  // },
1350
1352
  ],
1351
1353
  [t]
1352
- ), p = I(() => is(e, c), [e, c]), [b, u] = K(p), g = Y(null), f = wn();
1354
+ ), p = P(() => is(e, c), [e, c]), [b, u] = K(p), g = Y(null), f = wn();
1353
1355
  W(() => {
1354
1356
  u(p);
1355
1357
  }, [JSON.stringify(p)]);
@@ -1363,7 +1365,7 @@ const Tn = S(Me)`
1363
1365
  };
1364
1366
  let E = "";
1365
1367
  s > 0 && (E = `${a}/${s}`);
1366
- const l = I(
1368
+ const l = P(
1367
1369
  () => [{ id: "isDone", label: E, tooltip: "Status" }],
1368
1370
  [E]
1369
1371
  );
@@ -1398,7 +1400,7 @@ const Tn = S(Me)`
1398
1400
  }
1399
1401
  ),
1400
1402
  /* @__PURE__ */ i(
1401
- xn,
1403
+ fn,
1402
1404
  {
1403
1405
  isOpen: !!f.customRangeFilterId,
1404
1406
  header: c.find((d) => d.id === f.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
@@ -1412,7 +1414,7 @@ const Tn = S(Me)`
1412
1414
  )
1413
1415
  ] });
1414
1416
  }, ds = ({ ...e }) => {
1415
- const [n, t] = K({}), [o, s] = K(""), [a, r] = K([]), { dispatch: c } = G(), { data: p = [] } = ze({ projectName: e.projectName }), b = e.subtasks?.length || 0, u = e.subtasks?.filter((f) => f.isDone).length || 0, g = I(() => {
1417
+ const [n, t] = K({}), [o, s] = K(""), [a, r] = K([]), { dispatch: c } = G(), { data: p = [] } = ze({ projectName: e.projectName }), b = e.subtasks?.length || 0, u = e.subtasks?.filter((f) => f.isDone).length || 0, g = P(() => {
1416
1418
  let f = n;
1417
1419
  if (o) {
1418
1420
  const x = { key: "search", operator: "like", value: o };
@@ -1422,7 +1424,7 @@ const Tn = S(Me)`
1422
1424
  operator: "and"
1423
1425
  };
1424
1426
  }
1425
- return an(f);
1427
+ return xn(f);
1426
1428
  }, [n, o]);
1427
1429
  return /* @__PURE__ */ k(Ne, { children: [
1428
1430
  /* @__PURE__ */ i(
@@ -1498,24 +1500,24 @@ const Tn = S(Me)`
1498
1500
  openPip: ee,
1499
1501
  user: te,
1500
1502
  isGuest: ne,
1501
- entities: P,
1503
+ entities: I,
1502
1504
  setEntities: se,
1503
1505
  slideOut: ie,
1504
1506
  useSearchParams: le,
1505
1507
  SubtasksManager: Q,
1506
1508
  useNavigate: re
1507
- } = G(), { currentTab: L, setTab: V, isFeed: q } = en(x), [ce, pe] = le(), de = Y(!1), N = P?.entityType ?? e, me = P?.entities ?? o, he = P?.entitySubTypes ?? n, m = P?.entities ? [] : t, D = P?.entities ? P.entities.map((y) => y.projectName) : u;
1509
+ } = G(), { currentTab: L, setTab: V, isFeed: q } = Zt(x), [ce, pe] = le(), de = Y(!1), N = I?.entityType ?? e, me = I?.entities ?? o, he = I?.entitySubTypes ?? n, m = I?.entities ? [] : t, D = I?.entities ? I.entities.map((y) => y.projectName) : u;
1508
1510
  W(() => {
1509
1511
  h && !de.current && (de.current = !0, h());
1510
1512
  }, []), W(() => {
1511
1513
  us.includes(N) && L !== "details" && V("details");
1512
1514
  }, [N, L, V]), W(() => {
1513
- o.length && P && se(null);
1514
- }, [o, P, se]);
1515
- const H = I(
1515
+ o.length && I && se(null);
1516
+ }, [o, I, se]);
1517
+ const H = P(
1516
1518
  () => nt(b, D),
1517
1519
  [b, D]
1518
- ), ot = I(() => Ye(H), [H]);
1520
+ ), ot = P(() => Ye(H), [H]);
1519
1521
  W(() => {
1520
1522
  L === "files" && N !== "version" && V("feed"), L === "subtasks" && N !== "task" && V("feed");
1521
1523
  }, [N, L, x]);
@@ -1540,17 +1542,17 @@ const Tn = S(Me)`
1540
1542
  }, [rt, g]);
1541
1543
  const be = Y(null);
1542
1544
  W(() => {
1543
- P || (be.current = null);
1544
- }, [P]), W(() => {
1545
- if (!ae && (P?.source === "uri" || P?.source === "url") && P?.entities?.length && C) {
1546
- const y = P.entities[0].id;
1545
+ I || (be.current = null);
1546
+ }, [I]), W(() => {
1547
+ if (!ae && (I?.source === "uri" || I?.source === "url") && I?.entities?.length && C) {
1548
+ const y = I.entities[0].id;
1547
1549
  if (be.current === y) return;
1548
1550
  const F = $.find((B) => B.id === y);
1549
1551
  if (!F) return;
1550
- be.current = y, C(F, P.source);
1552
+ be.current = y, C(F, I.source);
1551
1553
  }
1552
- }, [$, ae, P, C]);
1553
- const Ie = et(b), z = D[0], Pe = b[z] || {}, M = $[0] || {}, ge = $[$.length - 1], ve = D[D.length - 1], Ee = x === "inbox" && N === "version" && $.length === 1 ? Ln($[0]) : void 0, [Fe, lt] = Kn({
1554
+ }, [$, ae, I, C]);
1555
+ const Pe = et(b), z = D[0], Ie = b[z] || {}, M = $[0] || {}, ge = $[$.length - 1], ve = D[D.length - 1], Ee = x === "inbox" && N === "version" && $.length === 1 ? Ln($[0]) : void 0, [Fe, lt] = Kn({
1554
1556
  entity: M,
1555
1557
  entityType: N,
1556
1558
  projectName: z,
@@ -1599,7 +1601,7 @@ const Tn = S(Me)`
1599
1601
  };
1600
1602
  return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
1601
1603
  }, [ye, g, ie]);
1602
- const { requestPipWindow: ut } = qt(), Ae = Y(null), Oe = Y(null), pt = $.length === 1 && N !== "representation", mt = I(() => {
1604
+ const { requestPipWindow: ut } = qt(), Ae = Y(null), Oe = Y(null), pt = $.length === 1 && N !== "representation", mt = P(() => {
1603
1605
  const y = M?.label || M?.name || "", F = M?.parents || [], B = [z];
1604
1606
  switch (N) {
1605
1607
  case "folder":
@@ -1733,11 +1735,11 @@ const Tn = S(Me)`
1733
1735
  entityType: N,
1734
1736
  entities: $,
1735
1737
  activeUsers: p || [],
1736
- projectInfo: Pe,
1738
+ projectInfo: Ie,
1737
1739
  projectName: z,
1738
1740
  disabled: !Re(),
1739
1741
  scope: x,
1740
- statuses: Ie,
1742
+ statuses: Pe,
1741
1743
  readOnly: !1,
1742
1744
  entityListId: w,
1743
1745
  annotations: j,
@@ -1773,11 +1775,11 @@ const Tn = S(Me)`
1773
1775
  entityType: N,
1774
1776
  entities: $,
1775
1777
  activeUsers: p || [],
1776
- projectInfo: Pe,
1778
+ projectInfo: Ie,
1777
1779
  projectName: z,
1778
1780
  disabled: !Re(),
1779
1781
  scope: x,
1780
- statuses: Ie,
1782
+ statuses: Pe,
1781
1783
  readOnly: !1,
1782
1784
  annotations: j,
1783
1785
  removeAnnotation: T,
@@ -1820,7 +1822,7 @@ to {
1820
1822
  max-width: 533px;
1821
1823
 
1822
1824
  animation: ${hs} 0.2s ease forwards;
1823
- `, ba = ({ projectsInfo: e, scope: n }) => {
1825
+ `, ya = ({ projectsInfo: e, scope: n }) => {
1824
1826
  const { slideOut: t, onOpenViewer: o } = G(), { entityType: s, entityId: a, projectName: r } = t || {}, c = !!s && !!a && !!r, { data: p } = ze({ projectName: r }, { skip: !r }), b = e[r || ""] || {}, { tags: u = [] } = b, { closeSlideOut: g } = G(), f = () => g(), x = (A) => o?.(A);
1825
1827
  return c ? /* @__PURE__ */ i(gs, { children: /* @__PURE__ */ i(
1826
1828
  ms,
@@ -1938,13 +1940,13 @@ const fs = S.div`
1938
1940
  .icon {
1939
1941
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 300, 'opsz' 20;
1940
1942
  }
1941
- `, va = () => {
1942
- const { pip: e } = G(), n = e?.entityType, t = e?.entities || [], o = e?.scope || "", s = t.length > 0 && !!n, a = t.map((v) => v.projectName), { data: r = [] } = Dt({ projects: a }, { skip: !s }), { data: c = {}, isFetching: p } = It(
1943
+ `, ka = () => {
1944
+ const { pip: e } = G(), n = e?.entityType, t = e?.entities || [], o = e?.scope || "", s = t.length > 0 && !!n, a = t.map((v) => v.projectName), { data: r = [] } = Dt({ projects: a }, { skip: !s }), { data: c = {}, isFetching: p } = Pt(
1943
1945
  {
1944
1946
  projects: a
1945
1947
  },
1946
1948
  { skip: !s }
1947
- ), b = I(
1949
+ ), b = P(
1948
1950
  () => et(c, a),
1949
1951
  [c, a]
1950
1952
  ), { data: u = [], isFetching: g } = Ge(
@@ -1953,20 +1955,20 @@ const fs = S.div`
1953
1955
  {
1954
1956
  skip: !s || p
1955
1957
  }
1956
- ), f = I(
1958
+ ), f = P(
1957
1959
  () => nt(c, a),
1958
1960
  [c, a]
1959
- ), x = I(
1961
+ ), x = P(
1960
1962
  () => ({
1961
1963
  task: f.taskTypes.filter((v) => !!v.icon).reduce((v, w) => ({ ...v, [w.name]: w.icon }), {}),
1962
1964
  folder: f.folderTypes.filter((v) => !!v.icon).reduce((v, w) => ({ ...v, [w.name]: w.icon }), {}),
1963
1965
  product: f.productTypes.filter((v) => !!v.icon).reduce((v, w) => ({ ...v, [w.name]: w.icon }), {})
1964
1966
  }),
1965
1967
  [f]
1966
- ), A = I(
1968
+ ), A = P(
1967
1969
  () => n ? Xe(u, n, x) : [],
1968
1970
  [u, n]
1969
- ), R = I(() => r.filter((v) => u.some((w) => w?.task?.assignees?.includes(v.name))).map((v) => ({ ...v, avatarUrl: `/api/users/${v.name}/avatar` })), [r, t]), E = u[0];
1971
+ ), R = P(() => r.filter((v) => u.some((w) => w?.task?.assignees?.includes(v.name))).map((v) => ({ ...v, avatarUrl: `/api/users/${v.name}/avatar` })), [r, t]), E = u[0];
1970
1972
  if (!u.length || !E) return null;
1971
1973
  if (g) return /* @__PURE__ */ i("div", { children: "Loading..." });
1972
1974
  const l = E?.projectName, C = u.some((v) => v?.status !== E?.status) ? {
@@ -2029,21 +2031,21 @@ const fs = S.div`
2029
2031
  };
2030
2032
  export {
2031
2033
  Lt as AssigneeSelect,
2032
- wa as CloseButton,
2034
+ Sa as CloseButton,
2033
2035
  Ot as Content,
2034
- xa as ContentRow,
2036
+ Ca as ContentRow,
2035
2037
  ms as DetailsPanel,
2036
- va as DetailsPanelFloating,
2037
- ba as DetailsPanelSlideOut,
2038
- Sa as Footer,
2038
+ ka as DetailsPanelFloating,
2039
+ ya as DetailsPanelSlideOut,
2040
+ Ta as Footer,
2039
2041
  jt as Grid,
2040
2042
  At as Header,
2041
2043
  Ft as HeaderContainer,
2042
- Ca as LabelWrapper,
2044
+ Na as LabelWrapper,
2043
2045
  $t as PriorityEnumDropdown,
2044
2046
  Vt as StatusSelect,
2045
2047
  Ut as TagsSelect,
2046
- Ta as ThumbnailWrapper,
2048
+ Da as ThumbnailWrapper,
2047
2049
  Rt as Title,
2048
2050
  us as entitiesWithoutFeed
2049
2051
  };
package/dist/Feed.es.js CHANGED
@@ -1,13 +1,13 @@
1
- import { A as D, a as I, C as M, b as P, F as K, c as L, d as N, e as k, i as j, f as O } from "./chunks/Feed.es.js";
2
- import { F as S, a as U, u as W } from "./chunks/PlayableIcon.es.js";
3
- import { useMemo as x, useCallback as E } from "react";
1
+ import { A as D, F as I, a as M, u as P } from "./chunks/ThumbnailSimple.es.js";
2
+ import { A as L, C as N, a as k, F as j, b as O, c as R, e as S, i as U, d as W } from "./chunks/Feed.es.js";
3
+ import { useMemo as x, useCallback as A } from "react";
4
4
  const y = (t) => {
5
5
  const e = Array.from(t).find((s) => s.startsWith("id-"));
6
6
  return e ? e.split("-")[1] : null;
7
- }, F = (t, e, s, c, u) => {
7
+ }, E = (t, e, s, c, u) => {
8
8
  const i = Object.keys(t);
9
9
  return e = [.../* @__PURE__ */ new Set([...e, ...i])], e = s.filter((r) => e.includes(r)), i.includes(c) && (u === 1 ? e.shift() : e.pop()), e;
10
- }, A = ({
10
+ }, w = ({
11
11
  tableRef: t,
12
12
  treeData: e,
13
13
  selection: s,
@@ -21,7 +21,7 @@ const y = (t) => {
21
21
  o && r.push(o);
22
22
  }), r;
23
23
  }, [t.current, e]);
24
- return E(
24
+ return A(
25
25
  (r) => {
26
26
  const { key: a, target: o, shiftKey: m } = r;
27
27
  if (o.tagName === "TR" && (a === "ArrowDown" || a === "ArrowUp")) {
@@ -30,7 +30,7 @@ const y = (t) => {
30
30
  const n = y(f.classList);
31
31
  if (!n && n !== "undefined") return;
32
32
  let l = [n];
33
- m && u && (l = F(s, l, i, n, d));
33
+ m && u && (l = E(s, l, i, n, d));
34
34
  const g = l, v = l.reduce((p, C) => (p[C] = !0, p), {});
35
35
  c({ array: g, object: v });
36
36
  }
@@ -39,20 +39,20 @@ const y = (t) => {
39
39
  );
40
40
  };
41
41
  export {
42
- D as ActivityCategorySelect,
43
- I as ActivityReferenceTooltip,
44
- M as CategoryDropdownItem,
45
- P as CategoryTag,
46
- S as FEED_NEW_COMMENT,
47
- K as Feed,
48
- U as FeedProvider,
49
- L as FileUploadPreview,
50
- N as activitiesLast,
51
- k as expandableMimeTypes,
42
+ L as ActivityCategorySelect,
43
+ D as ActivityReferenceTooltip,
44
+ N as CategoryDropdownItem,
45
+ k as CategoryTag,
46
+ I as FEED_NEW_COMMENT,
47
+ j as Feed,
48
+ M as FeedProvider,
49
+ O as FileUploadPreview,
50
+ R as activitiesLast,
51
+ S as expandableMimeTypes,
52
52
  y as extractIdFromClassList,
53
- F as getMultiSelection,
54
- j as isCategoryHidden,
55
- O as isFilePreviewable,
56
- W as useFeedContext,
57
- A as useTableKeyboardNavigation
53
+ E as getMultiSelection,
54
+ U as isCategoryHidden,
55
+ W as isFilePreviewable,
56
+ P as useFeedContext,
57
+ w as useTableKeyboardNavigation
58
58
  };