@cccsaurora/clue-ui 1.0.0-dev.48 → 1.0.0
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-WIj7BfD5.js +340 -0
- package/AnnotationPreview-DWRDhxUB.js +140 -0
- package/ClueEnrichContext-CbJVBm4w.js +397 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_Map-DXNg_Z-q.js +54 -0
- package/_MapCache-Cu25RRDU.js +129 -0
- package/_Uint8Array-DlJCtTvG.js +102 -0
- package/_baseAssignValue-CUmzp727.js +20 -0
- package/_baseClone-BlMmRXeX.js +208 -0
- package/_baseExtremum-P_0akmCi.js +27 -0
- package/_baseFlatten-CN7vDNEQ.js +72 -0
- package/_baseGet-Dgf6_xCm.js +80 -0
- package/_baseIsEqual-Cpjtfb3Q.js +173 -0
- package/_baseIteratee-CP1bocOX.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-tMFmk80M.js +61 -0
- package/_commonjsHelpers-C6fGbg64.js +6 -0
- package/_createAggregator-B4Cav8ZM.js +53 -0
- package/_getPrototype-CHAFQYL_.js +5 -0
- package/_getTag-BV_UoLYG.js +90 -0
- package/cloneDeep-BPVpFBzJ.js +8 -0
- package/components/AnnotationBody.js +34 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +94 -109
- package/components/AnnotationEntry.js +52 -55
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +92 -104
- package/components/EnrichedChip.js +109 -134
- package/components/EnrichedTypography.js +110 -136
- 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 +50 -64
- package/components/actions/ResultModal.js +34 -37
- package/components/actions/form/schemaAdapter.js +20 -39
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +76 -92
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +200 -258
- 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 +305 -407
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/DynamicTabs.js +17 -22
- package/components/display/markdown/index.js +5674 -8531
- package/components/display/markdown/markdownPlugins/tabs.js +1 -1
- package/components/enrichment/EnrichPopover.js +47 -55
- package/components/fetchers/Fetcher.js +95 -123
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +18 -22
- 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 +28 -37
- package/countBy-DOutsa_w.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-Bow1vKwx.js +8 -0
- package/groupBy-BheQYl6f.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 +46 -74
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +11 -22
- package/hooks/useAnnotations.js +32 -48
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +5 -5
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +43 -63
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +68 -84
- package/icons/Context.js +61 -75
- package/icons/Opinion.js +65 -77
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-4YFAh_sa.js +358 -0
- package/index-E7g8cRyW.js +568 -0
- package/index-HuYhutsd.js +975 -0
- package/index-WvFmjbxF.js +12734 -0
- package/index-p5_wX7q1.js +11729 -0
- package/isEmpty-g47Qir2A.js +21 -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/isUndefined-DiNCDKoz.js +10 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +68 -68
- package/package.json +1 -1
- package/sortBy-ITdmD17L.js +79 -0
- package/sumBy-DxJUU2E8.js +8 -0
- package/tabs-CgADNA57.js +195 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/useClueTypeConfig-BQ33EiyB.js +2273 -0
- package/utils/chain.js +64 -91
- package/utils/classificationParser.js +254 -504
- 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 +29 -41
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-C_RX5uMP.js +2704 -0
- package/ActionForm-c5hLIfQ-.js +0 -436
- package/AnnotationPreview-BvNpZOP0.js +0 -188
- package/ClueEnrichContext-m-4vn9rz.js +0 -518
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_Map-kgDsDYxq.js +0 -64
- package/_MapCache-DabaaWfq.js +0 -161
- package/_Uint8Array-BlVVH1tp.js +0 -129
- package/_baseAssignValue-CNbcU6Nb.js +0 -25
- package/_baseClone-D3a8Pa4T.js +0 -284
- package/_baseExtremum-B1o1zHjR.js +0 -33
- package/_baseFlatten-D4huXoEI.js +0 -92
- package/_baseGet-BSK_nnoz.js +0 -109
- package/_baseIsEqual-B5xLoweL.js +0 -238
- package/_baseIteratee-p6Nj07-n.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-CpupKWcL.js +0 -89
- package/_commonjsHelpers-CUmg6egw.js +0 -6
- package/_createAggregator-BpVy5xMi.js +0 -63
- package/_getPrototype-D1LAdQKO.js +0 -5
- package/_getTag-D3ToyefI.js +0 -126
- package/cloneDeep-CjP5k9zW.js +0 -8
- package/countBy-C69WslUA.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-D3C3lEU3.js +0 -8
- package/groupBy-DC2oOuBN.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-BDVjGvMI.js +0 -696
- package/index-BDrtH5ec.js +0 -465
- package/index-BbPn6-Mw.js +0 -15750
- package/index-C9lySIVX.js +0 -1172
- package/index-Dn2NHyXg.js +0 -17654
- package/isEmpty-BQkZubqU.js +0 -29
- 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/isUndefined-CE8h73dH.js +0 -10
- package/last-CUCl67Im.js +0 -7
- package/sortBy-B-UKp4GT.js +0 -100
- package/sumBy-MYkDPHZL.js +0 -8
- package/tabs-xGuUGsJd.js +0 -254
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-D4zcy8Gr.js +0 -3184
- package/utils-CxIhC2xH.js +0 -4182
|
@@ -1,150 +1,136 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { useTheme, Stack, Typography, Tooltip, Box, IconButton, CircularProgress, Chip, Accordion
|
|
4
|
-
import
|
|
5
|
-
import { SNACKBAR_EVENT_ID } from "../data/event.js";
|
|
6
|
-
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
7
|
-
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { ICON_MAP } from "../icons/iconMap.js";
|
|
11
|
-
import { safeDispatchEvent } from "../utils/window.js";
|
|
12
|
-
import { memo, useState, useMemo, useCallback, useEffect } from "react";
|
|
13
|
-
import { u as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { u as
|
|
19
|
-
import { g as
|
|
20
|
-
import { i as
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const options = useMemo(
|
|
34
|
-
() => ["all", ...uniq((annotations ?? []).map((annotation) => annotation.type))],
|
|
35
|
-
[annotations]
|
|
36
|
-
);
|
|
37
|
-
const annotationsByType = useMemo(() => groupBy(annotations ?? [], "type"), [annotations]);
|
|
38
|
-
const forceEnrich = useCallback(async () => {
|
|
39
|
-
await enrich(enrichRequest.type, enrichRequest.value, {
|
|
40
|
-
classification: enrichRequest.classification,
|
|
1
|
+
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { I as E } from "../iconify-BBckr5AQ.js";
|
|
3
|
+
import { useTheme as M, Stack as l, Typography as s, Tooltip as x, Box as z, IconButton as A, CircularProgress as N, Chip as S, Accordion as $, AccordionSummary as j, AccordionDetails as _, Divider as u } from "@mui/material";
|
|
4
|
+
import g from "./display/icons/Iconified.js";
|
|
5
|
+
import { SNACKBAR_EVENT_ID as O } from "../data/event.js";
|
|
6
|
+
import { ClueComponentContext as F } from "../hooks/ClueComponentContext.js";
|
|
7
|
+
import { useClueEnrichSelector as H } from "../hooks/selectors.js";
|
|
8
|
+
import K from "../hooks/useAnnotations.js";
|
|
9
|
+
import L from "../hooks/useErrors.js";
|
|
10
|
+
import { ICON_MAP as T } from "../icons/iconMap.js";
|
|
11
|
+
import { safeDispatchEvent as U } from "../utils/window.js";
|
|
12
|
+
import { memo as V, useState as W, useMemo as k, useCallback as G, useEffect as J } from "react";
|
|
13
|
+
import { u as P } from "../index-E7g8cRyW.js";
|
|
14
|
+
import Q from "./actions/ExecutePopover.js";
|
|
15
|
+
import X from "./AnnotationEntry.js";
|
|
16
|
+
import Y from "./ClassificationChip.js";
|
|
17
|
+
import Z from "./enrichment/EnrichPopover.js";
|
|
18
|
+
import { u as q } from "../ClueEnrichContext-CbJVBm4w.js";
|
|
19
|
+
import { g as R } from "../groupBy-BheQYl6f.js";
|
|
20
|
+
import { i as w } from "../isUndefined-DiNCDKoz.js";
|
|
21
|
+
const ii = ({ enrichRequest: o, setReady: d, updatePosition: p }) => {
|
|
22
|
+
const v = M(), { t: c } = P(F, (a) => a.i18next), [r, I] = W("all"), y = H((a) => a.enrich), [t, C] = K(
|
|
23
|
+
o == null ? void 0 : o.type,
|
|
24
|
+
o == null ? void 0 : o.value,
|
|
25
|
+
o == null ? void 0 : o.classification,
|
|
26
|
+
{ skipEnrichment: !0 }
|
|
27
|
+
), m = L(o == null ? void 0 : o.value), B = k(
|
|
28
|
+
() => ["all", ...q((t ?? []).map((a) => a.type))],
|
|
29
|
+
[t]
|
|
30
|
+
), b = k(() => R(t ?? [], "type"), [t]), h = G(async () => {
|
|
31
|
+
await y(o.type, o.value, {
|
|
32
|
+
classification: o.classification,
|
|
41
33
|
timeout: 15,
|
|
42
|
-
force:
|
|
34
|
+
force: !0
|
|
43
35
|
});
|
|
44
|
-
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
55
|
-
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
56
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
57
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", fontWeight: "bold", children: "Clue" }),
|
|
58
|
-
enrichRequest.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: enrichRequest.classification })
|
|
36
|
+
}, [o, y]);
|
|
37
|
+
return J(() => {
|
|
38
|
+
d && (d(o && !w(t)), p == null || p());
|
|
39
|
+
}, [t, o, d, p]), o && !w(t) && /* @__PURE__ */ n(l, { direction: "column", sx: { p: 1, width: "100%" }, spacing: 1, children: [
|
|
40
|
+
/* @__PURE__ */ n(l, { spacing: 1, children: [
|
|
41
|
+
/* @__PURE__ */ n(l, { direction: "row", spacing: 1, children: [
|
|
42
|
+
/* @__PURE__ */ n(l, { children: [
|
|
43
|
+
/* @__PURE__ */ n(l, { direction: "row", spacing: 1, children: [
|
|
44
|
+
/* @__PURE__ */ i(s, { variant: "body1", fontWeight: "bold", children: "Clue" }),
|
|
45
|
+
o.classification && /* @__PURE__ */ i(Y, { size: "small", classification: o.classification })
|
|
59
46
|
] }),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
47
|
+
/* @__PURE__ */ n(s, { variant: "caption", color: "text.secondary", children: [
|
|
48
|
+
o.type.toLocaleUpperCase(),
|
|
62
49
|
" ",
|
|
63
|
-
|
|
50
|
+
c("enrichment")
|
|
64
51
|
] })
|
|
65
52
|
] }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
53
|
+
/* @__PURE__ */ i("div", { style: { flex: 1 } }),
|
|
54
|
+
/* @__PURE__ */ i(x, { title: c("refresh"), children: /* @__PURE__ */ i(z, { sx: { alignSelf: "center", m: -1 }, children: /* @__PURE__ */ i(A, { onClick: () => h(), disabled: C, children: C ? /* @__PURE__ */ i(N, { variant: "indeterminate", size: 20 }) : /* @__PURE__ */ i(g, { icon: "ic:baseline-replay", fontSize: "small" }) }) }) }),
|
|
55
|
+
/* @__PURE__ */ i(x, { title: c("clipboard"), children: /* @__PURE__ */ i(
|
|
56
|
+
A,
|
|
70
57
|
{
|
|
71
58
|
sx: { alignSelf: "center", m: -1 },
|
|
72
59
|
onClick: () => {
|
|
73
|
-
navigator.clipboard.writeText(
|
|
74
|
-
|
|
75
|
-
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
60
|
+
navigator.clipboard.writeText(o.value), U(
|
|
61
|
+
new CustomEvent(O, {
|
|
76
62
|
detail: {
|
|
77
|
-
message: `${
|
|
63
|
+
message: `${o.value} ${c("clipboard.success")}`,
|
|
78
64
|
level: "success"
|
|
79
65
|
}
|
|
80
66
|
})
|
|
81
67
|
);
|
|
82
68
|
},
|
|
83
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ i(g, { icon: "ic:outline-assignment", fontSize: "small" })
|
|
84
70
|
}
|
|
85
71
|
) }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ i(Z, { selector: o }),
|
|
73
|
+
/* @__PURE__ */ i(Q, { selectors: [o] })
|
|
88
74
|
] }),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
|
|
75
|
+
/* @__PURE__ */ n(l, { direction: "row", spacing: 0.5, children: [
|
|
76
|
+
B.map((a, e) => /* @__PURE__ */ i(
|
|
77
|
+
S,
|
|
92
78
|
{
|
|
93
79
|
size: "small",
|
|
94
|
-
variant:
|
|
95
|
-
icon:
|
|
96
|
-
label: /* @__PURE__ */
|
|
97
|
-
|
|
80
|
+
variant: a === r ? "filled" : "outlined",
|
|
81
|
+
icon: T[a] && /* @__PURE__ */ i(E, { icon: T[a] }),
|
|
82
|
+
label: /* @__PURE__ */ n(s, { variant: "caption", textTransform: "capitalize", children: [
|
|
83
|
+
a,
|
|
98
84
|
":",
|
|
99
85
|
" ",
|
|
100
|
-
|
|
86
|
+
a === "all" ? t.length : t.filter((f) => f.type === a).length
|
|
101
87
|
] }),
|
|
102
|
-
onClick: () =>
|
|
88
|
+
onClick: () => I(a)
|
|
103
89
|
},
|
|
104
|
-
|
|
90
|
+
e
|
|
105
91
|
)),
|
|
106
|
-
(
|
|
107
|
-
|
|
92
|
+
(m == null ? void 0 : m.length) > 0 && /* @__PURE__ */ i(
|
|
93
|
+
x,
|
|
108
94
|
{
|
|
109
|
-
title: /* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
95
|
+
title: /* @__PURE__ */ i("div", { onClick: (a) => a.stopPropagation(), children: m.map((a, e) => /* @__PURE__ */ n("div", { children: [
|
|
96
|
+
/* @__PURE__ */ i("span", { style: { textTransform: "capitalize" }, children: a.source.replace(/-/g, " ") }),
|
|
111
97
|
":",
|
|
112
98
|
" ",
|
|
113
|
-
|
|
114
|
-
] },
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
|
|
99
|
+
a.message
|
|
100
|
+
] }, e)) }),
|
|
101
|
+
children: /* @__PURE__ */ i(
|
|
102
|
+
S,
|
|
117
103
|
{
|
|
118
104
|
size: "small",
|
|
119
105
|
variant: "outlined",
|
|
120
|
-
icon: /* @__PURE__ */
|
|
121
|
-
label: /* @__PURE__ */
|
|
122
|
-
|
|
106
|
+
icon: /* @__PURE__ */ i(E, { icon: "material-symbols:timer-outline", color: v.palette.error.main }),
|
|
107
|
+
label: /* @__PURE__ */ n(s, { variant: "caption", textTransform: "capitalize", children: [
|
|
108
|
+
c("annotation.failed"),
|
|
123
109
|
": ",
|
|
124
|
-
|
|
110
|
+
m.length
|
|
125
111
|
] }),
|
|
126
|
-
onClick:
|
|
112
|
+
onClick: h
|
|
127
113
|
}
|
|
128
114
|
)
|
|
129
115
|
}
|
|
130
116
|
)
|
|
131
117
|
] })
|
|
132
118
|
] }),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
Object.keys(
|
|
135
|
-
|
|
119
|
+
/* @__PURE__ */ i(z, {}),
|
|
120
|
+
Object.keys(b).filter((a) => !r || r === "all" || a === r).map((a, e) => /* @__PURE__ */ n(
|
|
121
|
+
$,
|
|
136
122
|
{
|
|
137
|
-
defaultExpanded:
|
|
123
|
+
defaultExpanded: !0,
|
|
138
124
|
sx: {
|
|
139
|
-
marginTop: `${
|
|
125
|
+
marginTop: `${v.spacing(1)} !important`,
|
|
140
126
|
marginBottom: "0 !important",
|
|
141
127
|
"&:before": { height: 0 }
|
|
142
128
|
},
|
|
143
129
|
children: [
|
|
144
|
-
|
|
145
|
-
|
|
130
|
+
r === "all" && /* @__PURE__ */ i(
|
|
131
|
+
j,
|
|
146
132
|
{
|
|
147
|
-
expandIcon: /* @__PURE__ */
|
|
133
|
+
expandIcon: /* @__PURE__ */ i(g, { icon: "ic:baseline-arrow-drop-down" }),
|
|
148
134
|
sx: {
|
|
149
135
|
minHeight: "initial !important",
|
|
150
136
|
mt: 0.5,
|
|
@@ -153,20 +139,19 @@ const AnnotationDetails = ({ enrichRequest, setReady, updatePosition }) => {
|
|
|
153
139
|
"& .MuiAccordionSummary-content": { my: 0.5, mx: 0 },
|
|
154
140
|
"& .MuiAccordionSummary-content.Mui-expanded": { my: 0.5, mx: 0 }
|
|
155
141
|
},
|
|
156
|
-
children: /* @__PURE__ */
|
|
142
|
+
children: /* @__PURE__ */ i(s, { variant: "body1", textTransform: "capitalize", children: a }, a)
|
|
157
143
|
}
|
|
158
144
|
),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ n(_, { sx: { px: 1 }, children: [
|
|
146
|
+
r === "all" && /* @__PURE__ */ i(u, { orientation: "horizontal", sx: { mb: 1 } }),
|
|
147
|
+
/* @__PURE__ */ i(l, { spacing: 1, divider: /* @__PURE__ */ i(u, { orientation: "horizontal", flexItem: !0 }), children: b[a].map((f, D) => /* @__PURE__ */ i(X, { annotation: f }, D)) })
|
|
162
148
|
] })
|
|
163
149
|
]
|
|
164
150
|
},
|
|
165
|
-
|
|
151
|
+
e
|
|
166
152
|
))
|
|
167
153
|
] });
|
|
168
|
-
};
|
|
169
|
-
const AnnotationDetails$1 = memo(AnnotationDetails);
|
|
154
|
+
}, Ei = V(ii);
|
|
170
155
|
export {
|
|
171
|
-
|
|
156
|
+
Ei as default
|
|
172
157
|
};
|
|
@@ -1,59 +1,56 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { Stack, Typography, Chip, IconButton } from "@mui/material";
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import { memo } from "react";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
")"
|
|
24
|
-
] }),
|
|
25
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
26
|
-
annotation.version && /* @__PURE__ */ jsx(Chip, { size: "small", label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
|
-
"v",
|
|
28
|
-
annotation.version.replace(/^v/, "")
|
|
29
|
-
] }) }),
|
|
30
|
-
annotation.link && /* @__PURE__ */ jsx(
|
|
31
|
-
IconButton,
|
|
32
|
-
{
|
|
33
|
-
component: "a",
|
|
34
|
-
href: annotation.link,
|
|
35
|
-
onClick: () => window.open(annotation.link, "_blank", "noreferrer"),
|
|
36
|
-
target: "_blank",
|
|
37
|
-
rel: "noreferrer",
|
|
38
|
-
size: "small",
|
|
39
|
-
children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-open-in-new", fontSize: "small" })
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
annotation.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: annotation.classification })
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as t } from "react/jsx-runtime";
|
|
2
|
+
import { I as o } from "../iconify-BBckr5AQ.js";
|
|
3
|
+
import { Stack as l, Typography as c, Chip as s, IconButton as n } from "@mui/material";
|
|
4
|
+
import a from "./display/icons/Iconified.js";
|
|
5
|
+
import { t as m } from "../utils-C_RX5uMP.js";
|
|
6
|
+
import { memo as p } from "react";
|
|
7
|
+
import d from "./AnnotationBody.js";
|
|
8
|
+
import f from "./ClassificationChip.js";
|
|
9
|
+
const y = ({ annotation: r }) => /* @__PURE__ */ i(l, { direction: "column", spacing: 1, children: [
|
|
10
|
+
/* @__PURE__ */ i(l, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
11
|
+
r.analytic_icon && /* @__PURE__ */ e(
|
|
12
|
+
o,
|
|
13
|
+
{
|
|
14
|
+
style: { alignSelf: "center", filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" },
|
|
15
|
+
icon: r.analytic_icon
|
|
16
|
+
}
|
|
17
|
+
),
|
|
18
|
+
/* @__PURE__ */ e(c, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: r.analytic ?? r.author }),
|
|
19
|
+
r.quantity > 1 && /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", children: [
|
|
20
|
+
"(x",
|
|
21
|
+
r.quantity,
|
|
22
|
+
")"
|
|
43
23
|
] }),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
24
|
+
/* @__PURE__ */ e("div", { style: { flex: 1 } }),
|
|
25
|
+
r.version && /* @__PURE__ */ e(s, { size: "small", label: /* @__PURE__ */ i(t, { children: [
|
|
26
|
+
"v",
|
|
27
|
+
r.version.replace(/^v/, "")
|
|
28
|
+
] }) }),
|
|
29
|
+
r.link && /* @__PURE__ */ e(
|
|
30
|
+
n,
|
|
31
|
+
{
|
|
32
|
+
component: "a",
|
|
33
|
+
href: r.link,
|
|
34
|
+
onClick: () => window.open(r.link, "_blank", "noreferrer"),
|
|
35
|
+
target: "_blank",
|
|
36
|
+
rel: "noreferrer",
|
|
37
|
+
size: "small",
|
|
38
|
+
children: /* @__PURE__ */ e(a, { icon: "ic:baseline-open-in-new", fontSize: "small" })
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
r.classification && /* @__PURE__ */ e(f, { size: "small", classification: r.classification })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ e(d, { annotation: r }),
|
|
44
|
+
/* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", children: r.summary }),
|
|
45
|
+
/* @__PURE__ */ i(l, { direction: "row", children: [
|
|
46
|
+
/* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: m(r.timestamp) }),
|
|
47
|
+
/* @__PURE__ */ e("div", { style: { flex: 1 } }),
|
|
48
|
+
!!r.latency && /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
|
|
49
|
+
Math.round(r.latency),
|
|
50
|
+
"ms"
|
|
53
51
|
] })
|
|
54
|
-
] })
|
|
55
|
-
};
|
|
56
|
-
const AnnotationEntry = memo(AnnotatonEntry);
|
|
52
|
+
] })
|
|
53
|
+
] }), b = p(y);
|
|
57
54
|
export {
|
|
58
|
-
|
|
55
|
+
b as default
|
|
59
56
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../iconify-
|
|
2
|
+
import "../iconify-BBckr5AQ.js";
|
|
3
3
|
import "@mui/material";
|
|
4
|
-
import { A } from "../AnnotationPreview-
|
|
4
|
+
import { A as d } from "../AnnotationPreview-DWRDhxUB.js";
|
|
5
5
|
import "../hooks/useAnnotations.js";
|
|
6
|
-
import "../utils-
|
|
6
|
+
import "../utils-C_RX5uMP.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../index-
|
|
8
|
+
import "../index-E7g8cRyW.js";
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
d as default
|
|
11
11
|
};
|
|
@@ -1,52 +1,31 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip, Chip } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import { getParts, normalizedClassification } from "../utils/classificationParser.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, [classification, config.c12nDef]);
|
|
17
|
-
const normalized = useMemo(() => {
|
|
18
|
-
if (!config.c12nDef || !parts) {
|
|
19
|
-
return classification;
|
|
20
|
-
}
|
|
21
|
-
return normalizedClassification(parts, config.c12nDef, "short", true);
|
|
22
|
-
}, [classification, config.c12nDef, parts]);
|
|
23
|
-
const chipProps = useMemo(() => {
|
|
24
|
-
var _a2, _b2, _c;
|
|
25
|
-
const definedColor = (_c = (_b2 = config.c12nDef) == null ? void 0 : _b2.levels_styles_map[(_a2 = config.c12nDef) == null ? void 0 : _a2.levels_map[parts.lvlIdx]]) == null ? void 0 : _c.color;
|
|
26
|
-
if (THEME_TYPES.includes(definedColor)) {
|
|
27
|
-
return { color: definedColor };
|
|
28
|
-
}
|
|
29
|
-
if (definedColor) {
|
|
30
|
-
return { sx: { color: definedColor } };
|
|
31
|
-
}
|
|
32
|
-
return { color: "default" };
|
|
33
|
-
}, [(_a = config.c12nDef) == null ? void 0 : _a.levels_map, (_b = config.c12nDef) == null ? void 0 : _b.levels_styles_map, parts.lvlIdx]);
|
|
34
|
-
return /* @__PURE__ */ jsx(Tooltip, { title: classification, children: /* @__PURE__ */ jsx(
|
|
35
|
-
Chip,
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as p, Chip as x } from "@mui/material";
|
|
3
|
+
import D from "../hooks/useClueConfig.js";
|
|
4
|
+
import { getParts as C, normalizedClassification as _ } from "../utils/classificationParser.js";
|
|
5
|
+
import v, { useMemo as s, memo as y } from "react";
|
|
6
|
+
const g = ["default", "primary", "secondary", "error", "info", "success", "warning"], A = v.memo(
|
|
7
|
+
({ classification: r, ...n }) => {
|
|
8
|
+
var i, f;
|
|
9
|
+
const { config: e } = D(), t = s(() => e.c12nDef ? C(r, e.c12nDef, "short", !0) : null, [r, e.c12nDef]), d = s(() => !e.c12nDef || !t ? r : _(t, e.c12nDef, "short", !0), [r, e.c12nDef, t]), o = s(() => {
|
|
10
|
+
var c, a, m;
|
|
11
|
+
const l = (m = (a = e.c12nDef) == null ? void 0 : a.levels_styles_map[(c = e.c12nDef) == null ? void 0 : c.levels_map[t.lvlIdx]]) == null ? void 0 : m.color;
|
|
12
|
+
return g.includes(l) ? { color: l } : l ? { sx: { color: l } } : { color: "default" };
|
|
13
|
+
}, [(i = e.c12nDef) == null ? void 0 : i.levels_map, (f = e.c12nDef) == null ? void 0 : f.levels_styles_map, t.lvlIdx]);
|
|
14
|
+
return /* @__PURE__ */ u(p, { title: r, children: /* @__PURE__ */ u(
|
|
15
|
+
x,
|
|
36
16
|
{
|
|
37
|
-
variant:
|
|
38
|
-
label:
|
|
39
|
-
...
|
|
40
|
-
...
|
|
17
|
+
variant: n.variant || "outlined",
|
|
18
|
+
label: d,
|
|
19
|
+
...o,
|
|
20
|
+
...n,
|
|
41
21
|
sx: [
|
|
42
|
-
...Array.isArray(
|
|
43
|
-
...Array.isArray(
|
|
22
|
+
...Array.isArray(o.sx) ? o.sx : [o.sx],
|
|
23
|
+
...Array.isArray(n.sx) ? n.sx : [n.sx]
|
|
44
24
|
]
|
|
45
25
|
}
|
|
46
26
|
) });
|
|
47
27
|
}
|
|
48
|
-
);
|
|
49
|
-
const ClassificationChip$1 = memo(ClassificationChip);
|
|
28
|
+
), M = y(A);
|
|
50
29
|
export {
|
|
51
|
-
|
|
30
|
+
M as default
|
|
52
31
|
};
|
package/components/CountBadge.js
CHANGED
|
@@ -1,34 +1,29 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Badge } from "@mui/material";
|
|
3
|
-
import { forwardRef, cloneElement, Children } from "react";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as l } from "@mui/material";
|
|
3
|
+
import { forwardRef as d, cloneElement as f, Children as g } from "react";
|
|
4
|
+
const b = d(({ children: r, color: a = "primary", count: t, disabled: n, ...e }, o) => n ? f(g.only(r), { ref: o, ...e }) : /* @__PURE__ */ m(
|
|
5
|
+
l,
|
|
6
|
+
{
|
|
7
|
+
ref: o,
|
|
8
|
+
...e,
|
|
9
|
+
badgeContent: t < 100 ? t : "99+",
|
|
10
|
+
color: a,
|
|
11
|
+
sx: (i) => ({
|
|
12
|
+
"& .MuiBadge-badge": {
|
|
13
|
+
backgroundColor: "transparent",
|
|
14
|
+
color: i.palette[a].main,
|
|
15
|
+
fontWeight: "bold",
|
|
16
|
+
right: 0,
|
|
17
|
+
top: 0,
|
|
18
|
+
transform: `translateY(-25%) translateX(${Math.min(Math.ceil(Math.log10(t)), 3) * 10}%)`,
|
|
19
|
+
px: 0,
|
|
20
|
+
fontSize: ".85rem"
|
|
21
|
+
},
|
|
22
|
+
pr: 1.5
|
|
23
|
+
}),
|
|
24
|
+
children: r
|
|
7
25
|
}
|
|
8
|
-
|
|
9
|
-
Badge,
|
|
10
|
-
{
|
|
11
|
-
ref,
|
|
12
|
-
...props,
|
|
13
|
-
badgeContent: count < 100 ? count : "99+",
|
|
14
|
-
color,
|
|
15
|
-
sx: (theme) => ({
|
|
16
|
-
"& .MuiBadge-badge": {
|
|
17
|
-
backgroundColor: "transparent",
|
|
18
|
-
color: theme.palette[color].main,
|
|
19
|
-
fontWeight: "bold",
|
|
20
|
-
right: 0,
|
|
21
|
-
top: 0,
|
|
22
|
-
transform: `translateY(-25%) translateX(${Math.min(Math.ceil(Math.log10(count)), 3) * 10}%)`,
|
|
23
|
-
px: 0,
|
|
24
|
-
fontSize: ".85rem"
|
|
25
|
-
},
|
|
26
|
-
pr: 1.5
|
|
27
|
-
}),
|
|
28
|
-
children
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
});
|
|
26
|
+
));
|
|
32
27
|
export {
|
|
33
|
-
|
|
28
|
+
b as default
|
|
34
29
|
};
|