@ynput/ayon-frontend-shared 0.6.7 → 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 (35) hide show
  1. package/dist/DetailsPanel.es.js +1 -1
  2. package/dist/ListTable.es.js +2 -2
  3. package/dist/NewEntity.es.js +36 -36
  4. package/dist/ProjectTreeTable.es.js +3 -3
  5. package/dist/Slicer.es.js +21 -21
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +362 -360
  8. package/dist/chunks/Actions.es.js +21 -21
  9. package/dist/chunks/ColumnDropIndicator.es.js +5 -5
  10. package/dist/chunks/DeleteEntitiesContextInstance.es.js +22 -22
  11. package/dist/chunks/EmptyPlaceholder.es.js +9 -9
  12. package/dist/chunks/EntityPath.es.js +1 -1
  13. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  14. package/dist/chunks/Feed.es.js +1750 -1716
  15. package/dist/chunks/MetaWidget.es.js +2 -2
  16. package/dist/chunks/PlayableIcon.es.js +1 -1
  17. package/dist/chunks/ProjectContext.es.js +11 -11
  18. package/dist/chunks/ReviewablesSelector.es.js +570 -482
  19. package/dist/chunks/SimpleForm.es.js +7 -7
  20. package/dist/chunks/SimpleTable.es.js +1 -1
  21. package/dist/chunks/Slicer.es.js +73 -73
  22. package/dist/chunks/ThumbnailSimple.es.js +15 -15
  23. package/dist/chunks/Watchers.es.js +33 -33
  24. package/dist/chunks/getBundleMode.es.js +1 -1
  25. package/dist/chunks/getUris.es.js +236 -229
  26. package/dist/chunks/searchTerms.es.js +352 -333
  27. package/dist/chunks/useAttributeEnums.es.js +16 -16
  28. package/dist/chunks/viewUpdateHelper.es.js +8 -8
  29. package/dist/components.es.js +108 -107
  30. package/dist/context.es.js +62 -62
  31. package/dist/hooks.es.js +13 -13
  32. package/dist/types/api.d.ts +372 -0
  33. package/dist/types/components.d.ts +4 -0
  34. package/dist/util.es.js +2 -2
  35. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { jsx as r, jsxs as R } from "react/jsx-runtime";
2
- import { Button as q, Dropdown as de, Icon as E, DefaultValueTemplate as ue, Spacer as pe } from "@ynput/ayon-react-components";
1
+ import { jsx as r, jsxs as q } from "react/jsx-runtime";
2
+ import { Button as G, Dropdown as de, Icon as E, DefaultValueTemplate as ue, Spacer as pe } from "@ynput/ayon-react-components";
3
3
  import x, { keyframes as ge } from "styled-components";
4
4
  import { useRef as fe, useMemo as f, useState as $, useEffect as me } from "react";
5
5
  import B from "clsx";
6
6
  import { toast as w } from "react-toastify";
7
- import { bi as he } from "./searchTerms.es.js";
8
- import { d2 as be, bc as ve, cR as ye, bd as xe, b8 as Ae } from "./getUris.es.js";
7
+ import { bj as he } from "./searchTerms.es.js";
8
+ import { d3 as be, bc as ve, cS as ye, bd as xe, b8 as Ae } from "./getUris.es.js";
9
9
  import "primereact/confirmdialog";
10
- import { upperFirst as G } from "lodash";
10
+ import { upperFirst as Q } from "lodash";
11
11
  import { u as we } from "./useActionTriggers.es.js";
12
- import { S as Q } from "./SimpleFormDialog.es.js";
12
+ import { S as R } from "./SimpleFormDialog.es.js";
13
13
  import "uuid";
14
14
  import "@module-federation/enhanced/runtime";
15
15
  import { d as Ce } from "./DeleteEntitiesContextInstance.es.js";
@@ -28,7 +28,7 @@ const Se = x.div`
28
28
 
29
29
  border-radius: var(--border-radius-m);
30
30
  background-color: var(--md-sys-color-surface-container-high);
31
- `, Ie = x(q)`
31
+ `, Ie = x(G)`
32
32
  padding: 4px;
33
33
  user-select: none;
34
34
  position: relative;
@@ -140,12 +140,12 @@ const Se = x.div`
140
140
  hasConfig: p,
141
141
  description: b,
142
142
  onConfig: c
