@cccsaurora/clue-ui 1.3.0-dev.361 → 1.3.0-dev.390

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 (133) hide show
  1. package/{ActionForm-BGVd1hea.js → ActionForm-CqKcnDWC.js} +9 -9
  2. package/{AnnotationDetails-D4f9aw7S.js → AnnotationDetails-BlPd3T8k.js} +3 -3
  3. package/{AnnotationPreview-LLor6159.js → AnnotationPreview-Bl447SKT.js} +2 -2
  4. package/{ClueEnrichContext-DKZ2iqmV.js → ClueEnrichContext-B3YrTCaJ.js} +10 -8
  5. package/{_MapCache-DWYVyFVH.js → _MapCache-kuEY_iOH.js} +2 -4
  6. package/_Set-BrSMTlHn.js +6 -0
  7. package/{_Uint8Array-BgBspS6l.js → _Uint8Array-OPpgYQj7.js} +8 -13
  8. package/_arrayIncludes-BNqL-9ZP.js +31 -0
  9. package/_arrayPush-CBkQqaE_.js +10 -0
  10. package/{_baseAssignValue-Dltt6-s5.js → _baseAssignValue-CNUVPOBW.js} +2 -11
  11. package/{_baseClone-BUfES2sT.js → _baseClone-9FaRd1R2.js} +10 -6
  12. package/{_baseExtremum-kob8QXyt.js → _baseExtremum-wOGT4Dgw.js} +1 -1
  13. package/{_baseFlatten-D3wtzJ86.js → _baseFlatten-Co6QHDlG.js} +6 -6
  14. package/{_baseGet-DKnGz1D3.js → _baseGet-Cmp6FztG.js} +4 -3
  15. package/{isObjectLike-OAgjjZye.js → _baseGetTag-Hj-0NTYF.js} +0 -4
  16. package/{_baseIsEqual-CTfFNmaR.js → _baseIsEqual-1CpU47TZ.js} +8 -5
  17. package/{_baseIteratee-C004Z9XE.js → _baseIteratee-BN7Vbe5g.js} +6 -6
  18. package/_baseRest-BZ_hQ9PC.js +8 -0
  19. package/_baseUniq-BnvS3JHL.js +63 -0
  20. package/{_setToArray-CGeR30xg.js → _cacheHas-_aF2y2Xv.js} +2 -10
  21. package/{_createAggregator-BDMdCE6g.js → _createAggregator-BUZrP_is.js} +4 -4
  22. package/_defineProperty-DolZLKmv.js +12 -0
  23. package/{_getPrototype-uU2uJIbq.js → _getPrototype-Bb4gm-5m.js} +1 -1
  24. package/{_getTag-DuA1kj2A.js → _getTag-CML_cXiN.js} +10 -31
  25. package/{_isIterateeCall-CEvg7Bo6.js → _isIterateeCall-B1IFEqVv.js} +3 -3
  26. package/_setToArray-CqyqC8ib.js +10 -0
  27. package/{cloneDeep-C_PzHHQ0.js → cloneDeep-l3UkXG5M.js} +1 -1
  28. package/components/AnnotationDetailPopover.js +1 -1
  29. package/components/AnnotationDetails.js +4 -4
  30. package/components/AnnotationEntry.js +1 -1
  31. package/components/AnnotationPreview.js +2 -2
  32. package/components/EnrichedCard.js +2 -2
  33. package/components/EnrichedChip.js +2 -2
  34. package/components/EnrichedTypography.js +2 -2
  35. package/components/RetryFailedEnrichments.js +1 -1
  36. package/components/SourcePicker.js +1 -1
  37. package/components/actions/ActionForm.js +3 -3
  38. package/components/actions/ExecutePopover.js +1 -1
  39. package/components/actions/ResultModal.js +1 -1
  40. package/components/actions/form/schemaAdapter.js +2 -2
  41. package/components/actions/formats/index.d.ts +2 -0
  42. package/components/actions/formats/index.js +30 -14
  43. package/components/display/graph/elements/NodeCard.js +5 -5
  44. package/components/display/graph/index.js +2 -2
  45. package/components/display/graph/visualizations/Leaf.js +2 -1
  46. package/components/display/graph/visualizations/cloud/index.js +2 -2
  47. package/components/display/graph/visualizations/tree/index.js +5 -5
  48. package/components/display/json/index.js +2 -2
  49. package/components/enrichment/EnrichPopover.js +1 -1
  50. package/components/fetchers/Fetcher.js +21 -10
  51. package/components/fetchers/FetcherResultView.d.ts +7 -0
  52. package/components/fetchers/FetcherResultView.js +41 -0
  53. package/components/fetchers/PreviewModal.d.ts +6 -1
  54. package/components/fetchers/PreviewModal.js +5 -2
  55. package/components/group/Entry.js +1 -1
  56. package/components/group/GroupControl.js +1 -1
  57. package/components/stats/QueryStatus.js +1 -1
  58. package/{countBy-Bkq0mSO-.js → countBy-Bqcp3VCs.js} +2 -2
  59. package/database/index.js +2 -2
  60. package/database/replication.js +2 -2
  61. package/en/translation.json +1 -0
  62. package/fr/translation.json +1 -0
  63. package/{get-DlGeJ2uz.js → get-CdMThM8x.js} +1 -1
  64. package/{groupBy-CXx1vslF.js → groupBy-BVV07EGQ.js} +2 -2
  65. package/hooks/ClueActionContext.js +2 -2
  66. package/hooks/ClueDatabaseContext.js +1 -1
  67. package/hooks/ClueEnrichContext.js +8 -7
  68. package/hooks/ClueFetcherContext.js +1 -1
  69. package/hooks/ClueGroupContext.js +1 -1
  70. package/hooks/CluePopupContext.js +2 -2
  71. package/hooks/ClueProvider.d.ts +2 -1
  72. package/hooks/ClueProvider.js +5 -4
  73. package/hooks/ClueUIPluginContext.d.ts +21 -0
  74. package/hooks/ClueUIPluginContext.js +57 -0
  75. package/hooks/selectors.js +2 -2
  76. package/hooks/useActionResult.js +1 -1
  77. package/hooks/useAnnotations.js +2 -2
  78. package/hooks/useClue.js +1 -1
  79. package/hooks/useClueActions.js +1 -1
  80. package/hooks/useClueTypeConfig.js +54 -6
  81. package/hooks/useComparator.js +1 -1
  82. package/hooks/useErrors.js +1 -1
  83. package/hooks/useFetcherResult.js +1 -1
  84. package/icons/Action.js +3 -3
  85. package/icons/Assessment.js +5 -5
  86. package/icons/Context.js +2 -2
  87. package/icons/Opinion.js +4 -4
  88. package/{index-C28rIsy3.js → index-CAvu7vwt.js} +1 -1
  89. package/{index-IPF68v-l.js → index-DUEubgWN.js} +1 -1
  90. package/{index-VDwFWSqU.js → index-Dj1N4IQP.js} +3 -3
  91. package/{index-CmQM2DaO.js → index-DpJxD74E.js} +1 -1
  92. package/isArguments-CuYlEuhP.js +27 -0
  93. package/isArray-RJPfgWqI.js +4 -0
  94. package/isEmpty-BE656RUK.js +30 -0
  95. package/isObjectLike-CeENW9FN.js +6 -0
  96. package/{isSymbol-Xd2FsJyp.js → isSymbol-D_H4HPZQ.js} +2 -1
  97. package/main.d.ts +4 -2
  98. package/main.js +9 -7
  99. package/{maxBy-a49mqwW9.js → maxBy-BjjQmX5t.js} +2 -2
  100. package/package.json +16 -2
  101. package/plugins/ClueUIPlugin.d.ts +40 -0
  102. package/plugins/ClueUIPlugin.js +442 -0
  103. package/plugins/file/index.d.ts +15 -0
  104. package/plugins/file/index.js +22 -0
  105. package/plugins/graph/index.d.ts +17 -0
  106. package/plugins/graph/index.js +25 -0
  107. package/plugins/image/index.d.ts +12 -0
  108. package/plugins/image/index.js +26 -0
  109. package/plugins/json/index.d.ts +17 -0
  110. package/plugins/json/index.js +25 -0
  111. package/plugins/markdown/index.d.ts +17 -0
  112. package/plugins/markdown/index.js +25 -0
  113. package/plugins/registry.d.ts +13 -0
  114. package/plugins/registry.js +21 -0
  115. package/plugins/store.d.ts +40 -0
  116. package/plugins/store.js +6 -0
  117. package/plugins/test/index.d.ts +17 -0
  118. package/plugins/test/index.js +25 -0
  119. package/{replication-DvYQDhM_.js → replication--gLEZw8a.js} +1 -1
  120. package/{sessionStorage-Dbmo2Exe.js → sessionStorage-B68y-wnE.js} +2 -2
  121. package/{sortBy-Tf6pz1tg.js → sortBy-B8JVsLQY.js} +10 -11
  122. package/store-DMdRx9g0.js +2156 -0
  123. package/{sumBy-DZSVfXDE.js → sumBy-D-HCzM2i.js} +1 -1
  124. package/text/Frequency.js +1 -1
  125. package/{toFinite-Bc55msYj.js → toFinite-meZTg4Su.js} +1 -1
  126. package/{toNumber-DPxy1FBy.js → toNumber-B5JaA1vX.js} +1 -1
  127. package/uniq-CahZPAwp.js +7 -0
  128. package/utils/chain.js +12 -12
  129. package/utils/sessionStorage.js +1 -1
  130. package/utils/utils.js +3 -3
  131. package/{utils-BN7Z0YiP.js → utils-CEySTPtg.js} +7 -5
  132. package/_baseUniq-BqxNeJD9.js +0 -115
  133. package/useClueTypeConfig-CnMg5Ny8.js +0 -59
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../iconify-DJxl6dC-.js";
3
3
  import "@mui/material";
