@ynput/ayon-frontend-shared 0.9.0 → 0.10.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 (40) hide show
  1. package/dist/DetailsPanel.es.js +39 -39
  2. package/dist/ListTable.es.js +738 -651
  3. package/dist/NewEntity.es.js +2 -2
  4. package/dist/ProjectTreeTable.es.js +827 -827
  5. package/dist/Slicer.es.js +10 -10
  6. package/dist/Views.es.js +36 -34
  7. package/dist/chunks/ColumnDropIndicator.es.js +27 -21
  8. package/dist/chunks/EntityPickerDialog.es.js +19 -19
  9. package/dist/chunks/Feed.es.js +77 -77
  10. package/dist/chunks/FilmstripEntityCard.es.js +1 -1
  11. package/dist/chunks/MetaWidget.es.js +444 -439
  12. package/dist/chunks/ReviewablesSelector.es.js +1 -1
  13. package/dist/chunks/Slicer.es.js +32 -32
  14. package/dist/chunks/TableExportContextInstance.es.js +408 -469
  15. package/dist/chunks/Watchers.es.js +1 -1
  16. package/dist/chunks/getUris.es.js +1069 -1057
  17. package/dist/chunks/useLocalStorage.es.js +78 -0
  18. package/dist/components.es.js +50 -50
  19. package/dist/context.es.js +348 -337
  20. package/dist/hooks.es.js +218 -187
  21. package/dist/types/Actions.d.ts +17 -16
  22. package/dist/types/ContextMenu.d.ts +17 -16
  23. package/dist/types/DetailsPanel.d.ts +17 -16
  24. package/dist/types/EntityPickerDialog.d.ts +17 -16
  25. package/dist/types/Feed.d.ts +17 -16
  26. package/dist/types/ListTable.d.ts +27 -17
  27. package/dist/types/NewEntity.d.ts +17 -16
  28. package/dist/types/ProjectTreeTable.d.ts +18 -16
  29. package/dist/types/ProjectsTable.d.ts +17 -16
  30. package/dist/types/RepresentationsList.d.ts +17 -16
  31. package/dist/types/SimpleTable.d.ts +17 -16
  32. package/dist/types/Slicer.d.ts +17 -16
  33. package/dist/types/Views.d.ts +18 -17
  34. package/dist/types/api.d.ts +18 -17
  35. package/dist/types/components.d.ts +18 -17
  36. package/dist/types/context.d.ts +26 -17
  37. package/dist/types/hooks.d.ts +20 -17
  38. package/dist/types/index.d.ts +17 -16
  39. package/dist/types/util.d.ts +17 -16
  40. package/package.json +1 -1
package/dist/Slicer.es.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { r as ge } from "./chunks/Slicer.es.js";
2
2
  import { S as St, a as ft, b as ht, c as yt, d as pt, e as mt, f as Et, g as It, h as gt, i as Pt, j as Tt, k as wt, s as vt, u as xt, l as kt, m as Lt, n as Rt, o as bt } from "./chunks/Slicer.es.js";
3
3
  import { jsx as Pe } from "react/jsx-runtime";
4
- import { useState as F, useEffect as O, useRef as q, useCallback as P, useMemo as R } from "react";
5
- import { b as X, n as z, p as Se, l as Te, q as we } from "./chunks/TableExportContextInstance.es.js";
6
- import { S as ve, d as xe, e as ke } from "./chunks/MetaWidget.es.js";
7
- import { f as _t, u as Ct } from "./chunks/MetaWidget.es.js";
4
+ import { useState as F, useEffect as O, useRef as z, useCallback as P, useMemo as R } from "react";
5
+ import { b as X, r as q, w as Se, l as Te, n as we } from "./chunks/TableExportContextInstance.es.js";
6
+ import { S as ve, c as xe, d as ke } from "./chunks/MetaWidget.es.js";
7
+ import { e as _t, u as Ct } from "./chunks/MetaWidget.es.js";
8
8
  import "@module-federation/enhanced/runtime";
