@cccsaurora/clue-ui 1.4.2 → 1.5.0-dev.454
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-CbLz66Rk.js +6099 -0
- package/AnnotationDetails-CdNvyJl7.js +176 -0
- package/AnnotationPreview-C6a3qRFG.js +188 -0
- package/ClueEnrichContext-0eVIgvZp.js +594 -0
- package/FlexOne-BSYAhhtG.js +9 -0
- package/_MapCache-kuEY_iOH.js +220 -0
- package/_Set-BrSMTlHn.js +6 -0
- package/_Uint8Array-OPpgYQj7.js +123 -0
- package/_arrayIncludes-BNqL-9ZP.js +31 -0
- package/_arrayPush-CBkQqaE_.js +10 -0
- package/_baseAssignValue-CNUVPOBW.js +16 -0
- package/_baseClone-9FaRd1R2.js +287 -0
- package/_baseExtremum-wOGT4Dgw.js +18 -0
- package/_baseFlatten-Co6QHDlG.js +92 -0
- package/_baseGet-Cmp6FztG.js +109 -0
- package/_baseGetTag-Hj-0NTYF.js +44 -0
- package/_baseIsEqual-1CpU47TZ.js +211 -0
- package/_baseIteratee-BN7Vbe5g.js +126 -0
- package/_baseRest-BZ_hQ9PC.js +8 -0
- package/_baseSlice-GAv_YFTT.js +20 -0
- package/_baseSum-D0WC1dN0.js +13 -0
- package/_baseUniq-BnvS3JHL.js +63 -0
- package/_cacheHas-_aF2y2Xv.js +25 -0
- package/_commonjsHelpers-CUmg6egw.js +6 -0
- package/_createAggregator-BUZrP_is.js +63 -0
- package/_defineProperty-DolZLKmv.js +12 -0
- package/_getPrototype-Bb4gm-5m.js +5 -0
- package/_getTag-CML_cXiN.js +105 -0
- package/_isIterateeCall-B1IFEqVv.js +17 -0
- package/_setToArray-CqyqC8ib.js +10 -0
- package/cloneDeep-l3UkXG5M.js +8 -0
- package/components/AnnotationBody.js +49 -35
- package/components/AnnotationDetailPopover.js +39 -30
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +46 -24
- package/components/CountBadge.js +31 -26
- package/components/EnrichedCard.js +110 -97
- package/components/EnrichedChip.js +130 -105
- package/components/EnrichedTypography.js +133 -107
- package/components/ErrorBoundary.js +28 -24
- package/components/RetryFailedEnrichments.js +10 -9
- package/components/SourcePicker.js +57 -49
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +75 -59
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +39 -23
- package/components/actions/formats/FileResult.js +86 -59
- package/components/actions/formats/index.js +29 -25
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +111 -91
- package/components/display/graph/elements/NodeTag.js +15 -13
- package/components/display/graph/index.js +261 -202
- package/components/display/graph/visualizations/Leaf.js +89 -70
- package/components/display/graph/visualizations/cloud/index.js +98 -81
- package/components/display/graph/visualizations/icons/BaseIcon.js +26 -21
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +14 -13
- package/components/display/graph/visualizations/panels/NodePanel.js +10 -8
- package/components/display/graph/visualizations/tree/BundleLine.js +108 -81
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +408 -306
- package/components/display/icons/Iconified.js +27 -12
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +8678 -5770
- package/components/enrichment/EnrichPopover.js +54 -46
- package/components/fetchers/Fetcher.js +166 -123
- package/components/fetchers/FetcherResultView.js +31 -27
- package/components/fetchers/PreviewModal.js +17 -16
- package/components/fetchers/StatusChip.js +21 -17
- package/components/group/Entry.js +13 -11
- package/components/group/Group.js +13 -10
- package/components/group/GroupControl.js +76 -65
- package/components/stats/QueryStatus.js +45 -32
- package/countBy-Bqcp3VCs.js +14 -0
- package/data/event.js +6 -4
- package/database/globals.js +2 -2
- package/database/index.js +3 -3
- package/database/replication.js +4 -4
- package/get-CdMThM8x.js +8 -0
- package/groupBy-BVV07EGQ.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 +36 -24
- package/hooks/ClueEnrichContext.js +11 -11
- package/hooks/ClueFetcherContext.js +83 -56
- package/hooks/ClueGroupContext.js +17 -14
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +13 -11
- package/hooks/ClueUIPluginContext.js +50 -36
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +3 -3
- package/hooks/useAnnotations.js +48 -32
- package/hooks/useClue.js +6 -4
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +6 -4
- package/hooks/useClueTypeConfig.js +49 -24
- package/hooks/useClueUIPlugins.js +8 -7
- package/hooks/useComparator.js +722 -435
- package/hooks/useErrors.js +22 -18
- package/hooks/useFetcherResult.js +33 -24
- package/hooks/useMyHighlights.js +66 -36
- package/hooks/useMyLocalStorage.js +66 -37
- package/iconify-DJxl6dC-.js +1789 -0
- package/icons/Action.js +66 -49
- package/icons/Assessment.js +85 -69
- package/icons/Context.js +77 -63
- package/icons/Opinion.js +76 -60
- package/icons/iconMap.js +2 -2
- package/identity-CPGTqrE4.js +6 -0
- package/index-CDrC9oSE.js +1172 -0
- package/index-CVUD9o3t.js +15768 -0
- package/index-DUEubgWN.js +464 -0
- package/index-DpJxD74E.js +3272 -0
- package/index-IKI1G5v-.js +9314 -0
- package/index-_gpzM2Px.js +702 -0
- package/isArguments-CuYlEuhP.js +27 -0
- package/isArray-RJPfgWqI.js +4 -0
- package/isEmpty-BE656RUK.js +30 -0
- package/isNil-CIubwp4T.js +6 -0
- package/isObject-FTY-5JQX.js +7 -0
- package/isObjectLike-CeENW9FN.js +6 -0
- package/isSymbol-D_H4HPZQ.js +9 -0
- package/last-CUCl67Im.js +7 -0
- package/main.js +62 -62
- package/maxBy-BjjQmX5t.js +8 -0
- package/package.json +1 -1
- package/plugins/ClueUIPlugin.js +163 -96
- package/plugins/file/index.js +15 -15
- package/plugins/graph/index.js +29 -26
- package/plugins/image/index.js +28 -24
- package/plugins/json/index.js +21 -21
- package/plugins/markdown/index.js +18 -18
- package/plugins/registry.js +6 -6
- package/plugins/store.js +4 -4
- package/plugins/test/index.js +17 -17
- package/plugins/utils.js +13 -12
- package/replication-kdsH0l7f.js +11779 -0
- package/sessionStorage-B68y-wnE.js +140 -0
- package/sortBy-B8JVsLQY.js +95 -0
- package/store-DHP48fQB.js +2165 -0
- package/sumBy-D-HCzM2i.js +8 -0
- package/text/Frequency.js +42 -23
- package/toFinite-meZTg4Su.js +16 -0
- package/toNumber-B5JaA1vX.js +39 -0
- package/uniq-CahZPAwp.js +7 -0
- package/utils/chain.js +92 -65
- package/utils/classificationParser.js +519 -256
- package/utils/constants.js +37 -11
- 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 +7 -7
- package/utils/time.js +447 -427
- package/utils/utils.js +10 -10
- package/utils/window.js +21 -10
- package/utils-CEySTPtg.js +224 -0
- package/ActionForm-DjyNwVzM.js +0 -4403
- package/AnnotationDetails-BvPv3_pR.js +0 -160
- package/AnnotationPreview-C0JN_lr0.js +0 -140
- package/ClueEnrichContext-CNbh-qiy.js +0 -452
- package/FlexOne-BXWFOd1T.js +0 -6
- package/_MapCache-DRK-s2eK.js +0 -179
- package/_Set-DrS_bbSV.js +0 -6
- package/_Uint8Array-D9R2N9Lp.js +0 -98
- package/_arrayIncludes-Dcl_29E6.js +0 -25
- package/_arrayPush-DBJIuK2V.js +0 -8
- package/_baseAssignValue-Bx1cxHj5.js +0 -12
- package/_baseClone-DRhywkxm.js +0 -211
- package/_baseExtremum-DodEaEyF.js +0 -16
- package/_baseFlatten-CD9NgrYE.js +0 -72
- package/_baseGet-bVwDaGrA.js +0 -80
- package/_baseGetTag-CxDaTem-.js +0 -25
- package/_baseIsEqual-C-FKsm1J.js +0 -150
- package/_baseIteratee-D0FhC5bC.js +0 -95
- package/_baseRest-D_eW2E0d.js +0 -8
- package/_baseSlice-M5RKzt1A.js +0 -10
- package/_baseSum-wEbgNeUs.js +0 -10
- package/_baseUniq-D3N8igOm.js +0 -41
- package/_cacheHas-Wgl-hw34.js +0 -22
- package/_commonjsHelpers-C6fGbg64.js +0 -6
- package/_createAggregator-BVj8IAuF.js +0 -53
- package/_defineProperty-BZU4WKA3.js +0 -11
- package/_getPrototype-BGBCg-aX.js +0 -5
- package/_getTag-B7R9qBo7.js +0 -73
- package/_isIterateeCall-Dm0VTAYy.js +0 -13
- package/_setToArray-Ck4YZu0Z.js +0 -9
- package/cloneDeep-fV59zwUf.js +0 -8
- package/countBy-B3rNuG4T.js +0 -8
- package/get-Bil3mzRD.js +0 -8
- package/groupBy-CrJC7sGa.js +0 -8
- package/iconify-Ptb5dTKy.js +0 -1270
- package/identity-ByMq8VxU.js +0 -6
- package/index-BH-gBhtO.js +0 -2282
- package/index-BM9Sve5T.js +0 -571
- package/index-Cj4d5cGz.js +0 -357
- package/index-D3Dwn-8x.js +0 -6464
- package/index-Dh2PP9h8.js +0 -11747
- package/index-DoFpWPHo.js +0 -975
- package/isArguments-BWcXOE6a.js +0 -24
- package/isArray-WzO_os3q.js +0 -4
- package/isEmpty-DKxrY-_M.js +0 -22
- package/isNil-CjWwlQS3.js +0 -6
- package/isObject-B53jY8Qg.js +0 -7
- package/isObjectLike-CYbdrIBr.js +0 -6
- package/isSymbol-DE1Kcy2M.js +0 -9
- package/last-7CdUxN0r.js +0 -7
- package/maxBy-BOWDkL_D.js +0 -8
- package/replication-WkKbPdwG.js +0 -8453
- package/sessionStorage-DFMae61b.js +0 -90
- package/sortBy-BHe812lF.js +0 -74
- package/store-D4aFUWxi.js +0 -1169
- package/sumBy-B7f_bP_k.js +0 -8
- package/toFinite-CBrE65MP.js +0 -14
- package/toNumber-CxmWey0f.js +0 -31
- package/uniq-B4UZ671_.js +0 -7
- package/utils-SpTOhPYl.js +0 -147
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { I as A } from "./iconify-Ptb5dTKy.js";
|
|
3
|
-
import { useTheme as $, Stack as l, Typography as s, Tooltip as x, Box as E, IconButton as u, CircularProgress as j, Chip as z, Accordion as _, AccordionSummary as O, AccordionDetails as F, Divider as S } from "@mui/material";
|
|
4
|
-
import g from "./components/display/icons/Iconified.js";
|
|
5
|
-
import { SNACKBAR_EVENT_ID as H } from "./data/event.js";
|
|
6
|
-
import { ClueComponentContext as K } from "./hooks/ClueComponentContext.js";
|
|
7
|
-
import { f as T } from "./ActionForm-DjyNwVzM.js";
|
|
8
|
-
import L from "./hooks/useAnnotations.js";
|
|
9
|
-
import U from "./hooks/useErrors.js";
|
|
10
|
-
import { ICON_MAP as k } from "./icons/iconMap.js";
|
|
11
|
-
import { safeDispatchEvent as V } from "./utils/window.js";
|
|
12
|
-
import { g as W } from "./groupBy-CrJC7sGa.js";
|
|
13
|
-
import { u as G } from "./uniq-B4UZ671_.js";
|
|
14
|
-
import { memo as J, useState as P, useMemo as w, useCallback as Q, useEffect as X } from "react";
|
|
15
|
-
import { a as Y } from "./index-BM9Sve5T.js";
|
|
16
|
-
import Z from "./components/actions/ExecutePopover.js";
|
|
17
|
-
import q from "./components/AnnotationEntry.js";
|
|
18
|
-
import R from "./components/ClassificationChip.js";
|
|
19
|
-
import ii from "./components/enrichment/EnrichPopover.js";
|
|
20
|
-
function I(i) {
|
|
21
|
-
return i === null;
|
|
22
|
-
}
|
|
23
|
-
const oi = ({ enrichRequest: i, setReady: d, updatePosition: p }) => {
|
|
24
|
-
const v = $(), { t: c } = Y(K, (n) => n.i18next), [r, B] = P("all"), y = T((n) => n.enrich), D = T((n) => n.ready), [t, C] = L(
|
|
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 = U(i == null ? void 0 : i.value), M = w(
|
|
30
|
-
() => ["all", ...G((t ?? []).map((n) => n.type))],
|
|
31
|
-
[t]
|
|
32
|
-
), b = w(() => W(t ?? [], "type"), [t]), h = Q(async () => {
|
|
33
|
-
await y(i.type, i.value, {
|
|
34
|
-
classification: i.classification,
|
|
35
|
-
timeout: 15,
|
|
36
|
-
force: !0
|
|
37
|
-
});
|
|
38
|
-
}, [i, y]);
|
|
39
|
-
return X(() => {
|
|
40
|
-
d && (d(i && !I(t)), p == null || p());
|
|
41
|
-
}, [t, i, d, p]), i && !I(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(R, { 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(E, { sx: { alignSelf: "center", m: -1 }, children: /* @__PURE__ */ o(u, { onClick: () => h(), disabled: C || !D, children: C ? /* @__PURE__ */ o(j, { variant: "indeterminate", size: 20 }) : /* @__PURE__ */ o(g, { icon: "ic:baseline-replay", fontSize: "small" }) }) }) }),
|
|
57
|
-
/* @__PURE__ */ o(x, { title: c("clipboard"), children: /* @__PURE__ */ o(
|
|
58
|
-
u,
|
|
59
|
-
{
|
|
60
|
-
sx: { alignSelf: "center", m: -1 },
|
|
61
|
-
onClick: () => {
|
|
62
|
-
navigator.clipboard.writeText(i.value), V(
|
|
63
|
-
new CustomEvent(H, {
|
|
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(ii, { selector: i }),
|
|
75
|
-
/* @__PURE__ */ o(Z, { selectors: [i] })
|
|
76
|
-
] }),
|
|
77
|
-
/* @__PURE__ */ a(l, { direction: "row", spacing: 0.5, children: [
|
|
78
|
-
M.map((n, e) => /* @__PURE__ */ o(
|
|
79
|
-
z,
|
|
80
|
-
{
|
|
81
|
-
size: "small",
|
|
82
|
-
variant: n === r ? "filled" : "outlined",
|
|
83
|
-
icon: k[n] && /* @__PURE__ */ o(A, { icon: k[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: () => B(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(A, { 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(E, {}),
|
|
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
|
-
O,
|
|
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(F, { 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, N) => /* @__PURE__ */ o(q, { annotation: f }, N)) })
|
|
150
|
-
] })
|
|
151
|
-
]
|
|
152
|
-
},
|
|
153
|
-
e
|
|
154
|
-
))
|
|
155
|
-
] });
|
|
156
|
-
}, Ai = J(oi);
|
|
157
|
-
export {
|
|
158
|
-
Ai as A,
|
|
159
|
-
I as i
|
|
160
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { jsxs as C, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { I as H } from "./iconify-Ptb5dTKy.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-SpTOhPYl.js";
|
|
7
|
-
import { useState as v, useRef as Y, useCallback as x, useEffect as Z, useMemo as _ } from "react";
|
|
8
|
-
import { c as B, a as G } from "./index-BM9Sve5T.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-BvPv3_pR.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
|
-
};
|