143
- }) => u ? /* @__PURE__ */ r(ke, { children: G(s) }) : /* @__PURE__ */ r(De, { children: /* @__PURE__ */ R(Be, { "data-tooltip": b || "", "data-tooltip-delay": 0, children: [
143
+ }) => u ? /* @__PURE__ */ r(ke, { children: Q(s) }) : /* @__PURE__ */ r(De, { children: /* @__PURE__ */ q(Be, { "data-tooltip": b || "", "data-tooltip-delay": 0, children: [
144
144
  /* @__PURE__ */ r(U, { icon: a }),
145
145
  /* @__PURE__ */ r("span", { children: s }),
146
146
  /* @__PURE__ */ r(pe, {}),
147
147
  p && /* @__PURE__ */ r(
148
- q,
148
+ G,
149
149
  {
150
150
  onClick: (m) => {
151
151
  c?.(o), m.stopPropagation(), m.preventDefault();
@@ -182,13 +182,13 @@ const Se = x.div`
182
182
  onChange: (g) => p(g[0]),
183
183
  buttonProps: {
184
184
  // @ts-expect-error
185
- "data-tooltip": a === "production" ? "Actions" : `${G(u)} Actions`,
185
+ "data-tooltip": a === "production" ? "Actions" : `${Q(u)} Actions`,
186
186
  "data-tooltip-delay": 0
187
187
  },
188
188
  ...c
189
189
  }
190
190
  );
191
- }, Ve = ({ action: o, onClose: s, context: a }) => {
191
+ }, je = ({ action: o, onClose: s, context: a }) => {
192
192
  const u = f(() => !o || !(o.addonName && o.addonVersion) ? null : {
193
193
  addonName: o.addonName,
194
194
  addonVersion: o.addonVersion,
@@ -208,7 +208,7 @@ const Se = x.div`
208
208
  }
209
209
  };
210
210
  return /* @__PURE__ */ r(
211
- Q,
211
+ R,
212
212
  {
213
213
  isOpen: !0,
214
214
  title: `Configure action ${o.label}`,
@@ -222,7 +222,7 @@ const Se = x.div`
222
222
  cancelIcon: "close"
223
223
  }
224
224
  );
225
- }, je = ({
225
+ }, Ve = ({
226
226
  interactiveForm: o,
227
227
  onClose: s,
228
228
  onSubmit: a
@@ -232,7 +232,7 @@ const Se = x.div`
232
232
  a(o.identifier, p), s();
233
233
  };
234
234
  return /* @__PURE__ */ r(
235
- Q,
235
+ R,
236
236
  {
237
237
  isOpen: !0,
238
238
  title: `${o.title}`,
@@ -286,14 +286,14 @@ const Se = x.div`
286
286
  const { data: X, isFetching: Y } = ye(
287
287
  { archived: !1 },
288
288
  { skip: d !== "developer" }
289
- ), I = X?.bundles || [], V = f(() => {
289
+ ), I = X?.bundles || [], j = f(() => {
290
290
  if (!I?.length || d !== "developer") return null;
291
291
  const e = I.filter((t) => t.isDev);
292
292
  return e.length ? e.find((t) => t.activeUser === F?.name)?.name || e[0].name : null;
293
- }, [I, d, F?.name]), j = f(() => d === "developer" ? V || "developer" : d, [d, V]), { data: Z, isFetching: M } = xe(
293
+ }, [I, d, F?.name]), V = f(() => d === "developer" ? j || "developer" : d, [d, j]), { data: Z, isFetching: M } = xe(
294
294
  {
295
295
  mode: "simple",
296
- variant: j,
296
+ variant: V,
297
297
  actionContext: C
298
298
  },
299
299
  { skip: !C }
@@ -397,7 +397,7 @@ const Se = x.div`
397
397
  () => Array(c).fill(N),
398
398
  [c, N]
399
399
  ), k = M || u, ce = k ? le : oe;
400
- return /* @__PURE__ */ R(Se, { className: B("actions", { loading: k }), children: [
400
+ return /* @__PURE__ */ q(Se, { className: B("actions", { loading: k }), children: [
401
401
  ce.map((e, n) => /* @__PURE__ */ r(
402
402
  Ie,
403
403
  {
@@ -419,13 +419,13 @@ const Se = x.div`
419
419
  onAction: D,
420
420
  onConfig: ae,
421
421
  bundleMode: d,
422
- actionsVariant: j,
422
+ actionsVariant: V,
423
423
  align: z,
424
424
  ...H?.dropdown
425
425
  }
426
426
  ),
427
427
  /* @__PURE__ */ r(
428
- Ve,
428
+ je,
429
429
  {
430
430
  action: K,
431
431
  context: C,
@@ -433,7 +433,7 @@ const Se = x.div`
433
433
  }
434
434
  ),
435
435
  /* @__PURE__ */ r(
436
- je,
436
+ Ve,
437
437
  {
438
438
  interactiveForm: W,
439
439
  onClose: () => S(null),
@@ -3,9 +3,9 @@ import "react-toastify";
3
3
  import "lodash";
4
4
  import "primereact/confirmdialog";
5
5
  import { g as p } from "./iconUtils.es.js";
6
- import { bj as E } from "./searchTerms.es.js";
6
+ import { bk as E } from "./searchTerms.es.js";
7
7
  import "uuid";
8
- import { jsx as L } from "react/jsx-runtime";
8
+ import { jsx as k } from "react/jsx-runtime";
9
9
  import "clsx";
10
10
  import "./PlayableIcon.es.js";
11
11
  import "@ynput/ayon-react-components";
@@ -22,7 +22,7 @@ import "@lexical/selection";
22
22
  import "@lexical/utils";
23
23
  import "./getUris.es.js";
24
24
  import "./DeleteEntitiesContextInstance.es.js";
25
- import { a as S, b as k } from "./MetaWidget.es.js";
25
+ import { a as L, b as S } from "./MetaWidget.es.js";
26
26
  import "@module-federation/enhanced/runtime";
27
27
  import "semver";
28
28
  import "./ContextMenuContextInstance.es.js";
@@ -36,7 +36,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
36
36
  enumOnly: s,
37
37
  scope: t
38
38
  }) => {
39
- const { columnOrder: n } = S(), { attribFields: a } = k();
39
+ const { columnOrder: n } = L(), { attribFields: a } = S();
40
40
  return A(
41
41
  () => [
42
42
  {
@@ -175,7 +175,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
175
175
  m = requestAnimationFrame(u);
176
176
  };
177
177
  return u(), () => cancelAnimationFrame(m);
178
- }, [t, n]), a ? R(/* @__PURE__ */ L(I, { style: a }), document.body) : null;
178
+ }, [t, n]), a ? R(/* @__PURE__ */ k(I, { style: a }), document.body) : null;
179
179
  };
180
180
  export {
181
181
  _ as C,
@@ -2,14 +2,14 @@ import { jsxs as k, jsx as l } from "react/jsx-runtime";
2
2
  import W, { createContext as g, useContext as d, useRef as S, useState as b, useEffect as v, useCallback as O, useMemo as re, forwardRef as M } from "react";
3
3
  import { Button as $, theme as z, Icon as ae, Dialog as ie, InputText as K } from "@ynput/ayon-react-components";
4
4
  import u from "styled-components";
5
- import N from "clsx";
5
+ import A from "clsx";
6
6
  import { a as ce, K as J } from "./platform.es.js";
7
7
  import { debounce as B, isEqual as le } from "lodash";
8
8
  import { confirmDialog as de } from "primereact/confirmdialog";
9
9
  import { toast as H } from "react-toastify";
10
10
  import "uuid";
11
- import { be as T, a as ue } from "./searchTerms.es.js";
12
- import { cN as pe } from "./getUris.es.js";
11
+ import { bf as T, a as ue } from "./searchTerms.es.js";
12
+ import { cO as pe } from "./getUris.es.js";
13
13
  import "@module-federation/enhanced/runtime";
14
14
  import "./ContextMenuContextInstance.es.js";
15
15
  import { createPortal as ge } from "react-dom";
@@ -34,22 +34,22 @@ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
34
34
  if (e === void 0)
35
35
  throw new Error("usePowerpack must be used within a PowerpackProvider");
36
36
  return e;
37
- }, be = g(void 0), Nt = () => {
37
+ }, be = g(void 0), At = () => {
38
38
  const e = d(be);
39
39
  if (e === void 0)
40
40
  throw new Error("useURIContext must be used within a URIProvider");
41
41
  return e;
42
- }, A = (e, t = null) => {
42
+ }, N = (e, t = null) => {
43
43
  if (!e) return t;
44
44
  try {
45
45
  return JSON.parse(e);
46
46
  } catch {
47
47
  return t;
48
48
  }
49
- }, At = (e, t) => {
49
+ }, Nt = (e, t) => {
50
50
  if (typeof window > "u") return t;
51
51
  try {
52
- return A(sessionStorage.getItem(e), t);
52
+ return N(sessionStorage.getItem(e), t);
53
53
  } catch {
54
54
  return t;
55
55
  }
@@ -64,16 +64,16 @@ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
64
64
  function ye(e, t) {
65
65
  const o = S(t);
66
66
  o.current = t;
67
- const [i, n] = b(() => typeof window > "u" ? t : A(sessionStorage.getItem(e), t));
67
+ const [i, n] = b(() => typeof window > "u" ? t : N(sessionStorage.getItem(e), t));
68
68
  v(() => {
69
69
  const s = sessionStorage.getItem(e);
70
- n(A(s, o.current)), s || sessionStorage.setItem(e, JSON.stringify(o.current));
70
+ n(N(s, o.current)), s || sessionStorage.setItem(e, JSON.stringify(o.current));
71
71
  function a(c) {
72
72
  if ("key" in c && c.key && c.key !== e) return;
73
73
  const p = c.detail?.key;
74
74
  if (p && p !== e) return;
75
75
  const f = sessionStorage.getItem(e);
76
- n(A(f, o.current));
76
+ n(N(f, o.current));
77
77
  }
78
78
  return window.addEventListener("session-storage", a), window.addEventListener("storage", a), () => {
79
79
  window.removeEventListener("session-storage", a), window.removeEventListener("storage", a);
@@ -191,14 +191,14 @@ const Ee = g(void 0), Ie = ["feed", "subtasks", "details", "files"], Te = (e) =>
191
191
  if (!e)
192
192
  throw new Error("useThumbnailUploadContext must be used within a ThumbnailUploadProvider");
193
193
  return e;
194
- }, Ne = g(void 0), Ut = () => {
195
- const e = d(Ne);
194
+ }, Ae = g(void 0), Ut = () => {
195
+ const e = d(Ae);
196
196
  if (e === void 0)
197
197
  throw new Error("useSettingsPanel must be used within a SettingsPanelProvider");
198
198
  return e;
199
- }, Ae = g(void 0);
199
+ }, Ne = g(void 0);
200
200
  function _e() {
201
- const e = d(Ae);
201
+ const e = d(Ne);
202
202
  if (e === void 0)
203
203
  throw new Error("usePiPWindow must be used within a PiPContext");
204
204
  return e;
@@ -541,7 +541,7 @@ const Le = u(fe)`
541
541
  {
542
542
  ...C,
543
543
  id: e,
544
- className: N(y, { selected: n }),
544
+ className: A(y, { selected: n }),
545
545
  ref: P,
546
546
  children: [
547
547
  o && o,
@@ -562,7 +562,7 @@ const Le = u(fe)`
562
562
  {
563
563
  icon: "save",
564
564
  variant: "text",
565
- className: N("save", { active: a === "save" }),
565
+ className: A("save", { active: a === "save" }),
566
566
  onClick: (h) => D(h, a !== "save"),
567
567
  "data-tooltip": `Save ${m} settings from current ${m}`
568
568
  }
@@ -572,7 +572,7 @@ const Le = u(fe)`
572
572
  {
573
573
  variant: "text",
574
574
  icon: "more_horiz",
575
- className: N("more", { active: a === "edit" }),
575
+ className: A("more", { active: a === "edit" }),
576
576
  onClick: (h) => c(h, e),
577
577
  "data-tooltip": `Edit ${m}`
578
578
  }
@@ -645,7 +645,7 @@ const Xe = u.li`
645
645
  Xe,
646
646
  {
647
647
  ...i,
648
- className: N("views-section-header", { collapsed: t }, o),
648
+ className: A("views-section-header", { collapsed: t }, o),
649
649
  ref: n,
650
650
  children: [
651
651
  /* @__PURE__ */ l("span", { children: e }),
@@ -753,7 +753,7 @@ const Xe = u.li`
753
753
  export {
754
754
  Xt as $,
755
755
  Te as A,
756
- Nt as B,
756
+ At as B,
757
757
  uo as C,
758
758
  oo as D,
759
759
  G as E,
@@ -761,8 +761,8 @@ export {
761
761
  Ee as G,
762
762
  j as H,
763
763
  De as I,
764
- Ne as J,
765
- Ae as K,
764
+ Ae as J,
765
+ Ne as K,
766
766
  Me as L,
767
767
  Fe as M,
768
768
  $e as N,
@@ -815,7 +815,7 @@ export {
815
815
  ke as o,
816
816
  ye as p,
817
817
  Ce as q,
818
- At as r,
818
+ Nt as r,
819
819
  Ot as s,
820
820
  Je as t,
821
821
  Bt as u,
@@ -1,11 +1,11 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { theme as h, Icon as i } from "@ynput/ayon-react-components";
3
- import s from "clsx";
2
+ import { theme as h, Icon as s } from "@ynput/ayon-react-components";
3
+ import i from "clsx";
4
4
  import "lodash";
5
5
  import "primereact/confirmdialog";
6
6
  import "react-toastify";
7
7
  import "uuid";
8
- import { bi as g } from "./searchTerms.es.js";
8
+ import { bj as g } from "./searchTerms.es.js";
9
9
  import "react";
10
10
  import u from "styled-components";
11
11
  const l = u.div`
@@ -51,7 +51,7 @@ const l = u.div`
51
51
  margin-top: -16px;
52
52
  }
53
53
  }
54
- `, R = ({
54
+ `, P = ({
55
55
  icon: d,
56
56
  message: o,
57
57
  error: n,
@@ -60,8 +60,8 @@ const l = u.div`
60
60
  pt: p,
61
61
  className: a,
62
62
  ...c
63
- }) => n ? /* @__PURE__ */ e(l, { className: s(a, "empty-placeholder", "isError"), ...c, children: [
64
- /* @__PURE__ */ r(i, { icon: "error", className: "placeholder-icon" }),
63
+ }) => n ? /* @__PURE__ */ e(l, { className: i(a, "empty-placeholder", "isError"), ...c, children: [
64
+ /* @__PURE__ */ r(s, { icon: "error", className: "placeholder-icon" }),
65
65
  /* @__PURE__ */ r("h3", { children: "Something went wrong." }),
66
66
  /* @__PURE__ */ e("span", { className: "error-message", ...p?.error, children: [
67
67
  "ERROR: ",
@@ -69,12 +69,12 @@ const l = u.div`
69
69
  ] }),
70
70
  m && /* @__PURE__ */ r("span", { children: "This should not happen. Please send a screenshot to the Ynput team!" }),
71
71
  t
72
- ] }) : /* @__PURE__ */ e(l, { className: s(a, "empty-placeholder"), ...c, children: [
73
- /* @__PURE__ */ r(i, { icon: d || "info", className: "placeholder-icon" }),
72
+ ] }) : /* @__PURE__ */ e(l, { className: i(a, "empty-placeholder"), ...c, children: [
73
+ /* @__PURE__ */ r(s, { icon: d || "info", className: "placeholder-icon" }),
74
74
  /* @__PURE__ */ r("h3", { children: typeof o == "object" ? JSON.stringify(o) : o }),
75
75
  t
76
76
  ] });
77
77
  export {
78
- R as E,
78
+ P as E,
79
79
  l as P
80
80
  };
@@ -1,7 +1,7 @@
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 he, Fragment as ke } from "react";
3
3
  import "./searchTerms.es.js";
4
- import { dr as Me, bX as Ue, c9 as Fe, dd as Te, b0 as Le, aP as We, aK as Ve, dh as Ne } from "./getUris.es.js";
4
+ import { ds as Me, bX as Ue, c9 as Fe, de as Te, b0 as Le, aP as We, aK as Ve, di as Ne } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
6
  import { useSensors as $e, useSensor as me, PointerSensor as Ae, KeyboardSensor as Oe, DndContext as qe, closestCenter as Ke, DragOverlay as Ze } from "@dnd-kit/core";
7
7
  import { useSortable as _e, sortableKeyboardCoordinates as Be, SortableContext as Ge, verticalListSortingStrategy as Qe, arrayMove as He } from "@dnd-kit/sortable";
@@ -4,7 +4,7 @@ import "lodash";
4
4
  import "primereact/confirmdialog";
5
5
  import "react-toastify";
6
6
  import "uuid";
7
- import { be as f } from "./searchTerms.es.js";
7
+ import { bf as f } from "./searchTerms.es.js";
8
8
  import { c as I } from "./realtimeUpdatesUtils.es.js";
9
9
  import { t as y, m as S, g as T, c as v, E as w } from "./DeleteEntitiesContextInstance.es.js";
10
10
  import { u as C } from "./viewUpdateHelper.es.js";