@ynput/ayon-frontend-shared 0.6.6 → 0.6.8

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 (53) hide show
  1. package/dist/DetailsPanel.es.js +4 -4
  2. package/dist/ListTable.es.js +2 -2
  3. package/dist/NewEntity.es.js +49 -49
  4. package/dist/ProjectTreeTable.es.js +501 -496
  5. package/dist/Slicer.es.js +27 -27
  6. package/dist/Views.es.js +213 -206
  7. package/dist/api.es.js +362 -360
  8. package/dist/chunks/Actions.es.js +21 -21
  9. package/dist/chunks/CodeEditor.es.js +30 -0
  10. package/dist/chunks/ColumnDropIndicator.es.js +5 -5
  11. package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/DeleteEntitiesContextInstance.es.js +96 -96
  14. package/dist/chunks/EmptyPlaceholder.es.js +9 -9
  15. package/dist/chunks/EntityPath.es.js +3 -3
  16. package/dist/chunks/EntityTooltip.es.js +1 -1
  17. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  18. package/dist/chunks/Feed.es.js +1625 -1573
  19. package/dist/chunks/JsonViewer.es.js +1 -1
  20. package/dist/chunks/Menu.es.js +1 -1
  21. package/dist/chunks/MenuItem.es.js +25 -25
  22. package/dist/chunks/MetaWidget.es.js +1537 -1516
  23. package/dist/chunks/PlayableIcon.es.js +128 -128
  24. package/dist/chunks/ProjectContext.es.js +11 -11
  25. package/dist/chunks/ReviewablesSelector.es.js +553 -462
  26. package/dist/chunks/SimpleForm.es.js +7 -7
  27. package/dist/chunks/SimpleTable.es.js +110 -110
  28. package/dist/chunks/Slicer.es.js +80 -80
  29. package/dist/chunks/TableSettingsFallback.es.js +1 -1
  30. package/dist/chunks/ThumbnailSimple.es.js +17 -17
  31. package/dist/chunks/VideoPlayer.es.js +1 -1
  32. package/dist/chunks/Watchers.es.js +50 -50
  33. package/dist/chunks/afterStartup.es.js +13 -0
  34. package/dist/chunks/getBundleMode.es.js +1 -1
  35. package/dist/chunks/getUris.es.js +797 -827
  36. package/dist/chunks/searchTerms.es.js +353 -336
  37. package/dist/chunks/useAttributeEnums.es.js +16 -16
  38. package/dist/chunks/useHierarchySelection.es.js +2 -2
  39. package/dist/chunks/useLoadModule.es.js +24 -23
  40. package/dist/chunks/viewUpdateHelper.es.js +8 -8
  41. package/dist/components.es.js +205 -202
  42. package/dist/context.es.js +525 -496
  43. package/dist/hooks.es.js +190 -166
  44. package/dist/types/ContextMenu.d.ts +1 -0
  45. package/dist/types/ProjectTreeTable.d.ts +1 -0
  46. package/dist/types/Views.d.ts +11 -0
  47. package/dist/types/api.d.ts +823 -1427
  48. package/dist/types/components.d.ts +9 -1
  49. package/dist/types/context.d.ts +1 -0
  50. package/dist/types/hooks.d.ts +25 -1
  51. package/dist/types/util.d.ts +10 -0
  52. package/dist/util.es.js +45 -42
  53. package/package.json +2 -2
@@ -1,17 +1,17 @@
1
- import { useMemo as g, useRef as x, useEffect as w } from "react";
2
- import { b1 as G, bf as M, aw as N, ax as C, aX as I, bg as A, bh as O } from "./searchTerms.es.js";
3
- import { X as B, ck as P, cx as q, ap as F, at as Q } from "./getUris.es.js";
1
+ import { useMemo as g, useRef as x, useEffect as A } from "react";
2
+ import { b2 as M, bg as N, ax as w, ay as C, aY as I, bh as B, bi as O } from "./searchTerms.es.js";
3
+ import { X as G, ck as P, cx as q, ap as F, at as Q } from "./getUris.es.js";
4
4
  import "primereact/confirmdialog";