9
9
  import "@ynput/ayon-addon/host";
10
10
  import "react-toastify";
@@ -68,10 +68,10 @@ const Fe = () => {
68
68
  window.removeEventListener("session-storage", t), window.removeEventListener("storage", t);
69
69
  };
70
70
  }, []);
71
- const p = q(/* @__PURE__ */ new Map()), f = P((t, a) => {
71
+ const p = z(/* @__PURE__ */ new Map()), f = P((t, a) => {
72
72
  const S = typeof window > "u" ? null : sessionStorage.getItem(t), u = p.current.get(t);
73
73
  if (u && u.raw === S) return u.value;
74
- const b = z(t, a);
74
+ const b = q(t, a);
75
75
  return p.current.set(t, { raw: S, value: b }), b;
76
76
  }, []), r = o[0], h = P(
77
77
  (t) => l.rowSelection !== void 0 && t === r ? l.rowSelection : f(he(s, e, t), {}),
@@ -192,24 +192,24 @@ const Fe = () => {
192
192
  x(t, g);
193
193
  },
194
194
  [S, x, t]
195
- ), B = `${s}-${e}`, N = q(/* @__PURE__ */ new Set());
195
+ ), B = `${s}-${e}`, N = z(/* @__PURE__ */ new Set());
196
196
  O(() => {
197
197
  !w || c || N.current.has(B) || (N.current.add(B), Object.keys($("hierarchy")).length || (D("hierarchy", h.rowSelection), A("hierarchy", h.expanded)), x(t));
198
198
  }, [w, c, B]);
199
- const ee = q(/* @__PURE__ */ new Set());
199
+ const ee = z(/* @__PURE__ */ new Set());
200
200
  O(() => {
201
201
  if (ee.current.has(B) || c || r.sliceType || r.rowSelection || r.setRowSelection || T?.length)
202
202
  return;
203
203
  ee.current.add(B);
204
204
  const n = `slicer-selection-${s}-${e}`, g = `slicer-expanded-${s}-${e}`, m = k[0];
205
205
  if (m !== "hierarchy") {
206
- const _ = z(n, null);
206
+ const _ = q(n, null);
207
207
  if (_ && Object.keys(_).length) {
208
208
  D(
209
209
  m,
210
210
  (ue) => Object.keys(ue).length ? ue : _
211
211
  );
212
- const L = z(g, null);
212
+ const L = q(g, null);
213
213
  L && A(m, L);
214
214
  }
215
215
  }
package/dist/Views.es.js CHANGED
@@ -4,9 +4,9 @@ import { createPortal as ge } from "react-dom";
4
4
  import "./chunks/searchTerms.es.js";
5
5
  import { aU as ie, bx as fe, dd as ne, b8 as Ve, dD as pe, dG as A, X as te, co as Xe, d1 as me, cK as he, bt as Z, cI as je } from "./chunks/getUris.es.js";
6
6
  import { confirmDialog as Ye } from "primereact/confirmdialog";
7
- import { b as z, ao as ve, ap as Ze, c as ye, o as ke, aq as Ne, ar as J, as as Te, at as et, au as tt, av as Ce } from "./chunks/TableExportContextInstance.es.js";
8
- import { aw as is, ax as ns, ay as rs } from "./chunks/TableExportContextInstance.es.js";
9
- import { Icon as X, Button as be, Dialog as st } from "@ynput/ayon-react-components";
7
+ import { b as z, al as ve, am as Ze, c as ye, an as Ne, ao as J, ap as Te, aq as et, ar as tt, as as ke } from "./chunks/TableExportContextInstance.es.js";
8
+ import { at as ns, au as rs, av as as } from "./chunks/TableExportContextInstance.es.js";
9
+ import { Icon as X, Button as Ce, Dialog as st } from "@ynput/ayon-react-components";
10
10
  import "uuid";
11
11
  import { toast as x } from "react-toastify";
12
12
  import "@module-federation/enhanced/runtime";
@@ -14,20 +14,22 @@ import "@ynput/ayon-addon/host";
14
14
  import "lodash";
15
15
  import "axios";
16
16
  import "./chunks/ContextMenuContextInstance.es.js";
17
- import Le from "clsx";
17
+ import be from "clsx";
18
18
  import "react-router-dom";
19
19
  import "semver";
20
20
  import { useDispatch as ot } from "react-redux";
21
21
  import K from "styled-components";
22
- import { u as Be } from "./chunks/useLoadModule.es.js";
22
+ import { u as Le } from "./chunks/useLoadModule.es.js";
23
+ import { u as Be } from "./chunks/useLocalStorage.es.js";
23
24
  import { c as De, a as se } from "./chunks/columnConfigConverter.es.js";
24
- const jt = [
25
+ const Yt = [
25
26
  "overview",
26
27
  "taskProgress",
27
28
  "versions",
28
29
  "lists",
29
30
  "reviews",
30
- "reports"
31
+ "reports",
32
+ "events"
31
33
  ], re = "_working_", it = "_new_view_", Ie = "__base__", nt = (e) => {
32
34
  const { viewsList: s, onEdit: o, onSelect: t, onSave: l } = e, c = (i, V = {}) => ({
33
35
  id: i.id,
@@ -113,7 +115,7 @@ const jt = [
113
115
  } catch ($) {
114
116
  x.error($);
115
117
  }
116
- }, [S, { isLoading: f }] = Be({
118
+ }, [S, { isLoading: f }] = Le({
117
119
  addon: "powerpack",
118
120
  remote: "views",
119
121
  module: "getCustomViews",
@@ -460,7 +462,7 @@ const jt = [
460
462
  [e, o]
461
463
  );
462
464
  return [e ? s[e] : !1, t];
463
- }, wt = "view", gt = [], Yt = ({
465
+ }, wt = "view", gt = [], Zt = ({
464
466
  children: e,
465
467
  viewType: s,
466
468
  viewAlias: o = wt,
@@ -473,7 +475,7 @@ const jt = [
473
475
  const r = u ? void 0 : s, i = c?.viewsList ?? !0, V = c?.baseViews ?? !0;
474
476
  let { powerLicense: p } = z();
475
477
  a?.powerLicense !== void 0 && (console.warn("Using debug power license:", a.powerLicense), p = a.powerLicense);
476
- const { user: m } = ye(), [g, d] = R(!1), [n, w] = R(null), C = "viewsMenuCollapsed", [k, B] = ke(
478
+ const { user: m } = ye(), [g, d] = R(!1), [n, w] = R(null), C = "viewsMenuCollapsed", [k, B] = Be(
477
479
  C,
478
480
  {}
479
481
  ), F = (M) => {
@@ -674,7 +676,7 @@ const jt = [
674
676
  margin: 4px 0;
675
677
  `, ht = K.div`
676
678
  margin-left: 6px;
677
- `, vt = K(be)`
679
+ `, vt = K(Ce)`
678
680
  padding: 0 8px 0 4px !important;
679
681
  outline: 1px dashed var(--md-sys-color-outline);
680
682
  margin: 0 8px 4px 0;
@@ -735,14 +737,14 @@ const jt = [
735
737
  }, p = {
736
738
  icon: "view_quilt",
737
739
  onClick: V,
738
- className: Le({ active: !!r, open: l }),
740
+ className: be({ active: !!r, open: l }),
739
741
  tabIndex: 0,
740
742
  "data-tooltip": u ? `Working ${t.toLowerCase()}` : `${t}: ` + a?.label || "None",
741
743
  "data-tooltip-delay": 0,
742
744
  onKeyDown: (d) => {
743
745
  (d.key === "Enter" || d.key === " ") && V(d);
744
746
  }
745
- }, m = e ? /* @__PURE__ */ L(be, { ...p, ...s(a) }) : /* @__PURE__ */ L(Vt, { ref: i, ...p }), g = Ee(o);
747
+ }, m = e ? /* @__PURE__ */ L(Ce, { ...p, ...s(a) }) : /* @__PURE__ */ L(Vt, { ref: i, ...p }), g = Ee(o);
746
748
  return g ? ge(m, g) : null;
747
749
  }, kt = () => null, Pe = "views-dialog", Ct = ({}) => {
748
750
  const {
@@ -762,7 +764,7 @@ const jt = [
762
764
  onDeleteView: g,
763
765
  api: d,
764
766
  dispatch: n
765
- } = J(), { powerLicense: w } = z(), [C, { isLoading: k, outdated: B }] = Be({
767
+ } = J(), { powerLicense: w } = z(), [C, { isLoading: k, outdated: B }] = Le({
766
768
  addon: "powerpack",
767
769
  remote: "views",
768
770
  module: "ViewFormDialog",
@@ -818,7 +820,7 @@ const jt = [
818
820
  onDeleteBaseView: l,
819
821
  onLoadBaseView: c,
820
822
  viewAlias: a
821
- } = J(), { powerLicense: u, setPowerpackDialog: r } = z(), [i, V] = ke("collapsed-default-view", !1), p = async (m, g) => {
823
+ } = J(), { powerLicense: u, setPowerpackDialog: r } = z(), [i, V] = Be("collapsed-default-view", !1), p = async (m, g) => {
822
824
  const d = m ? o : s, n = !m && u === !1;
823
825
  if (n && !g) {
824
826
  r("sharedViews");
@@ -879,7 +881,7 @@ const jt = [
879
881
  return /* @__PURE__ */ G(
880
882
  vt,
881
883
  {
882
- className: Le({
884
+ className: be({
883
885
  "powerpack-locked": t === !1,
884
886
  active: e
885
887
  }),
@@ -965,18 +967,18 @@ const jt = [
965
967
  }, [s]), {
966
968
  resetViewToDefault: s
967
969
  };
968
- }, Zt = () => (Dt(), /* @__PURE__ */ G(Y, { children: [
970
+ }, Nt = () => (Dt(), /* @__PURE__ */ G(Y, { children: [
969
971
  /* @__PURE__ */ L(yt, {}),
970
972
  /* @__PURE__ */ L(Bt, {}),
971
973
  /* @__PURE__ */ L(Ct, {})
972
- ] })), Nt = ({
974
+ ] })), Tt = ({
973
975
  viewType: e,
974
976
  projectName: s
975
977
  }) => {
976
978
  const o = !e, t = { viewType: e, projectName: s };
977
979
  fe(t, { skip: o }), me(t, { skip: o }), he(t, { skip: o }), Z(t, { skip: o }), Z({ viewType: e, projectName: void 0 }, { skip: o });
978
- }, Tt = () => {
979
- const { viewSettings: e } = J(), [s, o] = R(null), [t, l] = R(null), { updateViewSettings: c } = Ce(), a = e, u = a?.filter ?? {}, r = a?.columns ?? [], i = a?.sliceType;
980
+ }, es = () => {
981
+ const { viewSettings: e } = J(), [s, o] = R(null), [t, l] = R(null), { updateViewSettings: c } = ke(), a = e, u = a?.filter ?? {}, r = a?.columns ?? [], i = a?.sliceType;
980
982
  W(() => {
981
983
  o(null);
982
984
  }, [JSON.stringify(e?.filter)]), W(() => {
@@ -1013,7 +1015,7 @@ const jt = [
1013
1015
  sliceType: i,
1014
1016
  onUpdateSliceType: n
1015
1017
  };
1016
- }, es = ({ viewSettings: e, updateViewSettings: s }) => {
1018
+ }, ts = ({ viewSettings: e, updateViewSettings: s }) => {
1017
1019
  const [o, t] = R(null), [l, c] = R(null), [a, u] = R(null), r = e, i = r?.filter ?? {}, V = r?.showHierarchy ?? !0, p = r?.sliceType, m = q(
1018
1020
  () => De(r),
1019
1021
  [JSON.stringify(e)]
@@ -1113,8 +1115,8 @@ const jt = [
1113
1115
  sliceType: p,
1114
1116
  onUpdateSliceType: C
1115
1117
  };
1116
- }, ts = () => {
1117
- const { viewSettings: e } = J(), [s, o] = R(null), [t, l] = R(null), [c, a] = R(null), { updateViewSettings: u } = Ce(), r = e, i = r?.filter ?? {}, V = q(
1118
+ }, ss = () => {
1119
+ const { viewSettings: e } = J(), [s, o] = R(null), [t, l] = R(null), [c, a] = R(null), { updateViewSettings: u } = ke(), r = e, i = r?.filter ?? {}, V = q(
1118
1120
  () => De(r),
1119
1121
  [JSON.stringify(e)]
1120
1122
  );
@@ -1163,32 +1165,32 @@ export {
1163
1165
  Ie as BASE_VIEW_ID,
1164
1166
  it as NEW_VIEW_ID,
1165
1167
  Ze as VIEW_DIVIDER,
1166
- Zt as Views,
1168
+ Nt as Views,
1167
1169
  yt as ViewsButton,
1168
1170
  Ne as ViewsContext,
1169
1171
  et as ViewsMenu,
1170
1172
  Bt as ViewsMenuContainer,
1171
- Yt as ViewsProvider,
1173
+ Zt as ViewsProvider,
1172
1174
  re as WORKING_VIEW_ID,
1173
- is as generateViewId,
1175
+ ns as generateViewId,
1174
1176
  ve as generateWorkingView,
1175
1177
  nt as getCustomViewsFallback,
1176
1178
  Ee as getViewsPortalContainer,
1177
1179
  ft as getViewsPortalId,
1178
1180
  Me as isViewStudioScope,
1179
- ns as updateViewSettings,
1181
+ rs as updateViewSettings,
1180
1182
  lt as useBaseViewMutations,
1181
1183
  rt as useBuildViewMenuItems,
1182
- ts as useListsViewSettings,
1183
- es as useOverviewViewSettings,
1184
- Nt as usePrefetchViews,
1184
+ ss as useListsViewSettings,
1185
+ ts as useOverviewViewSettings,
1186
+ Tt as usePrefetchViews,
1185
1187
  dt as useSaveViewFromCurrent,
1186
1188
  at as useSelectedView,
1187
- Tt as useTaskProgressViewSettings,
1188
- Ce as useViewUpdateHelper,
1189
+ es as useTaskProgressViewSettings,
1190
+ ke as useViewUpdateHelper,
1189
1191
  J as useViewsContext,
1190
1192
  ct as useViewsMutations,
1191
1193
  Dt as useViewsShortcuts,
1192
- rs as useViewsState,
1193
- jt as viewTypes
1194
+ as as useViewsState,
1195
+ Yt as viewTypes
1194
1196
  };
@@ -1,4 +1,4 @@
1
- import { useMemo as A, useRef as x, useCallback as h, useState as v, useEffect as T } from "react";
1
+ import { useMemo as v, useRef as x, useCallback as h, useState as A, useEffect as T } from "react";
2
2
  import "react-toastify";
3
3
  import "lodash";
4
4
  import "primereact/confirmdialog";
@@ -33,15 +33,15 @@ import { createPortal as D } from "react-dom";
33
33
  import "react-router-dom";
34
34
  import "@tanstack/react-table";
35
35
  import "react-redux";
36
- import { useDndContext as R } from "@dnd-kit/core";
37
- import { a as I } from "./addonColumnTags.es.js";
36
+ import { useDndContext as I } from "@dnd-kit/core";
37
+ import { a as R } from "./addonColumnTags.es.js";
38
38
  const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(o.data.type || "") && (!s || o.scope?.includes(s)) ? n ? E(o.data) : !0 : !1, xt = ({
39
39
  allowedTypes: o,
40
40
  enumOnly: s,
41
41
  scope: t
42
42
  }) => {
43
43
  const { columnOrder: n } = S(), { attribFields: a } = k();
44
- return A(
44
+ return v(
45
45
  () => [
46
46
  {
47
47
  value: "folderType",
@@ -49,6 +49,12 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
49
49
  icon: d("folder"),
50
50
  scopes: ["folder", "task"]
51
51
  },
52
+ {
53
+ value: "folderId",
54
+ label: "Folder",
55
+ icon: d("folder"),
56
+ scopes: ["version"]
57
+ },
52
58
  {
53
59
  value: "taskType",
54
60
  label: "Task type",
@@ -102,7 +108,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
102
108
  }),
103
109
  [a, n, o, s, t]
104
110
  );
105
- }, P = "data-column-dnd-container", y = 100, yt = ({
111
+ }, F = "data-column-dnd-container", y = 100, yt = ({
106
112
  columnPinning: o,
107
113
  columnSizing: s
108
114
  }) => {
@@ -116,16 +122,16 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
116
122
  ({ transform: e, activeNodeRect: l, draggingNodeRect: g, active: p }) => {
117
123
  if (t.current === null || !l || p?.data.current?.type && p.data.current.type !== "column") return e;
118
124
  let i = n.current;
119
- i === null && (i = (document.querySelector(`[${P}]`)?.getBoundingClientRect().left ?? 0) + a());
120
- const C = g?.left ?? l.left;
125
+ i === null && (i = (document.querySelector(`[${F}]`)?.getBoundingClientRect().left ?? 0) + a());
126
+ const b = g?.left ?? l.left;
121
127
  if (t.current) {
122
- const b = C + l.width + e.x, f = i + y;
123
- if (b > f)
124
- return { ...e, x: f - C - l.width };
128
+ const C = b + l.width + e.x, f = i + y;
129
+ if (C > f)
130
+ return { ...e, x: f - b - l.width };
125
131
  } else {
126
- const b = C + e.x, f = i - y;
127
- if (b < f)
128
- return { ...e, x: f - C };
132
+ const C = b + e.x, f = i - y;
133
+ if (C < f)
134
+ return { ...e, x: f - b };
129
135
  }
130
136
  return e;
131
137
  },
@@ -151,15 +157,15 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
151
157
  activePinnedState: t,
152
158
  setCachedBoundary: c
153
159
  };
154
- }, F = (o, s) => {
160
+ }, P = (o, s) => {
155
161
  const t = o.getBoundingClientRect(), n = o.closest("table")?.getBoundingClientRect() ?? t;
156
162
  return {
157
163
  left: s === "left" ? t.left - 1 : t.right - 1,
158
164
  top: n.top,
159
165
  height: n.height
160
166
  };
161
- }, _ = "th[data-column-id]", At = () => {
162
- const { active: o, over: s } = R(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = v(null);
167
+ }, _ = "th[data-column-id]", vt = () => {
168
+ const { active: o, over: s } = I(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = A(null);
163
169
  return T(() => {
164
170
  if (!t || !n || t === n) {
165
171
  r(null);
@@ -171,7 +177,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
171
177
  document.querySelectorAll(_)
172
178
  ), e = c.find((l) => l.dataset.columnId === n);
173
179
  if (e) {
174
- const l = c.findIndex((i) => i.dataset.columnId === t), g = c.indexOf(e), p = F(e, l < g ? "right" : "left");
180
+ const l = c.findIndex((i) => i.dataset.columnId === t), g = c.indexOf(e), p = P(e, l < g ? "right" : "left");
175
181
  r(
176
182
  (i) => i && i.left === p.left && i.top === p.top && i.height === p.height ? i : p
177
183
  );
@@ -179,15 +185,15 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
179
185
  m = requestAnimationFrame(u);
180
186
  };
181
187
  return u(), () => cancelAnimationFrame(m);
182
- }, [t, n]), a ? D(/* @__PURE__ */ L(I, { style: a }), document.body) : null;
188
+ }, [t, n]), a ? D(/* @__PURE__ */ L(R, { style: a }), document.body) : null;
183
189
  };
184
190
  export {
185
191
  _ as C,
186
- At as T,
187
- P as a,
192
+ vt as T,
193
+ F as a,
188
194
  O as b,
189
195
  xt as c,
190
- F as g,
196
+ P as g,
191
197
  B as i,
192
198
  yt as u
193
199
  };
@@ -8,21 +8,21 @@ import { bw as pe } from "./searchTerms.es.js";
8
8
  import "axios";
9
9
  import { createPortal as fe } from "react-dom";
10
10
  import { b as y, H as ee, a as me, S as he, e as ge } from "./SimpleTable.es.js";
11
- import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as H } from "@ynput/ayon-react-components";
11
+ import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as U } from "@ynput/ayon-react-components";
12
12
  import S from "styled-components";
13
13
  import { E as xe } from "./EmptyPlaceholder.es.js";
14
- import { a as U, E as Pe } from "./EntityTooltip.es.js";
14
+ import { a as X, E as Pe } from "./EntityTooltip.es.js";
15
15
  import { cj as Te } from "./getUris.es.js";
16
16
  import "@module-federation/enhanced/runtime";
17
17
  import "@ynput/ayon-addon/host";
18
- import { q as Ie, s as Ce, k as Fe, t as Re } from "./TableExportContextInstance.es.js";
18
+ import { n as Ie, o as Ce, k as Fe, p as Re } from "./TableExportContextInstance.es.js";
19
19
  import "semver";
20
20
  import "./ContextMenuContextInstance.es.js";
21
21
  import "clsx";
22
22
  import "react-router-dom";
23
23
  import { g as A } from "./getThumbnailUrl.es.js";
24
24
  import { g as te } from "./getEntityTypeIcon.es.js";
25
- import { P as je, a as X } from "./ProjectFoldersContext.es.js";
25
+ import { P as je, a as q } from "./ProjectFoldersContext.es.js";
26
26
  const I = {
27
27
  folder: ["folder"],
28
28
  product: ["folder", "product"],
@@ -164,7 +164,7 @@ const I = {
164
164
  typeof s == "string" && /* @__PURE__ */ w(Me, { value: s, onChange: n, onClose: () => n(void 0) })
165
165
  ] });
166
166
  }, Ge = 150, We = (e, s) => {
167
- const n = U.includes(e) || e === "product", [t, c] = L(null), a = z(), i = M(() => clearTimeout(a.current), []), o = M(() => {
167
+ const n = X.includes(e) || e === "product", [t, c] = L(null), a = z(), i = M(() => clearTimeout(a.current), []), o = M(() => {
168
168
  i(), c(null);
169
169
  }, [i]), p = M(() => {
170
170
  i(), a.current = setTimeout(() => c(null), Ge);
@@ -176,7 +176,7 @@ const I = {
176
176
  const m = M(
177
177
  (d) => {
178
178
  const r = s?.find((u) => u.id === d)?.data?.tooltip || { entityType: e, entityId: d };
179
- return U.includes(r.entityType) && r.entityId ? r : null;
179
+ return X.includes(r.entityType) && r.entityId ? r : null;
180
180
  },
181
181
  [s, e]
182
182
  ), h = M(
@@ -514,7 +514,7 @@ const I = {
514
514
  a.skipDetection = !0, t(r, o);
515
515
  }
516
516
  }, [e, s, t]);
517
- }, J = (e = {}) => Object.keys(e).filter((s) => e[s]), qe = ({
517
+ }, J = (e = {}) => Object.keys(e).filter((s) => e[s]), He = ({
518
518
  entityHierarchy: e,
519
519
  entityData: s,
520
520
  rowSelection: n,
@@ -543,7 +543,7 @@ const I = {
543
543
  );
544
544
  }
545
545
  }, [e, s, n, t, c]);
546
- }, He = 600, Ue = S.div`
546
+ }, Ue = 600, Xe = S.div`
547
547
  display: grid;
548
548
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
549
549
  gap: var(--base-gap-large);
@@ -561,9 +561,9 @@ const I = {
561
561
  }
562
562
  }
563
563
  `, Tt = (e) => {
564
- const s = Fe(), n = Re(), t = /* @__PURE__ */ w(Xe, { ...e });
565
- return s?.projectName !== e.projectName ? /* @__PURE__ */ w(je, { projectName: e.projectName, children: /* @__PURE__ */ w(X, { projectName: e.projectName, children: t }) }) : n?.projectName !== e.projectName ? /* @__PURE__ */ w(X, { projectName: e.projectName, children: t }) : t;
566
- }, Xe = ({
564
+ const s = Fe(), n = Re(), t = /* @__PURE__ */ w(qe, { ...e });
565
+ return s?.projectName !== e.projectName ? /* @__PURE__ */ w(je, { projectName: e.projectName, children: /* @__PURE__ */ w(q, { projectName: e.projectName, children: t }) }) : n?.projectName !== e.projectName ? /* @__PURE__ */ w(q, { projectName: e.projectName, children: t }) : t;
566
+ }, qe = ({
567
567
  projectName: e,
568
568
  entityType: s,
569
569
  initialSelection: n,
@@ -629,7 +629,7 @@ const I = {
629
629
  entityData: O,
630
630
  rowSelection: T,
631
631
  setEntityRowSelection: F
632
- }), qe({
632
+ }), He({
633
633
  entityHierarchy: R,
634
634
  entityData: O,
635
635
  rowSelection: T,
@@ -637,14 +637,14 @@ const I = {
637
637
  initialSelection: n
638
638
  });
639
639
  const V = (l, v, D) => {
640
- const $ = D || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0, q = {
640
+ const $ = D || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0, H = {
641
641
  ...l,
642
642
  isDisabled: $,
643
643
  disabledMessage: ce
644
644
  };
645
- return l.subRows && l.subRows.length > 0 && (q.subRows = l.subRows.map(
645
+ return l.subRows && l.subRows.length > 0 && (H.subRows = l.subRows.map(
646
646
  (de) => V(de, v, $)
647
- )), q;
647
+ )), H;
648
648
  }, ie = (l) => !Y || Y.length === 0 ? l : l.map((v) => V(v, Y, !1)), Q = (l) => {
649
649
  const v = O[s].data;
650
650
  c(
@@ -665,11 +665,11 @@ const I = {
665
665
  header: `Select ${Z(s)}`,
666
666
  isOpen: !0,
667
667
  size: "full",
668
- style: { height: "80vh", maxWidth: R.length * He },
668
+ style: { height: "80vh", maxWidth: R.length * Ue },
669
669
  footer: /* @__PURE__ */ B(ue, { children: [
670
- a && i && /* @__PURE__ */ w(H, { label: "Move to root", variant: "text", onClick: i }),
670
+ a && i && /* @__PURE__ */ w(U, { label: "Move to root", variant: "text", onClick: i }),
671
671
  /* @__PURE__ */ w(
672
- H,
672
+ U,
673
673
  {
674
674
  label: `Select ${s}${t ? "s" : ""}`,
675
675
  variant: "filled",
@@ -693,7 +693,7 @@ const I = {
693
693
  }
694
694
  }
695
695
  ),
696
- /* @__PURE__ */ w(Ue, { children: R.map((l) => /* @__PURE__ */ w(
696
+ /* @__PURE__ */ w(Xe, { children: R.map((l) => /* @__PURE__ */ w(
697
697
  ge,
698
698
  {
699
699
  rowSelection: T[l] || {},