@ynput/ayon-frontend-shared 0.7.5 → 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 (74) hide show
  1. package/dist/DetailsPanel.es.js +471 -469
  2. package/dist/Feed.es.js +1 -1
  3. package/dist/ListTable.es.js +20 -20
  4. package/dist/NewEntity.es.js +7 -7
  5. package/dist/ProjectTreeTable.es.js +2523 -2502
  6. package/dist/ProjectsTable.es.js +5 -5
  7. package/dist/Slicer.es.js +28 -25
  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 +4 -4
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +4 -5
  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 +482 -462
  18. package/dist/chunks/EntityTooltip.es.js +18 -19
  19. package/dist/chunks/Feed.es.js +1382 -1355
  20. package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
  21. package/dist/chunks/FilterErrorActions.es.js +3 -4
  22. package/dist/chunks/GroupSettingsFallback.es.js +4 -4
  23. package/dist/chunks/Menu.es.js +242 -240
  24. package/dist/chunks/MetaWidget.es.js +1948 -1875
  25. package/dist/chunks/ProjectFoldersContext.es.js +237 -0
  26. package/dist/chunks/RepresentationsList.es.js +1 -1
  27. package/dist/chunks/ReviewablesSelector.es.js +1260 -1190
  28. package/dist/chunks/SimpleTable.es.js +303 -297
  29. package/dist/chunks/Slicer.es.js +420 -413
  30. package/dist/chunks/TableExportContextInstance.es.js +622 -378
  31. package/dist/chunks/TableSettingsFallback.es.js +3 -4
  32. package/dist/chunks/ThumbnailSimple.es.js +114 -99
  33. package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
  34. package/dist/chunks/VideoPlayer.es.js +8 -9
  35. package/dist/chunks/Watchers.es.js +929 -872
  36. package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
  37. package/dist/chunks/expandRelativeDates.es.js +1 -1
  38. package/dist/chunks/getThumbnailUrl.es.js +33 -21
  39. package/dist/chunks/getUris.es.js +1580 -1610
  40. package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
  41. package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
  42. package/dist/chunks/searchTerms.es.js +773 -696
  43. package/dist/chunks/useAttributeEnums.es.js +22 -22
  44. package/dist/chunks/useDateRangeFilter.es.js +1 -1
  45. package/dist/chunks/useHierarchySelection.es.js +3 -4
  46. package/dist/chunks/useLoadModule.es.js +3 -4
  47. package/dist/components.es.js +1391 -1253
  48. package/dist/context.es.js +645 -668
  49. package/dist/hooks.es.js +193 -171
  50. package/dist/index.es.js +4 -4
  51. package/dist/types/Actions.d.ts +10 -8
  52. package/dist/types/DetailsPanel.d.ts +54 -76
  53. package/dist/types/EntityPickerDialog.d.ts +51 -2
  54. package/dist/types/Feed.d.ts +24 -24
  55. package/dist/types/ListTable.d.ts +33 -27
  56. package/dist/types/NewEntity.d.ts +26 -39
  57. package/dist/types/ProjectTreeTable.d.ts +318 -212
  58. package/dist/types/ProjectsTable.d.ts +6 -6
  59. package/dist/types/RepresentationsList.d.ts +4 -0
  60. package/dist/types/Slicer.d.ts +63 -246
  61. package/dist/types/Views.d.ts +71 -298
  62. package/dist/types/api.d.ts +3164 -2363
  63. package/dist/types/components.d.ts +537 -497
  64. package/dist/types/context.d.ts +293 -572
  65. package/dist/types/hooks.d.ts +76 -47
  66. package/dist/types/index.d.ts +6 -0
  67. package/dist/types/util.d.ts +141 -120
  68. package/dist/util.es.js +71 -68
  69. package/package.json +6 -6
  70. package/dist/chunks/EntityUpdatesContext.es.js +0 -61
  71. package/dist/chunks/PlayableIcon.es.js +0 -5020
  72. package/dist/chunks/ProjectContext.es.js +0 -158
  73. package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
  74. package/dist/chunks/viewUpdateHelper.es.js +0 -153
@@ -8,17 +8,16 @@ import "react-toastify";
8
8
  import "./searchTerms.es.js";
9
9
  import "./getUris.es.js";
