@cccsaurora/clue-ui 1.2.0-dev.246 → 1.2.0-dev.250
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-D7K1Dr1M.js → ActionForm-C0aE9HUv.js} +35 -7
- package/{AnnotationDetails-Gb4M_dPK.js → AnnotationDetails-CEou0vCc.js} +1 -1
- package/{AnnotationPreview-CvN6eOeH.js → AnnotationPreview-CLMVD6Ec.js} +1 -1
- package/components/AnnotationDetailPopover.js +1 -1
- package/components/AnnotationDetails.js +2 -2
- package/components/AnnotationPreview.js +1 -1
- package/components/EnrichedCard.js +1 -1
- 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 +1 -1
- package/components/actions/ExecutePopover.js +1 -1
- package/components/actions/ResultModal.js +1 -1
- package/components/enrichment/EnrichPopover.js +1 -2
- package/components/fetchers/Fetcher.js +1 -1
- package/components/group/GroupControl.js +1 -2
- package/components/stats/QueryStatus.js +1 -1
- package/fr/translation.json +1 -1
- package/hooks/ClueActionContext.d.ts +5 -0
- package/hooks/ClueActionContext.js +2 -2
- package/hooks/ClueGroupContext.js +1 -1
- package/hooks/CluePopupContext.js +2 -2
- package/hooks/ClueProvider.js +2 -2
- package/hooks/selectors.js +9 -21
- package/hooks/useActionResult.js +2 -2
- package/hooks/useAnnotations.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/hooks/useErrors.js +1 -1
- package/hooks/useFetcherResult.js +1 -1
- package/icons/Action.js +2 -2
- package/icons/Assessment.js +1 -1
- package/icons/Context.js +1 -1
- package/icons/Opinion.js +1 -1
- package/main.js +8 -9
- package/package.json +1 -1
- package/types/RunningActionData.d.ts +2 -0
|
@@ -16,6 +16,8 @@ import { u as useContextSelector, c as createContext, a as useContext } from "./
|
|
|
16
16
|
import ErrorBoundary from "./components/ErrorBoundary.js";
|
|
17
17
|
import { adaptSchema } from "./components/actions/form/schemaAdapter.js";
|
|
18
18
|
import { I as Icon } from "./iconify-CXMreGTg.js";
|
|
19
|
+
import { C as ClueEnrichContext } from "./ClueEnrichContext-BkD9ZwM9.js";
|
|
20
|
+
import { ClueFetcherContext } from "./hooks/ClueFetcherContext.js";
|
|
19
21
|
import ClassificationChip from "./components/ClassificationChip.js";
|
|
20
22
|
import Result from "./components/actions/formats/index.js";
|
|
21
23
|
import { SNACKBAR_EVENT_ID } from "./data/event.js";
|
|
@@ -5415,10 +5417,22 @@ const require$$3 = {
|
|
|
5415
5417
|
})(ajv, ajv.exports);
|
|
5416
5418
|
var ajvExports = ajv.exports;
|
|
5417
5419
|
const Ajv = /* @__PURE__ */ getDefaultExportFromCjs(ajvExports);
|
|
5420
|
+
const useClueFetcherSelector = (selector) => {
|
|
5421
|
+
return useContextSelector(ClueFetcherContext, selector);
|
|
5422
|
+
};
|
|
5423
|
+
const useClueActionsSelector = (selector) => {
|
|
5424
|
+
return useContextSelector(ClueActionContext, selector);
|
|
5425
|
+
};
|
|
5426
|
+
const useClueEnrichSelector = (selector) => {
|
|
5427
|
+
return useContextSelector(ClueEnrichContext, selector);
|
|
5428
|
+
};
|
|
5429
|
+
const useClueComponentSelector = (selector) => {
|
|
5430
|
+
return useContextSelector(ClueComponentContext, selector);
|
|
5431
|
+
};
|
|
5418
5432
|
const useActionResult = (resultWithData, interval = 2e3) => {
|
|
5419
5433
|
const [result, setResult] = useState(resultWithData);
|
|
5420
5434
|
const timeoutRef = useRef(null);
|
|
5421
|
-
const
|
|
5435
|
+
const getActionStatus = useClueActionsSelector((ctx) => ctx.getActionStatus);
|
|
5422
5436
|
const taskId = useMemo(() => resultWithData == null ? void 0 : resultWithData.task_id, [resultWithData == null ? void 0 : resultWithData.task_id]);
|
|
5423
5437
|
const actionId = useMemo(() => resultWithData == null ? void 0 : resultWithData.actionId, [resultWithData == null ? void 0 : resultWithData.actionId]);
|
|
5424
5438
|
useEffect(() => {
|
|
@@ -5537,11 +5551,12 @@ const ClueActionProvider = ({
|
|
|
5537
5551
|
);
|
|
5538
5552
|
const executeAction = useCallback(
|
|
5539
5553
|
async (actionId, selectors, params, options) => {
|
|
5540
|
-
const { forceMenu, onComplete, skipMenu, skipResultModal, timeout, includeContext, extraContext } = {
|
|
5554
|
+
const { forceMenu, onComplete, onCancel, skipMenu, skipResultModal, timeout, includeContext, extraContext } = {
|
|
5541
5555
|
forceMenu: false,
|
|
5542
5556
|
skipMenu: false,
|
|
5543
5557
|
skipResultModal: false,
|
|
5544
5558
|
onComplete: null,
|
|
5559
|
+
onCancel: null,
|
|
5545
5560
|
timeout: null,
|
|
5546
5561
|
includeContext: defaultIncludeContext ?? false,
|
|
5547
5562
|
extraContext: null,
|
|
@@ -5592,8 +5607,10 @@ const ClueActionProvider = ({
|
|
|
5592
5607
|
action: actionToRun,
|
|
5593
5608
|
selectors,
|
|
5594
5609
|
params: validatedParams ?? {},
|
|
5610
|
+
skipResultModal,
|
|
5595
5611
|
context: context2,
|
|
5596
5612
|
onComplete,
|
|
5613
|
+
onCancel,
|
|
5597
5614
|
timeout
|
|
5598
5615
|
});
|
|
5599
5616
|
return;
|
|
@@ -5607,7 +5624,7 @@ const ClueActionProvider = ({
|
|
|
5607
5624
|
{ timeout },
|
|
5608
5625
|
requestConfig
|
|
5609
5626
|
);
|
|
5610
|
-
const actionResultWithData = { ...actionResult, actionId, action: actionToRun };
|
|
5627
|
+
const actionResultWithData = { ...actionResult, actionId, action: actionToRun, params: validatedParams };
|
|
5611
5628
|
onComplete == null ? void 0 : onComplete(actionResultWithData);
|
|
5612
5629
|
setActionResults((_results) => {
|
|
5613
5630
|
const keys = selectors.map((value) => getHashKey(value.type, value.value, value.classification));
|
|
@@ -5652,6 +5669,7 @@ const ClueActionProvider = ({
|
|
|
5652
5669
|
if (!skipResultModal) {
|
|
5653
5670
|
setShowResultModal(true);
|
|
5654
5671
|
}
|
|
5672
|
+
setRunningActionData(null);
|
|
5655
5673
|
}
|
|
5656
5674
|
if (actionResult.format) {
|
|
5657
5675
|
setLastResult({ ...actionResult, actionId, action: actionToRun });
|
|
@@ -5695,9 +5713,11 @@ const ClueActionProvider = ({
|
|
|
5695
5713
|
[requestConfig]
|
|
5696
5714
|
);
|
|
5697
5715
|
const cancelAction = useCallback(() => {
|
|
5716
|
+
var _a;
|
|
5717
|
+
(_a = runningActionData == null ? void 0 : runningActionData.onCancel) == null ? void 0 : _a.call(runningActionData);
|
|
5698
5718
|
setRunningActionData(null);
|
|
5699
5719
|
setLoading(false);
|
|
5700
|
-
}, []);
|
|
5720
|
+
}, [runningActionData == null ? void 0 : runningActionData.onCancel]);
|
|
5701
5721
|
const getActionResults = useCallback(
|
|
5702
5722
|
(type2, value, classification) => actionResults[getHashKey(type2, value, classification)] ?? [],
|
|
5703
5723
|
[actionResults, getHashKey]
|
|
@@ -5782,6 +5802,9 @@ const ActionForm = ({ runningActionData }) => {
|
|
|
5782
5802
|
if (runningActionData == null ? void 0 : runningActionData.timeout) {
|
|
5783
5803
|
options.timeout = runningActionData == null ? void 0 : runningActionData.timeout;
|
|
5784
5804
|
}
|
|
5805
|
+
if (runningActionData == null ? void 0 : runningActionData.skipResultModal) {
|
|
5806
|
+
options.skipResultModal = runningActionData == null ? void 0 : runningActionData.skipResultModal;
|
|
5807
|
+
}
|
|
5785
5808
|
await executeAction(runningActionData == null ? void 0 : runningActionData.id, runningActionData == null ? void 0 : runningActionData.selectors, formData, options);
|
|
5786
5809
|
} catch (e) {
|
|
5787
5810
|
console.error(e);
|
|
@@ -5794,6 +5817,7 @@ const ActionForm = ({ runningActionData }) => {
|
|
|
5794
5817
|
runningActionData == null ? void 0 : runningActionData.selectors,
|
|
5795
5818
|
runningActionData == null ? void 0 : runningActionData.onComplete,
|
|
5796
5819
|
runningActionData == null ? void 0 : runningActionData.timeout,
|
|
5820
|
+
runningActionData == null ? void 0 : runningActionData.skipResultModal,
|
|
5797
5821
|
formData
|
|
5798
5822
|
]);
|
|
5799
5823
|
if (!(runningActionData == null ? void 0 : runningActionData.action)) {
|
|
@@ -5906,8 +5930,12 @@ export {
|
|
|
5906
5930
|
ActionForm_default as A,
|
|
5907
5931
|
ClueActionProvider as C,
|
|
5908
5932
|
ResultModal$1 as R,
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5933
|
+
useClueActionsSelector as a,
|
|
5934
|
+
useClueEnrichSelector as b,
|
|
5935
|
+
useClueFetcherSelector as c,
|
|
5936
|
+
useClueComponentSelector as d,
|
|
5937
|
+
capitalize as e,
|
|
5938
|
+
useActionResult as f,
|
|
5939
|
+
ClueActionContext as g,
|
|
5912
5940
|
useClueActions as u
|
|
5913
5941
|
};
|
|
@@ -4,7 +4,7 @@ import { useTheme, Stack, Typography, Tooltip, Box, IconButton, CircularProgress
|
|
|
4
4
|
import Iconified from "./components/display/icons/Iconified.js";
|
|
5
5
|
import { SNACKBAR_EVENT_ID } from "./data/event.js";
|
|
6
6
|
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
7
|
-
import { useClueEnrichSelector } from "./
|
|
7
|
+
import { b as useClueEnrichSelector } from "./ActionForm-C0aE9HUv.js";
|
|
8
8
|
import useAnnotations from "./hooks/useAnnotations.js";
|
|
9
9
|
import useErrors from "./hooks/useErrors.js";
|
|
10
10
|
import { ICON_MAP } from "./icons/iconMap.js";
|
|
@@ -8,7 +8,7 @@ import { useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
|
8
8
|
import { c as createContext, u as useContextSelector } from "./index-AMfoEg_6.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 "./AnnotationDetails-
|
|
11
|
+
import { i as isNull } from "./AnnotationDetails-CEou0vCc.js";
|
|
12
12
|
const CluePopupContext = createContext(null);
|
|
13
13
|
const CluePopupProvider = ({ children }) => {
|
|
14
14
|
const [popupType, setPopupType] = useState(null);
|
|
@@ -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 { A as AnnotationDetails } from "../AnnotationDetails-
|
|
4
|
+
import { A as AnnotationDetails } from "../AnnotationDetails-CEou0vCc.js";
|
|
5
5
|
const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
|
|
6
6
|
var _a, _b, _c;
|
|
7
7
|
const actionRef = useRef();
|
|
@@ -4,13 +4,13 @@ import "@mui/material";
|
|
|
4
4
|
import "./display/icons/Iconified.js";
|
|
5
5
|
import "../data/event.js";
|
|
6
6
|
import "../hooks/ClueComponentContext.js";
|
|
7
|
-
import "../
|
|
7
|
+
import "../ActionForm-C0aE9HUv.js";
|
|
8
8
|
import "../hooks/useAnnotations.js";
|
|
9
9
|
import "../hooks/useErrors.js";
|
|
10
10
|
import "../icons/iconMap.js";
|
|
11
11
|
import "../utils/window.js";
|
|
12
12
|
import "../groupBy-ChDRT7uy.js";
|
|
13
|
-
import { A } from "../AnnotationDetails-
|
|
13
|
+
import { A } from "../AnnotationDetails-CEou0vCc.js";
|
|
14
14
|
import "../useClueTypeConfig-D2tf4-NM.js";
|
|
15
15
|
import "react";
|
|
16
16
|
import "../index-AMfoEg_6.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../iconify-CXMreGTg.js";
|
|
3
3
|
import "@mui/material";
|
|
4
|
-
import { A } from "../AnnotationPreview-
|
|
4
|
+
import { A } from "../AnnotationPreview-CLMVD6Ec.js";
|
|
5
5
|
import "../hooks/useAnnotations.js";
|
|
6
6
|
import "../utils-71DpzFrA.js";
|
|
7
7
|
import "react";
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
3
|
import { useTheme, Card, CardHeader, Stack, CircularProgress, Divider, CardContent, Grid, Chip, Typography, Tooltip, Box } from "@mui/material";
|
|
4
4
|
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
5
|
-
import { useClueEnrichSelector } from "../
|
|
5
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.js";
|
|
6
6
|
import useAnnotations from "../hooks/useAnnotations.js";
|
|
7
7
|
import useErrors from "../hooks/useErrors.js";
|
|
8
8
|
import AssessmentIcon from "../icons/Assessment.js";
|
|
@@ -3,8 +3,8 @@ 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-
|
|
7
|
-
import { useClueEnrichSelector } from "../
|
|
6
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CLMVD6Ec.js";
|
|
7
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.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";
|
|
@@ -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 { useClueEnrichSelector } from "../
|
|
6
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CLMVD6Ec.js";
|
|
7
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.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 { useClueEnrichSelector } from "../
|
|
4
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.js";
|
|
5
5
|
import { u as useContextSelector } from "../index-AMfoEg_6.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 { useClueComponentSelector, useClueEnrichSelector } from "../
|
|
3
|
+
import { d as useClueComponentSelector, b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.js";
|
|
4
4
|
import { memo, useState, useEffect } from "react";
|
|
5
5
|
const SourcePicker = () => {
|
|
6
6
|
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
|
@@ -5,7 +5,7 @@ import "@mui/material";
|
|
|
5
5
|
import "../display/icons/Iconified.js";
|
|
6
6
|
import "../../index-UkW8Sur3.js";
|
|
7
7
|
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-
|
|
8
|
+
import { A } from "../../ActionForm-C0aE9HUv.js";
|
|
9
9
|
import "../../utils-71DpzFrA.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../../index-AMfoEg_6.js";
|
|
@@ -3,7 +3,7 @@ import { I as Icon } from "../../iconify-CXMreGTg.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 { useClueActionsSelector } from "../../
|
|
6
|
+
import { a as useClueActionsSelector } from "../../ActionForm-C0aE9HUv.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-CXMreGTg.js";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "../../hooks/ClueComponentContext.js";
|
|
5
|
-
import { R } from "../../ActionForm-
|
|
5
|
+
import { R } from "../../ActionForm-C0aE9HUv.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "../../index-AMfoEg_6.js";
|
|
8
8
|
import "../ClassificationChip.js";
|
|
@@ -1,7 +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 { useClueComponentSelector, useClueEnrichSelector } from "../../
|
|
4
|
-
import { c as capitalize } from "../../ActionForm-D7K1Dr1M.js";
|
|
3
|
+
import { d as useClueComponentSelector, b as useClueEnrichSelector, e as capitalize } from "../../ActionForm-C0aE9HUv.js";
|
|
5
4
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
6
5
|
import Iconified from "../display/icons/Iconified.js";
|
|
7
6
|
const EnrichPopover = ({ show = false, size = "small", selector }) => {
|
|
@@ -5,7 +5,7 @@ import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
|
|
|
5
5
|
import Iconified from "../display/icons/Iconified.js";
|
|
6
6
|
import { J as JSONViewer } from "../../index-UkW8Sur3.js";
|
|
7
7
|
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { useClueFetcherSelector } from "../../
|
|
8
|
+
import { c as useClueFetcherSelector } from "../../ActionForm-C0aE9HUv.js";
|
|
9
9
|
import React__default, { useState, useRef, useMemo, useEffect, memo } from "react";
|
|
10
10
|
import { u as useContextSelector } from "../../index-AMfoEg_6.js";
|
|
11
11
|
import Graph from "../display/graph/index.js";
|
|
@@ -4,9 +4,8 @@ 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 { useClueComponentSelector, useClueEnrichSelector } from "../../
|
|
7
|
+
import { d as useClueComponentSelector, b as useClueEnrichSelector, e as capitalize } from "../../ActionForm-C0aE9HUv.js";
|
|
8
8
|
import { safeDispatchEvent } from "../../utils/window.js";
|
|
9
|
-
import { c as capitalize } from "../../ActionForm-D7K1Dr1M.js";
|
|
10
9
|
import { useState, useMemo, useCallback } from "react";
|
|
11
10
|
import { u as useContextSelector } from "../../index-AMfoEg_6.js";
|
|
12
11
|
import ExecutePopover from "../actions/ExecutePopover.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 { useClueComponentSelector, useClueEnrichSelector } from "../../
|
|
4
|
+
import { d as useClueComponentSelector, b as useClueEnrichSelector } from "../../ActionForm-C0aE9HUv.js";
|
|
5
5
|
import { useContext, useState, useEffect } from "react";
|
|
6
6
|
const QueryStatus = () => {
|
|
7
7
|
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
package/fr/translation.json
CHANGED
|
@@ -43,6 +43,11 @@ export interface ClueActionContextType {
|
|
|
43
43
|
* @returns The action result
|
|
44
44
|
*/
|
|
45
45
|
onComplete?: (result: WithActionData<ActionResult>) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Callback for when the action is cancelled
|
|
48
|
+
* @returns void
|
|
49
|
+
*/
|
|
50
|
+
onCancel?: () => void;
|
|
46
51
|
/**
|
|
47
52
|
* how long should the action have to respond?
|
|
48
53
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
|
-
import {
|
|
3
|
+
import { g, C } from "../ActionForm-C0aE9HUv.js";
|
|
4
4
|
import "../useClueTypeConfig-D2tf4-NM.js";
|
|
5
5
|
import "../components/display/icons/Iconified.js";
|
|
6
6
|
import "../components/ErrorBoundary.js";
|
|
@@ -13,6 +13,6 @@ import "./ClueComponentContext.js";
|
|
|
13
13
|
import "./useClue.js";
|
|
14
14
|
import "../isNil-CIubwp4T.js";
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
g as ClueActionContext,
|
|
17
17
|
C as ClueActionProvider
|
|
18
18
|
};
|
|
@@ -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-AMfoEg_6.js";
|
|
4
|
-
import { useClueEnrichSelector } from "
|
|
4
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.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-CLMVD6Ec.js";
|
|
4
4
|
import "../data/event.js";
|
|
5
5
|
import "../utils/window.js";
|
|
6
|
-
import "../AnnotationDetails-
|
|
6
|
+
import "../AnnotationDetails-CEou0vCc.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "../index-AMfoEg_6.js";
|
|
9
9
|
export {
|
package/hooks/ClueProvider.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { C as ClueActionProvider } from "../ActionForm-
|
|
2
|
+
import { C as ClueActionProvider } from "../ActionForm-C0aE9HUv.js";
|
|
3
3
|
import { ClueComponentProvider } from "./ClueComponentContext.js";
|
|
4
4
|
import { ClueConfigProvider } from "./ClueConfigProvider.js";
|
|
5
5
|
import { ClueDatabaseProvider } from "./ClueDatabaseContext.js";
|
|
6
6
|
import { a as ClueEnrichProvider } from "../ClueEnrichContext-BkD9ZwM9.js";
|
|
7
7
|
import { ClueFetcherProvider } from "./ClueFetcherContext.js";
|
|
8
|
-
import { a as CluePopupProvider } from "../AnnotationPreview-
|
|
8
|
+
import { a as CluePopupProvider } from "../AnnotationPreview-CLMVD6Ec.js";
|
|
9
9
|
const ClueProvider = ({ children, ...props }) => {
|
|
10
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 }) }) }) }) }) }) });
|
|
11
11
|
};
|
package/hooks/selectors.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
import { a
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const useClueFetcherSelector = (selector) => {
|
|
7
|
-
return useContextSelector(ClueFetcherContext, selector);
|
|
8
|
-
};
|
|
9
|
-
const useClueActionsSelector = (selector) => {
|
|
10
|
-
return useContextSelector(ClueActionContext, selector);
|
|
11
|
-
};
|
|
12
|
-
const useClueEnrichSelector = (selector) => {
|
|
13
|
-
return useContextSelector(ClueEnrichContext, selector);
|
|
14
|
-
};
|
|
15
|
-
const useClueComponentSelector = (selector) => {
|
|
16
|
-
return useContextSelector(ClueComponentContext, selector);
|
|
17
|
-
};
|
|
1
|
+
import { a, d, b, c } from "../ActionForm-C0aE9HUv.js";
|
|
2
|
+
import "./ClueComponentContext.js";
|
|
3
|
+
import "../ClueEnrichContext-BkD9ZwM9.js";
|
|
4
|
+
import "./ClueFetcherContext.js";
|
|
5
|
+
import "../index-AMfoEg_6.js";
|
|
18
6
|
export {
|
|
19
|
-
useClueActionsSelector,
|
|
20
|
-
useClueComponentSelector,
|
|
21
|
-
useClueEnrichSelector,
|
|
22
|
-
useClueFetcherSelector
|
|
7
|
+
a as useClueActionsSelector,
|
|
8
|
+
d as useClueComponentSelector,
|
|
9
|
+
b as useClueEnrichSelector,
|
|
10
|
+
c as useClueFetcherSelector
|
|
23
11
|
};
|
package/hooks/useActionResult.js
CHANGED
package/hooks/useAnnotations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u as uniqBy } from "../ClueEnrichContext-BkD9ZwM9.js";
|
|
2
2
|
import { useContext, useMemo, useState, useEffect } from "react";
|
|
3
3
|
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
4
|
-
import { useClueEnrichSelector } from "
|
|
4
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.js";
|
|
5
5
|
const useAnnotations = (type, value, _classification, { skipEnrichment } = { skipEnrichment: false }) => {
|
|
6
6
|
const database = useContext(ClueDatabaseContext);
|
|
7
7
|
const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
|
package/hooks/useClueActions.js
CHANGED
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 { useClueEnrichSelector } from "
|
|
3
|
+
import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.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 { u as useClueActions } from "../ActionForm-
|
|
2
|
+
import { u as useClueActions } from "../ActionForm-C0aE9HUv.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-CXMreGTg.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 { u as useClueActions } from "../ActionForm-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CLMVD6Ec.js";
|
|
6
|
+
import { u as useClueActions } from "../ActionForm-C0aE9HUv.js";
|
|
7
7
|
import { g as groupBy } from "../groupBy-ChDRT7uy.js";
|
|
8
8
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
9
9
|
import { u as useContextSelector } from "../index-AMfoEg_6.js";
|
package/icons/Assessment.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-CXMreGTg.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-CLMVD6Ec.js";
|
|
6
6
|
import { g as groupBy } from "../groupBy-ChDRT7uy.js";
|
|
7
7
|
import { l as last } from "../last-CUCl67Im.js";
|
|
8
8
|
import { m as maxBy, s as sortBy } from "../sortBy-C7mGPI_D.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-CLMVD6Ec.js";
|
|
8
8
|
import { g as groupBy } from "../groupBy-ChDRT7uy.js";
|
|
9
9
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
10
10
|
import { u as useContextSelector } from "../index-AMfoEg_6.js";
|
package/icons/Opinion.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-CXMreGTg.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-CLMVD6Ec.js";
|
|
6
6
|
import chain from "../utils/chain.js";
|
|
7
7
|
import { g as groupBy } from "../groupBy-ChDRT7uy.js";
|
|
8
8
|
import { s as sortBy } from "../sortBy-C7mGPI_D.js";
|
package/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A, u } from "./ActionForm-
|
|
1
|
+
import { A, u, a, b, c } from "./ActionForm-C0aE9HUv.js";
|
|
2
2
|
import { default as default2 } from "./components/AnnotationDetailPopover.js";
|
|
3
|
-
import { A as A2 } from "./AnnotationDetails-
|
|
3
|
+
import { A as A2 } from "./AnnotationDetails-CEou0vCc.js";
|
|
4
4
|
import { default as default3 } from "./components/AnnotationEntry.js";
|
|
5
|
-
import { A as A3, C } from "./AnnotationPreview-
|
|
5
|
+
import { A as A3, C } from "./AnnotationPreview-CLMVD6Ec.js";
|
|
6
6
|
import { default as default4 } from "./components/CountBadge.js";
|
|
7
7
|
import { default as default5 } from "./components/EnrichedCard.js";
|
|
8
8
|
import { default as default6 } from "./components/EnrichedChip.js";
|
|
@@ -14,13 +14,12 @@ import { default as default11 } from "./components/group/Group.js";
|
|
|
14
14
|
import { default as default12 } from "./components/group/GroupControl.js";
|
|
15
15
|
import { default as default13 } from "./components/SourcePicker.js";
|
|
16
16
|
import { SNACKBAR_EVENT_ID } from "./data/event.js";
|
|
17
|
-
import { b } from "./index-C12gPw2W.js";
|
|
17
|
+
import { b as b2 } from "./index-C12gPw2W.js";
|
|
18
18
|
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
19
19
|
import { ClueConfigContext } from "./hooks/ClueConfigProvider.js";
|
|
20
20
|
import { ClueDatabaseContext } from "./hooks/ClueDatabaseContext.js";
|
|
21
21
|
import { C as C2 } from "./ClueEnrichContext-BkD9ZwM9.js";
|
|
22
22
|
import { ClueProvider } from "./hooks/ClueProvider.js";
|
|
23
|
-
import { useClueActionsSelector, useClueEnrichSelector, useClueFetcherSelector } from "./hooks/selectors.js";
|
|
24
23
|
import { default as default14 } from "./hooks/useClue.js";
|
|
25
24
|
import { default as default15 } from "./hooks/useClueConfig.js";
|
|
26
25
|
import { default as default16 } from "./icons/Assessment.js";
|
|
@@ -54,11 +53,11 @@ export {
|
|
|
54
53
|
SNACKBAR_EVENT_ID,
|
|
55
54
|
default13 as SourcePicker,
|
|
56
55
|
default9 as StatusChip,
|
|
57
|
-
|
|
56
|
+
b2 as buildDatabase,
|
|
58
57
|
default14 as useClue,
|
|
59
58
|
u as useClueActions,
|
|
60
|
-
useClueActionsSelector,
|
|
59
|
+
a as useClueActionsSelector,
|
|
61
60
|
default15 as useClueConfig,
|
|
62
|
-
useClueEnrichSelector,
|
|
63
|
-
useClueFetcherSelector
|
|
61
|
+
b as useClueEnrichSelector,
|
|
62
|
+
c as useClueFetcherSelector
|
|
64
63
|
};
|
package/package.json
CHANGED
|
@@ -9,7 +9,9 @@ interface RunningActionData {
|
|
|
9
9
|
selectors: Selector[];
|
|
10
10
|
params: { [index: string]: any };
|
|
11
11
|
context?: ActionContextInformation;
|
|
12
|
+
skipResultModal?: boolean;
|
|
12
13
|
onComplete?: (result: WithActionData<ActionResult>) => void;
|
|
14
|
+
onCancel?: () => void;
|
|
13
15
|
timeout?: number;
|
|
14
16
|
}
|
|
15
17
|
|