@cccsaurora/clue-ui 1.0.1-dev.58 → 1.0.1-dev.65

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 (50) hide show
  1. package/{ActionForm-c5hLIfQ-.js → ActionForm-D4ryHO0M.js} +6 -6
  2. package/AnnotationDetails-C_P001d3.js +175 -0
  3. package/{AnnotationPreview-BvNpZOP0.js → AnnotationPreview-BOpYuxD1.js} +2 -2
  4. package/{ClueEnrichContext-m-4vn9rz.js → ClueEnrichContext-DmhtfJg_.js} +6 -6
  5. package/api/lookup/enrich.d.ts +3 -3
  6. package/components/AnnotationDetailPopover.js +1 -1
  7. package/components/AnnotationDetails.js +21 -170
  8. package/components/AnnotationEntry.js +1 -1
  9. package/components/AnnotationPreview.js +2 -2
  10. package/components/EnrichedCard.js +1 -1
  11. package/components/EnrichedChip.js +1 -1
  12. package/components/EnrichedTypography.js +1 -1
  13. package/components/actions/ActionForm.js +3 -3
  14. package/components/actions/ResultModal.js +1 -1
  15. package/components/display/graph/elements/NodeCard.js +2 -2
  16. package/components/display/graph/index.js +1 -1
  17. package/components/display/json/index.js +2 -2
  18. package/components/enrichment/EnrichPopover.js +1 -1
  19. package/components/fetchers/Fetcher.js +1 -1
  20. package/components/group/Entry.js +1 -1
  21. package/components/group/GroupControl.js +1 -1
  22. package/database/index.js +1 -1
  23. package/hooks/ClueActionContext.d.ts +1 -1
  24. package/hooks/ClueActionContext.js +3 -3
  25. package/hooks/ClueDatabaseContext.js +1 -1
  26. package/hooks/ClueEnrichContext.js +4 -4
  27. package/hooks/ClueFetcherContext.js +1 -1
  28. package/hooks/CluePopupContext.js +2 -2
  29. package/hooks/ClueProvider.js +3 -3
  30. package/hooks/selectors.js +2 -2
  31. package/hooks/useClue.js +1 -1
  32. package/hooks/useClueActions.js +1 -1
  33. package/hooks/useClueTypeConfig.d.ts +2 -1
  34. package/hooks/useClueTypeConfig.js +2 -2
  35. package/hooks/useMyLocalStorage.js +2 -2
  36. package/icons/Action.js +3 -3
  37. package/icons/Assessment.js +5 -5
  38. package/icons/Context.js +2 -2
  39. package/icons/Opinion.js +4 -4
  40. package/{index-C9lySIVX.js → index-BHPT3qoB.js} +1 -1
  41. package/{index-BDrtH5ec.js → index-BMxyILVD.js} +1 -1
  42. package/{index-Dn2NHyXg.js → index-Dz1kF2MU.js} +2 -2
  43. package/main.d.ts +0 -1
  44. package/main.js +52 -62
  45. package/package.json +1 -1
  46. package/text/Frequency.js +5 -5
  47. package/{useClueTypeConfig-D4zcy8Gr.js → useClueTypeConfig-CH-nGq6a.js} +13 -13
  48. package/utils/utils.js +2 -2
  49. package/isUndefined-CE8h73dH.js +0 -10
  50. package/{utils-CxIhC2xH.js → utils-Dr4wbKBZ.js} +2 -2
@@ -3,17 +3,17 @@ import { materialRenderers, materialCells } from "@jsonforms/material-renderers"
3
3
  import { JsonForms } from "@jsonforms/react";
4
4
  import { Stack, Typography, IconButton, Modal, Paper, Box, Button, Divider, CircularProgress, Collapse } from "@mui/material";
5
5
  import Iconified from "./components/display/icons/Iconified.js";
6
- import { J as JSONViewer } from "./index-BDrtH5ec.js";
6
+ import { J as JSONViewer } from "./index-BMxyILVD.js";
7
7
  import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
8
8
  import { c as createContext, u as useContextSelector, a as useContext } from "./index-BDVjGvMI.js";
9
- import { A as Ajv } from "./index-Dn2NHyXg.js";
10
- import { a as api } from "./useClueTypeConfig-D4zcy8Gr.js";
9
+ import { A as Ajv } from "./index-Dz1kF2MU.js";
10
+ import { a as api } from "./useClueTypeConfig-CH-nGq6a.js";
11
+ import { d as toString } from "./_baseGet-BSK_nnoz.js";
12
+ import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
13
+ import { i as isEqual } from "./utils-Dr4wbKBZ.js";
11
14
  import { useState, useCallback, useEffect, useMemo, memo } from "react";
12
15
  import ErrorBoundary from "./components/ErrorBoundary.js";
