@cccsaurora/clue-ui 1.2.2-dev.263 → 1.2.2
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 +117 -155
- 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
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { I as u } from "./iconify-BBckr5AQ.js";
|
|
3
|
+
import { useTheme as M, Stack as l, Typography as s, Tooltip as x, Box as A, IconButton as E, CircularProgress as N, Chip as z, Accordion as $, AccordionSummary as j, AccordionDetails as _, Divider as S } from "@mui/material";
|
|
4
|
+
import g from "./components/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 { b as H } from "./ActionForm-DlOXqMUx.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 { g as V } from "./groupBy-br8xmD2R.js";
|
|
13
|
+
import { u as W } from "./useClueTypeConfig-Ct9Ygter.js";
|
|
14
|
+
import { memo as G, useState as J, useMemo as k, useCallback as P, useEffect as Q } from "react";
|
|
15
|
+
import { u as X } from "./index-Dj5C04IX.js";
|
|
16
|
+
import Y from "./components/actions/ExecutePopover.js";
|
|
17
|
+
import Z from "./components/AnnotationEntry.js";
|
|
18
|
+
import q from "./components/ClassificationChip.js";
|
|
19
|
+
import R from "./components/enrichment/EnrichPopover.js";
|
|
20
|
+
function w(i) {
|
|
21
|
+
return i === null;
|
|
22
|
+
}
|
|
23
|
+
const ii = ({ enrichRequest: i, setReady: d, updatePosition: p }) => {
|
|
24
|
+
const v = M(), { t: c } = X(F, (n) => n.i18next), [r, I] = J("all"), y = H((n) => n.enrich), [t, C] = K(
|
|
25
|
+
i == null ? void 0 : i.type,
|
|
26
|
+
i == null ? void 0 : i.value,
|
|
27
|
+
i == null ? void 0 : i.classification,
|
|
28
|
+
{ skipEnrichment: !0 }
|
|
29
|
+
), m = L(i == null ? void 0 : i.value), B = k(
|
|
30
|
+
() => ["all", ...W((t ?? []).map((n) => n.type))],
|
|
31
|
+
[t]
|
|
32
|
+
), b = k(() => V(t ?? [], "type"), [t]), h = P(async () => {
|
|
33
|
+
await y(i.type, i.value, {
|
|
34
|
+
classification: i.classification,
|
|
35
|
+
timeout: 15,
|
|
36
|
+
force: !0
|
|
37
|
+
});
|
|
38
|
+
}, [i, y]);
|
|
39
|
+
return Q(() => {
|
|
40
|
+
d && (d(i && !w(t)), p == null || p());
|
|
41
|
+
}, [t, i, d, p]), i && !w(t) && /* @__PURE__ */ a(l, { direction: "column", sx: { p: 1, width: "100%" }, spacing: 1, children: [
|
|
42
|
+
/* @__PURE__ */ a(l, { spacing: 1, children: [
|
|
43
|
+
/* @__PURE__ */ a(l, { direction: "row", spacing: 1, children: [
|
|
44
|
+
/* @__PURE__ */ a(l, { children: [
|
|
45
|
+
/* @__PURE__ */ a(l, { direction: "row", spacing: 1, children: [
|
|
46
|
+
/* @__PURE__ */ o(s, { variant: "body1", fontWeight: "bold", children: "Clue" }),
|
|
47
|
+
i.classification && /* @__PURE__ */ o(q, { size: "small", classification: i.classification })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ a(s, { variant: "caption", color: "text.secondary", children: [
|
|
50
|
+
i.type.toLocaleUpperCase(),
|
|
51
|
+
" ",
|
|
52
|
+
c("enrichment")
|
|
53
|
+
] })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ o("div", { style: { flex: 1 } }),
|
|
56
|
+
/* @__PURE__ */ o(x, { title: c("refresh"), children: /* @__PURE__ */ o(A, { sx: { alignSelf: "center", m: -1 }, children: /* @__PURE__ */ o(E, { onClick: () => h(), disabled: C, children: C ? /* @__PURE__ */ o(N, { variant: "indeterminate", size: 20 }) : /* @__PURE__ */ o(g, { icon: "ic:baseline-replay", fontSize: "small" }) }) }) }),
|
|
57
|
+
/* @__PURE__ */ o(x, { title: c("clipboard"), children: /* @__PURE__ */ o(
|
|
58
|
+
E,
|
|
59
|
+
{
|
|
60
|
+
sx: { alignSelf: "center", m: -1 },
|
|
61
|
+
onClick: () => {
|
|
62
|
+
navigator.clipboard.writeText(i.value), U(
|
|
63
|
+
new CustomEvent(O, {
|
|
64
|
+
detail: {
|
|
65
|
+
message: `${i.value} ${c("clipboard.success")}`,
|
|
66
|
+
level: "success"
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
},
|
|
71
|
+
children: /* @__PURE__ */ o(g, { icon: "ic:outline-assignment", fontSize: "small" })
|
|
72
|
+
}
|
|
73
|
+
) }),
|
|
74
|
+
/* @__PURE__ */ o(R, { selector: i }),
|
|
75
|
+
/* @__PURE__ */ o(Y, { selectors: [i] })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ a(l, { direction: "row", spacing: 0.5, children: [
|
|
78
|
+
B.map((n, e) => /* @__PURE__ */ o(
|
|
79
|
+
z,
|
|
80
|
+
{
|
|
81
|
+
size: "small",
|
|
82
|
+
variant: n === r ? "filled" : "outlined",
|
|
83
|
+
icon: T[n] && /* @__PURE__ */ o(u, { icon: T[n] }),
|
|
84
|
+
label: /* @__PURE__ */ a(s, { variant: "caption", textTransform: "capitalize", children: [
|
|
85
|
+
n,
|
|
86
|
+
":",
|
|
87
|
+
" ",
|
|
88
|
+
n === "all" ? t.length : t.filter((f) => f.type === n).length
|
|
89
|
+
] }),
|
|
90
|
+
onClick: () => I(n)
|
|
91
|
+
},
|
|
92
|
+
e
|
|
93
|
+
)),
|
|
94
|
+
(m == null ? void 0 : m.length) > 0 && /* @__PURE__ */ o(
|
|
95
|
+
x,
|
|
96
|
+
{
|
|
97
|
+
title: /* @__PURE__ */ o("div", { onClick: (n) => n.stopPropagation(), children: m.map((n, e) => /* @__PURE__ */ a("div", { children: [
|
|
98
|
+
/* @__PURE__ */ o("span", { style: { textTransform: "capitalize" }, children: n.source.replace(/-/g, " ") }),
|
|
99
|
+
":",
|
|
100
|
+
" ",
|
|
101
|
+
n.message
|
|
102
|
+
] }, e)) }),
|
|
103
|
+
children: /* @__PURE__ */ o(
|
|
104
|
+
z,
|
|
105
|
+
{
|
|
106
|
+
size: "small",
|
|
107
|
+
variant: "outlined",
|
|
108
|
+
icon: /* @__PURE__ */ o(u, { icon: "material-symbols:timer-outline", color: v.palette.error.main }),
|
|
109
|
+
label: /* @__PURE__ */ a(s, { variant: "caption", textTransform: "capitalize", children: [
|
|
110
|
+
c("annotation.failed"),
|
|
111
|
+
": ",
|
|
112
|
+
m.length
|
|
113
|
+
] }),
|
|
114
|
+
onClick: h
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ o(A, {}),
|
|
122
|
+
Object.keys(b).filter((n) => !r || r === "all" || n === r).map((n, e) => /* @__PURE__ */ a(
|
|
123
|
+
$,
|
|
124
|
+
{
|
|
125
|
+
defaultExpanded: !0,
|
|
126
|
+
sx: {
|
|
127
|
+
marginTop: `${v.spacing(1)} !important`,
|
|
128
|
+
marginBottom: "0 !important",
|
|
129
|
+
"&:before": { height: 0 }
|
|
130
|
+
},
|
|
131
|
+
children: [
|
|
132
|
+
r === "all" && /* @__PURE__ */ o(
|
|
133
|
+
j,
|
|
134
|
+
{
|
|
135
|
+
expandIcon: /* @__PURE__ */ o(g, { icon: "ic:baseline-arrow-drop-down" }),
|
|
136
|
+
sx: {
|
|
137
|
+
minHeight: "initial !important",
|
|
138
|
+
mt: 0.5,
|
|
139
|
+
mb: 0,
|
|
140
|
+
px: 1,
|
|
141
|
+
"& .MuiAccordionSummary-content": { my: 0.5, mx: 0 },
|
|
142
|
+
"& .MuiAccordionSummary-content.Mui-expanded": { my: 0.5, mx: 0 }
|
|
143
|
+
},
|
|
144
|
+
children: /* @__PURE__ */ o(s, { variant: "body1", textTransform: "capitalize", children: n }, n)
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
/* @__PURE__ */ a(_, { sx: { px: 1 }, children: [
|
|
148
|
+
r === "all" && /* @__PURE__ */ o(S, { orientation: "horizontal", sx: { mb: 1 } }),
|
|
149
|
+
/* @__PURE__ */ o(l, { spacing: 1, divider: /* @__PURE__ */ o(S, { orientation: "horizontal", flexItem: !0 }), children: b[n].map((f, D) => /* @__PURE__ */ o(Z, { annotation: f }, D)) })
|
|
150
|
+
] })
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
e
|
|
154
|
+
))
|
|
155
|
+
] });
|
|
156
|
+
}, hi = G(ii);
|
|
157
|
+
export {
|
|
158
|
+
hi as A,
|
|
159
|
+
w as i
|
|
160
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsxs as C, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { I as H } from "./iconify-BBckr5AQ.js";
|
|
3
|
+
import { useTheme as k, Popper as V, Fade as j, Paper as O, Stack as w, Typography as y, Divider as W } from "@mui/material";
|
|
4
|
+
import F from "./components/AnnotationDetailPopover.js";
|
|
5
|
+
import L from "./hooks/useAnnotations.js";
|
|
6
|
+
import { t as M } from "./utils-DmwSUrum.js";
|
|
7
|
+
import { useState as v, useRef as Y, useCallback as x, useEffect as Z, useMemo as _ } from "react";
|
|
8
|
+
import { c as B, u as G } from "./index-Dj5C04IX.js";
|
|
9
|
+
import { SHOW_EVENT_ID as g, HIDE_EVENT_ID as D } from "./data/event.js";
|
|
10
|
+
import { safeDispatchEvent as A, safeAddEventListener as S } from "./utils/window.js";
|
|
11
|
+
import { i as J } from "./AnnotationDetails-Bk-p0F6h.js";
|
|
12
|
+
const b = B(null), rt = ({ children: c }) => {
|
|
13
|
+
const [l, e] = v(null), [p, i] = v(null), [r, d] = v(null), [u, m] = v(null), [f, t] = v({}), a = Y(null), P = x((s, o, z, N) => {
|
|
14
|
+
A(
|
|
15
|
+
new CustomEvent(g, {
|
|
16
|
+
detail: {
|
|
17
|
+
type: s,
|
|
18
|
+
anchorEl: o,
|
|
19
|
+
value: z,
|
|
20
|
+
options: N
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
}, []), h = x(
|
|
25
|
+
(s, o) => {
|
|
26
|
+
A(
|
|
27
|
+
new CustomEvent(D, {
|
|
28
|
+
detail: {
|
|
29
|
+
type: s,
|
|
30
|
+
value: o
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
[]
|
|
37
|
+
), E = x((s) => {
|
|
38
|
+
const { detail: o } = s;
|
|
39
|
+
e(o.type), d(o.value), o.options && (o.options.content && m(o.options.content), o.options.onClose && (a.current = o.options.onClose), o.options.popoverProps && t(o.options.popoverProps)), i(o.anchorEl);
|
|
40
|
+
}, []), I = x(
|
|
41
|
+
(s) => {
|
|
42
|
+
const { detail: o } = s;
|
|
43
|
+
r && (o.type !== l || r.type !== o.value.type || r.value !== o.value.value) || (e(null), i(null), d(null), m(null), t({}), a.current = null);
|
|
44
|
+
},
|
|
45
|
+
[r, l]
|
|
46
|
+
);
|
|
47
|
+
Z(() => {
|
|
48
|
+
const s = S(g, E), o = S(D, I);
|
|
49
|
+
return () => {
|
|
50
|
+
s(), o();
|
|
51
|
+
};
|
|
52
|
+
}, [E, I]);
|
|
53
|
+
const T = _(
|
|
54
|
+
() => ({
|
|
55
|
+
showInfo: P,
|
|
56
|
+
closeInfo: h,
|
|
57
|
+
__detailsContent: u
|
|
58
|
+
}),
|
|
59
|
+
[h, u, P]
|
|
60
|
+
);
|
|
61
|
+
return /* @__PURE__ */ C(b.Provider, { value: T, children: [
|
|
62
|
+
c,
|
|
63
|
+
/* @__PURE__ */ n(
|
|
64
|
+
F,
|
|
65
|
+
{
|
|
66
|
+
...f,
|
|
67
|
+
anchorEl: p,
|
|
68
|
+
open: !!p && l === "details",
|
|
69
|
+
enrichRequest: r,
|
|
70
|
+
onClose: () => {
|
|
71
|
+
a.current ? a.current() : h("details", r);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ n(
|
|
76
|
+
K,
|
|
77
|
+
{
|
|
78
|
+
...f,
|
|
79
|
+
anchorEl: p,
|
|
80
|
+
open: !!p && !J(l) && l !== "details",
|
|
81
|
+
annotationType: l,
|
|
82
|
+
enrichRequest: r
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] });
|
|
86
|
+
}, K = ({ annotationType: c, anchorEl: l, enrichRequest: e, open: p, ...i }) => {
|
|
87
|
+
const r = k(), d = G(b, (t) => t.__detailsContent), [u] = L(e == null ? void 0 : e.type, e == null ? void 0 : e.value, e == null ? void 0 : e.classification), m = _(
|
|
88
|
+
() => c === "actionResults" ? [] : u.filter((t) => t.type === c),
|
|
89
|
+
[c, u]
|
|
90
|
+
), f = x((t) => {
|
|
91
|
+
try {
|
|
92
|
+
const a = parseInt(window.getComputedStyle(t, null).getPropertyValue("z-index"));
|
|
93
|
+
return isNaN(a) ? f(t.parentElement) : (a + 2).toString();
|
|
94
|
+
} catch {
|
|
95
|
+
return "2";
|
|
96
|
+
}
|
|
97
|
+
}, []);
|
|
98
|
+
return !m.length && !d ? null : /* @__PURE__ */ n(
|
|
99
|
+
V,
|
|
100
|
+
{
|
|
101
|
+
...i,
|
|
102
|
+
open: p,
|
|
103
|
+
anchorEl: l,
|
|
104
|
+
placement: "bottom-start",
|
|
105
|
+
sx: [{ zIndex: f(l) }, ...Array.isArray(i.sx) ? i.sx : [i.sx]],
|
|
106
|
+
children: /* @__PURE__ */ n(j, { in: !!l, children: /* @__PURE__ */ n(O, { sx: { overflowY: "auto", maxWidth: "500px", boxShadow: r.shadows[2] }, children: /* @__PURE__ */ n(w, { direction: "column", sx: { p: 1 }, spacing: 1, divider: /* @__PURE__ */ n(W, { orientation: "horizontal" }), children: d ?? m.map((t) => /* @__PURE__ */ C(
|
|
107
|
+
w,
|
|
108
|
+
{
|
|
109
|
+
direction: "column",
|
|
110
|
+
spacing: 1,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ C(w, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
113
|
+
t.analytic_icon && /* @__PURE__ */ n(
|
|
114
|
+
H,
|
|
115
|
+
{
|
|
116
|
+
icon: t.analytic_icon,
|
|
117
|
+
style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" }
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ n(y, { variant: "body1", sx: { textTransform: "capitalize" }, children: t.analytic ?? t.author }),
|
|
121
|
+
/* @__PURE__ */ C(y, { variant: "caption", color: "text.secondary", children: [
|
|
122
|
+
"(",
|
|
123
|
+
M(t.timestamp),
|
|
124
|
+
")"
|
|
125
|
+
] })
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ n(y, { variant: "body2", children: t.summary }),
|
|
128
|
+
/* @__PURE__ */ n(y, { variant: "caption", color: "text.secondary", children: t.value })
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
t.analytic + t.author + t.value + t.link + t.summary + t.timestamp
|
|
132
|
+
)) }) }) })
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
export {
|
|
137
|
+
K as A,
|
|
138
|
+
b as C,
|
|
139
|
+
rt as a
|
|
140
|
+
};
|