@ynput/ayon-frontend-shared 0.5.0 → 0.6.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 (74) hide show
  1. package/dist/DetailsPanel.es.js +88 -86
  2. package/dist/Feed.es.js +22 -22
  3. package/dist/ListTable.es.js +77 -67
  4. package/dist/ProjectTreeTable.es.js +1164 -1150
  5. package/dist/Slicer.es.js +2 -2
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +331 -329
  8. package/dist/chunks/Actions.es.js +23 -23
  9. package/dist/chunks/DeleteEntitiesContext.es.js +115 -115
  10. package/dist/chunks/DetailsDialog.es.js +3 -3
  11. package/dist/chunks/DetailsPanelContext.es.js +155 -0
  12. package/dist/chunks/EntityPath.es.js +20 -20
  13. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  14. package/dist/chunks/EntityTooltip.es.js +12 -12
  15. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  16. package/dist/chunks/Feed.es.js +2208 -2611
  17. package/dist/chunks/FilterErrorActions.es.js +1 -1
  18. package/dist/chunks/GlobalContext.es.js +14 -14
  19. package/dist/chunks/Menu.es.js +1 -1
  20. package/dist/chunks/MenuContext.es.js +51 -242
  21. package/dist/chunks/MenuItem.es.js +1 -1
  22. package/dist/chunks/MetaWidget.es.js +3341 -3899
  23. package/dist/chunks/NewEntityContext.es.js +40 -40
  24. package/dist/chunks/PlayableIcon.es.js +4261 -1163
  25. package/dist/chunks/ProjectContext.es.js +13 -13
  26. package/dist/chunks/ProjectFoldersContext.es.js +5 -5
  27. package/dist/chunks/RepresentationsList.es.js +3 -3
  28. package/dist/chunks/ReviewablesSelector.es.js +85 -76
  29. package/dist/chunks/SimpleForm.es.js +9 -9
  30. package/dist/chunks/SimpleTable.es.js +1 -1
  31. package/dist/chunks/Slicer.es.js +173 -171
  32. package/dist/chunks/TableSettingsFallback.es.js +6 -6
  33. package/dist/chunks/ThumbnailSimple.es.js +410 -61
  34. package/dist/chunks/VersionUploadContext.es.js +29 -29
  35. package/dist/chunks/ViewsContext.es.js +90 -90
  36. package/dist/chunks/Watchers.es.js +628 -598
  37. package/dist/chunks/entityDefinitions.es.js +31 -31
  38. package/dist/chunks/expandRelativeDates.es.js +27 -0
  39. package/dist/chunks/getBundleMode.es.js +16 -61
  40. package/dist/chunks/getUris.es.js +271 -269
  41. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  42. package/dist/chunks/searchTerms.es.js +177 -173
  43. package/dist/chunks/uriUtils.es.js +48 -0
  44. package/dist/chunks/useAttributeEnums.es.js +11 -11
  45. package/dist/chunks/useColumnDragRestriction.es.js +37 -27
  46. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  47. package/dist/chunks/useLocalStorage.es.js +9 -9
  48. package/dist/chunks/useSessionStorage.es.js +61 -0
  49. package/dist/chunks/viewUpdateHelper.es.js +19 -19
  50. package/dist/components.es.js +165 -160
  51. package/dist/context.es.js +60 -58
  52. package/dist/hooks.es.js +104 -98
  53. package/dist/index.es.js +18 -13
  54. package/dist/types/Actions.d.ts +16 -16
  55. package/dist/types/ContextMenu.d.ts +16 -16
  56. package/dist/types/DetailsPanel.d.ts +16 -16
  57. package/dist/types/EntityPickerDialog.d.ts +16 -16
  58. package/dist/types/Feed.d.ts +16 -16
  59. package/dist/types/ListTable.d.ts +16 -16
  60. package/dist/types/NewEntity.d.ts +16 -16
  61. package/dist/types/ProjectTreeTable.d.ts +20 -16
  62. package/dist/types/RepresentationsList.d.ts +16 -16
  63. package/dist/types/SimpleTable.d.ts +16 -16
  64. package/dist/types/Slicer.d.ts +16 -16
  65. package/dist/types/Views.d.ts +17 -17
  66. package/dist/types/api.d.ts +391 -95
  67. package/dist/types/components.d.ts +79 -20
  68. package/dist/types/context.d.ts +60 -17
  69. package/dist/types/hooks.d.ts +16 -16
  70. package/dist/types/index.d.ts +16 -16
  71. package/dist/types/util.d.ts +16 -16
  72. package/dist/util.es.js +108 -97
  73. package/package.json +16 -4
  74. package/dist/chunks/mentionTypeOptions.es.js +0 -15
