@cccsaurora/clue-ui 1.1.0-dev.17 → 1.1.0-dev.25
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-8imxWxR1.js → ActionForm-CPGSgrVE.js} +1 -1
- package/{AnnotationDetails-C4eldeaQ.js → AnnotationDetails-nC60ZC4O.js} +1 -1
- package/{AnnotationPreview-BVf3rGaG.js → AnnotationPreview-D4584qmN.js} +1 -1
- package/{ClueEnrichContext-BXF2sJ-g.js → ClueEnrichContext-ClpyjyIp.js} +3 -2
- package/api/lookup/index.d.ts +1 -1
- package/api/lookup/types.d.ts +2 -2
- package/api/lookup/types_detection.d.ts +2 -2
- 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 +1 -1
- package/components/EnrichedTypography.d.ts +1 -1
- package/components/EnrichedTypography.js +1 -1
- package/components/actions/ActionForm.js +1 -1
- package/components/actions/ResultModal.js +20 -25
- package/components/display/graph/index.js +14 -15
- package/components/display/markdown/index.js +190 -19
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/fetchers/StatusChip.js +0 -1
- package/components/group/GroupControl.js +3 -2
- package/components/stats/QueryStatus.js +8 -4
- package/en/translation.json +33 -59
- package/fr/translation.json +31 -56
- package/hooks/ClueActionContext.js +2 -2
- package/hooks/ClueEnrichContext.js +2 -2
- package/hooks/ClueEnrichProps.d.ts +3 -1
- package/hooks/ClueFetcherContext.js +1 -1
- package/hooks/CluePopupContext.js +2 -2
- package/hooks/ClueProvider.js +3 -3
- package/hooks/selectors.d.ts +0 -1
- package/hooks/selectors.js +2 -3
- package/hooks/useAnnotations.js +1 -1
- package/hooks/useClue.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/hooks/useClueConfig.d.ts +2 -1
- package/hooks/useClueConfig.js +2 -2
- package/hooks/useClueTypeConfig.js +1 -1
- package/hooks/useMyLocalStorage.d.ts +4 -3
- package/hooks/useMyLocalStorage.js +6 -6
- 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 +4 -4
- package/package.json +1 -2
- package/{useClueTypeConfig-CNKUnpyB.js → useClueTypeConfig-HmNKKYHY.js} +32 -32
- package/utils/graph.js +4 -4
- package/utils/loggerUtil.d.ts +1 -1
- package/utils/loggerUtil.js +2 -2
- package/utils/sessionStorage.js +1 -1
- package/components/display/markdown/DynamicTabs.d.ts +0 -8
- package/components/display/markdown/DynamicTabs.js +0 -26
- package/components/display/markdown/markdownPlugins/tabs.d.ts +0 -3
- package/components/display/markdown/markdownPlugins/tabs.js +0 -4
- package/tabs-xGuUGsJd.js +0 -254
|
@@ -7,7 +7,7 @@ import { J as JSONViewer } from "./index-Bi21Wb23.js";
|
|
|
7
7
|
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
8
8
|
import { c as createContext, u as useContextSelector, a as useContext } from "./index-BDVjGvMI.js";
|
|
9
9
|
import { A as Ajv } from "./index-CC12Ux-9.js";
|
|
10
|
-
import { a as api } from "./useClueTypeConfig-
|
|
10
|
+
import { a as api } from "./useClueTypeConfig-HmNKKYHY.js";
|
|
11
11
|
import { d as toString } from "./_baseGet-BSK_nnoz.js";
|
|
12
12
|
import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
|
|
13
13
|
import { i as isEqual } from "./utils-7OtvGnmf.js";
|
|
@@ -10,7 +10,7 @@ import useErrors from "./hooks/useErrors.js";
|
|
|
10
10
|
import { ICON_MAP } from "./icons/iconMap.js";
|
|
11
11
|
import { safeDispatchEvent } from "./utils/window.js";
|
|
12
12
|
import { g as groupBy } from "./groupBy-DC2oOuBN.js";
|
|
13
|
-
import { u as uniq } from "./ClueEnrichContext-
|
|
13
|
+
import { u as uniq } from "./ClueEnrichContext-ClpyjyIp.js";
|
|
14
14
|
import { memo, useState, useMemo, useCallback, useEffect } from "react";
|
|
15
15
|
import { u as useContextSelector } from "./index-BDVjGvMI.js";
|
|
16
16
|
import ExecutePopover from "./components/actions/ExecutePopover.js";
|
|
@@ -8,7 +8,7 @@ import { useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
|
8
8
|
import { c as createContext, u as useContextSelector } from "./index-BDVjGvMI.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-nC60ZC4O.js";
|
|
12
12
|
const CluePopupContext = createContext(null);
|
|
13
13
|
const CluePopupProvider = ({ children }) => {
|
|
14
14
|
const [popupType, setPopupType] = useState(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { a as addAPIProvider } from "./iconify-CXMreGTg.js";
|
|
3
|
-
import { u as useClueTypeConfig, a as api, p as post } from "./useClueTypeConfig-
|
|
3
|
+
import { u as useClueTypeConfig, a as api, p as post } from "./useClueTypeConfig-HmNKKYHY.js";
|
|
4
4
|
import { clueDebugLogger } from "./utils/loggerUtil.js";
|
|
5
5
|
import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
|
|
6
6
|
import { t as toFinite } from "./toFinite-Bc55msYj.js";
|
|
@@ -235,12 +235,13 @@ const ClueEnrichProvider = ({
|
|
|
235
235
|
try {
|
|
236
236
|
const enrichmentResult = await post([selector], options.sources, options, requestConfig);
|
|
237
237
|
const enrichData = Object.values(Object.values(enrichmentResult)[0])[0];
|
|
238
|
-
await (statusRecord == null ? void 0 : statusRecord.incrementalPatch({ status: "complete" }));
|
|
239
238
|
await _addEntries(Object.values(enrichData));
|
|
240
239
|
return enrichData;
|
|
241
240
|
} catch (e) {
|
|
242
241
|
console.error(e);
|
|
243
242
|
return {};
|
|
243
|
+
} finally {
|
|
244
|
+
await (statusRecord == null ? void 0 : statusRecord.incrementalPatch({ status: "complete" }));
|
|
244
245
|
}
|
|
245
246
|
},
|
|
246
247
|
[
|
package/api/lookup/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as enrich from "../../api/lookup/enrich";
|
|
2
2
|
import * as types from "../../api/lookup/types";
|
|
3
3
|
import * as types_detection from "../../api/lookup/types_detection";
|
|
4
|
-
export declare
|
|
4
|
+
export declare const uri: () => string;
|
|
5
5
|
export { enrich, types, types_detection };
|
package/api/lookup/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { TypesResponse } from "../../types/lookup";
|
|
3
3
|
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
4
|
+
export declare const uri: () => string;
|
|
5
|
+
export declare const get: (config?: AxiosRequestConfig) => Promise<TypesResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { TypesDetectionResponse } from "../../types/lookup";
|
|
3
3
|
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
4
|
+
export declare const uri: () => string;
|
|
5
|
+
export declare const get: (config?: AxiosRequestConfig) => Promise<TypesDetectionResponse>;
|
|
@@ -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-nC60ZC4O.js";
|
|
5
5
|
const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
|
|
6
6
|
var _a, _b, _c;
|
|
7
7
|
const actionRef = useRef();
|
|
@@ -10,8 +10,8 @@ import "../hooks/useErrors.js";
|
|
|
10
10
|
import "../icons/iconMap.js";
|
|
11
11
|
import "../utils/window.js";
|
|
12
12
|
import "../groupBy-DC2oOuBN.js";
|
|
13
|
-
import { A } from "../AnnotationDetails-
|
|
14
|
-
import "../ClueEnrichContext-
|
|
13
|
+
import { A } from "../AnnotationDetails-nC60ZC4O.js";
|
|
14
|
+
import "../ClueEnrichContext-ClpyjyIp.js";
|
|
15
15
|
import "react";
|
|
16
16
|
import "../index-BDVjGvMI.js";
|
|
17
17
|
import "./actions/ExecutePopover.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-D4584qmN.js";
|
|
5
5
|
import "../hooks/useAnnotations.js";
|
|
6
6
|
import "../utils-7OtvGnmf.js";
|
|
7
7
|
import "react";
|
|
@@ -10,7 +10,7 @@ import ContextIcon from "../icons/Context.js";
|
|
|
10
10
|
import OpinionIcon from "../icons/Opinion.js";
|
|
11
11
|
import { ICON_MAP } from "../icons/iconMap.js";
|
|
12
12
|
import FrequencyText from "../text/Frequency.js";
|
|
13
|
-
import { u as uniq } from "../ClueEnrichContext-
|
|
13
|
+
import { u as uniq } from "../ClueEnrichContext-ClpyjyIp.js";
|
|
14
14
|
import { memo, useState, useMemo, useCallback } from "react";
|
|
15
15
|
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
|
16
16
|
import AnnotationEntry from "./AnnotationEntry.js";
|
|
@@ -3,7 +3,7 @@ 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-
|
|
6
|
+
import { C as CluePopupContext } from "../AnnotationPreview-D4584qmN.js";
|
|
7
7
|
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
8
8
|
import useAnnotations from "../hooks/useAnnotations.js";
|
|
9
9
|
import ActionIcon from "../icons/Action.js";
|
|
@@ -10,7 +10,7 @@ export interface EnrichedTypographyProps extends EnrichmentProps {
|
|
|
10
10
|
}
|
|
11
11
|
declare const _default: import('react').NamedExoticComponent<EnrichedTypographyProps & import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
12
12
|
ref?: import('react').Ref<HTMLSpanElement>;
|
|
13
|
-
}, "fontSize" | "color" | "style" | "left" | "right" | "bottom" | "top" | "flex" | "position" | "border" | "padding" | "children" | "variant" | "classes" | "className" | "margin" | "sx" | "p" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "overflow" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "noWrap" | "
|
|
13
|
+
}, "fontSize" | "color" | "style" | "left" | "right" | "bottom" | "top" | "flex" | "position" | "border" | "padding" | "children" | "variant" | "classes" | "className" | "margin" | "sx" | "p" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "overflow" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "noWrap" | "gutterBottom" | "paragraph" | "variantMapping"> & {
|
|
14
14
|
component?: React.ElementType;
|
|
15
15
|
}>;
|
|
16
16
|
export default _default;
|
|
@@ -3,7 +3,7 @@ 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-
|
|
6
|
+
import { C as CluePopupContext } from "../AnnotationPreview-D4584qmN.js";
|
|
7
7
|
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
8
8
|
import useAnnotations from "../hooks/useAnnotations.js";
|
|
9
9
|
import ActionIcon from "../icons/Action.js";
|
|
@@ -5,7 +5,7 @@ import "@mui/material";
|
|
|
5
5
|
import "../display/icons/Iconified.js";
|
|
6
6
|
import "../../index-Bi21Wb23.js";
|
|
7
7
|
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-
|
|
8
|
+
import { A } from "../../ActionForm-CPGSgrVE.js";
|
|
9
9
|
import "../../utils-7OtvGnmf.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../../index-BDVjGvMI.js";
|
|
@@ -13,32 +13,27 @@ const ResultModal = ({ result, onClose, show = false }) => {
|
|
|
13
13
|
if (!result) {
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
result.action.supported_types && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: result.action.supported_types.map((type) => type.toUpperCase()).join(", ") }),
|
|
22
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
23
|
-
/* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: result.action.classification })
|
|
24
|
-
] }),
|
|
25
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: result.action.summary }),
|
|
26
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
27
|
-
/* @__PURE__ */ jsxs(ErrorBoundary, { children: [
|
|
28
|
-
result.format === "markdown" && /* @__PURE__ */ jsx(Markdown, { md: result.output }),
|
|
29
|
-
result.format === "json" && /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true })
|
|
30
|
-
] }),
|
|
16
|
+
return /* @__PURE__ */ jsx(Modal, { open: show, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose, children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "80%", maxWidth: "80%", height: "100%", p: 2, minWidth: "750px" }, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(Stack, { spacing: 1, height: "100%", children: [
|
|
17
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
18
|
+
result.action.action_icon && /* @__PURE__ */ jsx(Icon, { height: "1.5rem", icon: result.action.action_icon }),
|
|
19
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: result.action.name }),
|
|
20
|
+
result.action.supported_types && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: result.action.supported_types.map((type) => type.toUpperCase()).join(", ") }),
|
|
31
21
|
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
/* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: result.action.classification })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: result.action.summary }),
|
|
25
|
+
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
26
|
+
/* @__PURE__ */ jsxs(ErrorBoundary, { children: [
|
|
27
|
+
result.format === "markdown" && /* @__PURE__ */ jsx(Markdown, { md: result.output }),
|
|
28
|
+
result.format === "json" && /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
31
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
32
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
33
|
+
result.link && /* @__PURE__ */ jsx(Button, { variant: "outlined", component: "a", target: "_blank", href: result.link, children: t("details.open") }),
|
|
34
|
+
/* @__PURE__ */ jsx(Button, { variant: "outlined", color: "error", onClick: onClose, children: t("close") })
|
|
35
|
+
] })
|
|
36
|
+
] }) }) }) });
|
|
42
37
|
};
|
|
43
38
|
const ResultModal$1 = memo(ResultModal);
|
|
44
39
|
export {
|
|
@@ -3,10 +3,12 @@ import { useMemo, useRef, useState, useEffect, useCallback, createElement } from
|
|
|
3
3
|
import { useTheme, lighten, darken, Stack, Card, Typography, alpha, Autocomplete, TextField, FormControl, InputLabel, Select, MenuItem, IconButton, Collapse } from "@mui/material";
|
|
4
4
|
import { p as parseEvent } from "../../../index-Bi21Wb23.js";
|
|
5
5
|
import { z as zoom, i as identity, s as select, t as transform, p as pointer } from "../../../index-BbPn6-Mw.js";
|
|
6
|
+
import { ClueComponentContext } from "../../../hooks/ClueComponentContext.js";
|
|
6
7
|
import useComparator from "../../../hooks/useComparator.js";
|
|
7
8
|
import { useMyLocalStorageItem } from "../../../hooks/useMyLocalStorage.js";
|
|
8
9
|
import { StorageKey } from "../../../utils/constants.js";
|
|
9
10
|
import { g as get } from "../../../get-D3C3lEU3.js";
|
|
11
|
+
import { u as useContextSelector } from "../../../index-BDVjGvMI.js";
|
|
10
12
|
import { cssImportant } from "../../../utils/graph.js";
|
|
11
13
|
import Iconified from "../icons/Iconified.js";
|
|
12
14
|
import ExpandMoreButton from "./ExpandMoreButton.js";
|
|
@@ -15,6 +17,7 @@ import NodePanel from "./visualizations/panels/NodePanel.js";
|
|
|
15
17
|
import Tree from "./visualizations/tree/index.js";
|
|
16
18
|
const Graph = ({ graph, sx = {} }) => {
|
|
17
19
|
var _a, _b, _c, _d, _e;
|
|
20
|
+
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
18
21
|
const theme = useTheme();
|
|
19
22
|
const isDark = useMemo(() => theme.palette.mode === "dark", [theme]);
|
|
20
23
|
const { runComparator } = useComparator();
|
|
@@ -257,7 +260,7 @@ const Graph = ({ graph, sx = {} }) => {
|
|
|
257
260
|
opacity: 0.3,
|
|
258
261
|
transform: "translateX(-50%) translateY(-50%)"
|
|
259
262
|
},
|
|
260
|
-
children: "
|
|
263
|
+
children: t("graph.no.dataset")
|
|
261
264
|
}
|
|
262
265
|
)
|
|
263
266
|
] }),
|
|
@@ -296,22 +299,15 @@ const Graph = ({ graph, sx = {} }) => {
|
|
|
296
299
|
getOptionLabel: (option) => option.value,
|
|
297
300
|
filterOptions: (options, state) => options.filter((opt) => opt.value.toLowerCase().includes(state.inputValue)),
|
|
298
301
|
renderOption: (props, option) => /* @__PURE__ */ createElement("li", { ...props, key: option.id + option.value }, option.value),
|
|
299
|
-
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
300
|
-
TextField,
|
|
301
|
-
{
|
|
302
|
-
...params,
|
|
303
|
-
error: hasError,
|
|
304
|
-
label: "Enter a node ID, and press [ctrl + enter] to select it. [ctrl + space] will open an autocomplete menu."
|
|
305
|
-
}
|
|
306
|
-
)
|
|
302
|
+
renderInput: (params) => /* @__PURE__ */ jsx(TextField, { ...params, error: hasError, label: t("graph.node.input.label") })
|
|
307
303
|
}
|
|
308
304
|
),
|
|
309
305
|
/* @__PURE__ */ jsxs(FormControl, { sx: { minWidth: "150px", backgroundColor: alpha(theme.palette.background.paper, 0.8) }, children: [
|
|
310
|
-
/* @__PURE__ */ jsx(InputLabel, { id: "viz-label", children: "
|
|
306
|
+
/* @__PURE__ */ jsx(InputLabel, { id: "viz-label", children: t("graph.visualization") }),
|
|
311
307
|
/* @__PURE__ */ jsx(
|
|
312
308
|
Select,
|
|
313
309
|
{
|
|
314
|
-
label: "
|
|
310
|
+
label: t("graph.visualization"),
|
|
315
311
|
labelId: "viz-label",
|
|
316
312
|
value: viz,
|
|
317
313
|
onChange: (event) => setViz(event.target.value),
|
|
@@ -327,7 +323,7 @@ const Graph = ({ graph, sx = {} }) => {
|
|
|
327
323
|
expand: showPanel,
|
|
328
324
|
onClick: () => setShowPanel(!showPanel),
|
|
329
325
|
"aria-expanded": showPanel,
|
|
330
|
-
"aria-label": "show
|
|
326
|
+
"aria-label": t("graph.show.more"),
|
|
331
327
|
size: "small",
|
|
332
328
|
sx: {
|
|
333
329
|
marginLeft: "auto !important",
|
|
@@ -367,7 +363,8 @@ const Graph = ({ graph, sx = {} }) => {
|
|
|
367
363
|
currentZoom.y.toFixed(0),
|
|
368
364
|
" (",
|
|
369
365
|
currentZoom.k.toFixed(2),
|
|
370
|
-
"x
|
|
366
|
+
"x",
|
|
367
|
+
")"
|
|
371
368
|
] }),
|
|
372
369
|
/* @__PURE__ */ jsx(
|
|
373
370
|
IconButton,
|
|
@@ -395,12 +392,14 @@ const Graph = ({ graph, sx = {} }) => {
|
|
|
395
392
|
},
|
|
396
393
|
children: /* @__PURE__ */ jsx("code", { children: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
397
394
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
398
|
-
"(
|
|
395
|
+
"(",
|
|
396
|
+
"abs: ",
|
|
399
397
|
absoluteMousePos.join(", "),
|
|
400
398
|
")"
|
|
401
399
|
] }),
|
|
402
400
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
403
|
-
"(
|
|
401
|
+
"(",
|
|
402
|
+
"rel: ",
|
|
404
403
|
relativeMousePos.join(", "),
|
|
405
404
|
")"
|
|
406
405
|
] })
|
|
@@ -7,8 +7,6 @@ import ReactMarkdown from "react-markdown";
|
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import { Prism } from "react-syntax-highlighter";
|
|
9
9
|
import remarkGfm from "remark-gfm";
|
|
10
|
-
import DynamicTabs from "./DynamicTabs.js";
|
|
11
|
-
import { v as visit, c as codeTabs } from "../../../tabs-xGuUGsJd.js";
|
|
12
10
|
/**
|
|
13
11
|
* @remix-run/router v1.23.0
|
|
14
12
|
*
|
|
@@ -2177,7 +2175,7 @@ const structuredClone$1 = typeof structuredClone === "function" ? (
|
|
|
2177
2175
|
/* c8 ignore start */
|
|
2178
2176
|
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
|
|
2179
2177
|
) : (any, options) => deserialize(serialize(any, options));
|
|
2180
|
-
function ok() {
|
|
2178
|
+
function ok$1() {
|
|
2181
2179
|
}
|
|
2182
2180
|
let Schema$1 = class Schema {
|
|
2183
2181
|
/**
|
|
@@ -3830,7 +3828,7 @@ function createLocation(state, node, location2) {
|
|
|
3830
3828
|
}
|
|
3831
3829
|
}
|
|
3832
3830
|
}
|
|
3833
|
-
ok(location2.startTag);
|
|
3831
|
+
ok$1(location2.startTag);
|
|
3834
3832
|
const opening = position(location2.startTag);
|
|
3835
3833
|
const closing = location2.endTag ? position(location2.endTag) : void 0;
|
|
3836
3834
|
const data = { opening };
|
|
@@ -5180,8 +5178,8 @@ function all$1(children, parentNode, schema) {
|
|
|
5180
5178
|
function patch(from, to) {
|
|
5181
5179
|
const position2 = from.position;
|
|
5182
5180
|
if (position2 && position2.start && position2.end) {
|
|
5183
|
-
ok(typeof position2.start.offset === "number");
|
|
5184
|
-
ok(typeof position2.end.offset === "number");
|
|
5181
|
+
ok$1(typeof position2.start.offset === "number");
|
|
5182
|
+
ok$1(typeof position2.end.offset === "number");
|
|
5185
5183
|
to.sourceCodeLocation = {
|
|
5186
5184
|
startLine: position2.start.line,
|
|
5187
5185
|
startCol: position2.start.column,
|
|
@@ -13003,6 +13001,190 @@ function point(type) {
|
|
|
13003
13001
|
}
|
|
13004
13002
|
}
|
|
13005
13003
|
}
|
|
13004
|
+
const convert = (
|
|
13005
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
13006
|
+
/**
|
|
13007
|
+
* @type {(
|
|
13008
|
+
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
13009
|
+
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
13010
|
+
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
13011
|
+
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
13012
|
+
* ((test?: Test) => Check)
|
|
13013
|
+
* )}
|
|
13014
|
+
*/
|
|
13015
|
+
/**
|
|
13016
|
+
* @param {Test} [test]
|
|
13017
|
+
* @returns {Check}
|
|
13018
|
+
*/
|
|
13019
|
+
function(test) {
|
|
13020
|
+
if (test === null || test === void 0) {
|
|
13021
|
+
return ok;
|
|
13022
|
+
}
|
|
13023
|
+
if (typeof test === "function") {
|
|
13024
|
+
return castFactory(test);
|
|
13025
|
+
}
|
|
13026
|
+
if (typeof test === "object") {
|
|
13027
|
+
return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
|
|
13028
|
+
}
|
|
13029
|
+
if (typeof test === "string") {
|
|
13030
|
+
return typeFactory(test);
|
|
13031
|
+
}
|
|
13032
|
+
throw new Error("Expected function, string, or object as test");
|
|
13033
|
+
}
|
|
13034
|
+
);
|
|
13035
|
+
function anyFactory(tests) {
|
|
13036
|
+
const checks2 = [];
|
|
13037
|
+
let index = -1;
|
|
13038
|
+
while (++index < tests.length) {
|
|
13039
|
+
checks2[index] = convert(tests[index]);
|
|
13040
|
+
}
|
|
13041
|
+
return castFactory(any);
|
|
13042
|
+
function any(...parameters) {
|
|
13043
|
+
let index2 = -1;
|
|
13044
|
+
while (++index2 < checks2.length) {
|
|
13045
|
+
if (checks2[index2].apply(this, parameters)) return true;
|
|
13046
|
+
}
|
|
13047
|
+
return false;
|
|
13048
|
+
}
|
|
13049
|
+
}
|
|
13050
|
+
function propsFactory(check) {
|
|
13051
|
+
const checkAsRecord = (
|
|
13052
|
+
/** @type {Record<string, unknown>} */
|
|
13053
|
+
check
|
|
13054
|
+
);
|
|
13055
|
+
return castFactory(all2);
|
|
13056
|
+
function all2(node) {
|
|
13057
|
+
const nodeAsRecord = (
|
|
13058
|
+
/** @type {Record<string, unknown>} */
|
|
13059
|
+
/** @type {unknown} */
|
|
13060
|
+
node
|
|
13061
|
+
);
|
|
13062
|
+
let key;
|
|
13063
|
+
for (key in check) {
|
|
13064
|
+
if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
|
|
13065
|
+
}
|
|
13066
|
+
return true;
|
|
13067
|
+
}
|
|
13068
|
+
}
|
|
13069
|
+
function typeFactory(check) {
|
|
13070
|
+
return castFactory(type);
|
|
13071
|
+
function type(node) {
|
|
13072
|
+
return node && node.type === check;
|
|
13073
|
+
}
|
|
13074
|
+
}
|
|
13075
|
+
function castFactory(testFunction) {
|
|
13076
|
+
return check;
|
|
13077
|
+
function check(value, index, parent) {
|
|
13078
|
+
return Boolean(
|
|
13079
|
+
looksLikeANode(value) && testFunction.call(
|
|
13080
|
+
this,
|
|
13081
|
+
value,
|
|
13082
|
+
typeof index === "number" ? index : void 0,
|
|
13083
|
+
parent || void 0
|
|
13084
|
+
)
|
|
13085
|
+
);
|
|
13086
|
+
}
|
|
13087
|
+
}
|
|
13088
|
+
function ok() {
|
|
13089
|
+
return true;
|
|
13090
|
+
}
|
|
13091
|
+
function looksLikeANode(value) {
|
|
13092
|
+
return value !== null && typeof value === "object" && "type" in value;
|
|
13093
|
+
}
|
|
13094
|
+
function color(d) {
|
|
13095
|
+
return d;
|
|
13096
|
+
}
|
|
13097
|
+
const empty = [];
|
|
13098
|
+
const CONTINUE = true;
|
|
13099
|
+
const EXIT = false;
|
|
13100
|
+
const SKIP = "skip";
|
|
13101
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
13102
|
+
let check;
|
|
13103
|
+
if (typeof test === "function" && typeof visitor !== "function") {
|
|
13104
|
+
reverse = visitor;
|
|
13105
|
+
visitor = test;
|
|
13106
|
+
} else {
|
|
13107
|
+
check = test;
|
|
13108
|
+
}
|
|
13109
|
+
const is = convert(check);
|
|
13110
|
+
const step = reverse ? -1 : 1;
|
|
13111
|
+
factory(tree, void 0, [])();
|
|
13112
|
+
function factory(node, index, parents) {
|
|
13113
|
+
const value = (
|
|
13114
|
+
/** @type {Record<string, unknown>} */
|
|
13115
|
+
node && typeof node === "object" ? node : {}
|
|
13116
|
+
);
|
|
13117
|
+
if (typeof value.type === "string") {
|
|
13118
|
+
const name = (
|
|
13119
|
+
// `hast`
|
|
13120
|
+
typeof value.tagName === "string" ? value.tagName : (
|
|
13121
|
+
// `xast`
|
|
13122
|
+
typeof value.name === "string" ? value.name : void 0
|
|
13123
|
+
)
|
|
13124
|
+
);
|
|
13125
|
+
Object.defineProperty(visit2, "name", {
|
|
13126
|
+
value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
|
|
13127
|
+
});
|
|
13128
|
+
}
|
|
13129
|
+
return visit2;
|
|
13130
|
+
function visit2() {
|
|
13131
|
+
let result = empty;
|
|
13132
|
+
let subresult;
|
|
13133
|
+
let offset;
|
|
13134
|
+
let grandparents;
|
|
13135
|
+
if (!test || is(node, index, parents[parents.length - 1] || void 0)) {
|
|
13136
|
+
result = toResult(visitor(node, parents));
|
|
13137
|
+
if (result[0] === EXIT) {
|
|
13138
|
+
return result;
|
|
13139
|
+
}
|
|
13140
|
+
}
|
|
13141
|
+
if ("children" in node && node.children) {
|
|
13142
|
+
const nodeAsParent = (
|
|
13143
|
+
/** @type {UnistParent} */
|
|
13144
|
+
node
|
|
13145
|
+
);
|
|
13146
|
+
if (nodeAsParent.children && result[0] !== SKIP) {
|
|
13147
|
+
offset = (reverse ? nodeAsParent.children.length : -1) + step;
|
|
13148
|
+
grandparents = parents.concat(nodeAsParent);
|
|
13149
|
+
while (offset > -1 && offset < nodeAsParent.children.length) {
|
|
13150
|
+
const child = nodeAsParent.children[offset];
|
|
13151
|
+
subresult = factory(child, offset, grandparents)();
|
|
13152
|
+
if (subresult[0] === EXIT) {
|
|
13153
|
+
return subresult;
|
|
13154
|
+
}
|
|
13155
|
+
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
|
13156
|
+
}
|
|
13157
|
+
}
|
|
13158
|
+
}
|
|
13159
|
+
return result;
|
|
13160
|
+
}
|
|
13161
|
+
}
|
|
13162
|
+
}
|
|
13163
|
+
function toResult(value) {
|
|
13164
|
+
if (Array.isArray(value)) {
|
|
13165
|
+
return value;
|
|
13166
|
+
}
|
|
13167
|
+
if (typeof value === "number") {
|
|
13168
|
+
return [CONTINUE, value];
|
|
13169
|
+
}
|
|
13170
|
+
return value === null || value === void 0 ? empty : [value];
|
|
13171
|
+
}
|
|
13172
|
+
function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
|
|
13173
|
+
let reverse;
|
|
13174
|
+
let test;
|
|
13175
|
+
let visitor;
|
|
13176
|
+
{
|
|
13177
|
+
test = testOrVisitor;
|
|
13178
|
+
visitor = visitorOrReverse;
|
|
13179
|
+
reverse = maybeReverse;
|
|
13180
|
+
}
|
|
13181
|
+
visitParents(tree, test, overload, reverse);
|
|
13182
|
+
function overload(node, parents) {
|
|
13183
|
+
const parent = parents[parents.length - 1];
|
|
13184
|
+
const index = parent ? parent.children.indexOf(node) : void 0;
|
|
13185
|
+
return visitor(node, index, parent);
|
|
13186
|
+
}
|
|
13187
|
+
}
|
|
13006
13188
|
const gfmTagfilterExpression = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi;
|
|
13007
13189
|
const knownMdxNames = /* @__PURE__ */ new Set([
|
|
13008
13190
|
"mdxFlowExpression",
|
|
@@ -13292,19 +13474,8 @@ const customComponents = (type, children) => {
|
|
|
13292
13474
|
const child = children instanceof Array ? children[0] : children;
|
|
13293
13475
|
if (type === "alert") {
|
|
13294
13476
|
return /* @__PURE__ */ jsx(Alert, { severity: "info", variant: "outlined", sx: { ".MuiAlert-message": { whiteSpace: "normal" } }, children: child });
|
|
13295
|
-
} else if (type === "tabs") {
|
|
13296
|
-
return /* @__PURE__ */ jsx(
|
|
13297
|
-
DynamicTabs,
|
|
13298
|
-
{
|
|
13299
|
-
tabs: JSON.parse(child).map((t) => ({
|
|
13300
|
-
title: t.title,
|
|
13301
|
-
children: customComponents(t.lang, t.value)
|
|
13302
|
-
}))
|
|
13303
|
-
}
|
|
13304
|
-
);
|
|
13305
|
-
} else {
|
|
13306
|
-
return /* @__PURE__ */ jsx("code", { children: child });
|
|
13307
13477
|
}
|
|
13478
|
+
return /* @__PURE__ */ jsx("code", { children: child });
|
|
13308
13479
|
};
|
|
13309
13480
|
const Markdown = ({ md, components = {} }) => {
|
|
13310
13481
|
const { t } = useTranslation();
|
|
@@ -13314,7 +13485,7 @@ const Markdown = ({ md, components = {} }) => {
|
|
|
13314
13485
|
ReactMarkdown,
|
|
13315
13486
|
{
|
|
13316
13487
|
rehypePlugins: [rehypeRaw],
|
|
13317
|
-
remarkPlugins: [remarkGfm
|
|
13488
|
+
remarkPlugins: [remarkGfm],
|
|
13318
13489
|
components: {
|
|
13319
13490
|
code: ({ node, className, children, ...props }) => {
|
|
13320
13491
|
var _a;
|
|
@@ -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-CPGSgrVE.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 }) => {
|
|
@@ -16,7 +16,6 @@ const StatusChip = ({ data, ...chipProps }) => {
|
|
|
16
16
|
icon: data.icon && /* @__PURE__ */ jsx(Icon, { icon: data.icon, fontSize: "1.25rem" }),
|
|
17
17
|
deleteIcon: /* @__PURE__ */ jsx("a", { href: data.link, rel: "noreferrer", target: "_blank", style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(Icon, { icon: "mdi:open-in-new", color: theme.palette.text.primary, fontSize: "1.25rem" }) }),
|
|
18
18
|
...chipProps,
|
|
19
|
-
onDelete: data.link ? () => console.log("Navigating to %s", data.link) : null,
|
|
20
19
|
label: ((_a = data.labels.find((label) => label.language === i18n.language) ?? data.labels[0]) == null ? void 0 : _a.label) ?? t("unknown"),
|
|
21
20
|
sx: [
|
|
22
21
|
...Array.isArray(chipProps == null ? void 0 : chipProps.sx) ? chipProps == null ? void 0 : chipProps.sx : [chipProps == null ? void 0 : chipProps.sx],
|
|
@@ -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-CPGSgrVE.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";
|
|
@@ -64,7 +64,8 @@ const GroupControl = () => {
|
|
|
64
64
|
}),
|
|
65
65
|
children: /* @__PURE__ */ jsxs(Typography, { color: "text.secondary", children: [
|
|
66
66
|
(values == null ? void 0 : values.length) ?? 0,
|
|
67
|
-
"
|
|
67
|
+
" ",
|
|
68
|
+
t("selected")
|
|
68
69
|
] })
|
|
69
70
|
}
|
|
70
71
|
),
|