5
5
  import { U } from "./MetaWidget.es.js";
6
- const z = [], K = 3, H = (t) => {
6
+ const z = [], K = 3, Y = (t) => {
7
7
  const { entity: i, groupBy: c, extraGroupBys: E, skip: p } = t, n = g(
8
- () => c ? B(c, i) : null,
8
+ () => c ? G(c, i) : null,
9
9
  [c, i]
10
10
  ), h = g(() => {
11
11
  if (!n) return;
12
12
  const s = /* @__PURE__ */ new Set([n.field]), y = [];
13
13
  for (const T of E ?? []) {
14
- const v = B(T, i);
14
+ const v = G(T, i);
15
15
  v && !s.has(v.field) && (s.add(v.field), y.push(v));
16
16
  }
17
17
  return [n, ...y];
@@ -29,9 +29,9 @@ const z = [], K = 3, H = (t) => {
29
29
  complete: s.complete
30
30
  };
31
31
  }, [r, n, o]), f = x(/* @__PURE__ */ new Map()), d = x(/* @__PURE__ */ new Set()), R = g(() => JSON.stringify(t.args), [t.args]);
32
- return w(() => {
32
+ return A(() => {
33
33
  f.current.clear(), d.current.clear();
34
- }, [R]), w(() => {
34
+ }, [R]), A(() => {
35
35
  if (u || !n || !o || e.isFetching || l) return;
36
36
  const s = n.field;
37
37
  if (d.current.has(s)) return;
@@ -48,14 +48,14 @@ const z = [], K = 3, H = (t) => {
48
48
  isLoading: !u && (e.isLoading || e.isFetching),
49
49
  isSupported: !!n
50
50
  };
51
- }, J = (t, { projectName: i, request: c = "all" } = {}) => {
52
- const E = c === "all" ? "all" : [...c].sort().join("\0"), { data: p, isError: n } = G(), h = !!p || n, { requests: u, keyByName: m } = g(() => {
51
+ }, H = (t, { projectName: i, request: c = "all" } = {}) => {
52
+ const E = c === "all" ? "all" : [...c].sort().join("\0"), { data: p, isError: n } = M(), h = !!p || n, { requests: u, keyByName: m } = g(() => {
53
53
  const e = c === "all" ? null : new Set(c), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
54
54
  return t.forEach((a) => {
55
- if (!M(a.data) || e && !e.has(a.name)) return;
55
+ if (!N(a.data) || e && !e.has(a.name)) return;
56
56
  const l = p?.find(
57
57
  ({ name: R }) => R === a.data?.enumResolver
58
- )?.acceptedParams, f = N(a.data, { projectName: i }, l), d = C(f);
58
+ )?.acceptedParams, f = w(a.data, { projectName: i }, l), d = C(f);
59
59
  o.set(a.name, d), r.has(d) || r.set(d, f);
60
60
  }), { requests: [...r].sort(([a], [l]) => a.localeCompare(l)).map(([, a]) => a), keyByName: o };
61
61
  }, [t, E, i, p]), { data: k, isError: S } = I(
@@ -69,12 +69,12 @@ const z = [], K = 3, H = (t) => {
69
69
  return o ? {
70
70
  ...e,
71
71
  enumIsLoading: !1,
72
- enumError: o.error ? A(o.error) : void 0,
72
+ enumError: o.error ? B(o.error) : void 0,
73
73
  data: { ...e.data, enum: O(o.items) }
74
- } : S ? { ...e, enumIsLoading: !1, enumError: A() } : { ...e, enumIsLoading: !0 };
74
+ } : S ? { ...e, enumIsLoading: !1, enumError: B() } : { ...e, enumIsLoading: !0 };
75
75
  }) : t, [t, m, k, S]);
76
76
  };
77
77
  export {
78
- H as a,
79
- J as u
78
+ Y as a,
79
+ H as u
80
80
  };
@@ -1,15 +1,15 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@module-federation/enhanced/runtime";
4
+ import "react-toastify";
5
+ import "@ynput/ayon-react-components";
4
6
  import "./searchTerms.es.js";
5
7
  import "./getUris.es.js";
6
8
  import "primereact/confirmdialog";
7
9
  import { a as o } from "./DeleteEntitiesContextInstance.es.js";
8
10
  import "lodash";
9
- import "react-toastify";
10
11
  import "uuid";
11
12
  import "semver";
12
- import "@ynput/ayon-react-components";
13
13
  import "./ContextMenuContextInstance.es.js";
14
14
  import "clsx";
15
15
  import "react-dom";
@@ -1,68 +1,69 @@
1
1
  import "react/jsx-runtime";
2
- import { useState as f, useRef as R, useEffect as z } from "react";
3
- import { loadRemote as I } from "@module-federation/enhanced/runtime";
2
+ import { useState as f, useRef as z, useEffect as I } from "react";
3
+ import { loadRemote as M } from "@module-federation/enhanced/runtime";
4
+ import "react-toastify";
5
+ import "@ynput/ayon-react-components";
4
6
  import "./searchTerms.es.js";
5
7
  import "./getUris.es.js";
6
8
  import "primereact/confirmdialog";
7
- import { b as M } from "./DeleteEntitiesContextInstance.es.js";
9
+ import { b as q } from "./DeleteEntitiesContextInstance.es.js";
8
10
  import "lodash";
9
- import "react-toastify";
10
11
  import "uuid";
11
- import q from "semver";
12
- import "@ynput/ayon-react-components";
12
+ import h from "semver";
13
13
  import "./ContextMenuContextInstance.es.js";
14
14
  import "clsx";
15
15
  import "react-dom";
16
16
  import "react-redux";
17
- const G = ({
17
+ const H = ({
18
18
  addon: o,
19
19
  remote: t,
20
20
  module: e,
21
- fallback: g,
21
+ fallback: L,
22
22
  minVersion: s,
23
- skip: u = !1
23
+ skip: u = !1,
24
+ defer: l = !1
24
25
  }) => {
25
- const { remotesInitialized: l, modules: a } = M(), [L, r] = f(!0), [d, c] = f(!1), [v, m] = f(!1), p = R(g);
26
- return z(() => {
26
+ const { remotesInitialized: c, modules: a } = q(), [v, r] = f(!0), [d, m] = f(!1), [R, p] = f(!1), g = z(L);
27
+ return I(() => {
27
28
  if (u) {
28
- r(!1), c(!0);
29
+ r(!1), m(!0);
29
30
  return;
30
31
  }
31
- if (!l || !o || !t || !e) return;
32
+ if (l || !c || !o || !t || !e) return;
32
33
  const i = a.find((n) => n.addonName === o);
33
34
  if (!i) {
34
35
  console.log("remote not found", { addon: o, remote: t, module: e }), r(!1);
35
36
  return;
36
37
  }
37
- if (s && !q.gte(i.addonVersion, s) && s + "-dev" !== i.addonVersion) {
38
+ if (s && !h.gte(i.addonVersion, s) && s + "-dev" !== i.addonVersion) {
38
39
  console.log("remote version does not meet minimum requirement", {
39
40
  addon: o,
40
41
  remote: t,
41
42
  module: e,
42
43
  current: i.addonVersion,
43
44
  required: s
44
- }), m(!0), r(!1);
45
+ }), p(!0), r(!1);
45
46
  return;
46
47
  }
47
- if (m(!1), !i.modules[t])
48
+ if (p(!1), !i.modules[t])
48
49
  return r(!1), console.log("module not found", { addon: o, remote: t, module: e });
49
50
  if (d === e) {
50
51
  r(!1);
51
52
  return;
52
53
  }
53
- I(`${t}/${e}`, {
54
+ M(`${t}/${e}`, {
54
55
  from: "runtime"
55
56
  }).then((n) => {
56
- c(e), r(!1), n && (p.current = n.default);
57
+ m(e), r(!1), n && (g.current = n.default);
57
58
  }).catch((n) => {
58
59
  r(!1), console.error("error loading remote", t, e, n);
59
60
  });
60
- }, [d, l, a, o, t, e, s, u]), [
61
- p.current,
61
+ }, [d, c, a, o, t, e, s, u, l]), [
62
+ g.current,
62
63
  {
63
64
  isLoaded: d === e,
64
- isLoading: L,
65
- outdated: v ? {
65
+ isLoading: v,
66
+ outdated: R ? {
66
67
  current: a.find((i) => i.addonName === o)?.addonVersion || "unknown",
67
68
  required: s?.replace("-dev", "") || "unknown"
68
69
  } : void 0
@@ -70,5 +71,5 @@ const G = ({
70
71
  ];
71
72
  };
72
73
  export {
73
- G as u
74
+ H as u
74
75
  };
@@ -1,10 +1,10 @@
1
1
  import "./searchTerms.es.js";
2
- import { aQ as A, du as D, dx as b } from "./getUris.es.js";
2
+ import { aQ as A, dv as D, dy as b } from "./getUris.es.js";
3
3
  import "primereact/confirmdialog";
4
4
  import { v4 as H } from "uuid";
5
5
  import { toast as M } from "react-toastify";
6
- import { useCallback as k, useState as x, useRef as R } from "react";
7
- import { useStore as U } from "react-redux";
6
+ import { useCallback as k, useState as R, useRef as U } from "react";
7
+ import { useStore as q } from "react-redux";
8
8
  import "react/jsx-runtime";
9
9
  import { e as T } from "./DeleteEntitiesContextInstance.es.js";
10
10
  import "@ynput/ayon-react-components";
@@ -14,8 +14,8 @@ import "./ContextMenuContextInstance.es.js";
14
14
  import "clsx";
15
15
  import "react-dom";
16
16
  import "semver";
17
- const q = () => H().replace(/-/g, ""), P = (e = {}) => ({
18
- id: q(),
17
+ const x = () => H().replace(/-/g, ""), P = (e = {}) => ({
18
+ id: x(),
19
19
  label: "Working",
20
20
  working: !0,
21
21
  settings: e
@@ -64,7 +64,7 @@ const N = () => {
64
64
  M.error(W);
65
65
  }
66
66
  }, $ = () => {
67
- const [e] = A(), [n] = D(), o = T(), t = U(), a = k(
67
+ const [e] = A(), [n] = D(), o = T(), t = q(), a = k(
68
68
  async (i, c) => {
69
69
  if (c) {
70
70
  const r = {};
@@ -114,7 +114,7 @@ const N = () => {
114
114
  [t]: a.length ? j(e[t] || {}, a.join("."), o) : o
115
115
  } : e;
116
116
  }, ae = (e, n) => {
117
- const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: a, getLatestSettings: g } = $(), [f, i] = x(null), c = R(null), r = o, V = f !== null ? f : L(r, e) ?? n, s = k((d) => {
117
+ const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: a, getLatestSettings: g } = $(), [f, i] = R(null), c = U(null), r = o, V = f !== null ? f : L(r, e) ?? n, s = k((d) => {
118
118
  c.current = d, i(d);
119
119
  }, []), u = k(
120
120
  (d) => {
@@ -144,7 +144,7 @@ const N = () => {
144
144
  export {
145
145
  $ as a,
146
146
  Q as b,
147
- q as c,
147
+ x as c,
148
148
  P as g,
149
149
  ae as u
150
150
  };