@cccsaurora/clue-ui 1.0.1-dev.70 → 1.0.2-patch.38
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-Sw7D-KOE.js +340 -0
- package/AnnotationDetails-BoX61_IF.js +160 -0
- package/AnnotationPreview-dYinoSA9.js +140 -0
- package/ClueEnrichContext-CvCIPOMC.js +412 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_Map-DXNg_Z-q.js +54 -0
- package/_MapCache-Cu25RRDU.js +129 -0
- package/_Uint8Array-DlJCtTvG.js +102 -0
- package/_baseAssignValue-CUmzp727.js +20 -0
- package/_baseClone-BlMmRXeX.js +208 -0
- package/_baseExtremum-P_0akmCi.js +27 -0
- package/_baseFlatten-CN7vDNEQ.js +72 -0
- package/_baseGet-Dgf6_xCm.js +80 -0
- package/_baseIsEqual-Cpjtfb3Q.js +173 -0
- package/_baseIteratee-CP1bocOX.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-tMFmk80M.js +61 -0
- package/_commonjsHelpers-C6fGbg64.js +6 -0
- package/_createAggregator-B4Cav8ZM.js +53 -0
- package/_getPrototype-CHAFQYL_.js +5 -0
- package/_getTag-BV_UoLYG.js +90 -0
- package/cloneDeep-BPVpFBzJ.js +8 -0
- package/components/AnnotationBody.js +34 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +6 -6
- package/components/AnnotationEntry.js +47 -50
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +92 -104
- package/components/EnrichedChip.js +109 -134
- package/components/EnrichedTypography.js +110 -136
- 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 +50 -64
- package/components/actions/ResultModal.js +34 -37
- package/components/actions/form/schemaAdapter.js +20 -39
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +76 -92
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +200 -258
- 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 +305 -407
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/DynamicTabs.js +17 -22
- package/components/display/markdown/index.js +5674 -8531
- package/components/display/markdown/markdownPlugins/tabs.js +1 -1
- package/components/enrichment/EnrichPopover.js +47 -55
- package/components/fetchers/Fetcher.js +95 -123
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +18 -22
- 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 +28 -37
- package/countBy-DOutsa_w.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-Bow1vKwx.js +8 -0
- package/groupBy-BheQYl6f.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/ClueEnrichContextType.d.ts +7 -0
- package/hooks/ClueFetcherContext.js +46 -74
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +11 -22
- package/hooks/useAnnotations.js +29 -45
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +5 -5
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +43 -63
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +68 -84
- package/icons/Context.js +61 -75
- package/icons/Opinion.js +65 -77
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-CnaCBNrd.js +358 -0
- package/index-E7g8cRyW.js +568 -0
- package/index-V7wwd05F.js +975 -0
- package/index-p5_wX7q1.js +11729 -0
- package/index-pQg5VUAZ.js +12734 -0
- package/isEmpty-g47Qir2A.js +21 -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.d.ts +3 -2
- package/main.js +62 -58
- package/package.json +1 -1
- package/sortBy-ITdmD17L.js +79 -0
- package/sumBy-DxJUU2E8.js +8 -0
- package/tabs-CgADNA57.js +195 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/types/config.d.ts +4 -1
- package/useClueTypeConfig-CneP98N_.js +2260 -0
- package/utils/chain.js +64 -91
- package/utils/classificationParser.d.ts +8 -8
- package/utils/classificationParser.js +257 -520
- 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 +29 -41
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-CD0rFIFU.js +2704 -0
- package/ActionForm-D4ryHO0M.js +0 -436
- package/AnnotationDetails-YAPoqw3R.js +0 -175
- package/AnnotationPreview-DiQDjt9s.js +0 -188
- package/ClueEnrichContext-DIn6g8tw.js +0 -522
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_Map-kgDsDYxq.js +0 -64
- package/_MapCache-DabaaWfq.js +0 -161
- package/_Uint8Array-BlVVH1tp.js +0 -129
- package/_baseAssignValue-CNbcU6Nb.js +0 -25
- package/_baseClone-D3a8Pa4T.js +0 -284
- package/_baseExtremum-B1o1zHjR.js +0 -33
- package/_baseFlatten-D4huXoEI.js +0 -92
- package/_baseGet-BSK_nnoz.js +0 -109
- package/_baseIsEqual-B5xLoweL.js +0 -238
- package/_baseIteratee-p6Nj07-n.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-CpupKWcL.js +0 -89
- package/_commonjsHelpers-CUmg6egw.js +0 -6
- package/_createAggregator-BpVy5xMi.js +0 -63
- package/_getPrototype-D1LAdQKO.js +0 -5
- package/_getTag-D3ToyefI.js +0 -126
- package/cloneDeep-CjP5k9zW.js +0 -8
- package/countBy-C69WslUA.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-D3C3lEU3.js +0 -8
- package/groupBy-DC2oOuBN.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-BDVjGvMI.js +0 -696
- package/index-BHPT3qoB.js +0 -1172
- package/index-BMxyILVD.js +0 -465
- package/index-BbPn6-Mw.js +0 -15750
- package/index-Dz1kF2MU.js +0 -17654
- package/isEmpty-BQkZubqU.js +0 -29
- 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/sortBy-B-UKp4GT.js +0 -100
- package/sumBy-MYkDPHZL.js +0 -8
- package/tabs-xGuUGsJd.js +0 -254
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-CH-nGq6a.js +0 -3184
- package/utils-Dr4wbKBZ.js +0 -4182
|
@@ -1,88 +1,60 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
3
|
-
import { useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
4
|
-
import { c as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
onNetworkCall
|
|
1
|
+
import { jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import { a as R } from "../useClueTypeConfig-CneP98N_.js";
|
|
3
|
+
import { useState as m, useRef as j, useCallback as F, useEffect as d, useMemo as H } from "react";
|
|
4
|
+
import { c as J } from "../index-E7g8cRyW.js";
|
|
5
|
+
import K from "./useClue.js";
|
|
6
|
+
import M from "./useClueConfig.js";
|
|
7
|
+
const O = J(null), W = ({
|
|
8
|
+
baseURL: f,
|
|
9
|
+
children: q,
|
|
10
|
+
classification: v,
|
|
11
|
+
getToken: s,
|
|
12
|
+
onNetworkCall: c
|
|
14
13
|
}) => {
|
|
15
|
-
var
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
[defaultClassification]
|
|
25
|
-
);
|
|
26
|
-
const fetchSelector = useCallback(
|
|
27
|
-
async (fetcherId, selector) => {
|
|
28
|
-
var _a2;
|
|
29
|
-
if ((_a2 = fetchRequests.current[fetcherId]) == null ? void 0 : _a2[getHashKey(selector)]) {
|
|
30
|
-
return fetchRequests.current[fetcherId][getHashKey(selector)];
|
|
31
|
-
}
|
|
14
|
+
var E, y;
|
|
15
|
+
const a = M(), { ready: C } = K(), [o, z] = m(v), [h, A] = m(!1), [p, B] = m({}), i = j({}), u = F(
|
|
16
|
+
({ type: t, value: e, classification: r }) => JSON.stringify({ type: t, value: e, classification: r ?? o }),
|
|
17
|
+
[o]
|
|
18
|
+
), D = F(
|
|
19
|
+
async (t, e) => {
|
|
20
|
+
var r;
|
|
21
|
+
if ((r = i.current[t]) != null && r[u(e)])
|
|
22
|
+
return i.current[t][u(e)];
|
|
32
23
|
try {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (onNetworkCall) {
|
|
40
|
-
requestConfig = onNetworkCall(requestConfig);
|
|
41
|
-
}
|
|
42
|
-
const result = api.fetchers.post(fetcherId, selector, requestConfig);
|
|
43
|
-
if (!fetchRequests.current[fetcherId]) {
|
|
44
|
-
fetchRequests.current[fetcherId] = {};
|
|
45
|
-
}
|
|
46
|
-
fetchRequests.current[fetcherId][getHashKey(selector)] = result;
|
|
47
|
-
return await result;
|
|
24
|
+
const n = {}, S = s == null ? void 0 : s();
|
|
25
|
+
S && (n.Authorization = `Bearer ${S}`);
|
|
26
|
+
let l = { baseURL: f, headers: n };
|
|
27
|
+
c && (l = c(l));
|
|
28
|
+
const x = R.fetchers.post(t, e, l);
|
|
29
|
+
return i.current[t] || (i.current[t] = {}), i.current[t][u(e)] = x, await x;
|
|
48
30
|
} catch {
|
|
49
31
|
return null;
|
|
50
32
|
}
|
|
51
33
|
},
|
|
52
|
-
[
|
|
34
|
+
[f, u, s, c]
|
|
53
35
|
);
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [(_b = (_a = clueConfig.config) == null ? void 0 : _a.c12nDef) == null ? void 0 : _b.UNRESTRICTED, defaultClassification]);
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
if (!ready) {
|
|
36
|
+
d(() => {
|
|
37
|
+
var t, e, r, n;
|
|
38
|
+
!o && ((e = (t = a.config) == null ? void 0 : t.c12nDef) != null && e.UNRESTRICTED) && z((n = (r = a.config) == null ? void 0 : r.c12nDef) == null ? void 0 : n.UNRESTRICTED);
|
|
39
|
+
}, [(y = (E = a.config) == null ? void 0 : E.c12nDef) == null ? void 0 : y.UNRESTRICTED, o]), d(() => {
|
|
40
|
+
if (!C)
|
|
62
41
|
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
let requestConfig = { baseURL, headers };
|
|
70
|
-
if (onNetworkCall) {
|
|
71
|
-
requestConfig = onNetworkCall(requestConfig);
|
|
72
|
-
}
|
|
73
|
-
api.fetchers.get(requestConfig).then(setFetchers).finally(() => setFetchCompleted(true));
|
|
74
|
-
}, [baseURL, ready]);
|
|
75
|
-
const context = useMemo(
|
|
42
|
+
const t = {}, e = s == null ? void 0 : s();
|
|
43
|
+
e && (t.Authorization = `Bearer ${e}`);
|
|
44
|
+
let r = { baseURL: f, headers: t };
|
|
45
|
+
c && (r = c(r)), R.fetchers.get(r).then(B).finally(() => A(!0));
|
|
46
|
+
}, [f, C]);
|
|
47
|
+
const P = H(
|
|
76
48
|
() => ({
|
|
77
|
-
fetchSelector,
|
|
78
|
-
fetchers,
|
|
79
|
-
fetchCompleted
|
|
49
|
+
fetchSelector: D,
|
|
50
|
+
fetchers: p,
|
|
51
|
+
fetchCompleted: h
|
|
80
52
|
}),
|
|
81
|
-
[
|
|
53
|
+
[h, D, p]
|
|
82
54
|
);
|
|
83
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ $(O.Provider, { value: P, children: q });
|
|
84
56
|
};
|
|
85
57
|
export {
|
|
86
|
-
ClueFetcherContext,
|
|
87
|
-
ClueFetcherProvider
|
|
58
|
+
O as ClueFetcherContext,
|
|
59
|
+
W as ClueFetcherProvider
|
|
88
60
|
};
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useMemo } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import { useClueEnrichSelector } from "./selectors.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
|
|
8
|
-
const [values, setValues] = useState([]);
|
|
9
|
-
const context = useMemo(
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a, useMemo as c } from "react";
|
|
3
|
+
import { c as m } from "../index-E7g8cRyW.js";
|
|
4
|
+
import { useClueEnrichSelector as f } from "./selectors.js";
|
|
5
|
+
const C = m(null), G = ({ children: s, type: o, classification: t }) => {
|
|
6
|
+
const e = f((l) => l.defaultClassification), [r, u] = a([]), i = 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__ */ n(C.Provider, { value: i, 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-dYinoSA9.js";
|
|
4
4
|
import "../data/event.js";
|
|
5
5
|
import "../utils/window.js";
|
|
6
|
-
import "../AnnotationDetails-
|
|
6
|
+
import "../AnnotationDetails-BoX61_IF.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../index-
|
|
8
|
+
import "../index-E7g8cRyW.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-Sw7D-KOE.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-CvCIPOMC.js";
|
|
7
|
+
import { ClueFetcherProvider as l } from "./ClueFetcherContext.js";
|
|
8
|
+
import { a as c } from "../AnnotationPreview-dYinoSA9.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,24 +1,13 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { a as
|
|
3
|
-
import { ClueComponentContext } from "./ClueComponentContext.js";
|
|
4
|
-
import { C as
|
|
5
|
-
import { ClueFetcherContext } from "./ClueFetcherContext.js";
|
|
6
|
-
const
|
|
7
|
-
return useContextSelector(ClueFetcherContext, selector);
|
|
8
|
-
};
|
|
9
|
-
const useClueActionsSelector = (selector) => {
|
|
10
|
-
return useContextSelector(ClueActionContext, selector);
|
|
11
|
-
};
|
|
12
|
-
const useClueEnrichSelector = (selector) => {
|
|
13
|
-
return useContextSelector(ClueEnrichContext, selector);
|
|
14
|
-
};
|
|
15
|
-
const useClueComponentSelector = (selector) => {
|
|
16
|
-
return useContextSelector(ClueComponentContext, selector);
|
|
17
|
-
};
|
|
1
|
+
import { u as t } from "../index-E7g8cRyW.js";
|
|
2
|
+
import { a as o } from "../ActionForm-Sw7D-KOE.js";
|
|
3
|
+
import { ClueComponentContext as r } from "./ClueComponentContext.js";
|
|
4
|
+
import { C as n } from "../ClueEnrichContext-CvCIPOMC.js";
|
|
5
|
+
import { ClueFetcherContext as u } from "./ClueFetcherContext.js";
|
|
6
|
+
const i = (e) => t(u, e), p = (e) => t(o, e), a = (e) => t(n, e), f = (e) => t(r, e);
|
|
18
7
|
export {
|
|
19
|
-
|
|
20
|
-
useClueActionsSelector,
|
|
21
|
-
useClueComponentSelector,
|
|
22
|
-
useClueEnrichSelector,
|
|
23
|
-
useClueFetcherSelector
|
|
8
|
+
a as default,
|
|
9
|
+
p as useClueActionsSelector,
|
|
10
|
+
f as useClueComponentSelector,
|
|
11
|
+
a as useClueEnrichSelector,
|
|
12
|
+
i as useClueFetcherSelector
|
|
24
13
|
};
|
package/hooks/useAnnotations.js
CHANGED
|
@@ -1,65 +1,49 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
import { useContext, useMemo, useState, useEffect } from "react";
|
|
3
|
-
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
4
|
-
import { useClueEnrichSelector } from "./selectors.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
() => _classification ?? defaultClassification,
|
|
13
|
-
[_classification, defaultClassification]
|
|
1
|
+
import { b as p } from "../ClueEnrichContext-CvCIPOMC.js";
|
|
2
|
+
import { useContext as q, useMemo as g, useState as h, useEffect as a } from "react";
|
|
3
|
+
import { ClueDatabaseContext as A } from "./ClueDatabaseContext.js";
|
|
4
|
+
import { useClueEnrichSelector as c } from "./selectors.js";
|
|
5
|
+
const D = (e, s, u, { skipEnrichment: f } = { skipEnrichment: !1 }) => {
|
|
6
|
+
const n = q(A), l = c((t) => t.defaultClassification), b = c((t) => t.ready), m = c((t) => t.availableSources), d = c((t) => t.queueEnrich), o = g(
|
|
7
|
+
() => u ?? l,
|
|
8
|
+
[u, l]
|
|
9
|
+
), [C, $] = h(!1), [S, x] = h([]), r = g(
|
|
10
|
+
() => b && !!e && !!s && !!o,
|
|
11
|
+
[o, b, e, s]
|
|
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 a(() => {
|
|
14
|
+
if (!r || !(n != null && n.status))
|
|
23
15
|
return;
|
|
24
|
-
}
|
|
25
|
-
const observable = database.status.count({ selector: { type, value, classification, status: "in-progress" } }).$.subscribe((_count) => setLoading(_count > 0));
|
|
16
|
+
const t = n.status.count({ selector: { type: e, value: s, classification: o, status: "in-progress" } }).$.subscribe((i) => $(i > 0));
|
|
26
17
|
return () => {
|
|
27
|
-
|
|
18
|
+
t == null || t.unsubscribe();
|
|
28
19
|
};
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
queueEnrich(type, value, classification);
|
|
35
|
-
}, [availableSources.length, classification, queueEnrich, ready, skipEnrichment, type, value]);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
if (!ready) {
|
|
20
|
+
}, [o, n, r, e, s]), a(() => {
|
|
21
|
+
f || m.length < 1 || !r || d(e, s, o);
|
|
22
|
+
}, [m.length, o, d, r, f, e, s]), a(() => {
|
|
23
|
+
if (!r)
|
|
38
24
|
return;
|
|
39
|
-
|
|
40
|
-
const observable = database.selectors.find({
|
|
25
|
+
const t = n.selectors.find({
|
|
41
26
|
selector: {
|
|
42
27
|
// Use regex instead of exact value for case-insensitivity
|
|
43
|
-
value: { $regex: `^${
|
|
28
|
+
value: { $regex: `^${s}$`, $options: "i" }
|
|
44
29
|
}
|
|
45
30
|
}).$.subscribe(
|
|
46
|
-
(
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
(i) => x(
|
|
32
|
+
p(
|
|
33
|
+
i.flatMap((E) => E.getAnnotations()),
|
|
49
34
|
JSON.stringify
|
|
50
35
|
)
|
|
51
36
|
)
|
|
52
37
|
);
|
|
53
38
|
return () => {
|
|
54
39
|
try {
|
|
55
|
-
|
|
56
|
-
} catch (
|
|
57
|
-
console.warn(
|
|
40
|
+
t.unsubscribe();
|
|
41
|
+
} catch (i) {
|
|
42
|
+
console.warn(i);
|
|
58
43
|
}
|
|
59
44
|
};
|
|
60
|
-
}, [
|
|
61
|
-
return [annotations, loading];
|
|
45
|
+
}, [n, r, s]), [S, C];
|
|
62
46
|
};
|
|
63
47
|
export {
|
|
64
|
-
|
|
48
|
+
D as default
|
|
65
49
|
};
|
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-E7g8cRyW.js";
|
|
2
|
+
import { C as e } from "../ClueEnrichContext-CvCIPOMC.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,8 @@
|
|
|
1
|
-
import { ClueConfigContext } from "./ClueConfigProvider.js";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import { ClueConfigContext as o } from "./ClueConfigProvider.js";
|
|
2
|
+
import { useContext as t } from "react";
|
|
3
|
+
function r() {
|
|
4
|
+
return t(o);
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
r as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u } from "../useClueTypeConfig-
|
|
1
|
+
import { u as i } from "../useClueTypeConfig-CneP98N_.js";
|
|
2
2
|
import "../utils/loggerUtil.js";
|
|
3
|
-
import "../isEmpty-
|
|
3
|
+
import "../isEmpty-g47Qir2A.js";
|
|
4
4
|
import "react";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|