@cccsaurora/clue-ui 1.2.3-dev.266 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ActionForm-DlOXqMUx.js +4460 -0
- package/AnnotationDetails-Bk-p0F6h.js +160 -0
- package/AnnotationPreview-jzZvkCxJ.js +140 -0
- package/ClueEnrichContext-KqRuuWNS.js +418 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_MapCache-BiTi0iqu.js +180 -0
- package/_Uint8Array-BQNOM9Rr.js +101 -0
- package/_baseAssignValue-CNMLQZco.js +20 -0
- package/_baseClone-BnT-6pyM.js +207 -0
- package/_baseExtremum-Ca2EHgy2.js +16 -0
- package/_baseFlatten-Bfr_Molw.js +72 -0
- package/_baseGet-DSZygzyq.js +79 -0
- package/_baseIsEqual-VgvaAFZG.js +147 -0
- package/_baseIteratee-Dbfsw5z8.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-BJcj69PL.js +79 -0
- package/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/_createAggregator-k3TuAnxT.js +53 -0
- package/_getPrototype-Cr1Mk7BC.js +5 -0
- package/_getTag-CK2Sffaq.js +90 -0
- package/_isIterateeCall-DkJP7Rbx.js +13 -0
- package/_setToArray-C7yMOeww.js +29 -0
- package/cloneDeep-CF8TtLHr.js +8 -0
- package/components/AnnotationBody.js +35 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +97 -110
- package/components/EnrichedChip.js +105 -130
- package/components/EnrichedTypography.js +107 -133
- package/components/ErrorBoundary.js +24 -28
- package/components/RetryFailedEnrichments.js +9 -10
- package/components/SourcePicker.js +49 -57
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +59 -75
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +23 -39
- package/components/actions/formats/FileResult.js +59 -86
- package/components/actions/formats/index.js +10 -21
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +91 -111
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +202 -261
- package/components/display/graph/visualizations/Leaf.js +69 -88
- package/components/display/graph/visualizations/cloud/index.js +81 -98
- package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +13 -14
- package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
- package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +306 -408
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +5770 -8678
- package/components/enrichment/EnrichPopover.js +46 -54
- package/components/fetchers/Fetcher.js +119 -158
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +17 -21
- package/components/group/Entry.js +11 -13
- package/components/group/Group.js +10 -13
- package/components/group/GroupControl.js +65 -76
- package/components/stats/QueryStatus.js +33 -43
- package/countBy-CdYegFSu.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-CH7kz5Ix.js +8 -0
- package/groupBy-br8xmD2R.js +8 -0
- package/hooks/ClueActionContext.js +6 -6
- package/hooks/ClueComponentContext.js +23 -29
- package/hooks/ClueConfigProvider.js +12 -14
- package/hooks/ClueDatabaseContext.js +13 -19
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueFetcherContext.js +56 -83
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +2 -2
- package/hooks/useAnnotations.js +31 -47
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +4 -6
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useFetcherResult.js +24 -33
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +37 -66
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +69 -85
- package/icons/Context.js +63 -77
- package/icons/Opinion.js +60 -76
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-BHAe_V9n.js +12768 -0
- package/index-BK-zfYhR.js +358 -0
- package/index-CA5CUNZO.js +975 -0
- package/index-Dj5C04IX.js +568 -0
- package/index-p5_wX7q1.js +11729 -0
- package/isNil-CjWwlQS3.js +6 -0
- package/isObject-B53jY8Qg.js +7 -0
- package/isObjectLike-BatpeCIi.js +29 -0
- package/isSymbol-C3_SC0Qp.js +8 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +60 -60
- package/maxBy-Bc0dYHcO.js +8 -0
- package/package.json +1 -1
- package/sortBy-DY2JBf9n.js +75 -0
- package/sumBy-DuMASLPd.js +8 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/useClueTypeConfig-Ct9Ygter.js +2292 -0
- package/utils/chain.js +65 -92
- package/utils/classificationParser.js +256 -519
- package/utils/constants.js +10 -35
- package/utils/graph.js +45 -72
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +81 -131
- package/utils/loggerUtil.js +3 -5
- package/utils/sessionStorage.js +27 -41
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-DmwSUrum.js +129 -0
- package/ActionForm-uDp92tN2.js +0 -5941
- package/AnnotationDetails-DGYfOiWm.js +0 -175
- package/AnnotationPreview-bHObsb3P.js +0 -188
- package/ClueEnrichContext-CJEJxrgs.js +0 -541
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_MapCache-WmuDdwuH.js +0 -222
- package/_Uint8Array-B7JqpgFX.js +0 -128
- package/_baseAssignValue-CGTuELqU.js +0 -25
- package/_baseClone-CkNrTyhm.js +0 -283
- package/_baseExtremum-kob8QXyt.js +0 -18
- package/_baseFlatten-jIR_sN_-.js +0 -92
- package/_baseGet-Bx3A4Qfp.js +0 -108
- package/_baseIsEqual-C5OTWzTk.js +0 -208
- package/_baseIteratee-avi7MX2o.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-BI9GIHMF.js +0 -115
- package/_commonjsHelpers-DWwsNxpa.js +0 -8
- package/_createAggregator-QD8MzKwe.js +0 -63
- package/_getPrototype-CU0j_POw.js +0 -5
- package/_getTag-Ckxxfr88.js +0 -126
- package/_isIterateeCall-Ds3sw2SF.js +0 -17
- package/_setToArray-CaPKQhcz.js +0 -33
- package/cloneDeep-DJrLSw8W.js +0 -8
- package/countBy-c6S3dvSW.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-DSsNkRQs.js +0 -8
- package/groupBy-xqz-n0Vd.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-AMfoEg_6.js +0 -696
- package/index-B6C2a_Lg.js +0 -1172
- package/index-C12gPw2W.js +0 -17698
- package/index-DCKkHTvx.js +0 -15750
- package/index-JcKyZeoY.js +0 -465
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-OAgjjZye.js +0 -48
- package/isSymbol-Xd2FsJyp.js +0 -8
- package/last-CUCl67Im.js +0 -7
- package/maxBy-IKHzFrCS.js +0 -8
- package/sortBy-DfSj8IoJ.js +0 -96
- package/sumBy-D-hb_NY-.js +0 -8
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-Z1LFp01b.js +0 -3289
- package/utils-HmNPuoDB.js +0 -199
|
@@ -1,87 +1,79 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Box, Typography, Divider } from "@mui/material";
|
|
3
|
-
import { d as
|
|
4
|
-
import { useState, useRef, useCallback, useEffect } from "react";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const { t } =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const _enrich = useClueEnrichSelector((ctx) => ctx.enrich);
|
|
11
|
-
const [showEnrichMenu, setShowEnrichMenu] = useState(show);
|
|
12
|
-
const [loading, setLoading] = useState(false);
|
|
13
|
-
const enrichEl = useRef(null);
|
|
14
|
-
const enrich = useCallback(
|
|
15
|
-
async (_source) => {
|
|
16
|
-
setLoading(true);
|
|
1
|
+
import { jsxs as y, Fragment as C, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as k, Tooltip as S, IconButton as E, CircularProgress as f, Button as z, Popover as I, Paper as j, Stack as c, Box as P, Typography as B, Divider as O } from "@mui/material";
|
|
3
|
+
import { d as T, b as p, e as w } from "../../ActionForm-DlOXqMUx.js";
|
|
4
|
+
import { useState as m, useRef as M, useCallback as D, useEffect as F } from "react";
|
|
5
|
+
import g from "../display/icons/Iconified.js";
|
|
6
|
+
const H = ({ show: t = !1, size: b = "small", selector: n }) => {
|
|
7
|
+
const { t: s } = T((i) => i.i18next), h = k(), a = p((i) => i.availableSources), u = p((i) => i.enrich), [x, o] = m(t), [r, d] = m(!1), l = M(null), v = D(
|
|
8
|
+
async (i) => {
|
|
9
|
+
d(!0);
|
|
17
10
|
try {
|
|
18
|
-
await
|
|
19
|
-
classification:
|
|
11
|
+
await u(n.type, n.value, {
|
|
12
|
+
classification: n.classification,
|
|
20
13
|
timeout: 30,
|
|
21
|
-
force:
|
|
22
|
-
noCache:
|
|
23
|
-
sources: [
|
|
24
|
-
append:
|
|
14
|
+
force: !0,
|
|
15
|
+
noCache: !0,
|
|
16
|
+
sources: [i],
|
|
17
|
+
append: !0
|
|
25
18
|
});
|
|
26
19
|
} finally {
|
|
27
|
-
|
|
20
|
+
d(!1);
|
|
28
21
|
}
|
|
29
22
|
},
|
|
30
|
-
[
|
|
23
|
+
[u, n.classification, n.type, n.value]
|
|
31
24
|
);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
IconButton,
|
|
25
|
+
return F(() => {
|
|
26
|
+
o(t);
|
|
27
|
+
}, [t]), /* @__PURE__ */ y(C, { children: [
|
|
28
|
+
b === "small" ? /* @__PURE__ */ e(S, { ref: l, title: s("enrich"), children: /* @__PURE__ */ e("span", { style: { alignSelf: "center" }, children: /* @__PURE__ */ e(
|
|
29
|
+
E,
|
|
38
30
|
{
|
|
39
|
-
onClick: () =>
|
|
40
|
-
disabled: Object.keys(
|
|
31
|
+
onClick: () => o(!0),
|
|
32
|
+
disabled: Object.keys(a).length < 1 || r,
|
|
41
33
|
color: "info",
|
|
42
|
-
children:
|
|
34
|
+
children: r ? /* @__PURE__ */ e(f, { color: "info", size: "24px" }) : /* @__PURE__ */ e(g, { icon: "ic:baseline-auto-fix-high" })
|
|
43
35
|
}
|
|
44
|
-
) }) }) : /* @__PURE__ */
|
|
45
|
-
|
|
36
|
+
) }) }) : /* @__PURE__ */ e(
|
|
37
|
+
z,
|
|
46
38
|
{
|
|
47
|
-
ref:
|
|
39
|
+
ref: l,
|
|
48
40
|
variant: "outlined",
|
|
49
41
|
color: "info",
|
|
50
|
-
disabled: Object.keys(
|
|
51
|
-
startIcon:
|
|
42
|
+
disabled: Object.keys(a).length < 1 || r,
|
|
43
|
+
startIcon: r ? /* @__PURE__ */ e(f, { color: "info", size: "20px" }) : /* @__PURE__ */ e(g, { icon: "ic:baseline-auto-fix-high" }),
|
|
52
44
|
sx: { alignSelf: "stretch" },
|
|
53
|
-
onClick: () =>
|
|
54
|
-
children:
|
|
45
|
+
onClick: () => o(!0),
|
|
46
|
+
children: s("enrich")
|
|
55
47
|
}
|
|
56
48
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
I,
|
|
59
51
|
{
|
|
60
52
|
sx: { zIndex: 2e3 },
|
|
61
|
-
open:
|
|
62
|
-
disablePortal:
|
|
63
|
-
onClose: () =>
|
|
64
|
-
anchorEl:
|
|
53
|
+
open: x,
|
|
54
|
+
disablePortal: !0,
|
|
55
|
+
onClose: () => o(!1),
|
|
56
|
+
anchorEl: l.current,
|
|
65
57
|
anchorOrigin: { horizontal: "left", vertical: "bottom" },
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
58
|
+
children: /* @__PURE__ */ e(j, { onClick: () => o(!1), children: /* @__PURE__ */ e(c, { divider: /* @__PURE__ */ e(O, { flexItem: !0, orientation: "horizontal" }), children: a.map((i) => /* @__PURE__ */ e(
|
|
59
|
+
P,
|
|
68
60
|
{
|
|
69
61
|
sx: {
|
|
70
62
|
px: 3,
|
|
71
63
|
py: 1,
|
|
72
64
|
cursor: "pointer",
|
|
73
|
-
transition:
|
|
74
|
-
"&:hover": { backgroundColor:
|
|
65
|
+
transition: h.transitions.create("background-color"),
|
|
66
|
+
"&:hover": { backgroundColor: h.palette.background.default }
|
|
75
67
|
},
|
|
76
|
-
onClick: () =>
|
|
77
|
-
children: /* @__PURE__ */
|
|
68
|
+
onClick: () => v(i),
|
|
69
|
+
children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(c, { direction: "row", spacing: 1, alignItems: "center", children: /* @__PURE__ */ e(B, { variant: "body1", children: i.split("-").map(w).join(" ") }) }) })
|
|
78
70
|
},
|
|
79
|
-
|
|
71
|
+
i
|
|
80
72
|
)) }) })
|
|
81
73
|
}
|
|
82
74
|
)
|
|
83
75
|
] });
|
|
84
76
|
};
|
|
85
77
|
export {
|
|
86
|
-
|
|
78
|
+
H as default
|
|
87
79
|
};
|
|
@@ -1,144 +1,106 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { useTheme, Skeleton, Chip, Tooltip, Stack, Typography, LinearProgress, Paper, Box, IconButton } from "@mui/material";
|
|
4
|
-
import { F as
|
|
5
|
-
import
|
|
6
|
-
import { J as
|
|
7
|
-
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { c as
|
|
9
|
-
import
|
|
10
|
-
import { u as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { I as H } from "../../iconify-BBckr5AQ.js";
|
|
3
|
+
import { useTheme as V, Skeleton as I, Chip as q, Tooltip as J, Stack as f, Typography as K, LinearProgress as Q, Paper as U, Box as X, IconButton as Y } from "@mui/material";
|
|
4
|
+
import { F as L } from "../../FlexOne-BXWFOd1T.js";
|
|
5
|
+
import S from "../display/icons/Iconified.js";
|
|
6
|
+
import { J as Z } from "../../index-BK-zfYhR.js";
|
|
7
|
+
import { ClueComponentContext as $ } from "../../hooks/ClueComponentContext.js";
|
|
8
|
+
import { c as s } from "../../ActionForm-DlOXqMUx.js";
|
|
9
|
+
import p, { useState as b, useRef as k, useMemo as P, useEffect as N, memo as ee } from "react";
|
|
10
|
+
import { u as te } from "../../index-Dj5C04IX.js";
|
|
11
|
+
import re from "../display/graph/index.js";
|
|
12
|
+
import ie from "../display/markdown/index.js";
|
|
13
|
+
import ne from "./PreviewModal.js";
|
|
14
|
+
import oe from "./StatusChip.js";
|
|
15
|
+
const ae = p.memo(
|
|
16
16
|
({
|
|
17
|
-
type,
|
|
18
|
-
value,
|
|
19
|
-
classification,
|
|
20
|
-
fetcherId,
|
|
17
|
+
type: h,
|
|
18
|
+
value: x,
|
|
19
|
+
classification: g,
|
|
20
|
+
fetcherId: a,
|
|
21
21
|
slotProps: {
|
|
22
|
-
paper:
|
|
23
|
-
preview:
|
|
24
|
-
stack:
|
|
25
|
-
image:
|
|
26
|
-
chip:
|
|
27
|
-
skeleton:
|
|
22
|
+
paper: n = {},
|
|
23
|
+
preview: O = {},
|
|
24
|
+
stack: o = {},
|
|
25
|
+
image: W = {},
|
|
26
|
+
chip: v = {},
|
|
27
|
+
skeleton: i = {}
|
|
28
28
|
} = {}
|
|
29
29
|
}) => {
|
|
30
|
-
var
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
let cancelled = false;
|
|
45
|
-
const poll = async () => {
|
|
46
|
-
const res = await getFetcherStatus(fetcherId, taskId);
|
|
47
|
-
if (!res) {
|
|
48
|
-
setResult({ outcome: "failure", done: true, error: "Missing result", link: "" });
|
|
49
|
-
} else if (res.outcome === "success" || res.outcome === "failure") {
|
|
50
|
-
setResult({ ...res, done: true });
|
|
51
|
-
} else {
|
|
52
|
-
if (cancelled) return;
|
|
53
|
-
setResult({ ...res });
|
|
54
|
-
timeoutRef.current = setTimeout(poll, 2e3);
|
|
30
|
+
var z, M, T, j;
|
|
31
|
+
const d = V(), w = s((r) => r.fetchers), F = s((r) => r.fetchSelector), R = s((r) => r.getFetcherStatus), D = s((r) => r.fetchCompleted), { t: m } = te($, (r) => r == null ? void 0 : r.i18next), [e, c] = b(null), [E, A] = b(!0), [G, _] = b(!1), y = k(null), C = P(() => e == null ? void 0 : e.task_id, [e == null ? void 0 : e.task_id]);
|
|
32
|
+
if (N(() => {
|
|
33
|
+
if ((e == null ? void 0 : e.outcome) !== "pending" || !C) return;
|
|
34
|
+
let r = !1;
|
|
35
|
+
const B = async () => {
|
|
36
|
+
const u = await R(a, C);
|
|
37
|
+
if (!u)
|
|
38
|
+
c({ outcome: "failure", done: !0, error: "Missing result", link: "" });
|
|
39
|
+
else if (u.outcome === "success" || u.outcome === "failure")
|
|
40
|
+
c({ ...u, done: !0 });
|
|
41
|
+
else {
|
|
42
|
+
if (r) return;
|
|
43
|
+
c({ ...u }), y.current = setTimeout(B, 2e3);
|
|
55
44
|
}
|
|
56
45
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
cancelled = true;
|
|
60
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
46
|
+
return B(), () => {
|
|
47
|
+
r = !0, y.current && clearTimeout(y.current);
|
|
61
48
|
};
|
|
62
|
-
}, [
|
|
63
|
-
useEffect(() => {
|
|
49
|
+
}, [a, R, e == null ? void 0 : e.outcome, C]), N(() => {
|
|
64
50
|
(async () => {
|
|
65
51
|
try {
|
|
66
|
-
|
|
67
|
-
setResult(await fetchSelector(fetcherId, { type, value, classification }));
|
|
52
|
+
A(!0), c(await F(a, { type: h, value: x, classification: g }));
|
|
68
53
|
} catch {
|
|
69
|
-
|
|
54
|
+
c({ outcome: "failure", done: !0, error: m("fetcher.error.unexpected") });
|
|
70
55
|
} finally {
|
|
71
|
-
|
|
56
|
+
A(!1);
|
|
72
57
|
}
|
|
73
58
|
})();
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
console.warn(
|
|
59
|
+
}, [g, F, a, m, h, x]), D)
|
|
60
|
+
if (a)
|
|
61
|
+
if (a.includes(".")) {
|
|
62
|
+
if (!(a in w))
|
|
63
|
+
return console.warn("Fetcher ID does not correspond to a registered fetcher. Component will not render."), null;
|
|
64
|
+
} else return console.warn(
|
|
81
65
|
"Invalid fetcher id. Must be in the format '<plugin_id>.<fetcher_id>'. Component will not render."
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
console.warn("Fetcher ID does not correspond to a registered fetcher. Component will not render.");
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
66
|
+
), null;
|
|
67
|
+
else return console.warn("Missing fetcher Id. Component will not render."), null;
|
|
68
|
+
else
|
|
89
69
|
return null;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{ borderRadius: "16px" },
|
|
102
|
-
...Array.isArray(skeletonProps == null ? void 0 : skeletonProps.sx) ? skeletonProps == null ? void 0 : skeletonProps.sx : [skeletonProps == null ? void 0 : skeletonProps.sx]
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
} else {
|
|
107
|
-
return /* @__PURE__ */ jsx(Skeleton, { variant: "rounded", height: "325px", width: "300px", ...skeletonProps });
|
|
70
|
+
return E ? ((z = w[a]) == null ? void 0 : z.format) === "status" ? /* @__PURE__ */ t(
|
|
71
|
+
I,
|
|
72
|
+
{
|
|
73
|
+
variant: "rounded",
|
|
74
|
+
height: "32px",
|
|
75
|
+
width: "150px",
|
|
76
|
+
...i,
|
|
77
|
+
sx: [
|
|
78
|
+
{ borderRadius: "16px" },
|
|
79
|
+
...Array.isArray(i == null ? void 0 : i.sx) ? i == null ? void 0 : i.sx : [i == null ? void 0 : i.sx]
|
|
80
|
+
]
|
|
108
81
|
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
82
|
+
) : /* @__PURE__ */ t(I, { variant: "rounded", height: "325px", width: "300px", ...i }) : e ? e.outcome === "failure" && w[a].format === "status" ? /* @__PURE__ */ t(
|
|
83
|
+
q,
|
|
84
|
+
{
|
|
85
|
+
icon: /* @__PURE__ */ t(J, { title: e.error, children: /* @__PURE__ */ t(H, { icon: "mdi:information-outline", fontSize: "1.25rem" }) }),
|
|
86
|
+
label: m("error"),
|
|
87
|
+
color: "error",
|
|
88
|
+
...v
|
|
89
|
+
}
|
|
90
|
+
) : e.outcome === "pending" ? /* @__PURE__ */ l(f, { flex: 1, sx: { pt: 2, alignItems: "center" }, spacing: 1, children: [
|
|
91
|
+
((M = e.data) == null ? void 0 : M.summary) && /* @__PURE__ */ t(K, { variant: "caption", children: e.data.summary }),
|
|
92
|
+
/* @__PURE__ */ t(
|
|
93
|
+
Q,
|
|
114
94
|
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
...chipProps
|
|
95
|
+
variant: (T = e.data) != null && T.progress ? "determinate" : "indeterminate",
|
|
96
|
+
value: ((j = e.data) == null ? void 0 : j.progress) * 100,
|
|
97
|
+
sx: { maxWidth: 500, width: "100%", borderRadius: d.shape.borderRadius }
|
|
119
98
|
}
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return /* @__PURE__ */ jsxs(Stack, { flex: 1, sx: { pt: 2, alignItems: "center" }, spacing: 1, children: [
|
|
124
|
-
((_b = result.data) == null ? void 0 : _b.summary) && /* @__PURE__ */ jsx(Typography, { variant: "caption", children: result.data.summary }),
|
|
125
|
-
/* @__PURE__ */ jsx(
|
|
126
|
-
LinearProgress,
|
|
127
|
-
{
|
|
128
|
-
variant: ((_c = result.data) == null ? void 0 : _c.progress) ? "determinate" : "indeterminate",
|
|
129
|
-
value: ((_d = result.data) == null ? void 0 : _d.progress) * 100,
|
|
130
|
-
sx: { maxWidth: 500, width: "100%", borderRadius: theme.shape.borderRadius }
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
] });
|
|
134
|
-
}
|
|
135
|
-
if (result.format === "status") {
|
|
136
|
-
return /* @__PURE__ */ jsx(StatusChip, { data: result.data, ...chipProps });
|
|
137
|
-
}
|
|
138
|
-
return /* @__PURE__ */ jsx(
|
|
139
|
-
Paper,
|
|
99
|
+
)
|
|
100
|
+
] }) : e.format === "status" ? /* @__PURE__ */ t(oe, { data: e.data, ...v }) : /* @__PURE__ */ t(
|
|
101
|
+
U,
|
|
140
102
|
{
|
|
141
|
-
...
|
|
103
|
+
...n,
|
|
142
104
|
sx: [
|
|
143
105
|
{
|
|
144
106
|
p: 1,
|
|
@@ -147,16 +109,16 @@ const Fetcher = React__default.memo(
|
|
|
147
109
|
width: "100%",
|
|
148
110
|
minWidth: "300px"
|
|
149
111
|
},
|
|
150
|
-
...Array.isArray(
|
|
112
|
+
...Array.isArray(n == null ? void 0 : n.sx) ? n == null ? void 0 : n.sx : [n == null ? void 0 : n.sx]
|
|
151
113
|
],
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
|
|
114
|
+
children: /* @__PURE__ */ l(
|
|
115
|
+
f,
|
|
154
116
|
{
|
|
155
117
|
sx: {
|
|
156
118
|
"& > img": {
|
|
157
119
|
borderRadius: "3px",
|
|
158
120
|
cursor: "zoom-in",
|
|
159
|
-
transition:
|
|
121
|
+
transition: d.transitions.create("border-color", { duration: d.transitions.duration.shortest }),
|
|
160
122
|
border: "3px solid transparent",
|
|
161
123
|
"&:hover": {
|
|
162
124
|
borderColor: "primary.main"
|
|
@@ -164,65 +126,64 @@ const Fetcher = React__default.memo(
|
|
|
164
126
|
}
|
|
165
127
|
},
|
|
166
128
|
children: [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
129
|
+
e.outcome === "failure" && /* @__PURE__ */ t("code", { style: { color: d.palette.error.main }, children: /* @__PURE__ */ t("pre", { style: { marginTop: 0, marginBottom: 0 }, children: e.error }) }),
|
|
130
|
+
e.format === "markdown" && /* @__PURE__ */ t(ie, { md: e.data }),
|
|
131
|
+
e.format === "image" && /* @__PURE__ */ t("img", { src: e.data.image, alt: e.data.alt, ...W, onClick: () => _(!0) }),
|
|
132
|
+
e.format === "json" && /* @__PURE__ */ t(X, { sx: { ".react-json-view": { backgroundColor: "transparent !important" } }, children: /* @__PURE__ */ t(Z, { data: e.data }) }),
|
|
133
|
+
e.format === "graph" && /* @__PURE__ */ t(re, { graph: e.data, sx: { minHeight: "600px" } }),
|
|
134
|
+
/* @__PURE__ */ t(L, {}),
|
|
135
|
+
/* @__PURE__ */ l(
|
|
136
|
+
f,
|
|
175
137
|
{
|
|
176
138
|
direction: "row",
|
|
177
139
|
spacing: 1,
|
|
178
|
-
...
|
|
140
|
+
...o,
|
|
179
141
|
sx: [
|
|
180
142
|
{
|
|
181
|
-
py:
|
|
143
|
+
py: d.spacing(0.5),
|
|
182
144
|
display: "flex",
|
|
183
145
|
alignItems: "center"
|
|
184
146
|
},
|
|
185
|
-
...Array.isArray(
|
|
147
|
+
...Array.isArray(o == null ? void 0 : o.sx) ? o == null ? void 0 : o.sx : [o == null ? void 0 : o.sx]
|
|
186
148
|
],
|
|
187
149
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
|
|
150
|
+
/* @__PURE__ */ t(S, { icon: "ic:baseline-landscape", color: "primary", fontSize: "small" }),
|
|
151
|
+
/* @__PURE__ */ t(
|
|
152
|
+
J,
|
|
191
153
|
{
|
|
192
|
-
title: /* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
|
|
154
|
+
title: /* @__PURE__ */ l(f, { spacing: 0.5, children: [
|
|
155
|
+
/* @__PURE__ */ l("span", { children: [
|
|
156
|
+
m("type"),
|
|
195
157
|
": ",
|
|
196
|
-
|
|
158
|
+
h
|
|
197
159
|
] }),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
|
|
160
|
+
/* @__PURE__ */ l("span", { children: [
|
|
161
|
+
m("value"),
|
|
200
162
|
": ",
|
|
201
|
-
|
|
163
|
+
x
|
|
202
164
|
] }),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
|
|
165
|
+
/* @__PURE__ */ l("span", { children: [
|
|
166
|
+
m("classification"),
|
|
205
167
|
": ",
|
|
206
|
-
|
|
168
|
+
g ?? "N/A"
|
|
207
169
|
] })
|
|
208
170
|
] }),
|
|
209
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ t(S, { icon: "ic:outline-info", fontSize: "small" })
|
|
210
172
|
}
|
|
211
173
|
),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
|
|
174
|
+
/* @__PURE__ */ t(L, {}),
|
|
175
|
+
e.link && /* @__PURE__ */ t(Y, { size: "small", component: "a", href: e.link, children: /* @__PURE__ */ t(S, { icon: "ic:baseline-open-in-new", fontSize: "small" }) })
|
|
214
176
|
]
|
|
215
177
|
}
|
|
216
178
|
),
|
|
217
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ t(ne, { ...O, open: G, result: e, onClose: () => _(!1) })
|
|
218
180
|
]
|
|
219
181
|
}
|
|
220
182
|
)
|
|
221
183
|
}
|
|
222
|
-
);
|
|
184
|
+
) : null;
|
|
223
185
|
}
|
|
224
|
-
);
|
|
225
|
-
const Fetcher_default = memo(Fetcher);
|
|
186
|
+
), be = ee(ae);
|
|
226
187
|
export {
|
|
227
|
-
|
|
188
|
+
be as default
|
|
228
189
|
};
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Modal, Paper } from "@mui/material";
|
|
3
|
-
import { memo } from "react";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
const PreviewModal$1 = memo(PreviewModal);
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as n, Paper as f } from "@mui/material";
|
|
3
|
+
import { memo as l } from "react";
|
|
4
|
+
const c = ({ result: i, onClose: d, open: x = !1, ...a }) => /* @__PURE__ */ m(
|
|
5
|
+
n,
|
|
6
|
+
{
|
|
7
|
+
open: x,
|
|
8
|
+
sx: [
|
|
9
|
+
{ display: "flex", alignItems: "center", justifyContent: "center" },
|
|
10
|
+
...Array.isArray(a == null ? void 0 : a.sx) ? a == null ? void 0 : a.sx : [a == null ? void 0 : a.sx]
|
|
11
|
+
],
|
|
12
|
+
onClose: d,
|
|
13
|
+
...a,
|
|
14
|
+
children: /* @__PURE__ */ m(f, { sx: { maxHeight: "90%", maxWidth: "90%", p: 2, overflow: "auto" }, children: (i == null ? void 0 : i.format) === "image" && /* @__PURE__ */ m("img", { src: i.data.image, alt: i.data.alt, style: { maxWidth: "100%" } }) })
|
|
15
|
+
}
|
|
16
|
+
), t = l(c);
|
|
20
17
|
export {
|
|
21
|
-
|
|
18
|
+
t as default
|
|
22
19
|
};
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { useTheme, Chip } from "@mui/material";
|
|
4
|
-
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
Chip,
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { I as r } from "../../iconify-BBckr5AQ.js";
|
|
3
|
+
import { useTheme as i, Chip as x } from "@mui/material";
|
|
4
|
+
import { ClueComponentContext as g } from "../../hooks/ClueComponentContext.js";
|
|
5
|
+
import { u as C } from "../../index-Dj5C04IX.js";
|
|
6
|
+
const S = ({ data: e, ...n }) => {
|
|
7
|
+
var t;
|
|
8
|
+
const m = i(), { i18n: f, t: u } = C(g, (o) => o.i18next);
|
|
9
|
+
return e != null && e.empty ? null : /* @__PURE__ */ l(
|
|
10
|
+
x,
|
|
15
11
|
{
|
|
16
|
-
icon:
|
|
17
|
-
deleteIcon: /* @__PURE__ */
|
|
18
|
-
...
|
|
19
|
-
label: ((
|
|
12
|
+
icon: e.icon && /* @__PURE__ */ l(r, { icon: e.icon, fontSize: "1.25rem" }),
|
|
13
|
+
deleteIcon: /* @__PURE__ */ l("a", { href: e.link, rel: "noreferrer", target: "_blank", style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ l(r, { icon: "mdi:open-in-new", color: m.palette.text.primary, fontSize: "1.25rem" }) }),
|
|
14
|
+
...n,
|
|
15
|
+
label: ((t = e.labels.find((o) => o.language === f.language) ?? e.labels[0]) == null ? void 0 : t.label) ?? u("unknown"),
|
|
20
16
|
sx: [
|
|
21
|
-
...Array.isArray(
|
|
22
|
-
|
|
17
|
+
...Array.isArray(n == null ? void 0 : n.sx) ? n == null ? void 0 : n.sx : [n == null ? void 0 : n.sx],
|
|
18
|
+
e.color && { backgroundColor: e.color }
|
|
23
19
|
]
|
|
24
20
|
}
|
|
25
21
|
);
|
|
26
22
|
};
|
|
27
23
|
export {
|
|
28
|
-
|
|
24
|
+
S as default
|
|
29
25
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
|
|
2
|
-
import { i as
|
|
3
|
-
import { memo, useEffect } from "react";
|
|
4
|
-
import { u as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, [
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
const Entry_default = memo(Entry);
|
|
1
|
+
import { ClueGroupContext as s } from "../../hooks/ClueGroupContext.js";
|
|
2
|
+
import { i as u } from "../../utils-DmwSUrum.js";
|
|
3
|
+
import { memo as a, useEffect as i } from "react";
|
|
4
|
+
import { u as l } from "../../index-Dj5C04IX.js";
|
|
5
|
+
const n = ({ children: f, entry: t, selected: e = !1 }) => {
|
|
6
|
+
const r = l(s, (o) => o == null ? void 0 : o.setValues);
|
|
7
|
+
return i(() => {
|
|
8
|
+
r == null || r((o) => [...o.filter((m) => !u(m, t)), ...e ? [t] : []]);
|
|
9
|
+
}, [t, e, r]), f;
|
|
10
|
+
}, q = a(n);
|
|
13
11
|
export {
|
|
14
|
-
|
|
12
|
+
q as default
|
|
15
13
|
};
|