@cccsaurora/clue-ui 1.0.2 → 1.1.0-dev.11
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-D4ryHO0M.js +436 -0
- package/AnnotationDetails-YAPoqw3R.js +175 -0
- package/AnnotationPreview-DiQDjt9s.js +188 -0
- package/ClueEnrichContext-DIn6g8tw.js +522 -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-CUmg6egw.js +6 -0
- package/_createAggregator-BpVy5xMi.js +63 -0
- package/_getPrototype-D1LAdQKO.js +5 -0
- package/_getTag-D3ToyefI.js +126 -0
- 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.js +44 -23
- package/components/CountBadge.js +31 -26
- package/components/EnrichedCard.js +104 -92
- package/components/EnrichedChip.js +134 -109
- package/components/EnrichedTypography.js +136 -110
- 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 +37 -34
- package/components/actions/form/schemaAdapter.js +39 -20
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +92 -76
- package/components/display/graph/elements/NodeTag.js +15 -13
- package/components/display/graph/index.js +258 -200
- 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/DynamicTabs.js +22 -17
- package/components/display/markdown/index.js +8527 -5670
- package/components/display/markdown/markdownPlugins/tabs.js +1 -1
- 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 +22 -18
- package/components/group/Entry.js +13 -11
- package/components/group/Group.js +13 -10
- package/components/group/GroupControl.js +76 -65
- package/components/stats/QueryStatus.js +37 -28
- 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/get-D3C3lEU3.js +8 -0
- package/groupBy-DC2oOuBN.js +14 -0
- package/hooks/ClueActionContext.js +6 -6
- 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/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.js +22 -11
- package/hooks/useAnnotations.js +45 -29
- package/hooks/useClue.js +6 -4
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +5 -5
- 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.js +63 -43
- package/iconify-CXMreGTg.js +1782 -0
- package/icons/Action.js +66 -49
- package/icons/Assessment.js +84 -68
- package/icons/Context.js +75 -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-BHPT3qoB.js +1172 -0
- package/index-BMxyILVD.js +465 -0
- package/index-BbPn6-Mw.js +15750 -0
- package/index-Dz1kF2MU.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 +58 -58
- package/package.json +1 -1
- package/sortBy-B-UKp4GT.js +100 -0
- package/sumBy-MYkDPHZL.js +8 -0
- package/tabs-xGuUGsJd.js +254 -0
- package/text/Frequency.js +42 -23
- package/toFinite-Bc55msYj.js +16 -0
- package/toNumber-DPxy1FBy.js +39 -0
- package/useClueTypeConfig-CH-nGq6a.js +3184 -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.js +5 -3
- package/utils/sessionStorage.js +41 -29
- package/utils/utils.js +9 -9
- package/utils/window.js +21 -10
- package/utils-Dr4wbKBZ.js +4182 -0
- package/ActionForm-BtTv0s4P.js +0 -340
- package/AnnotationDetails-D5tBIeEw.js +0 -160
- package/AnnotationPreview-CZr_CcZC.js +0 -140
- package/ClueEnrichContext-DH9lqjwH.js +0 -401
- 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/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-BUcHmehh.js +0 -975
- package/index-Bo-v5IAc.js +0 -12754
- package/index-CnaCBNrd.js +0 -358
- package/index-E7g8cRyW.js +0 -568
- package/index-p5_wX7q1.js +0 -11729
- 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
|
@@ -1,92 +1,103 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { Card
|
|
3
|
-
import { F as
|
|
4
|
-
import
|
|
5
|
-
import { SNACKBAR_EVENT_ID
|
|
6
|
-
import { ClueGroupContext
|
|
7
|
-
import { useClueComponentSelector
|
|
8
|
-
import { safeDispatchEvent
|
|
9
|
-
import { c as
|
|
10
|
-
import { useState
|
|
11
|
-
import { u as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { t
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card, Stack, Box, Typography, Autocomplete, TextField, Button, CircularProgress } from "@mui/material";
|
|
3
|
+
import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
|
|
4
|
+
import Iconified from "../display/icons/Iconified.js";
|
|
5
|
+
import { SNACKBAR_EVENT_ID } from "../../data/event.js";
|
|
6
|
+
import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
|
|
7
|
+
import { useClueComponentSelector, useClueEnrichSelector } from "../../hooks/selectors.js";
|
|
8
|
+
import { safeDispatchEvent } from "../../utils/window.js";
|
|
9
|
+
import { c as capitalize } from "../../ActionForm-D4ryHO0M.js";
|
|
10
|
+
import { useState, useMemo, useCallback } from "react";
|
|
11
|
+
import { u as useContextSelector } from "../../index-BDVjGvMI.js";
|
|
12
|
+
import ExecutePopover from "../actions/ExecutePopover.js";
|
|
13
|
+
const GroupControl = () => {
|
|
14
|
+
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
|
15
|
+
const { type, values, classification } = useContextSelector(ClueGroupContext, (ctx) => ({
|
|
16
|
+
type: ctx == null ? void 0 : ctx.type,
|
|
17
|
+
values: ctx == null ? void 0 : ctx.values,
|
|
18
|
+
classification: ctx == null ? void 0 : ctx.classification
|
|
19
|
+
}));
|
|
20
|
+
const sources = useClueEnrichSelector((ctx) => ctx.availableSources);
|
|
21
|
+
const enrich = useClueEnrichSelector((ctx) => ctx.bulkEnrich);
|
|
22
|
+
const [loading, setLoading] = useState(false);
|
|
23
|
+
const [selectedSources, setSelectedSources] = useState([]);
|
|
24
|
+
const fullValues = useMemo(
|
|
25
|
+
() => (values ?? []).map((value) => ({ value, type, classification })),
|
|
26
|
+
[classification, type, values]
|
|
27
|
+
);
|
|
28
|
+
const runEnrichment = useCallback(async () => {
|
|
29
|
+
if (loading) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
setLoading(true);
|
|
34
|
+
await enrich(
|
|
35
|
+
(values ?? []).map((value) => ({ type, value })),
|
|
36
|
+
{ force: true, sources: selectedSources }
|
|
37
|
+
);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.error(e);
|
|
40
|
+
safeDispatchEvent(
|
|
41
|
+
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
42
|
+
detail: {
|
|
43
|
+
message: e.toString(),
|
|
44
|
+
level: "error"
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
} finally {
|
|
49
|
+
setLoading(false);
|
|
50
|
+
}
|
|
51
|
+
}, [enrich, loading, selectedSources, type, values]);
|
|
52
|
+
return /* @__PURE__ */ jsx(Card, { sx: { p: 1 }, children: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
Box,
|
|
44
55
|
{
|
|
45
|
-
sx: (
|
|
56
|
+
sx: (theme) => ({
|
|
46
57
|
border: "thin solid",
|
|
47
58
|
alignSelf: "stretch",
|
|
48
59
|
display: "flex",
|
|
49
60
|
alignItems: "center",
|
|
50
61
|
px: 1,
|
|
51
62
|
borderRadius: "5px",
|
|
52
|
-
borderColor:
|
|
63
|
+
borderColor: theme.palette.divider
|
|
53
64
|
}),
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
(
|
|
65
|
+
children: /* @__PURE__ */ jsxs(Typography, { color: "text.secondary", children: [
|
|
66
|
+
(values == null ? void 0 : values.length) ?? 0,
|
|
56
67
|
" selected"
|
|
57
68
|
] })
|
|
58
69
|
}
|
|
59
70
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
71
|
+
/* @__PURE__ */ jsx(FlexOne, {}),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
Autocomplete,
|
|
63
74
|
{
|
|
64
75
|
size: "small",
|
|
65
|
-
multiple:
|
|
66
|
-
options:
|
|
76
|
+
multiple: true,
|
|
77
|
+
options: sources,
|
|
67
78
|
sx: { minWidth: "400px" },
|
|
68
|
-
renderInput: (
|
|
69
|
-
value:
|
|
70
|
-
onChange: (
|
|
71
|
-
disableCloseOnSelect:
|
|
72
|
-
getOptionLabel: (
|
|
79
|
+
renderInput: (params) => /* @__PURE__ */ jsx(TextField, { size: "small", placeholder: t("sources"), ...params }),
|
|
80
|
+
value: selectedSources,
|
|
81
|
+
onChange: (__, value) => setSelectedSources(value),
|
|
82
|
+
disableCloseOnSelect: true,
|
|
83
|
+
getOptionLabel: (opt) => opt.split(/[_-]/).map((word) => capitalize(word)).join(" ")
|
|
73
84
|
}
|
|
74
85
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
Button,
|
|
77
88
|
{
|
|
78
89
|
variant: "outlined",
|
|
79
90
|
color: "info",
|
|
80
|
-
disabled: (
|
|
81
|
-
startIcon:
|
|
91
|
+
disabled: (values == null ? void 0 : values.length) < 1 || loading,
|
|
92
|
+
startIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "info", size: "20px" }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-play-arrow" }),
|
|
82
93
|
sx: { alignSelf: "stretch" },
|
|
83
|
-
onClick:
|
|
84
|
-
children:
|
|
94
|
+
onClick: runEnrichment,
|
|
95
|
+
children: t("enrich")
|
|
85
96
|
}
|
|
86
97
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ jsx(ExecutePopover, { selectors: fullValues, size: "medium", multiples: true })
|
|
88
99
|
] }) });
|
|
89
100
|
};
|
|
90
101
|
export {
|
|
91
|
-
|
|
102
|
+
GroupControl as default
|
|
92
103
|
};
|
|
@@ -1,52 +1,61 @@
|
|
|
1
|
-
import { jsxs
|
|
2
|
-
import { Stack
|
|
3
|
-
import { ClueDatabaseContext
|
|
4
|
-
import { useClueEnrichSelector
|
|
5
|
-
import { useContext
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Typography } from "@mui/material";
|
|
3
|
+
import { ClueDatabaseContext } from "../../hooks/ClueDatabaseContext.js";
|
|
4
|
+
import { useClueEnrichSelector } from "../../hooks/selectors.js";
|
|
5
|
+
import { useContext, useState, useEffect } from "react";
|
|
6
|
+
const QueryStatus = () => {
|
|
7
|
+
const database = useContext(ClueDatabaseContext);
|
|
8
|
+
const ready = useClueEnrichSelector((ctx) => ctx.ready);
|
|
9
|
+
const [pendingCount, setPendingCount] = useState(0);
|
|
10
|
+
const [inProgressCount, setInProgressCount] = useState(0);
|
|
11
|
+
const [completeCount, setCompleteCount] = useState(0);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!ready) {
|
|
10
14
|
return;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
}
|
|
16
|
+
const observables = [
|
|
17
|
+
database.status.count({ selector: { status: "pending" } }).$.subscribe(setPendingCount),
|
|
18
|
+
database.status.count({ selector: { status: "in-progress" } }).$.subscribe(setInProgressCount),
|
|
19
|
+
database.status.count({ selector: { status: "complete" } }).$.subscribe(setCompleteCount)
|
|
15
20
|
];
|
|
16
21
|
return () => {
|
|
17
22
|
try {
|
|
18
|
-
|
|
19
|
-
} catch (
|
|
20
|
-
console.warn(
|
|
23
|
+
observables.forEach((_observable) => _observable.unsubscribe());
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.warn(e);
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
|
-
}, [
|
|
24
|
-
|
|
28
|
+
}, [database, ready]);
|
|
29
|
+
if (pendingCount + inProgressCount + completeCount < 1) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
|
+
Stack,
|
|
25
34
|
{
|
|
26
35
|
spacing: 1,
|
|
27
|
-
sx: (
|
|
28
|
-
border: `thin solid ${
|
|
29
|
-
borderRadius:
|
|
36
|
+
sx: (theme) => ({
|
|
37
|
+
border: `thin solid ${theme.palette.divider}`,
|
|
38
|
+
borderRadius: theme.spacing(0.5),
|
|
30
39
|
mx: 1,
|
|
31
40
|
p: 1
|
|
32
41
|
}),
|
|
33
42
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ jsxs(Typography, { sx: { fontFamily: "monospace" }, children: [
|
|
35
44
|
"Pending: ",
|
|
36
|
-
|
|
45
|
+
pendingCount
|
|
37
46
|
] }),
|
|
38
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ jsxs(Typography, { sx: { fontFamily: "monospace" }, children: [
|
|
39
48
|
"In Progress: ",
|
|
40
|
-
|
|
49
|
+
inProgressCount
|
|
41
50
|
] }),
|
|
42
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ jsxs(Typography, { sx: { fontFamily: "monospace" }, children: [
|
|
43
52
|
"Complete: ",
|
|
44
|
-
|
|
53
|
+
completeCount
|
|
45
54
|
] })
|
|
46
55
|
]
|
|
47
56
|
}
|
|
48
57
|
);
|
|
49
58
|
};
|
|
50
59
|
export {
|
|
51
|
-
|
|
60
|
+
QueryStatus as default
|
|
52
61
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { b as baseAssignValue } from "./_baseAssignValue-CNbcU6Nb.js";
|
|
2
|
+
import { c as createAggregator } from "./_createAggregator-BpVy5xMi.js";
|
|
3
|
+
var objectProto = Object.prototype;
|
|
4
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
5
|
+
var countBy = createAggregator(function(result, value, key) {
|
|
6
|
+
if (hasOwnProperty.call(result, key)) {
|
|
7
|
+
++result[key];
|
|
8
|
+
} else {
|
|
9
|
+
baseAssignValue(result, key, 1);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
countBy as c
|
|
14
|
+
};
|
package/data/event.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const SNACKBAR_EVENT_ID = "snackbar.message";
|
|
2
|
+
const SHOW_EVENT_ID = "clue.showPopup";
|
|
3
|
+
const HIDE_EVENT_ID = "clue.hidePopup";
|
|
2
4
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
HIDE_EVENT_ID,
|
|
6
|
+
SHOW_EVENT_ID,
|
|
7
|
+
SNACKBAR_EVENT_ID
|
|
6
8
|
};
|
package/database/index.js
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { i as isObject } from "./isObject-FTY-5JQX.js";
|
|
2
|
+
import { r as root } from "./isObjectLike-OAgjjZye.js";
|
|
3
|
+
import { t as toNumber } from "./toNumber-DPxy1FBy.js";
|
|
4
|
+
var now = function() {
|
|
5
|
+
return root.Date.now();
|
|
6
|
+
};
|
|
7
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
8
|
+
var nativeMax = Math.max, nativeMin = Math.min;
|
|
9
|
+
function debounce(func, wait, options) {
|
|
10
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
11
|
+
if (typeof func != "function") {
|
|
12
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
13
|
+
}
|
|
14
|
+
wait = toNumber(wait) || 0;
|
|
15
|
+
if (isObject(options)) {
|
|
16
|
+
leading = !!options.leading;
|
|
17
|
+
maxing = "maxWait" in options;
|
|
18
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
19
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
20
|
+
}
|
|
21
|
+
function invokeFunc(time) {
|
|
22
|
+
var args = lastArgs, thisArg = lastThis;
|
|
23
|
+
lastArgs = lastThis = void 0;
|
|
24
|
+
lastInvokeTime = time;
|
|
25
|
+
result = func.apply(thisArg, args);
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
function leadingEdge(time) {
|
|
29
|
+
lastInvokeTime = time;
|
|
30
|
+
timerId = setTimeout(timerExpired, wait);
|
|
31
|
+
return leading ? invokeFunc(time) : result;
|
|
32
|
+
}
|
|
33
|
+
function remainingWait(time) {
|
|
34
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
35
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
36
|
+
}
|
|
37
|
+
function shouldInvoke(time) {
|
|
38
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
39
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
40
|
+
}
|
|
41
|
+
function timerExpired() {
|
|
42
|
+
var time = now();
|
|
43
|
+
if (shouldInvoke(time)) {
|
|
44
|
+
return trailingEdge(time);
|
|
45
|
+
}
|
|
46
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
47
|
+
}
|
|
48
|
+
function trailingEdge(time) {
|
|
49
|
+
timerId = void 0;
|
|
50
|
+
if (trailing && lastArgs) {
|
|
51
|
+
return invokeFunc(time);
|
|
52
|
+
}
|
|
53
|
+
lastArgs = lastThis = void 0;
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
function cancel() {
|
|
57
|
+
if (timerId !== void 0) {
|
|
58
|
+
clearTimeout(timerId);
|
|
59
|
+
}
|
|
60
|
+
lastInvokeTime = 0;
|
|
61
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
62
|
+
}
|
|
63
|
+
function flush() {
|
|
64
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
65
|
+
}
|
|
66
|
+
function debounced() {
|
|
67
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
68
|
+
lastArgs = arguments;
|
|
69
|
+
lastThis = this;
|
|
70
|
+
lastCallTime = time;
|
|
71
|
+
if (isInvoking) {
|
|
72
|
+
if (timerId === void 0) {
|
|
73
|
+
return leadingEdge(lastCallTime);
|
|
74
|
+
}
|
|
75
|
+
if (maxing) {
|
|
76
|
+
clearTimeout(timerId);
|
|
77
|
+
timerId = setTimeout(timerExpired, wait);
|
|
78
|
+
return invokeFunc(lastCallTime);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (timerId === void 0) {
|
|
82
|
+
timerId = setTimeout(timerExpired, wait);
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
debounced.cancel = cancel;
|
|
87
|
+
debounced.flush = flush;
|
|
88
|
+
return debounced;
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
debounce as d
|
|
92
|
+
};
|
package/get-D3C3lEU3.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { b as baseAssignValue } from "./_baseAssignValue-CNbcU6Nb.js";
|
|
2
|
+
import { c as createAggregator } from "./_createAggregator-BpVy5xMi.js";
|
|
3
|
+
var objectProto = Object.prototype;
|
|
4
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
5
|
+
var groupBy = createAggregator(function(result, value, key) {
|
|
6
|
+
if (hasOwnProperty.call(result, key)) {
|
|
7
|
+
result[key].push(value);
|
|
8
|
+
} else {
|
|
9
|
+
baseAssignValue(result, key, [value]);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
groupBy as g
|
|
14
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../useClueTypeConfig-
|
|
5
|
-
import { a
|
|
3
|
+
import "../index-Dz1kF2MU.js";
|
|
4
|
+
import "../useClueTypeConfig-CH-nGq6a.js";
|
|
5
|
+
import { a, C } from "../ActionForm-D4ryHO0M.js";
|
|
6
6
|
import "../components/actions/ResultModal.js";
|
|
7
7
|
import "../components/display/icons/Iconified.js";
|
|
8
8
|
import "../components/ErrorBoundary.js";
|
|
9
9
|
import "../data/event.js";
|
|
10
10
|
import "../utils/window.js";
|
|
11
11
|
import "react";
|
|
12
|
-
import "../index-
|
|
12
|
+
import "../index-BDVjGvMI.js";
|
|
13
13
|
import "./ClueComponentContext.js";
|
|
14
14
|
import "./useClue.js";
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
a as ClueActionContext,
|
|
17
|
+
C as ClueActionProvider
|
|
18
18
|
};
|
|
@@ -1,34 +1,40 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { useMemo
|
|
3
|
-
import { useTranslation
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { c as createContext } from "../index-BDVjGvMI.js";
|
|
5
|
+
const ClueComponentContext = createContext(null);
|
|
6
|
+
const ClueComponentI18nProvider = ({
|
|
7
|
+
children,
|
|
8
|
+
ReactJson
|
|
8
9
|
}) => {
|
|
9
|
-
const
|
|
10
|
+
const i18next = useTranslation();
|
|
11
|
+
const context = useMemo(
|
|
10
12
|
() => ({
|
|
11
|
-
ReactJson
|
|
12
|
-
i18next
|
|
13
|
+
ReactJson,
|
|
14
|
+
i18next
|
|
13
15
|
}),
|
|
14
|
-
[
|
|
16
|
+
[ReactJson, i18next]
|
|
15
17
|
);
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
return /* @__PURE__ */ jsx(ClueComponentContext.Provider, { value: context, children });
|
|
19
|
+
};
|
|
20
|
+
const ClueComponentProvider = ({
|
|
21
|
+
children,
|
|
22
|
+
ReactJson,
|
|
23
|
+
i18next = null
|
|
21
24
|
}) => {
|
|
22
|
-
const
|
|
25
|
+
const context = useMemo(
|
|
23
26
|
() => ({
|
|
24
|
-
ReactJson
|
|
25
|
-
i18next
|
|
27
|
+
ReactJson,
|
|
28
|
+
i18next
|
|
26
29
|
}),
|
|
27
|
-
[
|
|
30
|
+
[ReactJson, i18next]
|
|
28
31
|
);
|
|
29
|
-
|
|
32
|
+
if (!i18next) {
|
|
33
|
+
return /* @__PURE__ */ jsx(ClueComponentI18nProvider, { ReactJson, children });
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ jsx(ClueComponentContext.Provider, { value: context, children });
|
|
30
36
|
};
|
|
31
37
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
ClueComponentContext,
|
|
39
|
+
ClueComponentProvider
|
|
34
40
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { createContext
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useState, useMemo } from "react";
|
|
3
|
+
const ClueConfigContext = createContext(null);
|
|
4
|
+
const ClueConfigProvider = ({ children, config: _config }) => {
|
|
5
|
+
const [config, setConfig] = useState(
|
|
6
|
+
_config ?? {
|
|
6
7
|
configuration: null,
|
|
7
8
|
c12nDef: null
|
|
8
9
|
}
|
|
9
|
-
)
|
|
10
|
+
);
|
|
11
|
+
const context = useMemo(
|
|
10
12
|
() => ({
|
|
11
|
-
config
|
|
12
|
-
setConfig
|
|
13
|
+
config,
|
|
14
|
+
setConfig
|
|
13
15
|
}),
|
|
14
|
-
[
|
|
16
|
+
[config, setConfig]
|
|
15
17
|
);
|
|
16
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ jsx(ClueConfigContext.Provider, { value: context, children });
|
|
17
19
|
};
|
|
18
20
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
ClueConfigContext,
|
|
22
|
+
ClueConfigProvider
|
|
21
23
|
};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { b as
|
|
3
|
-
import { createContext
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { b as buildDatabase } from "../index-Dz1kF2MU.js";
|
|
3
|
+
import { createContext, useState, useEffect } from "react";
|
|
4
|
+
const ClueDatabaseContext = createContext(null);
|
|
5
|
+
const ClueDatabaseProvider = ({
|
|
6
|
+
children,
|
|
7
|
+
database: _database,
|
|
8
|
+
databaseConfig
|
|
8
9
|
}) => {
|
|
9
|
-
const [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const [database, setDatabase] = useState();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (_database) {
|
|
13
|
+
setDatabase(_database);
|
|
14
|
+
} else {
|
|
15
|
+
buildDatabase(databaseConfig).then(setDatabase);
|
|
16
|
+
}
|
|
17
|
+
}, [_database, databaseConfig]);
|
|
18
|
+
return /* @__PURE__ */ jsx(ClueDatabaseContext.Provider, { value: database, children });
|
|
13
19
|
};
|
|
14
20
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
ClueDatabaseContext,
|
|
22
|
+
ClueDatabaseProvider
|
|
17
23
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../iconify-
|
|
3
|
-
import "../useClueTypeConfig-
|
|
2
|
+
import "../iconify-CXMreGTg.js";
|
|
3
|
+
import "../useClueTypeConfig-CH-nGq6a.js";
|
|
4
4
|
import "../utils/loggerUtil.js";
|
|
5
|
-
import { C
|
|
6
|
-
import "../debounce-
|
|
7
|
-
import "../groupBy-
|
|
5
|
+
import { C, a } from "../ClueEnrichContext-DIn6g8tw.js";
|
|
6
|
+
import "../debounce-bV0h5FC5.js";
|
|
7
|
+
import "../groupBy-DC2oOuBN.js";
|
|
8
8
|
import "react";
|
|
9
|
-
import "../index-
|
|
9
|
+
import "../index-BDVjGvMI.js";
|
|
10
10
|
import "./ClueDatabaseContext.js";
|
|
11
11
|
import "./useClueConfig.js";
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
C as ClueEnrichContext,
|
|
14
|
+
a as ClueEnrichProvider
|
|
15
15
|
};
|