@ynput/ayon-frontend-shared 0.6.8 → 0.7.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 (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. package/dist/chunks/MenuItem.es.js +0 -420
@@ -3,19 +3,20 @@ import { useState as z, forwardRef as Ue, useRef as ce, useEffect as Le, useLayo
3
3
  import { isEmpty as Ce } from "lodash";
4
4
  import "primereact/confirmdialog";
5
5
  import { toast as me } from "react-toastify";
6
- import { g as Xe, R as je } from "./chunks/realtimeUpdatesUtils.es.js";
6
+ import { g as Xe, R as Me } from "./chunks/realtimeUpdatesUtils.es.js";
7
7
  import { p as be, c as Ze, a as Ge } from "./chunks/iconUtils.es.js";
8
- import { bj as Qe } from "./chunks/searchTerms.es.js";
9
- import { dp as Ye } from "./chunks/getUris.es.js";
8
+ import { bt as Qe } from "./chunks/searchTerms.es.js";
9
+ import { du as Ye } from "./chunks/getUris.es.js";
10
10
  import "@module-federation/enhanced/runtime";
11
- import { Dropdown as De, Icon as Q, InputText as he, Button as fe, InputSwitch as Te, InputNumber as Me, Spacer as $e, theme as qe, Dialog as et, ShortcutTag as tt, Toolbar as nt, SaveButton as at } from "@ynput/ayon-react-components";
12
- import { x as Ne, y as ze, M as rt } from "./chunks/DeleteEntitiesContextInstance.es.js";
11
+ import { Dropdown as De, Icon as Q, InputText as he, Button as fe, InputSwitch as Te, InputNumber as je, Spacer as $e, theme as qe, Dialog as et, ShortcutTag as tt, Toolbar as nt, SaveButton as at } from "@ynput/ayon-react-components";
12
+ import { x as Ne, y as ze, M as rt } from "./chunks/TableExportContextInstance.es.js";
13
13
  import "semver";
14
14
  import "./chunks/ContextMenuContextInstance.es.js";
15
15
  import Ae from "clsx";
16
16
  import "uuid";
17
17
  import "react-dom";
18
18
  import "react-redux";
19
+ import "react-router-dom";
19
20
  import { f as ot, d as st, C as lt, g as it, h as ct, p as dt } from "./chunks/MetaWidget.es.js";
20
21
  import { N as pt, u as ft } from "./chunks/NewEntityContextInstance.es.js";
21
22
  import E from "styled-components";
@@ -24,14 +25,14 @@ import "./chunks/PlayableIcon.es.js";
24
25
  import "date-fns";
25
26
  import "lexical";
26
27
  import "@lexical/markdown";
27
- import "@lexical/react/LexicalBlockWithAlignableContents";
28
- import "@lexical/react/LexicalDecoratorBlockNode";
29
28
  import "match-sorter";
30
29
  import "@lexical/code";
31
30
  import "@lexical/list";
32
31
  import "@lexical/rich-text";
33
32
  import "@lexical/selection";
34
33
  import "@lexical/utils";
34
+ import "@lexical/react/LexicalBlockWithAlignableContents";
35
+ import "@lexical/react/LexicalDecoratorBlockNode";
35
36
  import { u as ht } from "./chunks/useHierarchySelection.es.js";
36
37
  import { n as te } from "./chunks/entityDefinitions.es.js";
37
38
  import "@tanstack/react-table";
@@ -42,7 +43,7 @@ const Ee = (i, m, u) => {
42
43
  for (let q = 0; q < u; q++) {
43
44
  const v = h + q * D, O = i.match(/\d+$/);
44
45
  if (!O) return [];
45
- const M = String(v).padStart(O[0].length, "0"), W = i.replace(/\d+$/, M);
46
+ const j = String(v).padStart(O[0].length, "0"), W = i.replace(/\d+$/, j);
46
47
  r.push(W);
47
48
  }
48
49
  return r;
@@ -52,8 +53,8 @@ const Ee = (i, m, u) => {
52
53
  (w) => w.name === m
53
54
  );
54
55
  return c ? c.name : "";
55
- }, xn = ({ children: i }) => {
56
- const { projectName: m, ...u } = Ne(), { attribFields: c } = ot(), { findNonInheritedValues: w, getFolderById: h } = ze(), { attrib: n = {}, statuses: D } = u || {}, { anatomy: r } = Ne(), { entity_naming: q = { capitalization: "lower", separator: "_" } } = r, { rowSelection: v, sliceType: O } = st(), M = D?.filter((a) => a.scope?.includes("task"))?.[0]?.name || D?.[0]?.name || "none", W = D?.filter((a) => a.scope?.includes("folder"))?.[0]?.name || D?.[0]?.name || "none", [F, R] = z(null), [p, K] = z(null), L = { label: "", subType: "", name: "" }, [b, ne] = z(L), [H, J] = z({
56
+ }, wn = ({ children: i }) => {
57
+ const { projectName: m, ...u } = Ne(), { attribFields: c } = ot(), { findNonInheritedValues: w, getFolderById: h } = ze(), { attrib: n = {}, statuses: D } = u || {}, { anatomy: r } = Ne(), { entity_naming: q = { capitalization: "lower", separator: "_" } } = r, { rowSelection: v, sliceType: O } = st(), j = D?.filter((a) => a.scope?.includes("task"))?.[0]?.name || D?.[0]?.name || "none", W = D?.filter((a) => a.scope?.includes("folder"))?.[0]?.name || D?.[0]?.name || "none", [F, R] = z(null), [p, K] = z(null), L = { label: "", subType: "", name: "" }, [b, ne] = z(L), [H, J] = z({
57
58
  active: !1,
58
59
  increment: "",
59
60
  length: 10,
@@ -122,7 +123,7 @@ const Ee = (i, m, u) => {
122
123
  const o = a.filter((C) => C.entityType === "folder"), g = a.filter((C) => C.entityType === "task"), s = (C, I) => {
123
124
  let P = [];
124
125
  for (const l of C) {
125
- const Z = I === "folder" ? l.data.parentId : l.data.folderId, A = k.get(Z) || n, j = Object.keys(A).reduce((N, V) => {
126
+ const Z = I === "folder" ? l.data.parentId : l.data.folderId, A = k.get(Z) || n, M = Object.keys(A).reduce((N, V) => {
126
127
  const oe = c.find((pe) => pe.name === V);
127
128
  if (!oe) return N;
128
129
  const ye = oe.scope?.includes(I), se = !!oe.data.inherit;
@@ -152,7 +153,7 @@ const Ee = (i, m, u) => {
152
153
  ownAttrib: [],
153
154
  path: N,
154
155
  tags: [],
155
- attrib: j,
156
+ attrib: M,
156
157
  links: []
157
158
  // Add empty links object
158
159
  }
@@ -173,7 +174,7 @@ const Ee = (i, m, u) => {
173
174
  active: !0,
174
175
  assignees: l.data.assignees || [],
175
176
  projectName: m,
176
- status: l.data.status || M,
177
+ status: l.data.status || j,
177
178
  folder: {
178
179
  path: l.data.folderId ? d[l.data.folderId] : "",
179
180
  folderType: ""
@@ -185,12 +186,12 @@ const Ee = (i, m, u) => {
185
186
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
186
187
  thumbnailHash: "",
187
188
  subtasks: [],
188
- attrib: j,
189
+ attrib: M,
189
190
  hasReviewables: !1,
190
191
  // Add required field
191
192
  links: [],
192
193
  // Add empty links object
193
- allAttrib: JSON.stringify(j),
194
+ allAttrib: JSON.stringify(M),
194
195
  parents: []
195
196
  }
196
197
  };
@@ -313,7 +314,7 @@ const Ee = (i, m, u) => {
313
314
  dataKey: "name",
314
315
  value: i,
315
316
  valueStyle: c,
316
- onChange: (M) => u(M[0]),
317
+ onChange: (j) => u(j[0]),
317
318
  disabled: h,
318
319
  isChanged: D,
319
320
  placeholder: n,
@@ -484,7 +485,7 @@ const Ct = ({
484
485
  prefixDisabled: q,
485
486
  typeSelectRef: v,
486
487
  onLastInputKeydown: O,
487
- folders: M,
488
+ folders: j,
488
489
  ...W
489
490
  }) => {
490
491
  const { base: F, increment: R, length: p, type: K, id: L, prefix: b, prefixDepth: ne, parentBases: H } = W, J = W.entityType, X = !n && D || q;
@@ -497,14 +498,14 @@ const Ct = ({
497
498
  const C = { [_]: S }, I = { ...W, ...C };
498
499
  if (_ === "type") {
499
500
  let P = !1;
500
- const l = M.find((j) => j.name === S);
501
- for (const j of M) {
501
+ const l = j.find((M) => M.name === S);
502
+ for (const M of j) {
502
503
  if (I.base === "") {
503
504
  P = !0;
504
505
  break;
505
506
  }
506
- for (const N in j)
507
- if (typeof j[N] == "string" && I.base?.toLowerCase().includes(j[N].toLowerCase())) {
507
+ for (const N in M)
508
+ if (typeof M[N] == "string" && I.base?.toLowerCase().includes(M[N].toLowerCase())) {
508
509
  P = !0;
509
510
  break;
510
511
  }
@@ -514,7 +515,7 @@ const Ct = ({
514
515
  I.base = Z + A.base, I.increment = Z + A.increment, I.length = A.length;
515
516
  }
516
517
  if (_ === "base") {
517
- const P = Re(I.type), l = String(S), Z = l.replace(/[^a-zA-Z]/g, ""), A = l.replace(/[^0-9]/g, ""), j = parseInt(A, 10), N = A.length, V = Z + (j + P.difference).toString().padStart(N, "0");
518
+ const P = Re(I.type), l = String(S), Z = l.replace(/[^a-zA-Z]/g, ""), A = l.replace(/[^0-9]/g, ""), M = parseInt(A, 10), N = A.length, V = Z + (M + P.difference).toString().padStart(N, "0");
518
519
  I.increment = V.replace("NaN", "");
519
520
  }
520
521
  if (i(
@@ -558,7 +559,7 @@ const Ct = ({
558
559
  {
559
560
  value: [K],
560
561
  onChange: (s) => B({ target: { value: s, id: "type" } }),
561
- options: M,
562
+ options: j,
562
563
  style: { width: 160 },
563
564
  align: "right"
564
565
  }
@@ -633,7 +634,7 @@ const Ct = ({
633
634
  {
634
635
  value: [K],
635
636
  onChange: (s) => B({ target: { value: s, id: "type" } }),
636
- options: M,
637
+ options: j,
637
638
  style: { width: 160 },
638
639
  align: "right",
639
640
  ref: v
@@ -662,7 +663,7 @@ const Ct = ({
662
663
  n && b && /* @__PURE__ */ f(re, { children: [
663
664
  /* @__PURE__ */ t("label", { children: "Depth" }),
664
665
  /* @__PURE__ */ t(
665
- Me,
666
+ je,
666
667
  {
667
668
  value: ne,
668
669
  id: "prefixDepth",
@@ -706,7 +707,7 @@ const Ct = ({
706
707
  /* @__PURE__ */ f(re, { children: [
707
708
  /* @__PURE__ */ t("label", { children: "Count" }),
708
709
  /* @__PURE__ */ t(
709
- Me,
710
+ je,
710
711
  {
711
712
  value: p,
712
713
  id: "length",
@@ -836,7 +837,7 @@ const Ct = ({
836
837
  labelRef: w,
837
838
  nameInfo: h = ""
838
839
  }) => {
839
- const n = Je(), [D, r] = z(!1), [q, v] = z(void 0), O = ce(null), M = () => {
840
+ const n = Je(), [D, r] = z(!1), [q, v] = z(void 0), O = ce(null), j = () => {
840
841
  r(!0), u(!0), v(m.name), setTimeout(() => {
841
842
  O.current && (O.current.focus(), O.current.select());
842
843
  }, 0);
@@ -845,14 +846,14 @@ const Ct = ({
845
846
  (!K || !O.current?.contains(K)) && (r(!1), u(!1), v(void 0));
846
847
  }, F = (p) => {
847
848
  if (p.key === "ArrowDown" && !p.altKey || p.key === "Tab") {
848
- p.preventDefault(), M();
849
+ p.preventDefault(), j();
849
850
  return;
850
851
  }
851
852
  c(p, !0);
852
853
  }, R = (p) => {
853
854
  if (p.key === "Enter" || p.key === "Escape" || p.key === "ArrowUp" && !p.altKey) {
854
855
  if (p.stopPropagation(), p.key === "Enter" && !D)
855
- return M();
856
+ return j();
856
857
  p.key === "Escape" && q !== void 0 && i(q, "name"), r(!1), u(!1), v(void 0), setTimeout(() => {
857
858
  w.current?.focus();
858
859
  const K = m.label.length || 0;
@@ -888,7 +889,7 @@ const Ct = ({
888
889
  onBlur: W,
889
890
  style: { flex: 1 }
890
891
  }
891
- ) : /* @__PURE__ */ f(Et, { onClick: M, tabIndex: 0, children: [
892
+ ) : /* @__PURE__ */ f(Et, { onClick: j, tabIndex: 0, children: [
892
893
  m.name,
893
894
  " ",
894
895
  /* @__PURE__ */ t(Q, { icon: "edit" })
@@ -933,7 +934,7 @@ const Ct = ({
933
934
  align-items: center;
934
935
  min-height: 32px;
935
936
  color: var(--md-sys-color-outline);
936
- `, jt = E.span`
937
+ `, Mt = E.span`
937
938
  display: flex;
938
939
  align-items: center;
939
940
  gap: var(--base-gap-small);
@@ -949,7 +950,7 @@ const Ct = ({
949
950
  &.disabled {
950
951
  opacity: 0.5;
951
952
  }
952
- `, wn = ({
953
+ `, vn = ({
953
954
  disabled: i,
954
955
  onNewEntities: m,
955
956
  showButton: u = !0,
@@ -963,7 +964,7 @@ const Ct = ({
963
964
  setEntityForm: q,
964
965
  sequenceForm: v,
965
966
  setSequenceForm: O,
966
- onCreateNew: M,
967
+ onCreateNew: j,
967
968
  onOpenNew: W,
968
969
  config: F,
969
970
  parentFolderIds: R
@@ -971,11 +972,11 @@ const Ct = ({
971
972
  if (R !== null) return R;
972
973
  const e = L ? Array.from(L).map((T) => dt(T)) : [], x = Array.from(
973
974
  new Set(
974
- e.filter((T) => T && T.colId !== je).map((T) => T?.rowId).filter(Boolean)
975
+ e.filter((T) => T && T.colId !== Me).map((T) => T?.rowId).filter(Boolean)
975
976
  )
976
977
  ), $ = Array.from(
977
978
  new Set(
978
- e.filter((T) => T?.colId === je).map((T) => T?.rowId).filter(Boolean)
979
+ e.filter((T) => T?.colId === Me).map((T) => T?.rowId).filter(Boolean)
979
980
  )
980
981
  ), le = x.length > 0 ? x : $;
981
982
  if (le.length > 0) {
@@ -1015,7 +1016,7 @@ const Ct = ({
1015
1016
  r.name === ke && ($.name = be($.label, F));
1016
1017
  }
1017
1018
  setTimeout(() => {
1018
- j.current?.focus();
1019
+ M.current?.focus();
1019
1020
  }, 100);
1020
1021
  } else x === "label" ? ($.label = e, S || ($.name = be(e, F))) : x === "name" && (_(!0), $.name = e);
1021
1022
  q($);
@@ -1027,7 +1028,7 @@ const Ct = ({
1027
1028
  prefix: e.prefix,
1028
1029
  prefixDepth: e.prefixDepth
1029
1030
  });
1030
- }, A = ce(null), j = ce(null), N = () => {
1031
+ }, A = ce(null), M = ce(null), N = () => {
1031
1032
  D(null), q(C), O((e) => ({ ...e, active: !1 })), _(!1), a(null);
1032
1033
  }, V = () => setTimeout(() => A.current?.open(), 180), [oe, ye] = z(!1), se = async (e) => {
1033
1034
  const x = Ze(r.label);
@@ -1042,8 +1043,8 @@ const Ct = ({
1042
1043
  }
1043
1044
  ye(!0);
1044
1045
  try {
1045
- const T = await M(d);
1046
- m?.(T, e, d), e ? (j.current && (j.current.focus(), j.current.select()), _(!1)) : N();
1046
+ const T = await j(d);
1047
+ m?.(T, e, d), e ? (M.current && (M.current.focus(), M.current.select()), _(!1)) : N();
1047
1048
  } catch {
1048
1049
  } finally {
1049
1050
  ye(!1);
@@ -1098,7 +1099,7 @@ const Ct = ({
1098
1099
  /* @__PURE__ */ t("span", { children: "Create" })
1099
1100
  ] }),
1100
1101
  itemTemplate: (e) => /* @__PURE__ */ f(
1101
- jt,
1102
+ Mt,
1102
1103
  {
1103
1104
  className: e.disabled ? "disabled" : void 0,
1104
1105
  "data-tooltip": e.disabled ? e.disabledMessage : void 0,
@@ -1231,7 +1232,7 @@ const Ct = ({
1231
1232
  {
1232
1233
  handleChange: l,
1233
1234
  entityForm: r,
1234
- labelRef: j,
1235
+ labelRef: M,
1235
1236
  setNameFocused: s,
1236
1237
  handleKeyDown: pe,
1237
1238
  nameInfo: `Names are auto generated from the label using the Entity Naming setting on the project anatomy. Capitalization: ${F.capitalization}. Separator: "${F.separator}"`
@@ -1249,10 +1250,10 @@ export {
1249
1250
  we as InputLabel,
1250
1251
  Oe as InputsContainer,
1251
1252
  Nt as NameRow,
1252
- wn as NewEntity,
1253
+ vn as NewEntity,
1253
1254
  pt as NewEntityContext,
1254
1255
  Dt as NewEntityForm,
1255
- xn as NewEntityProvider,
1256
+ wn as NewEntityProvider,
1256
1257
  yt as generateLabel,
1257
1258
  te as newEntityDefinitions,
1258
1259
  ft as useNewEntityContext