@ynput/ayon-frontend-shared 0.7.4 → 0.7.6

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 (52) hide show
  1. package/dist/DetailsPanel.es.js +376 -380
  2. package/dist/ListTable.es.js +2 -2
  3. package/dist/NewEntity.es.js +26 -26
  4. package/dist/ProjectTreeTable.es.js +2521 -2510
  5. package/dist/ProjectsTable.es.js +3 -3
  6. package/dist/Slicer.es.js +32 -32
  7. package/dist/Views.es.js +1 -1
  8. package/dist/chunks/ColumnDropIndicator.es.js +2 -2
  9. package/dist/chunks/ColumnHeaderMenuUI.es.js +1 -1
  10. package/dist/chunks/EntityPath.es.js +1 -1
  11. package/dist/chunks/EntityPickerDialog.es.js +481 -460
  12. package/dist/chunks/EntityTooltip.es.js +1 -1
  13. package/dist/chunks/Feed.es.js +11 -10
  14. package/dist/chunks/FilterErrorActions.es.js +1 -1
  15. package/dist/chunks/GroupSettingsFallback.es.js +2 -2
  16. package/dist/chunks/Menu.es.js +250 -247
  17. package/dist/chunks/MetaWidget.es.js +2 -2
  18. package/dist/chunks/PlayableIcon.es.js +368 -368
  19. package/dist/chunks/ProjectFoldersContext.es.js +237 -0
  20. package/dist/chunks/ReviewablesSelector.es.js +1223 -1170
  21. package/dist/chunks/SimpleTable.es.js +301 -296
  22. package/dist/chunks/Slicer.es.js +418 -410
  23. package/dist/chunks/TableExportContextInstance.es.js +428 -382
  24. package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
  25. package/dist/chunks/Watchers.es.js +2 -2
  26. package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
  27. package/dist/components.es.js +1404 -1274
  28. package/dist/context.es.js +559 -657
  29. package/dist/hooks.es.js +2 -2
  30. package/dist/index.es.js +2 -2
  31. package/dist/types/Actions.d.ts +16 -16
  32. package/dist/types/ContextMenu.d.ts +16 -16
  33. package/dist/types/DetailsPanel.d.ts +16 -16
  34. package/dist/types/EntityPickerDialog.d.ts +61 -18
  35. package/dist/types/Feed.d.ts +16 -16
  36. package/dist/types/ListTable.d.ts +16 -16
  37. package/dist/types/NewEntity.d.ts +16 -16
  38. package/dist/types/ProjectTreeTable.d.ts +135 -33
  39. package/dist/types/ProjectsTable.d.ts +16 -16
  40. package/dist/types/RepresentationsList.d.ts +16 -16
  41. package/dist/types/SimpleTable.d.ts +16 -16
  42. package/dist/types/Slicer.d.ts +16 -16
  43. package/dist/types/Views.d.ts +16 -16
  44. package/dist/types/api.d.ts +16 -16
  45. package/dist/types/components.d.ts +226 -39
  46. package/dist/types/context.d.ts +24 -16
  47. package/dist/types/hooks.d.ts +16 -16
  48. package/dist/types/index.d.ts +16 -16
  49. package/dist/types/util.d.ts +16 -16
  50. package/package.json +3 -3
  51. package/dist/chunks/ProjectContext.es.js +0 -158
  52. package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
