@cccsaurora/clue-ui 1.4.3 → 1.4.4
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/{ActionForm-h08d0iw-.js → ActionForm-CO0fQZoN.js} +2 -2
- package/{AnnotationDetails-DU_7TqAH.js → AnnotationDetails-BuctmauD.js} +1 -1
- package/{AnnotationPreview-DjIO0yXp.js → AnnotationPreview-B3Y3a448.js} +1 -1
- package/{ClueEnrichContext-BU7wzqVH.js → ClueEnrichContext-JoHErgCy.js} +110 -110
- package/components/AnnotationDetailPopover.js +1 -1
- package/components/AnnotationDetails.js +2 -2
- package/components/AnnotationPreview.js +1 -1
- package/components/EnrichedCard.js +1 -1
- package/components/EnrichedChip.js +2 -2
- package/components/EnrichedTypography.js +2 -2
- package/components/RetryFailedEnrichments.js +1 -1
- package/components/SourcePicker.js +1 -1
- package/components/actions/ActionForm.js +1 -1
- package/components/actions/ExecutePopover.js +1 -1
- package/components/actions/ResultModal.js +1 -1
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/fetchers/Fetcher.js +1 -1
- package/components/group/GroupControl.js +1 -1
- package/components/stats/QueryStatus.js +1 -1
- package/database/index.js +2 -2
- package/database/replication.js +1 -1
- package/hooks/ClueActionContext.js +1 -1
- package/hooks/ClueDatabaseContext.d.ts +1 -1
- package/hooks/ClueDatabaseContext.js +18 -16
- package/hooks/ClueEnrichContext.js +1 -1
- package/hooks/ClueGroupContext.js +1 -1
- package/hooks/CluePopupContext.js +2 -2
- package/hooks/ClueProvider.js +3 -3
- package/hooks/selectors.js +2 -2
- package/hooks/useActionResult.js +1 -1
- package/hooks/useAnnotations.js +2 -2
- package/hooks/useClue.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/hooks/useErrors.js +1 -1
- package/hooks/useFetcherResult.js +1 -1
- package/icons/Action.js +2 -2
- package/icons/Assessment.js +1 -1
- package/icons/Context.js +1 -1
- package/icons/Opinion.js +1 -1
- package/{index-D3Dwn-8x.js → index-BUdI6sOY.js} +2 -2
- package/{index-DoFpWPHo.js → index-C-VxIzWt.js} +1 -1
- package/main.js +5 -5
- package/package.json +31 -31
- package/{replication-WkKbPdwG.js → replication-DE5eDSNE.js} +1094 -1088
|
@@ -6,7 +6,7 @@ import ln from "./components/display/icons/Iconified.js";
|
|
|
6
6
|
import { J as In } from "./index-Cj4d5cGz.js";
|
|
7
7
|
import { ClueComponentContext as Ke } from "./hooks/ClueComponentContext.js";
|
|
8
8
|
import { g as qn } from "./_commonjsHelpers-C6fGbg64.js";
|
|
9
|
-
import { c as Mn, r as un, a as Vn } from "./index-
|
|
9
|
+
import { c as Mn, r as un, a as Vn } from "./index-BUdI6sOY.js";
|
|
10
10
|
import { a as Mt } from "./index-BH-gBhtO.js";
|
|
11
11
|
import { d as dn } from "./_baseGet-bVwDaGrA.js";
|
|
12
12
|
import { b as Fn } from "./_baseSlice-M5RKzt1A.js";
|
|
@@ -16,7 +16,7 @@ import { a as Se, c as An, u as zn } from "./index-BM9Sve5T.js";
|
|
|
16
16
|
import Ue from "./components/ErrorBoundary.js";
|
|
17
17
|
import { adaptSchema as Ln } from "./components/actions/form/schemaAdapter.js";
|
|
18
18
|
import { I as Gn } from "./iconify-Ptb5dTKy.js";
|
|
19
|
-
import { C as Jn } from "./ClueEnrichContext-
|
|
19
|
+
import { C as Jn } from "./ClueEnrichContext-JoHErgCy.js";
|
|
20
20
|
import { ClueFetcherContext as Hn } from "./hooks/ClueFetcherContext.js";
|
|
21
21
|
import Bn from "./components/ClassificationChip.js";
|
|
22
22
|
import Qn from "./components/actions/formats/index.js";
|
|
@@ -4,7 +4,7 @@ import { useTheme as $, Stack as l, Typography as s, Tooltip as x, Box as E, Ico
|
|
|
4
4
|
import g from "./components/display/icons/Iconified.js";
|
|
5
5
|
import { SNACKBAR_EVENT_ID as H } from "./data/event.js";
|
|
6
6
|
import { ClueComponentContext as K } from "./hooks/ClueComponentContext.js";
|
|
7
|
-
import { f as T } from "./ActionForm-
|
|
7
|
+
import { f as T } from "./ActionForm-CO0fQZoN.js";
|
|
8
8
|
import L from "./hooks/useAnnotations.js";
|
|
9
9
|
import U from "./hooks/useErrors.js";
|
|
10
10
|
import { ICON_MAP as k } from "./icons/iconMap.js";
|
|
@@ -8,7 +8,7 @@ import { useState as v, useRef as Y, useCallback as x, useEffect as Z, useMemo a
|
|
|
8
8
|
import { c as B, a as G } from "./index-BM9Sve5T.js";
|
|
9
9
|
import { SHOW_EVENT_ID as g, HIDE_EVENT_ID as D } from "./data/event.js";
|
|
10
10
|
import { safeDispatchEvent as A, safeAddEventListener as S } from "./utils/window.js";
|
|
11
|
-
import { i as J } from "./AnnotationDetails-
|
|
11
|
+
import { i as J } from "./AnnotationDetails-BuctmauD.js";
|
|
12
12
|
const b = B(null), rt = ({ children: c }) => {
|
|
13
13
|
const [l, e] = v(null), [p, i] = v(null), [r, d] = v(null), [u, m] = v(null), [f, t] = v({}), a = Y(null), P = x((s, o, z, N) => {
|
|
14
14
|
A(
|
|
@@ -15,15 +15,15 @@ import { useContext as qt, useState as S, useMemo as K, useCallback as j, useRef
|
|
|
15
15
|
import { c as St } from "./index-BM9Sve5T.js";
|
|
16
16
|
import { ClueDatabaseContext as Bt } from "./hooks/ClueDatabaseContext.js";
|
|
17
17
|
import Vt from "./hooks/useClueConfig.js";
|
|
18
|
-
import
|
|
19
|
-
import { i as
|
|
20
|
-
function
|
|
18
|
+
import Ut from "./hooks/useClueTypeConfig.js";
|
|
19
|
+
import { i as Wt } from "./isEmpty-DKxrY-_M.js";
|
|
20
|
+
function bt(n) {
|
|
21
21
|
var r = jt(n), m = r % 1;
|
|
22
22
|
return r === r ? m ? r - m : r : 0;
|
|
23
23
|
}
|
|
24
24
|
var Ft = Math.ceil, Ht = Math.max;
|
|
25
25
|
function Jt(n, r, m) {
|
|
26
|
-
r === void 0 ? r = 1 : r = Ht(
|
|
26
|
+
r === void 0 ? r = 1 : r = Ht(bt(r), 0);
|
|
27
27
|
var u = n == null ? 0 : n.length;
|
|
28
28
|
if (!u || r < 1)
|
|
29
29
|
return [];
|
|
@@ -57,7 +57,7 @@ function X(n, r, m) {
|
|
|
57
57
|
const u = n.random || (n.rng || Gt)();
|
|
58
58
|
return u[6] = u[6] & 15 | 64, u[8] = u[8] & 63 | 128, Kt(u);
|
|
59
59
|
}
|
|
60
|
-
const Yt = St(null),
|
|
60
|
+
const Yt = St(null), ds = ({
|
|
61
61
|
children: n,
|
|
62
62
|
classification: r,
|
|
63
63
|
baseURL: m,
|
|
@@ -67,83 +67,83 @@ const Yt = St(null), de = ({
|
|
|
67
67
|
chunkSize: M = 15,
|
|
68
68
|
maxRequestCount: Q = 4,
|
|
69
69
|
defaultTimeout: B = 5,
|
|
70
|
-
enabled:
|
|
70
|
+
enabled: I = !0,
|
|
71
71
|
ready: yt = !1,
|
|
72
72
|
publicIconify: Y = !0,
|
|
73
73
|
skipConfigCall: Z = !1,
|
|
74
74
|
customIconify: V,
|
|
75
|
-
debugLogging:
|
|
75
|
+
debugLogging: O = !0
|
|
76
76
|
}) => {
|
|
77
77
|
var ot, ct, at, ut, lt;
|
|
78
78
|
const g = Vt(), t = qt(Bt), [z, ht] = S(null), E = K(
|
|
79
79
|
() => {
|
|
80
|
-
var
|
|
81
|
-
return z ?? r ?? ((
|
|
80
|
+
var s, e;
|
|
81
|
+
return z ?? r ?? ((e = (s = g.config) == null ? void 0 : s.c12nDef) == null ? void 0 : e.RESTRICTED);
|
|
82
82
|
},
|
|
83
83
|
[r, (ct = (ot = g.config) == null ? void 0 : ot.c12nDef) == null ? void 0 : ct.RESTRICTED, z]
|
|
84
84
|
), N = j(
|
|
85
|
-
(
|
|
86
|
-
var
|
|
87
|
-
return ht(
|
|
85
|
+
(s) => {
|
|
86
|
+
var e;
|
|
87
|
+
return ht(s((e = g.config) == null ? void 0 : e.c12nDef));
|
|
88
88
|
},
|
|
89
89
|
[(at = g.config) == null ? void 0 : at.c12nDef]
|
|
90
|
-
), [x, wt] = S(yt), R = At(0), [
|
|
91
|
-
|
|
90
|
+
), [x, wt] = S(yt), R = At(0), [$, vt] = S([]), { availableSources: q, typesDetection: U, supportedTypes: T } = Ut(
|
|
91
|
+
I && x,
|
|
92
92
|
m,
|
|
93
|
-
|
|
93
|
+
O,
|
|
94
94
|
u,
|
|
95
95
|
y
|
|
96
96
|
);
|
|
97
97
|
P(() => {
|
|
98
|
-
if (Z ||
|
|
98
|
+
if (Z || !I || !x)
|
|
99
99
|
return;
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
let c = { baseURL: m, headers:
|
|
100
|
+
const s = {}, e = u == null ? void 0 : u();
|
|
101
|
+
e && (s.Authorization = `Bearer ${e}`);
|
|
102
|
+
let c = { baseURL: m, headers: s };
|
|
103
103
|
y && (c = y(c)), $t.configs.get(c).then(g.setConfig);
|
|
104
|
-
}, [m, y, Z,
|
|
104
|
+
}, [m, y, Z, I, x]);
|
|
105
105
|
const [L, k] = S(() => {
|
|
106
|
-
var
|
|
107
|
-
return !!((
|
|
106
|
+
var s;
|
|
107
|
+
return !!((s = t == null ? void 0 : t.selectors) != null && s.synced);
|
|
108
108
|
});
|
|
109
109
|
P(() => {
|
|
110
|
-
var
|
|
111
|
-
k(!!((
|
|
110
|
+
var s;
|
|
111
|
+
k(!!((s = t == null ? void 0 : t.selectors) != null && s.synced));
|
|
112
112
|
}, [t]), P(() => {
|
|
113
|
-
if (x) {
|
|
114
|
-
const
|
|
113
|
+
if (I && x) {
|
|
114
|
+
const s = Object.values(F).map((e) => (e.reSync(), e.start(), e.active$.subscribe((c) => {
|
|
115
115
|
var i;
|
|
116
116
|
c || k(!!((i = t == null ? void 0 : t.selectors) != null && i.synced));
|
|
117
117
|
})));
|
|
118
118
|
return () => {
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
s.forEach((e) => e.unsubscribe()), Object.values(F).forEach((e) => {
|
|
120
|
+
e.pause();
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
return () => {
|
|
125
|
-
Object.values(F).forEach((
|
|
126
|
-
|
|
125
|
+
Object.values(F).forEach((s) => {
|
|
126
|
+
s.pause();
|
|
127
127
|
});
|
|
128
128
|
};
|
|
129
|
-
}, [t, x]);
|
|
130
|
-
const [tt,
|
|
129
|
+
}, [t, I, x]);
|
|
130
|
+
const [tt, st] = S(V);
|
|
131
131
|
P(() => {
|
|
132
|
-
V &&
|
|
132
|
+
V && st(V);
|
|
133
133
|
}, [V]), P(() => {
|
|
134
134
|
if (Y)
|
|
135
135
|
return;
|
|
136
|
-
let
|
|
137
|
-
!
|
|
138
|
-
resources: [
|
|
136
|
+
let s = tt ?? void 0 ?? (m == null ? void 0 : m.replace(/^[^.]+/, "icons"));
|
|
137
|
+
!s && typeof window < "u" && window && !window.location.origin.includes("localhost") && (s = window.location.protocol + "//" + window.location.origin.replace(/^[^.]+/, "icons")), s && (G(`Using ${s} for iconify`, O), Ot("", {
|
|
138
|
+
resources: [s]
|
|
139
139
|
}));
|
|
140
|
-
}, [m, tt,
|
|
141
|
-
const
|
|
142
|
-
async (
|
|
143
|
-
const
|
|
144
|
-
for (const i of
|
|
140
|
+
}, [m, tt, O, Y]);
|
|
141
|
+
const W = j(
|
|
142
|
+
async (s) => {
|
|
143
|
+
const e = [];
|
|
144
|
+
for (const i of s) {
|
|
145
145
|
const { latency: a, source: l, type: o, value: h, items: f, error: w } = i;
|
|
146
|
-
await t.selectors.find({ selector: { type: o, value: h, source: l } }).incrementalRemove(), w &&
|
|
146
|
+
await t.selectors.find({ selector: { type: o, value: h, source: l } }).incrementalRemove(), w && e.push({
|
|
147
147
|
id: X(),
|
|
148
148
|
source: l,
|
|
149
149
|
type: o,
|
|
@@ -155,7 +155,7 @@ const Yt = St(null), de = ({
|
|
|
155
155
|
error: w
|
|
156
156
|
});
|
|
157
157
|
for (const p of f) {
|
|
158
|
-
const { classification: v, count:
|
|
158
|
+
const { classification: v, count: C, link: xt, annotations: Dt } = p, _ = {
|
|
159
159
|
id: X(),
|
|
160
160
|
source: l,
|
|
161
161
|
type: o,
|
|
@@ -163,23 +163,23 @@ const Yt = St(null), de = ({
|
|
|
163
163
|
annotations: Dt,
|
|
164
164
|
classification: v,
|
|
165
165
|
latency: a,
|
|
166
|
-
count:
|
|
166
|
+
count: C,
|
|
167
167
|
link: xt,
|
|
168
168
|
error: w
|
|
169
169
|
};
|
|
170
|
-
|
|
170
|
+
e.some((It) => It.id === _.id) && (_.id = X()), e.push(_);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
const c = await t.selectors.bulkInsert(
|
|
173
|
+
const c = await t.selectors.bulkInsert(e);
|
|
174
174
|
c.error.length > 0 && (console.warn("Errors on upsert:"), c.error.forEach((i) => console.warn(i.documentId, i.validationErrors ?? i.status)));
|
|
175
175
|
},
|
|
176
176
|
[t, E]
|
|
177
|
-
),
|
|
178
|
-
async (
|
|
177
|
+
), et = j(
|
|
178
|
+
async (s, e, c = {}) => {
|
|
179
179
|
var p;
|
|
180
|
-
if (!
|
|
181
|
-
return console.error(`Type (${
|
|
182
|
-
const i = (D == null ? void 0 : D(
|
|
180
|
+
if (!s || !e)
|
|
181
|
+
return console.error(`Type (${s}) or value (${e}) is empty, returning empty response`), {};
|
|
182
|
+
const i = (D == null ? void 0 : D($, q, [{ type: s, value: e, classification: c.classification }])) ?? $, a = {
|
|
183
183
|
timeout: B,
|
|
184
184
|
force: !1,
|
|
185
185
|
includeRaw: !1,
|
|
@@ -192,8 +192,8 @@ const Yt = St(null), de = ({
|
|
|
192
192
|
let h = { baseURL: m, headers: l };
|
|
193
193
|
y && (h = y(h));
|
|
194
194
|
const f = {
|
|
195
|
-
type:
|
|
196
|
-
value:
|
|
195
|
+
type: s,
|
|
196
|
+
value: e,
|
|
197
197
|
classification: a.classification
|
|
198
198
|
};
|
|
199
199
|
let w = await t.status.findOne({ selector: { ...f } }).exec();
|
|
@@ -205,8 +205,8 @@ const Yt = St(null), de = ({
|
|
|
205
205
|
status: "in-progress"
|
|
206
206
|
}));
|
|
207
207
|
try {
|
|
208
|
-
const v = await ft([f], a.sources, a, h),
|
|
209
|
-
return await
|
|
208
|
+
const v = await ft([f], a.sources, a, h), C = Object.values(Object.values(v)[0])[0];
|
|
209
|
+
return await W(Object.values(C)), C;
|
|
210
210
|
} catch (v) {
|
|
211
211
|
return console.error(v), {};
|
|
212
212
|
} finally {
|
|
@@ -214,7 +214,7 @@ const Yt = St(null), de = ({
|
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
[
|
|
217
|
-
|
|
217
|
+
W,
|
|
218
218
|
q,
|
|
219
219
|
m,
|
|
220
220
|
t,
|
|
@@ -223,40 +223,40 @@ const Yt = St(null), de = ({
|
|
|
223
223
|
u,
|
|
224
224
|
y,
|
|
225
225
|
D,
|
|
226
|
-
|
|
226
|
+
$
|
|
227
227
|
]
|
|
228
|
-
),
|
|
229
|
-
async (
|
|
228
|
+
), b = j(
|
|
229
|
+
async (s, e) => {
|
|
230
230
|
var f, w;
|
|
231
|
-
const c = (D == null ? void 0 : D(
|
|
231
|
+
const c = (D == null ? void 0 : D($, q, s)) ?? $, i = {
|
|
232
232
|
timeout: B,
|
|
233
233
|
includeRaw: !1,
|
|
234
234
|
noCache: !1,
|
|
235
235
|
classification: E,
|
|
236
236
|
sources: c,
|
|
237
|
-
...
|
|
237
|
+
...e
|
|
238
238
|
}, a = {}, l = u == null ? void 0 : u();
|
|
239
239
|
l && (a.Authorization = `Bearer ${l}`);
|
|
240
240
|
let o = { baseURL: m, headers: a };
|
|
241
241
|
y && (o = y(o));
|
|
242
242
|
const h = [];
|
|
243
|
-
for (const p of
|
|
243
|
+
for (const p of s) {
|
|
244
244
|
const v = { type: p.type, value: p.value, classification: i.classification };
|
|
245
|
-
let
|
|
245
|
+
let C = await ((f = t.status) == null ? void 0 : f.findOne({
|
|
246
246
|
selector: v
|
|
247
247
|
}).incrementalPatch({
|
|
248
248
|
status: "in-progress"
|
|
249
249
|
}));
|
|
250
|
-
|
|
250
|
+
C || (C = await ((w = t.status) == null ? void 0 : w.insert({
|
|
251
251
|
id: await H(v.type, v.value, v.classification),
|
|
252
252
|
...v,
|
|
253
253
|
status: "in-progress",
|
|
254
254
|
sources: i.sources
|
|
255
|
-
}))),
|
|
255
|
+
}))), C && h.push(C.toMutableJSON());
|
|
256
256
|
}
|
|
257
257
|
try {
|
|
258
|
-
const p = await ft(
|
|
259
|
-
return await
|
|
258
|
+
const p = await ft(s, i.sources, i, o), v = Object.values(p).flatMap(Object.values).flatMap(Object.values);
|
|
259
|
+
return await W(v), p;
|
|
260
260
|
} catch (p) {
|
|
261
261
|
return console.error(p), {};
|
|
262
262
|
} finally {
|
|
@@ -267,7 +267,7 @@ const Yt = St(null), de = ({
|
|
|
267
267
|
},
|
|
268
268
|
[
|
|
269
269
|
D,
|
|
270
|
-
|
|
270
|
+
$,
|
|
271
271
|
q,
|
|
272
272
|
B,
|
|
273
273
|
E,
|
|
@@ -275,7 +275,7 @@ const Yt = St(null), de = ({
|
|
|
275
275
|
m,
|
|
276
276
|
y,
|
|
277
277
|
t,
|
|
278
|
-
|
|
278
|
+
W
|
|
279
279
|
]
|
|
280
280
|
), A = K(
|
|
281
281
|
() => Pt(
|
|
@@ -286,17 +286,17 @@ const Yt = St(null), de = ({
|
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
288
|
} else return;
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
289
|
+
const s = await t.status.find({ selector: { status: "pending" } }).update({ $set: { status: "in-progress" } });
|
|
290
|
+
if (s.length < 1)
|
|
291
291
|
return;
|
|
292
|
-
const
|
|
292
|
+
const e = Jt(s, M);
|
|
293
293
|
G(
|
|
294
|
-
`Enriching ${
|
|
295
|
-
|
|
294
|
+
`Enriching ${s.length} selectors in ${e.length} chunks of ${M}.`,
|
|
295
|
+
O
|
|
296
296
|
), await Promise.all(
|
|
297
297
|
// For performance reasons, we chunk the requests. This will allow us to take advantage of parellelization in the
|
|
298
298
|
// backend, both on the pod level and kubernetes level
|
|
299
|
-
|
|
299
|
+
e.map(async (c) => {
|
|
300
300
|
let i = null;
|
|
301
301
|
if (R.current <= Q)
|
|
302
302
|
R.current += 1;
|
|
@@ -306,7 +306,7 @@ const Yt = St(null), de = ({
|
|
|
306
306
|
i = setInterval(() => {
|
|
307
307
|
G(
|
|
308
308
|
`Waiting on ${R.current} existing requests to complete (total delay: ${Date.now() - a}ms)`,
|
|
309
|
-
|
|
309
|
+
O
|
|
310
310
|
), R.current < Q && l();
|
|
311
311
|
}, 400);
|
|
312
312
|
}).finally(() => {
|
|
@@ -315,7 +315,7 @@ const Yt = St(null), de = ({
|
|
|
315
315
|
}
|
|
316
316
|
try {
|
|
317
317
|
const a = {}, l = dt(c.flatMap((o) => o.sources ?? []));
|
|
318
|
-
l.length > 0 && (a.sources = l), await
|
|
318
|
+
l.length > 0 && (a.sources = l), await b(
|
|
319
319
|
c.map((o) => o.toSelector()),
|
|
320
320
|
a
|
|
321
321
|
), await t.status.findByIds(c.map((o) => o.id)).update({ $set: { status: "complete" } });
|
|
@@ -330,41 +330,41 @@ const Yt = St(null), de = ({
|
|
|
330
330
|
200,
|
|
331
331
|
{ maxWait: 500, leading: !1 }
|
|
332
332
|
),
|
|
333
|
-
[
|
|
333
|
+
[b, M, t, O, Q]
|
|
334
334
|
);
|
|
335
335
|
P(() => {
|
|
336
|
-
}, [t,
|
|
337
|
-
if (
|
|
336
|
+
}, [t, O]), P(() => {
|
|
337
|
+
if (!I || !x || !(t != null && t.status))
|
|
338
338
|
return;
|
|
339
339
|
if (t != null && t.status.closed) {
|
|
340
340
|
console.warn("Status collection is closed");
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const s = t.status.find({
|
|
344
344
|
selector: {
|
|
345
345
|
status: "pending"
|
|
346
346
|
}
|
|
347
347
|
}).$.subscribe(() => A());
|
|
348
348
|
return () => {
|
|
349
349
|
try {
|
|
350
|
-
|
|
351
|
-
} catch (
|
|
352
|
-
console.warn(
|
|
350
|
+
s == null || s.unsubscribe(), A.cancel();
|
|
351
|
+
} catch (e) {
|
|
352
|
+
console.warn(e);
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
|
-
}, [
|
|
355
|
+
}, [I, x, t, O, A, (ut = t == null ? void 0 : t.status) == null ? void 0 : ut.closed]);
|
|
356
356
|
const nt = j(
|
|
357
|
-
async (
|
|
357
|
+
async (s, e, c) => {
|
|
358
358
|
var l, o;
|
|
359
|
-
if (!e)
|
|
360
|
-
throw new Error("Type cannot be null");
|
|
361
359
|
if (!s)
|
|
360
|
+
throw new Error("Type cannot be null");
|
|
361
|
+
if (!e)
|
|
362
362
|
throw new Error("Value cannot be null");
|
|
363
363
|
if (!t.status || t.status.closed) {
|
|
364
364
|
console.warn("status collection is closed");
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
|
-
const i = { type:
|
|
367
|
+
const i = { type: s, value: e, classification: c ?? E };
|
|
368
368
|
let a = await ((l = t.status) == null ? void 0 : l.findOne({
|
|
369
369
|
selector: i
|
|
370
370
|
}).exec());
|
|
@@ -378,8 +378,8 @@ const Yt = St(null), de = ({
|
|
|
378
378
|
), rt = j(async () => {
|
|
379
379
|
if (!(t != null && t.selectors) || t.selectors.closed)
|
|
380
380
|
return;
|
|
381
|
-
const
|
|
382
|
-
for (const [i, a] of Object.entries(
|
|
381
|
+
const s = await t.selectors.find({ selector: { error: { $exists: !0 } } }).exec(), e = pt(s, "classification"), c = [];
|
|
382
|
+
for (const [i, a] of Object.entries(e)) {
|
|
383
383
|
const l = pt(a, (o) => `${o.type}:${o.value}`);
|
|
384
384
|
for (const o of Object.values(l))
|
|
385
385
|
c.push({
|
|
@@ -391,46 +391,46 @@ const Yt = St(null), de = ({
|
|
|
391
391
|
status: "pending"
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
-
c.length > 0 && (await t.status.bulkInsert(c),
|
|
395
|
-
}, [t,
|
|
396
|
-
(
|
|
394
|
+
c.length > 0 && (await t.status.bulkInsert(c), I && x && A()), await t.selectors.bulkRemove(s);
|
|
395
|
+
}, [t, I, A, x]), it = j(
|
|
396
|
+
(s) => {
|
|
397
397
|
var l, o;
|
|
398
|
-
if (!
|
|
398
|
+
if (!s)
|
|
399
399
|
return null;
|
|
400
|
-
const
|
|
400
|
+
const e = Object.entries(U), c = (l = e.find(([h, f]) => f.exec(s))) == null ? void 0 : l[0];
|
|
401
401
|
if (c)
|
|
402
402
|
return c;
|
|
403
|
-
const i =
|
|
403
|
+
const i = s.toLowerCase(), a = (o = e.find(([h, f]) => f.exec(i))) == null ? void 0 : o[0];
|
|
404
404
|
return a || null;
|
|
405
405
|
},
|
|
406
|
-
[
|
|
406
|
+
[U]
|
|
407
407
|
), Et = K(
|
|
408
408
|
() => {
|
|
409
|
-
var
|
|
409
|
+
var s;
|
|
410
410
|
return {
|
|
411
|
-
bulkEnrich:
|
|
412
|
-
enrich:
|
|
411
|
+
bulkEnrich: b,
|
|
412
|
+
enrich: et,
|
|
413
413
|
enrichFailedEnrichments: rt,
|
|
414
|
-
sources:
|
|
414
|
+
sources: $,
|
|
415
415
|
setSources: vt,
|
|
416
|
-
typesDetection:
|
|
416
|
+
typesDetection: U,
|
|
417
417
|
supportedTypes: T,
|
|
418
418
|
availableSources: q,
|
|
419
419
|
guessType: it,
|
|
420
420
|
queueEnrich: nt,
|
|
421
|
-
setCustomIconify:
|
|
421
|
+
setCustomIconify: st,
|
|
422
422
|
setDefaultClassification: N,
|
|
423
423
|
setReady: wt,
|
|
424
424
|
defaultClassification: E,
|
|
425
|
-
ready: x && !!t && !!((
|
|
425
|
+
ready: x && !!t && !!((s = g.config) != null && s.c12nDef) && (Wt(F) || L)
|
|
426
426
|
};
|
|
427
427
|
},
|
|
428
428
|
[
|
|
429
|
-
W,
|
|
430
|
-
st,
|
|
431
|
-
rt,
|
|
432
|
-
O,
|
|
433
429
|
b,
|
|
430
|
+
et,
|
|
431
|
+
rt,
|
|
432
|
+
$,
|
|
433
|
+
U,
|
|
434
434
|
T,
|
|
435
435
|
q,
|
|
436
436
|
it,
|
|
@@ -447,6 +447,6 @@ const Yt = St(null), de = ({
|
|
|
447
447
|
};
|
|
448
448
|
export {
|
|
449
449
|
Yt as C,
|
|
450
|
-
|
|
450
|
+
ds as a,
|
|
451
451
|
Qt as u
|
|
452
452
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { Popover as x } from "@mui/material";
|
|
3
3
|
import c, { useRef as g, useState as v, useEffect as k } from "react";
|
|
4
|
-
import { A as R } from "../AnnotationDetails-
|
|
4
|
+
import { A as R } from "../AnnotationDetails-BuctmauD.js";
|
|
5
5
|
const w = c.memo(({ anchorEl: e, enrichRequest: u, open: o, onClose: d, ...i }) => {
|
|
6
6
|
var s, f, l;
|
|
7
7
|
const a = g(), [r, n] = v(!1);
|
|
@@ -4,13 +4,13 @@ import "@mui/material";
|
|
|
4
4
|
import "./display/icons/Iconified.js";
|
|
5
5
|
import "../data/event.js";
|
|
6
6
|
import "../hooks/ClueComponentContext.js";
|
|
7
|
-
import "../ActionForm-
|
|
7
|
+
import "../ActionForm-CO0fQZoN.js";
|
|
8
8
|
import "../hooks/useAnnotations.js";
|
|
9
9
|
import "../hooks/useErrors.js";
|
|
10
10
|
import "../icons/iconMap.js";
|
|
11
11
|
import "../utils/window.js";
|
|
12
12
|
import "../groupBy-CrJC7sGa.js";
|
|
13
|
-
import { A as n } from "../AnnotationDetails-
|
|
13
|
+
import { A as n } from "../AnnotationDetails-BuctmauD.js";
|
|
14
14
|
import "../uniq-B4UZ671_.js";
|
|
15
15
|
import "react";
|
|
16
16
|
import "../index-BM9Sve5T.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../iconify-Ptb5dTKy.js";
|
|
3
3
|
import "@mui/material";
|
|
4
|
-
import { A as d } from "../AnnotationPreview-
|
|
4
|
+
import { A as d } from "../AnnotationPreview-B3Y3a448.js";
|
|
5
5
|
import "../hooks/useAnnotations.js";
|
|
6
6
|
import "../utils-SpTOhPYl.js";
|
|
7
7
|
import "react";
|
|
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as C } from "../iconify-Ptb5dTKy.js";
|
|
3
3
|
import { useTheme as F, Card as M, CardHeader as O, Stack as W, CircularProgress as B, Divider as D, CardContent as G, Grid as c, Chip as g, Typography as b, Tooltip as H, Box as N } from "@mui/material";
|
|
4
4
|
import { ClueComponentContext as R } from "../hooks/ClueComponentContext.js";
|
|
5
|
-
import { f as v } from "../ActionForm-
|
|
5
|
+
import { f as v } from "../ActionForm-CO0fQZoN.js";
|
|
6
6
|
import _ from "../hooks/useAnnotations.js";
|
|
7
7
|
import $ from "../hooks/useErrors.js";
|
|
8
8
|
import J from "../icons/Assessment.js";
|
|
@@ -3,8 +3,8 @@ import { Chip as B, Tooltip as G, Box as _, Stack as H, CircularProgress as J }
|
|
|
3
3
|
import K from "./display/icons/Iconified.js";
|
|
4
4
|
import { ClueComponentContext as L } from "../hooks/ClueComponentContext.js";
|
|
5
5
|
import { ClueGroupContext as N } from "../hooks/ClueGroupContext.js";
|
|
6
|
-
import { C as E } from "../AnnotationPreview-
|
|
7
|
-
import { f as Q } from "../ActionForm-
|
|
6
|
+
import { C as E } from "../AnnotationPreview-B3Y3a448.js";
|
|
7
|
+
import { f as Q } from "../ActionForm-CO0fQZoN.js";
|
|
8
8
|
import U from "../hooks/useAnnotations.js";
|
|
9
9
|
import V from "../icons/Action.js";
|
|
10
10
|
import v from "../icons/Assessment.js";
|
|
@@ -3,8 +3,8 @@ import { useTheme as K, Stack as L, CircularProgress as Q, Tooltip as U, IconBut
|
|
|
3
3
|
import W from "./display/icons/Iconified.js";
|
|
4
4
|
import { ClueComponentContext as X } from "../hooks/ClueComponentContext.js";
|
|
5
5
|
import { ClueGroupContext as Y } from "../hooks/ClueGroupContext.js";
|
|
6
|
-
import { C as j } from "../AnnotationPreview-
|
|
7
|
-
import { f as Z } from "../ActionForm-
|
|
6
|
+
import { C as j } from "../AnnotationPreview-B3Y3a448.js";
|
|
7
|
+
import { f as Z } from "../ActionForm-CO0fQZoN.js";
|
|
8
8
|
import F from "../hooks/useAnnotations.js";
|
|
9
9
|
import _ from "../icons/Action.js";
|
|
10
10
|
import z from "../icons/Assessment.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { Button as o } from "@mui/material";
|
|
3
3
|
import { ClueComponentContext as i } from "../hooks/ClueComponentContext.js";
|
|
4
|
-
import { f as c } from "../ActionForm-
|
|
4
|
+
import { f as c } from "../ActionForm-CO0fQZoN.js";
|
|
5
5
|
import { a as m } from "../index-BM9Sve5T.js";
|
|
6
6
|
const p = () => {
|
|
7
7
|
const t = c((e) => e.enrichFailedEnrichments), { t: r } = m(i, (e) => e.i18next);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as v, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { Button as b, Popover as w, TextField as z, Divider as _, Stack as F, FormControlLabel as d, Checkbox as m } from "@mui/material";
|
|
3
|
-
import { e as E, f as a } from "../ActionForm-
|
|
3
|
+
import { e as E, f as a } from "../ActionForm-CO0fQZoN.js";
|
|
4
4
|
import { memo as P, useState as g, useEffect as T } from "react";
|
|
5
5
|
const L = () => {
|
|
6
6
|
const { t: r } = E((e) => e.i18next), o = a((e) => e.availableSources), t = a((e) => e.sources), c = a((e) => e.setSources), [s, i] = g(null), [h, x] = g(), f = (e) => {
|
|
@@ -5,7 +5,7 @@ import "@mui/material";
|
|
|
5
5
|
import "../display/icons/Iconified.js";
|
|
6
6
|
import "../../index-Cj4d5cGz.js";
|
|
7
7
|
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-
|
|
8
|
+
import { A } from "../../ActionForm-CO0fQZoN.js";
|
|
9
9
|
import "../../utils-SpTOhPYl.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../../index-BM9Sve5T.js";
|
|
@@ -3,7 +3,7 @@ import { I as O } from "../../iconify-Ptb5dTKy.js";
|
|
|
3
3
|
import { useTheme as w, Tooltip as S, IconButton as z, CircularProgress as E, Button as D, Popover as M, Paper as B, Stack as l, Typography as I, Box as T, Divider as F } from "@mui/material";
|
|
4
4
|
import h from "../display/icons/Iconified.js";
|
|
5
5
|
import { ClueComponentContext as R } from "../../hooks/ClueComponentContext.js";
|
|
6
|
-
import { d as a } from "../../ActionForm-
|
|
6
|
+
import { d as a } from "../../ActionForm-CO0fQZoN.js";
|
|
7
7
|
import W from "../../hooks/useClueConfig.js";
|
|
8
8
|
import { isAccessible as q } from "../../utils/classificationParser.js";
|
|
9
9
|
import { useState as G, useRef as H, useMemo as J, useEffect as P } from "react";
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../../iconify-Ptb5dTKy.js";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "../../hooks/ClueComponentContext.js";
|
|
5
|
-
import { R as s } from "../../ActionForm-
|
|
5
|
+
import { R as s } from "../../ActionForm-CO0fQZoN.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "../../index-BM9Sve5T.js";
|
|
8
8
|
import "../ClassificationChip.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as y, Fragment as C, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useTheme as k, Tooltip as S, IconButton as E, CircularProgress as d, Button as z, Popover as I, Paper as j, Stack as c, Box as P, Typography as B, Divider as O } from "@mui/material";
|
|
3
|
-
import { e as T, f as p, c as w } from "../../ActionForm-
|
|
3
|
+
import { e as T, f as p, c as w } from "../../ActionForm-CO0fQZoN.js";
|
|
4
4
|
import { useState as m, useRef as M, useCallback as D, useEffect as F } from "react";
|
|
5
5
|
import g from "../display/icons/Iconified.js";
|
|
6
6
|
const H = ({ show: t = !1, size: b = "small", selector: n }) => {
|
|
@@ -4,7 +4,7 @@ import { useTheme as K, Skeleton as W, Chip as Q, Tooltip as D, Stack as s, Typo
|
|
|
4
4
|
import { F as E } from "../../FlexOne-BXWFOd1T.js";
|
|
5
5
|
import S from "../display/icons/Iconified.js";
|
|
6
6
|
import { ClueComponentContext as $ } from "../../hooks/ClueComponentContext.js";
|
|
7
|
-
import { g as f } from "../../ActionForm-
|
|
7
|
+
import { g as f } from "../../ActionForm-CO0fQZoN.js";
|
|
8
8
|
import p, { useState as b, useRef as k, useMemo as N, useEffect as O, memo as P } from "react";
|
|
9
9
|
import { a as ee } from "../../index-BM9Sve5T.js";
|
|
10
10
|
import { FetcherResultView as te } from "./FetcherResultView.js";
|