@cccsaurora/clue-ui 1.0.2 → 1.1.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/ActionForm-D4ryHO0M.js +436 -0
  2. package/AnnotationDetails-YAPoqw3R.js +175 -0
  3. package/AnnotationPreview-DiQDjt9s.js +188 -0
  4. package/ClueEnrichContext-DIn6g8tw.js +522 -0
  5. package/FlexOne-BSYAhhtG.js +9 -0
  6. package/_Map-kgDsDYxq.js +64 -0
  7. package/_MapCache-DabaaWfq.js +161 -0
  8. package/_Uint8Array-BlVVH1tp.js +129 -0
  9. package/_baseAssignValue-CNbcU6Nb.js +25 -0
  10. package/_baseClone-D3a8Pa4T.js +284 -0
  11. package/_baseExtremum-B1o1zHjR.js +33 -0
  12. package/_baseFlatten-D4huXoEI.js +92 -0
  13. package/_baseGet-BSK_nnoz.js +109 -0
  14. package/_baseIsEqual-B5xLoweL.js +238 -0
  15. package/_baseIteratee-p6Nj07-n.js +126 -0
  16. package/_baseSlice-GAv_YFTT.js +20 -0
  17. package/_baseSum-D0WC1dN0.js +13 -0
  18. package/_baseUniq-CpupKWcL.js +89 -0
  19. package/_commonjsHelpers-CUmg6egw.js +6 -0
  20. package/_createAggregator-BpVy5xMi.js +63 -0
  21. package/_getPrototype-D1LAdQKO.js +5 -0
  22. package/_getTag-D3ToyefI.js +126 -0
  23. package/cloneDeep-CjP5k9zW.js +8 -0
  24. package/components/AnnotationBody.js +49 -34
  25. package/components/AnnotationDetailPopover.js +36 -30
  26. package/components/AnnotationDetails.js +6 -6
  27. package/components/AnnotationEntry.js +50 -47
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +44 -23
  30. package/components/CountBadge.js +31 -26
  31. package/components/EnrichedCard.js +104 -92
  32. package/components/EnrichedChip.js +134 -109
  33. package/components/EnrichedTypography.js +136 -110
  34. package/components/ErrorBoundary.js +28 -24
  35. package/components/RetryFailedEnrichments.js +10 -9
  36. package/components/SourcePicker.js +57 -49
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +64 -50
  39. package/components/actions/ResultModal.js +37 -34
  40. package/components/actions/form/schemaAdapter.js +39 -20
  41. package/components/display/graph/ExpandMoreButton.js +10 -10
  42. package/components/display/graph/elements/NodeCard.js +92 -76
  43. package/components/display/graph/elements/NodeTag.js +15 -13
  44. package/components/display/graph/index.js +258 -200
  45. package/components/display/graph/visualizations/Leaf.js +88 -69
  46. package/components/display/graph/visualizations/cloud/index.js +98 -81
  47. package/components/display/graph/visualizations/icons/BaseIcon.js +26 -21
  48. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  49. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  50. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  53. package/components/display/graph/visualizations/icons/index.js +14 -13
  54. package/components/display/graph/visualizations/panels/NodePanel.js +10 -8
  55. package/components/display/graph/visualizations/tree/BundleLine.js +108 -81
  56. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  57. package/components/display/graph/visualizations/tree/index.js +407 -305
  58. package/components/display/icons/Iconified.js +27 -12
  59. package/components/display/json/index.js +4 -4
  60. package/components/display/markdown/DynamicTabs.js +22 -17
  61. package/components/display/markdown/index.js +8527 -5670
  62. package/components/display/markdown/markdownPlugins/tabs.js +1 -1
  63. package/components/enrichment/EnrichPopover.js +55 -47
  64. package/components/fetchers/Fetcher.js +123 -95
  65. package/components/fetchers/PreviewModal.js +20 -17
  66. package/components/fetchers/StatusChip.js +22 -18
  67. package/components/group/Entry.js +13 -11
  68. package/components/group/Group.js +13 -10
  69. package/components/group/GroupControl.js +76 -65
  70. package/components/stats/QueryStatus.js +37 -28
  71. package/countBy-C69WslUA.js +14 -0
  72. package/data/event.js +6 -4
  73. package/database/index.js +2 -2
  74. package/debounce-bV0h5FC5.js +92 -0
  75. package/get-D3C3lEU3.js +8 -0
  76. package/groupBy-DC2oOuBN.js +14 -0
  77. package/hooks/ClueActionContext.js +6 -6
  78. package/hooks/ClueComponentContext.js +29 -23
  79. package/hooks/ClueConfigProvider.js +14 -12
  80. package/hooks/ClueDatabaseContext.js +19 -13
  81. package/hooks/ClueEnrichContext.js +8 -8
  82. package/hooks/ClueFetcherContext.js +74 -46
  83. package/hooks/ClueGroupContext.js +17 -14
  84. package/hooks/CluePopupContext.js +5 -5
  85. package/hooks/ClueProvider.js +12 -10
  86. package/hooks/selectors.js +22 -11
  87. package/hooks/useAnnotations.js +45 -29
  88. package/hooks/useClue.js +6 -4
  89. package/hooks/useClueActions.js +3 -3
  90. package/hooks/useClueConfig.js +5 -5
  91. package/hooks/useClueTypeConfig.js +3 -3
  92. package/hooks/useComparator.js +722 -435
  93. package/hooks/useErrors.js +22 -18
  94. package/hooks/useMyHighlights.js +66 -36
  95. package/hooks/useMyLocalStorage.js +63 -43
  96. package/iconify-CXMreGTg.js +1782 -0
  97. package/icons/Action.js +66 -49
  98. package/icons/Assessment.js +84 -68
  99. package/icons/Context.js +75 -61
  100. package/icons/Opinion.js +77 -65
  101. package/icons/iconMap.js +2 -2
  102. package/identity-CPGTqrE4.js +6 -0
  103. package/index-BDVjGvMI.js +696 -0
  104. package/index-BHPT3qoB.js +1172 -0
  105. package/index-BMxyILVD.js +465 -0
  106. package/index-BbPn6-Mw.js +15750 -0
  107. package/index-Dz1kF2MU.js +17654 -0
  108. package/isEmpty-BQkZubqU.js +29 -0
  109. package/isNil-CIubwp4T.js +6 -0
  110. package/isObject-FTY-5JQX.js +7 -0
  111. package/isObjectLike-OAgjjZye.js +48 -0
  112. package/isSymbol-Xd2FsJyp.js +8 -0
  113. package/last-CUCl67Im.js +7 -0
  114. package/main.js +58 -58
  115. package/package.json +1 -1
  116. package/sortBy-B-UKp4GT.js +100 -0
  117. package/sumBy-MYkDPHZL.js +8 -0
  118. package/tabs-xGuUGsJd.js +254 -0
  119. package/text/Frequency.js +42 -23
  120. package/toFinite-Bc55msYj.js +16 -0
  121. package/toNumber-DPxy1FBy.js +39 -0
  122. package/useClueTypeConfig-CH-nGq6a.js +3184 -0
  123. package/utils/chain.js +91 -64
  124. package/utils/classificationParser.js +519 -256
  125. package/utils/constants.js +35 -10
  126. package/utils/graph.js +72 -45
  127. package/utils/hashUtil.js +7 -7
  128. package/utils/line.js +131 -81
  129. package/utils/loggerUtil.js +5 -3
  130. package/utils/sessionStorage.js +41 -29
  131. package/utils/utils.js +9 -9
  132. package/utils/window.js +21 -10
  133. package/utils-Dr4wbKBZ.js +4182 -0
  134. package/ActionForm-BtTv0s4P.js +0 -340
  135. package/AnnotationDetails-D5tBIeEw.js +0 -160
  136. package/AnnotationPreview-CZr_CcZC.js +0 -140
  137. package/ClueEnrichContext-DH9lqjwH.js +0 -401
  138. package/FlexOne-BXWFOd1T.js +0 -6
  139. package/_Map-DXNg_Z-q.js +0 -54
  140. package/_MapCache-Cu25RRDU.js +0 -129
  141. package/_Uint8Array-DlJCtTvG.js +0 -102
  142. package/_baseAssignValue-CUmzp727.js +0 -20
  143. package/_baseClone-BlMmRXeX.js +0 -208
  144. package/_baseExtremum-P_0akmCi.js +0 -27
  145. package/_baseFlatten-CN7vDNEQ.js +0 -72
  146. package/_baseGet-Dgf6_xCm.js +0 -80
  147. package/_baseIsEqual-Cpjtfb3Q.js +0 -173
  148. package/_baseIteratee-CP1bocOX.js +0 -95
  149. package/_baseSlice-M5RKzt1A.js +0 -10
  150. package/_baseSum-wEbgNeUs.js +0 -10
  151. package/_baseUniq-tMFmk80M.js +0 -61
  152. package/_commonjsHelpers-C6fGbg64.js +0 -6
  153. package/_createAggregator-B4Cav8ZM.js +0 -53
  154. package/_getPrototype-CHAFQYL_.js +0 -5
  155. package/_getTag-BV_UoLYG.js +0 -90
  156. package/cloneDeep-BPVpFBzJ.js +0 -8
  157. package/countBy-DOutsa_w.js +0 -8
  158. package/debounce-DryYcbJ4.js +0 -56
  159. package/get-Bow1vKwx.js +0 -8
  160. package/groupBy-BheQYl6f.js +0 -8
  161. package/iconify-BBckr5AQ.js +0 -1263
  162. package/identity-ByMq8VxU.js +0 -6
  163. package/index-BUcHmehh.js +0 -975
  164. package/index-Bo-v5IAc.js +0 -12754
  165. package/index-CnaCBNrd.js +0 -358
  166. package/index-E7g8cRyW.js +0 -568
  167. package/index-p5_wX7q1.js +0 -11729
  168. package/isEmpty-g47Qir2A.js +0 -21
  169. package/isNil-CjWwlQS3.js +0 -6
  170. package/isObject-B53jY8Qg.js +0 -7
  171. package/isObjectLike-BatpeCIi.js +0 -29
  172. package/isSymbol-C3_SC0Qp.js +0 -8
  173. package/last-7CdUxN0r.js +0 -7
  174. package/sortBy-ITdmD17L.js +0 -79
  175. package/sumBy-DxJUU2E8.js +0 -8
  176. package/tabs-CgADNA57.js +0 -195
  177. package/toFinite-BMy6GObD.js +0 -14
  178. package/toNumber-YVhnnJv4.js +0 -31
  179. package/useClueTypeConfig-CneP98N_.js +0 -2260
  180. package/utils-CD0rFIFU.js +0 -2704
