@ynput/ayon-frontend-shared 0.7.0 → 0.7.1

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 (36) hide show
  1. package/dist/DetailsPanel.es.js +765 -739
  2. package/dist/ListTable.es.js +80 -80
  3. package/dist/NewEntity.es.js +2 -2
  4. package/dist/ProjectTreeTable.es.js +1424 -1409
  5. package/dist/Views.es.js +572 -570
  6. package/dist/api.es.js +300 -298
  7. package/dist/chunks/Actions.es.js +5 -5
  8. package/dist/chunks/DetailsDialog.es.js +3 -3
  9. package/dist/chunks/EntityPath.es.js +14 -14
  10. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  11. package/dist/chunks/EntityTooltip.es.js +18 -18
  12. package/dist/chunks/Feed.es.js +2 -2
  13. package/dist/chunks/MetaWidget.es.js +2422 -2149
  14. package/dist/chunks/PlayableIcon.es.js +20 -20
  15. package/dist/chunks/ProjectContext.es.js +6 -6
  16. package/dist/chunks/RepresentationsList.es.js +1 -1
  17. package/dist/chunks/ReviewablesSelector.es.js +2 -2
  18. package/dist/chunks/Slicer.es.js +2 -2
  19. package/dist/chunks/TableExportContextInstance.es.js +1 -1
  20. package/dist/chunks/ThumbnailSimple.es.js +12 -12
  21. package/dist/chunks/Watchers.es.js +907 -855
  22. package/dist/chunks/getUris.es.js +1272 -1209
  23. package/dist/chunks/searchTerms.es.js +30 -66
  24. package/dist/chunks/useAttributeEnums.es.js +37 -37
  25. package/dist/chunks/viewUpdateHelper.es.js +10 -10
  26. package/dist/components.es.js +132 -131
  27. package/dist/context.es.js +76 -76
  28. package/dist/hooks.es.js +51 -50
  29. package/dist/types/ProjectTreeTable.d.ts +21 -1
  30. package/dist/types/Slicer.d.ts +6 -4
  31. package/dist/types/Views.d.ts +4 -0
  32. package/dist/types/api.d.ts +411 -438
  33. package/dist/types/components.d.ts +22 -0
  34. package/dist/types/context.d.ts +2 -0
  35. package/dist/types/hooks.d.ts +36 -1
  36. package/package.json +3 -3
@@ -5,7 +5,7 @@ import { useRef as fe, useMemo as f, useState as $, useEffect as me } from "reac
5
5
  import B from "clsx";
6
6
  import { toast as w } from "react-toastify";
7
7
  import { bt as he } from "./searchTerms.es.js";
8
- import { d8 as be, bf as ve, cX as ye, bg as xe, bb as Ae } from "./getUris.es.js";
8
+ import { da as be, bg as ve, cY as ye, bh as xe, bc as Ae } from "./getUris.es.js";
9
9
  import "primereact/confirmdialog";
10
10
  import { upperFirst as Q } from "lodash";
11
11
  import { u as we } from "./useActionTriggers.es.js";
@@ -266,7 +266,7 @@ const Se = x.div`
266
266
  align: z,
267
267
  pt: H
268
268
  }) => {
269
- const { user: F } = Ce(), { handleActionPayload: J } = we({ onNavigate: m, onSetSearchParams: g, searchParams: b }), [X, O] = $(null), [K, S] = $(null), C = f(() => {
269
+ const { user: F } = Ce(), { handleActionPayload: J } = we({ onNavigate: m, onSetSearchParams: g, searchParams: b }), [Y, O] = $(null), [K, S] = $(null), C = f(() => {
270
270
  if (p)
271
271
  return {
272
272
  entityType: "project",
@@ -284,7 +284,7 @@ const Se = x.div`
284
284
  me(() => {
285
285
  S(null);
286
286
  }, [JSON.stringify(C)]);
