@cccsaurora/clue-ui 1.2.0-dev.253 → 1.2.0

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 (179) hide show
  1. package/ActionForm-pWyIi01Z.js +4460 -0
  2. package/AnnotationDetails-11P7yhyx.js +160 -0
  3. package/AnnotationPreview-BGqlBBcp.js +140 -0
  4. package/ClueEnrichContext-DDZf646J.js +418 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-BiTi0iqu.js +180 -0
  7. package/_Uint8Array-TJBs9NS2.js +101 -0
  8. package/_baseAssignValue-CNMLQZco.js +20 -0
  9. package/_baseClone-DajKHDCs.js +207 -0
  10. package/_baseExtremum-DhV10dXG.js +27 -0
  11. package/_baseFlatten-C8CjmqQ-.js +72 -0
  12. package/_baseGet-DSZygzyq.js +79 -0
  13. package/_baseIsEqual-C08cUUpA.js +147 -0
  14. package/_baseIteratee-DGZdhdqr.js +95 -0
  15. package/_baseSlice-M5RKzt1A.js +10 -0
  16. package/_baseSum-wEbgNeUs.js +10 -0
  17. package/_baseUniq-CGlHphLr.js +79 -0
  18. package/_commonjsHelpers-DaMA6jEr.js +8 -0
  19. package/_createAggregator-BvcoTZto.js +53 -0
  20. package/_getPrototype-Dm06JiGv.js +5 -0
  21. package/_getTag-Cfxlub3L.js +90 -0
  22. package/_setToArray-C7yMOeww.js +29 -0
  23. package/cloneDeep-wjl3XmFj.js +8 -0
  24. package/components/AnnotationBody.js +35 -49
  25. package/components/AnnotationDetailPopover.js +30 -36
  26. package/components/AnnotationDetails.js +7 -7
  27. package/components/AnnotationEntry.js +35 -35
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +23 -44
  30. package/components/CountBadge.js +26 -31
  31. package/components/EnrichedCard.js +97 -110
  32. package/components/EnrichedChip.js +105 -130
  33. package/components/EnrichedTypography.js +107 -133
  34. package/components/ErrorBoundary.js +24 -28
  35. package/components/RetryFailedEnrichments.js +9 -10
  36. package/components/SourcePicker.js +49 -57
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +59 -75
  39. package/components/actions/ResultModal.js +4 -4
  40. package/components/actions/form/schemaAdapter.js +23 -39
  41. package/components/actions/formats/FileResult.js +59 -86
  42. package/components/actions/formats/index.js +10 -21
  43. package/components/display/graph/ExpandMoreButton.js +10 -10
  44. package/components/display/graph/elements/NodeCard.js +91 -111
  45. package/components/display/graph/elements/NodeTag.js +13 -15
  46. package/components/display/graph/index.js +202 -261
  47. package/components/display/graph/visualizations/Leaf.js +69 -88
  48. package/components/display/graph/visualizations/cloud/index.js +81 -98
  49. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  50. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  53. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  54. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  55. package/components/display/graph/visualizations/icons/index.js +13 -14
  56. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  57. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  58. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  59. package/components/display/graph/visualizations/tree/index.js +305 -407
  60. package/components/display/icons/Iconified.js +12 -27
  61. package/components/display/json/index.js +4 -4
  62. package/components/display/markdown/index.js +5770 -8678
  63. package/components/enrichment/EnrichPopover.js +46 -54
  64. package/components/fetchers/Fetcher.js +117 -155
  65. package/components/fetchers/PreviewModal.js +17 -20
  66. package/components/fetchers/StatusChip.js +17 -21
  67. package/components/group/Entry.js +11 -13
  68. package/components/group/Group.js +10 -13
  69. package/components/group/GroupControl.js +65 -76
  70. package/components/stats/QueryStatus.js +33 -43
  71. package/countBy-pIyxNZhO.js +8 -0
  72. package/data/event.js +4 -6
  73. package/database/index.js +2 -2
  74. package/debounce-DryYcbJ4.js +56 -0
  75. package/get-CH7kz5Ix.js +8 -0
  76. package/groupBy-yNrpdipq.js +8 -0
  77. package/hooks/ClueActionContext.js +6 -6
  78. package/hooks/ClueComponentContext.js +23 -29
  79. package/hooks/ClueConfigProvider.js +12 -14
  80. package/hooks/ClueDatabaseContext.js +13 -19
  81. package/hooks/ClueEnrichContext.js +8 -8
  82. package/hooks/ClueFetcherContext.js +56 -83
  83. package/hooks/ClueGroupContext.js +14 -17
  84. package/hooks/CluePopupContext.js +5 -5
  85. package/hooks/ClueProvider.js +10 -12
  86. package/hooks/selectors.js +7 -7
  87. package/hooks/useActionResult.js +2 -2
  88. package/hooks/useAnnotations.js +31 -47
  89. package/hooks/useClue.js +4 -6
  90. package/hooks/useClueActions.js +3 -3
  91. package/hooks/useClueConfig.js +4 -6
  92. package/hooks/useClueTypeConfig.js +3 -3
  93. package/hooks/useComparator.js +435 -722
  94. package/hooks/useErrors.js +18 -22
  95. package/hooks/useFetcherResult.js +24 -33
  96. package/hooks/useMyHighlights.js +36 -66
  97. package/hooks/useMyLocalStorage.js +37 -66
  98. package/iconify-BBckr5AQ.js +1263 -0
  99. package/icons/Action.js +49 -66
  100. package/icons/Assessment.js +68 -84
  101. package/icons/Context.js +63 -77
  102. package/icons/Opinion.js +65 -77
  103. package/icons/iconMap.js +2 -2
  104. package/identity-ByMq8VxU.js +6 -0
  105. package/index-BHAe_V9n.js +12768 -0
  106. package/index-CA5CUNZO.js +975 -0
  107. package/index-D_ZywK71.js +358 -0
  108. package/index-Dj5C04IX.js +568 -0
  109. package/index-p5_wX7q1.js +11729 -0
  110. package/isNil-CjWwlQS3.js +6 -0
  111. package/isObject-B53jY8Qg.js +7 -0
  112. package/isObjectLike-BatpeCIi.js +29 -0
  113. package/isSymbol-C3_SC0Qp.js +8 -0
  114. package/last-7CdUxN0r.js +7 -0
  115. package/main.js +60 -60
  116. package/package.json +1 -1
  117. package/sortBy-0BpKRt8p.js +79 -0
  118. package/sumBy-Do6Ff4Bw.js +8 -0
  119. package/text/Frequency.js +23 -42
  120. package/toFinite-BMy6GObD.js +14 -0
  121. package/toNumber-YVhnnJv4.js +31 -0
  122. package/useClueTypeConfig-77zd_zdF.js +2292 -0
  123. package/utils/chain.js +64 -91
  124. package/utils/classificationParser.js +256 -519
  125. package/utils/constants.js +10 -35
  126. package/utils/graph.js +45 -72
  127. package/utils/hashUtil.js +7 -7
  128. package/utils/line.js +81 -131
  129. package/utils/loggerUtil.js +3 -5
  130. package/utils/sessionStorage.js +27 -41
  131. package/utils/time.js +423 -423
  132. package/utils/utils.js +9 -9
  133. package/utils/window.js +10 -21
  134. package/utils-D5hPDE7N.js +129 -0
  135. package/ActionForm-C0aE9HUv.js +0 -5941
  136. package/AnnotationDetails-CEou0vCc.js +0 -175
  137. package/AnnotationPreview-CLMVD6Ec.js +0 -188
  138. package/ClueEnrichContext-BkD9ZwM9.js +0 -541
  139. package/FlexOne-BSYAhhtG.js +0 -9
  140. package/_MapCache-WmuDdwuH.js +0 -222
  141. package/_Uint8Array-DdG4KLKn.js +0 -128
  142. package/_baseAssignValue-CGTuELqU.js +0 -25
  143. package/_baseClone-BpWiBnMp.js +0 -283
  144. package/_baseExtremum-BY663UjY.js +0 -33
  145. package/_baseFlatten-B69cDsaV.js +0 -92
  146. package/_baseGet-Bx3A4Qfp.js +0 -108
  147. package/_baseIsEqual-B4IufFlL.js +0 -208
  148. package/_baseIteratee-7AQvAy1o.js +0 -126
  149. package/_baseSlice-GAv_YFTT.js +0 -20
  150. package/_baseSum-D0WC1dN0.js +0 -13
  151. package/_baseUniq-B8fK6hI-.js +0 -115
  152. package/_commonjsHelpers-DWwsNxpa.js +0 -8
  153. package/_createAggregator-CwGPThny.js +0 -63
  154. package/_getPrototype-CblfEidB.js +0 -5
  155. package/_getTag-jwz4XLoZ.js +0 -126
  156. package/_setToArray-CaPKQhcz.js +0 -33
  157. package/cloneDeep-DmUylbkM.js +0 -8
  158. package/countBy-DqlU5OwT.js +0 -14
  159. package/debounce-bV0h5FC5.js +0 -92
  160. package/get-DSsNkRQs.js +0 -8
  161. package/groupBy-ChDRT7uy.js +0 -14
  162. package/iconify-CXMreGTg.js +0 -1782
  163. package/identity-CPGTqrE4.js +0 -6
  164. package/index-AMfoEg_6.js +0 -696
  165. package/index-B6C2a_Lg.js +0 -1172
  166. package/index-C12gPw2W.js +0 -17698
  167. package/index-DCKkHTvx.js +0 -15750
  168. package/index-UkW8Sur3.js +0 -465
  169. package/isNil-CIubwp4T.js +0 -6
  170. package/isObject-FTY-5JQX.js +0 -7
  171. package/isObjectLike-OAgjjZye.js +0 -48
  172. package/isSymbol-Xd2FsJyp.js +0 -8
  173. package/last-CUCl67Im.js +0 -7
  174. package/sortBy-C7mGPI_D.js +0 -100
  175. package/sumBy-CGALjmwQ.js +0 -8
  176. package/toFinite-Bc55msYj.js +0 -16
  177. package/toNumber-DPxy1FBy.js +0 -39
  178. package/useClueTypeConfig-D2tf4-NM.js +0 -3289
  179. package/utils-71DpzFrA.js +0 -199
