@ynput/ayon-frontend-shared 0.6.7 → 0.6.9
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 +3 -3
- package/dist/Feed.es.js +64 -58
- package/dist/ListTable.es.js +5 -5
- package/dist/NewEntity.es.js +38 -38
- package/dist/ProjectTreeTable.es.js +1314 -1314
- package/dist/Slicer.es.js +21 -21
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +362 -360
- package/dist/chunks/Actions.es.js +21 -21
- package/dist/chunks/ColumnDropIndicator.es.js +7 -7
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +22 -22
- package/dist/chunks/EmptyPlaceholder.es.js +9 -9
- package/dist/chunks/EntityPath.es.js +1 -1
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +1843 -1830
- package/dist/chunks/MetaWidget.es.js +816 -827
- package/dist/chunks/PlayableIcon.es.js +124 -85
- package/dist/chunks/ProjectContext.es.js +11 -11
- package/dist/chunks/ReviewablesSelector.es.js +572 -484
- package/dist/chunks/SimpleForm.es.js +6 -5
- package/dist/chunks/SimpleTable.es.js +1 -1
- package/dist/chunks/Slicer.es.js +75 -75
- package/dist/chunks/ThumbnailSimple.es.js +15 -15
- package/dist/chunks/Watchers.es.js +35 -35
- package/dist/chunks/getBundleMode.es.js +33 -25
- package/dist/chunks/getUris.es.js +236 -229
- package/dist/chunks/searchTerms.es.js +352 -333
- package/dist/chunks/useAttributeEnums.es.js +16 -16
- package/dist/chunks/useDateRangeFilter.es.js +85 -59
- package/dist/chunks/viewUpdateHelper.es.js +36 -36
- package/dist/components.es.js +793 -754
- package/dist/context.es.js +121 -120
- package/dist/hooks.es.js +15 -15
- package/dist/index.es.js +2 -2
- package/dist/types/Feed.d.ts +54 -0
- package/dist/types/ProjectTreeTable.d.ts +5 -2
- package/dist/types/api.d.ts +372 -0
- package/dist/types/components.d.ts +516 -0
- package/dist/types/util.d.ts +4 -0
- package/dist/util.es.js +68 -66
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useMemo as g, useRef as x, useEffect as
|
|
2
|
-
import {
|
|
3
|
-
import { X as
|
|
1
|
+
import { useMemo as g, useRef as x, useEffect as A } from "react";
|
|
2
|
+
import { b2 as M, bg as N, ax as w, ay as C, aY as I, bh as B, bi as O } from "./searchTerms.es.js";
|
|
3
|
+
import { X as G, ck as P, cx as q, ap as F, at as Q } from "./getUris.es.js";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { U } from "./MetaWidget.es.js";
|
|
6
|
-
const z = [], K = 3,
|
|
6
|
+
const z = [], K = 3, Y = (t) => {
|
|
7
7
|
const { entity: i, groupBy: c, extraGroupBys: E, skip: p } = t, n = g(
|
|
8
|
-
() => c ?
|
|
8
|
+
() => c ? G(c, i) : null,
|
|
9
9
|
[c, i]
|
|
10
10
|
), h = g(() => {
|
|
11
11
|
if (!n) return;
|
|
12
12
|
const s = /* @__PURE__ */ new Set([n.field]), y = [];
|
|
13
13
|
for (const T of E ?? []) {
|
|
14
|
-
const v =
|
|
14
|
+
const v = G(T, i);
|
|
15
15
|
v && !s.has(v.field) && (s.add(v.field), y.push(v));
|
|
16
16
|
}
|
|
17
17
|
return [n, ...y];
|
|
@@ -29,9 +29,9 @@ const z = [], K = 3, H = (t) => {
|
|
|
29
29
|
complete: s.complete
|
|
30
30
|
};
|
|
31
31
|
}, [r, n, o]), f = x(/* @__PURE__ */ new Map()), d = x(/* @__PURE__ */ new Set()), R = g(() => JSON.stringify(t.args), [t.args]);
|
|
32
|
-
return
|
|
32
|
+
return A(() => {
|
|
33
33
|
f.current.clear(), d.current.clear();
|
|
34
|
-
}, [R]),
|
|
34
|
+
}, [R]), A(() => {
|
|
35
35
|
if (u || !n || !o || e.isFetching || l) return;
|
|
36
36
|
const s = n.field;
|
|
37
37
|
if (d.current.has(s)) return;
|
|
@@ -48,14 +48,14 @@ const z = [], K = 3, H = (t) => {
|
|
|
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
|
+
}, H = (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
54
|
return t.forEach((a) => {
|
|
55
|
-
if (!
|
|
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 = w(a.data, { projectName: i }, l), d = C(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 } = I(
|
|
@@ -69,12 +69,12 @@ const z = [], K = 3, H = (t) => {
|
|
|
69
69
|
return o ? {
|
|
70
70
|
...e,
|
|
71
71
|
enumIsLoading: !1,
|
|
72
|
-
enumError: o.error ?
|
|
72
|
+
enumError: o.error ? B(o.error) : void 0,
|
|
73
73
|
data: { ...e.data, enum: O(o.items) }
|
|
74
|
-
} : S ? { ...e, enumIsLoading: !1, enumError:
|
|
74
|
+
} : S ? { ...e, enumIsLoading: !1, enumError: B() } : { ...e, enumIsLoading: !0 };
|
|
75
75
|
}) : t, [t, m, k, S]);
|
|
76
76
|
};
|
|
77
77
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
Y as a,
|
|
79
|
+
H as u
|
|
80
80
|
};
|
|
@@ -1,100 +1,126 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as F, d as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as D } from "react/jsx-runtime";
|
|
2
|
+
import { p as O, Y as $, M as w, C as F, d as _, a as v } from "./PlayableIcon.es.js";
|
|
3
|
+
import { useState as b } from "react";
|
|
4
|
+
import { startOfDay as x, parse as M, endOfDay as R, format as y } from "date-fns";
|
|
5
|
+
const Z = (c) => c.replace(/\r\n?/g, `
|
|
6
|
+
`).replace(/^\s*(```|~~~).*$/gm, "").replace(/!?\[([^\]]*)\]\((?:\\.|[^)\\])*\)/g, "$1").replace(/<(https?:[^>]+)>/g, "$1").replace(/<\/?[a-z][^>]*>/gi, "").replace(/[<>]/g, "").replace(/ /g, " ").replace(/^\s*#{1,6}\s+/gm, "").replace(/^\s*>\s?/gm, "").replace(/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/gm, "").replace(/`([^`]*)`/g, "$1").replace(/(\*\*|__)(.+?)\1/g, "$2").replace(/~~(.+?)~~/g, "$1").replace(/(^|[^\w*\\])\*(?!\s)([^*]+?)\*(?!\w)/g, "$1$2").replace(/(^|[^\w\\])_(?!\s)([^_]+?)_(?!\w)/g, "$1$2").replace(/\\\n/g, `
|
|
7
|
+
`).replace(/\\([\\`*_{}[\]()#+\-.!~>|])/g, "$1").replace(/\s+/g, " ").trim(), B = (c) => {
|
|
8
|
+
const d = (c.node?.children ?? []).filter(
|
|
9
|
+
(p) => !(p.type === "text" && !p.value?.trim())
|
|
10
|
+
);
|
|
11
|
+
if (d.length !== 1) return null;
|
|
12
|
+
const [u] = d;
|
|
13
|
+
if (u.type !== "element" || u.tagName !== "a") return null;
|
|
14
|
+
const i = u.properties?.href, g = u.children?.map((p) => p.value ?? "").join("");
|
|
15
|
+
if (!i || g?.trim() !== i) return null;
|
|
16
|
+
const m = O(i);
|
|
17
|
+
return m ? /* @__PURE__ */ D($, { video: m }) : null;
|
|
18
|
+
}, U = (c, { onOpen: d } = {}) => {
|
|
19
|
+
const u = (c.node?.children ?? []).filter(
|
|
20
|
+
(f) => !(f.type === "text" && !f.value?.trim())
|
|
21
|
+
);
|
|
22
|
+
if (u.length !== 1) return null;
|
|
23
|
+
const [i] = u;
|
|
24
|
+
if (i.type !== "element" || i.tagName !== "img") return null;
|
|
25
|
+
const { src: g, alt: m, title: p } = i.properties ?? {};
|
|
26
|
+
return g ? /* @__PURE__ */ D(w, { src: g, alt: m, mime: p, onOpen: d ? () => d(g) : void 0 }) : null;
|
|
27
|
+
}, j = () => {
|
|
28
|
+
const [c, d] = b(null), [u, i] = b(""), [g, m] = b(""), p = (s, o) => {
|
|
29
|
+
const t = o.find((n) => n.id === s);
|
|
30
|
+
if (t?.type === "datetime" && t.values?.length) {
|
|
31
|
+
const n = t.values[0];
|
|
9
32
|
if (n.id?.startsWith("custom-")) {
|
|
10
|
-
const
|
|
33
|
+
const e = n.id.replace("custom-", ""), a = e.indexOf("Z");
|
|
11
34
|
if (a > 0) {
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
),
|
|
17
|
-
|
|
18
|
-
),
|
|
35
|
+
const r = e.substring(0, a + 1), l = e.substring(a + 2);
|
|
36
|
+
if (r && l) {
|
|
37
|
+
i(
|
|
38
|
+
y(M(r, "yyyy-MM-dd'T'HH:mm:ss.SSSx", /* @__PURE__ */ new Date()), "yyyy-MM-dd")
|
|
39
|
+
), m(
|
|
40
|
+
y(M(l, "yyyy-MM-dd'T'HH:mm:ss.SSSx", /* @__PURE__ */ new Date()), "yyyy-MM-dd")
|
|
41
|
+
), d(s);
|
|
19
42
|
return;
|
|
20
43
|
}
|
|
21
44
|
}
|
|
22
45
|
}
|
|
23
46
|
}
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
const
|
|
27
|
-
return n ? n.id :
|
|
47
|
+
d(s), i(""), m("");
|
|
48
|
+
}, f = (s, o) => {
|
|
49
|
+
const t = s.filter((e) => e.type === "datetime"), n = t.find((e) => !e.values?.length);
|
|
50
|
+
return n ? n.id : t.length ? t[t.length - 1].id : o.find((e) => e.type === "datetime")?.id ?? null;
|
|
28
51
|
};
|
|
29
52
|
return {
|
|
30
|
-
customRangeFilterId:
|
|
31
|
-
customStartDate:
|
|
53
|
+
customRangeFilterId: c,
|
|
54
|
+
customStartDate: u,
|
|
32
55
|
customEndDate: g,
|
|
33
|
-
setCustomStartDate:
|
|
34
|
-
setCustomEndDate:
|
|
56
|
+
setCustomStartDate: i,
|
|
57
|
+
setCustomEndDate: m,
|
|
35
58
|
openCustomRangeForFilter: p,
|
|
36
|
-
wrapFilterChange: (
|
|
37
|
-
const n =
|
|
38
|
-
|
|
59
|
+
wrapFilterChange: (s, o, t) => {
|
|
60
|
+
const n = s.map((e) => e.type === "datetime" && e.values?.some((a) => a.id === v) ? { ...e, values: e.values.filter((a) => a.id !== v) } : e);
|
|
61
|
+
t(n);
|
|
39
62
|
},
|
|
40
|
-
handleSearchBarClickCapture: (
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const n =
|
|
63
|
+
handleSearchBarClickCapture: (s, o) => {
|
|
64
|
+
const t = s.target;
|
|
65
|
+
if (t.closest(".remove") || t.closest(".button")) return;
|
|
66
|
+
const n = t.closest(".search-filter-item");
|
|
44
67
|
if (!n) return;
|
|
45
|
-
const
|
|
46
|
-
(
|
|
68
|
+
const e = o.find(
|
|
69
|
+
(r) => r.id === n.id && r.type === "datetime" && r.values?.length
|
|
47
70
|
);
|
|
48
|
-
if (!
|
|
49
|
-
const a =
|
|
71
|
+
if (!e) return;
|
|
72
|
+
const a = e.values?.[0];
|
|
50
73
|
if (!(a?.id === "noValue" || a?.id === "hasValue")) {
|
|
51
74
|
if (a?.id) {
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
75
|
+
const r = a.id.replace("custom-", ""), l = r.indexOf("Z");
|
|
76
|
+
if (l > 0) {
|
|
77
|
+
const h = r.substring(0, l + 1), S = r.substring(l + 2);
|
|
78
|
+
if (_(h, S)) return;
|
|
56
79
|
}
|
|
57
80
|
}
|
|
58
|
-
|
|
81
|
+
s.stopPropagation(), p(e.id, o);
|
|
59
82
|
}
|
|
60
83
|
},
|
|
61
|
-
handleDropdownItemClick: (
|
|
62
|
-
const n =
|
|
84
|
+
handleDropdownItemClick: (s, o, t) => {
|
|
85
|
+
const n = s.target.closest("li");
|
|
63
86
|
if (!n) return !0;
|
|
64
87
|
if (n.querySelector(`span[icon="${F}"]`)) {
|
|
65
|
-
const
|
|
66
|
-
return
|
|
88
|
+
const e = n.getAttribute("data-parent") || f(o, t);
|
|
89
|
+
return e && p(e, o), !1;
|
|
67
90
|
}
|
|
68
91
|
return !0;
|
|
69
92
|
},
|
|
70
|
-
handleCustomRangeApply: (
|
|
71
|
-
if (!
|
|
72
|
-
const
|
|
93
|
+
handleCustomRangeApply: (s, o, t, n) => {
|
|
94
|
+
if (!c || !u || !g) return;
|
|
95
|
+
const e = c.split("__")[0], a = o.find((C) => C.id === e);
|
|
73
96
|
if (!a) return;
|
|
74
|
-
const
|
|
75
|
-
if (isNaN(
|
|
76
|
-
const
|
|
77
|
-
id: `custom-${
|
|
78
|
-
label: `${
|
|
97
|
+
const r = x(M(u, "yyyy-MM-dd", /* @__PURE__ */ new Date())), l = R(M(g, "yyyy-MM-dd", /* @__PURE__ */ new Date()));
|
|
98
|
+
if (isNaN(r.getTime()) || isNaN(l.getTime()) || l < r) return;
|
|
99
|
+
const h = l.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "MMM d" : "MMM d, yyyy", S = {
|
|
100
|
+
id: `custom-${r.toISOString()}-${l.toISOString()}`,
|
|
101
|
+
label: `${y(r, "MMM d")} – ${y(l, h)}`,
|
|
79
102
|
values: [
|
|
80
|
-
{ id:
|
|
81
|
-
{ id:
|
|
103
|
+
{ id: r.toISOString(), label: y(r, "MMM d, yyyy") },
|
|
104
|
+
{ id: l.toISOString(), label: y(l, "MMM d, yyyy") }
|
|
82
105
|
]
|
|
83
|
-
},
|
|
84
|
-
id:
|
|
106
|
+
}, I = {
|
|
107
|
+
id: c,
|
|
85
108
|
type: "datetime",
|
|
86
109
|
label: a.label,
|
|
87
110
|
icon: a.icon,
|
|
88
111
|
values: [S],
|
|
89
112
|
singleSelect: !0
|
|
90
113
|
};
|
|
91
|
-
|
|
114
|
+
t([...s.filter((C) => C.id !== c), I]), d(null), i(""), m(""), n.current?.close();
|
|
92
115
|
},
|
|
93
116
|
handleCustomRangeClose: () => {
|
|
94
|
-
|
|
117
|
+
d(null), i(""), m("");
|
|
95
118
|
}
|
|
96
119
|
};
|
|
97
120
|
};
|
|
98
121
|
export {
|
|
99
|
-
|
|
122
|
+
B as a,
|
|
123
|
+
Z as m,
|
|
124
|
+
U as r,
|
|
125
|
+
j as u
|
|
100
126
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./searchTerms.es.js";
|
|
2
|
-
import { aQ as A,
|
|
2
|
+
import { aQ as A, dv as D, dy 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
|
|
7
|
-
import { useStore as
|
|
6
|
+
import { useCallback as k, useState as R, useRef as U } from "react";
|
|
7
|
+
import { useStore as q } from "react-redux";
|
|
8
8
|
import "react/jsx-runtime";
|
|
9
9
|
import { e as T } from "./DeleteEntitiesContextInstance.es.js";
|
|
10
10
|
import "@ynput/ayon-react-components";
|
|
@@ -14,8 +14,8 @@ import "./ContextMenuContextInstance.es.js";
|
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "semver";
|
|
17
|
-
const
|
|
18
|
-
id:
|
|
17
|
+
const x = () => H().replace(/-/g, ""), P = (e = {}) => ({
|
|
18
|
+
id: x(),
|
|
19
19
|
label: "Working",
|
|
20
20
|
working: !0,
|
|
21
21
|
settings: e
|
|
@@ -25,22 +25,22 @@ const N = () => {
|
|
|
25
25
|
v || (v = !0, queueMicrotask(() => {
|
|
26
26
|
v = !1;
|
|
27
27
|
}));
|
|
28
|
-
}, Q = async (e, n, o, t = {},
|
|
28
|
+
}, Q = async (e, n, o, t = {}, r, g, f, i) => {
|
|
29
29
|
const {
|
|
30
|
-
viewSettings:
|
|
31
|
-
viewType:
|
|
30
|
+
viewSettings: a,
|
|
31
|
+
viewType: c,
|
|
32
32
|
projectName: V,
|
|
33
33
|
selectedView: s,
|
|
34
34
|
setSelectedView: u,
|
|
35
35
|
workingView: d,
|
|
36
36
|
onSettingsChanged: w,
|
|
37
37
|
isErrorWorkingView: l
|
|
38
|
-
} =
|
|
39
|
-
if (!
|
|
38
|
+
} = r;
|
|
39
|
+
if (!c) throw new Error("No view type provided for updating view settings");
|
|
40
40
|
const p = s?.id, y = s?.working;
|
|
41
41
|
try {
|
|
42
42
|
n(o);
|
|
43
|
-
const { settings: S, workingViewId: W } = f(), h = S ??
|
|
43
|
+
const { settings: S, workingViewId: W } = f(), h = S ?? a;
|
|
44
44
|
if (h === void 0 && !l) {
|
|
45
45
|
console.warn(
|
|
46
46
|
"updateViewSettings: no settings baseline available, aborting to prevent data loss."
|
|
@@ -52,7 +52,7 @@ const N = () => {
|
|
|
52
52
|
const E = I.id, F = g(
|
|
53
53
|
{
|
|
54
54
|
payload: m ? { settings: C } : I,
|
|
55
|
-
viewType:
|
|
55
|
+
viewType: c,
|
|
56
56
|
projectName: V
|
|
57
57
|
},
|
|
58
58
|
m
|
|
@@ -64,32 +64,32 @@ const N = () => {
|
|
|
64
64
|
M.error(W);
|
|
65
65
|
}
|
|
66
66
|
}, $ = () => {
|
|
67
|
-
const [e] = A(), [n] = D(), o = T(), t =
|
|
68
|
-
async (i,
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
67
|
+
const [e] = A(), [n] = D(), o = T(), t = q(), r = k(
|
|
68
|
+
async (i, a) => {
|
|
69
|
+
if (a) {
|
|
70
|
+
const c = {};
|
|
71
71
|
return ["label", "owner", "settings"].forEach((s) => {
|
|
72
|
-
i.payload[s] !== void 0 && (
|
|
72
|
+
i.payload[s] !== void 0 && (c[s] = i.payload[s]);
|
|
73
73
|
}), await n({
|
|
74
74
|
viewType: i.viewType,
|
|
75
75
|
projectName: i.projectName,
|
|
76
|
-
viewId:
|
|
77
|
-
payload:
|
|
76
|
+
viewId: a,
|
|
77
|
+
payload: c
|
|
78
78
|
}).unwrap();
|
|
79
79
|
} else
|
|
80
80
|
return await e(i).unwrap();
|
|
81
81
|
},
|
|
82
82
|
[e, n]
|
|
83
83
|
), g = k(() => {
|
|
84
|
-
const { viewType: i, projectName:
|
|
84
|
+
const { viewType: i, projectName: a, selectedView: c, workingView: V } = o;
|
|
85
85
|
if (!i) return {};
|
|
86
86
|
const s = t.getState(), u = b.endpoints.getWorkingView.select({
|
|
87
87
|
viewType: i,
|
|
88
|
-
projectName:
|
|
88
|
+
projectName: a
|
|
89
89
|
})(s), w = u?.data?.id || V?.id, l = b.endpoints.getDefaultView.select({
|
|
90
90
|
viewType: i,
|
|
91
|
-
projectName:
|
|
92
|
-
})(s), p = l?.data?.id ||
|
|
91
|
+
projectName: a
|
|
92
|
+
})(s), p = l?.data?.id || c?.id;
|
|
93
93
|
return (!!w && p === w || v) && u?.data?.settings ? {
|
|
94
94
|
settings: u.data.settings,
|
|
95
95
|
workingViewId: w
|
|
@@ -100,29 +100,29 @@ const N = () => {
|
|
|
100
100
|
}, [t, o]);
|
|
101
101
|
return {
|
|
102
102
|
updateViewSettings: k(
|
|
103
|
-
async (...i) => await Q(...i, o,
|
|
104
|
-
[o,
|
|
103
|
+
async (...i) => await Q(...i, o, r, g, N),
|
|
104
|
+
[o, r, g]
|
|
105
105
|
),
|
|
106
|
-
onCreateView:
|
|
106
|
+
onCreateView: r,
|
|
107
107
|
getLatestSettings: g,
|
|
108
108
|
markCacheDirty: N
|
|
109
109
|
};
|
|
110
110
|
}, L = (e, n) => n.split(".").reduce((o, t) => o?.[t], e), j = (e, n, o) => {
|
|
111
|
-
const [t, ...
|
|
111
|
+
const [t, ...r] = n.split(".");
|
|
112
112
|
return t ? {
|
|
113
113
|
...e,
|
|
114
|
-
[t]:
|
|
114
|
+
[t]: r.length ? j(e[t] || {}, r.join("."), o) : o
|
|
115
115
|
} : e;
|
|
116
116
|
}, ae = (e, n) => {
|
|
117
|
-
const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings:
|
|
118
|
-
|
|
117
|
+
const { viewSettings: o, isLoadingViews: t } = T(), { updateViewSettings: r, getLatestSettings: g } = $(), [f, i] = R(null), a = U(null), c = o, V = f !== null ? f : L(c, e) ?? n, s = k((d) => {
|
|
118
|
+
a.current = d, i(d);
|
|
119
119
|
}, []), u = k(
|
|
120
120
|
(d) => {
|
|
121
|
-
if (t
|
|
122
|
-
const w = g().settings ??
|
|
121
|
+
if (t) return;
|
|
122
|
+
const w = g().settings ?? c ?? {}, l = a.current !== null ? a.current : L(w, e) ?? n, p = typeof d == "function" ? d(
|
|
123
123
|
l
|
|
124
124
|
) : d;
|
|
125
|
-
|
|
125
|
+
r(
|
|
126
126
|
j(w, e, p),
|
|
127
127
|
s,
|
|
128
128
|
p,
|
|
@@ -134,9 +134,9 @@ const N = () => {
|
|
|
134
134
|
g,
|
|
135
135
|
t,
|
|
136
136
|
e,
|
|
137
|
-
|
|
137
|
+
c,
|
|
138
138
|
s,
|
|
139
|
-
|
|
139
|
+
r
|
|
140
140
|
]
|
|
141
141
|
);
|
|
142
142
|
return [V, u];
|
|
@@ -144,7 +144,7 @@ const N = () => {
|
|
|
144
144
|
export {
|
|
145
145
|
$ as a,
|
|
146
146
|
Q as b,
|
|
147
|
-
|
|
147
|
+
x as c,
|
|
148
148
|
P as g,
|
|
149
149
|
ae as u
|
|
150
150
|
};
|