13
16
  import { adaptSchema } from "./components/actions/form/schemaAdapter.js";
14
- import { d as toString } from "./_baseGet-BSK_nnoz.js";
15
- import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
16
- import { i as isEqual } from "./utils-CxIhC2xH.js";
17
17
  import ResultModal from "./components/actions/ResultModal.js";
18
18
  import { SNACKBAR_EVENT_ID } from "./data/event.js";
19
19
  import { safeDispatchEvent } from "./utils/window.js";
@@ -0,0 +1,175 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { I as Icon } from "./iconify-CXMreGTg.js";
3
+ import { useTheme, Stack, Typography, Tooltip, Box, IconButton, CircularProgress, Chip, Accordion, AccordionSummary, AccordionDetails, Divider } from "@mui/material";
4
+ import Iconified from "./components/display/icons/Iconified.js";
5
+ import { SNACKBAR_EVENT_ID } from "./data/event.js";
6
+ import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
7
+ import { useClueEnrichSelector } from "./hooks/selectors.js";
8
+ import useAnnotations from "./hooks/useAnnotations.js";
9
+ import useErrors from "./hooks/useErrors.js";
10
+ import { ICON_MAP } from "./icons/iconMap.js";
11
+ import { safeDispatchEvent } from "./utils/window.js";
12
+ import { g as groupBy } from "./groupBy-DC2oOuBN.js";
13
+ import { u as uniq } from "./ClueEnrichContext-DmhtfJg_.js";
14
+ import { memo, useState, useMemo, useCallback, useEffect } from "react";
15
+ import { u as useContextSelector } from "./index-BDVjGvMI.js";
16
+ import ExecutePopover from "./components/actions/ExecutePopover.js";
17
+ import AnnotationEntry from "./components/AnnotationEntry.js";
18
+ import ClassificationChip from "./components/ClassificationChip.js";
19
+ import EnrichPopover from "./components/enrichment/EnrichPopover.js";
20
+ function isNull(value) {
21
+ return value === null;
22
+ }
23
+ const AnnotationDetails = ({ enrichRequest, setReady, updatePosition }) => {
24
+ const theme = useTheme();
25
+ const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
26
+ const [filter, setFilter] = useState("all");
27
+ const enrich = useClueEnrichSelector((state) => state.enrich);
28
+ const [annotations, loading] = useAnnotations(
29
+ enrichRequest == null ? void 0 : enrichRequest.type,
30
+ enrichRequest == null ? void 0 : enrichRequest.value,
31
+ enrichRequest == null ? void 0 : enrichRequest.classification,
32
+ { skipEnrichment: true }
33
+ );
34
+ const errors = useErrors(enrichRequest == null ? void 0 : enrichRequest.value);
35
+ const options = useMemo(
36
+ () => ["all", ...uniq((annotations ?? []).map((annotation) => annotation.type))],
37
+ [annotations]
38
+ );
39
+ const annotationsByType = useMemo(() => groupBy(annotations ?? [], "type"), [annotations]);
40
+ const forceEnrich = useCallback(async () => {
41
+ await enrich(enrichRequest.type, enrichRequest.value, {
42
+ classification: enrichRequest.classification,
43
+ timeout: 15,
44
+ force: true
45
+ });
46
+ }, [enrichRequest, enrich]);
47
+ useEffect(() => {
48
+ if (!setReady) {
49
+ return;
50
+ }
51
+ setReady(enrichRequest && !isNull(annotations));
52
+ updatePosition == null ? void 0 : updatePosition();
53
+ }, [annotations, enrichRequest, setReady, updatePosition]);
54
+ return enrichRequest && !isNull(annotations) && /* @__PURE__ */ jsxs(Stack, { direction: "column", sx: { p: 1, width: "100%" }, spacing: 1, children: [
55
+ /* @__PURE__ */ jsxs(Stack, { spacing: 1, children: [
56
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
57
+ /* @__PURE__ */ jsxs(Stack, { children: [
58
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
59
+ /* @__PURE__ */ jsx(Typography, { variant: "body1", fontWeight: "bold", children: "Clue" }),
60
+ enrichRequest.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: enrichRequest.classification })
61
+ ] }),
62
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
63
+ enrichRequest.type.toLocaleUpperCase(),
64
+ " ",
65
+ t("enrichment")
66
+ ] })
67
+ ] }),
68
+ /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
69
+ /* @__PURE__ */ jsx(Tooltip, { title: t("refresh"), children: /* @__PURE__ */ jsx(Box, { sx: { alignSelf: "center", m: -1 }, children: /* @__PURE__ */ jsx(IconButton, { onClick: () => forceEnrich(), disabled: loading, children: loading ? /* @__PURE__ */ jsx(CircularProgress, { variant: "indeterminate", size: 20 }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-replay", fontSize: "small" }) }) }) }),
70
+ /* @__PURE__ */ jsx(Tooltip, { title: t("clipboard"), children: /* @__PURE__ */ jsx(
71
+ IconButton,
72
+ {
73
+ sx: { alignSelf: "center", m: -1 },
74
+ onClick: () => {
75
+ navigator.clipboard.writeText(enrichRequest.value);
76
+ safeDispatchEvent(
77
+ new CustomEvent(SNACKBAR_EVENT_ID, {
78
+ detail: {
79
+ message: `${enrichRequest.value} ${t("clipboard.success")}`,
80
+ level: "success"
81
+ }
82
+ })
83
+ );
84
+ },
85
+ children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-assignment", fontSize: "small" })
86
+ }
87
+ ) }),
88
+ /* @__PURE__ */ jsx(EnrichPopover, { selector: enrichRequest }),
89
+ /* @__PURE__ */ jsx(ExecutePopover, { selectors: [enrichRequest] })
90
+ ] }),
91
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, children: [
92
+ options.map((opt, id) => /* @__PURE__ */ jsx(
93
+ Chip,
94
+ {
95
+ size: "small",
96
+ variant: opt === filter ? "filled" : "outlined",
97
+ icon: ICON_MAP[opt] && /* @__PURE__ */ jsx(Icon, { icon: ICON_MAP[opt] }),
98
+ label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
99
+ opt,
100
+ ":",
101
+ " ",
102
+ opt === "all" ? annotations.length : annotations.filter((annotation) => annotation.type === opt).length
103
+ ] }),
104
+ onClick: () => setFilter(opt)
105
+ },
106
+ id
107
+ )),
108
+ (errors == null ? void 0 : errors.length) > 0 && /* @__PURE__ */ jsx(
109
+ Tooltip,
110
+ {
111
+ title: /* @__PURE__ */ jsx("div", { onClick: (e) => e.stopPropagation(), children: errors.map((err, err_id) => /* @__PURE__ */ jsxs("div", { children: [
112
+ /* @__PURE__ */ jsx("span", { style: { textTransform: "capitalize" }, children: err.source.replace(/-/g, " ") }),
113
+ ":",
114
+ " ",
115
+ err.message
116
+ ] }, err_id)) }),
117
+ children: /* @__PURE__ */ jsx(
118
+ Chip,
119
+ {
120
+ size: "small",
121
+ variant: "outlined",
122
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "material-symbols:timer-outline", color: theme.palette.error.main }),
123
+ label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
124
+ t("annotation.failed"),
125
+ ": ",
126
+ errors.length
127
+ ] }),
128
+ onClick: forceEnrich
129
+ }
130
+ )
131
+ }
132
+ )
133
+ ] })
134
+ ] }),
135
+ /* @__PURE__ */ jsx(Box, {}),
136
+ Object.keys(annotationsByType).filter((type) => !filter || filter === "all" || type === filter).map((type, id) => /* @__PURE__ */ jsxs(
137
+ Accordion,
138
+ {
139
+ defaultExpanded: true,
140
+ sx: {
141
+ marginTop: `${theme.spacing(1)} !important`,
142
+ marginBottom: "0 !important",
143
+ "&:before": { height: 0 }
144
+ },
145
+ children: [
146
+ filter === "all" && /* @__PURE__ */ jsx(
147
+ AccordionSummary,
148
+ {
149
+ expandIcon: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-arrow-drop-down" }),
150
+ sx: {
151
+ minHeight: "initial !important",
152
+ mt: 0.5,
153
+ mb: 0,
154
+ px: 1,
155
+ "& .MuiAccordionSummary-content": { my: 0.5, mx: 0 },
156
+ "& .MuiAccordionSummary-content.Mui-expanded": { my: 0.5, mx: 0 }
157
+ },
158
+ children: /* @__PURE__ */ jsx(Typography, { variant: "body1", textTransform: "capitalize", children: type }, type)
159
+ }
160
+ ),
161
+ /* @__PURE__ */ jsxs(AccordionDetails, { sx: { px: 1 }, children: [
162
+ filter === "all" && /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", sx: { mb: 1 } }),
163
+ /* @__PURE__ */ jsx(Stack, { spacing: 1, divider: /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", flexItem: true }), children: annotationsByType[type].map((annotation, ann_id) => /* @__PURE__ */ jsx(AnnotationEntry, { annotation }, ann_id)) })
164
+ ] })
165
+ ]
166
+ },
167
+ id
168
+ ))
169
+ ] });
170
+ };
171
+ const AnnotationDetails$1 = memo(AnnotationDetails);
172
+ export {
173
+ AnnotationDetails$1 as A,
174
+ isNull as i
175
+ };
@@ -3,12 +3,12 @@ import { I as Icon } from "./iconify-CXMreGTg.js";
3
3
  import { useTheme, Popper, Fade, Paper, Stack, Typography, Divider } from "@mui/material";
