@cccsaurora/clue-ui 1.2.0-dev.145 → 1.2.0-dev.150
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-DMSoMN9b.js → ActionForm-BGuNY5So.js} +5 -1
- package/components/actions/ActionForm.js +1 -1
- package/components/actions/ExecutePopover.js +39 -12
- package/components/actions/ResultModal.js +1 -1
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/group/GroupControl.js +1 -1
- package/en/translation.json +1 -0
- package/fr/translation.json +1 -0
- package/hooks/ClueActionContext.js +1 -1
- package/hooks/ClueProvider.js +1 -1
- package/hooks/selectors.js +1 -1
- package/hooks/useActionResult.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/icons/Action.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
|
@@ -98,6 +98,10 @@ const ResultModal = ({ result: _result, onClose, show = false }) => {
|
|
|
98
98
|
var _a, _b;
|
|
99
99
|
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
100
100
|
const result = useActionResult(_result);
|
|
101
|
+
const resultFinished = useMemo(
|
|
102
|
+
() => (result == null ? void 0 : result.outcome) === "success" || (result == null ? void 0 : result.outcome) === "failure" || (result == null ? void 0 : result.done),
|
|
103
|
+
[result == null ? void 0 : result.done, result == null ? void 0 : result.outcome]
|
|
104
|
+
);
|
|
101
105
|
if (!result) {
|
|
102
106
|
return null;
|
|
103
107
|
}
|
|
@@ -111,7 +115,7 @@ const ResultModal = ({ result: _result, onClose, show = false }) => {
|
|
|
111
115
|
] }),
|
|
112
116
|
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: result.action.summary }),
|
|
113
117
|
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
114
|
-
|
|
118
|
+
resultFinished ? /* @__PURE__ */ jsx(ErrorBoundary, { children: result.format === "markdown" ? /* @__PURE__ */ jsx(Markdown, { md: result.output }) : result.format === "json" ? /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true }) : /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
|
|
115
119
|
/* @__PURE__ */ jsx(Markdown, { md: "`" + result.format + "` is not recognized as a format in this application." }),
|
|
116
120
|
/* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
|
|
117
121
|
] }) }) : /* @__PURE__ */ jsxs(Stack, { flex: 1, sx: { pt: 2, alignItems: "center" }, spacing: 1, children: [
|
|
@@ -5,7 +5,7 @@ import "@mui/material";
|
|
|
5
5
|
import "../display/icons/Iconified.js";
|
|
6
6
|
import "../../index-Bmoj6JY8.js";
|
|
7
7
|
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-
|
|
8
|
+
import { A } from "../../ActionForm-BGuNY5So.js";
|
|
9
9
|
import "../../utils-CW9CNV1h.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../../index-BDVjGvMI.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { I as Icon } from "../../iconify-CXMreGTg.js";
|
|
3
|
-
import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack,
|
|
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
6
|
import { useClueActionsSelector } from "../../hooks/selectors.js";
|
|
@@ -62,25 +62,52 @@ const ExecutePopover = ({ show = false, size = "small", selectors, multiples = f
|
|
|
62
62
|
onClose: () => setShowExecuteMenu(false),
|
|
63
63
|
anchorEl: executeEl.current,
|
|
64
64
|
anchorOrigin: { horizontal: "left", vertical: "bottom" },
|
|
65
|
-
children: /* @__PURE__ */ jsx(Paper, { onClick: () => setShowExecuteMenu(false), children: /* @__PURE__ */ jsx(Stack, { divider: /* @__PURE__ */ jsx(Divider, { flexItem: true, orientation: "horizontal" }), children: Object.entries(actions).map(([actionId, action]) => /* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
children: /* @__PURE__ */ jsx(Paper, { onClick: () => setShowExecuteMenu(false), children: /* @__PURE__ */ jsx(Stack, { divider: /* @__PURE__ */ jsx(Divider, { flexItem: true, orientation: "horizontal" }), children: Object.entries(actions).map(([actionId, action]) => /* @__PURE__ */ jsxs(
|
|
66
|
+
Stack,
|
|
67
67
|
{
|
|
68
68
|
sx: {
|
|
69
|
-
|
|
69
|
+
pl: 3,
|
|
70
|
+
pr: 2,
|
|
70
71
|
py: 1,
|
|
71
72
|
cursor: "pointer",
|
|
72
73
|
transition: theme.transitions.create("background-color"),
|
|
73
74
|
"&:hover": { backgroundColor: theme.palette.background.default }
|
|
74
75
|
},
|
|
75
|
-
onClick: () =>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
onClick: (ev) => {
|
|
77
|
+
if (!ev.isPropagationStopped()) {
|
|
78
|
+
executeAction(actionId, selectors);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
direction: "row",
|
|
82
|
+
spacing: 1,
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
|
|
86
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
87
|
+
action.action_icon && /* @__PURE__ */ jsx(Icon, { icon: action.action_icon }),
|
|
88
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: action.name }),
|
|
89
|
+
/* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: action.classification })
|
|
90
|
+
] }),
|
|
91
|
+
action.summary && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", maxWidth: "300px", children: action.summary })
|
|
81
92
|
] }),
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
Box,
|
|
95
|
+
{
|
|
96
|
+
sx: { pl: 1 },
|
|
97
|
+
onClick: (ev) => {
|
|
98
|
+
ev.stopPropagation();
|
|
99
|
+
},
|
|
100
|
+
children: /* @__PURE__ */ jsx(Tooltip, { title: t("actions.execute.menu"), children: /* @__PURE__ */ jsx(
|
|
101
|
+
IconButton,
|
|
102
|
+
{
|
|
103
|
+
size: "small",
|
|
104
|
+
onClick: () => executeAction(actionId, selectors, null, { forceMenu: true }),
|
|
105
|
+
children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-settings" })
|
|
106
|
+
}
|
|
107
|
+
) })
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
]
|
|
84
111
|
},
|
|
85
112
|
actionId
|
|
86
113
|
)) }) })
|
|
@@ -4,7 +4,7 @@ import "@mui/material";
|
|
|
4
4
|
import "../../index-Bmoj6JY8.js";
|
|
5
5
|
import "../display/markdown/index.js";
|
|
6
6
|
import "../../hooks/ClueComponentContext.js";
|
|
7
|
-
import { R } from "../../ActionForm-
|
|
7
|
+
import { R } from "../../ActionForm-BGuNY5So.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import "../../index-BDVjGvMI.js";
|
|
10
10
|
import "../ClassificationChip.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
+
import { c as capitalize } from "../../ActionForm-BGuNY5So.js";
|
|
5
5
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
6
6
|
import Iconified from "../display/icons/Iconified.js";
|
|
7
7
|
const EnrichPopover = ({ show = false, size = "small", selector }) => {
|
|
@@ -6,7 +6,7 @@ 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-
|
|
9
|
+
import { c as capitalize } from "../../ActionForm-BGuNY5So.js";
|
|
10
10
|
import { useState, useMemo, useCallback } from "react";
|
|
11
11
|
import { u as useContextSelector } from "../../index-BDVjGvMI.js";
|
|
12
12
|
import ExecutePopover from "../actions/ExecutePopover.js";
|
package/en/translation.json
CHANGED
package/fr/translation.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"action.available": "Actions disponibles",
|
|
3
3
|
"action.data": "Données d'Action",
|
|
4
4
|
"actions.execute": "Execute",
|
|
5
|
+
"actions.execute.menu": "Exécuter avec options",
|
|
5
6
|
"actions.executing": "Executing",
|
|
6
7
|
"actions.json.hide": "Masquer JSON",
|
|
7
8
|
"actions.json.show": "Afficher JSON",
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "@mui/material";
|
|
3
3
|
import "../index-CC12Ux-9.js";
|
|
4
4
|
import "../useClueTypeConfig-CHWm5uda.js";
|
|
5
|
-
import { a, C } from "../ActionForm-
|
|
5
|
+
import { a, C } from "../ActionForm-BGuNY5So.js";
|
|
6
6
|
import "../components/display/icons/Iconified.js";
|
|
7
7
|
import "../components/ErrorBoundary.js";
|
|
8
8
|
import "../data/event.js";
|
package/hooks/ClueProvider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { C as ClueActionProvider } from "../ActionForm-
|
|
2
|
+
import { C as ClueActionProvider } from "../ActionForm-BGuNY5So.js";
|
|
3
3
|
import { ClueComponentProvider } from "./ClueComponentContext.js";
|
|
4
4
|
import { ClueConfigProvider } from "./ClueConfigProvider.js";
|
|
5
5
|
import { ClueDatabaseProvider } from "./ClueDatabaseContext.js";
|
package/hooks/selectors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ClueActionContext } from "../ActionForm-
|
|
1
|
+
import { a as ClueActionContext } from "../ActionForm-BGuNY5So.js";
|
|
2
2
|
import { ClueComponentContext } from "./ClueComponentContext.js";
|
|
3
3
|
import { C as ClueEnrichContext } from "../ClueEnrichContext-DzZhWGxh.js";
|
|
4
4
|
import { ClueFetcherContext } from "./ClueFetcherContext.js";
|
package/hooks/useActionResult.js
CHANGED
package/hooks/useClueActions.js
CHANGED
package/icons/Action.js
CHANGED
|
@@ -3,7 +3,7 @@ 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
5
|
import { C as CluePopupContext } from "../AnnotationPreview-D5NX8_su.js";
|
|
6
|
-
import { u as useClueActions } from "../ActionForm-
|
|
6
|
+
import { u as useClueActions } from "../ActionForm-BGuNY5So.js";
|
|
7
7
|
import { g as groupBy } from "../groupBy-mXHt-nYT.js";
|
|
8
8
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
9
9
|
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
package/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, u } from "./ActionForm-
|
|
1
|
+
import { A, u } from "./ActionForm-BGuNY5So.js";
|
|
2
2
|
import { default as default2 } from "./components/AnnotationDetailPopover.js";
|
|
3
3
|
import { A as A2 } from "./AnnotationDetails-CbXSCkTF.js";
|
|
4
4
|
import { default as default3 } from "./components/AnnotationEntry.js";
|