4
- import { A } from "../AnnotationPreview-LLor6159.js";
4
+ import { A } from "../AnnotationPreview-Bl447SKT.js";
5
5
  import "../hooks/useAnnotations.js";
6
- import "../utils-BN7Z0YiP.js";
6
+ import "../utils-CEySTPtg.js";
7
7
  import "react";
8
8
  import "../index-_gpzM2Px.js";
9
9
  export {
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { I as Icon } from "../iconify-DJxl6dC-.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 { f as useClueEnrichSelector } from "../ActionForm-BGVd1hea.js";
5
+ import { f as useClueEnrichSelector } from "../ActionForm-CqKcnDWC.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";
@@ -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 "../useClueTypeConfig-CnMg5Ny8.js";
13
+ import { u as uniq } from "../uniq-CahZPAwp.js";
14
14
  import { memo, useState, useMemo, useCallback } from "react";
15
15
  import { a as useContextSelector } from "../index-_gpzM2Px.js";
16
16
  import AnnotationEntry from "./AnnotationEntry.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-LLor6159.js";
7
- import { f as useClueEnrichSelector } from "../ActionForm-BGVd1hea.js";
6
+ import { C as CluePopupContext } from "../AnnotationPreview-Bl447SKT.js";
7
+ import { f as useClueEnrichSelector } from "../ActionForm-CqKcnDWC.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-LLor6159.js";
7
- import { f as useClueEnrichSelector } from "../ActionForm-BGVd1hea.js";
6
+ import { C as CluePopupContext } from "../AnnotationPreview-Bl447SKT.js";
7
+ import { f as useClueEnrichSelector } from "../ActionForm-CqKcnDWC.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 { f as useClueEnrichSelector } from "../ActionForm-BGVd1hea.js";
4
+ import { f as useClueEnrichSelector } from "../ActionForm-CqKcnDWC.js";
5
5
  import { a as useContextSelector } from "../index-_gpzM2Px.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 { e as useClueComponentSelector, f as useClueEnrichSelector } from "../ActionForm-BGVd1hea.js";
3
+ import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../ActionForm-CqKcnDWC.js";
4
4
  import { memo, useState, useEffect } from "react";
5
5
  const SourcePicker = () => {
6
6
  const { t } = useClueComponentSelector((ctx) => ctx.i18next);
@@ -3,10 +3,10 @@ import "@jsonforms/material-renderers";
3
3
  import "@jsonforms/react";
4
4
  import "@mui/material";
5
5
  import "../display/icons/Iconified.js";
6
- import "../../index-IPF68v-l.js";
6
+ import "../../index-DUEubgWN.js";
7
7
  import "../../hooks/ClueComponentContext.js";
8
- import { A } from "../../ActionForm-BGVd1hea.js";
9
- import "../../utils-BN7Z0YiP.js";
8
+ import { A } from "../../ActionForm-CqKcnDWC.js";
9
+ import "../../utils-CEySTPtg.js";
10
10
  import "react";
11
11
  import "../../index-_gpzM2Px.js";
12
12
  import "../ErrorBoundary.js";
@@ -3,7 +3,7 @@ import { I as Icon } from "../../iconify-DJxl6dC-.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 { d as useClueActionsSelector } from "../../ActionForm-BGVd1hea.js";
6
+ import { d as useClueActionsSelector } from "../../ActionForm-CqKcnDWC.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-DJxl6dC-.js";
3
3
  import "@mui/material";
4
4
  import "../../hooks/ClueComponentContext.js";
5
- import { R } from "../../ActionForm-BGVd1hea.js";
5
+ import { R } from "../../ActionForm-CqKcnDWC.js";
6
6
  import "react";
7
7
  import "../../index-_gpzM2Px.js";
8
8
  import "../ClassificationChip.js";
@@ -1,5 +1,5 @@
1
- import { c as cloneDeep } from "../../../cloneDeep-C_PzHHQ0.js";
2
- import { g as get } from "../../../get-DlGeJ2uz.js";
1
+ import { c as cloneDeep } from "../../../cloneDeep-l3UkXG5M.js";
2
+ import { g as get } from "../../../get-CdMThM8x.js";
3
3
  const adaptSchema = (_schema) => {
4
4
  const requiredFields = [];
5
5
  const schema = cloneDeep(_schema);
@@ -3,6 +3,8 @@ import { WithActionData } from "../../../types/WithActionData";
3
3
  import { FC } from 'react';
4
4
 
5
5
  declare const Result: FC<{
6
+ pluginName?: string;
6
7
  result: WithActionData<ActionResult>;
8
+ [additionalProp: string]: any;
7
9
  }>;
8
10
  export default Result;
@@ -1,22 +1,38 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Stack } from "@mui/material";
3
- import { J as JSONViewer } from "../../../index-IPF68v-l.js";
3
+ import { J as JSONViewer } from "../../../index-DUEubgWN.js";
4
4
  import Markdown from "../../display/markdown/index.js";
5
- import FileResult from "./FileResult.js";
6
- const Result = ({ result }) => {
7
- if (result.format === "markdown") {
8
- return /* @__PURE__ */ jsx(Markdown, { md: result.output });
5
+ import ErrorBoundary from "../../ErrorBoundary.js";
6
+ import { u as usePluginStore, c as clueUIPluginStore } from "../../../store-DMdRx9g0.js";
7
+ import { useTranslation } from "react-i18next";
8
+ const Result = ({
9
+ pluginName,
10
+ result,
11
+ ...additionalProps
12
+ }) => {
13
+ const pluginStore = usePluginStore();
14
+ const { t } = useTranslation();
15
+ const plugin = pluginName ?? clueUIPluginStore.getPlugin(result.format ?? "undefined", "action", result.actionId);
16
+ if (plugin) {
17
+ try {
18
+ const component = pluginStore.executeFunction(`${plugin}.actionResult`, {
19
+ result,
20
+ ...additionalProps
21
+ });
22
+ if (component !== void 0) {
23
+ return /* @__PURE__ */ jsx(ErrorBoundary, { children: component });
24
+ }
25
+ } catch {
26
+ return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
27
+ /* @__PURE__ */ jsx(Markdown, { md: t("format.render.error", { format: result.format }) }),
28
+ /* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
29
+ ] }) });
30
+ }
9
31
  }
10
- if (result.format === "json") {
11
- return /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true });
12
- }
13
- if (result.format === "file") {
14
- return /* @__PURE__ */ jsx(FileResult, { result });
15
- }
16
- return /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
17
- /* @__PURE__ */ jsx(Markdown, { md: "`" + result.format + "` is not recognized as a format in this application." }),
32
+ return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
33
+ /* @__PURE__ */ jsx(Markdown, { md: t("format.not.recognized", { format: result.format }) }),
18
34
  /* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
19
- ] });
35
+ ] }) });
20
36
  };
21
37
  export {
22
38
  Result as default
@@ -1,15 +1,15 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { Stack, Typography, Card, CardContent, Divider, Collapse } from "@mui/material";
3
- import { b as isPlainObject, a as flatten$1 } from "../../../../utils-BN7Z0YiP.js";
3
+ import { b as isPlainObject, a as flatten$1 } from "../../../../utils-CEySTPtg.js";
4
4
  import { cssImportant } from "../../../../utils/graph.js";
5
- import { b as baseGet, c as castPath, t as toKey, a as arrayMap } from "../../../../_baseGet-DKnGz1D3.js";
6
- import { c as copyObject, g as getAllKeysIn, b as baseClone } from "../../../../_baseClone-BUfES2sT.js";
5
+ import { b as baseGet, c as castPath, t as toKey, a as arrayMap } from "../../../../_baseGet-Cmp6FztG.js";
6
+ import { c as copyObject, g as getAllKeysIn, b as baseClone } from "../../../../_baseClone-9FaRd1R2.js";
7
7
  import { l as last } from "../../../../last-CUCl67Im.js";
8
8
  import { b as baseSlice } from "../../../../_baseSlice-GAv_YFTT.js";
9
- import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-D3wtzJ86.js";
9
+ import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-Co6QHDlG.js";
10
10
  import { useState, useEffect, useCallback, Fragment as Fragment$1 } from "react";
11
11
  import Iconified from "../../icons/Iconified.js";
12
- import { J as JSONViewer } from "../../../../index-IPF68v-l.js";
12
+ import { J as JSONViewer } from "../../../../index-DUEubgWN.js";
13
13
  import Markdown from "../../markdown/index.js";
14
14
  import ExpandMoreButton from "../ExpandMoreButton.js";
15
15
  import NodeTag from "./NodeTag.js";
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useRef, useState, useEffect, useCallback, createElement } from "react";
3
3
  import { useTheme, lighten, darken, Stack, Card, Typography, Autocomplete, TextField, FormControl, InputLabel, Select, MenuItem, alpha, IconButton, Collapse } from "@mui/material";
4
- import { p as parseEvent } from "../../../index-IPF68v-l.js";
4
+ import { p as parseEvent } from "../../../index-DUEubgWN.js";
5
5
  import { z as zoom, i as identity, s as select, t as transform, p as pointer } from "../../../index-CVUD9o3t.js";
6
6
  import { ClueComponentContext } from "../../../hooks/ClueComponentContext.js";
7
7
  import useComparator from "../../../hooks/useComparator.js";
8
8
  import { useMyLocalStorageItem } from "../../../hooks/useMyLocalStorage.js";
9
9
  import { StorageKey } from "../../../utils/constants.js";
10
- import { g as get } from "../../../get-DlGeJ2uz.js";
10
+ import { g as get } from "../../../get-CdMThM8x.js";
11
11
  import { a as useContextSelector } from "../../../index-_gpzM2Px.js";
12
12
  import { cssImportant } from "../../../utils/graph.js";
13
13
  import Iconified from "../icons/Iconified.js";
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { i as isObjectLike, b as baseGetTag } from "../../../../isObjectLike-OAgjjZye.js";
2
+ import { b as baseGetTag } from "../../../../_baseGetTag-Hj-0NTYF.js";
3
+ import { i as isObjectLike } from "../../../../isObjectLike-CeENW9FN.js";
3
4
  import { useState, useMemo, useCallback, useEffect } from "react";
4
5
  var numberTag = "[object Number]";
5
6
  function isNumber(value) {
@@ -4,8 +4,8 @@ import useMyHighlights from "../../../../../hooks/useMyHighlights.js";
4
4
  import { useMyLocalStorageItem } from "../../../../../hooks/useMyLocalStorage.js";
5
5
  import { StorageKey } from "../../../../../utils/constants.js";
6
6
  import { cyrb53 } from "../../../../../utils/graph.js";
7
- import { c as countBy } from "../../../../../countBy-Bkq0mSO-.js";
8
- import { s as sumBy } from "../../../../../sumBy-DZSVfXDE.js";
7
+ import { c as countBy } from "../../../../../countBy-Bqcp3VCs.js";
8
+ import { s as sumBy } from "../../../../../sumBy-D-HCzM2i.js";
9
9
  import { memo, useRef, useMemo, useCallback } from "react";
10
10
  import Leaf from "../Leaf.js";
11
11
  const DEFAULT_OPTIONS = {
@@ -4,13 +4,13 @@ import useComparator from "../../../../../hooks/useComparator.js";
4
4
  import useMyHighlights from "../../../../../hooks/useMyHighlights.js";
5
5
  import { useMyLocalStorageItem } from "../../../../../hooks/useMyLocalStorage.js";
6
6
  import { StorageKey, BUNDLE_SEPARATOR } from "../../../../../utils/constants.js";
7
- import { c as cloneDeep } from "../../../../../cloneDeep-C_PzHHQ0.js";
8
- import { g as get } from "../../../../../get-DlGeJ2uz.js";
7
+ import { c as cloneDeep } from "../../../../../cloneDeep-l3UkXG5M.js";
8
+ import { g as get } from "../../../../../get-CdMThM8x.js";
9
9
  import { i as isNil } from "../../../../../isNil-CIubwp4T.js";
10
- import { b as baseExtremum, a as baseGt } from "../../../../../_baseExtremum-kob8QXyt.js";
10
+ import { b as baseExtremum, a as baseGt } from "../../../../../_baseExtremum-wOGT4Dgw.js";
11
11
  import { i as identity } from "../../../../../identity-CPGTqrE4.js";
12
- import { i as isIterateeCall } from "../../../../../_isIterateeCall-CEvg7Bo6.js";
13
- import { t as toFinite } from "../../../../../toFinite-Bc55msYj.js";
12
+ import { i as isIterateeCall } from "../../../../../_isIterateeCall-B1IFEqVv.js";
13
+ import { t as toFinite } from "../../../../../toFinite-meZTg4Su.js";
14
14
  import { b as baseSum } from "../../../../../_baseSum-D0WC1dN0.js";
15
15
  import { memo, useMemo } from "react";
16
16
  import NodeCard from "../../elements/NodeCard.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@mui/material";
3
- import { J } from "../../../index-IPF68v-l.js";
4
- import "../../../utils-BN7Z0YiP.js";
3
+ import { J } from "../../../index-DUEubgWN.js";
4
+ import "../../../utils-CEySTPtg.js";
5
5
  import "../../../hooks/ClueComponentContext.js";
6
6
  import "../../../hooks/useMyLocalStorage.js";
7
7
  import "../../../utils/constants.js";
@@ -1,6 +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 { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-BGVd1hea.js";
3
+ import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-CqKcnDWC.js";
4
4
  import { useState, useRef, useCallback, useEffect } from "react";
5
5
  import Iconified from "../display/icons/Iconified.js";
6
6
  const EnrichPopover = ({ show = false, size = "small", selector }) => {
@@ -1,15 +1,13 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { I as Icon } from "../../iconify-DJxl6dC-.js";
3
- import { useTheme, Skeleton, Chip, Tooltip, Stack, Typography, LinearProgress, Paper, Box, IconButton } from "@mui/material";
3
+ import { useTheme, Skeleton, Chip, Tooltip, Stack, Typography, LinearProgress, Paper, IconButton } from "@mui/material";
4
4
  import { F as FlexOne } from "../../FlexOne-BSYAhhtG.js";
5
5
  import Iconified from "../display/icons/Iconified.js";
6
- import { J as JSONViewer } from "../../index-IPF68v-l.js";
7
6
  import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
8
- import { g as useClueFetcherSelector } from "../../ActionForm-BGVd1hea.js";
7
+ import { g as useClueFetcherSelector } from "../../ActionForm-CqKcnDWC.js";
9
8
  import React__default, { useState, useRef, useMemo, useEffect, memo } from "react";
10
9
  import { a as useContextSelector } from "../../index-_gpzM2Px.js";
11
- import Graph from "../display/graph/index.js";
12
- import Markdown from "../display/markdown/index.js";
10
+ import { FetcherResultView } from "./FetcherResultView.js";
13
11
  import PreviewModal from "./PreviewModal.js";
14
12
  import StatusChip from "./StatusChip.js";
15
13
  const Fetcher = React__default.memo(
@@ -72,6 +70,12 @@ const Fetcher = React__default.memo(
72
70
  }
73
71
  })();
74
72
  }, [classification, fetchSelector, fetcherId, t, type, value]);
73
+ const resultAdditionalProps = useMemo(() => {
74
+ if ((result == null ? void 0 : result.outcome) === "success" && result.format === "image") {
75
+ return { ...imageProps, onClick: () => setShowPreview(true) };
76
+ }
77
+ return { result };
78
+ }, [imageProps, result]);
75
79
  if (fetchCompleted) {
76
80
  if (!fetcherId) {
77
81
  console.warn("Missing fetcher Id. Component will not render.");
@@ -165,10 +169,7 @@ const Fetcher = React__default.memo(
165
169
  },
166
170
  children: [
167
171
  result.outcome === "failure" && /* @__PURE__ */ jsx("code", { style: { color: theme.palette.error.main }, children: /* @__PURE__ */ jsx("pre", { style: { marginTop: 0, marginBottom: 0 }, children: result.error }) }),
168
- result.format === "markdown" && /* @__PURE__ */ jsx(Markdown, { md: result.data }),
169
- result.format === "image" && /* @__PURE__ */ jsx("img", { src: result.data.image, alt: result.data.alt, ...imageProps, onClick: () => setShowPreview(true) }),
170
- result.format === "json" && /* @__PURE__ */ jsx(Box, { sx: { ".react-json-view": { backgroundColor: "transparent !important" } }, children: /* @__PURE__ */ jsx(JSONViewer, { data: result.data }) }),
171
- result.format === "graph" && /* @__PURE__ */ jsx(Graph, { graph: result.data, sx: { minHeight: "600px" } }),
172
+ /* @__PURE__ */ jsx(FetcherResultView, { result, fetcherId, ...resultAdditionalProps }),
172
173
  /* @__PURE__ */ jsx(FlexOne, {}),
173
174
  /* @__PURE__ */ jsxs(
174
175
  Stack,
@@ -214,7 +215,17 @@ const Fetcher = React__default.memo(
214
215
  ]
215
216
  }
216
217
  ),
217
- /* @__PURE__ */ jsx(PreviewModal, { ...previewProps, open: showPreview, result, onClose: () => setShowPreview(false) })
218
+ /* @__PURE__ */ jsx(
219
+ PreviewModal,
220
+ {
221
+ ...previewProps,
222
+ fetcherId,
223
+ slotProps: { fetcherResultView: resultAdditionalProps },
224
+ open: showPreview,
225
+ result,
226
+ onClose: () => setShowPreview(false)
227
+ }
228
+ )
218
229
  ]
219
230
  }
220
231
  )
@@ -0,0 +1,7 @@
1
+ import { RenderFetcherResultProps } from "../../plugins/ClueUIPlugin";
2
+ import { FC } from 'react';
3
+
4
+ export declare const FetcherResultView: FC<RenderFetcherResultProps & {
5
+ pluginName?: string;
6
+ fetcherId?: string;
7
+ }>;
@@ -0,0 +1,41 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Stack } from "@mui/material";
3
+ import { J as JSONViewer } from "../../index-DUEubgWN.js";
4
+ import Markdown from "../display/markdown/index.js";
5
+ import { u as usePluginStore, c as clueUIPluginStore } from "../../store-DMdRx9g0.js";
6
+ import { useTranslation } from "react-i18next";
7
+ import ErrorBoundary from "../ErrorBoundary.js";
8
+ const FetcherResultView = ({
9
+ pluginName,
10
+ result,
11
+ fetcherId,
12
+ ...props
13
+ }) => {
14
+ const pluginStore = usePluginStore();
15
+ const { t } = useTranslation();
16
+ const availablePlugin = pluginName ?? clueUIPluginStore.getPlugin(result.format ?? "undefined", "fetcher", void 0, fetcherId);
17
+ if (availablePlugin) {
18
+ try {
19
+ const component = pluginStore.executeFunction(`${availablePlugin}.fetcherResult`, {
20
+ result,
21
+ fetcherId,
22
+ ...props
23
+ });
24
+ if (component !== void 0) {
25
+ return /* @__PURE__ */ jsx(ErrorBoundary, { children: component });
26
+ }
27
+ } catch {
28
+ return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
29
+ /* @__PURE__ */ jsx(Markdown, { md: t("format.render.error", { format: result.format }) }),
30
+ /* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
31
+ ] }) });
32
+ }
33
+ }
34
+ return /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
35
+ /* @__PURE__ */ jsx(Markdown, { md: t("format.not.recognized", { format: result.format }) }),
36
+ /* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
37
+ ] });
38
+ };
39
+ export {
40
+ FetcherResultView
41
+ };
@@ -1,8 +1,13 @@
1
1
  import { ModalProps } from '@mui/material';
2
+ import { RenderFetcherResultProps } from "../../plugins/ClueUIPlugin";
2
3
  import { FetcherResult } from "../../types/fetcher";
3
4
 
4
5
  declare const _default: import('react').NamedExoticComponent<{
5
6
  result: FetcherResult;
7
+ fetcherId?: string;
6
8
  onClose?: () => void;
7
- } & Omit<ModalProps, "children">>;
9
+ slotProps?: ModalProps["slotProps"] & {
10
+ fetcherResultView?: Partial<RenderFetcherResultProps>;
11
+ };
12
+ } & Omit<ModalProps, "children" | "slotProps">>;
8
13
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Modal, Paper } from "@mui/material";
3
3
  import { memo } from "react";
4
- const PreviewModal = ({ result, onClose, open = false, ...otherProps }) => {
4
+ import { FetcherResultView } from "./FetcherResultView.js";
5
+ const PreviewModal = ({ result, slotProps = {}, fetcherId, onClose, open = false, ...otherProps }) => {
6
+ const { fetcherResultView, ...modalSlotProps } = slotProps;
5
7
  return /* @__PURE__ */ jsx(
6
8
  Modal,
7
9
  {
@@ -11,8 +13,9 @@ const PreviewModal = ({ result, onClose, open = false, ...otherProps }) => {
11
13
  ...Array.isArray(otherProps == null ? void 0 : otherProps.sx) ? otherProps == null ? void 0 : otherProps.sx : [otherProps == null ? void 0 : otherProps.sx]
12
14
  ],
13
15
  onClose,
16
+ slotProps: modalSlotProps,
14
17
  ...otherProps,
15
- children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "90%", maxWidth: "90%", p: 2, overflow: "auto" }, children: (result == null ? void 0 : result.format) === "image" && /* @__PURE__ */ jsx("img", { src: result.data.image, alt: result.data.alt, style: { maxWidth: "100%" } }) })
18
+ children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "90%", maxWidth: "90%", p: 2, overflow: "auto" }, children: /* @__PURE__ */ jsx(FetcherResultView, { ...fetcherResultView ?? {}, result, fetcherId }) })
16
19
  }
