@cccsaurora/clue-ui 1.2.4-patch.275 → 1.2.5-dev.298
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-D6gYuFRR.js +5970 -0
- package/AnnotationDetails-Zx4pjBiN.js +175 -0
- package/AnnotationPreview-Dmz7taAU.js +188 -0
- package/ClueEnrichContext-CJEJxrgs.js +541 -0
- package/FlexOne-BSYAhhtG.js +9 -0
- package/_MapCache-WmuDdwuH.js +222 -0
- package/_Uint8Array-B7JqpgFX.js +128 -0
- package/_baseAssignValue-CGTuELqU.js +25 -0
- package/_baseClone-CkNrTyhm.js +283 -0
- package/_baseExtremum-kob8QXyt.js +18 -0
- package/_baseFlatten-jIR_sN_-.js +92 -0
- package/_baseGet-Bx3A4Qfp.js +108 -0
- package/_baseIsEqual-C5OTWzTk.js +208 -0
- package/_baseIteratee-avi7MX2o.js +126 -0
- package/_baseSlice-GAv_YFTT.js +20 -0
- package/_baseSum-D0WC1dN0.js +13 -0
- package/_baseUniq-BI9GIHMF.js +115 -0
- package/_commonjsHelpers-DWwsNxpa.js +8 -0
- package/_createAggregator-QD8MzKwe.js +63 -0
- package/_getPrototype-CU0j_POw.js +5 -0
- package/_getTag-Ckxxfr88.js +126 -0
- package/_isIterateeCall-Ds3sw2SF.js +17 -0
- package/_setToArray-CaPKQhcz.js +33 -0
- package/cloneDeep-DJrLSw8W.js +8 -0
- package/components/AnnotationBody.js +49 -35
- package/components/AnnotationDetailPopover.js +36 -30
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +44 -23
- package/components/CountBadge.js +31 -26
- package/components/EnrichedCard.js +110 -97
- package/components/EnrichedChip.js +130 -105
- package/components/EnrichedTypography.js +133 -107
- 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 +75 -59
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +39 -23
- package/components/actions/formats/FileResult.js +86 -59
- package/components/actions/formats/index.js +21 -10
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +111 -91
- package/components/display/graph/elements/NodeTag.js +15 -13
- package/components/display/graph/index.js +261 -202
- 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 +408 -306
- package/components/display/icons/Iconified.js +27 -12
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +8678 -5770
- package/components/enrichment/EnrichPopover.js +54 -46
- package/components/fetchers/Fetcher.js +158 -119
- package/components/fetchers/PreviewModal.js +20 -17
- package/components/fetchers/StatusChip.js +21 -17
- 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 +43 -33
- package/countBy-c6S3dvSW.js +14 -0
- package/data/event.js +6 -4
- package/database/index.js +2 -2
- package/debounce-bV0h5FC5.js +92 -0
- package/get-DSsNkRQs.js +8 -0
- package/groupBy-xqz-n0Vd.js +14 -0
- package/hooks/ClueActionContext.d.ts +10 -2
- 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 +83 -56
- package/hooks/ClueGroupContext.js +17 -14
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +12 -10
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.d.ts +1 -0
- package/hooks/useActionResult.js +3 -3
- package/hooks/useAnnotations.js +47 -31
- package/hooks/useClue.js +6 -4
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +6 -4
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +722 -435
- package/hooks/useErrors.js +22 -18
- package/hooks/useFetcherResult.d.ts +1 -0
- package/hooks/useFetcherResult.js +33 -24
- package/hooks/useMyHighlights.js +66 -36
- package/hooks/useMyLocalStorage.js +66 -37
- package/iconify-CXMreGTg.js +1782 -0
- package/icons/Action.js +66 -49
- package/icons/Assessment.js +85 -69
- package/icons/Context.js +77 -63
- package/icons/Opinion.js +76 -60
- package/icons/iconMap.js +2 -2
- package/identity-CPGTqrE4.js +6 -0
- package/index-AMfoEg_6.js +696 -0
- package/index-B6C2a_Lg.js +1172 -0
- package/index-C12gPw2W.js +17698 -0
- package/index-DCKkHTvx.js +15750 -0
- package/index-JcKyZeoY.js +465 -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 +60 -60
- package/maxBy-IKHzFrCS.js +8 -0
- package/package.json +1 -1
- package/sortBy-DfSj8IoJ.js +96 -0
- package/sumBy-D-hb_NY-.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 +1 -0
- package/types/WithActionData.d.ts +1 -0
- package/useClueTypeConfig-Z1LFp01b.js +3289 -0
- package/utils/chain.js +92 -65
- 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 -27
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +21 -10
- package/utils-HmNPuoDB.js +199 -0
- package/ActionForm-CwsfB99X.js +0 -4458
- package/AnnotationDetails-Bw2JdtTL.js +0 -160
- package/AnnotationPreview-BO7rVnOP.js +0 -140
- package/ClueEnrichContext-KqRuuWNS.js +0 -418
- package/FlexOne-BXWFOd1T.js +0 -6
- package/_MapCache-BiTi0iqu.js +0 -180
- package/_Uint8Array-BQNOM9Rr.js +0 -101
- package/_baseAssignValue-CNMLQZco.js +0 -20
- package/_baseClone-BnT-6pyM.js +0 -207
- package/_baseExtremum-Ca2EHgy2.js +0 -16
- package/_baseFlatten-Bfr_Molw.js +0 -72
- package/_baseGet-DSZygzyq.js +0 -79
- package/_baseIsEqual-VgvaAFZG.js +0 -147
- package/_baseIteratee-Dbfsw5z8.js +0 -95
- package/_baseSlice-M5RKzt1A.js +0 -10
- package/_baseSum-wEbgNeUs.js +0 -10
- package/_baseUniq-BJcj69PL.js +0 -79
- package/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/_createAggregator-k3TuAnxT.js +0 -53
- package/_getPrototype-Cr1Mk7BC.js +0 -5
- package/_getTag-CK2Sffaq.js +0 -90
- package/_isIterateeCall-DkJP7Rbx.js +0 -13
- package/_setToArray-C7yMOeww.js +0 -29
- package/cloneDeep-CF8TtLHr.js +0 -8
- package/countBy-CdYegFSu.js +0 -8
- package/debounce-DryYcbJ4.js +0 -56
- package/get-CH7kz5Ix.js +0 -8
- package/groupBy-br8xmD2R.js +0 -8
- package/iconify-BBckr5AQ.js +0 -1263
- package/identity-ByMq8VxU.js +0 -6
- package/index-BHAe_V9n.js +0 -12768
- package/index-BK-zfYhR.js +0 -358
- package/index-CA5CUNZO.js +0 -975
- package/index-Dj5C04IX.js +0 -568
- package/index-p5_wX7q1.js +0 -11729
- 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/maxBy-Bc0dYHcO.js +0 -8
- package/sortBy-DY2JBf9n.js +0 -75
- package/sumBy-DuMASLPd.js +0 -8
- package/toFinite-BMy6GObD.js +0 -14
- package/toNumber-YVhnnJv4.js +0 -31
- package/useClueTypeConfig-Ct9Ygter.js +0 -2292
- package/utils-DmwSUrum.js +0 -129
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { Stack
|
|
3
|
-
import { ClueGroupProvider
|
|
4
|
-
import { memo
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from "@mui/material";
|
|
3
|
+
import { ClueGroupProvider } from "../../hooks/ClueGroupContext.js";
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
import GroupControl from "./GroupControl.js";
|
|
6
|
+
const Group = ({ children, showHeader = true, slotProps, ...groupProps }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(ClueGroupProvider, { ...groupProps, children: showHeader ? /* @__PURE__ */ jsxs(Stack, { direction: "column", alignSelf: "stretch", ...(slotProps == null ? void 0 : slotProps.stack) ?? {}, children: [
|
|
8
|
+
/* @__PURE__ */ jsx(GroupControl, {}),
|
|
9
|
+
children
|
|
10
|
+
] }) : children });
|
|
11
|
+
};
|
|
12
|
+
const Group_default = memo(Group);
|
|
10
13
|
export {
|
|
11
|
-
|
|
14
|
+
Group_default as default
|
|
12
15
|
};
|
|
@@ -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 { d as
|
|
8
|
-
import { safeDispatchEvent
|
|
9
|
-
import { useState
|
|
10
|
-
import { u as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
const { t
|
|
14
|
-
|
|
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
|
-
|
|
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 { d as useClueComponentSelector, b as useClueEnrichSelector, e as capitalize } from "../../ActionForm-D6gYuFRR.js";
|
|
8
|
+
import { safeDispatchEvent } from "../../utils/window.js";
|
|
9
|
+
import { useState, useMemo, useCallback } from "react";
|
|
10
|
+
import { u as useContextSelector } from "../../index-AMfoEg_6.js";
|
|
11
|
+
import ExecutePopover from "../actions/ExecutePopover.js";
|
|
12
|
+
const GroupControl = () => {
|
|
13
|
+
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
|
14
|
+
const { type, values, classification } = useContextSelector(ClueGroupContext, (ctx) => ({
|
|
15
|
+
type: ctx == null ? void 0 : ctx.type,
|
|
16
|
+
values: ctx == null ? void 0 : ctx.values,
|
|
17
|
+
classification: ctx == null ? void 0 : ctx.classification
|
|
18
|
+
}));
|
|
19
|
+
const sources = useClueEnrichSelector((ctx) => ctx.availableSources);
|
|
20
|
+
const enrich = useClueEnrichSelector((ctx) => ctx.bulkEnrich);
|
|
21
|
+
const [loading, setLoading] = useState(false);
|
|
22
|
+
const [selectedSources, setSelectedSources] = useState([]);
|
|
23
|
+
const fullValues = useMemo(
|
|
24
|
+
() => (values ?? []).map((value) => ({ value, type, classification })),
|
|
25
|
+
[classification, type, values]
|
|
26
|
+
);
|
|
27
|
+
const runEnrichment = useCallback(async () => {
|
|
28
|
+
if (loading) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
setLoading(true);
|
|
33
|
+
await enrich(
|
|
34
|
+
(values ?? []).map((value) => ({ type, value })),
|
|
35
|
+
{ force: true, sources: selectedSources }
|
|
36
|
+
);
|
|
37
|
+
} catch (e) {
|
|
38
|
+
console.error(e);
|
|
39
|
+
safeDispatchEvent(
|
|
40
|
+
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
41
|
+
detail: {
|
|
42
|
+
message: e.toString(),
|
|
43
|
+
level: "error"
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
} finally {
|
|
48
|
+
setLoading(false);
|
|
49
|
+
}
|
|
50
|
+
}, [enrich, loading, selectedSources, type, values]);
|
|
51
|
+
return /* @__PURE__ */ jsx(Card, { sx: { p: 1 }, children: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Box,
|
|
43
54
|
{
|
|
44
|
-
sx: (
|
|
55
|
+
sx: (theme) => ({
|
|
45
56
|
border: "thin solid",
|
|
46
57
|
alignSelf: "stretch",
|
|
47
58
|
display: "flex",
|
|
48
59
|
alignItems: "center",
|
|
49
60
|
px: 1,
|
|
50
61
|
borderRadius: "5px",
|
|
51
|
-
borderColor:
|
|
62
|
+
borderColor: theme.palette.divider
|
|
52
63
|
}),
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
-
(
|
|
64
|
+
children: /* @__PURE__ */ jsxs(Typography, { color: "text.secondary", children: [
|
|
65
|
+
(values == null ? void 0 : values.length) ?? 0,
|
|
55
66
|
" ",
|
|
56
|
-
|
|
67
|
+
t("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,60 +1,70 @@
|
|
|
1
|
-
import { jsxs
|
|
2
|
-
import { Stack
|
|
3
|
-
import { ClueDatabaseContext
|
|
4
|
-
import { d as
|
|
5
|
-
import { useContext
|
|
6
|
-
const
|
|
7
|
-
const { t
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Typography } from "@mui/material";
|
|
3
|
+
import { ClueDatabaseContext } from "../../hooks/ClueDatabaseContext.js";
|
|
4
|
+
import { d as useClueComponentSelector, b as useClueEnrichSelector } from "../../ActionForm-D6gYuFRR.js";
|
|
5
|
+
import { useContext, useState, useEffect } from "react";
|
|
6
|
+
const QueryStatus = () => {
|
|
7
|
+
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
|
8
|
+
const database = useContext(ClueDatabaseContext);
|
|
9
|
+
const ready = useClueEnrichSelector((ctx) => ctx.ready);
|
|
10
|
+
const [pendingCount, setPendingCount] = useState(0);
|
|
11
|
+
const [inProgressCount, setInProgressCount] = useState(0);
|
|
12
|
+
const [completeCount, setCompleteCount] = useState(0);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
var _a;
|
|
15
|
+
if (!ready) {
|
|
11
16
|
return;
|
|
12
|
-
|
|
17
|
+
}
|
|
18
|
+
if ((_a = database == null ? void 0 : database.status) == null ? void 0 : _a.closed) {
|
|
13
19
|
console.warn("Status collection is closed");
|
|
14
20
|
return;
|
|
15
21
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
const observables = [
|
|
23
|
+
database.status.count({ selector: { status: "pending" } }).$.subscribe(setPendingCount),
|
|
24
|
+
database.status.count({ selector: { status: "in-progress" } }).$.subscribe(setInProgressCount),
|
|
25
|
+
database.status.count({ selector: { status: "complete" } }).$.subscribe(setCompleteCount)
|
|
20
26
|
];
|
|
21
27
|
return () => {
|
|
22
28
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
console.warn(
|
|
29
|
+
observables.forEach((_observable) => _observable.unsubscribe());
|
|
30
|
+
} catch (e) {
|
|
31
|
+
console.warn(e);
|
|
26
32
|
}
|
|
27
33
|
};
|
|
28
|
-
}, [
|
|
29
|
-
|
|
34
|
+
}, [database, ready]);
|
|
35
|
+
if (pendingCount + inProgressCount + completeCount < 1) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
Stack,
|
|
30
40
|
{
|
|
31
41
|
spacing: 1,
|
|
32
|
-
sx: (
|
|
33
|
-
border: `thin solid ${
|
|
34
|
-
borderRadius:
|
|
42
|
+
sx: (theme) => ({
|
|
43
|
+
border: `thin solid ${theme.palette.divider}`,
|
|
44
|
+
borderRadius: theme.spacing(0.5),
|
|
35
45
|
mx: 1,
|
|
36
46
|
p: 1
|
|
37
47
|
}),
|
|
38
48
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
49
|
+
/* @__PURE__ */ jsxs(Typography, { sx: { fontFamily: "monospace" }, children: [
|
|
50
|
+
t("query.status.pending"),
|
|
41
51
|
": ",
|
|
42
|
-
|
|
52
|
+
pendingCount
|
|
43
53
|
] }),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
54
|
+
/* @__PURE__ */ jsxs(Typography, { sx: { fontFamily: "monospace" }, children: [
|
|
55
|
+
t("query.status.inprogress"),
|
|
46
56
|
": ",
|
|
47
|
-
|
|
57
|
+
inProgressCount
|
|
48
58
|
] }),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
59
|
+
/* @__PURE__ */ jsxs(Typography, { sx: { fontFamily: "monospace" }, children: [
|
|
60
|
+
t("query.status.complete"),
|
|
51
61
|
": ",
|
|
52
|
-
|
|
62
|
+
completeCount
|
|
53
63
|
] })
|
|
54
64
|
]
|
|
55
65
|
}
|
|
56
66
|
);
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
|
-
|
|
69
|
+
QueryStatus as default
|
|
60
70
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { b as baseAssignValue } from "./_baseAssignValue-CGTuELqU.js";
|
|
2
|
+
import { c as createAggregator } from "./_createAggregator-QD8MzKwe.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-DSsNkRQs.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { b as baseAssignValue } from "./_baseAssignValue-CGTuELqU.js";
|
|
2
|
+
import { c as createAggregator } from "./_createAggregator-QD8MzKwe.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
|
+
};
|
|
@@ -38,13 +38,21 @@ export interface ClueActionContextType {
|
|
|
38
38
|
*/
|
|
39
39
|
skipResultModal?: boolean;
|
|
40
40
|
/**
|
|
41
|
-
* Callback for post-execution.
|
|
41
|
+
* Callback for post-execution. Will be called once the action is fully executed and has an outcome of either
|
|
42
|
+
* 'success' or 'failure'.
|
|
42
43
|
* @param result
|
|
43
44
|
* @returns The action result
|
|
44
45
|
*/
|
|
45
46
|
onComplete?: (result: WithActionData<ActionResult>) => void;
|
|
46
47
|
/**
|
|
47
|
-
* Callback for
|
|
48
|
+
* Callback for intra-execution. will be called everytime the result recieves an update and has a
|
|
49
|
+
* 'pending', 'success', or 'failure' outcome.
|
|
50
|
+
* @param result
|
|
51
|
+
* @returns The action result
|
|
52
|
+
*/
|
|
53
|
+
onUpdate?: (result: WithActionData<ActionResult>) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Callback for when the action is cancelled.
|
|
48
56
|
* @returns void
|
|
49
57
|
*/
|
|
50
58
|
onCancel?: () => void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
|
-
import { g
|
|
4
|
-
import "../useClueTypeConfig-
|
|
3
|
+
import { g, C } from "../ActionForm-D6gYuFRR.js";
|
|
4
|
+
import "../useClueTypeConfig-Z1LFp01b.js";
|
|
5
5
|
import "../components/display/icons/Iconified.js";
|
|
6
6
|
import "../components/ErrorBoundary.js";
|
|
7
7
|
import "../data/event.js";
|
|
8
8
|
import "../utils/time.js";
|
|
9
9
|
import "../utils/window.js";
|
|
10
10
|
import "react";
|
|
11
|
-
import "../index-
|
|
11
|
+
import "../index-AMfoEg_6.js";
|
|
12
12
|
import "./ClueComponentContext.js";
|
|
13
13
|
import "./useClue.js";
|
|
14
|
-
import "../isNil-
|
|
14
|
+
import "../isNil-CIubwp4T.js";
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
g 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-AMfoEg_6.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-C12gPw2W.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
|
};
|