@cccsaurora/clue-ui 1.3.0-dev.404 → 1.3.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-CHOSKfvu.js +4403 -0
- package/AnnotationDetails-Bqq6Ymmg.js +160 -0
- package/AnnotationPreview-CqXmC-j8.js +140 -0
- package/ClueEnrichContext-DL6aGe1k.js +432 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_MapCache-DRK-s2eK.js +179 -0
- package/_Set-DrS_bbSV.js +6 -0
- package/_Uint8Array-D9R2N9Lp.js +98 -0
- package/_arrayIncludes-Dcl_29E6.js +25 -0
- package/_arrayPush-DBJIuK2V.js +8 -0
- package/_baseAssignValue-Bx1cxHj5.js +12 -0
- package/_baseClone-DRhywkxm.js +211 -0
- package/_baseExtremum-DodEaEyF.js +16 -0
- package/_baseFlatten-CD9NgrYE.js +72 -0
- package/_baseGet-bVwDaGrA.js +80 -0
- package/_baseGetTag-CxDaTem-.js +25 -0
- package/_baseIsEqual-C-FKsm1J.js +150 -0
- package/_baseIteratee-D0FhC5bC.js +95 -0
- package/_baseRest-D_eW2E0d.js +8 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-D3N8igOm.js +41 -0
- package/_cacheHas-Wgl-hw34.js +22 -0
- package/_commonjsHelpers-C6fGbg64.js +6 -0
- package/_createAggregator-BVj8IAuF.js +53 -0
- package/_defineProperty-BZU4WKA3.js +11 -0
- package/_getPrototype-BGBCg-aX.js +5 -0
- package/_getTag-B7R9qBo7.js +73 -0
- package/_isIterateeCall-Dm0VTAYy.js +13 -0
- package/_setToArray-Ck4YZu0Z.js +9 -0
- package/cloneDeep-fV59zwUf.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 +25 -29
- 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 +70 -89
- 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 +123 -166
- package/components/fetchers/FetcherResultView.js +27 -31
- package/components/fetchers/PreviewModal.js +16 -17
- 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 +32 -45
- package/countBy-B3rNuG4T.js +8 -0
- package/data/event.js +4 -6
- package/database/globals.js +2 -2
- package/database/index.js +3 -3
- package/database/replication.js +4 -4
- package/get-Bil3mzRD.js +8 -0
- package/groupBy-CrJC7sGa.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 +23 -35
- package/hooks/ClueEnrichContext.js +11 -11
- package/hooks/ClueFetcherContext.js +56 -83
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +11 -13
- package/hooks/ClueUIPluginContext.js +35 -49
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +3 -3
- package/hooks/useAnnotations.js +32 -48
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +4 -6
- package/hooks/useClueTypeConfig.js +24 -49
- package/hooks/useClueUIPlugins.js +7 -8
- 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-Ptb5dTKy.js +1270 -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-BH-gBhtO.js +2282 -0
- package/index-BM9Sve5T.js +571 -0
- package/index-Cj4d5cGz.js +357 -0
- package/index-Dh2PP9h8.js +11747 -0
- package/index-DoFpWPHo.js +975 -0
- package/index-DzVIklWY.js +6464 -0
- package/isArguments-BWcXOE6a.js +24 -0
- package/isArray-WzO_os3q.js +4 -0
- package/isEmpty-DKxrY-_M.js +22 -0
- package/isNil-CjWwlQS3.js +6 -0
- package/isObject-B53jY8Qg.js +7 -0
- package/isObjectLike-CYbdrIBr.js +6 -0
- package/isSymbol-DE1Kcy2M.js +9 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +62 -62
- package/maxBy-BOWDkL_D.js +8 -0
- package/package.json +1 -1
- package/plugins/ClueUIPlugin.js +96 -163
- package/plugins/file/index.js +15 -15
- package/plugins/graph/index.js +26 -29
- package/plugins/image/index.js +24 -28
- 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 +12 -13
- package/replication-WkKbPdwG.js +8453 -0
- package/sessionStorage-DFMae61b.js +90 -0
- package/sortBy-BHe812lF.js +74 -0
- package/store-DClHBq7r.js +1169 -0
- package/sumBy-B7f_bP_k.js +8 -0
- package/text/Frequency.js +23 -42
- package/toFinite-CBrE65MP.js +14 -0
- package/toNumber-CxmWey0f.js +31 -0
- package/uniq-B4UZ671_.js +7 -0
- package/utils/chain.js +65 -92
- package/utils/classificationParser.js +256 -519
- package/utils/constants.js +11 -37
- 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 +7 -7
- package/utils/time.js +427 -447
- package/utils/utils.js +10 -10
- package/utils/window.js +10 -21
- package/utils-SpTOhPYl.js +147 -0
- package/ActionForm-CqKcnDWC.js +0 -6099
- package/AnnotationDetails-BlPd3T8k.js +0 -176
- package/AnnotationPreview-Bl447SKT.js +0 -188
- package/ClueEnrichContext-B3YrTCaJ.js +0 -567
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_MapCache-kuEY_iOH.js +0 -220
- package/_Set-BrSMTlHn.js +0 -6
- package/_Uint8Array-OPpgYQj7.js +0 -123
- package/_arrayIncludes-BNqL-9ZP.js +0 -31
- package/_arrayPush-CBkQqaE_.js +0 -10
- package/_baseAssignValue-CNUVPOBW.js +0 -16
- package/_baseClone-9FaRd1R2.js +0 -287
- package/_baseExtremum-wOGT4Dgw.js +0 -18
- package/_baseFlatten-Co6QHDlG.js +0 -92
- package/_baseGet-Cmp6FztG.js +0 -109
- package/_baseGetTag-Hj-0NTYF.js +0 -44
- package/_baseIsEqual-1CpU47TZ.js +0 -211
- package/_baseIteratee-BN7Vbe5g.js +0 -126
- package/_baseRest-BZ_hQ9PC.js +0 -8
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-BnvS3JHL.js +0 -63
- package/_cacheHas-_aF2y2Xv.js +0 -25
- package/_commonjsHelpers-CUmg6egw.js +0 -6
- package/_createAggregator-BUZrP_is.js +0 -63
- package/_defineProperty-DolZLKmv.js +0 -12
- package/_getPrototype-Bb4gm-5m.js +0 -5
- package/_getTag-CML_cXiN.js +0 -105
- package/_isIterateeCall-B1IFEqVv.js +0 -17
- package/_setToArray-CqyqC8ib.js +0 -10
- package/cloneDeep-l3UkXG5M.js +0 -8
- package/countBy-Bqcp3VCs.js +0 -14
- package/get-CdMThM8x.js +0 -8
- package/groupBy-BVV07EGQ.js +0 -14
- package/iconify-DJxl6dC-.js +0 -1789
- package/identity-CPGTqrE4.js +0 -6
- package/index-CAvu7vwt.js +0 -1172
- package/index-CVUD9o3t.js +0 -15768
- package/index-DUEubgWN.js +0 -464
- package/index-Dj1N4IQP.js +0 -9314
- package/index-DpJxD74E.js +0 -3272
- package/index-_gpzM2Px.js +0 -702
- package/isArguments-CuYlEuhP.js +0 -27
- package/isArray-RJPfgWqI.js +0 -4
- package/isEmpty-BE656RUK.js +0 -30
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-CeENW9FN.js +0 -6
- package/isSymbol-D_H4HPZQ.js +0 -9
- package/last-CUCl67Im.js +0 -7
- package/maxBy-BjjQmX5t.js +0 -8
- package/replication--gLEZw8a.js +0 -11777
- package/sessionStorage-B68y-wnE.js +0 -140
- package/sortBy-B8JVsLQY.js +0 -95
- package/store-B9sjQbcS.js +0 -2163
- package/sumBy-D-HCzM2i.js +0 -8
- package/toFinite-meZTg4Su.js +0 -16
- package/toNumber-B5JaA1vX.js +0 -39
- package/uniq-CahZPAwp.js +0 -7
- package/utils-CEySTPtg.js +0 -224
|
@@ -1,55 +1,55 @@
|
|
|
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
|
-
var
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as e, jsx as i, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { I as a } from "../iconify-Ptb5dTKy.js";
|
|
3
|
+
import { Stack as t, Typography as c, Chip as n, IconButton as m } from "@mui/material";
|
|
4
|
+
import p from "./display/icons/Iconified.js";
|
|
5
|
+
import { t as d } from "../utils-SpTOhPYl.js";
|
|
6
|
+
import { memo as f } from "react";
|
|
7
|
+
import y from "./AnnotationBody.js";
|
|
8
|
+
import h from "./ClassificationChip.js";
|
|
9
|
+
const x = ({ annotation: r }) => {
|
|
10
|
+
var l;
|
|
11
|
+
return /* @__PURE__ */ e(t, { direction: "column", spacing: 1, children: [
|
|
12
|
+
/* @__PURE__ */ e(t, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
13
|
+
r.analytic_icon && /* @__PURE__ */ i(
|
|
14
|
+
a,
|
|
15
15
|
{
|
|
16
16
|
style: { alignSelf: "center", filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" },
|
|
17
|
-
icon:
|
|
17
|
+
icon: r.analytic_icon
|
|
18
18
|
}
|
|
19
19
|
),
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
20
|
+
/* @__PURE__ */ i(c, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: r.analytic ?? r.author }),
|
|
21
|
+
r.quantity > 1 && /* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", children: [
|
|
22
22
|
"(x",
|
|
23
|
-
|
|
23
|
+
r.quantity,
|
|
24
24
|
")"
|
|
25
25
|
] }),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
/* @__PURE__ */ i("div", { style: { flex: 1 } }),
|
|
27
|
+
r.version && /* @__PURE__ */ i(
|
|
28
|
+
n,
|
|
29
29
|
{
|
|
30
30
|
size: "small",
|
|
31
|
-
label: /* @__PURE__ */
|
|
31
|
+
label: /* @__PURE__ */ e(s, { children: [
|
|
32
32
|
"v",
|
|
33
|
-
|
|
33
|
+
r.version.replace(/^v/, "")
|
|
34
34
|
] })
|
|
35
35
|
}
|
|
36
36
|
),
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
r.link && /* @__PURE__ */ i(m, { component: "a", href: r.link, target: "_blank", rel: "noreferrer", size: "small", children: /* @__PURE__ */ i(p, { icon: "ic:baseline-open-in-new", fontSize: "small" }) }),
|
|
38
|
+
r.classification && /* @__PURE__ */ i(h, { size: "small", classification: r.classification })
|
|
39
39
|
] }),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
/* @__PURE__ */ i(y, { annotation: r }),
|
|
41
|
+
(l = r.summary) == null ? void 0 : l.split(`
|
|
42
|
+
`).map((o) => /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", children: o }, o)),
|
|
43
|
+
/* @__PURE__ */ e(t, { direction: "row", children: [
|
|
44
|
+
/* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: d(r.timestamp) }),
|
|
45
|
+
/* @__PURE__ */ i("div", { style: { flex: 1 } }),
|
|
46
|
+
!!r.latency && /* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
|
|
47
|
+
Math.round(r.latency),
|
|
47
48
|
"ms"
|
|
48
49
|
] })
|
|
49
50
|
] })
|
|
50
51
|
] });
|
|
51
|
-
};
|
|
52
|
-
const AnnotationEntry = memo(AnnotatonEntry);
|
|
52
|
+
}, k = f(x);
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
k as default
|
|
55
55
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../iconify-
|
|
2
|
+
import "../iconify-Ptb5dTKy.js";
|
|
3
3
|
import "@mui/material";
|
|
4
|
-
import { A } from "../AnnotationPreview-
|
|
4
|
+
import { A as d } from "../AnnotationPreview-CqXmC-j8.js";
|
|
5
5
|
import "../hooks/useAnnotations.js";
|
|
6
|
-
import "../utils-
|
|
6
|
+
import "../utils-SpTOhPYl.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../index-
|
|
8
|
+
import "../index-BM9Sve5T.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
|
};
|
|
@@ -1,168 +1,155 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { useTheme, Card, CardHeader, Stack, CircularProgress, Divider, CardContent, Grid, Chip, Typography, Tooltip, Box } from "@mui/material";
|
|
4
|
-
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
5
|
-
import { f as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { ICON_MAP } from "../icons/iconMap.js";
|
|
12
|
-
import
|
|
13
|
-
import { u as
|
|
14
|
-
import { memo, useState, useMemo, useCallback } from "react";
|
|
15
|
-
import { a as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
const
|
|
20
|
-
type,
|
|
21
|
-
value,
|
|
22
|
-
classification:
|
|
23
|
-
contextIcon =
|
|
24
|
-
counters =
|
|
25
|
-
hideLoading =
|
|
26
|
-
...
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { I as C } from "../iconify-Ptb5dTKy.js";
|
|
3
|
+
import { useTheme as F, Card as M, CardHeader as O, Stack as W, CircularProgress as B, Divider as D, CardContent as G, Grid as c, Chip as g, Typography as b, Tooltip as H, Box as N } from "@mui/material";
|
|
4
|
+
import { ClueComponentContext as R } from "../hooks/ClueComponentContext.js";
|
|
5
|
+
import { f as v } from "../ActionForm-CHOSKfvu.js";
|
|
6
|
+
import _ from "../hooks/useAnnotations.js";
|
|
7
|
+
import $ from "../hooks/useErrors.js";
|
|
8
|
+
import J from "../icons/Assessment.js";
|
|
9
|
+
import K from "../icons/Context.js";
|
|
10
|
+
import L from "../icons/Opinion.js";
|
|
11
|
+
import { ICON_MAP as y } from "../icons/iconMap.js";
|
|
12
|
+
import Q from "../text/Frequency.js";
|
|
13
|
+
import { u as U } from "../uniq-B4UZ671_.js";
|
|
14
|
+
import { memo as V, useState as X, useMemo as T, useCallback as Y } from "react";
|
|
15
|
+
import { a as Z } from "../index-BM9Sve5T.js";
|
|
16
|
+
import P from "./AnnotationEntry.js";
|
|
17
|
+
import ii from "./actions/ExecutePopover.js";
|
|
18
|
+
import ei from "./enrichment/EnrichPopover.js";
|
|
19
|
+
const ti = ({
|
|
20
|
+
type: s,
|
|
21
|
+
value: o,
|
|
22
|
+
classification: p,
|
|
23
|
+
contextIcon: z = !1,
|
|
24
|
+
counters: d = !1,
|
|
25
|
+
hideLoading: E = !1,
|
|
26
|
+
...t
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const errors = useErrors(value);
|
|
39
|
-
const enrichRequest = { type, value, classification };
|
|
40
|
-
const options = useMemo(() => ["all", ...uniq(annotations.map((annotation) => annotation.type))], [annotations]);
|
|
41
|
-
const forceEnrich = useCallback(() => {
|
|
42
|
-
return enrich(type, value, {
|
|
43
|
-
classification,
|
|
44
|
-
timeout: 15,
|
|
45
|
-
force: true
|
|
46
|
-
});
|
|
47
|
-
}, [classification, enrich, type, value]);
|
|
48
|
-
return /* @__PURE__ */ jsxs(
|
|
49
|
-
Card,
|
|
28
|
+
const u = F(), { t: I } = Z(R, (i) => i.i18next), x = v((i) => i.defaultClassification), h = v((i) => i.enrich), [S, A] = X("all"), m = T(
|
|
29
|
+
() => p ?? x,
|
|
30
|
+
[p, x]
|
|
31
|
+
), [n, k] = _(s, o, m), a = $(o), l = { type: s, value: o, classification: m }, q = T(() => ["all", ...U(n.map((i) => i.type))], [n]), w = Y(() => h(s, o, {
|
|
32
|
+
classification: m,
|
|
33
|
+
timeout: 15,
|
|
34
|
+
force: !0
|
|
35
|
+
}), [m, h, s, o]);
|
|
36
|
+
return /* @__PURE__ */ r(
|
|
37
|
+
M,
|
|
50
38
|
{
|
|
51
39
|
sx: [
|
|
52
40
|
{
|
|
53
41
|
maxWidth: "900px"
|
|
54
42
|
},
|
|
55
|
-
...Array.isArray(
|
|
43
|
+
...Array.isArray(t == null ? void 0 : t.sx) ? t == null ? void 0 : t.sx : [t == null ? void 0 : t.sx]
|
|
56
44
|
],
|
|
57
|
-
...
|
|
45
|
+
...t,
|
|
58
46
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
O,
|
|
61
49
|
{
|
|
62
|
-
title: /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
50
|
+
title: /* @__PURE__ */ r(W, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
51
|
+
/* @__PURE__ */ e(Q, { annotations: n, value: o, variant: "h6" }),
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
J,
|
|
66
54
|
{
|
|
67
|
-
value:
|
|
68
|
-
annotations,
|
|
69
|
-
counters,
|
|
55
|
+
value: l,
|
|
56
|
+
annotations: n,
|
|
57
|
+
counters: d,
|
|
70
58
|
fontSize: "1em",
|
|
71
|
-
disableTooltip:
|
|
59
|
+
disableTooltip: !0
|
|
72
60
|
}
|
|
73
61
|
),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
L,
|
|
76
64
|
{
|
|
77
|
-
value:
|
|
78
|
-
annotations,
|
|
79
|
-
counters,
|
|
65
|
+
value: l,
|
|
66
|
+
annotations: n,
|
|
67
|
+
counters: d,
|
|
80
68
|
fontSize: "1em",
|
|
81
|
-
disableTooltip:
|
|
69
|
+
disableTooltip: !0
|
|
82
70
|
}
|
|
83
71
|
),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
72
|
+
/* @__PURE__ */ e(
|
|
73
|
+
K,
|
|
86
74
|
{
|
|
87
|
-
value:
|
|
88
|
-
annotations,
|
|
89
|
-
counters,
|
|
90
|
-
showExtraIcon:
|
|
75
|
+
value: l,
|
|
76
|
+
annotations: n,
|
|
77
|
+
counters: d,
|
|
78
|
+
showExtraIcon: z,
|
|
91
79
|
fontSize: "inherit",
|
|
92
|
-
disableTooltip:
|
|
80
|
+
disableTooltip: !0
|
|
93
81
|
}
|
|
94
82
|
),
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
83
|
+
k && !E && /* @__PURE__ */ e(B, { color: "primary", size: 18 }),
|
|
84
|
+
/* @__PURE__ */ e("div", { style: { flex: 1 } }),
|
|
85
|
+
/* @__PURE__ */ e(ei, { selector: l }),
|
|
86
|
+
/* @__PURE__ */ e(ii, { selectors: [l] })
|
|
99
87
|
] })
|
|
100
88
|
}
|
|
101
89
|
),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
90
|
+
/* @__PURE__ */ e(D, { sx: { mx: 1 } }),
|
|
91
|
+
/* @__PURE__ */ r(G, { sx: { p: 1 }, children: [
|
|
92
|
+
/* @__PURE__ */ r(c, { container: !0, spacing: 0.5, sx: { mb: 1 }, children: [
|
|
93
|
+
q.map((i, f) => (
|
|
106
94
|
// eslint-disable-next-line react/no-array-index-key
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
|
|
95
|
+
/* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(
|
|
96
|
+
g,
|
|
109
97
|
{
|
|
110
98
|
size: "small",
|
|
111
|
-
variant:
|
|
112
|
-
icon:
|
|
113
|
-
label: /* @__PURE__ */
|
|
114
|
-
|
|
99
|
+
variant: i === S ? "filled" : "outlined",
|
|
100
|
+
icon: y[i] && /* @__PURE__ */ e(C, { icon: y[i] }),
|
|
101
|
+
label: /* @__PURE__ */ r(b, { variant: "caption", textTransform: "capitalize", children: [
|
|
102
|
+
i,
|
|
115
103
|
":",
|
|
116
104
|
" ",
|
|
117
|
-
|
|
105
|
+
i === "all" ? n.length : n.filter((j) => j.type === i).length
|
|
118
106
|
] }),
|
|
119
|
-
onClick: () =>
|
|
107
|
+
onClick: () => A(i)
|
|
120
108
|
}
|
|
121
|
-
) },
|
|
109
|
+
) }, f)
|
|
122
110
|
)),
|
|
123
|
-
(
|
|
124
|
-
|
|
111
|
+
(a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(
|
|
112
|
+
H,
|
|
125
113
|
{
|
|
126
|
-
title: /* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
114
|
+
title: /* @__PURE__ */ e("div", { onClick: (i) => i.stopPropagation(), children: a.map((i) => /* @__PURE__ */ r("div", { children: [
|
|
115
|
+
/* @__PURE__ */ e("span", { style: { textTransform: "capitalize" }, children: i.source.replace(/-/g, " ") }),
|
|
128
116
|
":",
|
|
129
117
|
" ",
|
|
130
|
-
|
|
131
|
-
] },
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
|
|
118
|
+
i.message
|
|
119
|
+
] }, i.source)) }),
|
|
120
|
+
children: /* @__PURE__ */ e(
|
|
121
|
+
g,
|
|
134
122
|
{
|
|
135
123
|
size: "small",
|
|
136
124
|
variant: "outlined",
|
|
137
|
-
icon: /* @__PURE__ */
|
|
138
|
-
|
|
125
|
+
icon: /* @__PURE__ */ e(
|
|
126
|
+
C,
|
|
139
127
|
{
|
|
140
128
|
icon: "material-symbols:timer-outline",
|
|
141
|
-
color:
|
|
129
|
+
color: u.palette.error.main,
|
|
142
130
|
style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" }
|
|
143
131
|
}
|
|
144
132
|
),
|
|
145
|
-
label: /* @__PURE__ */
|
|
146
|
-
|
|
133
|
+
label: /* @__PURE__ */ r(b, { variant: "caption", textTransform: "capitalize", children: [
|
|
134
|
+
I("annotation.failed"),
|
|
147
135
|
": ",
|
|
148
|
-
|
|
136
|
+
a.length
|
|
149
137
|
] }),
|
|
150
|
-
onClick:
|
|
138
|
+
onClick: w
|
|
151
139
|
}
|
|
152
140
|
)
|
|
153
141
|
}
|
|
154
142
|
) })
|
|
155
143
|
] }),
|
|
156
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ e(c, { container: !0, spacing: 1, alignItems: "stretch", children: n.map((i, f) => (
|
|
157
145
|
// eslint-disable-next-line react/no-array-index-key
|
|
158
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ e(c, { item: !0, xs: 6, minWidth: "300px", children: /* @__PURE__ */ e(N, { sx: { border: `thin solid ${u.palette.divider}`, p: 1, height: "100%" }, children: /* @__PURE__ */ e(P, { annotation: i }) }) }, f)
|
|
159
147
|
)) })
|
|
160
148
|
] })
|
|
161
149
|
]
|
|
162
150
|
}
|
|
163
151
|
);
|
|
164
|
-
};
|
|
165
|
-
const EnrichedCard_default = memo(EnrichedCard);
|
|
152
|
+
}, yi = V(ti);
|
|
166
153
|
export {
|
|
167
|
-
|
|
154
|
+
yi as default
|
|
168
155
|
};
|