@ynput/ayon-frontend-shared 0.6.4 → 0.6.5

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 (51) hide show
  1. package/dist/DetailsPanel.es.js +480 -477
  2. package/dist/ListTable.es.js +24 -25
  3. package/dist/NewEntity.es.js +6 -7
  4. package/dist/ProjectTreeTable.es.js +2016 -1996
  5. package/dist/Views.es.js +28 -28
  6. package/dist/api.es.js +291 -289
  7. package/dist/chunks/Actions.es.js +12 -12
  8. package/dist/chunks/ColumnDropIndicator.es.js +8 -9
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
  10. package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
  11. package/dist/chunks/DetailsDialog.es.js +1 -1
  12. package/dist/chunks/EmptyPlaceholder.es.js +13 -12
  13. package/dist/chunks/EntityPath.es.js +67 -67
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +8 -8
  16. package/dist/chunks/Feed.es.js +75 -76
  17. package/dist/chunks/MetaWidget.es.js +1283 -1279
  18. package/dist/chunks/PlayableIcon.es.js +458 -451
  19. package/dist/chunks/ProjectContext.es.js +20 -20
  20. package/dist/chunks/RepresentationsList.es.js +9 -9
  21. package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
  22. package/dist/chunks/Slicer.es.js +68 -69
  23. package/dist/chunks/ThumbnailSimple.es.js +4 -4
  24. package/dist/chunks/Watchers.es.js +104 -105
  25. package/dist/chunks/activeEntities.es.js +58 -0
  26. package/dist/chunks/columnConfigConverter.es.js +57 -63
  27. package/dist/chunks/getUris.es.js +886 -831
  28. package/dist/chunks/iconUtils.es.js +151 -0
  29. package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
  30. package/dist/chunks/searchTerms.es.js +329 -247
  31. package/dist/chunks/useAttributeEnums.es.js +34 -34
  32. package/dist/chunks/viewUpdateHelper.es.js +11 -11
  33. package/dist/components.es.js +340 -337
  34. package/dist/context.es.js +48 -48
  35. package/dist/hooks.es.js +34 -34
  36. package/dist/index.es.js +1 -1
  37. package/dist/types/ContextMenu.d.ts +1 -1
  38. package/dist/types/Feed.d.ts +1 -1
  39. package/dist/types/ListTable.d.ts +1 -1
  40. package/dist/types/ProjectTreeTable.d.ts +4 -1
  41. package/dist/types/SimpleTable.d.ts +1 -1
  42. package/dist/types/Slicer.d.ts +5 -5
  43. package/dist/types/Views.d.ts +4 -4
  44. package/dist/types/api.d.ts +545 -171
  45. package/dist/types/components.d.ts +64 -9
  46. package/dist/types/context.d.ts +5 -5
  47. package/dist/types/util.d.ts +237 -2
  48. package/dist/util.es.js +127 -114
  49. package/package.json +1 -1
  50. package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
  51. package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
@@ -1,15 +1,15 @@
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";
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";
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
7
  import { bi as he } from "./searchTerms.es.js";
8
- import { d0 as be, bb as ve, cP as ye, bc as xe, b7 as Ae } from "./getUris.es.js";
8
+ import { d2 as be, bc as ve, cR as ye, bd as xe, b8 as Ae } from "./getUris.es.js";
9
9
  import "primereact/confirmdialog";
10
- import { upperFirst as Q } from "lodash";
10
+ import { upperFirst as G } from "lodash";
11
11
  import { u as we } from "./useActionTriggers.es.js";
