@cccsaurora/clue-ui 1.0.4 → 1.1.0-dev.100
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-ByeOzpc4.js +555 -0
- package/AnnotationDetails-DknbKDyl.js +175 -0
- package/AnnotationPreview-CQwKs8se.js +188 -0
- package/ClueEnrichContext-6NJfXpUB.js +536 -0
- package/FlexOne-BSYAhhtG.js +9 -0
- package/_Map-kgDsDYxq.js +64 -0
- package/_MapCache-DabaaWfq.js +161 -0
- package/_Uint8Array-BlVVH1tp.js +129 -0
- package/_baseAssignValue-CNbcU6Nb.js +25 -0
- package/_baseClone-D3a8Pa4T.js +284 -0
- package/_baseExtremum-B1o1zHjR.js +33 -0
- package/_baseFlatten-D4huXoEI.js +92 -0
- package/_baseGet-BSK_nnoz.js +109 -0
- package/_baseIsEqual-B5xLoweL.js +238 -0
- package/_baseIteratee-p6Nj07-n.js +126 -0
- package/_baseSlice-GAv_YFTT.js +20 -0
- package/_baseSum-D0WC1dN0.js +13 -0
- package/_baseUniq-CpupKWcL.js +89 -0
- package/_commonjsHelpers-DWwsNxpa.js +8 -0
- package/_createAggregator-BpVy5xMi.js +63 -0
- package/_getPrototype-D1LAdQKO.js +5 -0
- package/_getTag-D3ToyefI.js +126 -0
- package/api/lookup/index.d.ts +1 -1
- package/api/lookup/types.d.ts +2 -2
- package/api/lookup/types_detection.d.ts +2 -2
- package/cloneDeep-CjP5k9zW.js +8 -0
- package/components/AnnotationBody.js +49 -34
- package/components/AnnotationDetailPopover.js +36 -30
- package/components/AnnotationDetails.js +6 -6
- package/components/AnnotationEntry.js +50 -47
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.d.ts +2 -1
- package/components/ClassificationChip.js +44 -23
- package/components/CountBadge.js +31 -26
- package/components/EnrichedCard.js +110 -92
- package/components/EnrichedChip.js +130 -111
- package/components/EnrichedTypography.d.ts +1 -1
- package/components/EnrichedTypography.js +133 -112
- package/components/ErrorBoundary.js +28 -24
- package/components/RetryFailedEnrichments.js +10 -9
- package/components/SourcePicker.js +57 -49
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +64 -50
- package/components/actions/ResultModal.js +12 -41
- package/components/actions/form/schemaAdapter.js +40 -20
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +114 -76
- package/components/display/graph/elements/NodeTag.js +15 -13
- package/components/display/graph/index.js +267 -210
- package/components/display/graph/visualizations/Leaf.js +88 -69
- package/components/display/graph/visualizations/cloud/index.js +98 -81
- package/components/display/graph/visualizations/icons/BaseIcon.js +26 -21
- 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 +14 -13
- package/components/display/graph/visualizations/panels/NodePanel.js +10 -8
- package/components/display/graph/visualizations/tree/BundleLine.js +108 -81
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +407 -305
- package/components/display/icons/Iconified.js +27 -12
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +8696 -5668
- package/components/enrichment/EnrichPopover.js +55 -47
- package/components/fetchers/Fetcher.js +123 -95
- package/components/fetchers/PreviewModal.js +20 -17
- package/components/fetchers/StatusChip.js +21 -18
- package/components/group/Entry.js +13 -11
- package/components/group/Group.js +13 -10
- package/components/group/GroupControl.js +78 -66
- package/components/stats/QueryStatus.js +44 -31
- package/countBy-C69WslUA.js +14 -0
- package/data/event.js +6 -4
- package/database/index.js +2 -2
- package/debounce-bV0h5FC5.js +92 -0
- package/en/translation.json +39 -59
- package/fr/translation.json +37 -56
- package/get-D3C3lEU3.js +8 -0
- package/groupBy-DC2oOuBN.js +14 -0
- package/hooks/ClueActionContext.d.ts +26 -0
- package/hooks/ClueActionContext.js +8 -7
- package/hooks/ClueComponentContext.js +29 -23
- package/hooks/ClueConfigProvider.js +14 -12
- package/hooks/ClueDatabaseContext.js +19 -13
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueEnrichProps.d.ts +3 -1
- package/hooks/ClueFetcherContext.js +74 -46
- package/hooks/ClueGroupContext.js +17 -14
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +12 -10
- package/hooks/selectors.d.ts +4 -5
- package/hooks/selectors.js +21 -11
- package/hooks/useActionResult.d.ts +14 -0
- package/hooks/useActionResult.js +5 -0
- package/hooks/useAnnotations.js +45 -29
- package/hooks/useClue.js +6 -4
- package/hooks/useClueActions.d.ts +1 -1
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.d.ts +2 -1
- package/hooks/useClueConfig.js +6 -6
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +722 -435
- package/hooks/useErrors.js +22 -18
- package/hooks/useMyHighlights.js +66 -36
- package/hooks/useMyLocalStorage.d.ts +4 -3
- package/hooks/useMyLocalStorage.js +66 -46
- package/iconify-CXMreGTg.js +1782 -0
- package/icons/Action.js +66 -49
- package/icons/Assessment.js +84 -68
- package/icons/Context.js +78 -61
- package/icons/Opinion.js +77 -65
- package/icons/iconMap.js +2 -2
- package/identity-CPGTqrE4.js +6 -0
- package/index-BDVjGvMI.js +696 -0
- package/index-BbPn6-Mw.js +15750 -0
- package/index-Bi21Wb23.js +465 -0
- package/index-C3lkTD69.js +1172 -0
- package/index-CC12Ux-9.js +17654 -0
- package/isEmpty-BQkZubqU.js +29 -0
- package/isNil-CIubwp4T.js +6 -0
- package/isObject-FTY-5JQX.js +7 -0
- package/isObjectLike-OAgjjZye.js +48 -0
- package/isSymbol-Xd2FsJyp.js +8 -0
- package/last-CUCl67Im.js +7 -0
- package/main.js +62 -62
- package/package.json +3 -3
- package/sortBy-B-UKp4GT.js +100 -0
- package/sumBy-MYkDPHZL.js +8 -0
- package/text/Frequency.js +42 -23
- package/toFinite-Bc55msYj.js +16 -0
- package/toNumber-DPxy1FBy.js +39 -0
- package/types/RunningActionData.d.ts +4 -3
- package/types/action.d.ts +10 -1
- package/useClueTypeConfig-XvGvIw2S.js +3201 -0
- package/utils/chain.js +91 -64
- package/utils/classificationParser.js +519 -256
- package/utils/constants.js +35 -10
- package/utils/graph.js +72 -45
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +131 -81
- package/utils/loggerUtil.d.ts +1 -1
- package/utils/loggerUtil.js +6 -4
- package/utils/sessionStorage.js +41 -29
- package/utils/time.d.ts +3 -0
- package/utils/time.js +536 -0
- package/utils/utils.js +10 -9
- package/utils/window.js +21 -10
- package/utils-7OtvGnmf.js +200 -0
- package/ActionForm-Sw7D-KOE.js +0 -340
- package/AnnotationDetails-BoX61_IF.js +0 -160
- package/AnnotationPreview-dYinoSA9.js +0 -140
- package/ClueEnrichContext-CvCIPOMC.js +0 -412
- package/FlexOne-BXWFOd1T.js +0 -6
- package/_Map-DXNg_Z-q.js +0 -54
- package/_MapCache-Cu25RRDU.js +0 -129
- package/_Uint8Array-DlJCtTvG.js +0 -102
- package/_baseAssignValue-CUmzp727.js +0 -20
- package/_baseClone-BlMmRXeX.js +0 -208
- package/_baseExtremum-P_0akmCi.js +0 -27
- package/_baseFlatten-CN7vDNEQ.js +0 -72
- package/_baseGet-Dgf6_xCm.js +0 -80
- package/_baseIsEqual-Cpjtfb3Q.js +0 -173
- package/_baseIteratee-CP1bocOX.js +0 -95
- package/_baseSlice-M5RKzt1A.js +0 -10
- package/_baseSum-wEbgNeUs.js +0 -10
- package/_baseUniq-tMFmk80M.js +0 -61
- package/_commonjsHelpers-C6fGbg64.js +0 -6
- package/_createAggregator-B4Cav8ZM.js +0 -53
- package/_getPrototype-CHAFQYL_.js +0 -5
- package/_getTag-BV_UoLYG.js +0 -90
- package/cloneDeep-BPVpFBzJ.js +0 -8
- package/components/display/markdown/DynamicTabs.d.ts +0 -8
- package/components/display/markdown/DynamicTabs.js +0 -21
- package/components/display/markdown/markdownPlugins/tabs.d.ts +0 -3
- package/components/display/markdown/markdownPlugins/tabs.js +0 -4
- package/countBy-DOutsa_w.js +0 -8
- package/debounce-DryYcbJ4.js +0 -56
- package/get-Bow1vKwx.js +0 -8
- package/groupBy-BheQYl6f.js +0 -8
- package/iconify-BBckr5AQ.js +0 -1263
- package/identity-ByMq8VxU.js +0 -6
- package/index-CnaCBNrd.js +0 -358
- package/index-E7g8cRyW.js +0 -568
- package/index-V7wwd05F.js +0 -975
- package/index-p5_wX7q1.js +0 -11729
- package/index-pQg5VUAZ.js +0 -12734
- package/isEmpty-g47Qir2A.js +0 -21
- package/isNil-CjWwlQS3.js +0 -6
- package/isObject-B53jY8Qg.js +0 -7
- package/isObjectLike-BatpeCIi.js +0 -29
- package/isSymbol-C3_SC0Qp.js +0 -8
- package/last-7CdUxN0r.js +0 -7
- package/sortBy-ITdmD17L.js +0 -79
- package/sumBy-DxJUU2E8.js +0 -8
- package/tabs-CgADNA57.js +0 -195
- package/toFinite-BMy6GObD.js +0 -14
- package/toNumber-YVhnnJv4.js +0 -31
- package/useClueTypeConfig-CneP98N_.js +0 -2260
- package/utils-CD0rFIFU.js +0 -2704
package/hooks/ClueProvider.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { C as
|
|
3
|
-
import { ClueComponentProvider
|
|
4
|
-
import { ClueConfigProvider
|
|
5
|
-
import { ClueDatabaseProvider
|
|
6
|
-
import { a as
|
|
7
|
-
import { ClueFetcherProvider
|
|
8
|
-
import { a as
|
|
9
|
-
const
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { C as ClueActionProvider } from "../ActionForm-ByeOzpc4.js";
|
|
3
|
+
import { ClueComponentProvider } from "./ClueComponentContext.js";
|
|
4
|
+
import { ClueConfigProvider } from "./ClueConfigProvider.js";
|
|
5
|
+
import { ClueDatabaseProvider } from "./ClueDatabaseContext.js";
|
|
6
|
+
import { a as ClueEnrichProvider } from "../ClueEnrichContext-6NJfXpUB.js";
|
|
7
|
+
import { ClueFetcherProvider } from "./ClueFetcherContext.js";
|
|
8
|
+
import { a as CluePopupProvider } from "../AnnotationPreview-CQwKs8se.js";
|
|
9
|
+
const ClueProvider = ({ children, ...props }) => {
|
|
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
|
+
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
ClueProvider
|
|
12
14
|
};
|
package/hooks/selectors.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ClueActionContextType } from
|
|
2
|
-
import { ClueComponentContextType } from
|
|
3
|
-
import { ClueEnrichContextType } from
|
|
4
|
-
import { ClueFetcherContextType } from
|
|
1
|
+
import { ClueActionContextType } from "../hooks/ClueActionContext";
|
|
2
|
+
import { ClueComponentContextType } from "../hooks/ClueComponentContext";
|
|
3
|
+
import { ClueEnrichContextType } from "../hooks/ClueEnrichContextType";
|
|
4
|
+
import { ClueFetcherContextType } from "../hooks/ClueFetcherContext";
|
|
5
5
|
|
|
6
6
|
export declare const useClueFetcherSelector: <Selected>(selector: (value: ClueFetcherContextType) => Selected) => Selected;
|
|
7
7
|
export declare const useClueActionsSelector: <Selected>(selector: (value: ClueActionContextType) => Selected) => Selected;
|
|
8
8
|
export declare const useClueEnrichSelector: <Selected>(selector: (value: ClueEnrichContextType) => Selected) => Selected;
|
|
9
9
|
export declare const useClueComponentSelector: <Selected>(selector: (value: ClueComponentContextType) => Selected) => Selected;
|
|
10
|
-
export default useClueEnrichSelector;
|
package/hooks/selectors.js
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { a as ClueActionContext } from "../ActionForm-ByeOzpc4.js";
|
|
2
|
+
import { ClueComponentContext } from "./ClueComponentContext.js";
|
|
3
|
+
import { C as ClueEnrichContext } from "../ClueEnrichContext-6NJfXpUB.js";
|
|
4
|
+
import { ClueFetcherContext } from "./ClueFetcherContext.js";
|
|
5
|
+
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
|
6
|
+
const useClueFetcherSelector = (selector) => {
|
|
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
|
+
};
|
|
7
18
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
i as useClueFetcherSelector
|
|
19
|
+
useClueActionsSelector,
|
|
20
|
+
useClueComponentSelector,
|
|
21
|
+
useClueEnrichSelector,
|
|
22
|
+
useClueFetcherSelector
|
|
13
23
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActionResult } from "../types/action";
|
|
2
|
+
import { WithActionData } from "../types/WithActionData";
|
|
3
|
+
|
|
4
|
+
export declare const useActionResult: (resultWithData: WithActionData<ActionResult>, interval?: number) => {
|
|
5
|
+
outcome: "success" | "failure" | "pending";
|
|
6
|
+
summary?: string;
|
|
7
|
+
output?: any;
|
|
8
|
+
format?: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
done?: boolean;
|
|
11
|
+
task_id?: string;
|
|
12
|
+
actionId: string;
|
|
13
|
+
action: import("../types/action").ActionDefinition;
|
|
14
|
+
};
|
package/hooks/useAnnotations.js
CHANGED
|
@@ -1,49 +1,65 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
import { useContext
|
|
3
|
-
import { ClueDatabaseContext
|
|
4
|
-
import { useClueEnrichSelector
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { b as uniqBy } from "../ClueEnrichContext-6NJfXpUB.js";
|
|
2
|
+
import { useContext, useMemo, useState, useEffect } from "react";
|
|
3
|
+
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
4
|
+
import { useClueEnrichSelector } from "./selectors.js";
|
|
5
|
+
const useAnnotations = (type, value, _classification, { skipEnrichment } = { skipEnrichment: false }) => {
|
|
6
|
+
const database = useContext(ClueDatabaseContext);
|
|
7
|
+
const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
|
|
8
|
+
const enrichReady = useClueEnrichSelector((ctx) => ctx.ready);
|
|
9
|
+
const availableSources = useClueEnrichSelector((ctx) => ctx.availableSources);
|
|
10
|
+
const queueEnrich = useClueEnrichSelector((state) => state.queueEnrich);
|
|
11
|
+
const classification = useMemo(
|
|
12
|
+
() => _classification ?? defaultClassification,
|
|
13
|
+
[_classification, defaultClassification]
|
|
12
14
|
);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const [loading, setLoading] = useState(false);
|
|
16
|
+
const [annotations, setAnnotations] = useState([]);
|
|
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)) {
|
|
15
23
|
return;
|
|
16
|
-
|
|
24
|
+
}
|
|
25
|
+
const observable = database.status.count({ selector: { type, value, classification, status: "in-progress" } }).$.subscribe((_count) => setLoading(_count > 0));
|
|
17
26
|
return () => {
|
|
18
|
-
|
|
27
|
+
observable == null ? void 0 : observable.unsubscribe();
|
|
19
28
|
};
|
|
20
|
-
}, [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
}, [classification, database, ready, type, value]);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (skipEnrichment || availableSources.length < 1 || !ready) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
queueEnrich(type, value, classification);
|
|
35
|
+
}, [availableSources.length, classification, queueEnrich, ready, skipEnrichment, type, value]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!ready) {
|
|
24
38
|
return;
|
|
25
|
-
|
|
39
|
+
}
|
|
40
|
+
const observable = database.selectors.find({
|
|
26
41
|
selector: {
|
|
27
42
|
// Use regex instead of exact value for case-insensitivity
|
|
28
|
-
value: { $regex: `^${
|
|
43
|
+
value: { $regex: `^${value}$`, $options: "i" }
|
|
29
44
|
}
|
|
30
45
|
}).$.subscribe(
|
|
31
|
-
(
|
|
32
|
-
|
|
33
|
-
|
|
46
|
+
(result) => setAnnotations(
|
|
47
|
+
uniqBy(
|
|
48
|
+
result.flatMap((entry) => entry.getAnnotations()),
|
|
34
49
|
JSON.stringify
|
|
35
50
|
)
|
|
36
51
|
)
|
|
37
52
|
);
|
|
38
53
|
return () => {
|
|
39
54
|
try {
|
|
40
|
-
|
|
41
|
-
} catch (
|
|
42
|
-
console.warn(
|
|
55
|
+
observable.unsubscribe();
|
|
56
|
+
} catch (e) {
|
|
57
|
+
console.warn(e);
|
|
43
58
|
}
|
|
44
59
|
};
|
|
45
|
-
}, [
|
|
60
|
+
}, [database, ready, value]);
|
|
61
|
+
return [annotations, loading];
|
|
46
62
|
};
|
|
47
63
|
export {
|
|
48
|
-
|
|
64
|
+
useAnnotations as default
|
|
49
65
|
};
|
package/hooks/useClue.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { C as
|
|
3
|
-
const
|
|
1
|
+
import { a as useContext } from "../index-BDVjGvMI.js";
|
|
2
|
+
import { C as ClueEnrichContext } from "../ClueEnrichContext-6NJfXpUB.js";
|
|
3
|
+
const useClue = () => {
|
|
4
|
+
return useContext(ClueEnrichContext);
|
|
5
|
+
};
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
useClue as default
|
|
6
8
|
};
|
package/hooks/useClueActions.js
CHANGED
package/hooks/useClueConfig.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
declare const useClueConfig: () => import("../hooks/ClueConfigProvider").ClueConfigContextType;
|
|
2
|
+
export default useClueConfig;
|
package/hooks/useClueConfig.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ClueConfigContext
|
|
2
|
-
import { useContext
|
|
3
|
-
|
|
4
|
-
return
|
|
5
|
-
}
|
|
1
|
+
import { ClueConfigContext } from "./ClueConfigProvider.js";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
const useClueConfig = () => {
|
|
4
|
+
return useContext(ClueConfigContext);
|
|
5
|
+
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
useClueConfig as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u
|
|
1
|
+
import { u } from "../useClueTypeConfig-XvGvIw2S.js";
|
|
2
2
|
import "../utils/loggerUtil.js";
|
|
3
|
-
import "../isEmpty-
|
|
3
|
+
import "../isEmpty-BQkZubqU.js";
|
|
4
4
|
import "react";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
u as default
|
|
7
7
|
};
|