@@ -1,31 +1,52 @@
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,
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Tooltip, Chip } from "@mui/material";
3
+ import useClueConfig from "../hooks/useClueConfig.js";
4
+ import { getParts, normalizedClassification } from "../utils/classificationParser.js";
5
+ import React__default, { useMemo, memo } from "react";
6
+ const THEME_TYPES = ["default", "primary", "secondary", "error", "info", "success", "warning"];
7
+ const ClassificationChip = React__default.memo(
8
+ ({ classification, ...otherProps }) => {
9
+ var _a, _b;
10
+ const { config } = useClueConfig();
11
+ const parts = useMemo(() => {
12
+ if (!config.c12nDef) {
13
+ return null;
14
+ }
15
+ return getParts(classification, config.c12nDef, "short", true);
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,
16
36
  {
17
- variant: n.variant || "outlined",
18
- label: d,
19
- ...o,
20
- ...n,
37
+ variant: otherProps.variant || "outlined",
38
+ label: normalized,
39
+ ...chipProps,
40
+ ...otherProps,
21
41
  sx: [
22
- ...Array.isArray(o.sx) ? o.sx : [o.sx],
23
- ...Array.isArray(n.sx) ? n.sx : [n.sx]
42
+ ...Array.isArray(chipProps.sx) ? chipProps.sx : [chipProps.sx],
43
+ ...Array.isArray(otherProps.sx) ? otherProps.sx : [otherProps.sx]
24
44
  ]
25
45
  }
26
46
  ) });
27
47
  }
