@ynput/ayon-frontend-shared 0.6.8 → 0.7.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 (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. package/dist/chunks/MenuItem.es.js +0 -420
package/dist/Feed.es.js CHANGED
@@ -1,18 +1,19 @@
1
1
  import { A as lt, F as dt, u as ut } from "./chunks/ThumbnailSimple.es.js";
2
2
  import { jsxs as V, jsx as A } from "react/jsx-runtime";
3
3
  import { useRef as X, useEffect as _, useMemo as j, useCallback as G } from "react";
4
- import T from "clsx";
4
+ import N from "clsx";
5
5
  import { Icon as z } from "@ynput/ayon-react-components";
6
6
  import { e as J, D as Q, S as Y } from "./chunks/Feed.es.js";
7
- import { A as vt, C as gt, a as yt, F as mt, b as pt, c as ht, d as xt, i as It, f as bt } from "./chunks/Feed.es.js";
7
+ import { A as gt, C as vt, a as mt, b as yt, F as pt, c as ht, d as xt, f as It, i as bt, g as At, r as wt } from "./chunks/Feed.es.js";
8
+ import { b as Et, c as Dt, i as Tt } from "./chunks/PlayableIcon.es.js";
8
9
  const Z = ({ files: c, index: t, activityId: s, onNavigate: e }) => {
9
- const n = c, o = t, u = s, l = () => n[0].id != u, a = () => n[n.length - 1].id != u, r = () => o > 0 || l(), I = () => o < n.find((i) => i.id == u).files.length - 1 || a(), g = () => n[n.findIndex((i) => i.id == u) - 1], m = () => n[n.findIndex((i) => i.id == u) + 1], f = () => g().id, d = () => m().id;
10
+ const n = c, o = t, u = s, l = () => n[0].id != u, a = () => n[n.length - 1].id != u, r = () => o > 0 || l(), I = () => o < n.find((i) => i.id == u).files.length - 1 || a(), v = () => n[n.findIndex((i) => i.id == u) - 1], y = () => n[n.findIndex((i) => i.id == u) + 1], f = () => v().id, d = () => y().id;
10
11
  return {
11
12
  canNavigateDown: a,
12
13
  canNavigateUp: l,
13
14
  canNavigateLeft: r,
14
15
  canNavigateRight: I,
15
- getPreviousActivity: g,
16
+ getPreviousActivity: v,
16
17
  getNextActivityId: d,
17
18
  getByIndexActivity: (i, h) => !i === null || h == null ? { id: null, projectName: null, mime: null, extension: null } : n.find((x) => x.id == i).files[h],
18
19
  navigateUp: () => {
@@ -22,7 +23,7 @@ const Z = ({ files: c, index: t, activityId: s, onNavigate: e }) => {
22
23
  navigateLeft: () => {
23
24
  if (o > 0)
24
25
  return e({ delta: -1 });
25
- const i = g();
26
+ const i = v();
26
27
  e({
27
28
  activityId: i.id,
28
29
  index: i.files.length - 1
@@ -48,82 +49,82 @@ const Z = ({ files: c, index: t, activityId: s, onNavigate: e }) => {
48
49
  canNavigateLeft: a,
49
50
  canNavigateRight: r,
50
51
  getByIndexActivity: I,
51
- navigateUp: g,
52
- navigateDown: m,
52
+ navigateUp: v,
53
+ navigateDown: y,
53
54
  navigateLeft: f,
54
55
  navigateRight: d
55
- } = Z({ files: c, index: t, activityId: s, onNavigate: o }), p = { ...I(s, t), projectName: e }, { id: v, mime: b, extension: w, name: P } = p, i = X(null);
56
+ } = Z({ files: c, index: t, activityId: s, onNavigate: o }), p = { ...I(s, t), projectName: e }, { id: g, mime: b, extension: w, name: k } = p, i = X(null);
56
57
  _(() => {
57
- v && e && i.current?.focus();
58
- }, [v, e]);
58
+ g && e && i.current?.focus();
59
+ }, [g, e]);
59
60
  const h = () => {
60
61
  n();
61
- }, k = Object.values(J).find(
62
- ({ mimeTypes: L }) => L.some((N) => (b || w)?.includes(N))
63
- ), { component: x, id: R, callback: C, fullPreviews: B } = k || {};
62
+ }, P = Object.values(J).find(
63
+ ({ mimeTypes: L }) => L.some((T) => (b || w)?.includes(T))
64
+ ), { component: x, id: R, callback: C, fullPreviews: O } = P || {};
64
65
  if (_(() => {
65
- if (!v || !e || !x || C) return;
66
+ if (!g || !e || !x || C) return;
66
67
  const L = {
67
- ArrowUp: [l, g],
68
- ArrowDown: [u, m],
68
+ ArrowUp: [l, v],
69
+ ArrowDown: [u, y],
69
70
  ArrowLeft: [a, f],
70
71
  ArrowRight: [r, d]
71
- }, N = (y) => {
72
- if (y.key === "Escape") {
73
- y.preventDefault(), y.stopPropagation(), h();
72
+ }, T = (m) => {
73
+ if (m.key === "Escape") {
74
+ m.preventDefault(), m.stopPropagation(), h();
74
75
  return;
75
76
  }
76
- const U = L[y.code];
77
- if (!U) return;
78
- if (y.target instanceof HTMLElement) {
79
- const { tagName: M, isContentEditable: q } = y.target;
80
- if (M === "INPUT" || M === "TEXTAREA" || q) return;
77
+ const M = L[m.code];
78
+ if (!M) return;
79
+ if (m.target instanceof HTMLElement) {
80
+ const { tagName: U, isContentEditable: H } = m.target;
81
+ if (U === "INPUT" || U === "TEXTAREA" || H) return;
81
82
  }
82
- y.preventDefault(), y.stopPropagation();
83
- const [W, H] = U;
84
- W() && H();
83
+ m.preventDefault(), m.stopPropagation();
84
+ const [W, q] = M;
85
+ W() && q();
85
86
  };
86
- return document.addEventListener("keydown", N, !0), () => document.removeEventListener("keydown", N, !0);
87
- }, [v, e, c, t, s, x, C]), !v || !e) return null;
87
+ return document.addEventListener("keydown", T, !0), () => document.removeEventListener("keydown", T, !0);
88
+ }, [g, e, c, t, s, x, C]), !g || !e) return null;
88
89
  if (C)
89
90
  return C(p), null;
90
- const O = () => a() && f(), S = () => r() && d(), D = R === "image", F = R === "video", E = 50;
91
+ const S = () => a() && f(), B = () => r() && d(), E = R === "image", F = R === "video", D = 50;
91
92
  return x ? /* @__PURE__ */ V(
92
93
  Q,
93
94
  {
94
95
  size: "full",
95
- isOpen: !!(v && e),
96
+ isOpen: !!(g && e),
96
97
  onClose: h,
97
- hideCancelButton: D,
98
+ hideCancelButton: E,
98
99
  ref: i,
99
- className: T({ isImage: D }, "block-shortcuts"),
100
- header: D ? null : P,
100
+ className: N({ isImage: E }, "block-shortcuts"),
101
+ header: E ? null : k,
101
102
  children: [
102
- /* @__PURE__ */ A("div", { style: { position: "absolute", inset: 0, zIndex: E }, onClick: h }),
103
+ /* @__PURE__ */ A("div", { style: { position: "absolute", inset: 0, zIndex: D }, onClick: h }),
103
104
  /* @__PURE__ */ A(
104
105
  z,
105
106
  {
106
- style: { zIndex: E + 1 },
107
+ style: { zIndex: D + 1 },
107
108
  icon: "chevron_left",
108
- className: T("navIcon", "left", { disabled: !a() }),
109
- onClick: O
109
+ className: N("navIcon", "left", { disabled: !a() }),
110
+ onClick: S
110
111
  }
111
112
  ),
112
113
  /* @__PURE__ */ A(
113
114
  Y,
114
115
  {
115
- style: { zIndex: E + 1 },
116
- className: T({ scrollable: !D && !F, fill: F }),
117
- children: /* @__PURE__ */ A(x, { file: p, fullPreviews: B })
116
+ style: { zIndex: D + 1 },
117
+ className: N({ scrollable: !E && !F, fill: F }),
118
+ children: /* @__PURE__ */ A(x, { file: p, fullPreviews: O })
118
119
  }
119
120
  ),
120
121
  /* @__PURE__ */ A(
121
122
  z,
122
123
  {
123
- style: { zIndex: E + 1 },
124
+ style: { zIndex: D + 1 },
124
125
  icon: "chevron_right",
125
- className: T("navIcon", "right", { disabled: !r() }),
126
- onClick: S
126
+ className: N("navIcon", "right", { disabled: !r() }),
127
+ onClick: B
127
128
  }
128
129
  )
129
130
  ]
@@ -153,35 +154,40 @@ const Z = ({ files: c, index: t, activityId: s, onNavigate: e }) => {
153
154
  (l) => {
154
155
  const { key: a, target: r, shiftKey: I } = l;
155
156
  if (r.tagName === "TR" && (a === "ArrowDown" || a === "ArrowUp")) {
156
- const g = a === "ArrowDown" ? 1 : -1, m = g === 1 ? r.nextElementSibling : r.previousElementSibling;
157
- if (!m) return;
158
- const f = K(m.classList);
157
+ const v = a === "ArrowDown" ? 1 : -1, y = v === 1 ? r.nextElementSibling : r.previousElementSibling;
158
+ if (!y) return;
159
+ const f = K(y.classList);
159
160
  if (!f && f !== "undefined") return;
160
161
  let d = [f];
161
- I && n && (d = $(s, d, o, f, g));
162
- const p = d, v = d.reduce((b, w) => (b[w] = !0, b), {});
163
- e({ array: p, object: v });
162
+ I && n && (d = $(s, d, o, f, v));
163
+ const p = d, g = d.reduce((b, w) => (b[w] = !0, b), {});
164
+ e({ array: p, object: g });
164
165
  }
165
166
  },
166
167
  [o, s]
167
168
  );
168
169
  };
169
170
  export {
170
- vt as ActivityCategorySelect,
171
+ gt as ActivityCategorySelect,
171
172
  lt as ActivityReferenceTooltip,
172
- gt as CategoryDropdownItem,
173
+ vt as COMMENT_DIRECTIVES,
174
+ mt as CategoryDropdownItem,
173
175
  yt as CategoryTag,
174
- mt as FEED_NEW_COMMENT,
175
- pt as Feed,
176
+ pt as FEED_NEW_COMMENT,
177
+ ht as Feed,
176
178
  dt as FeedContext,
177
- ht as FeedProvider,
179
+ xt as FeedProvider,
178
180
  ot as FileUploadPreview,
179
- xt as activitiesLast,
181
+ It as activitiesLast,
182
+ Et as blockquoteTag,
183
+ Dt as codeTag,
180
184
  J as expandableMimeTypes,
181
185
  K as extractIdFromClassList,
182
186
  $ as getMultiSelection,
183
- It as isCategoryHidden,
184
- bt as isFilePreviewable,
187
+ Tt as inputTag,
188
+ bt as isCategoryHidden,
189
+ At as isFilePreviewable,
190
+ wt as remarkLiteralDirectives,
185
191
  ut as useFeedContext,
186
192
  at as useTableKeyboardNavigation
187
193
  };