@ynput/ayon-frontend-shared 0.7.0 → 0.7.2
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.
- package/dist/DetailsPanel.es.js +765 -739
- package/dist/ListTable.es.js +80 -80
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +1424 -1409
- package/dist/Views.es.js +572 -570
- package/dist/api.es.js +300 -298
- package/dist/chunks/Actions.es.js +5 -5
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EntityPath.es.js +14 -14
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +18 -18
- package/dist/chunks/Feed.es.js +2 -2
- package/dist/chunks/MetaWidget.es.js +2422 -2149
- package/dist/chunks/PlayableIcon.es.js +20 -20
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +2 -2
- package/dist/chunks/Slicer.es.js +2 -2
- package/dist/chunks/TableExportContextInstance.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +12 -12
- package/dist/chunks/Watchers.es.js +907 -855
- package/dist/chunks/getUris.es.js +1272 -1209
- package/dist/chunks/searchTerms.es.js +30 -66
- package/dist/chunks/useAttributeEnums.es.js +37 -37
- package/dist/chunks/viewUpdateHelper.es.js +10 -10
- package/dist/components.es.js +132 -131
- package/dist/context.es.js +76 -76
- package/dist/hooks.es.js +51 -50
- package/dist/types/ProjectTreeTable.d.ts +21 -1
- package/dist/types/Slicer.d.ts +6 -4
- package/dist/types/Views.d.ts +4 -0
- package/dist/types/api.d.ts +411 -438
- package/dist/types/components.d.ts +22 -0
- package/dist/types/context.d.ts +2 -0
- package/dist/types/hooks.d.ts +36 -1
- package/package.json +4 -4
|
@@ -231,9 +231,7 @@ const Zt = new s(`
|
|
|
231
231
|
name
|
|
232
232
|
deleted
|
|
233
233
|
active
|
|
234
|
-
attrib
|
|
235
|
-
fullName
|
|
236
|
-
}
|
|
234
|
+
attrib(names: ["fullName"])
|
|
237
235
|
}
|
|
238
236
|
files {
|
|
239
237
|
id
|
|
@@ -257,9 +255,7 @@ const Zt = new s(`
|
|
|
257
255
|
version {
|
|
258
256
|
thumbnailHash
|
|
259
257
|
status
|
|
260
|
-
attrib
|
|
261
|
-
comment
|
|
262
|
-
}
|
|
258
|
+
attrib(names: ["comment"])
|
|
263
259
|
}
|
|
264
260
|
}
|
|
265
261
|
`, { fragmentName: "ActivityFragment" }), At = new s(`
|
|
@@ -653,9 +649,7 @@ fragment VersionBase on VersionNode {
|
|
|
653
649
|
read
|
|
654
650
|
author {
|
|
655
651
|
name
|
|
656
|
-
attrib
|
|
657
|
-
fullName
|
|
658
|
-
}
|
|
652
|
+
attrib(names: ["fullName"])
|
|
659
653
|
}
|
|
660
654
|
origin {
|
|
661
655
|
id
|
|
@@ -684,13 +678,9 @@ fragment VersionBase on VersionNode {
|
|
|
684
678
|
active
|
|
685
679
|
hasReviewables
|
|
686
680
|
tags
|
|
687
|
-
attrib
|
|
688
|
-
priority
|
|
689
|
-
|
|
690
|
-
resolutionHeight
|
|
691
|
-
resolutionWidth
|
|
692
|
-
fps
|
|
693
|
-
}
|
|
681
|
+
attrib(
|
|
682
|
+
names: ["priority", "endDate", "resolutionHeight", "resolutionWidth", "fps"]
|
|
683
|
+
)
|
|
694
684
|
folder {
|
|
695
685
|
id
|
|
696
686
|
name
|
|
@@ -746,9 +736,7 @@ fragment VersionBase on VersionNode {
|
|
|
746
736
|
name
|
|
747
737
|
deleted
|
|
748
738
|
active
|
|
749
|
-
attrib
|
|
750
|
-
fullName
|
|
751
|
-
}
|
|
739
|
+
attrib(names: ["fullName"])
|
|
752
740
|
}
|
|
753
741
|
files {
|
|
754
742
|
id
|
|
@@ -772,9 +760,7 @@ fragment VersionBase on VersionNode {
|
|
|
772
760
|
version {
|
|
773
761
|
thumbnailHash
|
|
774
762
|
status
|
|
775
|
-
attrib
|
|
776
|
-
comment
|
|
777
|
-
}
|
|
763
|
+
attrib(names: ["comment"])
|
|
778
764
|
}
|
|
779
765
|
}`), $e = new s(`
|
|
780
766
|
query GetActivityUsers($projects: [String!]) {
|
|
@@ -782,9 +768,7 @@ fragment VersionBase on VersionNode {
|
|
|
782
768
|
edges {
|
|
783
769
|
node {
|
|
784
770
|
name
|
|
785
|
-
attrib
|
|
786
|
-
fullName
|
|
787
|
-
}
|
|
771
|
+
attrib(names: ["fullName"])
|
|
788
772
|
}
|
|
789
773
|
}
|
|
790
774
|
}
|
|
@@ -833,9 +817,7 @@ fragment VersionBase on VersionNode {
|
|
|
833
817
|
name
|
|
834
818
|
deleted
|
|
835
819
|
active
|
|
836
|
-
attrib
|
|
837
|
-
fullName
|
|
838
|
-
}
|
|
820
|
+
attrib(names: ["fullName"])
|
|
839
821
|
}
|
|
840
822
|
files {
|
|
841
823
|
id
|
|
@@ -859,9 +841,7 @@ fragment VersionBase on VersionNode {
|
|
|
859
841
|
version {
|
|
860
842
|
thumbnailHash
|
|
861
843
|
status
|
|
862
|
-
attrib
|
|
863
|
-
comment
|
|
864
|
-
}
|
|
844
|
+
attrib(names: ["comment"])
|
|
865
845
|
}
|
|
866
846
|
}`), ge = new s(`
|
|
867
847
|
query GetEntitiesChecklists($projectName: String!, $entityIds: [String!]!) {
|
|
@@ -890,9 +870,7 @@ fragment VersionBase on VersionNode {
|
|
|
890
870
|
edges {
|
|
891
871
|
node {
|
|
892
872
|
id
|
|
893
|
-
attrib
|
|
894
|
-
frameStart
|
|
895
|
-
}
|
|
873
|
+
attrib(names: ["frameStart"])
|
|
896
874
|
}
|
|
897
875
|
}
|
|
898
876
|
}
|
|
@@ -1463,7 +1441,7 @@ fragment SubTaskFragment on SubTaskNode {
|
|
|
1463
1441
|
}
|
|
1464
1442
|
}
|
|
1465
1443
|
`), qe = new s(`
|
|
1466
|
-
query GetFolderColumnStats($projectName: String!, $filter: String, $search: String, $taskFilter: String, $taskSearch: String, $parentIds: [String!], $ids: [String!], $targets: [MetricTargetInput!], $includeFolderChildren: Boolean! = true, $hideEmptyFolders: Boolean) {
|
|
1444
|
+
query GetFolderColumnStats($projectName: String!, $filter: String, $search: String, $taskFilter: String, $taskSearch: String, $globalSearch: String, $includeParents: Boolean, $parentIds: [String!], $ids: [String!], $targets: [MetricTargetInput!], $includeFolderChildren: Boolean! = true, $hideEmptyFolders: Boolean) {
|
|
1467
1445
|
project(name: $projectName) {
|
|
1468
1446
|
name
|
|
1469
1447
|
folders(
|
|
@@ -1472,6 +1450,8 @@ fragment SubTaskFragment on SubTaskNode {
|
|
|
1472
1450
|
search: $search
|
|
1473
1451
|
taskFilter: $taskFilter
|
|
1474
1452
|
taskSearch: $taskSearch
|
|
1453
|
+
globalSearch: $globalSearch
|
|
1454
|
+
includeParents: $includeParents
|
|
1475
1455
|
parentIds: $parentIds
|
|
1476
1456
|
ids: $ids
|
|
1477
1457
|
includeFolderChildren: $includeFolderChildren
|
|
@@ -1788,9 +1768,7 @@ fragment TaskPropsFragment on TaskNode {
|
|
|
1788
1768
|
accessGroups
|
|
1789
1769
|
isManager
|
|
1790
1770
|
isAdmin
|
|
1791
|
-
attrib
|
|
1792
|
-
fullName
|
|
1793
|
-
}
|
|
1771
|
+
attrib(names: ["fullName"])
|
|
1794
1772
|
}
|
|
1795
1773
|
}
|
|
1796
1774
|
}
|
|
@@ -1844,9 +1822,7 @@ fragment TaskPropsFragment on TaskNode {
|
|
|
1844
1822
|
node {
|
|
1845
1823
|
name
|
|
1846
1824
|
updatedAt
|
|
1847
|
-
attrib
|
|
1848
|
-
fullName
|
|
1849
|
-
}
|
|
1825
|
+
attrib(names: ["fullName"])
|
|
1850
1826
|
}
|
|
1851
1827
|
}
|
|
1852
1828
|
}
|
|
@@ -1858,9 +1834,7 @@ fragment TaskPropsFragment on TaskNode {
|
|
|
1858
1834
|
node {
|
|
1859
1835
|
name
|
|
1860
1836
|
updatedAt
|
|
1861
|
-
attrib
|
|
1862
|
-
fullName
|
|
1863
|
-
}
|
|
1837
|
+
attrib(names: ["fullName"])
|
|
1864
1838
|
}
|
|
1865
1839
|
}
|
|
1866
1840
|
}
|
|
@@ -1982,7 +1956,7 @@ fragment VersionBase on VersionNode {
|
|
|
1982
1956
|
createdAt
|
|
1983
1957
|
}
|
|
1984
1958
|
}`), Ye = new s(`
|
|
1985
|
-
query GetProductsColumnStats($projectName: String!, $productFilter: String, $versionFilter: String, $taskFilter: String, $folderFilter: String, $representationFilter: String, $folderIds: [String!], $productIds: [String!], $targets: [MetricTargetInput!]) {
|
|
1959
|
+
query GetProductsColumnStats($projectName: String!, $productFilter: String, $versionFilter: String, $taskFilter: String, $folderFilter: String, $representationFilter: String, $folderIds: [String!], $productIds: [String!], $targets: [MetricTargetInput!], $hasReviewables: Boolean) {
|
|
1986
1960
|
project(name: $projectName) {
|
|
1987
1961
|
products(
|
|
1988
1962
|
calculateSpecificStatistics: $targets
|
|
@@ -1993,6 +1967,7 @@ fragment VersionBase on VersionNode {
|
|
|
1993
1967
|
folderFilter: $folderFilter
|
|
1994
1968
|
representationFilter: $representationFilter
|
|
1995
1969
|
folderIds: $folderIds
|
|
1970
|
+
hasReviewables: $hasReviewables
|
|
1996
1971
|
includeFolderChildren: true
|
|
1997
1972
|
) {
|
|
1998
1973
|
fieldStats {
|
|
@@ -2228,7 +2203,7 @@ fragment VersionExtended on VersionNode {
|
|
|
2228
2203
|
}
|
|
2229
2204
|
}
|
|
2230
2205
|
}`), Ae = new s(`
|
|
2231
|
-
query GetVersionsColumnStats($projectName: String!, $versionFilter: String, $productFilter: String, $taskFilter: String, $folderFilter: String, $representationFilter: String, $folderIds: [String!], $versionIds: [String!], $productIds: [String!], $targets: [MetricTargetInput!], $featuredOnly: [String!], $featuredOnlyEntityType: String, $latestPerFolder: Boolean) {
|
|
2206
|
+
query GetVersionsColumnStats($projectName: String!, $versionFilter: String, $productFilter: String, $taskFilter: String, $folderFilter: String, $representationFilter: String, $folderIds: [String!], $versionIds: [String!], $productIds: [String!], $targets: [MetricTargetInput!], $featuredOnly: [String!], $featuredOnlyEntityType: String, $latestPerFolder: Boolean, $hasReviewables: Boolean) {
|
|
2232
2207
|
project(name: $projectName) {
|
|
2233
2208
|
versions(
|
|
2234
2209
|
calculateSpecificStatistics: $targets
|
|
@@ -2244,6 +2219,7 @@ fragment VersionExtended on VersionNode {
|
|
|
2244
2219
|
featuredOnly: $featuredOnly
|
|
2245
2220
|
featuredOnlyEntityType: $featuredOnlyEntityType
|
|
2246
2221
|
latestPerFolder: $latestPerFolder
|
|
2222
|
+
hasReviewables: $hasReviewables
|
|
2247
2223
|
) {
|
|
2248
2224
|
fieldStats {
|
|
2249
2225
|
...ColumnStatsFragment
|
|
@@ -2319,9 +2295,7 @@ fragment VersionExtended on VersionNode {
|
|
|
2319
2295
|
read
|
|
2320
2296
|
author {
|
|
2321
2297
|
name
|
|
2322
|
-
attrib
|
|
2323
|
-
fullName
|
|
2324
|
-
}
|
|
2298
|
+
attrib(names: ["fullName"])
|
|
2325
2299
|
}
|
|
2326
2300
|
origin {
|
|
2327
2301
|
id
|
|
@@ -2391,9 +2365,7 @@ fragment VersionExtended on VersionNode {
|
|
|
2391
2365
|
read
|
|
2392
2366
|
author {
|
|
2393
2367
|
name
|
|
2394
|
-
attrib
|
|
2395
|
-
fullName
|
|
2396
|
-
}
|
|
2368
|
+
attrib(names: ["fullName"])
|
|
2397
2369
|
}
|
|
2398
2370
|
origin {
|
|
2399
2371
|
id
|
|
@@ -2454,13 +2426,9 @@ fragment VersionExtended on VersionNode {
|
|
|
2454
2426
|
active
|
|
2455
2427
|
hasReviewables
|
|
2456
2428
|
tags
|
|
2457
|
-
attrib
|
|
2458
|
-
priority
|
|
2459
|
-
|
|
2460
|
-
resolutionHeight
|
|
2461
|
-
resolutionWidth
|
|
2462
|
-
fps
|
|
2463
|
-
}
|
|
2429
|
+
attrib(
|
|
2430
|
+
names: ["priority", "endDate", "resolutionHeight", "resolutionWidth", "fps"]
|
|
2431
|
+
)
|
|
2464
2432
|
folder {
|
|
2465
2433
|
id
|
|
2466
2434
|
name
|
|
@@ -2514,13 +2482,9 @@ fragment VersionExtended on VersionNode {
|
|
|
2514
2482
|
active
|
|
2515
2483
|
hasReviewables
|
|
2516
2484
|
tags
|
|
2517
|
-
attrib
|
|
2518
|
-
priority
|
|
2519
|
-
|
|
2520
|
-
resolutionHeight
|
|
2521
|
-
resolutionWidth
|
|
2522
|
-
fps
|
|
2523
|
-
}
|
|
2485
|
+
attrib(
|
|
2486
|
+
names: ["priority", "endDate", "resolutionHeight", "resolutionWidth", "fps"]
|
|
2487
|
+
)
|
|
2524
2488
|
folder {
|
|
2525
2489
|
id
|
|
2526
2490
|
name
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { useMemo as g, useRef as G, useEffect as
|
|
2
|
-
import { bb as
|
|
3
|
-
import {
|
|
1
|
+
import { useMemo as g, useRef as G, useEffect as x } from "react";
|
|
2
|
+
import { bb as M, bq as N, aF as q, aG as w, b5 as C, br as A, bs as F } from "./searchTerms.es.js";
|
|
3
|
+
import { Z as B, cq as I, cD as O, at as P, ax as Q } from "./getUris.es.js";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { U } from "./MetaWidget.es.js";
|
|
6
|
-
const z = [],
|
|
7
|
-
const { entity: i, groupBy: c, extraGroupBys: E, skip: p } =
|
|
6
|
+
const z = [], D = 3, J = (t) => {
|
|
7
|
+
const { entity: i, groupBy: c, extraGroupBys: E, skip: p } = t, n = g(
|
|
8
8
|
() => c ? B(c, i) : null,
|
|
9
9
|
[c, i]
|
|
10
10
|
), h = g(() => {
|
|
11
11
|
if (!n) return;
|
|
12
|
-
const
|
|
12
|
+
const s = /* @__PURE__ */ new Set([n.field]), y = [];
|
|
13
13
|
for (const T of E ?? []) {
|
|
14
14
|
const v = B(T, i);
|
|
15
|
-
v && !
|
|
15
|
+
v && !s.has(v.field) && (s.add(v.field), y.push(v));
|
|
16
16
|
}
|
|
17
17
|
return [n, ...y];
|
|
18
|
-
}, [n, E, i]), u = !!p || !n, m =
|
|
19
|
-
{ ...
|
|
20
|
-
{ skip: u ||
|
|
18
|
+
}, [n, E, i]), u = !!p || !n, m = t.args.projectName, k = I(
|
|
19
|
+
{ ...t.entity === "task" ? t.args : { projectName: m }, targets: h },
|
|
20
|
+
{ skip: u || t.entity !== "task" }
|
|
21
21
|
), S = O(
|
|
22
|
-
{ ...
|
|
23
|
-
{ skip: u ||
|
|
24
|
-
), e =
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
counts: o &&
|
|
28
|
-
total:
|
|
29
|
-
complete:
|
|
22
|
+
{ ...t.entity === "version" ? t.args : { projectName: m }, targets: h },
|
|
23
|
+
{ skip: u || t.entity !== "version" }
|
|
24
|
+
), e = t.entity === "task" ? k : S, r = e.data ?? z, o = !!e.data, { counts: L, total: a, complete: l } = g(() => {
|
|
25
|
+
const s = P(r, n);
|
|
26
|
+
return s.ungrouped.count > 0 && s.counts.set(U, s.ungrouped), {
|
|
27
|
+
counts: o && s.counts.size > 0 ? s.counts : void 0,
|
|
28
|
+
total: s.total,
|
|
29
|
+
complete: s.complete
|
|
30
30
|
};
|
|
31
|
-
}, [r, n, o]), f = G(/* @__PURE__ */ new Map()), d = G(/* @__PURE__ */ new Set()), R = g(() => JSON.stringify(
|
|
32
|
-
return
|
|
31
|
+
}, [r, n, o]), f = G(/* @__PURE__ */ new Map()), d = G(/* @__PURE__ */ new Set()), R = g(() => JSON.stringify(t.args), [t.args]);
|
|
32
|
+
return x(() => {
|
|
33
33
|
f.current.clear(), d.current.clear();
|
|
34
|
-
}, [R]),
|
|
34
|
+
}, [R]), x(() => {
|
|
35
35
|
if (u || !n || !o || e.isFetching || l) return;
|
|
36
|
-
const
|
|
37
|
-
if (d.current.has(
|
|
38
|
-
if (r.some((T) => T.columnName === Q(
|
|
39
|
-
d.current.add(
|
|
36
|
+
const s = n.field;
|
|
37
|
+
if (d.current.has(s)) return;
|
|
38
|
+
if (r.some((T) => T.columnName === Q(s))) {
|
|
39
|
+
d.current.add(s);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
const y = f.current.get(
|
|
43
|
-
y >=
|
|
42
|
+
const y = f.current.get(s) ?? 0;
|
|
43
|
+
y >= D || (f.current.set(s, y + 1), e.refetch());
|
|
44
44
|
}, [u, n, o, e.isFetching, l, r, e.refetch]), {
|
|
45
45
|
counts: L,
|
|
46
46
|
complete: l,
|
|
@@ -48,21 +48,21 @@ const z = [], K = 3, H = (s) => {
|
|
|
48
48
|
isLoading: !u && (e.isLoading || e.isFetching),
|
|
49
49
|
isSupported: !!n
|
|
50
50
|
};
|
|
51
|
-
},
|
|
52
|
-
const E = c === "all" ? "all" : [...c].sort().join("\0"), { data: p, isError: n } =
|
|
51
|
+
}, X = (t, { projectName: i, request: c = "all" } = {}) => {
|
|
52
|
+
const E = c === "all" ? "all" : [...c].sort().join("\0"), { data: p, isError: n } = M(), h = !!p || n, { requests: u, keyByName: m } = g(() => {
|
|
53
53
|
const e = c === "all" ? null : new Set(c), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
54
|
-
return
|
|
55
|
-
if (!
|
|
54
|
+
return t.forEach((a) => {
|
|
55
|
+
if (!N(a.data) || e && !e.has(a.name)) return;
|
|
56
56
|
const l = p?.find(
|
|
57
57
|
({ name: R }) => R === a.data?.enumResolver
|
|
58
|
-
)?.acceptedParams, f =
|
|
58
|
+
)?.acceptedParams, f = q(a.data, { projectName: i }, l), d = w(f);
|
|
59
59
|
o.set(a.name, d), r.has(d) || r.set(d, f);
|
|
60
60
|
}), { requests: [...r].sort(([a], [l]) => a.localeCompare(l)).map(([, a]) => a), keyByName: o };
|
|
61
|
-
}, [
|
|
61
|
+
}, [t, E, i, p]), { data: k, isError: S } = C(
|
|
62
62
|
{ requests: u },
|
|
63
63
|
{ skip: !u.length || !h }
|
|
64
64
|
);
|
|
65
|
-
return g(() => m.size ?
|
|
65
|
+
return g(() => m.size ? t.map((e) => {
|
|
66
66
|
const r = m.get(e.name);
|
|
67
67
|
if (!r) return e;
|
|
68
68
|
const o = k?.[r];
|
|
@@ -72,9 +72,9 @@ const z = [], K = 3, H = (s) => {
|
|
|
72
72
|
enumError: o.error ? A(o.error) : void 0,
|
|
73
73
|
data: { ...e.data, enum: F(o.items) }
|
|
74
74
|
} : S ? { ...e, enumIsLoading: !1, enumError: A() } : { ...e, enumIsLoading: !0 };
|
|
75
|
-
}) :
|
|
75
|
+
}) : t, [t, m, k, S]);
|
|
76
76
|
};
|
|
77
77
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
J as a,
|
|
79
|
+
X as u
|
|
80
80
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./searchTerms.es.js";
|
|
2
|
-
import {
|
|
2
|
+
import { aU as A, dC as D, dF as b } from "./getUris.es.js";
|
|
3
3
|
import "primereact/confirmdialog";
|
|
4
4
|
import { v4 as H } from "uuid";
|
|
5
5
|
import { toast as M } from "react-toastify";
|
|
6
|
-
import { useCallback as k, useState as
|
|
6
|
+
import { useCallback as k, useState as U, useRef as R } from "react";
|
|
7
7
|
import { useStore as q } from "react-redux";
|
|
8
8
|
import "react/jsx-runtime";
|
|
9
9
|
import { e as L } from "./TableExportContextInstance.es.js";
|
|
@@ -50,7 +50,7 @@ const N = () => {
|
|
|
50
50
|
}
|
|
51
51
|
const C = { ...h, ...e }, I = P(C), m = W ?? d?.id;
|
|
52
52
|
m && (I.id = m);
|
|
53
|
-
const
|
|
53
|
+
const j = I.id, E = g(
|
|
54
54
|
{
|
|
55
55
|
payload: m ? { settings: C } : I,
|
|
56
56
|
viewType: c,
|
|
@@ -58,14 +58,14 @@ const N = () => {
|
|
|
58
58
|
},
|
|
59
59
|
m
|
|
60
60
|
);
|
|
61
|
-
i(), (!y || s?.id !== m) && (s && w(!0), u(
|
|
61
|
+
i(), (!y || s?.id !== m) && (s && w(!0), u(j)), await E, n(null), t.successMessage && M.success(t.successMessage);
|
|
62
62
|
} catch (S) {
|
|
63
63
|
n(null), p && u(p), s && !y && w(!1);
|
|
64
64
|
const W = t.errorMessage || `Failed to update view settings: ${S}`;
|
|
65
65
|
M.error(W);
|
|
66
66
|
}
|
|
67
67
|
}, z = () => {
|
|
68
|
-
const [e] =
|
|
68
|
+
const [e] = A(), [n] = D(), o = L(), t = q(), r = k(
|
|
69
69
|
async (i, a) => {
|
|
70
70
|
if (a) {
|
|
71
71
|
const c = {};
|
|
@@ -108,23 +108,23 @@ const N = () => {
|
|
|
108
108
|
getLatestSettings: g,
|
|
109
109
|
markCacheDirty: N
|
|
110
110
|
};
|
|
111
|
-
},
|
|
111
|
+
}, F = (e, n) => n.split(".").reduce((o, t) => o?.[t], e), T = (e, n, o) => {
|
|
112
112
|
const [t, ...r] = n.split(".");
|
|
113
113
|
return t ? {
|
|
114
114
|
...e,
|
|
115
|
-
[t]: r.length ?
|
|
115
|
+
[t]: r.length ? T(e[t] || {}, r.join("."), o) : o
|
|
116
116
|
} : e;
|
|
117
117
|
}, ce = (e, n) => {
|
|
118
|
-
const { viewSettings: o, isLoadingViews: t } = L(), { updateViewSettings: r, getLatestSettings: g } = z(), [f, i] =
|
|
118
|
+
const { viewSettings: o, isLoadingViews: t } = L(), { updateViewSettings: r, getLatestSettings: g } = z(), [f, i] = U(null), a = R(null), c = o, V = f !== null ? f : F(c, e) ?? n, s = k((d) => {
|
|
119
119
|
a.current = d, i(d);
|
|
120
120
|
}, []), u = k(
|
|
121
121
|
(d) => {
|
|
122
122
|
if (t) return;
|
|
123
|
-
const w = g().settings ?? c ?? {}, l = a.current !== null ? a.current :
|
|
123
|
+
const w = g().settings ?? c ?? {}, l = a.current !== null ? a.current : F(w, e) ?? n, p = typeof d == "function" ? d(
|
|
124
124
|
l
|
|
125
125
|
) : d;
|
|
126
126
|
r(
|
|
127
|
-
|
|
127
|
+
T(w, e, p),
|
|
128
128
|
s,
|
|
129
129
|
p,
|
|
130
130
|
{}
|