@cccsaurora/clue-ui 1.2.3-dev.266 → 1.2.3
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-DlOXqMUx.js +4460 -0
- package/AnnotationDetails-Bk-p0F6h.js +160 -0
- package/AnnotationPreview-jzZvkCxJ.js +140 -0
- package/ClueEnrichContext-KqRuuWNS.js +418 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_MapCache-BiTi0iqu.js +180 -0
- package/_Uint8Array-BQNOM9Rr.js +101 -0
- package/_baseAssignValue-CNMLQZco.js +20 -0
- package/_baseClone-BnT-6pyM.js +207 -0
- package/_baseExtremum-Ca2EHgy2.js +16 -0
- package/_baseFlatten-Bfr_Molw.js +72 -0
- package/_baseGet-DSZygzyq.js +79 -0
- package/_baseIsEqual-VgvaAFZG.js +147 -0
- package/_baseIteratee-Dbfsw5z8.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-BJcj69PL.js +79 -0
- package/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/_createAggregator-k3TuAnxT.js +53 -0
- package/_getPrototype-Cr1Mk7BC.js +5 -0
- package/_getTag-CK2Sffaq.js +90 -0
- package/_isIterateeCall-DkJP7Rbx.js +13 -0
- package/_setToArray-C7yMOeww.js +29 -0
- package/cloneDeep-CF8TtLHr.js +8 -0
- package/components/AnnotationBody.js +35 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +97 -110
- package/components/EnrichedChip.js +105 -130
- package/components/EnrichedTypography.js +107 -133
- package/components/ErrorBoundary.js +24 -28
- package/components/RetryFailedEnrichments.js +9 -10
- package/components/SourcePicker.js +49 -57
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +59 -75
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +23 -39
- package/components/actions/formats/FileResult.js +59 -86
- package/components/actions/formats/index.js +10 -21
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +91 -111
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +202 -261
- package/components/display/graph/visualizations/Leaf.js +69 -88
- package/components/display/graph/visualizations/cloud/index.js +81 -98
- package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +13 -14
- package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
- package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +306 -408
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +5770 -8678
- package/components/enrichment/EnrichPopover.js +46 -54
- package/components/fetchers/Fetcher.js +119 -158
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +17 -21
- package/components/group/Entry.js +11 -13
- package/components/group/Group.js +10 -13
- package/components/group/GroupControl.js +65 -76
- package/components/stats/QueryStatus.js +33 -43
- package/countBy-CdYegFSu.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-CH7kz5Ix.js +8 -0
- package/groupBy-br8xmD2R.js +8 -0
- package/hooks/ClueActionContext.js +6 -6
- package/hooks/ClueComponentContext.js +23 -29
- package/hooks/ClueConfigProvider.js +12 -14
- package/hooks/ClueDatabaseContext.js +13 -19
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueFetcherContext.js +56 -83
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +2 -2
- package/hooks/useAnnotations.js +31 -47
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +4 -6
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useFetcherResult.js +24 -33
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +37 -66
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +69 -85
- package/icons/Context.js +63 -77
- package/icons/Opinion.js +60 -76
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-BHAe_V9n.js +12768 -0
- package/index-BK-zfYhR.js +358 -0
- package/index-CA5CUNZO.js +975 -0
- package/index-Dj5C04IX.js +568 -0
- package/index-p5_wX7q1.js +11729 -0
- package/isNil-CjWwlQS3.js +6 -0
- package/isObject-B53jY8Qg.js +7 -0
- package/isObjectLike-BatpeCIi.js +29 -0
- package/isSymbol-C3_SC0Qp.js +8 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +60 -60
- package/maxBy-Bc0dYHcO.js +8 -0
- package/package.json +1 -1
- package/sortBy-DY2JBf9n.js +75 -0
- package/sumBy-DuMASLPd.js +8 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/useClueTypeConfig-Ct9Ygter.js +2292 -0
- package/utils/chain.js +65 -92
- package/utils/classificationParser.js +256 -519
- package/utils/constants.js +10 -35
- package/utils/graph.js +45 -72
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +81 -131
- package/utils/loggerUtil.js +3 -5
- package/utils/sessionStorage.js +27 -41
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-DmwSUrum.js +129 -0
- package/ActionForm-uDp92tN2.js +0 -5941
- package/AnnotationDetails-DGYfOiWm.js +0 -175
- package/AnnotationPreview-bHObsb3P.js +0 -188
- package/ClueEnrichContext-CJEJxrgs.js +0 -541
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_MapCache-WmuDdwuH.js +0 -222
- package/_Uint8Array-B7JqpgFX.js +0 -128
- package/_baseAssignValue-CGTuELqU.js +0 -25
- package/_baseClone-CkNrTyhm.js +0 -283
- package/_baseExtremum-kob8QXyt.js +0 -18
- package/_baseFlatten-jIR_sN_-.js +0 -92
- package/_baseGet-Bx3A4Qfp.js +0 -108
- package/_baseIsEqual-C5OTWzTk.js +0 -208
- package/_baseIteratee-avi7MX2o.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-BI9GIHMF.js +0 -115
- package/_commonjsHelpers-DWwsNxpa.js +0 -8
- package/_createAggregator-QD8MzKwe.js +0 -63
- package/_getPrototype-CU0j_POw.js +0 -5
- package/_getTag-Ckxxfr88.js +0 -126
- package/_isIterateeCall-Ds3sw2SF.js +0 -17
- package/_setToArray-CaPKQhcz.js +0 -33
- package/cloneDeep-DJrLSw8W.js +0 -8
- package/countBy-c6S3dvSW.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-DSsNkRQs.js +0 -8
- package/groupBy-xqz-n0Vd.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-AMfoEg_6.js +0 -696
- package/index-B6C2a_Lg.js +0 -1172
- package/index-C12gPw2W.js +0 -17698
- package/index-DCKkHTvx.js +0 -15750
- package/index-JcKyZeoY.js +0 -465
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-OAgjjZye.js +0 -48
- package/isSymbol-Xd2FsJyp.js +0 -8
- package/last-CUCl67Im.js +0 -7
- package/maxBy-IKHzFrCS.js +0 -8
- package/sortBy-DfSj8IoJ.js +0 -96
- package/sumBy-D-hb_NY-.js +0 -8
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-Z1LFp01b.js +0 -3289
- package/utils-HmNPuoDB.js +0 -199
|
@@ -1,107 +1,80 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
3
|
-
import { SNACKBAR_EVENT_ID } from "../data/event.js";
|
|
4
|
-
import { safeDispatchEvent } from "../utils/window.js";
|
|
5
|
-
import { useState, useRef, useMemo, useCallback, useEffect } from "react";
|
|
6
|
-
import { c as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onNetworkCall
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { a as l } from "../useClueTypeConfig-Ct9Ygter.js";
|
|
3
|
+
import { SNACKBAR_EVENT_ID as R } from "../data/event.js";
|
|
4
|
+
import { safeDispatchEvent as x } from "../utils/window.js";
|
|
5
|
+
import { useState as C, useRef as T, useMemo as F, useCallback as h, useEffect as d } from "react";
|
|
6
|
+
import { c as _ } from "../index-Dj5C04IX.js";
|
|
7
|
+
import j from "./useClue.js";
|
|
8
|
+
import z from "./useClueConfig.js";
|
|
9
|
+
const H = _(null), U = ({
|
|
10
|
+
baseURL: c,
|
|
11
|
+
children: N,
|
|
12
|
+
classification: A,
|
|
13
|
+
getToken: i,
|
|
14
|
+
onNetworkCall: u
|
|
16
15
|
}) => {
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
const baseConfig = { baseURL, headers };
|
|
31
|
-
return onNetworkCall ? onNetworkCall(baseConfig) : { baseURL, headers };
|
|
32
|
-
}, [baseURL, getToken, onNetworkCall]);
|
|
33
|
-
const getHashKey = useCallback(
|
|
34
|
-
({ type, value, classification }) => JSON.stringify({ type, value, classification: classification ?? defaultClassification }),
|
|
35
|
-
[defaultClassification]
|
|
36
|
-
);
|
|
37
|
-
const fetchSelector = useCallback(
|
|
38
|
-
async (fetcherId, selector) => {
|
|
39
|
-
var _a2;
|
|
40
|
-
if ((_a2 = fetchRequests.current[fetcherId]) == null ? void 0 : _a2[getHashKey(selector)]) {
|
|
41
|
-
return fetchRequests.current[fetcherId][getHashKey(selector)];
|
|
42
|
-
}
|
|
16
|
+
var v, y;
|
|
17
|
+
const m = z(), { ready: p } = j(), [a, q] = C(A), [g, w] = C(!1), [E, B] = C({}), n = T({}), o = F(() => {
|
|
18
|
+
const t = {}, e = i == null ? void 0 : i();
|
|
19
|
+
return e && (t.Authorization = `Bearer ${e}`), u ? u({ baseURL: c, headers: t }) : { baseURL: c, headers: t };
|
|
20
|
+
}, [c, i, u]), f = h(
|
|
21
|
+
({ type: t, value: e, classification: r }) => JSON.stringify({ type: t, value: e, classification: r ?? a }),
|
|
22
|
+
[a]
|
|
23
|
+
), S = h(
|
|
24
|
+
async (t, e) => {
|
|
25
|
+
var r;
|
|
26
|
+
if ((r = n.current[t]) != null && r[f(e)])
|
|
27
|
+
return n.current[t][f(e)];
|
|
43
28
|
try {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return await result;
|
|
50
|
-
} catch (e) {
|
|
51
|
-
safeDispatchEvent(
|
|
52
|
-
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
29
|
+
const s = l.fetchers.post(t, e, o);
|
|
30
|
+
return n.current[t] || (n.current[t] = {}), n.current[t][f(e)] = s, await s;
|
|
31
|
+
} catch (s) {
|
|
32
|
+
x(
|
|
33
|
+
new CustomEvent(R, {
|
|
53
34
|
detail: {
|
|
54
|
-
message:
|
|
35
|
+
message: s.toString(),
|
|
55
36
|
level: "error"
|
|
56
37
|
}
|
|
57
38
|
})
|
|
58
39
|
);
|
|
59
40
|
}
|
|
60
41
|
},
|
|
61
|
-
[
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
async (fetcherId, taskId) => {
|
|
42
|
+
[f, o]
|
|
43
|
+
), D = h(
|
|
44
|
+
async (t, e) => {
|
|
65
45
|
try {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
46
|
+
return await l.fetchers.status.get(t, e, {}, o);
|
|
47
|
+
} catch (r) {
|
|
48
|
+
x(
|
|
49
|
+
new CustomEvent(R, {
|
|
71
50
|
detail: {
|
|
72
|
-
message:
|
|
51
|
+
message: r.toString(),
|
|
73
52
|
level: "error"
|
|
74
53
|
}
|
|
75
54
|
})
|
|
76
55
|
);
|
|
77
56
|
}
|
|
78
57
|
},
|
|
79
|
-
[
|
|
58
|
+
[o]
|
|
80
59
|
);
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
if (!ready) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
api.fetchers.get(requestConfig).then(setFetchers).finally(() => setFetchCompleted(true));
|
|
92
|
-
}, [baseURL, ready]);
|
|
93
|
-
const context = useMemo(
|
|
60
|
+
d(() => {
|
|
61
|
+
var t, e, r, s;
|
|
62
|
+
!a && ((e = (t = m.config) == null ? void 0 : t.c12nDef) != null && e.UNRESTRICTED) && q((s = (r = m.config) == null ? void 0 : r.c12nDef) == null ? void 0 : s.UNRESTRICTED);
|
|
63
|
+
}, [(y = (v = m.config) == null ? void 0 : v.c12nDef) == null ? void 0 : y.UNRESTRICTED, a]), d(() => {
|
|
64
|
+
p && l.fetchers.get(o).then(B).finally(() => w(!0));
|
|
65
|
+
}, [c, p]);
|
|
66
|
+
const K = F(
|
|
94
67
|
() => ({
|
|
95
|
-
fetchSelector,
|
|
96
|
-
getFetcherStatus,
|
|
97
|
-
fetchers,
|
|
98
|
-
fetchCompleted
|
|
68
|
+
fetchSelector: S,
|
|
69
|
+
getFetcherStatus: D,
|
|
70
|
+
fetchers: E,
|
|
71
|
+
fetchCompleted: g
|
|
99
72
|
}),
|
|
100
|
-
[
|
|
73
|
+
[g, S, E, D]
|
|
101
74
|
);
|
|
102
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ P(H.Provider, { value: K, children: N });
|
|
103
76
|
};
|
|
104
77
|
export {
|
|
105
|
-
ClueFetcherContext,
|
|
106
|
-
ClueFetcherProvider
|
|
78
|
+
H as ClueFetcherContext,
|
|
79
|
+
U as ClueFetcherProvider
|
|
107
80
|
};
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useMemo } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import { b as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
|
|
8
|
-
const [values, setValues] = useState([]);
|
|
9
|
-
const context = useMemo(
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n, useMemo as c } from "react";
|
|
3
|
+
import { c as m } from "../index-Dj5C04IX.js";
|
|
4
|
+
import { b as f } from "../ActionForm-DlOXqMUx.js";
|
|
5
|
+
const C = m(null), G = ({ children: s, type: o, classification: t }) => {
|
|
6
|
+
const e = f((i) => i.defaultClassification), [r, u] = n([]), a = c(
|
|
10
7
|
() => ({
|
|
11
|
-
type,
|
|
12
|
-
values,
|
|
13
|
-
setValues,
|
|
14
|
-
classification:
|
|
8
|
+
type: o,
|
|
9
|
+
values: r,
|
|
10
|
+
setValues: u,
|
|
11
|
+
classification: t ?? e
|
|
15
12
|
}),
|
|
16
|
-
[
|
|
13
|
+
[t, e, o, r]
|
|
17
14
|
);
|
|
18
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ l(C.Provider, { value: a, children: s });
|
|
19
16
|
};
|
|
20
17
|
export {
|
|
21
|
-
ClueGroupContext,
|
|
22
|
-
ClueGroupProvider
|
|
18
|
+
C as ClueGroupContext,
|
|
19
|
+
G as ClueGroupProvider
|
|
23
20
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../components/AnnotationDetailPopover.js";
|
|
3
|
-
import { C, a } from "../AnnotationPreview-
|
|
3
|
+
import { C as a, a as P } from "../AnnotationPreview-jzZvkCxJ.js";
|
|
4
4
|
import "../data/event.js";
|
|
5
5
|
import "../utils/window.js";
|
|
6
|
-
import "../AnnotationDetails-
|
|
6
|
+
import "../AnnotationDetails-Bk-p0F6h.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../index-
|
|
8
|
+
import "../index-Dj5C04IX.js";
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
a as CluePopupContext,
|
|
11
|
+
P as CluePopupProvider
|
|
12
12
|
};
|
package/hooks/ClueProvider.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { C as
|
|
3
|
-
import { ClueComponentProvider } from "./ClueComponentContext.js";
|
|
4
|
-
import { ClueConfigProvider } from "./ClueConfigProvider.js";
|
|
5
|
-
import { ClueDatabaseProvider } from "./ClueDatabaseContext.js";
|
|
6
|
-
import { a as
|
|
7
|
-
import { ClueFetcherProvider } from "./ClueFetcherContext.js";
|
|
8
|
-
import { a as
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */ jsx(ClueComponentProvider, { ...props, children: /* @__PURE__ */ jsx(ClueConfigProvider, { config: props.config, children: /* @__PURE__ */ jsx(ClueDatabaseProvider, { ...props, children: /* @__PURE__ */ jsx(ClueEnrichProvider, { ...props, children: /* @__PURE__ */ jsx(ClueFetcherProvider, { ...props, children: /* @__PURE__ */ jsx(ClueActionProvider, { ...props, children: /* @__PURE__ */ jsx(CluePopupProvider, { children }) }) }) }) }) }) });
|
|
11
|
-
};
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { C as i } from "../ActionForm-DlOXqMUx.js";
|
|
3
|
+
import { ClueComponentProvider as m } from "./ClueComponentContext.js";
|
|
4
|
+
import { ClueConfigProvider as n } from "./ClueConfigProvider.js";
|
|
5
|
+
import { ClueDatabaseProvider as t } from "./ClueDatabaseContext.js";
|
|
6
|
+
import { a as d } from "../ClueEnrichContext-KqRuuWNS.js";
|
|
7
|
+
import { ClueFetcherProvider as l } from "./ClueFetcherContext.js";
|
|
8
|
+
import { a as c } from "../AnnotationPreview-jzZvkCxJ.js";
|
|
9
|
+
const p = ({ children: o, ...e }) => /* @__PURE__ */ r(m, { ...e, children: /* @__PURE__ */ r(n, { config: e.config, children: /* @__PURE__ */ r(t, { ...e, children: /* @__PURE__ */ r(d, { ...e, children: /* @__PURE__ */ r(l, { ...e, children: /* @__PURE__ */ r(i, { ...e, children: /* @__PURE__ */ r(c, { children: o }) }) }) }) }) }) });
|
|
12
10
|
export {
|
|
13
|
-
ClueProvider
|
|
11
|
+
p as ClueProvider
|
|
14
12
|
};
|
package/hooks/selectors.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a, d, b, c } from "../ActionForm-
|
|
1
|
+
import { a as l, d as u, b as i, c as m } from "../ActionForm-DlOXqMUx.js";
|
|
2
2
|
import "./ClueComponentContext.js";
|
|
3
|
-
import "../ClueEnrichContext-
|
|
3
|
+
import "../ClueEnrichContext-KqRuuWNS.js";
|
|
4
4
|
import "./ClueFetcherContext.js";
|
|
5
|
-
import "../index-
|
|
5
|
+
import "../index-Dj5C04IX.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
l as useClueActionsSelector,
|
|
8
|
+
u as useClueComponentSelector,
|
|
9
|
+
i as useClueEnrichSelector,
|
|
10
|
+
m as useClueFetcherSelector
|
|
11
11
|
};
|
package/hooks/useActionResult.js
CHANGED
package/hooks/useAnnotations.js
CHANGED
|
@@ -1,76 +1,60 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { useContext, useMemo, useState, useEffect } from "react";
|
|
3
|
-
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
4
|
-
import { b as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
() => _classification ?? defaultClassification,
|
|
13
|
-
[_classification, defaultClassification]
|
|
1
|
+
import { u as p } from "../ClueEnrichContext-KqRuuWNS.js";
|
|
2
|
+
import { useContext as q, useMemo as d, useState as h, useEffect as u } from "react";
|
|
3
|
+
import { ClueDatabaseContext as A } from "./ClueDatabaseContext.js";
|
|
4
|
+
import { b as i } from "../ActionForm-DlOXqMUx.js";
|
|
5
|
+
const D = (n, o, l, { skipEnrichment: a } = { skipEnrichment: !1 }) => {
|
|
6
|
+
const s = q(A), f = i((t) => t.defaultClassification), m = i((t) => t.ready), g = i((t) => t.availableSources), b = i((t) => t.queueEnrich), e = d(
|
|
7
|
+
() => l ?? f,
|
|
8
|
+
[l, f]
|
|
9
|
+
), [$, C] = h(!1), [S, x] = h([]), r = d(
|
|
10
|
+
() => m && !!n && !!o && !!e,
|
|
11
|
+
[e, m, n, o]
|
|
14
12
|
);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const ready = useMemo(
|
|
18
|
-
() => enrichReady && !!type && !!value && !!classification,
|
|
19
|
-
[classification, enrichReady, type, value]
|
|
20
|
-
);
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (!ready || !(database == null ? void 0 : database.status)) {
|
|
13
|
+
return u(() => {
|
|
14
|
+
if (!r || !(s != null && s.status))
|
|
23
15
|
return;
|
|
24
|
-
|
|
25
|
-
if (database == null ? void 0 : database.status.closed) {
|
|
16
|
+
if (s != null && s.status.closed) {
|
|
26
17
|
console.warn("Status collection is closed");
|
|
27
18
|
return;
|
|
28
19
|
}
|
|
29
|
-
const
|
|
20
|
+
const t = s.status.count({ selector: { type: n, value: o, classification: e, status: "in-progress" } }).$.subscribe((c) => C(c > 0));
|
|
30
21
|
return () => {
|
|
31
|
-
|
|
22
|
+
t == null || t.unsubscribe();
|
|
32
23
|
};
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
}, [e, s, r, n, o]), u(() => {
|
|
25
|
+
a || g.length < 1 || !r || b(n, o, e);
|
|
26
|
+
}, [g.length, e, b, r, a, n, o]), u(() => {
|
|
27
|
+
if (!r || !(s != null && s.selectors) || s.selectors.closed)
|
|
36
28
|
return;
|
|
37
|
-
|
|
38
|
-
queueEnrich(type, value, classification);
|
|
39
|
-
}, [availableSources.length, classification, queueEnrich, ready, skipEnrichment, type, value]);
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
if (!ready || !(database == null ? void 0 : database.selectors) || database.selectors.closed) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const observable = database.selectors.find({
|
|
29
|
+
const t = s.selectors.find({
|
|
45
30
|
selector: {
|
|
46
31
|
$or: [
|
|
47
32
|
{
|
|
48
33
|
// Use regex instead of exact value for case-insensitivity
|
|
49
|
-
value: { $regex: `^${
|
|
34
|
+
value: { $regex: `^${o}$`, $options: "i" }
|
|
50
35
|
},
|
|
51
36
|
{
|
|
52
|
-
value
|
|
37
|
+
value: o
|
|
53
38
|
}
|
|
54
39
|
]
|
|
55
40
|
}
|
|
56
41
|
}).$.subscribe(
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
(c) => x(
|
|
43
|
+
p(
|
|
44
|
+
c.flatMap((E) => E.getAnnotations()),
|
|
60
45
|
JSON.stringify
|
|
61
46
|
)
|
|
62
47
|
)
|
|
63
48
|
);
|
|
64
49
|
return () => {
|
|
65
50
|
try {
|
|
66
|
-
|
|
67
|
-
} catch (
|
|
68
|
-
console.warn(
|
|
51
|
+
t.unsubscribe();
|
|
52
|
+
} catch (c) {
|
|
53
|
+
console.warn(c);
|
|
69
54
|
}
|
|
70
55
|
};
|
|
71
|
-
}, [
|
|
72
|
-
return [annotations, loading];
|
|
56
|
+
}, [s, r, o]), [S, $];
|
|
73
57
|
};
|
|
74
58
|
export {
|
|
75
|
-
|
|
59
|
+
D as default
|
|
76
60
|
};
|
package/hooks/useClue.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { C as
|
|
3
|
-
const
|
|
4
|
-
return useContext(ClueEnrichContext);
|
|
5
|
-
};
|
|
1
|
+
import { a as t } from "../index-Dj5C04IX.js";
|
|
2
|
+
import { C as e } from "../ClueEnrichContext-KqRuuWNS.js";
|
|
3
|
+
const s = () => t(e);
|
|
6
4
|
export {
|
|
7
|
-
|
|
5
|
+
s as default
|
|
8
6
|
};
|
package/hooks/useClueActions.js
CHANGED
package/hooks/useClueConfig.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ClueConfigContext } from "./ClueConfigProvider.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
const
|
|
4
|
-
return useContext(ClueConfigContext);
|
|
5
|
-
};
|
|
1
|
+
import { ClueConfigContext as o } from "./ClueConfigProvider.js";
|
|
2
|
+
import { useContext as t } from "react";
|
|
3
|
+
const n = () => t(o);
|
|
6
4
|
export {
|
|
7
|
-
|
|
5
|
+
n as default
|
|
8
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b } from "../useClueTypeConfig-
|
|
1
|
+
import { b as i } from "../useClueTypeConfig-Ct9Ygter.js";
|
|
2
2
|
import "../utils/loggerUtil.js";
|
|
3
|
-
import "../_baseUniq-
|
|
3
|
+
import "../_baseUniq-BJcj69PL.js";
|
|
4
4
|
import "react";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|