@@ -1,6 +1,7 @@
1
1
  import { getFilterFromId as I, SEARCH_FILTER_ID as M } from "@ynput/ayon-react-components";
2
- import { d as D, c as S, i as F, r as A } from "./PlayableIcon.es.js";
3
- import { parseISO as f, isValid as h, format as m } from "date-fns";
2
+ import { d as D } from "./PlayableIcon.es.js";
3
+ import { c as S, i as F, r as A } from "./expandRelativeDates.es.js";
4
+ import { parseISO as f, isValid as m, format as h } from "date-fns";
4
5
  const V = "no-date", T = (e, n) => {
5
6
  if (!n.values || n.values.length === 0) return null;
6
7
  const t = n.values.flatMap((r) => {
@@ -19,7 +20,7 @@ const V = "no-date", T = (e, n) => {
19
20
  conditions: t,
20
21
  operator: n.inverted ? "or" : "and"
21
22
  };
22
- }, Y = (e) => !e || e.length === 0 ? {} : {
23
+ }, G = (e) => !e || e.length === 0 ? {} : {
23
24
  conditions: e.filter((t) => !!t.values?.length).filter((t) => t.id !== "hierarchy").flatMap((t) => $(t)),
24
25
  operator: "and"
25
26
  }, N = (e) => ({
@@ -161,9 +162,9 @@ const V = "no-date", T = (e, n) => {
161
162
  g = c.label;
162
163
  else {
163
164
  const v = f(p), y = f(a);
164
- if (h(v) && h(y)) {
165
+ if (m(v) && m(y)) {
165
166
  const w = (/* @__PURE__ */ new Date()).getFullYear(), O = y.getFullYear() === w ? "MMM d" : "MMM d, yyyy";
166
- g = `${m(v, "MMM d")} – ${m(y, O)}`;
167
+ g = `${h(v, "MMM d")} – ${h(y, O)}`;
167
168
  }
168
169
  }
169
170
  }
@@ -174,13 +175,13 @@ const V = "no-date", T = (e, n) => {
174
175
  ...p ? [
175
176
  {
176
177
  id: p,
177
- label: h(f(p)) ? m(f(p), "MMM d, yyyy") : p
178
+ label: m(f(p)) ? h(f(p), "MMM d, yyyy") : p
178
179
  }
179
180
  ] : [],
180
181
  ...a ? [
181
182
  {
182
183
  id: a,
183
- label: h(f(a)) ? m(f(a), "MMM d, yyyy") : a
184
+ label: m(f(a)) ? h(f(a), "MMM d, yyyy") : a
184
185
  }
185
186
  ] : []
186
187
  ]
@@ -267,10 +268,10 @@ const V = "no-date", T = (e, n) => {
267
268
  if (t.type === "datetime" && typeof l == "string")
268
269
  try {
269
270
  const i = f(l);
270
- if (h(i))
271
+ if (m(i))
271
272
  return {
272
273
  id: s,
273
- label: m(i, "MMM d, yyyy"),
274
+ label: h(i, "MMM d, yyyy"),
274
275
  isCustom: !0
275
276
  };
276
277
  } catch {
@@ -283,7 +284,7 @@ const V = "no-date", T = (e, n) => {
283
284
  });
284
285
  }, L = (e, n) => e ? ["ne", "notin", "excludes", "excludesall", "excludesany", "notnull"].includes(e) : !1, W = (e, n) => n?.startsWith("list_of_") && (e === "includesall" || e === "excludesall") ? "AND" : "OR";
285
286
  export {
286
- Y as a,
287
+ G as a,
287
288
  q as b,
288
289
  T as c,
289
290
  k as q,