4
4
  import AnnotationDetailPopover from "./components/AnnotationDetailPopover.js";
5
5
  import useAnnotations from "./hooks/useAnnotations.js";
6
- import { t as twitterShort } from "./utils-CxIhC2xH.js";
6
+ import { t as twitterShort } from "./utils-Dr4wbKBZ.js";
7
7
  import { useState, useRef, useCallback, useEffect, useMemo } from "react";
8
8
  import { c as createContext, u as useContextSelector } from "./index-BDVjGvMI.js";
9
9
  import { SHOW_EVENT_ID, HIDE_EVENT_ID } from "./data/event.js";
10
10
  import { safeDispatchEvent, safeAddEventListener } from "./utils/window.js";
11
- import { i as isNull } from "./isUndefined-CE8h73dH.js";
11
+ import { i as isNull } from "./AnnotationDetails-C_P001d3.js";
12
12
  const CluePopupContext = createContext(null);
13
13
  const CluePopupProvider = ({ children }) => {
14
14
  const [popupType, setPopupType] = useState(null);
@@ -1,16 +1,16 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { a as addAPIProvider } from "./iconify-CXMreGTg.js";
3
- import { u as useClueTypeConfig, a as api, p as post } from "./useClueTypeConfig-D4zcy8Gr.js";
3
+ import { u as useClueTypeConfig, a as api, p as post } from "./useClueTypeConfig-CH-nGq6a.js";
4
4
  import { clueDebugLogger } from "./utils/loggerUtil.js";
5
+ import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
6
+ import { t as toFinite } from "./toFinite-Bc55msYj.js";
7
+ import { d as debounce } from "./debounce-bV0h5FC5.js";
8
+ import { g as groupBy } from "./groupBy-DC2oOuBN.js";
9
+ import { b as baseUniq } from "./_baseUniq-CpupKWcL.js";
5
10
  import { useContext, useMemo, useState, useRef, useEffect, useCallback } from "react";
6
11
  import { c as createContext } from "./index-BDVjGvMI.js";
7
12
  import { ClueDatabaseContext } from "./hooks/ClueDatabaseContext.js";
8
13
  import useClueConfig from "./hooks/useClueConfig.js";
9
- import { g as groupBy } from "./groupBy-DC2oOuBN.js";
10
- import { b as baseUniq } from "./_baseUniq-CpupKWcL.js";
11
- import { d as debounce } from "./debounce-bV0h5FC5.js";
12
- import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
13
- import { t as toFinite } from "./toFinite-Bc55msYj.js";
14
14
  function toInteger(value) {
15
15
  var result = toFinite(value), remainder = result % 1;
16
16
  return result === result ? remainder ? result - remainder : result : 0;
@@ -1,10 +1,10 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { BulkEnrichResponses, Selector } from "../../types/lookup";
3
3
 
4
- export declare function uri(): string;
5
- export declare function post(bulkData: Selector[], sources?: string[], options?: {
4
+ export declare const uri: () => string;
5
+ export declare const post: (bulkData: Selector[], sources?: string[], options?: {
6
6
  classification?: string;
7
7
  timeout?: number;
8
8
  includeRaw?: boolean;
9
9
  noCache?: boolean;
10
- }, config?: AxiosRequestConfig): Promise<BulkEnrichResponses>;
10
+ }, config?: AxiosRequestConfig) => Promise<BulkEnrichResponses>;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Popover } from "@mui/material";
3
3
  import React__default, { useRef, useState, useEffect } from "react";
4
- import AnnotationDetails from "./AnnotationDetails.js";
4
+ import { A as AnnotationDetails } from "../AnnotationDetails-C_P001d3.js";
5
5
  const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
6
6
  var _a, _b, _c;
7
7
  const actionRef = useRef();
@@ -1,172 +1,23 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { I as Icon } from "../iconify-CXMreGTg.js";
3
- import { useTheme, Stack, Typography, Tooltip, Box, IconButton, CircularProgress, Chip, Accordion, AccordionSummary, AccordionDetails, Divider } from "@mui/material";
4
- import Iconified from "./display/icons/Iconified.js";
5
- import { SNACKBAR_EVENT_ID } from "../data/event.js";
6
- import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
7
- import { useClueEnrichSelector } from "../hooks/selectors.js";
8
- import useAnnotations from "../hooks/useAnnotations.js";
9
- import useErrors from "../hooks/useErrors.js";
10
- import { ICON_MAP } from "../icons/iconMap.js";
11
- import { safeDispatchEvent } from "../utils/window.js";
12
- import { memo, useState, useMemo, useCallback, useEffect } from "react";
13
- import { u as useContextSelector } from "../index-BDVjGvMI.js";
14
- import ExecutePopover from "./actions/ExecutePopover.js";
15
- import AnnotationEntry from "./AnnotationEntry.js";
16
- import ClassificationChip from "./ClassificationChip.js";
17
- import EnrichPopover from "./enrichment/EnrichPopover.js";
18
- import { u as uniq } from "../ClueEnrichContext-m-4vn9rz.js";
19
- import { g as groupBy } from "../groupBy-DC2oOuBN.js";
20
- import { i as isNull } from "../isUndefined-CE8h73dH.js";
21
- const AnnotationDetails = ({ enrichRequest, setReady, updatePosition }) => {
22
- const theme = useTheme();
23
- const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
24
- const [filter, setFilter] = useState("all");
25
- const enrich = useClueEnrichSelector((state) => state.enrich);
26
- const [annotations, loading] = useAnnotations(
27
- enrichRequest == null ? void 0 : enrichRequest.type,
28
- enrichRequest == null ? void 0 : enrichRequest.value,
29
- enrichRequest == null ? void 0 : enrichRequest.classification,
30
- { skipEnrichment: true }
31
- );
32
- const errors = useErrors(enrichRequest == null ? void 0 : enrichRequest.value);
33
- const options = useMemo(
34
- () => ["all", ...uniq((annotations ?? []).map((annotation) => annotation.type))],
35
- [annotations]
36
- );
37
- const annotationsByType = useMemo(() => groupBy(annotations ?? [], "type"), [annotations]);
38
- const forceEnrich = useCallback(async () => {
39
- await enrich(enrichRequest.type, enrichRequest.value, {
40
- classification: enrichRequest.classification,
41
- timeout: 15,
42
- force: true
43
- });
44
- }, [enrichRequest, enrich]);
45
- useEffect(() => {
46
- if (!setReady) {
47
- return;
48
- }
49
- setReady(enrichRequest && !isNull(annotations));
50
- updatePosition == null ? void 0 : updatePosition();
51
- }, [annotations, enrichRequest, setReady, updatePosition]);
52
- return enrichRequest && !isNull(annotations) && /* @__PURE__ */ jsxs(Stack, { direction: "column", sx: { p: 1, width: "100%" }, spacing: 1, children: [
53
- /* @__PURE__ */ jsxs(Stack, { spacing: 1, children: [
54
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
55
- /* @__PURE__ */ jsxs(Stack, { children: [
56
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
57
- /* @__PURE__ */ jsx(Typography, { variant: "body1", fontWeight: "bold", children: "Clue" }),
58
- enrichRequest.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: enrichRequest.classification })
59
- ] }),
60
- /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
61
- enrichRequest.type.toLocaleUpperCase(),
62
- " ",
63
- t("enrichment")
64
- ] })
65
- ] }),
66
- /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
67
- /* @__PURE__ */ jsx(Tooltip, { title: t("refresh"), children: /* @__PURE__ */ jsx(Box, { sx: { alignSelf: "center", m: -1 }, children: /* @__PURE__ */ jsx(IconButton, { onClick: () => forceEnrich(), disabled: loading, children: loading ? /* @__PURE__ */ jsx(CircularProgress, { variant: "indeterminate", size: 20 }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-replay", fontSize: "small" }) }) }) }),
68
- /* @__PURE__ */ jsx(Tooltip, { title: t("clipboard"), children: /* @__PURE__ */ jsx(
69
- IconButton,
70
- {
71
- sx: { alignSelf: "center", m: -1 },
72
- onClick: () => {
73
- navigator.clipboard.writeText(enrichRequest.value);
74
- safeDispatchEvent(
75
- new CustomEvent(SNACKBAR_EVENT_ID, {
76
- detail: {
77
- message: `${enrichRequest.value} ${t("clipboard.success")}`,
78
- level: "success"
79
- }
80
- })
81
- );
82
- },
83
- children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-assignment", fontSize: "small" })
84
- }
85
- ) }),
86
- /* @__PURE__ */ jsx(EnrichPopover, { selector: enrichRequest }),
87
- /* @__PURE__ */ jsx(ExecutePopover, { selectors: [enrichRequest] })
88
- ] }),
89
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, children: [
90
- options.map((opt, id) => /* @__PURE__ */ jsx(
91
- Chip,
92
- {
93
- size: "small",
94
- variant: opt === filter ? "filled" : "outlined",
95
- icon: ICON_MAP[opt] && /* @__PURE__ */ jsx(Icon, { icon: ICON_MAP[opt] }),
96
- label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
97
- opt,
98
- ":",
99
- " ",
100
- opt === "all" ? annotations.length : annotations.filter((annotation) => annotation.type === opt).length
101
- ] }),
102
- onClick: () => setFilter(opt)
103
- },
104
- id
105
- )),
106
- (errors == null ? void 0 : errors.length) > 0 && /* @__PURE__ */ jsx(
107
- Tooltip,
108
- {
109
- title: /* @__PURE__ */ jsx("div", { onClick: (e) => e.stopPropagation(), children: errors.map((err, err_id) => /* @__PURE__ */ jsxs("div", { children: [
110
- /* @__PURE__ */ jsx("span", { style: { textTransform: "capitalize" }, children: err.source.replace(/-/g, " ") }),
111
- ":",
112
- " ",
113
- err.message
114
- ] }, err_id)) }),
115
- children: /* @__PURE__ */ jsx(
116
- Chip,
117
- {
118
- size: "small",
119
- variant: "outlined",
120
- icon: /* @__PURE__ */ jsx(Icon, { icon: "material-symbols:timer-outline", color: theme.palette.error.main }),
121
- label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
122
- t("annotation.failed"),
123
- ": ",
124
- errors.length
125
- ] }),
126
- onClick: forceEnrich
127
- }
128
- )
129
- }
130
- )
131
- ] })
132
- ] }),
133
- /* @__PURE__ */ jsx(Box, {}),
134
- Object.keys(annotationsByType).filter((type) => !filter || filter === "all" || type === filter).map((type, id) => /* @__PURE__ */ jsxs(
135
- Accordion,
136
- {
137
- defaultExpanded: true,
138
- sx: {
139
- marginTop: `${theme.spacing(1)} !important`,
140
- marginBottom: "0 !important",
141
- "&:before": { height: 0 }
142
- },
143
- children: [
144
- filter === "all" && /* @__PURE__ */ jsx(
145
- AccordionSummary,
146
- {
147
- expandIcon: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-arrow-drop-down" }),
148
- sx: {
149
- minHeight: "initial !important",
150
- mt: 0.5,
151
- mb: 0,
152
- px: 1,
153
- "& .MuiAccordionSummary-content": { my: 0.5, mx: 0 },
154
- "& .MuiAccordionSummary-content.Mui-expanded": { my: 0.5, mx: 0 }
155
- },
156
- children: /* @__PURE__ */ jsx(Typography, { variant: "body1", textTransform: "capitalize", children: type }, type)
157
- }
158
- ),
159
- /* @__PURE__ */ jsxs(AccordionDetails, { sx: { px: 1 }, children: [
160
- filter === "all" && /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", sx: { mb: 1 } }),
161
- /* @__PURE__ */ jsx(Stack, { spacing: 1, divider: /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", flexItem: true }), children: annotationsByType[type].map((annotation, ann_id) => /* @__PURE__ */ jsx(AnnotationEntry, { annotation }, ann_id)) })
162
- ] })
163
- ]
164
- },
165
- id
166
- ))
167
- ] });
168
- };
169
- const AnnotationDetails$1 = memo(AnnotationDetails);
1
+ import "react/jsx-runtime";
2
+ import "../iconify-CXMreGTg.js";
3
+ import "@mui/material";
4
+ import "./display/icons/Iconified.js";
5
+ import "../data/event.js";
6
+ import "../hooks/ClueComponentContext.js";
7
+ import "../hooks/selectors.js";
8
+ import "../hooks/useAnnotations.js";
9
+ import "../hooks/useErrors.js";
10
+ import "../icons/iconMap.js";
11
+ import "../utils/window.js";
12
+ import "../groupBy-DC2oOuBN.js";
13
+ import { A } from "../AnnotationDetails-C_P001d3.js";
14
+ import "../ClueEnrichContext-DmhtfJg_.js";
15
+ import "react";
16
+ import "../index-BDVjGvMI.js";
17
+ import "./actions/ExecutePopover.js";
18
+ import "./AnnotationEntry.js";
19
+ import "./ClassificationChip.js";
20
+ import "./enrichment/EnrichPopover.js";
170
21
  export {
171
- AnnotationDetails$1 as default
22
+ A as default
172
23
  };
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { I as Icon } from "../iconify-CXMreGTg.js";
3
3
  import { Stack, Typography, Chip, IconButton } from "@mui/material";
