@cccsaurora/clue-ui 1.0.2 → 1.1.0-dev.10
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,73 +1,89 @@
|
|
|
1
|
-
import { jsxs
|
|
2
|
-
import { Stack
|
|
3
|
-
import { a as
|
|
4
|
-
import { cssImportant
|
|
5
|
-
import { b as
|
|
6
|
-
import { c as
|
|
7
|
-
import { l as
|
|
8
|
-
import { b as
|
|
9
|
-
import { b as
|
|
10
|
-
import { useState
|
|
11
|
-
import
|
|
12
|
-
import { J as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
function
|
|
17
|
-
var
|
|
18
|
-
return
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Typography, Card, CardContent, Divider, Collapse } from "@mui/material";
|
|
3
|
+
import { a as isPlainObject, f as flatten$1 } from "../../../../utils-Dr4wbKBZ.js";
|
|
4
|
+
import { cssImportant } from "../../../../utils/graph.js";
|
|
5
|
+
import { b as baseGet, c as castPath, t as toKey, a as arrayMap } from "../../../../_baseGet-BSK_nnoz.js";
|
|
6
|
+
import { c as copyObject, g as getAllKeysIn, b as baseClone } from "../../../../_baseClone-D3a8Pa4T.js";
|
|
7
|
+
import { l as last } from "../../../../last-CUCl67Im.js";
|
|
8
|
+
import { b as baseSlice } from "../../../../_baseSlice-GAv_YFTT.js";
|
|
9
|
+
import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-D4huXoEI.js";
|
|
10
|
+
import { useState, useEffect, useCallback, Fragment as Fragment$1 } from "react";
|
|
11
|
+
import Iconified from "../../icons/Iconified.js";
|
|
12
|
+
import { J as JSONViewer } from "../../../../index-BMxyILVD.js";
|
|
13
|
+
import Markdown from "../../markdown/index.js";
|
|
14
|
+
import ExpandMoreButton from "../ExpandMoreButton.js";
|
|
15
|
+
import NodeTag from "./NodeTag.js";
|
|
16
|
+
function flatten(array) {
|
|
17
|
+
var length = array == null ? 0 : array.length;
|
|
18
|
+
return length ? baseFlatten(array) : [];
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function flatRest(func) {
|
|
21
|
+
return setToString(overRest(func, void 0, flatten), func + "");
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function parent(object, path) {
|
|
24
|
+
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function baseUnset(object, path) {
|
|
27
|
+
path = castPath(path, object);
|
|
28
|
+
object = parent(object, path);
|
|
29
|
+
return object == null || delete object[toKey(last(path))];
|
|
28
30
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
+
function customOmitClone(value) {
|
|
32
|
+
return isPlainObject(value) ? void 0 : value;
|
|
31
33
|
}
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
|
|
35
|
+
var omit = flatRest(function(object, paths) {
|
|
36
|
+
var result = {};
|
|
37
|
+
if (object == null) {
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
var isDeep = false;
|
|
41
|
+
paths = arrayMap(paths, function(path) {
|
|
42
|
+
path = castPath(path, object);
|
|
43
|
+
isDeep || (isDeep = path.length > 1);
|
|
44
|
+
return path;
|
|
45
|
+
});
|
|
46
|
+
copyObject(object, getAllKeysIn(object), result);
|
|
47
|
+
if (isDeep) {
|
|
48
|
+
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
49
|
+
}
|
|
50
|
+
var length = paths.length;
|
|
51
|
+
while (length--) {
|
|
52
|
+
baseUnset(result, paths[length]);
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
43
55
|
});
|
|
44
|
-
const
|
|
45
|
-
var
|
|
46
|
-
const [
|
|
47
|
-
|
|
56
|
+
const NodeCard = ({ node, sx = {} }) => {
|
|
57
|
+
var _a;
|
|
58
|
+
const [expanded, setExpanded] = useState(false);
|
|
59
|
+
const [nodeExtraData, setNodeExtraData] = useState();
|
|
60
|
+
const handleExpandClick = () => {
|
|
61
|
+
setExpanded(!expanded);
|
|
48
62
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
const
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
setNodeExtraData(omit(node, ["id", "edges"]));
|
|
65
|
+
}, [node]);
|
|
66
|
+
const renderEdgeList = useCallback((edgeIds) => {
|
|
67
|
+
return /* @__PURE__ */ jsxs(Stack, { alignSelf: "stretch", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Typography, { textAlign: "left", variant: "body2", color: "text.secondary", children: "Edges" }),
|
|
69
|
+
/* @__PURE__ */ jsx(Stack, { spacing: 0.25, children: edgeIds.map((edgeId) => /* @__PURE__ */ jsx(NodeTag, { nodeId: edgeId }, edgeId)) })
|
|
70
|
+
] });
|
|
71
|
+
}, []);
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
Card,
|
|
58
74
|
{
|
|
59
75
|
variant: "outlined",
|
|
60
76
|
sx: {
|
|
61
77
|
position: "relative",
|
|
62
78
|
overflow: "auto",
|
|
63
|
-
zIndex:
|
|
79
|
+
zIndex: expanded ? 100 : "initial",
|
|
64
80
|
"& *": {
|
|
65
81
|
opacity: 1
|
|
66
82
|
},
|
|
67
|
-
...
|
|
83
|
+
...sx
|
|
68
84
|
},
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
-
|
|
85
|
+
children: /* @__PURE__ */ jsx(CardContent, { sx: { p: 1 }, children: /* @__PURE__ */ jsxs(
|
|
86
|
+
Stack,
|
|
71
87
|
{
|
|
72
88
|
spacing: 1,
|
|
73
89
|
sx: {
|
|
@@ -78,44 +94,44 @@ const ue = ({ node: e, sx: t = {} }) => {
|
|
|
78
94
|
}
|
|
79
95
|
},
|
|
80
96
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
97
|
+
/* @__PURE__ */ jsx(NodeTag, { nodeId: node.id, label: node.id, type: "header", children: /* @__PURE__ */ jsx(
|
|
98
|
+
ExpandMoreButton,
|
|
83
99
|
{
|
|
84
|
-
expand:
|
|
85
|
-
onClick:
|
|
86
|
-
"aria-expanded":
|
|
100
|
+
expand: expanded,
|
|
101
|
+
onClick: handleExpandClick,
|
|
102
|
+
"aria-expanded": expanded,
|
|
87
103
|
"aria-label": "show more",
|
|
88
104
|
size: "small",
|
|
89
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-expand-more", fontSize: "medium" })
|
|
90
106
|
}
|
|
91
107
|
) }),
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
108
|
+
node.markdown && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
109
|
+
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
110
|
+
/* @__PURE__ */ jsx(Markdown, { md: node.markdown, components: flatten$1(node) })
|
|
95
111
|
] }),
|
|
96
|
-
!!((
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
112
|
+
!!((_a = node == null ? void 0 : node.edges) == null ? void 0 : _a.length) && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
113
|
+
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
114
|
+
renderEdgeList(node == null ? void 0 : node.edges)
|
|
99
115
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
116
|
+
/* @__PURE__ */ jsx(Collapse, { in: expanded, timeout: "auto", children: /* @__PURE__ */ jsxs(
|
|
117
|
+
Stack,
|
|
102
118
|
{
|
|
103
119
|
justifyContent: "start",
|
|
104
120
|
alignItems: "start",
|
|
105
121
|
spacing: 1,
|
|
106
|
-
sx: (
|
|
122
|
+
sx: (theme) => ({
|
|
107
123
|
"& > ul": {
|
|
108
124
|
width: "100%",
|
|
109
125
|
textAlign: "left",
|
|
110
|
-
p:
|
|
111
|
-
mx:
|
|
112
|
-
backgroundColor:
|
|
126
|
+
p: cssImportant(theme.spacing(1)),
|
|
127
|
+
mx: cssImportant("0"),
|
|
128
|
+
backgroundColor: cssImportant(theme.palette.background.paper)
|
|
113
129
|
}
|
|
114
130
|
}),
|
|
115
131
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
133
|
+
/* @__PURE__ */ jsx(Typography, { textAlign: "left", variant: "body1", children: "Metadata:" }),
|
|
134
|
+
/* @__PURE__ */ jsx(JSONViewer, { data: nodeExtraData })
|
|
119
135
|
]
|
|
120
136
|
}
|
|
121
137
|
) })
|
|
@@ -126,5 +142,5 @@ const ue = ({ node: e, sx: t = {} }) => {
|
|
|
126
142
|
);
|
|
127
143
|
};
|
|
128
144
|
export {
|
|
129
|
-
|
|
145
|
+
NodeCard as default
|
|
130
146
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { jsxs
|
|
2
|
-
import { Stack
|
|
3
|
-
import { F as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Typography, Tooltip } from "@mui/material";
|
|
3
|
+
import { F as FlexOne } from "../../../../FlexOne-BSYAhhtG.js";
|
|
4
|
+
import Iconified from "../../icons/Iconified.js";
|
|
5
|
+
const NodeTag = ({ nodeId, label = nodeId, type = "content", children }) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", pr: 1, children: [
|
|
7
|
+
type === "header" ? /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", sx: { overflow: "hidden" }, children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { wordWrap: "break-all" }, children: label.replace(" (TRUNCATED)", "") }),
|
|
9
|
+
label.includes("TRUNCATED") && /* @__PURE__ */ jsx(Tooltip, { title: "Field is truncated.", children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-content-cut", fontSize: "small", style: { fontSize: "0.9em" } }) })
|
|
10
|
+
] }) : label,
|
|
11
|
+
/* @__PURE__ */ jsx(FlexOne, {}),
|
|
12
|
+
children
|
|
13
|
+
] });
|
|
14
|
+
};
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
NodeTag as default
|
|
15
17
|
};
|