10
10
  import "primereact/confirmdialog";
11
- import { b as c } from "./TableExportContextInstance.es.js";
12
11
  import "lodash";
13
12
  import "uuid";
14
13
  import "axios";
14
+ import { b as c } from "./TableExportContextInstance.es.js";
15
15
  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
- const D = ({
20
+ const C = ({
22
21
  requiredVersion: r,
23
22
  feature: t,
24
23
  button: i,
@@ -40,5 +39,5 @@ const D = ({
40
39
  ] });
41
40
  };
42
41
  export {
43
- D as T
42
+ C as T
44
43
  };
@@ -1,40 +1,39 @@
1
1
  import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
- import { createPortal as R } from "react-dom";
3
- import { createContext as z, useContext as L, useEffect as F } from "react";
4
- import { bH as $, a_ as j } from "./searchTerms.es.js";
5
- import { H as A } from "./getUris.es.js";
2
+ import { createPortal as L } from "react-dom";
3
+ import { createContext as $, useContext as A, useEffect as j } from "react";
4
+ import { bH as B, a_ as N } from "./searchTerms.es.js";
5
+ import { H as U } from "./getUris.es.js";
6
6
  import "primereact/confirmdialog";
7
7
  import "lodash";
8
- import { e as N } from "./expandRelativeDates.es.js";
8
+ import { e as O } from "./expandRelativeDates.es.js";
9
9
  import "@module-federation/enhanced/runtime";
10
10
  import "@ynput/ayon-addon/host";
11
11
  import "react-toastify";
12
- import { Icon as w, Dialog as B, FormRow as v, InputDate as x, SaveButton as U } from "@ynput/ayon-react-components";
13
- import "./TableExportContextInstance.es.js";
12
+ import { Icon as w, Dialog as K, FormRow as g, InputDate as x, SaveButton as P } from "@ynput/ayon-react-components";
14
13
  import "uuid";
15
14
  import "axios";
15
+ import "./TableExportContextInstance.es.js";
16
16
  import "semver";
17
17
  import "./ContextMenuContextInstance.es.js";
18
18
  import "clsx";
19
- import "react-redux";
20
19
  import "react-router-dom";
21
- import { U as O } from "./PlayableIcon.es.js";
22
- import p, { keyframes as K } from "styled-components";
23
- import { E as P } from "./EntityTooltip.es.js";
20
+ import { U as Y, F as D } from "./FilmstripEntityCard.es.js";
21
+ import p, { keyframes as H } from "styled-components";
22
+ import { E as q } from "./EntityTooltip.es.js";
24
23
  import { format as b, parse as k } from "date-fns";
25
- import { g as H } from "./getThumbnailUrl.es.js";
26
- const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
24
+ import { g as Q, a as W } from "./getThumbnailUrl.es.js";
25
+ const G = new Set(Object.keys(U).filter((e) => e !== "activity")), J = {
27
26
  has_attachments: "activity_data.files",
28
27
  // not `entity_type`: on inbox rows that column is always 'user'
29
28
  origin_type: "activity_data.origin.type"
30
- }, q = (e) => !!e && "key" in e, Q = (e) => {
31
- const o = D[e.key] ?? e.key;
29
+ }, V = (e) => !!e && "key" in e, X = (e) => {
30
+ const o = J[e.key] ?? e.key;
32
31
  if (e.key === "has_attachments")
33
32
  return e.value ? { key: o, operator: "ne", value: [] } : null;
34
33
  if (e.key === "in_review_session")
35
34
  return e.value ? { key: "activity_data.entityList", operator: "notnull" } : null;
36
35
  if (e.key === "category") {
37
- const t = Array.isArray(e.value) ? e.value : [], n = t.includes("__none__"), s = t.filter((a) => a !== "__none__"), l = {
36
+ const t = Array.isArray(e.value) ? e.value : [], n = t.includes("__none__"), s = t.filter((r) => r !== "__none__"), l = {
38
37
  operator: "or",
39
38
  conditions: [
40
39
  { key: "activity_data.category", operator: "isnull" },
@@ -47,37 +46,37 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
47
46
  };
48
47
  return n && s.length ? { operator: "or", conditions: [l, c] } : n ? l : s.length ? c : null;
49
48
  }
50
- return e.key === "body" && e.operator === "like" && typeof e.value == "string" ? $(e.value, (t) => ({ ...e, key: o, value: `%${t}%` })) : e.key === "author" ? {
49
+ return e.key === "body" && e.operator === "like" && typeof e.value == "string" ? B(e.value, (t) => ({ ...e, key: o, value: `%${t}%` })) : e.key === "author" ? {
51
50
  operator: "or",
52
51
  conditions: [
53
52
  { ...e, key: "activity_data.author" },
54
53
  { ...e, key: "activity_data.assignee" }
55
54
  ]
56
55
  } : { ...e, key: o };
57
- }, C = (e) => {
58
- if (q(e))
59
- return Y.has(e.key) ? null : Q(e);
60
- const o = (e.conditions || []).map((t) => C(t)).filter((t) => t !== null);
56
+ }, E = (e) => {
57
+ if (V(e))
58
+ return G.has(e.key) ? null : X(e);
59
+ const o = (e.conditions || []).map((t) => E(t)).filter((t) => t !== null);
61
60
  return o.length === 0 ? null : { operator: e.operator || "and", conditions: o };
62
- }, W = (e) => {
61
+ }, Z = (e) => {
63
62
  if (!e || !e.conditions?.length) return null;
64
- const o = N(e), t = C(o);
63
+ const o = O(e), t = E(o);
65
64
  return t || null;
66
- }, Ne = (e) => {
67
- const o = W(e);
65
+ }, Ke = (e) => {
66
+ const o = Z(e);
68
67
  if (o)
69
68
  return JSON.stringify(o);
70
- }, G = z(void 0), g = () => {
71
- const e = L(G);
69
+ }, ee = $(void 0), v = () => {
70
+ const e = A(ee);
72
71
  if (!e)
73
72
  throw new Error("useFeedContext must be used within a FeedProvider");
74
73
  return e;
75
- }, J = () => {
76
- const { refTooltip: e, setRefTooltip: o } = g();
74
+ }, te = () => {
75
+ const { refTooltip: e, setRefTooltip: o } = v();
77
76
  return [e, (n) => {
78
77
  n && n.id !== e?.id && o(n), n || o(null);
79
78
  }];
80
- }, V = p.span`
79
+ }, oe = p.span`
81
80
  display: flex;
82
81
  align-items: center;
83
82
  gap: var(--base-gap-large);
@@ -94,7 +93,7 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
94
93
  span {
95
94
  white-space: nowrap;
96
95
  }
97
- `, X = p.span`
96
+ `, ne = p.span`
98
97
  display: flex;
99
98
  flex-direction: column;
100
99
 
@@ -102,13 +101,13 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
102
101
  color: var(--md-sys-color-outline);
103
102
  font-size: 0.85em;
104
103
  }
105
- `, E = ({ name: e, fullName: o, showSubtitle: t, size: n = 24 }) => /* @__PURE__ */ m(V, { $size: n, children: [
106
- /* @__PURE__ */ i(O, { name: e, size: n }),
107
- t ? /* @__PURE__ */ m(X, { children: [
104
+ `, C = ({ name: e, fullName: o, showSubtitle: t, size: n = 24 }) => /* @__PURE__ */ m(oe, { $size: n, children: [
105
+ /* @__PURE__ */ i(Y, { name: e, size: n }),
106
+ t ? /* @__PURE__ */ m(ne, { children: [
108
107
  /* @__PURE__ */ i("span", { children: o || e }),
109
108
  o && /* @__PURE__ */ i("span", { className: "label", children: e })
110
109
  ] }) : /* @__PURE__ */ i("span", { children: o || e })
111
- ] }), Z = K`
110
+ ] }), ie = H`
112
111
  from {
113
112
  opacity: 0.4;
114
113
  scale: 0.9;
@@ -117,7 +116,7 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
117
116
  opacity: 1;
118
117
  scale: 1;
119
118
  }
120
- `, T = p.span`
119
+ `, M = p.span`
121
120
  display: flex;
122
121
  padding: 8px;
123
122
  gap: var(--base-gap-large);
@@ -141,14 +140,14 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
141
140
  }
142
141
  }
143
142
 
144
- animation: ${Z} 50ms ease-out;
143
+ animation: ${ie} 50ms ease-out;
145
144
  transform-origin: left bottom;
146
- `, ee = ({ name: e, label: o, pos: t }) => /* @__PURE__ */ i(T, { style: { ...t }, children: /* @__PURE__ */ i(E, { name: e || "", fullName: o, showSubtitle: !0, size: 32 }) }), te = p(T)`
145
+ `, re = ({ name: e, label: o, pos: t }) => /* @__PURE__ */ i(M, { style: { ...t }, children: /* @__PURE__ */ i(C, { name: e || "", fullName: o, showSubtitle: !0, size: 32 }) }), ae = p(M)`
147
146
  flex-direction: column;
148
147
  align-items: flex-start;
149
148
  gap: 8px;
150
149
  min-width: 180px;
151
- `, oe = p.span`
150
+ `, se = p.span`
152
151
  display: flex;
153
152
  align-items: center;
154
153
  gap: var(--base-gap-large);
@@ -156,7 +155,7 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
156
155
  .icon {
157
156
  font-size: 20px;
158
157
  }
159
- `, ne = p.span`
158
+ `, le = p.span`
160
159
  display: flex;
161
160
  flex-direction: column;
162
161
 
@@ -168,7 +167,7 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
168
167
  color: var(--md-sys-color-outline);
169
168
  font-size: 0.85em;
170
169
  }
171
- `, ie = p.ul`
170
+ `, ce = p.ul`
172
171
  list-style: none;
173
172
  margin: 0;
174
173
  padding: 0;
@@ -176,50 +175,50 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
176
175
  flex-direction: column;
177
176
  gap: 4px;
178
177
  width: 100%;
179
- `, re = p.li`
178
+ `, de = p.li`
180
179
  display: flex;
181
180
  align-items: center;
182
- `, ae = p.span`
181
+ `, pe = p.span`
183
182
  color: var(--md-sys-color-outline);
184
183
  font-size: 0.85em;
185
184
  padding-left: 32px;
186
- `, _ = 5, se = ({ name: e, pos: o }) => {
187
- const { projectName: t, users: n } = g(), { data: s = [] } = j.useGetTeamsQuery(
185
+ `, _ = 5, me = ({ name: e, pos: o }) => {
186
+ const { projectName: t, users: n } = v(), { data: s = [] } = N.useGetTeamsQuery(
188
187
  { projectName: t, showMembers: !0 },
189
188
  { skip: !t || !e }
190
- ), l = s.find((d) => d.name === e), c = l?.members ?? [], a = l?.memberCount ?? 0, r = c.slice(0, _), u = Math.max(0, a - _), f = new Map(n.map((d) => [d.name, d.attrib?.fullName || void 0]));
191
- return /* @__PURE__ */ m(te, { style: { ...o }, children: [
192
- /* @__PURE__ */ m(oe, { children: [
189
+ ), l = s.find((d) => d.name === e), c = l?.members ?? [], r = l?.memberCount ?? 0, a = c.slice(0, _), u = Math.max(0, r - _), f = new Map(n.map((d) => [d.name, d.attrib?.fullName || void 0]));
190
+ return /* @__PURE__ */ m(ae, { style: { ...o }, children: [
191
+ /* @__PURE__ */ m(se, { children: [
193
192
  /* @__PURE__ */ i(w, { icon: "group" }),
194
- /* @__PURE__ */ m(ne, { children: [
193
+ /* @__PURE__ */ m(le, { children: [
195
194
  /* @__PURE__ */ i("span", { children: e }),
196
195
  l && /* @__PURE__ */ m("span", { className: "label", children: [
197
- a,
196
+ r,
198
197
  " ",
199
- a === 1 ? "member" : "members"
198
+ r === 1 ? "member" : "members"
200
199
  ] })
201
200
  ] })
202
201
  ] }),
203
- r.length > 0 && /* @__PURE__ */ m(ie, { children: [
204
- r.map((d) => /* @__PURE__ */ i(re, { children: /* @__PURE__ */ i(
205
- E,
202
+ a.length > 0 && /* @__PURE__ */ m(ce, { children: [
203
+ a.map((d) => /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(
204
+ C,
206
205
  {
207
206
  name: d.name,
208
207
  fullName: f.get(d.name),
209
208
  size: 20
210
209
  }
211
210
  ) }, d.name)),
212
- u > 0 && /* @__PURE__ */ m(ae, { children: [
211
+ u > 0 && /* @__PURE__ */ m(pe, { children: [
213
212
  "+",
214
213
  u,
215
214
  " more"
216
215
  ] })
217
216
  ] })
218
217
  ] });
219
- }, le = ({ type: e, id: o, pos: t }) => {
220
- const { projectInfo: n, projectName: s } = g();
218
+ }, ue = ({ type: e, id: o, pos: t }) => {
219
+ const { projectInfo: n, projectName: s } = v();
221
220
  return /* @__PURE__ */ i(
222
- P,
221
+ q,
223
222
  {
224
223
  entityType: e,
225
224
  entityId: o,
@@ -228,27 +227,27 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
228
227
  pos: t
229
228
  }
230
229
  );
231
- }, Be = () => {
232
- const [e, o] = J(), { type: t, label: n, name: s, pos: l, id: c } = e || {}, a = document.querySelector(".feed ul");
233
- return F(() => {
230
+ }, Pe = () => {
231
+ const [e, o] = te(), { type: t, label: n, name: s, pos: l, id: c } = e || {}, r = document.querySelector(".feed ul");
232
+ return j(() => {
234
233
  if (c) {
235
- const r = (u) => {
236
- const f = u.target, d = CSS.escape(`ref-${c.replaceAll(".", "-")}`), y = f?.closest(`#${d}`), h = f?.closest("[data-mention-value], .reference");
237
- !y && !h && (o(null), document.removeEventListener("mouseover", r), a && a.removeEventListener("scroll", r));
234
+ const a = (u) => {
235
+ const f = u.target, d = CSS.escape(`ref-${c.replaceAll(".", "-")}`), h = f?.closest(`#${d}`), y = f?.closest("[data-mention-value], .reference");
236
+ !h && !y && (o(null), document.removeEventListener("mouseover", a), r && r.removeEventListener("scroll", a));
238
237
  };
239
- return document.addEventListener("mouseover", r), a && a.addEventListener("scroll", r), () => {
240
- document.removeEventListener("mouseover", r), a && a.removeEventListener("scroll", r);
238
+ return document.addEventListener("mouseover", a), r && r.addEventListener("scroll", a), () => {
239
+ document.removeEventListener("mouseover", a), r && r.removeEventListener("scroll", a);
241
240
  };
242
241
  }
243
- }, [c, o, a]), c ? R(
244
- t === "user" && l ? /* @__PURE__ */ i(ee, { name: s, label: n, pos: l }) : t === "team" && l ? /* @__PURE__ */ i(se, { name: s, pos: l }) : /* @__PURE__ */ i(le, { type: t, label: n, name: s, pos: l, id: c }),
242
+ }, [c, o, r]), c ? L(
243
+ t === "user" && l ? /* @__PURE__ */ i(re, { name: s, label: n, pos: l }) : t === "team" && l ? /* @__PURE__ */ i(me, { name: s, pos: l }) : /* @__PURE__ */ i(ue, { type: t, label: n, name: s, pos: l, id: c }),
245
244
  document.body
246
245
  ) : null;
247
- }, ce = p.div`
246
+ }, fe = p.div`
248
247
  display: flex;
249
248
  flex-direction: column;
250
249
  gap: 12px;
251
- `, Ue = ({
250
+ `, Ye = ({
252
251
  isOpen: e,
253
252
  header: o,
254
253
  startDate: t,
@@ -256,17 +255,17 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
256
255
  onStartDateChange: s,
257
256
  onEndDateChange: l,
258
257
  onApply: c,
259
- onClose: a
258
+ onClose: r
260
259
  }) => /* @__PURE__ */ i(
261
- B,
260
+ K,
262
261
  {
263
262
  isOpen: e,
264
- onClose: a,
263
+ onClose: r,
265
264
  header: o,
266
265
  size: "sm",
267
266
  hideCancelButton: !0,
268
267
  footer: /* @__PURE__ */ i(
269
- U,
268
+ P,
270
269
  {
271
270
  label: "Confirm",
272
271
  icon: "check",
@@ -274,26 +273,26 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
274
273
  active: !!t && !!n && n >= t
275
274
  }
276
275
  ),
277
- children: /* @__PURE__ */ m(ce, { children: [
278
- /* @__PURE__ */ i(v, { label: "Start date", children: /* @__PURE__ */ i(
276
+ children: /* @__PURE__ */ m(fe, { children: [
277
+ /* @__PURE__ */ i(g, { label: "Start date", children: /* @__PURE__ */ i(
279
278
  x,
280
279
  {
281
280
  selected: t ? k(t, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
282
- onChange: (r) => s(r ? b(r, "yyyy-MM-dd") : ""),
281
+ onChange: (a) => s(a ? b(a, "yyyy-MM-dd") : ""),
283
282
  autoFocus: !0
284
283
  }
285
284
  ) }),
286
- /* @__PURE__ */ i(v, { label: "End date", children: /* @__PURE__ */ i(
285
+ /* @__PURE__ */ i(g, { label: "End date", children: /* @__PURE__ */ i(
287
286
  x,
288
287
  {
289
288
  selected: n ? k(n, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
290
- onChange: (r) => l(r ? b(r, "yyyy-MM-dd") : ""),
289
+ onChange: (a) => l(a ? b(a, "yyyy-MM-dd") : ""),
291
290
  openToDate: t ? new Date(t) : void 0
292
291
  }
293
292
  ) })
294
293
  ] })
295
294
  }
296
- ), de = p.div`
295
+ ), ye = p.div`
297
296
  position: relative;
298
297
  width: 100%;
299
298
  max-width: 500px;
@@ -315,7 +314,13 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
315
314
  background-color: hsl(220 20% 8%);
316
315
  color: var(--md-sys-color-outline);
317
316
  }
318
- `, pe = p.img`
317
+
318
+ /* the hover-scrub filmstrip replaces the static image */
319
+ &[data-filmstrip-active] > img,
320
+ &[data-filmstrip-active] > span {
321
+ visibility: hidden;
322
+ }
323
+ `, he = p.img`
319
324
  width: 100%;
320
325
  height: 100%;
321
326
  object-fit: contain;
@@ -324,7 +329,7 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
324
329
  display: block;
325
330
  position: absolute;
326
331
  inset: 0;
327
- `, Oe = ({
332
+ `, De = ({
328
333
  projectName: e,
329
334
  entityType: o,
330
335
  entityId: t,
@@ -332,38 +337,48 @@ const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
332
337
  thumbnailHash: s,
333
338
  isLoading: l,
334
339
  className: c,
335
- disabled: a,
336
- src: r,
340
+ disabled: r,
341
+ src: a,
337
342
  onLoad: u,
338
343
  onError: f,
339
344
  iconOnly: d,
340
- ...y
345
+ filmstrip: h,
346
+ filmstripUrl: y,
347
+ filmstripFit: T = "contain",
348
+ ...S
341
349
  }) => {
342
- const h = H({
350
+ const F = Q({
343
351
  projectName: e,
344
352
  entityType: o,
345
353
  entityId: t,
346
354
  thumbnailHash: s ? String(s) : void 0
347
- }), M = o === "project", S = ["product"].includes(o), I = M ? !!e : !!t;
348
- return /* @__PURE__ */ m(de, { className: c + " thumbnail", ...y, children: [
349
- !l && !a && /* @__PURE__ */ i(w, { icon: n || "image" }),
350
- (o && !S && I || r) && !d && /* @__PURE__ */ i(
351
- pe,
355
+ }), R = o === "project", z = ["product"].includes(o), I = R ? !!e : !!t;
356
+ return /* @__PURE__ */ m(ye, { className: c + " thumbnail", ...S, children: [
357
+ !l && !r && /* @__PURE__ */ i(w, { icon: n || "image" }),
358
+ (o && !z && I || a) && !d && /* @__PURE__ */ i(
359
+ he,
352
360
  {
353
361
  alt: `Entity thumbnail ${t || e}`,
354
- src: r || h || void 0,
362
+ src: a || F || void 0,
355
363
  onLoad: u,
356
364
  onError: f
357
365
  }
366
+ ),
367
+ (h || y) && !l && !r && /* @__PURE__ */ i(
368
+ D,
369
+ {
370
+ src: y || W({ projectName: e, entityType: o, entityId: t, thumbnailHash: s }),
371
+ fit: T
372
+ }
358
373
  )
359
374
  ] });
360
375
  };
361
376
  export {
362
- Be as A,
363
- Ue as C,
364
- G as F,
365
- Oe as T,
366
- J as a,
367
- Ne as b,
368
- g as u
377
+ Pe as A,
378
+ Ye as C,
379
+ ee as F,
380
+ De as T,
381
+ te as a,
382
+ Ke as b,
383
+ v as u
369
384
  };
@@ -0,0 +1,48 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import { u as f } from "./useCreateContextMenu.es.js";
4
+ import { T as U } from "./TableExportContextInstance.es.js";
5
+ const T = ({
6
+ children: l,
7
+ thumbnailInputRef: t,
8
+ versionsInputRef: e,
9
+ canUploadVersion: r = !1
10
+ }) => {
11
+ const [, o] = p(!1), [s] = f(), c = () => o(!1), a = () => {
12
+ t?.current && (t.current.click(), o(!0));
13
+ }, n = () => {
14
+ e?.current && (e.current.click(), o(!0));
15
+ }, i = (m) => {
16
+ const u = [
17
+ {
18
+ label: "Upload thumbnail",
19
+ icon: "add_photo_alternate",
20
+ command: a
21
+ },
22
+ ...r ? [
23
+ {
24
+ label: "Upload version",
25
+ icon: "upload",
26
+ command: n
27
+ }
28
+ ] : []
29
+ ];
30
+ s(m, u);
31
+ };
32
+ return /* @__PURE__ */ d(
33
+ U.Provider,
34
+ {
35
+ value: {
36
+ resetFileUploadState: c,
37
+ triggerThumbnailUpload: a,
38
+ triggerVersionUpload: n,
39
+ canUploadVersion: r,
40
+ onContextMenu: i
41
+ },
42
+ children: l
43
+ }
44
+ );
45
+ };
46
+ export {
47
+ T
48
+ };
@@ -10,15 +10,14 @@ import "@ynput/ayon-react-components";
10
10
  import "./searchTerms.es.js";
11
11
  import "./getUris.es.js";
12
12
  import "primereact/confirmdialog";
13
- import { d as D } from "./TableExportContextInstance.es.js";
14
13
  import "lodash";
15
14
  import "uuid";
16
15
  import "axios";
16
+ import { c as D } from "./TableExportContextInstance.es.js";
17
17
  import "semver";
18
18
  import "./ContextMenuContextInstance.es.js";
19
19
  import "clsx";
20
20
  import "react-dom";
21
- import "react-redux";
22
21
  import { P as N } from "./Feed.es.js";
23
22
  const R = { loop: !0, audio: !0 }, S = 24, T = "h264", L = {
24
23
  activityId: "",
@@ -36,13 +35,13 @@ const R = { loop: !0, audio: !0 }, S = 24, T = "h264", L = {
36
35
  productAttributes: {},
37
36
  taskAttributes: {},
38
37
  path: ""
39
- }, tt = ({
38
+ }, $ = ({
40
39
  id: t,
41
40
  name: o,
42
41
  url: r,
43
42
  projectName: e,
44
- duration: i,
45
- width: s,
43
+ duration: s,
44
+ width: i,
46
45
  height: a,
47
46
  fps: p,
48
47
  codec: m
@@ -60,13 +59,13 @@ const R = { loop: !0, audio: !0 }, S = 24, T = "h264", L = {
60
59
  position: 0,
61
60
  fps: p || S,
62
61
  codec: m || T,
63
- duration: i,
64
- width: s,
62
+ duration: s,
63
+ width: i,
65
64
  height: a,
66
65
  context: L
67
66
  }
68
67
  ],
69
- [t, o, r, i, s, a, p, m]
68
+ [t, o, r, s, i, a, p, m]
70
69
  ), y = u(
71
70
  () => ({
72
71
  router: { useLocation: x, useNavigate: b, useParams: P, useSearchParams: I },
@@ -90,5 +89,5 @@ const R = { loop: !0, audio: !0 }, S = 24, T = "h264", L = {
90
89
  ) });
91
90
  };
92
91
  export {
93
- tt as default
92
+ $ as default
94
93
  };