@@ -1256,22 +1256,6 @@ declare type WorkTemplate = {
1256
1256
  export { }
1257
1257
 
1258
1258
 
1259
- declare module '@tanstack/react-table' {
1260
- interface FilterFns {
1261
- fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
1262
- }
1263
- interface FilterMeta {
1264
- itemRank: RankingInfo;
1265
- }
1266
- interface TableMeta<TData extends RowData> {
1267
- isExpandable?: boolean;
1268
- isLoading?: boolean;
1269
- children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
1270
- [key: string]: any;
1271
- }
1272
- }
1273
-
1274
-
1275
1259
  declare module '@tanstack/react-table' {
1276
1260
  interface ColumnMeta<TData extends RowData, TValue> {
1277
1261
  addonColumn?: AddonColumnMeta;
@@ -1289,6 +1273,22 @@ declare module '@tanstack/react-table' {
1289
1273
  }
1290
1274
 
1291
1275
 
1276
+ declare module '@tanstack/react-table' {
1277
+ interface FilterFns {
1278
+ fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
1279
+ }
1280
+ interface FilterMeta {
1281
+ itemRank: RankingInfo;
1282
+ }
1283
+ interface TableMeta<TData extends RowData> {
1284
+ isExpandable?: boolean;
1285
+ isLoading?: boolean;
1286
+ children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
1287
+ [key: string]: any;
1288
+ }
1289
+ }
1290
+
1291
+
1292
1292
  declare global {
1293
1293
  interface Window {
1294
1294
  senderId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynput/ayon-frontend-shared",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "description": "Shared React components for AYON frontend",
5
5
  "repository": {
6
6
  "type": "git",
@@ -104,8 +104,8 @@
104
104
  "@reduxjs/toolkit": "2.11.2",
105
105
  "@rtk-query/graphql-request-base-query": "2.3.2",
106
106
  "@tanstack/react-table": "8.21.3",
107
- "@ynput/ayon-addon": "^0.1.0",
108
- "@ynput/ayon-react-components": "^1.23.0",
107
+ "@ynput/ayon-addon": "0.2.0",
108
+ "@ynput/ayon-react-components": "^1.25.0",
109
109
  "graphql-request": "7.4.0",
110
110
  "react": "18.3.1",
111
111
  "react-dom": "18.3.1",
@@ -1,158 +0,0 @@
1
- import { jsx as P } from "react/jsx-runtime";
2
- import { useState as M, useCallback as u } from "react";
3
- import { u as F } from "./useCreateContextMenu.es.js";
4
- import { T as S, P as _ } from "./TableExportContextInstance.es.js";
5
- import "./searchTerms.es.js";
6
- import { ca as w, c7 as B, dI as G } from "./getUris.es.js";
7
- import "primereact/confirmdialog";
8
- import "lodash";
9
- import "react-toastify";
10
- import { g as m } from "./getEntityTypeIcon.es.js";
11
- import "uuid";
12
- import "axios";
13
- const X = ({
14
- children: t,
15
- thumbnailInputRef: c,
16
- versionsInputRef: e,
17
- canUploadVersion: r = !1
18
- }) => {
19
- const [, a] = M(!1), [T] = F(), f = () => a(!1), d = () => {
20
- c?.current && (c.current.click(), a(!0));
21
- }, i = () => {
22
- e?.current && (e.current.click(), a(!0));
23
- }, l = (y) => {
24
- const s = [
25
- {
26
- label: "Upload thumbnail",
27
- icon: "add_photo_alternate",
28
- command: d
29
- },
30
- ...r ? [
31
- {
32
- label: "Upload version",
33
- icon: "upload",
34
- command: i
35
- }
36
- ] : []
37
- ];
38
- T(y, s);
39
- };
40
- return /* @__PURE__ */ P(
41
- S.Provider,
42
- {
43
- value: {
44
- resetFileUploadState: f,
45
- triggerThumbnailUpload: d,
46
- triggerVersionUpload: i,
47
- canUploadVersion: r,
48
- onContextMenu: l
49
- },
50
- children: t
51
- }
52
- );
53
- }, Q = {
54
- name: "",
55
- code: "",
56
- productTypes: [],
57
- folderTypes: [],
58
- taskTypes: [],
59
- tags: [],
60
- statuses: [],
61
- createdAt: "",
62
- updatedAt: "",
63
- active: !0,
64
- attrib: {},
65
- data: {},
66
- config: {},
67
- library: !1,
68
- linkTypes: [],
69
- ownAttrib: []
70
- };
71
- function j(t) {
72
- if (!t)
73
- return { productTypes: [], productBaseTypes: [] };
74
- const c = t.productTypes || [], e = /* @__PURE__ */ new Map();
75
- return c.forEach((r) => {
76
- e.has(r.baseType) || e.set(r.baseType, {
77
- name: r.baseType,
78
- icon: r.icon,
79
- color: r.color
80
- });
81
- }), {
82
- productTypes: c,
83
- productBaseTypes: Array.from(e.values())
84
- };
85
- }
86
- const Y = ({
87
- projectName: t,
88
- children: c
89
- }) => {
90
- const {
91
- data: e,
92
- isLoading: r,
93
- isFetching: a,
94
- isSuccess: T,
95
- isUninitialized: f,
96
- error: d,
97
- refetch: i
98
- } = w({ projectName: t }, { skip: !t }), { data: l = {}, refetch: y } = B(
99
- { projectName: t },
100
- { skip: !t }
101
- ), s = l.product_base_types?.default, { data: g } = G(
102
- { projectName: t },
103
- {
104
- skip: !t
105
- }
106
- ), { productTypes: p, productBaseTypes: b } = j(g), h = u(
107
- (n) => e?.folderTypes?.find((o) => o.name === n),
108
- [e]
109
- ), k = u(
110
- (n) => e?.taskTypes?.find((o) => o.name === n),
111
- [e]
112
- ), v = u(
113
- (n) => {
114
- const o = p.find((C) => C.name === n);
115
- return {
116
- icon: o?.icon || s?.icon || m("product"),
117
- color: o?.color || s?.color
118
- };
119
- },
120
- [p, s]
121
- ), x = u(() => p.map((o) => ({
122
- value: o.name,
123
- label: o.name,
124
- icon: o.icon || s?.icon || m("product"),
125
- color: o.color || s?.color || ""
126
- })), [p, s]), U = u(() => {
127
- i(), y();
128
- }, [i, y]), A = {
129
- getFolderType: h,
130
- getTaskType: k,
131
- getProductType: v,
132
- getProductTypeOptions: x,
133
- refetch: U
134
- };
135
- return /* @__PURE__ */ P(
136
- _.Provider,
137
- {
138
- value: {
139
- ...Q,
140
- ...e,
141
- projectName: t,
142
- productTypes: p,
143
- productBaseTypes: b,
144
- anatomy: l,
145
- isLoading: r || a,
146
- isSuccess: T,
147
- isUninitialized: f,
148
- error: d,
149
- ...A
150
- },
151
- children: c
152
- }
153
- );
154
- };
155
- export {
156
- Y as P,
157
- X as T
158
- };
@@ -1,11 +0,0 @@
1
- import { useRef as a, useState as c, useEffect as f } from "react";
2
- const g = (e, n) => {
3
- const o = a(null), [u, r] = c(!1);
4
- return f(() => {
5
- const t = o.current;
6
- !t || Object.keys(e).some((s) => t[s] !== e[s]) || Object.keys(t).some((s) => t[s] !== e[s]) ? (o.current = { ...e }, r(n)) : n || r(!1);
7
- }, [Object.values(e).join(","), n]), u;
8
- };
9
- export {
10
- g as u
11
- };