4
4
  import Iconified from "./display/icons/Iconified.js";
5
- import { t as twitterShort } from "../utils-CxIhC2xH.js";
5
+ import { t as twitterShort } from "../utils-Dr4wbKBZ.js";
6
6
  import { memo } from "react";
7
7
  import AnnotationBody from "./AnnotationBody.js";
8
8
  import ClassificationChip from "./ClassificationChip.js";
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../iconify-CXMreGTg.js";
3
3
  import "@mui/material";
4
- import { A } from "../AnnotationPreview-BvNpZOP0.js";
4
+ import { A } from "../AnnotationPreview-BOpYuxD1.js";
5
5
  import "../hooks/useAnnotations.js";
6
- import "../utils-CxIhC2xH.js";
6
+ import "../utils-Dr4wbKBZ.js";
7
7
  import "react";
8
8
  import "../index-BDVjGvMI.js";
9
9
  export {
@@ -10,10 +10,10 @@ import ContextIcon from "../icons/Context.js";
10
10
  import OpinionIcon from "../icons/Opinion.js";
11
11
  import { ICON_MAP } from "../icons/iconMap.js";
12
12
  import FrequencyText from "../text/Frequency.js";
13
+ import { u as uniq } from "../ClueEnrichContext-DmhtfJg_.js";
13
14
  import { memo, useState, useMemo, useCallback } from "react";
14
15
  import { u as useContextSelector } from "../index-BDVjGvMI.js";
15
16
  import AnnotationEntry from "./AnnotationEntry.js";
16
- import { u as uniq } from "../ClueEnrichContext-m-4vn9rz.js";
17
17
  const EnrichedCard = ({
18
18
  type,
19
19
  value,
@@ -3,7 +3,7 @@ import { Chip, Tooltip, Box, Stack, CircularProgress } from "@mui/material";
3
3
  import Iconified from "./display/icons/Iconified.js";
4
4
  import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
5
5
  import { ClueGroupContext } from "../hooks/ClueGroupContext.js";
6
- import { C as CluePopupContext } from "../AnnotationPreview-BvNpZOP0.js";
6
+ import { C as CluePopupContext } from "../AnnotationPreview-BOpYuxD1.js";
7
7
  import { useClueEnrichSelector } from "../hooks/selectors.js";
8
8
  import useAnnotations from "../hooks/useAnnotations.js";
9
9
  import ActionIcon from "../icons/Action.js";
@@ -3,7 +3,7 @@ import { useTheme, Stack, CircularProgress, Tooltip, IconButton } from "@mui/mat
3
3
  import Iconified from "./display/icons/Iconified.js";
4
4
  import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
5
5
  import { ClueGroupContext } from "../hooks/ClueGroupContext.js";
6
- import { C as CluePopupContext } from "../AnnotationPreview-BvNpZOP0.js";
6
+ import { C as CluePopupContext } from "../AnnotationPreview-BOpYuxD1.js";
7
7
  import { useClueEnrichSelector } from "../hooks/selectors.js";
8
8
  import useAnnotations from "../hooks/useAnnotations.js";
9
9
  import ActionIcon from "../icons/Action.js";
@@ -3,14 +3,14 @@ import "@jsonforms/material-renderers";
3
3
  import "@jsonforms/react";
4
4
  import "@mui/material";
5
5
  import "../display/icons/Iconified.js";
6
- import "../../index-BDrtH5ec.js";
6
+ import "../../index-BMxyILVD.js";
7
7
  import "../../hooks/ClueComponentContext.js";
8
- import { A } from "../../ActionForm-c5hLIfQ-.js";
8
+ import { A } from "../../ActionForm-D4ryHO0M.js";
9
+ import "../../utils-Dr4wbKBZ.js";
9
10
  import "react";
10
11
  import "../../index-BDVjGvMI.js";
11
12
  import "../ErrorBoundary.js";
12
13
  import "./form/schemaAdapter.js";
13
- import "../../utils-CxIhC2xH.js";
14
14
  export {
15
15
  A as default
16
16
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { I as Icon } from "../../iconify-CXMreGTg.js";
3
3
  import { Modal, Paper, Stack, Typography, Divider, Button } from "@mui/material";
4
- import { J as JSONViewer } from "../../index-BDrtH5ec.js";
4
+ import { J as JSONViewer } from "../../index-BMxyILVD.js";
5
5
  import Markdown from "../display/markdown/index.js";
6
6
  import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
7
7
  import { memo } from "react";
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { Stack, Typography, Card, CardContent, Divider, Collapse } from "@mui/material";
3
- import { a as isPlainObject, f as flatten$1 } from "../../../../utils-CxIhC2xH.js";
3
+ import { a as isPlainObject, f as flatten$1 } from "../../../../utils-Dr4wbKBZ.js";
4
4
  import { cssImportant } from "../../../../utils/graph.js";
5
5
  import { b as baseGet, c as castPath, t as toKey, a as arrayMap } from "../../../../_baseGet-BSK_nnoz.js";
6
6
  import { c as copyObject, g as getAllKeysIn, b as baseClone } from "../../../../_baseClone-D3a8Pa4T.js";
@@ -9,7 +9,7 @@ import { b as baseSlice } from "../../../../_baseSlice-GAv_YFTT.js";
9
9
  import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-D4huXoEI.js";
10
10
  import { useState, useEffect, useCallback, Fragment as Fragment$1 } from "react";
11
11
  import Iconified from "../../icons/Iconified.js";
12
- import { J as JSONViewer } from "../../../../index-BDrtH5ec.js";
12
+ import { J as JSONViewer } from "../../../../index-BMxyILVD.js";
13
13
  import Markdown from "../../markdown/index.js";
14
14
  import ExpandMoreButton from "../ExpandMoreButton.js";
15
15
  import NodeTag from "./NodeTag.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useRef, useState, useEffect, useCallback, createElement } from "react";
3
3
  import { useTheme, lighten, darken, Stack, Card, Typography, alpha, Autocomplete, TextField, FormControl, InputLabel, Select, MenuItem, IconButton, Collapse } from "@mui/material";
4
- import { p as parseEvent } from "../../../index-BDrtH5ec.js";
4
+ import { p as parseEvent } from "../../../index-BMxyILVD.js";
5
5
  import { z as zoom, i as identity, s as select, t as transform, p as pointer } from "../../../index-BbPn6-Mw.js";
6
6
  import useComparator from "../../../hooks/useComparator.js";
7
7
  import { useMyLocalStorageItem } from "../../../hooks/useMyLocalStorage.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@mui/material";
3
- import { J } from "../../../index-BDrtH5ec.js";
4
- import "../../../utils-CxIhC2xH.js";
3
+ import { J } from "../../../index-BMxyILVD.js";
4
+ import "../../../utils-Dr4wbKBZ.js";
5
5
  import "../../../hooks/ClueComponentContext.js";
6
6
  import "../../../hooks/useMyLocalStorage.js";
7
7
  import "../../../utils/constants.js";
@@ -1,9 +1,9 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Box, Typography, Divider } from "@mui/material";
3
3
  import { useClueComponentSelector, useClueEnrichSelector } from "../../hooks/selectors.js";
4
+ import { c as capitalize } from "../../ActionForm-D4ryHO0M.js";
4
5
  import { useState, useRef, useCallback, useEffect } from "react";
5
6
  import Iconified from "../display/icons/Iconified.js";
6
- import { c as capitalize } from "../../ActionForm-c5hLIfQ-.js";
7
7
  const EnrichPopover = ({ show = false, size = "small", selector }) => {
8
8
  const { t } = useClueComponentSelector((ctx) => ctx.i18next);
9
9
  const theme = useTheme();
@@ -3,7 +3,7 @@ import { I as Icon } from "../../iconify-CXMreGTg.js";
3
3
  import { useTheme, Skeleton, Chip, Tooltip, Paper, Stack, Box, IconButton } from "@mui/material";
4
4
  import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
5
5
  import Iconified from "../display/icons/Iconified.js";
6
- import { J as JSONViewer } from "../../index-BDrtH5ec.js";
6
+ import { J as JSONViewer } from "../../index-BMxyILVD.js";
7
7
  import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
8
8
  import { useClueFetcherSelector } from "../../hooks/selectors.js";
9
9
  import React__default, { useState, useEffect, memo } from "react";
@@ -1,7 +1,7 @@
1
1
  import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
2
+ import { i as isEqual } from "../../utils-Dr4wbKBZ.js";
2
3
  import { memo, useEffect } from "react";
3
4
  import { u as useContextSelector } from "../../index-BDVjGvMI.js";
4
- import { i as isEqual } from "../../utils-CxIhC2xH.js";
5
5
  const Entry = ({ children, entry, selected = false }) => {
6
6
  const setValues = useContextSelector(ClueGroupContext, (ctx) => ctx == null ? void 0 : ctx.setValues);
7
7
  useEffect(() => {
@@ -6,10 +6,10 @@ import { SNACKBAR_EVENT_ID } from "../../data/event.js";
6
6
  import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
7
7
  import { useClueComponentSelector, useClueEnrichSelector } from "../../hooks/selectors.js";
8
8
  import { safeDispatchEvent } from "../../utils/window.js";
9
+ import { c as capitalize } from "../../ActionForm-D4ryHO0M.js";
9
10
  import { useState, useMemo, useCallback } from "react";
10
11
  import { u as useContextSelector } from "../../index-BDVjGvMI.js";
11
12
  import ExecutePopover from "../actions/ExecutePopover.js";
12
- import { c as capitalize } from "../../ActionForm-c5hLIfQ-.js";
13
13
  const GroupControl = () => {
14
14
  const { t } = useClueComponentSelector((ctx) => ctx.i18next);
15
15
  const { type, values, classification } = useContextSelector(ClueGroupContext, (ctx) => ({
package/database/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b } from "../index-Dn2NHyXg.js";
1
+ import { b } from "../index-Dz1kF2MU.js";
2
2
  export {
3
3
  b as default
4
4
  };