@cccsaurora/clue-ui 1.2.0-dev.143 → 1.2.0-dev.146

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.
@@ -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, Box, Typography, Divider } from "@mui/material";
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__ */ jsx(
66
- Box,
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
- px: 3,
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: () => executeAction(actionId, selectors),
76
- children: /* @__PURE__ */ jsxs(Stack, { children: [
77
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
78
- action.action_icon && /* @__PURE__ */ jsx(Icon, { icon: action.action_icon }),
79
- /* @__PURE__ */ jsx(Typography, { variant: "body1", children: action.name }),
80
- /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: action.classification })
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
- action.summary && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: action.summary })
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
  )) }) })
@@ -2,6 +2,7 @@
2
2
  "action.available": "Available Actions",
3
3
  "action.data": "Action Data",
4
4
  "actions.execute": "Execute",
5
+ "actions.execute.menu": "Execute with options",
5
6
  "actions.executing": "Executing",
6
7
  "actions.json.hide": "Hide JSON",
7
8
  "actions.json.show": "Show JSON",
@@ -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",
@@ -43,8 +43,15 @@ const useAnnotations = (type, value, _classification, { skipEnrichment } = { ski
43
43
  }
44
44
  const observable = database.selectors.find({
45
45
  selector: {
46
- // Use regex instead of exact value for case-insensitivity
47
- value: { $regex: `^${value}$`, $options: "i" }
46
+ $or: [
47
+ {
48
+ // Use regex instead of exact value for case-insensitivity
49
+ value: { $regex: `^${value}$`, $options: "i" }
50
+ },
51
+ {
52
+ value
53
+ }
54
+ ]
48
55
  }
49
56
  }).$.subscribe(
50
57
  (result) => setAnnotations(
package/package.json CHANGED
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "type": "module",
65
65
  "types": "main.d.ts",
66
- "version": "1.2.0-dev.143",
66
+ "version": "1.2.0-dev.146",
67
67
  "exports": {
68
68
  ".": "./main.js",
69
69
  "./index.css": "./index.css",