17
20
  );
18
21
  };
@@ -1,5 +1,5 @@
1
1
  import { ClueGroupContext } from "../../hooks/ClueGroupContext.js";
2
- import { i as isEqual } from "../../utils-BN7Z0YiP.js";
2
+ import { i as isEqual } from "../../utils-CEySTPtg.js";
3
3
  import { memo, useEffect } from "react";
4
4
  import { a as useContextSelector } from "../../index-_gpzM2Px.js";
5
5
  const Entry = ({ children, entry, selected = false }) => {
@@ -4,7 +4,7 @@ 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 { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-BGVd1hea.js";
7
+ import { e as useClueComponentSelector, f as useClueEnrichSelector, c as capitalize } from "../../ActionForm-CqKcnDWC.js";
8
8
  import { safeDispatchEvent } from "../../utils/window.js";
9
9
  import { useState, useMemo, useCallback } from "react";
10
10
  import { a as useContextSelector } from "../../index-_gpzM2Px.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 { e as useClueComponentSelector, f as useClueEnrichSelector } from "../../ActionForm-BGVd1hea.js";
4
+ import { e as useClueComponentSelector, f as useClueEnrichSelector } from "../../ActionForm-CqKcnDWC.js";
5
5
  import { useContext, useState, useEffect } from "react";
6
6
  const QueryStatus = () => {
7
7
  const { t } = useClueComponentSelector((ctx) => ctx.i18next);
@@ -1,5 +1,5 @@
1
- import { b as baseAssignValue } from "./_baseAssignValue-Dltt6-s5.js";
2
- import { c as createAggregator } from "./_createAggregator-BDMdCE6g.js";
1
+ import { b as baseAssignValue } from "./_baseAssignValue-CNUVPOBW.js";
2
+ import { c as createAggregator } from "./_createAggregator-BUZrP_is.js";
3
3
  var objectProto = Object.prototype;
4
4
  var hasOwnProperty = objectProto.hasOwnProperty;
5
5
  var countBy = createAggregator(function(result, value, key) {
package/database/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { b } from "../index-VDwFWSqU.js";
1
+ import { b } from "../index-Dj1N4IQP.js";
2
2
  import "../utils/constants.js";
3
3
  import "./globals.js";
4
- import "../replication-DvYQDhM_.js";
4
+ import "../replication--gLEZw8a.js";
5
5
  export {
6
6
  b as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import "../index-CmQM2DaO.js";
2
- import { aR } from "../replication-DvYQDhM_.js";
1
+ import "../index-DpJxD74E.js";
2
+ import { aR } from "../replication--gLEZw8a.js";
3
3
  import "./globals.js";
4
4
  import "../last-CUCl67Im.js";
5
5
  export {
@@ -52,6 +52,7 @@
52
52
  "enrich": "Enrich",
53
53
  "error": "Error",
54
54
  "error.unexpected": "An unexpected error occurred",
55
+ "format.not.recognized": "Unable to display result. No available plugins to display returned format: `{{format}}`.",
55
56
  "graph.no.dataset": "No dataset has been selected!",
56
57
  "graph.node.input.label": "Enter a node ID, and press [ctrl + enter] to select it. [ctrl + space] will open an autocomplete menu.",
57
58
  "graph.show.more": "show more",
@@ -52,6 +52,7 @@
52
52
  "enrich": "Enrichir",
53
53
  "error": "Erreur",
54
54
  "error.unexpected": "Une erreur inattendue s'est produite",
55
+ "format.not.recognized": "Impossible d'afficher le résultat. Aucun plugin disponible pour afficher le format renvoyé : `{{format}}`.",
55
56
  "graph.no.dataset": "Aucun jeu de données n'a été sélectionné!",
56
57
  "graph.node.input.label": "Entrez un ID de nœud et appuyez sur [ctrl + entrée] pour le sélectionner. [ctrl + espace] ouvrira un menu d'auto-complétion.",
57
58
  "graph.show.more": "Afficher plus",
@@ -1,4 +1,4 @@
1
- import { b as baseGet } from "./_baseGet-DKnGz1D3.js";
1
+ import { b as baseGet } from "./_baseGet-Cmp6FztG.js";
2
2
  function get(object, path, defaultValue) {
3
3
  var result = object == null ? void 0 : baseGet(object, path);
4
4
  return result === void 0 ? defaultValue : result;
@@ -1,5 +1,5 @@
1
- import { b as baseAssignValue } from "./_baseAssignValue-Dltt6-s5.js";
2
- import { c as createAggregator } from "./_createAggregator-BDMdCE6g.js";
1
+ import { b as baseAssignValue } from "./_baseAssignValue-CNUVPOBW.js";
2
+ import { c as createAggregator } from "./_createAggregator-BUZrP_is.js";
3
3
  var objectProto = Object.prototype;
4
4
  var hasOwnProperty = objectProto.hasOwnProperty;
5
5
  var groupBy = createAggregator(function(result, value, key) {
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@mui/material";
3
- import { C, a } from "../ActionForm-BGVd1hea.js";
4
- import "../index-CmQM2DaO.js";
3
+ import { C, a } from "../ActionForm-CqKcnDWC.js";
4
+ import "../index-DpJxD74E.js";
5
5
  import "../components/display/icons/Iconified.js";
6
6
  import "../components/ErrorBoundary.js";
7
7
  import "../data/event.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { b as buildDatabase } from "../index-VDwFWSqU.js";
2
+ import { b as buildDatabase } from "../index-Dj1N4IQP.js";
3
3
  import { createContext, useState, useRef, useEffect } from "react";
4
4
  const ClueDatabaseContext = createContext(null);
5
5
  const ClueDatabaseProvider = ({
@@ -1,18 +1,19 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../iconify-DJxl6dC-.js";
3
- import "../index-CmQM2DaO.js";
3
+ import "../index-DpJxD74E.js";
4
4
  import "../database/globals.js";
5
5
  import "../utils/loggerUtil.js";
6
- import "../utils-BN7Z0YiP.js";
7
- import { C, a } from "../ClueEnrichContext-DKZ2iqmV.js";
8
- import "../sessionStorage-Dbmo2Exe.js";
9
- import "../groupBy-CXx1vslF.js";
10
- import "../useClueTypeConfig-CnMg5Ny8.js";
6
+ import "../utils-CEySTPtg.js";
7
+ import { C, a } from "../ClueEnrichContext-B3YrTCaJ.js";
8
+ import "../sessionStorage-B68y-wnE.js";
9
+ import "../groupBy-BVV07EGQ.js";
10
+ import "../uniq-CahZPAwp.js";
11
11
  import "react";
12
12
  import "../index-_gpzM2Px.js";
13
13
  import "./ClueDatabaseContext.js";
14
14
  import "./useClueConfig.js";
15
- import "../_baseUniq-BqxNeJD9.js";
15
+ import "./useClueTypeConfig.js";
16
+ import "../isEmpty-BE656RUK.js";
16
17
  export {
17
18
  C as ClueEnrichContext,
18
19
  a as ClueEnrichProvider
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { a as api } from "../index-CmQM2DaO.js";
2
+ import { a as api } from "../index-DpJxD74E.js";
3
3
  import { SNACKBAR_EVENT_ID } from "../data/event.js";
4
4
  import { safeDispatchEvent } from "../utils/window.js";
5
5
  import { useState, useRef, useMemo, useCallback, useEffect } from "react";
@@ -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-_gpzM2Px.js";
4
- import { f as useClueEnrichSelector } from "../ActionForm-BGVd1hea.js";
4
+ import { f as useClueEnrichSelector } from "../ActionForm-CqKcnDWC.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-LLor6159.js";
3
+ import { C, a } from "../AnnotationPreview-Bl447SKT.js";
4
4
  import "../data/event.js";
5
5
  import "../utils/window.js";
6
- import "../AnnotationDetails-D4f9aw7S.js";
6
+ import "../AnnotationDetails-BlPd3T8k.js";
7
7
  import "react";
8
8
  import "../index-_gpzM2Px.js";
9
9
  export {