287
- const { data: W, isFetching: Y } = ye(
287
+ const { data: W, isFetching: X } = ye(
288
288
  { archived: !1 },
289
289
  { skip: d !== "developer" }
290
290
  ), I = W?.bundles || [], V = f(() => {
@@ -416,7 +416,7 @@ const Se = x.div`
416
416
  Oe,
417
417
  {
418
418
  options: ee,
419
- isLoading: k && c > 0 || Y,
419
+ isLoading: k && c > 0 || X,
420
420
  onAction: D,
421
421
  onConfig: ae,
422
422
  bundleMode: d,
@@ -428,7 +428,7 @@ const Se = x.div`
428
428
  /* @__PURE__ */ r(
429
429
  Ve,
430
430
  {
431
- action: X,
431
+ action: Y,
432
432
  context: C,
433
433
  onClose: () => O(null)
434
434
  }
@@ -1,11 +1,11 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { toast as u } from "react-toastify";
3
3
  import "./searchTerms.es.js";
4
- import { bF as c } from "./getUris.es.js";
4
+ import { bG as c } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
6
  import { Dialog as g } from "@ynput/ayon-react-components";
7
7
  import { J as h } from "./JsonViewer.es.js";
8
- const J = ({
8
+ const G = ({
9
9
  projectName: l,
10
10
  entityType: t,
11
11
  entityIds: n,
@@ -36,5 +36,5 @@ const J = ({
36
36
  );
37
37
  };
38
38
  export {
39
- J as D
39
+ G as D
40
40
  };
@@ -1,11 +1,11 @@
1
1
  import { jsxs as R, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
2
  import { useRef as _, useState as x, useEffect as le, useLayoutEffect as ae, createElement as me, Fragment as ke } from "react";
3
3
  import "./searchTerms.es.js";
4
- import { dx as Me, c0 as Ue, ce as Fe, dj as Te, b3 as Le, aS as We, aN as Ve, dn as Ne } from "./getUris.es.js";
4
+ import { dz as Me, c1 as Ue, cf as Fe, dl as Te, b4 as Le, aT as We, aO as Ve, dq as Ne } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
6
  import { useSensors as $e, useSensor as he, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as Ke, DragOverlay as Ze } from "@dnd-kit/core";
7
- import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as He } from "@dnd-kit/sortable";
8
- import { D as ze, R as Re, a as Je, b as Xe, L as Ye, c as oe, u as je, d as et, T as tt, e as ge, U as nt, P as rt, C as it, f as at, S as J, M as ve, g as be, h as X, i as ye, j as ot, F as st } from "./Watchers.es.js";
7
+ import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as ze } from "@dnd-kit/sortable";
8
+ import { D as He, R as Re, a as Je, b as Xe, L as Ye, c as oe, u as je, d as et, T as tt, e as ge, U as nt, P as rt, C as it, f as at, S as J, M as ve, g as be, h as X, i as ye, j as ot, F as st } from "./Watchers.es.js";
9
9
  import { CSS as lt } from "@dnd-kit/utilities";
10
10
  import { toast as A } from "react-toastify";
11
11
  import { u as ct } from "./useCreateContextMenu.es.js";
@@ -25,7 +25,7 @@ import "./ContextMenuContextInstance.es.js";
25
25
  import { s as vt, a as bt, h as we, g as yt, b as wt } from "./versionUploadHelpers.es.js";
26
26
  import { p as It } from "./parseFilename.es.js";
27
27
  import { u as Dt } from "./VersionUploadContextInstance.es.js";
28
- const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PURE__ */ R(ze, { className: ue(d, { active: a }), ...g, children: [
28
+ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PURE__ */ R(He, { className: ue(d, { active: a }), ...g, children: [
29
29
  /* @__PURE__ */ t(Ce, { icon: i }),
30
30
  /* @__PURE__ */ t("span", { children: r })
31
31
  ] }), Ct = ({ ...r }) => {
@@ -174,13 +174,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
174
174
  const { active: o } = e;
175
175
  p(o.id);
176
176
  }
177
- const [H] = Te(), z = async (e) => {
177
+ const [z] = Te(), H = async (e) => {
178
178
  const { active: o, over: l } = e;
179
179
  if (l?.id && o.id !== l.id) {
180
180
  console.log("update review position");
181
- const D = w.findIndex((L) => L.fileId === o.id), U = w.findIndex((L) => L.fileId === l.id), S = He(w, D, U).map((L) => L.activityId);
181
+ const D = w.findIndex((L) => L.fileId === o.id), U = w.findIndex((L) => L.fileId === l.id), S = ze(w, D, U).map((L) => L.activityId);
182
182
  try {
183
- H({
183
+ z({
184
184
  projectName: r,
185
185
  versionId: i,
186
186
  sortReviewablesRequest: { sort: S }
@@ -256,7 +256,7 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
256
256
  sensors: c,
257
257
  collisionDetection: Ke,
258
258
  onDragStart: ee,
259
- onDragEnd: z,
259
+ onDragEnd: H,
260
260
  onDragCancel: () => p(null),
261
261
  children: [
262
262
  /* @__PURE__ */ t(
@@ -431,13 +431,13 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
431
431
  // default product type for uploaded files
432
432
  productBaseType: "review"
433
433
  });
434
- k(!1), await z(W, l.id), M(null);
434
+ k(!1), await H(W, l.id), M(null);
435
435
  } catch (l) {
436
436
  we(l, "creating product"), w();
437
437
  }
438
438
  }, Y = () => {
439
439
  k(!1), M(null), w();
440
- }, [j] = We(), [ee] = Ve(), H = async (e) => {
440
+ }, [j] = We(), [ee] = Ve(), z = async (e) => {
441
441
  if (!q || !p)
442
442
  return A.error("Please select exactly one version to upload reviewables"), w();
443
443
  if (f) {
@@ -467,8 +467,8 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
467
467
  M(e), k(!0);
468
468
  return;
469
469
  }
470
- await z(e, o);
471
- }, z = async (e, o) => {
470
+ await H(e, o);
471
+ }, H = async (e, o) => {
472
472
  try {
473
473
  const l = yt(p.product?.latestVersion), D = await wt(j, d, {
474
474
  productId: o,
@@ -527,12 +527,12 @@ const Rt = ({ label: r, icon: i, isActive: a, className: d, ...g }) => /* @__PUR
527
527
  if (I === "version") {
528
528
  P("version");
529
529
  const o = e.dataTransfer.files;
530
- H(o);
530
+ z(o);
531
531
  }
532
532
  }
533
533
  }, G = async (e, o) => {
534
534
  const l = e.target.files;
535
- !l || l.length === 0 || (o === "version" && (P("version"), H(l)), o === "thumbnail" && (P("thumbnail"), B(l[0])));
535
+ !l || l.length === 0 || (o === "version" && (P("version"), z(l)), o === "thumbnail" && (P("thumbnail"), B(l[0])));
536
536
  };
537
537
  return /* @__PURE__ */ R(Q, { children: [
538
538
  /* @__PURE__ */ R(
@@ -11,7 +11,7 @@ import { InputText as he, theme as me, Dialog as ge, SwitchButton as be, Button
11
11
  import M from "styled-components";
12
12
  import { E as ve } from "./EmptyPlaceholder.es.js";
13
13
  import { E as V, a as we } from "./EntityTooltip.es.js";
14
- import { ch as ke } from "./getUris.es.js";
14
+ import { ci as ke } from "./getUris.es.js";
15
15
  import "@module-federation/enhanced/runtime";
16
16
  import { y as xe, x as Te } from "./TableExportContextInstance.es.js";
17
17
  import "semver";
@@ -1,24 +1,24 @@
1
- import { jsx as I } from "react/jsx-runtime";
1
+ import { jsx as C } from "react/jsx-runtime";
2
2
  import { EntityCard as S } from "@ynput/ayon-react-components";
3
3
  import U, { keyframes as W } from "styled-components";
4
4
  import "./searchTerms.es.js";
5
- import { bH as H } from "./getUris.es.js";
5
+ import { bI as L } from "./getUris.es.js";
6
6
  import "primereact/confirmdialog";
7
7
  import "react";
8
8
  import "@module-federation/enhanced/runtime";
9
9
  import "react-toastify";
10
- import { n as L } from "./TableExportContextInstance.es.js";
10
+ import { n as Y } from "./TableExportContextInstance.es.js";
11
11
  import "lodash";
12
- import { g as Y } from "./getEntityTypeIcon.es.js";
12
+ import { g as _ } from "./getEntityTypeIcon.es.js";
13
13
  import "uuid";
14
- import { g as _ } from "./getThumbnailUrl.es.js";
14
+ import { g as z } from "./getThumbnailUrl.es.js";
15
15
  import "semver";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import "clsx";
18
18
  import "react-dom";
19
19
  import "react-redux";
20
20
  import "react-router-dom";
21
- const z = W`
21
+ const F = W`
22
22
  from {
23
23
  opacity: 0.4;
24
24
  scale: 0.9;
@@ -26,7 +26,7 @@ from {
26
26
  opacity: 1;
27
27
  scale: 1;
28
28
  }
29
- `, F = U(S)`
29
+ `, G = U(S)`
30
30
  position: fixed;
31
31
  max-width: 220px;
32
32
  z-index: 9999;
@@ -34,7 +34,7 @@ from {
34
34
  translate: -50% calc(-100% - 4px);
35
35
  transform-origin: bottom center;
36
36
 
37
- animation: ${z} 100ms ease-out;
37
+ animation: ${F} 100ms ease-out;
38
38
 
39
39
  /* path always open */
40
40
  .description {
@@ -43,7 +43,7 @@ from {
43
43
 
44
44
  /* shadow */
45
45
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
46
- `, G = ["folder", "task", "version", "workfile"], pt = ({
46
+ `, H = ["folder", "task", "version", "workfile"], pt = ({
47
47
  entityType: t,
48
48
  entityId: i,
49
49
  projectName: c,
@@ -52,7 +52,7 @@ from {
52
52
  onMouseEnter: d,
53
53
  onMouseLeave: u
54
54
  }) => {
55
- const o = L(), a = c || o?.projectName, p = !!t && G.includes(t), { data: m, isFetching: f } = H(
55
+ const o = Y(), a = c || o?.projectName, p = !!t && H.includes(t), { data: m, isFetching: f } = L(
56
56
  { entityType: t, entityId: i, projectName: a },
57
57
  { skip: !p || !i || !a }
58
58
  ), n = 220;
@@ -68,21 +68,21 @@ from {
68
68
  thumbnailId: b,
69
69
  status: E,
70
70
  thumbnailHash: P
71
- } = m || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), O = m ? _({
71
+ } = m || {}, j = r?.taskTypes || o?.taskTypes || [], N = r?.folderTypes || o?.folderTypes || [], v = (r?.statuses || o?.statuses || []).find((s) => s.name === E), I = m ? z({
72
72
  entityId: i || "",
73
73
  entityType: t,
74
74
  thumbnailHash: P,
75
75
  thumbnailId: b,
76
76
  projectName: a || "",
77
77
  placeholder: "none"
78
- }) : null, C = {
78
+ }) : null, O = {
79
79
  task: j.find((s) => s.name === w)?.icon,
80
80
  folder: N.find((s) => s.name === g)?.icon,
81
81
  version: o?.getProductType(k).icon,
82
- workfile: Y("workfile")
82
+ workfile: _("workfile")
83
83
  };
84
- return p ? /* @__PURE__ */ I(
85
- F,
84
+ return p ? /* @__PURE__ */ C(
85
+ G,
86
86
  {
87
87
  style: { left: e, top: l, maxWidth: n },
88
88
  onMouseEnter: d,
@@ -96,12 +96,12 @@ from {
96
96
  hidePriority: !0,
97
97
  isLoading: f,
98
98
  loadingSections: ["header", "title", "users", "status"],
99
- titleIcon: C[t || ""],
100
- imageUrl: O || void 0
99
+ titleIcon: O[t || ""],
100
+ imageUrl: I || void 0
101
101
  }
102
102
  ) : null;
103
103
  };
104
104
  export {
105
- G as E,
105
+ H as E,
106
106
  pt as a
107
107
  };
@@ -11,7 +11,7 @@ import { toast as Fe } from "react-toastify";
11
11
  import { $createListItemNode as Fo, $createListNode as Co } from "@lexical/list";
12
12
  import { $getRoot as To } from "lexical";
13
13
  import { Button as ct, Dialog as Do, getFileSizeString as No, Icon as se, theme as Cn, getTextColor as _t, Dropdown as So, SaveButton as Io, UserImage as Tn, SEARCH_FILTER_ID as Dn, buildFilterId as tn, getFilterFromId as Eo, SearchFilter as Mo } from "@ynput/ayon-react-components";
14
- import { _ as Po, a2 as Nn, a3 as _o, H as Ro, a4 as Lo, a5 as nn, a6 as $o, a7 as Oo, a8 as Vo, y as jo, a9 as Uo, aa as zo, ab as Bo, ac as Go, ad as Ho, ae as qo, af as Wo, ag as Qo, ah as Yo, ai as Jo, aj as Ko, O as Rt, W as Sn, T as Xo, a1 as Zo, ak as ea, al as ta, am as na, an as oa, ao as aa, ap as ra, aq as on, ar as ia, b as sa, c as ca, i as la, as as da, S as ua, e as ma, L as pa } from "./PlayableIcon.es.js";
14
+ import { _ as Po, a1 as Nn, a2 as _o, H as Ro, a3 as Lo, a4 as nn, a5 as $o, a6 as Oo, a7 as Vo, y as jo, a8 as Uo, a9 as zo, aa as Bo, ab as Go, ac as Ho, ad as qo, ae as Wo, af as Qo, ag as Yo, ah as Jo, ai as Ko, O as Rt, W as Sn, T as Xo, aj as Zo, ak as ea, al as ta, am as na, an as oa, ao as aa, ap as ra, aq as on, ar as ia, b as sa, c as ca, i as la, as as da, S as ua, e as ma, L as pa } from "./PlayableIcon.es.js";
15
15
  import "@lexical/code";
16
16
  import "@lexical/rich-text";
17
17
  import "@lexical/selection";
@@ -23,7 +23,7 @@ import { C as ga } from "./CodeEditor.es.js";
23
23
  import { E as St } from "./EmptyPlaceholder.es.js";
24
24
  import "./EmptyPlaceholderFlex.styled.es.js";
25
25
  import { a_ as ha, bt as an } from "./searchTerms.es.js";
26
- import { bj as fa, bm as ya, aI as va, dl as ba, aV as wa, aP as xa, b2 as ka, O as Aa, bE as Fa, bl as Ca, bw as Ta, bq as Da, bk as Na, cD as Sa, c0 as Ia } from "./getUris.es.js";
26
+ import { bk as fa, bn as ya, aJ as va, dn as ba, aW as wa, aQ as xa, b3 as ka, Q as Aa, bF as Fa, bm as Ca, bx as Ta, br as Da, bl as Na, cE as Sa, c1 as Ia } from "./getUris.es.js";
27
27
  import "primereact/confirmdialog";
28
28
  import { union as Ea, isEqual as Ma } from "lodash";
29
29
  import { b as Pa, F as _a, u as $e, a as In, T as Ra, C as La } from "./ThumbnailSimple.es.js";