28
- ), M = y(A);
48
+ );
49
+ const ClassificationChip$1 = memo(ClassificationChip);
29
50
  export {
30
- M as default
51
+ ClassificationChip$1 as default
31
52
  };
@@ -1,29 +1,34 @@
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
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Badge } from "@mui/material";
3
+ import { forwardRef, cloneElement, Children } from "react";
4
+ const CountBadge = forwardRef(({ children, color = "primary", count, disabled, ...props }, ref) => {
5
+ if (disabled) {
6
+ return cloneElement(Children.only(children), { ref, ...props });
25
7
  }
26
- ));
8
+ return /* @__PURE__ */ jsx(
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
+ });
27
32
  export {
28
- b as default
33
+ CountBadge as default
29
34
  };
@@ -1,150 +1,162 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import { I as h } from "../iconify-BBckr5AQ.js";
3
- import { useTheme as q, Card as F, CardHeader as M, Stack as O, CircularProgress as W, Divider as $, CardContent as B, Grid as s, Chip as C, Typography as g, Tooltip as D, Box as G } from "@mui/material";
4
- import { ClueComponentContext as H } from "../hooks/ClueComponentContext.js";
5
- import { useClueEnrichSelector as b } from "../hooks/selectors.js";
6
- import N from "../hooks/useAnnotations.js";
7
- import J from "../hooks/useErrors.js";
8
- import K from "../icons/Assessment.js";
9
- import L from "../icons/Context.js";
10
- import Q from "../icons/Opinion.js";
11
- import { ICON_MAP as T } from "../icons/iconMap.js";
12
- import R from "../text/Frequency.js";
13
- import { u as U } from "../ClueEnrichContext-DH9lqjwH.js";
14
- import { memo as V, useState as X, useMemo as z, useCallback as Y } from "react";
15
- import { u as Z } from "../index-E7g8cRyW.js";
16
- import _ from "./AnnotationEntry.js";
17
- const P = ({
18
- type: o,
19
- value: r,
20
- classification: f,
21
- contextIcon: I = !1,
22
- counters: m = !1,
23
- hideLoading: y = !1,
24
- ...e
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { I as Icon } from "../iconify-CXMreGTg.js";
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 { useClueEnrichSelector } from "../hooks/selectors.js";
6
+ import useAnnotations from "../hooks/useAnnotations.js";
7
+ import useErrors from "../hooks/useErrors.js";
8
+ import AssessmentIcon from "../icons/Assessment.js";
9
+ import ContextIcon from "../icons/Context.js";
10
+ import OpinionIcon from "../icons/Opinion.js";
11
+ import { ICON_MAP } from "../icons/iconMap.js";
12
+ import FrequencyText from "../text/Frequency.js";
13
+ import { u as uniq } from "../ClueEnrichContext-DIn6g8tw.js";
14
+ import { memo, useState, useMemo, useCallback } from "react";
15
+ import { u as useContextSelector } from "../index-BDVjGvMI.js";
16
+ import AnnotationEntry from "./AnnotationEntry.js";
17
+ const EnrichedCard = ({
18
+ type,
19
+ value,
20
+ classification: _classification,
21
+ contextIcon = false,
22
+ counters = false,
23
+ hideLoading = false,
24
+ ...otherProps
25
25
  }) => {
26
- const p = q(), { t: E } = Z(H, (i) => i.i18next), u = b((i) => i.defaultClassification), x = b((i) => i.enrich), [S, A] = X("all"), l = z(
27
- () => f ?? u,
28
- [f, u]
29
- ), [n, k] = N(o, r, l), c = J(r), v = z(() => ["all", ...U(n.map((i) => i.type))], [n]), w = Y(() => x(o, r, {
30
- classification: l,
31
- timeout: 15,
32
- force: !0
33
- }), [l, x, o, r]);
34
- return /* @__PURE__ */ a(
35
- F,
26
+ const theme = useTheme();
27
+ const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
28
+ const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
29
+ const enrich = useClueEnrichSelector((state) => state.enrich);
30
+ const [filter, setFilter] = useState("all");
31
+ const classification = useMemo(
32
+ () => _classification ?? defaultClassification,
33
+ [_classification, defaultClassification]
34
+ );
35
+ const [annotations, loading] = useAnnotations(type, value, classification);
36
+ const errors = useErrors(value);
37
+ const options = useMemo(() => ["all", ...uniq(annotations.map((annotation) => annotation.type))], [annotations]);
38
+ const forceEnrich = useCallback(() => {
39
+ return enrich(type, value, {
40
+ classification,
41
+ timeout: 15,
42
+ force: true
43
+ });
44
+ }, [classification, enrich, type, value]);
45
+ return /* @__PURE__ */ jsxs(
46
+ Card,
36
47
  {
37
48
  sx: [
38
49
  {
39
50
  maxWidth: "900px"
40
51
  },
41
- ...Array.isArray(e == null ? void 0 : e.sx) ? e == null ? void 0 : e.sx : [e == null ? void 0 : e.sx]
52
+ ...Array.isArray(otherProps == null ? void 0 : otherProps.sx) ? otherProps == null ? void 0 : otherProps.sx : [otherProps == null ? void 0 : otherProps.sx]
42
53
  ],
43
- ...e,
54
+ ...otherProps,
44
55
  children: [
45
- /* @__PURE__ */ t(
46
- M,
56
+ /* @__PURE__ */ jsx(
57
+ CardHeader,
47
58
  {
48
- title: /* @__PURE__ */ a(O, { direction: "row", spacing: 1, alignItems: "center", children: [
49
- /* @__PURE__ */ t(R, { annotations: n, value: r, variant: "h6" }),
50
- /* @__PURE__ */ t(
51
- K,
59
+ title: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
60
+ /* @__PURE__ */ jsx(FrequencyText, { annotations, value, variant: "h6" }),
61
+ /* @__PURE__ */ jsx(
62
+ AssessmentIcon,
52
63
  {
53
- value: { type: o, value: r, classification: l },
54
- annotations: n,
55
- counters: m,
64
+ value: { type, value, classification },
65
+ annotations,
66
+ counters,
56
67
  fontSize: "1em",
57
- disableTooltip: !0
68
+ disableTooltip: true
58
69
  }
59
70
  ),
60
- /* @__PURE__ */ t(
61
- Q,
71
+ /* @__PURE__ */ jsx(
72
+ OpinionIcon,
62
73
  {
63
- value: { type: o, value: r, classification: l },
64
- annotations: n,
65
- counters: m,
74
+ value: { type, value, classification },
75
+ annotations,
76
+ counters,
66
77
  fontSize: "1em",
67
- disableTooltip: !0
78
+ disableTooltip: true
68
79
  }
69
80
  ),
70
- /* @__PURE__ */ t(
71
- L,
81
+ /* @__PURE__ */ jsx(
82
+ ContextIcon,
72
83
  {
73
- value: { type: o, value: r, classification: l },
74
- annotations: n,
75
- counters: m,
76
- showExtraIcon: I,
84
+ value: { type, value, classification },
85
+ annotations,
86
+ counters,
87
+ showExtraIcon: contextIcon,
77
88
  fontSize: "inherit",
78
- disableTooltip: !0
89
+ disableTooltip: true
79
90
  }
80
91
  ),
81
- k && !y && /* @__PURE__ */ t(W, { color: "primary", size: 18 })
92
+ loading && !hideLoading && /* @__PURE__ */ jsx(CircularProgress, { color: "primary", size: 18 })
82
93
  ] })
83
94
  }
84
95
  ),
85
- /* @__PURE__ */ t($, { sx: { mx: 1 } }),
86
- /* @__PURE__ */ a(B, { sx: { p: 1 }, children: [
87
- /* @__PURE__ */ a(s, { container: !0, spacing: 0.5, sx: { mb: 1 }, children: [
88
- v.map((i, d) => (
96
+ /* @__PURE__ */ jsx(Divider, { sx: { mx: 1 } }),
97
+ /* @__PURE__ */ jsxs(CardContent, { sx: { p: 1 }, children: [
98
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 0.5, sx: { mb: 1 }, children: [
99
+ options.map((opt, id) => (
89
100
  // eslint-disable-next-line react/no-array-index-key
90
- /* @__PURE__ */ t(s, { item: !0, children: /* @__PURE__ */ t(
91
- C,
101
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
102
+ Chip,
92
103
  {
93
104
  size: "small",
94
- variant: i === S ? "filled" : "outlined",
95
- icon: T[i] && /* @__PURE__ */ t(h, { icon: T[i] }),
96
- label: /* @__PURE__ */ a(g, { variant: "caption", textTransform: "capitalize", children: [
97
- i,
105
+ variant: opt === filter ? "filled" : "outlined",
106
+ icon: ICON_MAP[opt] && /* @__PURE__ */ jsx(Icon, { icon: ICON_MAP[opt] }),
107
+ label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
108
+ opt,
98
109
  ":",
99
110
  " ",
100
- i === "all" ? n.length : n.filter((j) => j.type === i).length
111
+ opt === "all" ? annotations.length : annotations.filter((annotation) => annotation.type === opt).length
101
112
  ] }),
102
- onClick: () => A(i)
113
+ onClick: () => setFilter(opt)
103
114
  }
104
- ) }, d)
115
+ ) }, id)
105
116
  )),
106
- (c == null ? void 0 : c.length) > 0 && /* @__PURE__ */ t(s, { item: !0, children: /* @__PURE__ */ t(
107
- D,
117
+ (errors == null ? void 0 : errors.length) > 0 && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
118
+ Tooltip,
108
119
  {
109
- title: /* @__PURE__ */ t("div", { onClick: (i) => i.stopPropagation(), children: c.map((i) => /* @__PURE__ */ a("div", { children: [
110
- /* @__PURE__ */ t("span", { style: { textTransform: "capitalize" }, children: i.source.replace(/-/g, " ") }),
120
+ title: /* @__PURE__ */ jsx("div", { onClick: (e) => e.stopPropagation(), children: errors.map((err) => /* @__PURE__ */ jsxs("div", { children: [
121
+ /* @__PURE__ */ jsx("span", { style: { textTransform: "capitalize" }, children: err.source.replace(/-/g, " ") }),
111
122
  ":",
112
123
  " ",
113
- i.message
114
- ] }, i.source)) }),
115
- children: /* @__PURE__ */ t(
116
- C,
124
+ err.message
125
+ ] }, err.source)) }),
126
+ children: /* @__PURE__ */ jsx(
127
+ Chip,
117
128
  {
118
129
  size: "small",
119
130
  variant: "outlined",
120
- icon: /* @__PURE__ */ t(
121
- h,
131
+ icon: /* @__PURE__ */ jsx(
132
+ Icon,
122
133
  {
123
134
  icon: "material-symbols:timer-outline",
124
- color: p.palette.error.main,
135
+ color: theme.palette.error.main,
125
136
  style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" }
126
137
  }
127
138
  ),
128
- label: /* @__PURE__ */ a(g, { variant: "caption", textTransform: "capitalize", children: [
129
- E("annotation.failed"),
139
+ label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
140
+ t("annotation.failed"),
130
141
  ": ",
131
- c.length
142
+ errors.length
132
143
  ] }),
133
- onClick: w
144
+ onClick: forceEnrich
134
145
  }
135
146
  )
136
147
  }
137
148
  ) })
138
149
  ] }),
139
- /* @__PURE__ */ t(s, { container: !0, spacing: 1, alignItems: "stretch", children: n.map((i, d) => (
150
+ /* @__PURE__ */ jsx(Grid, { container: true, spacing: 1, alignItems: "stretch", children: annotations.map((annotation, id) => (
140
151
  // eslint-disable-next-line react/no-array-index-key
141
- /* @__PURE__ */ t(s, { item: !0, xs: 6, minWidth: "300px", children: /* @__PURE__ */ t(G, { sx: { border: `thin solid ${p.palette.divider}`, p: 1, height: "100%" }, children: /* @__PURE__ */ t(_, { annotation: i }) }) }, d)
152
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 6, minWidth: "300px", children: /* @__PURE__ */ jsx(Box, { sx: { border: `thin solid ${theme.palette.divider}`, p: 1, height: "100%" }, children: /* @__PURE__ */ jsx(AnnotationEntry, { annotation }) }) }, id)
142
153
  )) })
143
154
  ] })
144
155
  ]
145
156
  }
146
157
  );
147
- }, hi = V(P);
158
+ };
159
+ const EnrichedCard$1 = memo(EnrichedCard);
148
160
  export {
149
- hi as default
161
+ EnrichedCard$1 as default
150
162
  };