@cccsaurora/clue-ui 1.3.0-dev.339 → 1.3.0-dev.344
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-irs9q3xm.js → ActionForm-bztRjYJE.js} +6 -6
- package/{AnnotationDetails-TaLlFe0h.js → AnnotationDetails-DXTY4rxn.js} +2 -2
- package/{AnnotationPreview-CC_9H0lC.js → AnnotationPreview-BLO29hn_.js} +2 -2
- package/{ClueEnrichContext-NZpr831K.js → ClueEnrichContext-fItpTzAE.js} +2 -2
- package/ClueUIPlugin-0udQl--U.js +452 -0
- package/{_baseFlatten-D3wtzJ86.js → _baseFlatten-B3PW43Vk.js} +1 -1
- package/_baseRest-Ca0ktDG8.js +8 -0
- package/{_baseUniq-BqxNeJD9.js → _baseUniq-Bx6CWGDV.js} +1 -0
- package/components/AnnotationDetailPopover.js +1 -1
- package/components/AnnotationDetails.js +3 -3
- package/components/AnnotationEntry.js +1 -1
- package/components/AnnotationPreview.js +2 -2
- package/components/EnrichedCard.js +2 -2
- package/components/EnrichedChip.js +2 -2
- package/components/EnrichedTypography.js +2 -2
- package/components/RetryFailedEnrichments.js +1 -1
- package/components/SourcePicker.js +1 -1
- package/components/actions/ActionForm.js +3 -3
- package/components/actions/ExecutePopover.js +1 -1
- package/components/actions/ResultModal.js +1 -1
- package/components/actions/formats/index.js +13 -12
- package/components/display/graph/elements/NodeCard.js +3 -3
- package/components/display/graph/index.js +1 -1
- package/components/display/json/index.js +2 -2
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/fetchers/Fetcher.js +10 -9
- package/components/fetchers/FetcherResultView.d.ts +4 -0
- package/components/fetchers/FetcherResultView.js +27 -0
- package/components/group/Entry.js +1 -1
- package/components/group/GroupControl.js +1 -1
- package/components/stats/QueryStatus.js +1 -1
- package/en/translation.json +1 -0
- package/fr/translation.json +1 -0
- package/hooks/ClueActionContext.js +1 -1
- package/hooks/ClueEnrichContext.js +3 -3
- package/hooks/ClueGroupContext.js +1 -1
- package/hooks/CluePopupContext.js +2 -2
- package/hooks/ClueProvider.d.ts +2 -1
- package/hooks/ClueProvider.js +56 -4
- package/hooks/selectors.js +2 -2
- package/hooks/useActionResult.js +1 -1
- package/hooks/useAnnotations.js +2 -2
- package/hooks/useClue.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/hooks/useClueTypeConfig.js +2 -2
- package/hooks/useErrors.js +1 -1
- package/hooks/useFetcherResult.js +1 -1
- package/icons/Action.js +2 -2
- package/icons/Assessment.js +2 -2
- package/icons/Context.js +1 -1
- package/icons/Opinion.js +2 -2
- package/{index-CIj4pr7O.js → index-BF4c1XBg.js} +1 -1
- package/index-BJm74d7l.js +25 -0
- package/index-BdAUKhOk.js +25 -0
- package/index-DP0SQqVY.js +25 -0
- package/index-DXpcBpjs.js +34 -0
- package/index-Kt3RwkVk.js +22 -0
- package/main.js +4 -4
- package/package.json +2 -1
- package/{sortBy-Tf6pz1tg.js → sortBy-Bjn6Gl0J.js} +2 -4
- package/store-Dslbt6yE.js +2108 -0
- package/{useClueTypeConfig-CnMg5Ny8.js → useClueTypeConfig-D2OeF2ug.js} +1 -1
- package/utils/chain.js +1 -1
- package/utils/utils.js +2 -2
- package/{utils-Du3XxQAT.js → utils-Dp6a9Q5X.js} +1 -1
|
@@ -3,8 +3,8 @@ 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-
|
|
7
|
-
import { f as useClueEnrichSelector } from "../ActionForm-
|
|
6
|
+
import { C as CluePopupContext } from "../AnnotationPreview-BLO29hn_.js";
|
|
7
|
+
import { f as useClueEnrichSelector } from "../ActionForm-bztRjYJE.js";
|
|
8
8
|
import useAnnotations from "../hooks/useAnnotations.js";
|
|
9
9
|
import ActionIcon from "../icons/Action.js";
|
|
10
10
|
import AssessmentIcon from "../icons/Assessment.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from "@mui/material";
|
|
3
3
|
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
4
|
-
import { f as useClueEnrichSelector } from "../ActionForm-
|
|
4
|
+
import { f as useClueEnrichSelector } from "../ActionForm-bztRjYJE.js";
|
|
5
5
|
import { a as useContextSelector } from "../index-_gpzM2Px.js";
|
|
6
6
|
const RetryFailedEnrichments = () => {
|
|
7
7
|
const enrichFailedEnrichments = useClueEnrichSelector((ctx) => ctx.enrichFailedEnrichments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Popover, TextField, Divider, Stack, FormControlLabel, Checkbox } from "@mui/material";
|
|
3
|
-
import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../ActionForm-
|
|
3
|
+
import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../ActionForm-bztRjYJE.js";
|
|
4
4
|
import { memo, useState, useEffect } from "react";
|
|
5
5
|
const SourcePicker = () => {
|
|
6
6
|
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
|
@@ -3,10 +3,10 @@ import "@jsonforms/material-renderers";
|
|
|
3
3
|
import "@jsonforms/react";
|
|
4
4
|
import "@mui/material";
|
|
5
5
|
import "../display/icons/Iconified.js";
|
|
6
|
-
import "../../index-
|
|
6
|
+
import "../../index-BF4c1XBg.js";
|
|
7
7
|
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-
|
|
9
|
-
import "../../utils-
|
|
8
|
+
import { A } from "../../ActionForm-bztRjYJE.js";
|
|
9
|
+
import "../../utils-Dp6a9Q5X.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../../index-_gpzM2Px.js";
|
|
12
12
|
import "../ErrorBoundary.js";
|
|
@@ -3,7 +3,7 @@ import { I as Icon } from "../../iconify-DJxl6dC-.js";
|
|
|
3
3
|
import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Typography, Box, Divider } from "@mui/material";
|
|
4
4
|
import Iconified from "../display/icons/Iconified.js";
|
|
5
5
|
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
6
|
-
import { d as useClueActionsSelector } from "../../ActionForm-
|
|
6
|
+
import { d as useClueActionsSelector } from "../../ActionForm-bztRjYJE.js";
|
|
7
7
|
import useClueConfig from "../../hooks/useClueConfig.js";
|
|
8
8
|
import { isAccessible } from "../../utils/classificationParser.js";
|
|
9
9
|
import { useState, useRef, useMemo, useEffect } from "react";
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../../iconify-DJxl6dC-.js";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "../../hooks/ClueComponentContext.js";
|
|
5
|
-
import { R } from "../../ActionForm-
|
|
5
|
+
import { R } from "../../ActionForm-bztRjYJE.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "../../index-_gpzM2Px.js";
|
|
8
8
|
import "../ClassificationChip.js";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Stack } from "@mui/material";
|
|
3
|
-
import { J as JSONViewer } from "../../../index-
|
|
3
|
+
import { J as JSONViewer } from "../../../index-BF4c1XBg.js";
|
|
4
4
|
import Markdown from "../../display/markdown/index.js";
|
|
5
|
-
import
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { u as usePluginStore, c as clueUIPluginStore } from "../../../store-Dslbt6yE.js";
|
|
6
7
|
const Result = ({ result }) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
const pluginStore = usePluginStore();
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const plugin = clueUIPluginStore.getPlugin(result.format, "action", result.actionId);
|
|
11
|
+
if (plugin) {
|
|
12
|
+
const component = pluginStore.executeFunction(`${plugin}.actionResult`, { result });
|
|
13
|
+
if (component) {
|
|
14
|
+
return component;
|
|
15
|
+
}
|
|
15
16
|
}
|
|
16
17
|
return /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
|
|
17
|
-
/* @__PURE__ */ jsx(Markdown, { md: "
|
|
18
|
+
/* @__PURE__ */ jsx(Markdown, { md: t("format.not.recognized", { format: result.format }) }),
|
|
18
19
|
/* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
|
|
19
20
|
] });
|
|
20
21
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Typography, Card, CardContent, Divider, Collapse } from "@mui/material";
|
|
3
|
-
import { b as isPlainObject, a as flatten$1 } from "../../../../utils-
|
|
3
|
+
import { b as isPlainObject, a as flatten$1 } from "../../../../utils-Dp6a9Q5X.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-DKnGz1D3.js";
|
|
6
6
|
import { c as copyObject, g as getAllKeysIn, b as baseClone } from "../../../../_baseClone-BUfES2sT.js";
|
|
7
7
|
import { l as last } from "../../../../last-CUCl67Im.js";
|
|
8
8
|
import { b as baseSlice } from "../../../../_baseSlice-GAv_YFTT.js";
|
|
9
|
-
import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-
|
|
9
|
+
import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-B3PW43Vk.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-
|
|
12
|
+
import { J as JSONViewer } from "../../../../index-BF4c1XBg.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, Autocomplete, TextField, FormControl, InputLabel, Select, MenuItem, alpha, IconButton, Collapse } from "@mui/material";
|
|
4
|
-
import { p as parseEvent } from "../../../index-
|
|
4
|
+
import { p as parseEvent } from "../../../index-BF4c1XBg.js";
|
|
5
5
|
import { z as zoom, i as identity, s as select, t as transform, p as pointer } from "../../../index-CVUD9o3t.js";
|
|
6
6
|
import { ClueComponentContext } from "../../../hooks/ClueComponentContext.js";
|
|
7
7
|
import useComparator from "../../../hooks/useComparator.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
|
-
import { J } from "../../../index-
|
|
4
|
-
import "../../../utils-
|
|
3
|
+
import { J } from "../../../index-BF4c1XBg.js";
|
|
4
|
+
import "../../../utils-Dp6a9Q5X.js";
|
|
5
5
|
import "../../../hooks/ClueComponentContext.js";
|
|
6
6
|
import "../../../hooks/useMyLocalStorage.js";
|
|
7
7
|
import "../../../utils/constants.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-
|
|
3
|
+
import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-bztRjYJE.js";
|
|
4
4
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
5
5
|
import Iconified from "../display/icons/Iconified.js";
|
|
6
6
|
const EnrichPopover = ({ show = false, size = "small", selector }) => {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { I as Icon } from "../../iconify-DJxl6dC-.js";
|
|
3
|
-
import { useTheme, Skeleton, Chip, Tooltip, Stack, Typography, LinearProgress, Paper,
|
|
3
|
+
import { useTheme, Skeleton, Chip, Tooltip, Stack, Typography, LinearProgress, Paper, 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-CIj4pr7O.js";
|
|
7
6
|
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { g as useClueFetcherSelector } from "../../ActionForm-
|
|
7
|
+
import { g as useClueFetcherSelector } from "../../ActionForm-bztRjYJE.js";
|
|
9
8
|
import React__default, { useState, useRef, useMemo, useEffect, memo } from "react";
|
|
10
9
|
import { a as useContextSelector } from "../../index-_gpzM2Px.js";
|
|
11
|
-
import
|
|
12
|
-
import Markdown from "../display/markdown/index.js";
|
|
10
|
+
import { FetcherResultView } from "./FetcherResultView.js";
|
|
13
11
|
import PreviewModal from "./PreviewModal.js";
|
|
14
12
|
import StatusChip from "./StatusChip.js";
|
|
15
13
|
const Fetcher = React__default.memo(
|
|
@@ -72,6 +70,12 @@ const Fetcher = React__default.memo(
|
|
|
72
70
|
}
|
|
73
71
|
})();
|
|
74
72
|
}, [classification, fetchSelector, fetcherId, t, type, value]);
|
|
73
|
+
const resultAdditionalProps = useMemo(() => {
|
|
74
|
+
if ((result == null ? void 0 : result.outcome) === "success" && result.format === "image") {
|
|
75
|
+
return { setShowPreview, ...imageProps };
|
|
76
|
+
}
|
|
77
|
+
return { result };
|
|
78
|
+
}, [imageProps, result]);
|
|
75
79
|
if (fetchCompleted) {
|
|
76
80
|
if (!fetcherId) {
|
|
77
81
|
console.warn("Missing fetcher Id. Component will not render.");
|
|
@@ -165,10 +169,7 @@ const Fetcher = React__default.memo(
|
|
|
165
169
|
},
|
|
166
170
|
children: [
|
|
167
171
|
result.outcome === "failure" && /* @__PURE__ */ jsx("code", { style: { color: theme.palette.error.main }, children: /* @__PURE__ */ jsx("pre", { style: { marginTop: 0, marginBottom: 0 }, children: result.error }) }),
|
|
168
|
-
|
|
169
|
-
result.format === "image" && /* @__PURE__ */ jsx("img", { src: result.data.image, alt: result.data.alt, ...imageProps, onClick: () => setShowPreview(true) }),
|
|
170
|
-
result.format === "json" && /* @__PURE__ */ jsx(Box, { sx: { ".react-json-view": { backgroundColor: "transparent !important" } }, children: /* @__PURE__ */ jsx(JSONViewer, { data: result.data }) }),
|
|
171
|
-
result.format === "graph" && /* @__PURE__ */ jsx(Graph, { graph: result.data, sx: { minHeight: "600px" } }),
|
|
172
|
+
/* @__PURE__ */ jsx(FetcherResultView, { result, ...resultAdditionalProps }),
|
|
172
173
|
/* @__PURE__ */ jsx(FlexOne, {}),
|
|
173
174
|
/* @__PURE__ */ jsxs(
|
|
174
175
|
Stack,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from "@mui/material";
|
|
3
|
+
import { J as JSONViewer } from "../../index-BF4c1XBg.js";
|
|
4
|
+
import Markdown from "../display/markdown/index.js";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { u as usePluginStore, c as clueUIPluginStore } from "../../store-Dslbt6yE.js";
|
|
7
|
+
const FetcherResultView = ({ result, ...props }) => {
|
|
8
|
+
const pluginStore = usePluginStore();
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const availablePlugins = clueUIPluginStore.getPlugin(result.format, "fetcher");
|
|
11
|
+
if (availablePlugins.length > 0) {
|
|
12
|
+
const plugin = availablePlugins.at(0);
|
|
13
|
+
if (plugin) {
|
|
14
|
+
const component = pluginStore.executeFunction(`${plugin}.fetcherResult`, { result, ...props });
|
|
15
|
+
if (component) {
|
|
16
|
+
return component;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Markdown, { md: t("format.not.recognized", { format: result.format }) }),
|
|
22
|
+
/* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
FetcherResultView
|
|
27
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
|
|
2
|
-
import { i as isEqual } from "../../utils-
|
|
2
|
+
import { i as isEqual } from "../../utils-Dp6a9Q5X.js";
|
|
3
3
|
import { memo, useEffect } from "react";
|
|
4
4
|
import { a as useContextSelector } from "../../index-_gpzM2Px.js";
|
|
5
5
|
const Entry = ({ children, entry, selected = false }) => {
|
|
@@ -4,7 +4,7 @@ import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
|
|
|
4
4
|
import Iconified from "../display/icons/Iconified.js";
|
|
5
5
|
import { SNACKBAR_EVENT_ID } from "../../data/event.js";
|
|
6
6
|
import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
|
|
7
|
-
import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-
|
|
7
|
+
import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-bztRjYJE.js";
|
|
8
8
|
import { safeDispatchEvent } from "../../utils/window.js";
|
|
9
9
|
import { useState, useMemo, useCallback } from "react";
|
|
10
10
|
import { a as useContextSelector } from "../../index-_gpzM2Px.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Typography } from "@mui/material";
|
|
3
3
|
import { ClueDatabaseContext } from "../../hooks/ClueDatabaseContext.js";
|
|
4
|
-
import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../../ActionForm-
|
|
4
|
+
import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../../ActionForm-bztRjYJE.js";
|
|
5
5
|
import { useContext, useState, useEffect } from "react";
|
|
6
6
|
const QueryStatus = () => {
|
|
7
7
|
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
package/en/translation.json
CHANGED
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"enrich": "Enrich",
|
|
53
53
|
"error": "Error",
|
|
54
54
|
"error.unexpected": "An unexpected error occurred",
|
|
55
|
+
"format.not.recognized": "Unable to display result. No available plugins to display returned format: `{{format}}`.",
|
|
55
56
|
"graph.no.dataset": "No dataset has been selected!",
|
|
56
57
|
"graph.node.input.label": "Enter a node ID, and press [ctrl + enter] to select it. [ctrl + space] will open an autocomplete menu.",
|
|
57
58
|
"graph.show.more": "show more",
|
package/fr/translation.json
CHANGED
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"enrich": "Enrichir",
|
|
53
53
|
"error": "Erreur",
|
|
54
54
|
"error.unexpected": "Une erreur inattendue s'est produite",
|
|
55
|
+
"format.not.recognized": "Impossible d'afficher le résultat. Aucun plugin disponible pour afficher le format renvoyé : `{{format}}`.",
|
|
55
56
|
"graph.no.dataset": "Aucun jeu de données n'a été sélectionné!",
|
|
56
57
|
"graph.node.input.label": "Entrez un ID de nœud et appuyez sur [ctrl + entrée] pour le sélectionner. [ctrl + espace] ouvrira un menu d'auto-complétion.",
|
|
57
58
|
"graph.show.more": "Afficher plus",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
|
-
import { C, a } from "../ActionForm-
|
|
3
|
+
import { C, a } from "../ActionForm-bztRjYJE.js";
|
|
4
4
|
import "../index-CmQM2DaO.js";
|
|
5
5
|
import "../components/display/icons/Iconified.js";
|
|
6
6
|
import "../components/ErrorBoundary.js";
|
|
@@ -3,15 +3,15 @@ import "../iconify-DJxl6dC-.js";
|
|
|
3
3
|
import "../index-CmQM2DaO.js";
|
|
4
4
|
import "../database/globals.js";
|
|
5
5
|
import "../utils/loggerUtil.js";
|
|
6
|
-
import { C, a } from "../ClueEnrichContext-
|
|
6
|
+
import { C, a } from "../ClueEnrichContext-fItpTzAE.js";
|
|
7
7
|
import "../sessionStorage-Dbmo2Exe.js";
|
|
8
8
|
import "../groupBy-CXx1vslF.js";
|
|
9
|
-
import "../useClueTypeConfig-
|
|
9
|
+
import "../useClueTypeConfig-D2OeF2ug.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../index-_gpzM2Px.js";
|
|
12
12
|
import "./ClueDatabaseContext.js";
|
|
13
13
|
import "./useClueConfig.js";
|
|
14
|
-
import "../_baseUniq-
|
|
14
|
+
import "../_baseUniq-Bx6CWGDV.js";
|
|
15
15
|
export {
|
|
16
16
|
C as ClueEnrichContext,
|
|
17
17
|
a as ClueEnrichProvider
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useMemo } from "react";
|
|
3
3
|
import { c as createContext } from "../index-_gpzM2Px.js";
|
|
4
|
-
import { f as useClueEnrichSelector } from "../ActionForm-
|
|
4
|
+
import { f as useClueEnrichSelector } from "../ActionForm-bztRjYJE.js";
|
|
5
5
|
const ClueGroupContext = createContext(null);
|
|
6
6
|
const ClueGroupProvider = ({ children, type, classification }) => {
|
|
7
7
|
const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../components/AnnotationDetailPopover.js";
|
|
3
|
-
import { C, a } from "../AnnotationPreview-
|
|
3
|
+
import { C, a } from "../AnnotationPreview-BLO29hn_.js";
|
|
4
4
|
import "../data/event.js";
|
|
5
5
|
import "../utils/window.js";
|
|
6
|
-
import "../AnnotationDetails-
|
|
6
|
+
import "../AnnotationDetails-DXTY4rxn.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "../index-_gpzM2Px.js";
|
|
9
9
|
export {
|
package/hooks/ClueProvider.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ClueUIPluginProviderProps } from 'components/app/providers/ClueUIPluginProvider';
|
|
1
2
|
import { FC, PropsWithChildren } from 'react';
|
|
2
3
|
import { ClueActionProps } from './ClueActionContext';
|
|
3
4
|
import { ClueComponentContextType } from './ClueComponentContext';
|
|
@@ -5,5 +6,5 @@ import { ClueConfigContextProps } from './ClueConfigProvider';
|
|
|
5
6
|
import { ClueDatabaseContextProps } from './ClueDatabaseContext';
|
|
6
7
|
import { ClueEnrichProps } from './ClueEnrichProps';
|
|
7
8
|
|
|
8
|
-
declare const ClueProvider: FC<PropsWithChildren<ClueEnrichProps & ClueActionProps & ClueComponentContextType & ClueDatabaseContextProps & ClueConfigContextProps>>;
|
|
9
|
+
declare const ClueProvider: FC<PropsWithChildren<ClueEnrichProps & ClueActionProps & ClueComponentContextType & ClueDatabaseContextProps & ClueConfigContextProps & ClueUIPluginProviderProps>>;
|
|
9
10
|
export { ClueProvider };
|
package/hooks/ClueProvider.js
CHANGED
|
@@ -1,13 +1,65 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
5
|
+
import { useEffect } from "react";
|
|
6
|
+
import { P as PluginProvider, c as clueUIPluginStore } from "../store-Dslbt6yE.js";
|
|
7
|
+
import { a as ClueActionProvider } from "../ActionForm-bztRjYJE.js";
|
|
3
8
|
import { ClueComponentProvider } from "./ClueComponentContext.js";
|
|
4
9
|
import { ClueConfigProvider } from "./ClueConfigProvider.js";
|
|
5
10
|
import { ClueDatabaseProvider } from "./ClueDatabaseContext.js";
|
|
6
|
-
import { a as ClueEnrichProvider } from "../ClueEnrichContext-
|
|
11
|
+
import { a as ClueEnrichProvider } from "../ClueEnrichContext-fItpTzAE.js";
|
|
7
12
|
import { ClueFetcherProvider } from "./ClueFetcherContext.js";
|
|
8
|
-
import { a as CluePopupProvider } from "../AnnotationPreview-
|
|
13
|
+
import { a as CluePopupProvider } from "../AnnotationPreview-BLO29hn_.js";
|
|
14
|
+
class ClueUIPluginsRegistry {
|
|
15
|
+
constructor() {
|
|
16
|
+
__publicField(this, "_plugins", [
|
|
17
|
+
// { name: 'TestPlugin', id: 'none', loadPlugin: () => import('./test') },
|
|
18
|
+
{ name: "MarkdownPlugin", id: "markdown", loadPlugin: () => import("../index-BdAUKhOk.js") },
|
|
19
|
+
{ name: "ImagePlugin", id: "image", loadPlugin: () => import("../index-DXpcBpjs.js") },
|
|
20
|
+
{ name: "JSONPlugin", id: "json", loadPlugin: () => import("../index-BJm74d7l.js") },
|
|
21
|
+
{ name: "GraphPlugin", id: "graph", loadPlugin: () => import("../index-DP0SQqVY.js") },
|
|
22
|
+
{ name: "FilePlugin", id: "file", loadPlugin: () => import("../index-Kt3RwkVk.js") }
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
getPlugins() {
|
|
26
|
+
return this._plugins;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const ClueUIPluginProvider = ({
|
|
30
|
+
plugins,
|
|
31
|
+
excludePlugins,
|
|
32
|
+
excludeBuiltInPlugins,
|
|
33
|
+
children
|
|
34
|
+
}) => {
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const loadPlugins = async () => {
|
|
37
|
+
if (plugins && Array.isArray(plugins)) {
|
|
38
|
+
for (const pluginDef of plugins) {
|
|
39
|
+
if (!(excludePlugins == null ? void 0 : excludePlugins.includes(pluginDef.id))) {
|
|
40
|
+
const pluginModule = await pluginDef.loadPlugin();
|
|
41
|
+
const plugin = new pluginModule.default();
|
|
42
|
+
clueUIPluginStore.install(plugin);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (!excludeBuiltInPlugins) {
|
|
47
|
+
const builtInPlugins = new ClueUIPluginsRegistry().getPlugins();
|
|
48
|
+
for (const pluginDef of builtInPlugins) {
|
|
49
|
+
if (!(excludePlugins == null ? void 0 : excludePlugins.includes(pluginDef.id))) {
|
|
50
|
+
const pluginModule = await pluginDef.loadPlugin();
|
|
51
|
+
const plugin = new pluginModule.default();
|
|
52
|
+
clueUIPluginStore.install(plugin);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
loadPlugins();
|
|
58
|
+
}, [excludeBuiltInPlugins, excludePlugins, plugins]);
|
|
59
|
+
return /* @__PURE__ */ jsx(PluginProvider, { pluginStore: clueUIPluginStore.pluginStore, children });
|
|
60
|
+
};
|
|
9
61
|
const ClueProvider = ({ children, ...props }) => {
|
|
10
|
-
return /* @__PURE__ */ jsx(ClueComponentProvider, { ...props, children: /* @__PURE__ */ jsx(ClueConfigProvider, { config: props.config, children: /* @__PURE__ */ jsx(ClueDatabaseProvider, { ...props, children: /* @__PURE__ */ jsx(ClueEnrichProvider, { ...props, children: /* @__PURE__ */ jsx(ClueFetcherProvider, { ...props, children: /* @__PURE__ */ jsx(ClueActionProvider, { ...props, children: /* @__PURE__ */ jsx(CluePopupProvider, { children }) }) }) }) }) }) });
|
|
62
|
+
return /* @__PURE__ */ jsx(ClueComponentProvider, { ...props, children: /* @__PURE__ */ jsx(ClueConfigProvider, { config: props.config, children: /* @__PURE__ */ jsx(ClueDatabaseProvider, { ...props, children: /* @__PURE__ */ jsx(ClueUIPluginProvider, { ...props, children: /* @__PURE__ */ jsx(ClueEnrichProvider, { ...props, children: /* @__PURE__ */ jsx(ClueFetcherProvider, { ...props, children: /* @__PURE__ */ jsx(ClueActionProvider, { ...props, children: /* @__PURE__ */ jsx(CluePopupProvider, { children }) }) }) }) }) }) }) });
|
|
11
63
|
};
|
|
12
64
|
export {
|
|
13
65
|
ClueProvider
|
package/hooks/selectors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d, e, f, g } from "../ActionForm-
|
|
1
|
+
import { d, e, f, g } from "../ActionForm-bztRjYJE.js";
|
|
2
2
|
import "./ClueComponentContext.js";
|
|
3
|
-
import "../ClueEnrichContext-
|
|
3
|
+
import "../ClueEnrichContext-fItpTzAE.js";
|
|
4
4
|
import "./ClueFetcherContext.js";
|
|
5
5
|
import "../index-_gpzM2Px.js";
|
|
6
6
|
export {
|
package/hooks/useActionResult.js
CHANGED
package/hooks/useAnnotations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as uniqBy } from "../ClueEnrichContext-
|
|
1
|
+
import { u as uniqBy } from "../ClueEnrichContext-fItpTzAE.js";
|
|
2
2
|
import { useContext, useMemo, useState, useEffect } from "react";
|
|
3
3
|
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
4
|
-
import { f as useClueEnrichSelector } from "../ActionForm-
|
|
4
|
+
import { f as useClueEnrichSelector } from "../ActionForm-bztRjYJE.js";
|
|
5
5
|
const useAnnotations = (type, value, _classification, { skipEnrichment } = { skipEnrichment: false }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
const database = useContext(ClueDatabaseContext);
|
package/hooks/useClue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as useContext } from "../index-_gpzM2Px.js";
|
|
2
|
-
import { C as ClueEnrichContext } from "../ClueEnrichContext-
|
|
2
|
+
import { C as ClueEnrichContext } from "../ClueEnrichContext-fItpTzAE.js";
|
|
3
3
|
const useClue = () => {
|
|
4
4
|
return useContext(ClueEnrichContext);
|
|
5
5
|
};
|
package/hooks/useClueActions.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../index-CmQM2DaO.js";
|
|
2
2
|
import "../utils/loggerUtil.js";
|
|
3
|
-
import "../_baseUniq-
|
|
3
|
+
import "../_baseUniq-Bx6CWGDV.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { a } from "../useClueTypeConfig-
|
|
5
|
+
import { a } from "../useClueTypeConfig-D2OeF2ug.js";
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
package/hooks/useErrors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext, useState, useEffect } from "react";
|
|
2
2
|
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
3
|
-
import { f as useClueEnrichSelector } from "../ActionForm-
|
|
3
|
+
import { f as useClueEnrichSelector } from "../ActionForm-bztRjYJE.js";
|
|
4
4
|
const useErrors = (value) => {
|
|
5
5
|
const database = useContext(ClueDatabaseContext);
|
|
6
6
|
const ready = useClueEnrichSelector((ctx) => ctx.ready);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useRef, useMemo, useEffect } from "react";
|
|
2
|
-
import { b as useClueActions } from "../ActionForm-
|
|
2
|
+
import { b as useClueActions } from "../ActionForm-bztRjYJE.js";
|
|
3
3
|
const useActionResult = (resultWithData, interval = 2e3) => {
|
|
4
4
|
const [result, setResult] = useState(resultWithData);
|
|
5
5
|
const timeoutRef = useRef(null);
|
package/icons/Action.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-DJxl6dC-.js";
|
|
3
3
|
import { useTheme, Stack, Divider, Typography } from "@mui/material";
|
|
4
4
|
import CountBadge from "../components/CountBadge.js";
|
|
5
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
6
|
-
import { b as useClueActions } from "../ActionForm-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-BLO29hn_.js";
|
|
6
|
+
import { b as useClueActions } from "../ActionForm-bztRjYJE.js";
|
|
7
7
|
import { g as groupBy } from "../groupBy-CXx1vslF.js";
|
|
8
8
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
9
9
|
import { a as useContextSelector } from "../index-_gpzM2Px.js";
|
package/icons/Assessment.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-DJxl6dC-.js";
|
|
3
3
|
import { useTheme, Stack, Chip, Divider, Grid, Tooltip } from "@mui/material";
|
|
4
4
|
import CountBadge from "../components/CountBadge.js";
|
|
5
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-BLO29hn_.js";
|
|
6
6
|
import { g as groupBy } from "../groupBy-CXx1vslF.js";
|
|
7
7
|
import { l as last } from "../last-CUCl67Im.js";
|
|
8
8
|
import { m as maxBy } from "../maxBy-a49mqwW9.js";
|
|
9
|
-
import { s as sortBy } from "../sortBy-
|
|
9
|
+
import { s as sortBy } from "../sortBy-Bjn6Gl0J.js";
|
|
10
10
|
import { s as sumBy } from "../sumBy-DZSVfXDE.js";
|
|
11
11
|
import { memo, useRef, useState, useMemo, useEffect } from "react";
|
|
12
12
|
import { a as useContextSelector } from "../index-_gpzM2Px.js";
|
package/icons/Context.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Stack, Divider } from "@mui/material";
|
|
|
4
4
|
import AnnotationEntry from "../components/AnnotationEntry.js";
|
|
5
5
|
import CountBadge from "../components/CountBadge.js";
|
|
6
6
|
import Iconified from "../components/display/icons/Iconified.js";
|
|
7
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
7
|
+
import { C as CluePopupContext } from "../AnnotationPreview-BLO29hn_.js";
|
|
8
8
|
import { g as groupBy } from "../groupBy-CXx1vslF.js";
|
|
9
9
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
10
10
|
import { a as useContextSelector } from "../index-_gpzM2Px.js";
|
package/icons/Opinion.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-DJxl6dC-.js";
|
|
3
3
|
import { useTheme, Stack, Chip, Divider, Grid } from "@mui/material";
|
|
4
4
|
import CountBadge from "../components/CountBadge.js";
|
|
5
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-BLO29hn_.js";
|
|
6
6
|
import { g as groupBy } from "../groupBy-CXx1vslF.js";
|
|
7
|
-
import { s as sortBy } from "../sortBy-
|
|
7
|
+
import { s as sortBy } from "../sortBy-Bjn6Gl0J.js";
|
|
8
8
|
import { s as sumBy } from "../sumBy-DZSVfXDE.js";
|
|
9
9
|
import { memo, useRef, useMemo, useCallback, useEffect } from "react";
|
|
10
10
|
import { a as useContextSelector } from "../index-_gpzM2Px.js";
|
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ClickAwayListener, TextField, InputAdornment, Popper, Paper, MenuList, MenuItem, ListItemText, useTheme, Stack, Skeleton } from "@mui/material";
|
|
6
6
|
import { useRef, useState, useEffect, useMemo, lazy } from "react";
|
|
7
|
-
import { r as removeEmpty, s as searchObject, a as flatten } from "./utils-
|
|
7
|
+
import { r as removeEmpty, s as searchObject, a as flatten } from "./utils-Dp6a9Q5X.js";
|
|
8
8
|
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
9
9
|
import { useMyLocalStorageItem } from "./hooks/useMyLocalStorage.js";
|
|
10
10
|
import { StorageKey } from "./utils/constants.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { J as JSONViewer } from "./index-BF4c1XBg.js";
|
|
6
|
+
import { C as ClueUIPlugin } from "./ClueUIPlugin-0udQl--U.js";
|
|
7
|
+
class JsonPlugin extends ClueUIPlugin {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
__publicField(this, "name", "JsonPlugin");
|
|
11
|
+
__publicField(this, "format", "json");
|
|
12
|
+
__publicField(this, "version", "1.0.0");
|
|
13
|
+
__publicField(this, "author", "Mrs. Peacock");
|
|
14
|
+
__publicField(this, "description", "Renders JSON with the default renderer or the overridden json component defined in the clue component provider.");
|
|
15
|
+
}
|
|
16
|
+
actionResult({ result }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true });
|
|
18
|
+
}
|
|
19
|
+
fetcherResult({ result }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(JSONViewer, { data: result.data });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
JsonPlugin as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import Markdown from "./components/display/markdown/index.js";
|
|
6
|
+
import { C as ClueUIPlugin } from "./ClueUIPlugin-0udQl--U.js";
|
|
7
|
+
class MarkdownPlugin extends ClueUIPlugin {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
__publicField(this, "name", "MarkdownPlugin");
|
|
11
|
+
__publicField(this, "format", "markdown");
|
|
12
|
+
__publicField(this, "version", "1.0.0");
|
|
13
|
+
__publicField(this, "author", "Professor Plum");
|
|
14
|
+
__publicField(this, "description", "Renders Markdown.");
|
|
15
|
+
}
|
|
16
|
+
actionResult({ result }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Markdown, { md: result.output });
|
|
18
|
+
}
|
|
19
|
+
fetcherResult({ result }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Markdown, { md: result.data });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
MarkdownPlugin as default
|
|
25
|
+
};
|