@@ -1,13 +1,12 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Button } from "@mui/material";
3
- import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
4
- import { b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.js";
5
- import { u as useContextSelector } from "../index-AMfoEg_6.js";
6
- const RetryFailedEnrichments = () => {
7
- const enrichFailedEnrichments = useClueEnrichSelector((ctx) => ctx.enrichFailedEnrichments);
8
- const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
9
- return /* @__PURE__ */ jsx(Button, { onClick: enrichFailedEnrichments, children: t("retry.enrich") });
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { Button as o } from "@mui/material";
3
+ import { ClueComponentContext as i } from "../hooks/ClueComponentContext.js";
4
+ import { b as c } from "../ActionForm-pWyIi01Z.js";
5
+ import { u as m } from "../index-Dj5C04IX.js";
6
+ const p = () => {
7
+ const t = c((e) => e.enrichFailedEnrichments), { t: r } = m(i, (e) => e.i18next);
8
+ return /* @__PURE__ */ n(o, { onClick: t, children: r("retry.enrich") });
10
9
  };
11
10
  export {
12
- RetryFailedEnrichments as default
11
+ p as default
13
12
  };
@@ -1,98 +1,90 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { Button, Popover, TextField, Divider, Stack, FormControlLabel, Checkbox } from "@mui/material";
3
- import { d as useClueComponentSelector, b as useClueEnrichSelector } from "../ActionForm-C0aE9HUv.js";
4
- import { memo, useState, useEffect } from "react";
5
- const SourcePicker = () => {
6
- const { t } = useClueComponentSelector((ctx) => ctx.i18next);
7
- const availableSources = useClueEnrichSelector((state) => state.availableSources);
8
- const sources = useClueEnrichSelector((state) => state.sources);
9
- const setSources = useClueEnrichSelector((state) => state.setSources);
10
- const [anchorEl, setAnchorEl] = useState(null);
11
- const [sourceFilter, setSourceFilter] = useState();
12
- const handleClick = (event) => {
13
- setAnchorEl(event.currentTarget);
1
+ import { jsxs as n, Fragment as k, jsx as l } from "react/jsx-runtime";
2
+ import { Button as v, Popover as w, TextField as z, Divider as _, Stack as F, FormControlLabel as d, Checkbox as m } from "@mui/material";
3
+ import { d as E, b as a } from "../ActionForm-pWyIi01Z.js";
4
+ import { memo as P, useState as g, useEffect as T } from "react";
5
+ const L = () => {
6
+ const { t: r } = E((e) => e.i18next), o = a((e) => e.availableSources), t = a((e) => e.sources), c = a((e) => e.setSources), [s, i] = g(null), [h, x] = g(), f = (e) => {
7
+ i(e.currentTarget);
8
+ }, C = () => {
9
+ i(null);
14
10
  };
15
- const handleClose = () => {
16
- setAnchorEl(null);
17
- };
18
- useEffect(() => {
19
- setSources(availableSources);
20
- }, [availableSources]);
21
- const id = !!anchorEl ? "sources-popover" : void 0;
22
- return /* @__PURE__ */ jsxs(Fragment, { children: [
23
- /* @__PURE__ */ jsxs(Button, { "aria-describedby": id, variant: "outlined", onClick: handleClick, children: [
24
- t("sources"),
11
+ T(() => {
12
+ c(o);
13
+ }, [o]);
14
+ const u = s ? "sources-popover" : void 0;
15
+ return /* @__PURE__ */ n(k, { children: [
16
+ /* @__PURE__ */ n(v, { "aria-describedby": u, variant: "outlined", onClick: f, children: [
17
+ r("sources"),
25
18
  " (",
26
- sources.length === availableSources.length ? t("all") : sources.length,
19
+ t.length === o.length ? r("all") : t.length,
27
20
  ")"
28
21
  ] }),
29
- /* @__PURE__ */ jsxs(
30
- Popover,
22
+ /* @__PURE__ */ n(
23
+ w,
31
24
  {
32
- id,
33
- open: !!anchorEl,
34
- anchorEl,
35
- onClose: handleClose,
25
+ id: u,
26
+ open: !!s,
27
+ anchorEl: s,
28
+ onClose: C,
36
29
  anchorOrigin: {
37
30
  vertical: "bottom",
38
31
  horizontal: "left"
39
32
  },
40
33
  children: [
41
- /* @__PURE__ */ jsx(
42
- TextField,
34
+ /* @__PURE__ */ l(
35
+ z,
43
36
  {
44
- fullWidth: true,
37
+ fullWidth: !0,
45
38
  sx: { p: 1, width: "350px" },
46
- placeholder: t("quicksearch.placeholder"),
47
- onChange: (event) => setSourceFilter(event.target.value.toLowerCase())
39
+ placeholder: r("quicksearch.placeholder"),
40
+ onChange: (e) => x(e.target.value.toLowerCase())
48
41
  }
49
42
  ),
50
- /* @__PURE__ */ jsx(Divider, { orientation: "horizontal" }),
51
- /* @__PURE__ */ jsxs(Stack, { spacing: 0.5, m: 1, sx: { maxHeight: "500px", overflow: "auto" }, onClick: (e) => e.stopPropagation(), children: [
52
- /* @__PURE__ */ jsx(
53
- FormControlLabel,
43
+ /* @__PURE__ */ l(_, { orientation: "horizontal" }),
44
+ /* @__PURE__ */ n(F, { spacing: 0.5, m: 1, sx: { maxHeight: "500px", overflow: "auto" }, onClick: (e) => e.stopPropagation(), children: [
45
+ /* @__PURE__ */ l(
46
+ d,
54
47
  {
55
- control: /* @__PURE__ */ jsx(
56
- Checkbox,
48
+ control: /* @__PURE__ */ l(
49
+ m,
57
50
  {
58
51
  size: "small",
59
- checked: sources.length === availableSources.length,
52
+ checked: t.length === o.length,
60
53
  sx: { mr: 1 },
61
- onChange: (__, checked) => {
62
- setSources(checked ? availableSources : []);
54
+ onChange: (e, p) => {
55
+ c(p ? o : []);
63
56
  }
64
57
  }
65
58
  ),
66
- label: sources.length < availableSources.length ? t("sources.select.all") : t("sources.select.none"),
59
+ label: t.length < o.length ? r("sources.select.all") : r("sources.select.none"),
67
60
  sx: { whiteSpace: "nowrap", textTransform: "capitalize" }
68
61
  }
69
62
  ),
70
- availableSources.filter((source) => !sourceFilter || source.toLowerCase().includes(sourceFilter)).map((source) => /* @__PURE__ */ jsx(
71
- FormControlLabel,
63
+ o.filter((e) => !h || e.toLowerCase().includes(h)).map((e) => /* @__PURE__ */ l(
64
+ d,
72
65
  {
73
- control: /* @__PURE__ */ jsx(
74
- Checkbox,
66
+ control: /* @__PURE__ */ l(
67
+ m,
75
68
  {
76
69
  size: "small",
77
- checked: sources.includes(source),
78
- onChange: (__, checked) => {
79
- setSources(checked ? [...sources, source] : sources.filter((src) => src !== source));
70
+ checked: t.includes(e),
71
+ onChange: (p, S) => {
72
+ c(S ? [...t, e] : t.filter((b) => b !== e));
80
73
  },
81
74
  sx: { mr: 1 }
82
75
  }
83
76
  ),
84
- label: source.replace(/[_-]/g, " "),
77
+ label: e.replace(/[_-]/g, " "),
85
78
  sx: { whiteSpace: "nowrap", textTransform: "capitalize" }
86
79
  },
87
- source
80
+ e
88
81
  ))
89
82
  ] })
90
83
  ]
91
84
  }
92
85
  )
93
86
  ] });
94
- };
95
- const SourcePicker_default = memo(SourcePicker);
87
+ }, B = P(L);
96
88
  export {
97
- SourcePicker_default as default
89
+ B as default
98
90
  };
@@ -3,12 +3,12 @@ import "@jsonforms/material-renderers";
3
3
  import "@jsonforms/react";
4
4
  import "@mui/material";
5
5
  import "../display/icons/Iconified.js";
6
- import "../../index-UkW8Sur3.js";
6
+ import "../../index-D_ZywK71.js";
7
7
  import "../../hooks/ClueComponentContext.js";
8
- import { A } from "../../ActionForm-C0aE9HUv.js";
9
- import "../../utils-71DpzFrA.js";
8
+ import { A } from "../../ActionForm-pWyIi01Z.js";
9
+ import "../../utils-D5hPDE7N.js";
10
10
  import "react";
11
- import "../../index-AMfoEg_6.js";
11
+ import "../../index-Dj5C04IX.js";
12
12
  import "../ErrorBoundary.js";
13
13
  import "./form/schemaAdapter.js";
14
14
  export {
@@ -1,120 +1,104 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { I as Icon } from "../../iconify-CXMreGTg.js";
3
- import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Typography, Box, Divider } from "@mui/material";
4
- import Iconified from "../display/icons/Iconified.js";
5
- import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
6
- import { a as useClueActionsSelector } from "../../ActionForm-C0aE9HUv.js";
7
- import useClueConfig from "../../hooks/useClueConfig.js";
8
- import { isAccessible } from "../../utils/classificationParser.js";
9
- import { useState, useRef, useMemo, useEffect } from "react";
10
- import { u as useContextSelector } from "../../index-AMfoEg_6.js";
11
- import ClassificationChip from "../ClassificationChip.js";
12
- const ExecutePopover = ({ show = false, size = "small", selectors, multiples = false }) => {
13
- const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
14
- const theme = useTheme();
15
- const availableActions = useClueActionsSelector((ctx) => ctx.availableActions);
16
- const refreshActions = useClueActionsSelector((ctx) => ctx.refreshActions);
17
- const executeAction = useClueActionsSelector((ctx) => ctx.executeAction);
18
- const loading = useClueActionsSelector((ctx) => ctx.loading);
19
- const { config } = useClueConfig();
20
- const [showExecuteMenu, setShowExecuteMenu] = useState(show);
21
- const executeEl = useRef(null);
22
- const actions = useMemo(
1
+ import { jsxs as s, Fragment as j, jsx as e } from "react/jsx-runtime";
2
+ import { I as O } from "../../iconify-BBckr5AQ.js";
3
+ import { useTheme as w, Tooltip as S, IconButton as z, CircularProgress as E, Button as D, Popover as M, Paper as B, Stack as l, Typography as I, Box as T, Divider as F } from "@mui/material";
4
+ import h from "../display/icons/Iconified.js";
5
+ import { ClueComponentContext as R } from "../../hooks/ClueComponentContext.js";
6
+ import { a } from "../../ActionForm-pWyIi01Z.js";
7
+ import W from "../../hooks/useClueConfig.js";
8
+ import { isAccessible as q } from "../../utils/classificationParser.js";
9
+ import { useState as G, useRef as H, useMemo as J, useEffect as P } from "react";
10
+ import { u as K } from "../../index-Dj5C04IX.js";
11
+ import L from "../ClassificationChip.js";
12
+ const ie = ({ show: u = !1, size: _ = "small", selectors: i, multiples: x = !1 }) => {
13
+ const { t: p } = K(R, (o) => o.i18next), g = w(), C = a((o) => o.availableActions), b = a((o) => o.refreshActions), y = a((o) => o.executeAction), f = a((o) => o.loading), { config: k } = W(), [m, r] = G(u), d = H(null), v = J(
23
14
  () => Object.fromEntries(
24
- Object.entries(availableActions).filter(
25
- ([__, action]) => {
26
- var _a;
27
- return (!((_a = action.supported_types) == null ? void 0 : _a.length) || selectors.every((value) => action.supported_types.includes(value == null ? void 0 : value.type))) && (!multiples || action.accept_multiple || selectors.length === 1) && selectors.every((value) => isAccessible(action.classification, value.classification, config.c12nDef));
15
+ Object.entries(C).filter(
16
+ ([o, t]) => {
17
+ var n;
18
+ return (!((n = t.supported_types) != null && n.length) || i.every((c) => t.supported_types.includes(c == null ? void 0 : c.type))) && (!x || t.accept_multiple || i.length === 1) && i.every((c) => q(t.classification, c.classification, k.c12nDef));
28
19
  }
29
20
  )
30
21
  ),
31
- [availableActions, config.c12nDef, multiples, selectors]
32
- );
33
- const actionDisabled = Object.keys(actions).length < 1 || loading || selectors.length < 1;
34
- useEffect(() => {
35
- setShowExecuteMenu(show);
36
- }, [show]);
37
- useEffect(() => {
38
- if (showExecuteMenu) {
39
- refreshActions();
40
- }
41
- }, [refreshActions, showExecuteMenu]);
42
- return /* @__PURE__ */ jsxs(Fragment, { children: [
43
- size === "small" ? /* @__PURE__ */ jsx(Tooltip, { ref: executeEl, title: t("actions.execute"), children: /* @__PURE__ */ jsx("span", { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx(IconButton, { onClick: () => setShowExecuteMenu(true), disabled: actionDisabled, color: "success", children: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "success", size: "24px" }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-play-arrow" }) }) }) }) : /* @__PURE__ */ jsx(
44
- Button,
22
+ [C, k.c12nDef, x, i]
23
+ ), A = Object.keys(v).length < 1 || f || i.length < 1;
24
+ return P(() => {
25
+ r(u);
26
+ }, [u]), P(() => {
27
+ m && b();
28
+ }, [b, m]), /* @__PURE__ */ s(j, { children: [
29
+ _ === "small" ? /* @__PURE__ */ e(S, { ref: d, title: p("actions.execute"), children: /* @__PURE__ */ e("span", { style: { alignSelf: "center" }, children: /* @__PURE__ */ e(z, { onClick: () => r(!0), disabled: A, color: "success", children: f ? /* @__PURE__ */ e(E, { color: "success", size: "24px" }) : /* @__PURE__ */ e(h, { icon: "ic:outline-play-arrow" }) }) }) }) : /* @__PURE__ */ e(
30
+ D,
45
31
  {
46
- ref: executeEl,
32
+ ref: d,
47
33
  variant: "outlined",
48
34
  color: "success",
49
- disabled: actionDisabled,
50
- startIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "success", size: "20px" }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-play-arrow" }),
35
+ disabled: A,
36
+ startIcon: f ? /* @__PURE__ */ e(E, { color: "success", size: "20px" }) : /* @__PURE__ */ e(h, { icon: "ic:outline-play-arrow" }),
51
37
  sx: { alignSelf: "stretch" },
52
- onClick: () => setShowExecuteMenu(true),
53
- children: t("actions.execute")
38
+ onClick: () => r(!0),
39
+ children: p("actions.execute")
54
40
  }
55
41
  ),
56
- /* @__PURE__ */ jsx(
57
- Popover,
42
+ /* @__PURE__ */ e(
43
+ M,
58
44
  {
59
45
  sx: { zIndex: 2e3 },
60
- open: showExecuteMenu,
61
- disablePortal: true,
62
- onClose: () => setShowExecuteMenu(false),
63
- anchorEl: executeEl.current,
46
+ open: m,
47
+ disablePortal: !0,
48
+ onClose: () => r(!1),
49
+ anchorEl: d.current,
64
50
  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__ */ jsxs(
66
- Stack,
51
+ children: /* @__PURE__ */ e(B, { onClick: () => r(!1), children: /* @__PURE__ */ e(l, { divider: /* @__PURE__ */ e(F, { flexItem: !0, orientation: "horizontal" }), children: Object.entries(v).map(([o, t]) => /* @__PURE__ */ s(
52
+ l,
67
53
  {
68
54
  sx: {
69
55
  pl: 3,
70
56
  pr: 2,
71
57
  py: 1,
72
58
  cursor: "pointer",
73
- transition: theme.transitions.create("background-color"),
74
- "&:hover": { backgroundColor: theme.palette.background.default }
59
+ transition: g.transitions.create("background-color"),
60
+ "&:hover": { backgroundColor: g.palette.background.default }
75
61
  },
76
- onClick: (ev) => {
77
- if (!ev.isPropagationStopped()) {
78
- executeAction(actionId, selectors);
79
- }
62
+ onClick: (n) => {
63
+ n.isPropagationStopped() || y(o, i);
80
64
  },
81
65
  direction: "row",
82
66
  spacing: 1,
83
67
  alignItems: "center",
84
68
  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 })
69
+ /* @__PURE__ */ s(l, { flex: 1, children: [
70
+ /* @__PURE__ */ s(l, { direction: "row", spacing: 1, alignItems: "center", children: [
71
+ t.action_icon && /* @__PURE__ */ e(O, { icon: t.action_icon }),
72
+ /* @__PURE__ */ e(I, { variant: "body1", children: t.name }),
73
+ /* @__PURE__ */ e(L, { size: "small", classification: t.classification })
90
74
  ] }),
91
- action.summary && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", maxWidth: "300px", children: action.summary })
75
+ t.summary && /* @__PURE__ */ e(I, { variant: "caption", color: "text.secondary", maxWidth: "300px", children: t.summary })
92
76
  ] }),
93
- /* @__PURE__ */ jsx(
94
- Box,
77
+ /* @__PURE__ */ e(
78
+ T,
95
79
  {
96
80
  sx: { pl: 1 },
97
- onClick: (ev) => {
98
- ev.stopPropagation();
81
+ onClick: (n) => {
82
+ n.stopPropagation();
99
83
  },
100
- children: /* @__PURE__ */ jsx(Tooltip, { title: t("actions.execute.menu"), children: /* @__PURE__ */ jsx(
101
- IconButton,
84
+ children: /* @__PURE__ */ e(S, { title: p("actions.execute.menu"), children: /* @__PURE__ */ e(
85
+ z,
102
86
  {
103
87
  size: "small",
104
- onClick: () => executeAction(actionId, selectors, null, { forceMenu: true }),
105
- children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-settings" })
88
+ onClick: () => y(o, i, null, { forceMenu: !0 }),
89
+ children: /* @__PURE__ */ e(h, { icon: "ic:baseline-settings" })
106
90
  }
107
91
  ) })
108
92
  }
109
93
  )
110
94
  ]
111
95
  },
112
- actionId
96
+ o
113
97
  )) }) })
114
98
  }
115
99
  )
116
100
  ] });
117
101
  };
118
102
  export {
119
- ExecutePopover as default
103
+ ie as default
120
104
  };
@@ -1,13 +1,13 @@
1
1
  import "react/jsx-runtime";
2
- import "../../iconify-CXMreGTg.js";
2
+ import "../../iconify-BBckr5AQ.js";
3
3
  import "@mui/material";
4
4
  import "../../hooks/ClueComponentContext.js";
5
- import { R } from "../../ActionForm-C0aE9HUv.js";
5
+ import { R as s } from "../../ActionForm-pWyIi01Z.js";
6
6
  import "react";
7
- import "../../index-AMfoEg_6.js";
7
+ import "../../index-Dj5C04IX.js";
8
8
  import "../ClassificationChip.js";
9
9
  import "../ErrorBoundary.js";
10
10
  import "./formats/index.js";
11
11
  export {
12
- R as default
12
+ s as default
13
13
  };
@@ -1,48 +1,32 @@
1
- import { c as cloneDeep } from "../../../cloneDeep-DmUylbkM.js";
2
- import { g as get } from "../../../get-DSsNkRQs.js";
3
- const adaptSchema = (_schema) => {
4
- const requiredFields = [];
5
- const schema = cloneDeep(_schema);
6
- const newSchema = {
7
- ...schema,
1
+ import { c as y } from "../../../cloneDeep-wjl3XmFj.js";
2
+ import { g as s } from "../../../get-CH7kz5Ix.js";
3
+ const u = (i) => {
4
+ const r = [], l = y(i), n = {
5
+ ...l,
8
6
  properties: Object.fromEntries(
9
- Object.entries(schema.properties ?? {}).filter(([name]) => !["raw_data", "selector", "selectors", "context"].includes(name)).map(([name, def]) => {
10
- var _a, _b;
11
- requiredFields.push(name);
12
- if (typeof def === "boolean") {
13
- return [name, def];
7
+ Object.entries(l.properties ?? {}).filter(([t]) => !["raw_data", "selector", "selectors", "context"].includes(t)).map(([t, e]) => {
8
+ var a, o;
9
+ if (r.push(t), typeof e == "boolean")
10
+ return [t, e];
11
+ if (((a = e.anyOf) == null ? void 0 : a.length) === 2) {
12
+ if (typeof e.anyOf[1] == "boolean")
13
+ return [t, e];
14
+ e.anyOf[1].type === "null" && typeof e.anyOf[0] != "boolean" && (e.anyOf[0].enum && (e.enum = e.anyOf[0].enum), e.type = [...Array.isArray(e.anyOf[0].type) ? e.anyOf[0].type : [e.anyOf[0].type], "null"], delete e.anyOf, r.pop());
14
15
  }
15
- if (((_a = def.anyOf) == null ? void 0 : _a.length) === 2) {
16
- if (typeof def.anyOf[1] === "boolean") {
17
- return [name, def];
18
- }
19
- if (def.anyOf[1].type === "null" && typeof def.anyOf[0] !== "boolean") {
20
- if (def.anyOf[0].enum) {
21
- def.enum = def.anyOf[0].enum;
22
- }
23
- def.type = [...Array.isArray(def.anyOf[0].type) ? def.anyOf[0].type : [def.anyOf[0].type], "null"];
24
- delete def.anyOf;
25
- requiredFields.pop();
26
- }
16
+ if (((o = e.allOf) == null ? void 0 : o.length) > 0 && typeof e.allOf[0] != "boolean" && e.allOf[0].$ref) {
17
+ const p = {
18
+ ...e,
19
+ ...s(l, e.allOf[0].$ref.replace("#/", "").replaceAll("/", ".")),
20
+ title: e.title
21
+ };
22
+ return delete p.allOf, [t, p];
27
23
  }
28
- if (((_b = def.allOf) == null ? void 0 : _b.length) > 0) {
29
- if (typeof def.allOf[0] !== "boolean" && def.allOf[0].$ref) {
30
- const newDef = {
31
- ...def,
32
- ...get(schema, def.allOf[0].$ref.replace("#/", "").replaceAll("/", ".")),
33
- title: def.title
34
- };
35
- delete newDef.allOf;
36
- return [name, newDef];
37
- }
38
- }
39
- return [name, def];
24
+ return [t, e];
40
25
  })
41
26
  )
42
27
  };
43
- newSchema.required = requiredFields;
44
- return newSchema;
28
+ return n.required = r, n;
45
29
  };
46
30
  export {
47
- adaptSchema
31
+ u as adaptSchema
48
32
  };