12
- import { S as R } from "./SimpleFormDialog.es.js";
12
+ import { S as Q } 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(G)`
31
+ `, Ie = x(q)`
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: Q(s) }) : /* @__PURE__ */ r(De, { children: /* @__PURE__ */ q(Be, { "data-tooltip": b || "", "data-tooltip-delay": 0, children: [
143
+ }) => u ? /* @__PURE__ */ r(ke, { children: G(s) }) : /* @__PURE__ */ r(De, { children: /* @__PURE__ */ R(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
- G,
148
+ q,
149
149
  {
150
150
  onClick: (m) => {
151
151
  c?.(o), m.stopPropagation(), m.preventDefault();
@@ -182,7 +182,7 @@ 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" : `${Q(u)} Actions`,
185
+ "data-tooltip": a === "production" ? "Actions" : `${G(u)} Actions`,
186
186
  "data-tooltip-delay": 0
187
187
  },
188
188
  ...c
@@ -208,7 +208,7 @@ const Se = x.div`
208
208
  }
209
209
  };
210
210
  return /* @__PURE__ */ r(
211
- R,
211
+ Q,
212
212
  {
213
213
  isOpen: !0,
214
214
  title: `Configure action ${o.label}`,
@@ -232,7 +232,7 @@ const Se = x.div`
232
232
  a(o.identifier, p), s();
233
233
  };
234
234
  return /* @__PURE__ */ r(
235
- R,
235
+ Q,
236
236
  {
237
237
  isOpen: !0,
238
238
  title: `${o.title}`,
@@ -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__ */ q(Se, { className: B("actions", { loading: k }), children: [
400
+ return /* @__PURE__ */ R(Se, { className: B("actions", { loading: k }), children: [
401
401
  ce.map((e, n) => /* @__PURE__ */ r(
402
402
  Ie,
403
403
  {
@@ -2,7 +2,7 @@ import { useMemo as A, useRef as x, useCallback as h, useState as v, useEffect a
2
2
  import "react-toastify";
3
3
  import "lodash";
4
4
  import "primereact/confirmdialog";
5
- import { g as p } from "./parseHtmlToPlainTextWithLinks.es.js";
5
+ import { g as p } from "./iconUtils.es.js";
6
6
  import { bj as E } from "./searchTerms.es.js";
7
7
  import "uuid";
8
8
  import { jsx as L } from "react/jsx-runtime";
@@ -21,10 +21,9 @@ import "@lexical/rich-text";
21
21
  import "@lexical/selection";
22
22
  import "@lexical/utils";
23
23
  import "./getUris.es.js";
24
- import "react-router-dom";
24
+ import "./DeleteEntitiesContextInstance.es.js";
25
25
  import { a as S, b as k } from "./MetaWidget.es.js";
26
26
  import "@module-federation/enhanced/runtime";
27
- import "./DeleteEntitiesContextInstance.es.js";
28
27
  import "semver";
29
28
  import "./ContextMenuContextInstance.es.js";
30
29
  import { createPortal as R } from "react-dom";
@@ -32,7 +31,7 @@ import "react-redux";
32
31
  import "@tanstack/react-table";
33
32
  import { useDndContext as D } from "@dnd-kit/core";
34
33
  import { a as I } from "./ColumnDropIndicator.styled.es.js";
35
- 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, ht = ({
34
+ 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, gt = ({
36
35
  allowedTypes: o,
37
36
  enumOnly: s,
38
37
  scope: t
@@ -99,7 +98,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
99
98
  }),
100
99
  [a, n, o, s, t]
101
100
  );
102
- }, P = "data-column-dnd-container", y = 100, Ct = ({
101
+ }, P = "data-column-dnd-container", y = 100, ht = ({
103
102
  columnPinning: o,
104
103
  columnSizing: s
105
104
  }) => {
@@ -155,7 +154,7 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
155
154
  top: n.top,
156
155
  height: n.height
157
156
  };
158
- }, _ = "th[data-column-id]", bt = () => {
157
+ }, _ = "th[data-column-id]", Ct = () => {
159
158
  const { active: o, over: s } = D(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = v(null);
160
159
  return T(() => {
161
160
  if (!t || !n || t === n) {
@@ -180,11 +179,11 @@ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(
180
179
  };
181
180
  export {
182
181
  _ as C,
183
- bt as T,
182
+ Ct as T,
184
183
  P as a,
185
184
  O as b,
186
- ht as c,
185
+ gt as c,
187
186
  F as g,
188
187
  B as i,
189
- Ct as u
188
+ ht as u
190
189
  };
@@ -1,7 +1,7 @@
1
- import { jsx as l, jsxs as d, Fragment as k } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
2
  import { useState as A, useMemo as D } from "react";
3
3
  import { Button as $ } from "@ynput/ayon-react-components";
4
- import { S as x, D as O, f as T, F as L, h as E, C as P, i as M, j as R, k as I, l as _ } from "./DeleteEntitiesContextInstance.es.js";
4
+ import { S as V, D as x, f as E, F as O, h as T, C as P, i as M, j as R, k as I, l as _ } from "./DeleteEntitiesContextInstance.es.js";
5
5
  import "lodash";
6
6
  import "primereact/confirmdialog";
7
7
  import "react-toastify";
@@ -20,7 +20,8 @@ const te = [
20
20
  "advancedFilters",
21
21
  "listAttributes",
22
22
  "commentCategories",
23
- "columnSummaries"
23
+ "columnSummaries",
24
+ "entityLinks"
24
25
  ], oe = {
25
26
  annotations: {
26
27
  label: "Annotations",
@@ -81,8 +82,13 @@ const te = [
81
82
  label: "Column Summaries",
82
83
  description: "Aggregate each column totals, averages, distributions in a summary footer.",
83
84
  bullet: "Per-column summary footer"
85
+ },
86
+ entityLinks: {
87
+ label: "Entity Links",
88
+ description: "Press G on any entity for a graph of everything linked to it, or L to see and edit its links in columns, including the links of everything below a folder.",
89
+ bullet: "See and edit links of any entity"
84
90
  }
85
- }, g = [
91
+ }, C = [
86
92
  "folder",
87
93
  "task",
88
94
  "product",
@@ -96,7 +102,7 @@ const te = [
96
102
  }
97
103
  const r = {};
98
104
  for (const e of o) r[e.entityType] = (r[e.entityType] || 0) + 1;
99
- const a = g.filter((e) => r[e] > 0).map(
105
+ const a = C.filter((e) => r[e] > 0).map(
100
106
  (e) => u(r[e], e)
101
107
  );
102
108
  return G(a);
@@ -108,7 +114,7 @@ const te = [
108
114
  for (const s of r)
109
115
  e("folder", s.totalFolderCount), e("task", s.totalTaskCount), e("product", s.totalProductCount), e("version", s.totalVersionCount);
110
116
  return a;
111
- }, H = (o) => g.reduce((r, a) => r + (o[a] || 0), 0), C = 8, ie = (o, r) => {
117
+ }, H = (o) => C.reduce((r, a) => r + (o[a] || 0), 0), g = 8, ie = (o, r) => {
112
118
  if (o.length === 0) return [];
113
119
  const a = new Map(r.map((t) => [t.id, t])), e = o.length > 1, s = [];
114
120
  for (const t of o) {
@@ -119,7 +125,7 @@ const te = [
119
125
  } else
120
126
  t.hasChildren && s.push(`${m}child folders`), t.taskNames && t.taskNames.length > 0 && s.push(`${m}${u(t.taskNames.length, "task")}`);
121
127
  }
122
- return s.length > C ? [...s.slice(0, C), `…and ${s.length - C} more`] : s;
128
+ return s.length > g ? [...s.slice(0, g), `…and ${s.length - g} more`] : s;
123
129
  }, q = (o, r) => {
124
130
  const a = (o ?? "").trim();
125
131
  return a !== "" && Number(a) === r;
@@ -135,14 +141,14 @@ const te = [
135
141
  expectedName: n,
136
142
  deleteLabel: f = "Delete forever",
137
143
  message: m
138
- } = o, [p, c] = A(""), [v, j] = A({}), w = D(
139
- () => g.filter((i) => (t[i] || 0) > 0),
144
+ } = o, [p, c] = A(""), [y, j] = A({}), v = D(
145
+ () => C.filter((i) => (t[i] || 0) > 0),
140
146
  [t]
141
- ), h = D(() => H(t), [t]), b = h > T, y = !!n && !b, F = b ? w.every((i) => q(v[i], t[i])) : y ? p.trim() === n : !0, S = (i) => {
142
- i.key === "Enter" && F && (i.preventDefault(), r());
147
+ ), h = D(() => H(t), [t]), b = h > E, w = !!n && !b, k = b ? v.every((i) => q(y[i], t[i])) : w ? p.trim() === n : !0, S = (i) => {
148
+ i.key === "Enter" && k && (i.preventDefault(), r());
143
149
  };
144
150
  return /* @__PURE__ */ l(
145
- x,
151
+ V,
146
152
  {
147
153
  size: "md",
148
154
  isOpen: !0,
@@ -151,9 +157,9 @@ const te = [
151
157
  footer: (
152
158
  // keydown lives here, not on the dialog — dialog spreads rest props over its own
153
159
  // handler and would lose escape-to-close
154
- /* @__PURE__ */ d(L, { onKeyDown: S, children: [
155
- y && /* @__PURE__ */ d(k, { children: [
156
- /* @__PURE__ */ d(E, { htmlFor: "delete-confirm-name-input", children: [
160
+ /* @__PURE__ */ d(O, { onKeyDown: S, children: [
161
+ w && /* @__PURE__ */ d(F, { children: [
162
+ /* @__PURE__ */ d(T, { htmlFor: "delete-confirm-name-input", children: [
157
163
  "To confirm delete action, type '",
158
164
  n,
159
165
  "' in the box below"
@@ -170,19 +176,19 @@ const te = [
170
176
  }
171
177
  )
172
178
  ] }),
173
- b && /* @__PURE__ */ d(k, { children: [
174
- /* @__PURE__ */ l(E, { as: "p", children: "To confirm, type how many of each will be deleted, children included" }),
175
- /* @__PURE__ */ l(M, { children: w.map((i, z) => /* @__PURE__ */ d(R, { children: [
179
+ b && /* @__PURE__ */ d(F, { children: [
180
+ /* @__PURE__ */ l(T, { as: "p", children: "To confirm, type how many of each will be deleted, children included" }),
181
+ /* @__PURE__ */ l(M, { children: v.map((i, L) => /* @__PURE__ */ d(R, { children: [
176
182
  /* @__PURE__ */ l("span", { children: `${i[0].toUpperCase()}${i.slice(1)}s - ${t[i]}` }),
177
183
  /* @__PURE__ */ l(
178
184
  I,
179
185
  {
180
186
  "data-testid": `delete-confirm-count-${i}`,
181
- autoFocus: z === 0,
187
+ autoFocus: L === 0,
182
188
  inputMode: "numeric",
183
- value: v[i] ?? "",
189
+ value: y[i] ?? "",
184
190
  placeholder: `Number of ${i}s`,
185
- onChange: (N) => j((V) => ({ ...V, [i]: N.target.value }))
191
+ onChange: (z) => j((N) => ({ ...N, [i]: z.target.value }))
186
192
  }
187
193
  )
188
194
  ] }, i)) })
@@ -196,19 +202,19 @@ const te = [
196
202
  variant: "danger",
197
203
  label: f,
198
204
  onClick: r,
199
- disabled: !F
205
+ disabled: !k
200
206
  }
201
207
  )
202
208
  ] })
203
209
  ] })
204
210
  ),
205
211
  children: /* @__PURE__ */ l(
206
- O,
212
+ x,
207
213
  {
208
214
  entityLabel: e,
209
215
  childrenDetails: s,
210
216
  message: m,
211
- totalLine: h > T ? (
217
+ totalLine: h > E ? (
212
218
  // versions cascaded from products are not countable, so the total is a floor
213
219
  `This deletes ${(t.product || 0) > 0 ? "at least " : ""}${h} entities in total.`
214
220
  ) : void 0
@@ -218,7 +224,7 @@ const te = [
218
224
  );
219
225
  };
220
226
  export {
221
- g as D,
227
+ C as D,
222
228
  te as a,
223
229
  re as b,
224
230
  ie as c,
@@ -9,7 +9,7 @@ import { confirmDialog as de } from "primereact/confirmdialog";
9
9
  import { toast as z } from "react-toastify";
10
10
  import "uuid";
11
11
  import { be as T, a as ue } from "./searchTerms.es.js";
12
- import { cL as pe } from "./getUris.es.js";
12
+ import { cN 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";
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { toast as d } from "react-toastify";
3
3
  import "./searchTerms.es.js";
4
- import { bB as p } from "./getUris.es.js";
4
+ import { bC as p } from "./getUris.es.js";
5
5
  import "primereact/confirmdialog";
6
6
  import { Dialog as f } from "@ynput/ayon-react-components";
7
7
  import { J as u } from "./JsonViewer.es.js";
@@ -1,11 +1,12 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { theme as h, Icon as s } from "@ynput/ayon-react-components";
3
- import i from "clsx";
2
+ import { theme as h, Icon as i } from "@ynput/ayon-react-components";
3
+ import s from "clsx";
4
4
  import "lodash";
5
5
  import "primereact/confirmdialog";
6
6
  import "react-toastify";
7
7
  import "uuid";
8
8
  import { bi as g } from "./searchTerms.es.js";
9
+ import "react";
9
10
  import u from "styled-components";
10
11
  const l = u.div`
11
12
  position: absolute;
@@ -50,30 +51,30 @@ const l = u.div`
50
51
  margin-top: -16px;
51
52
  }
52
53
  }
53
- `, P = ({
54
+ `, R = ({
54
55
  icon: d,
55
56
  message: o,
56
57
  error: n,
57
58
  ynputError: m = !0,
58
- children: a,
59
+ children: t,
59
60
  pt: p,
60
- className: t,
61
+ className: a,
61
62
  ...c
62
- }) => n ? /* @__PURE__ */ e(l, { className: i(t, "empty-placeholder", "isError"), ...c, children: [
63
- /* @__PURE__ */ r(s, { icon: "error", className: "placeholder-icon" }),
63
+ }) => n ? /* @__PURE__ */ e(l, { className: s(a, "empty-placeholder", "isError"), ...c, children: [
64
+ /* @__PURE__ */ r(i, { icon: "error", className: "placeholder-icon" }),
64
65
  /* @__PURE__ */ r("h3", { children: "Something went wrong." }),
65
66
  /* @__PURE__ */ e("span", { className: "error-message", ...p?.error, children: [
66
67
  "ERROR: ",
67
68
  g(n) || "Unknown error"
68
69
  ] }),
69
70
  m && /* @__PURE__ */ r("span", { children: "This should not happen. Please send a screenshot to the Ynput team!" }),
70
- a
71
- ] }) : /* @__PURE__ */ e(l, { className: i(t, "empty-placeholder"), ...c, children: [
72
- /* @__PURE__ */ r(s, { icon: d || "info", className: "placeholder-icon" }),
71
+ t
72
+ ] }) : /* @__PURE__ */ e(l, { className: s(a, "empty-placeholder"), ...c, children: [
73
+ /* @__PURE__ */ r(i, { icon: d || "info", className: "placeholder-icon" }),
73
74
  /* @__PURE__ */ r("h3", { children: typeof o == "object" ? JSON.stringify(o) : o }),
74
- a
75
+ t
75
76
  ] });
76
77
  export {
77
- P as E,
78
+ R as E,
78
79
  l as P
79
80
  };