@ynput/ayon-frontend-shared 0.6.5 → 0.6.7
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/NewEntity.es.js +15 -15
- package/dist/ProjectTreeTable.es.js +430 -433
- package/dist/Slicer.es.js +11 -11
- package/dist/Views.es.js +213 -206
- package/dist/chunks/CodeEditor.es.js +30 -0
- package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
- package/dist/chunks/EntityPath.es.js +2 -2
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +958 -931
- package/dist/chunks/JsonViewer.es.js +1 -1
- package/dist/chunks/Menu.es.js +169 -167
- package/dist/chunks/MenuItem.es.js +109 -74
- package/dist/chunks/MetaWidget.es.js +1537 -1516
- package/dist/chunks/PlayableIcon.es.js +127 -127
- package/dist/chunks/ReviewablesSelector.es.js +199 -196
- package/dist/chunks/SimpleForm.es.js +78 -75
- package/dist/chunks/SimpleTable.es.js +110 -110
- package/dist/chunks/Slicer.es.js +22 -22
- package/dist/chunks/TableSettingsFallback.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +2 -2
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +19 -19
- package/dist/chunks/afterStartup.es.js +13 -0
- package/dist/chunks/getUris.es.js +926 -964
- package/dist/chunks/queryFilterToClientFilter.es.js +90 -81
- package/dist/chunks/searchTerms.es.js +1 -0
- package/dist/chunks/useHierarchySelection.es.js +2 -2
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/components.es.js +202 -200
- package/dist/context.es.js +521 -492
- package/dist/hooks.es.js +190 -166
- package/dist/types/ContextMenu.d.ts +1 -0
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +4 -5
- package/dist/types/Slicer.d.ts +1 -1
- package/dist/types/Views.d.ts +13 -2
- package/dist/types/api.d.ts +203 -1175
- package/dist/types/components.d.ts +14 -3
- package/dist/types/context.d.ts +3 -2
- package/dist/types/hooks.d.ts +25 -1
- package/dist/types/util.d.ts +11 -1
- package/dist/util.es.js +44 -41
- package/package.json +2 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { getFilterFromId as
|
|
2
|
-
import { d as
|
|
3
|
-
import { c as
|
|
4
|
-
import { parseISO as
|
|
5
|
-
const
|
|
1
|
+
import { getFilterFromId as k, SEARCH_FILTER_ID as S } from "@ynput/ayon-react-components";
|
|
2
|
+
import { d as O } from "./PlayableIcon.es.js";
|
|
3
|
+
import { c as F, i as A, r as N } from "./expandRelativeDates.es.js";
|
|
4
|
+
import { parseISO as m, isValid as h, format as V } from "date-fns";
|
|
5
|
+
const C = "no-date", I = (e, n) => {
|
|
6
6
|
if (!n.values || n.values.length === 0) return null;
|
|
7
7
|
const t = n.values.flatMap((r) => {
|
|
8
|
-
const l = [], s = r.values, o = s?.[0]?.id, i = s?.[1]?.id,
|
|
9
|
-
return s?.[0] !== void 0 && s?.[0].id !==
|
|
8
|
+
const l = [], s = r.values, o = s?.[0]?.id, i = s?.[1]?.id, u = o && i && o !== C && i !== C ? O(o, i) : null;
|
|
9
|
+
return s?.[0] !== void 0 && s?.[0].id !== C && l.push({
|
|
10
10
|
key: e,
|
|
11
11
|
operator: n.inverted ? "lte" : "gte",
|
|
12
|
-
value:
|
|
13
|
-
}), s?.[1] !== void 0 && s?.[1].id !==
|
|
12
|
+
value: u ? F(u.id, 0) : s[0].id
|
|
13
|
+
}), s?.[1] !== void 0 && s?.[1].id !== C && l.push({
|
|
14
14
|
key: e,
|
|
15
15
|
operator: n.inverted ? "gte" : "lte",
|
|
16
|
-
value:
|
|
16
|
+
value: u ? F(u.id, 1) : s[1].id
|
|
17
17
|
}), l;
|
|
18
18
|
});
|
|
19
19
|
return t.length === 0 ? null : {
|
|
@@ -21,87 +21,88 @@ const V = "no-date", T = (e, n) => {
|
|
|
21
21
|
operator: n.inverted ? "or" : "and"
|
|
22
22
|
};
|
|
23
23
|
}, G = (e) => !e || e.length === 0 ? {} : {
|
|
24
|
-
conditions: e.filter((t) => !!t.values?.length).filter((t) => t.id !== "hierarchy").flatMap((t) =>
|
|
24
|
+
conditions: e.filter((t) => !!t.values?.length).filter((t) => t.id !== "hierarchy").flatMap((t) => T(t)),
|
|
25
25
|
operator: "and"
|
|
26
|
-
},
|
|
26
|
+
}, x = (e) => ({
|
|
27
27
|
conditions: [
|
|
28
28
|
{ key: e, operator: "isnull" },
|
|
29
29
|
{ key: e, operator: "eq", value: "" }
|
|
30
30
|
],
|
|
31
31
|
operator: "or"
|
|
32
|
-
}),
|
|
32
|
+
}), D = (e) => ({
|
|
33
33
|
conditions: [
|
|
34
34
|
{ key: e, operator: "notnull" },
|
|
35
35
|
{ key: e, operator: "ne", value: "" }
|
|
36
36
|
],
|
|
37
37
|
operator: "and"
|
|
38
|
-
}),
|
|
39
|
-
const n =
|
|
38
|
+
}), T = (e) => {
|
|
39
|
+
const n = k(e.id);
|
|
40
40
|
let t;
|
|
41
|
-
const r = Array.isArray(e.values) && e.values.map((
|
|
42
|
-
e.values && e.values.length > 0 && (e.singleSelect ? t =
|
|
43
|
-
const s = e.type?.startsWith("list_of_") || n.includes("tags") || n.includes("assignees"), o = e.type === "datetime", i = e.type === "boolean",
|
|
41
|
+
const r = Array.isArray(e.values) && e.values.map((d) => d.id)?.includes("hasValue"), l = Array.isArray(e.values) && e.values.map((d) => d.id)?.includes("noValue");
|
|
42
|
+
e.values && e.values.length > 0 && (e.singleSelect ? t = b(e.values[0].id, e.type) : t = e.values.map((d) => b(d.id, e.type)));
|
|
43
|
+
const s = e.type?.startsWith("list_of_") || n.includes("tags") || n.includes("assignees"), o = e.type === "datetime", i = e.type === "boolean", u = n.endsWith("version") || e.type === "integer" || e.type === "float", v = e.values && e.values.some((d) => d.isCustom === !0);
|
|
44
44
|
let a = "eq";
|
|
45
45
|
if (t === void 0)
|
|
46
46
|
return a = e.inverted ? "notnull" : "isnull", { key: n, operator: a };
|
|
47
|
-
const
|
|
47
|
+
const y = e.type === "string" && !s;
|
|
48
48
|
if (r) {
|
|
49
|
-
if (
|
|
50
|
-
return e.inverted ?
|
|
49
|
+
if (y)
|
|
50
|
+
return e.inverted ? x(n) : D(n);
|
|
51
51
|
t = s ? [] : void 0, a = s ? e.inverted ? "eq" : "ne" : e.inverted ? "isnull" : "notnull";
|
|
52
52
|
} else if (l) {
|
|
53
|
-
if (
|
|
54
|
-
return e.inverted ?
|
|
53
|
+
if (y)
|
|
54
|
+
return e.inverted ? D(n) : x(n);
|
|
55
55
|
t = s ? [] : void 0, a = s ? e.inverted ? "ne" : "eq" : e.inverted ? "notnull" : "isnull";
|
|
56
56
|
} else if (s)
|
|
57
57
|
e.inverted ? a = e.operator === "AND" ? "excludesall" : "excludesany" : a = e.operator === "AND" ? "includesall" : "includesany";
|
|
58
58
|
else if (o) {
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
59
|
+
const d = I(n, e);
|
|
60
|
+
if (d) return d;
|
|
61
61
|
a = e.inverted ? "ne" : "eq";
|
|
62
62
|
} else if (i)
|
|
63
63
|
a = e.inverted ? "ne" : "eq";
|
|
64
|
-
else if (
|
|
64
|
+
else if (v && !s && !u) {
|
|
65
|
+
const d = e.inverted ? "notlike" : "like";
|
|
65
66
|
if (!e.values || e.values.length === 0)
|
|
66
67
|
a = e.inverted ? "notin" : "in";
|
|
67
68
|
else {
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
if (
|
|
71
|
-
a =
|
|
69
|
+
const c = e.values.filter((p) => p.isCustom === !0), g = e.values.filter((p) => !p.isCustom);
|
|
70
|
+
if (g.length === 0)
|
|
71
|
+
if (c.length === 1)
|
|
72
|
+
a = d, t = `%${c[0].id}%`;
|
|
72
73
|
else
|
|
73
74
|
return {
|
|
74
|
-
conditions:
|
|
75
|
+
conditions: c.map((f) => ({
|
|
75
76
|
key: n,
|
|
76
|
-
operator:
|
|
77
|
-
value: `%${
|
|
77
|
+
operator: d,
|
|
78
|
+
value: `%${f.id}%`
|
|
78
79
|
})),
|
|
79
80
|
operator: e.inverted ? "and" : "or"
|
|
80
81
|
};
|
|
81
82
|
else {
|
|
82
|
-
const
|
|
83
|
-
return
|
|
83
|
+
const p = [];
|
|
84
|
+
return g.length > 0 && p.push({
|
|
84
85
|
key: n,
|
|
85
86
|
operator: e.inverted ? "notin" : "in",
|
|
86
|
-
value:
|
|
87
|
-
(
|
|
87
|
+
value: g.map(
|
|
88
|
+
(f) => b(f.id, e.type)
|
|
88
89
|
)
|
|
89
|
-
}),
|
|
90
|
-
|
|
90
|
+
}), c.forEach((f) => {
|
|
91
|
+
p.push({
|
|
91
92
|
key: n,
|
|
92
|
-
operator:
|
|
93
|
-
value: `%${
|
|
93
|
+
operator: d,
|
|
94
|
+
value: `%${f.id}%`
|
|
94
95
|
});
|
|
95
96
|
}), {
|
|
96
|
-
conditions:
|
|
97
|
+
conditions: p,
|
|
97
98
|
operator: e.inverted ? "and" : "or"
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
else
|
|
102
|
+
} else
|
|
102
103
|
a = e.inverted ? "notin" : "in";
|
|
103
104
|
return { key: n, value: t, operator: a };
|
|
104
|
-
},
|
|
105
|
+
}, b = (e, n) => {
|
|
105
106
|
if (!n) return e;
|
|
106
107
|
switch (n) {
|
|
107
108
|
case "integer":
|
|
@@ -113,7 +114,7 @@ const V = "no-date", T = (e, n) => {
|
|
|
113
114
|
default:
|
|
114
115
|
return e;
|
|
115
116
|
}
|
|
116
|
-
},
|
|
117
|
+
}, $ = (e, n) => {
|
|
117
118
|
if (!e?.conditions || e.conditions.length === 0)
|
|
118
119
|
return [];
|
|
119
120
|
const t = [], r = /* @__PURE__ */ new Set();
|
|
@@ -128,7 +129,7 @@ const V = "no-date", T = (e, n) => {
|
|
|
128
129
|
else if (o)
|
|
129
130
|
t.push(o);
|
|
130
131
|
else {
|
|
131
|
-
const i =
|
|
132
|
+
const i = $(l, n);
|
|
132
133
|
t.push(...i);
|
|
133
134
|
}
|
|
134
135
|
}
|
|
@@ -150,38 +151,38 @@ const V = "no-date", T = (e, n) => {
|
|
|
150
151
|
if (t.length !== e.conditions.length) return null;
|
|
151
152
|
const r = t[0].key;
|
|
152
153
|
if (!t.every((c) => c.key === r)) return null;
|
|
153
|
-
const l =
|
|
154
|
+
const l = M(r, n);
|
|
154
155
|
if (!l || l.type !== "datetime") return null;
|
|
155
156
|
const s = t.find((c) => c.operator === "gte"), o = t.find((c) => c.operator === "lte");
|
|
156
157
|
if (!s && !o) return null;
|
|
157
|
-
const i = s?.value,
|
|
158
|
-
let
|
|
159
|
-
if (
|
|
160
|
-
const c =
|
|
158
|
+
const i = s?.value, u = o?.value, v = i && A(i) ? N(i) : i, a = u && A(u) ? N(u) : u;
|
|
159
|
+
let y = "Custom range";
|
|
160
|
+
if (v && a) {
|
|
161
|
+
const c = O(v, a);
|
|
161
162
|
if (c)
|
|
162
|
-
|
|
163
|
+
y = c.label;
|
|
163
164
|
else {
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
|
|
165
|
+
const g = m(v), p = m(a);
|
|
166
|
+
if (h(g) && h(p)) {
|
|
167
|
+
const f = (/* @__PURE__ */ new Date()).getFullYear(), w = p.getFullYear() === f ? "MMM d" : "MMM d, yyyy";
|
|
168
|
+
y = `${V(g, "MMM d")} – ${V(p, w)}`;
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
|
-
const
|
|
172
|
-
id: `custom-${
|
|
173
|
-
label:
|
|
172
|
+
const d = {
|
|
173
|
+
id: `custom-${v || ""}-${a || ""}`,
|
|
174
|
+
label: y,
|
|
174
175
|
values: [
|
|
175
|
-
...
|
|
176
|
+
...v ? [
|
|
176
177
|
{
|
|
177
|
-
id:
|
|
178
|
-
label: m(
|
|
178
|
+
id: v,
|
|
179
|
+
label: h(m(v)) ? V(m(v), "MMM d, yyyy") : v
|
|
179
180
|
}
|
|
180
181
|
] : [],
|
|
181
182
|
...a ? [
|
|
182
183
|
{
|
|
183
184
|
id: a,
|
|
184
|
-
label: m(
|
|
185
|
+
label: h(m(a)) ? V(m(a), "MMM d, yyyy") : a
|
|
185
186
|
}
|
|
186
187
|
] : []
|
|
187
188
|
]
|
|
@@ -192,7 +193,7 @@ const V = "no-date", T = (e, n) => {
|
|
|
192
193
|
label: l.label,
|
|
193
194
|
icon: l.icon,
|
|
194
195
|
inverted: e.operator === "or",
|
|
195
|
-
values: [
|
|
196
|
+
values: [d],
|
|
196
197
|
singleSelect: l.singleSelect
|
|
197
198
|
};
|
|
198
199
|
}, q = (e, n) => {
|
|
@@ -202,7 +203,7 @@ const V = "no-date", T = (e, n) => {
|
|
|
202
203
|
if (!t.every((i) => i.key === r)) return null;
|
|
203
204
|
const l = e.operator === "or" && t.some((i) => i.operator === "isnull") && t.some((i) => i.operator === "eq" && i.value === ""), s = e.operator === "and" && t.some((i) => i.operator === "notnull") && t.some((i) => i.operator === "ne" && i.value === "");
|
|
204
205
|
if (!l && !s) return null;
|
|
205
|
-
const o =
|
|
206
|
+
const o = M(r, n);
|
|
206
207
|
return o ? {
|
|
207
208
|
id: o.id,
|
|
208
209
|
type: o.type,
|
|
@@ -216,35 +217,35 @@ const V = "no-date", T = (e, n) => {
|
|
|
216
217
|
} : null;
|
|
217
218
|
}, E = (e, n, t) => {
|
|
218
219
|
const { key: r, value: l, operator: s } = e;
|
|
219
|
-
if (r ===
|
|
220
|
+
if (r === S) {
|
|
220
221
|
const c = Array.isArray(l) ? l : [l || ""];
|
|
221
222
|
return {
|
|
222
|
-
id:
|
|
223
|
+
id: S,
|
|
223
224
|
type: "string",
|
|
224
225
|
label: "",
|
|
225
|
-
values: c.map((
|
|
226
|
+
values: c.map((p) => ({ id: String(p), label: String(p) }))
|
|
226
227
|
};
|
|
227
228
|
}
|
|
228
|
-
const o =
|
|
229
|
+
const o = M(r, n);
|
|
229
230
|
if (!o)
|
|
230
231
|
return null;
|
|
231
232
|
const i = `${r}_${s}_${JSON.stringify(l)}`;
|
|
232
233
|
if (t.has(i))
|
|
233
234
|
return null;
|
|
234
235
|
t.add(i);
|
|
235
|
-
const
|
|
236
|
+
const u = H(l, s, o), a = u.length === 1 && ["hasValue", "noValue"].includes(String(u[0].id)) ? !1 : L(s, o.type), y = W(s, o.type);
|
|
236
237
|
return {
|
|
237
238
|
id: o.id,
|
|
238
239
|
type: o.type,
|
|
239
240
|
label: o.label,
|
|
240
241
|
inverted: a,
|
|
241
|
-
operator:
|
|
242
|
+
operator: y,
|
|
242
243
|
icon: o.icon,
|
|
243
|
-
values:
|
|
244
|
+
values: u,
|
|
244
245
|
isCustom: o.allowsCustomValues,
|
|
245
246
|
singleSelect: o.singleSelect
|
|
246
247
|
};
|
|
247
|
-
},
|
|
248
|
+
}, M = (e, n) => {
|
|
248
249
|
let t = n.find((r) => r.id === e);
|
|
249
250
|
return t || (t = n.find(
|
|
250
251
|
(r) => r.id.endsWith(e) || r.id.replace(/^[^.]*\./, "") === e || r.id.split("_").pop() === e
|
|
@@ -260,18 +261,18 @@ const V = "no-date", T = (e, n) => {
|
|
|
260
261
|
}
|
|
261
262
|
return e == null ? [] : (Array.isArray(e) ? e : [e]).map((l) => {
|
|
262
263
|
let s = String(l), o = !1;
|
|
263
|
-
if (n === "like" && typeof l == "string" && (s = l.replace(/^%/, "").replace(/%$/, ""), o = !0), !o) {
|
|
264
|
-
const i = t.values?.find((
|
|
264
|
+
if ((n === "like" || n === "notlike") && typeof l == "string" && (s = l.replace(/^%/, "").replace(/%$/, ""), o = !0), !o) {
|
|
265
|
+
const i = t.values?.find((u) => u.id === s);
|
|
265
266
|
if (i)
|
|
266
267
|
return i;
|
|
267
268
|
}
|
|
268
269
|
if (t.type === "datetime" && typeof l == "string")
|
|
269
270
|
try {
|
|
270
|
-
const i =
|
|
271
|
-
if (
|
|
271
|
+
const i = m(l);
|
|
272
|
+
if (h(i))
|
|
272
273
|
return {
|
|
273
274
|
id: s,
|
|
274
|
-
label:
|
|
275
|
+
label: V(i, "MMM d, yyyy"),
|
|
275
276
|
isCustom: !0
|
|
276
277
|
};
|
|
277
278
|
} catch {
|
|
@@ -282,11 +283,19 @@ const V = "no-date", T = (e, n) => {
|
|
|
282
283
|
isCustom: !0
|
|
283
284
|
};
|
|
284
285
|
});
|
|
285
|
-
}, L = (e, n) => e ? [
|
|
286
|
+
}, L = (e, n) => e ? [
|
|
287
|
+
"ne",
|
|
288
|
+
"notin",
|
|
289
|
+
"notlike",
|
|
290
|
+
"excludes",
|
|
291
|
+
"excludesall",
|
|
292
|
+
"excludesany",
|
|
293
|
+
"notnull"
|
|
294
|
+
].includes(e) : !1, W = (e, n) => n?.startsWith("list_of_") && (e === "includesall" || e === "excludesall") ? "AND" : "OR";
|
|
286
295
|
export {
|
|
287
296
|
G as a,
|
|
288
297
|
q as b,
|
|
289
|
-
|
|
290
|
-
|
|
298
|
+
I as c,
|
|
299
|
+
$ as q,
|
|
291
300
|
_ as t
|
|
292
301
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@module-federation/enhanced/runtime";
|
|
4
|
+
import "react-toastify";
|
|
5
|
+
import "@ynput/ayon-react-components";
|
|
4
6
|
import "./searchTerms.es.js";
|
|
5
7
|
import "./getUris.es.js";
|
|
6
8
|
import "primereact/confirmdialog";
|
|
7
9
|
import { a as o } from "./DeleteEntitiesContextInstance.es.js";
|
|
8
10
|
import "lodash";
|
|
9
|
-
import "react-toastify";
|
|
10
11
|
import "uuid";
|
|
11
12
|
import "semver";
|
|
12
|
-
import "@ynput/ayon-react-components";
|
|
13
13
|
import "./ContextMenuContextInstance.es.js";
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "react-dom";
|
|
@@ -1,68 +1,69 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { useState as f, useRef as
|
|
3
|
-
import { loadRemote as
|
|
2
|
+
import { useState as f, useRef as z, useEffect as I } from "react";
|
|
3
|
+
import { loadRemote as M } from "@module-federation/enhanced/runtime";
|
|
4
|
+
import "react-toastify";
|
|
5
|
+
import "@ynput/ayon-react-components";
|
|
4
6
|
import "./searchTerms.es.js";
|
|
5
7
|
import "./getUris.es.js";
|
|
6
8
|
import "primereact/confirmdialog";
|
|
7
|
-
import { b as
|
|
9
|
+
import { b as q } from "./DeleteEntitiesContextInstance.es.js";
|
|
8
10
|
import "lodash";
|
|
9
|
-
import "react-toastify";
|
|
10
11
|
import "uuid";
|
|
11
|
-
import
|
|
12
|
-
import "@ynput/ayon-react-components";
|
|
12
|
+
import h from "semver";
|
|
13
13
|
import "./ContextMenuContextInstance.es.js";
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "react-redux";
|
|
17
|
-
const
|
|
17
|
+
const H = ({
|
|
18
18
|
addon: o,
|
|
19
19
|
remote: t,
|
|
20
20
|
module: e,
|
|
21
|
-
fallback:
|
|
21
|
+
fallback: L,
|
|
22
22
|
minVersion: s,
|
|
23
|
-
skip: u = !1
|
|
23
|
+
skip: u = !1,
|
|
24
|
+
defer: l = !1
|
|
24
25
|
}) => {
|
|
25
|
-
const { remotesInitialized:
|
|
26
|
-
return
|
|
26
|
+
const { remotesInitialized: c, modules: a } = q(), [v, r] = f(!0), [d, m] = f(!1), [R, p] = f(!1), g = z(L);
|
|
27
|
+
return I(() => {
|
|
27
28
|
if (u) {
|
|
28
|
-
r(!1),
|
|
29
|
+
r(!1), m(!0);
|
|
29
30
|
return;
|
|
30
31
|
}
|
|
31
|
-
if (
|
|
32
|
+
if (l || !c || !o || !t || !e) return;
|
|
32
33
|
const i = a.find((n) => n.addonName === o);
|
|
33
34
|
if (!i) {
|
|
34
35
|
console.log("remote not found", { addon: o, remote: t, module: e }), r(!1);
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
|
-
if (s && !
|
|
38
|
+
if (s && !h.gte(i.addonVersion, s) && s + "-dev" !== i.addonVersion) {
|
|
38
39
|
console.log("remote version does not meet minimum requirement", {
|
|
39
40
|
addon: o,
|
|
40
41
|
remote: t,
|
|
41
42
|
module: e,
|
|
42
43
|
current: i.addonVersion,
|
|
43
44
|
required: s
|
|
44
|
-
}),
|
|
45
|
+
}), p(!0), r(!1);
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
if (
|
|
48
|
+
if (p(!1), !i.modules[t])
|
|
48
49
|
return r(!1), console.log("module not found", { addon: o, remote: t, module: e });
|
|
49
50
|
if (d === e) {
|
|
50
51
|
r(!1);
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
+
M(`${t}/${e}`, {
|
|
54
55
|
from: "runtime"
|
|
55
56
|
}).then((n) => {
|
|
56
|
-
|
|
57
|
+
m(e), r(!1), n && (g.current = n.default);
|
|
57
58
|
}).catch((n) => {
|
|
58
59
|
r(!1), console.error("error loading remote", t, e, n);
|
|
59
60
|
});
|
|
60
|
-
}, [d,
|
|
61
|
-
|
|
61
|
+
}, [d, c, a, o, t, e, s, u, l]), [
|
|
62
|
+
g.current,
|
|
62
63
|
{
|
|
63
64
|
isLoaded: d === e,
|
|
64
|
-
isLoading:
|
|
65
|
-
outdated:
|
|
65
|
+
isLoading: v,
|
|
66
|
+
outdated: R ? {
|
|
66
67
|
current: a.find((i) => i.addonName === o)?.addonVersion || "unknown",
|
|
67
68
|
required: s?.replace("-dev", "") || "unknown"
|
|
68
69
|
} : void 0
|
|
@@ -70,5 +71,5 @@ const G = ({
|
|
|
70
71
|
];
|
|
71
72
|
};
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
H as u
|
|
74
75
|
};
|