@cccsaurora/clue-ui 1.1.0-dev.10 → 1.1.0-dev.100
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-D4ryHO0M.js → ActionForm-ByeOzpc4.js} +162 -43
- package/{AnnotationDetails-YAPoqw3R.js → AnnotationDetails-DknbKDyl.js} +1 -1
- package/{AnnotationPreview-DiQDjt9s.js → AnnotationPreview-CQwKs8se.js} +2 -2
- package/{ClueEnrichContext-DIn6g8tw.js → ClueEnrichContext-6NJfXpUB.js} +27 -13
- package/_commonjsHelpers-DWwsNxpa.js +8 -0
- 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/AnnotationBody.js +1 -1
- package/components/AnnotationDetailPopover.js +1 -1
- package/components/AnnotationDetails.js +2 -2
- package/components/AnnotationEntry.js +1 -1
- package/components/AnnotationPreview.js +2 -2
- package/components/ClassificationChip.d.ts +2 -1
- package/components/EnrichedCard.js +11 -5
- package/components/EnrichedChip.js +4 -10
- package/components/EnrichedTypography.d.ts +1 -1
- package/components/EnrichedTypography.js +7 -12
- package/components/actions/ActionForm.js +3 -3
- package/components/actions/ResultModal.js +12 -44
- package/components/actions/form/schemaAdapter.js +4 -3
- package/components/display/graph/elements/NodeCard.js +26 -4
- package/components/display/graph/index.js +15 -16
- package/components/display/json/index.js +2 -2
- package/components/display/markdown/index.js +190 -19
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/fetchers/Fetcher.js +1 -1
- package/components/fetchers/StatusChip.js +0 -1
- package/components/group/Entry.js +1 -1
- package/components/group/GroupControl.js +3 -2
- package/components/stats/QueryStatus.js +8 -4
- package/database/index.js +1 -1
- package/en/translation.json +39 -59
- package/fr/translation.json +37 -56
- package/hooks/ClueActionContext.d.ts +26 -0
- package/hooks/ClueActionContext.js +5 -4
- package/hooks/ClueDatabaseContext.js +1 -1
- package/hooks/ClueEnrichContext.js +2 -2
- package/hooks/ClueEnrichContextType.d.ts +7 -0
- 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 +4 -5
- package/hooks/selectors.js +3 -4
- package/hooks/useActionResult.d.ts +14 -0
- package/hooks/useActionResult.js +5 -0
- package/hooks/useAnnotations.js +1 -1
- package/hooks/useClue.js +1 -1
- package/hooks/useClueActions.d.ts +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 +6 -3
- package/icons/Opinion.js +1 -1
- package/{index-BMxyILVD.js → index-Bi21Wb23.js} +1 -1
- package/{index-BHPT3qoB.js → index-C3lkTD69.js} +1 -1
- package/{index-Dz1kF2MU.js → index-CC12Ux-9.js} +2 -2
- package/main.d.ts +3 -2
- package/main.js +17 -13
- package/package.json +3 -3
- package/types/RunningActionData.d.ts +4 -3
- package/types/action.d.ts +10 -1
- package/types/config.d.ts +4 -1
- package/{useClueTypeConfig-CH-nGq6a.js → useClueTypeConfig-XvGvIw2S.js} +54 -37
- 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/utils/time.d.ts +3 -0
- package/utils/time.js +536 -0
- package/utils/utils.js +2 -1
- package/utils-7OtvGnmf.js +200 -0
- package/_commonjsHelpers-CUmg6egw.js +0 -6
- 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
- package/utils-Dr4wbKBZ.js +0 -4182
package/hooks/useAnnotations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as uniqBy } from "../ClueEnrichContext-
|
|
1
|
+
import { b as uniqBy } from "../ClueEnrichContext-6NJfXpUB.js";
|
|
2
2
|
import { useContext, useMemo, useState, useEffect } from "react";
|
|
3
3
|
import { ClueDatabaseContext } from "./ClueDatabaseContext.js";
|
|
4
4
|
import { useClueEnrichSelector } from "./selectors.js";
|
package/hooks/useClue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as useContext } from "../index-BDVjGvMI.js";
|
|
2
|
-
import { C as ClueEnrichContext } from "../ClueEnrichContext-
|
|
2
|
+
import { C as ClueEnrichContext } from "../ClueEnrichContext-6NJfXpUB.js";
|
|
3
3
|
const useClue = () => {
|
|
4
4
|
return useContext(ClueEnrichContext);
|
|
5
5
|
};
|
package/hooks/useClueActions.js
CHANGED
package/hooks/useClueConfig.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
declare const useClueConfig: () => import("../hooks/ClueConfigProvider").ClueConfigContextType;
|
|
2
|
+
export default useClueConfig;
|
package/hooks/useClueConfig.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StorageKey } from "../utils/constants";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
declare const useMyLocalStorage: () => {
|
|
4
4
|
get: <T>(key: string) => T;
|
|
5
5
|
set: (key: string, value: any) => void;
|
|
6
6
|
remove: (key: string, withPrefix?: boolean) => void;
|
|
@@ -12,5 +12,6 @@ export default function useMyLocalStorage(): {
|
|
|
12
12
|
}[];
|
|
13
13
|
clear: () => void;
|
|
14
14
|
};
|
|
15
|
-
export declare
|
|
16
|
-
export declare
|
|
15
|
+
export declare const useMyLocalStorageItem: <T>(key: StorageKey, initialValue?: T) => [T, (value: T, save?: boolean) => void, () => void];
|
|
16
|
+
export declare const useMyLocalStorageProvider: () => import('components/app/providers/LocalStorageProvider').LocalStorageContextType;
|
|
17
|
+
export default useMyLocalStorage;
|
|
@@ -64,15 +64,15 @@ function useLocalStorageItem(key, initialValue, prefix) {
|
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
const LocalStorageContext = createContext(null);
|
|
67
|
-
|
|
67
|
+
const useMyLocalStorage = () => {
|
|
68
68
|
return useLocalStorage(MY_LOCAL_STORAGE_PREFIX);
|
|
69
|
-
}
|
|
70
|
-
|
|
69
|
+
};
|
|
70
|
+
const useMyLocalStorageItem = (key, initialValue) => {
|
|
71
71
|
return useLocalStorageItem(key, initialValue, MY_LOCAL_STORAGE_PREFIX);
|
|
72
|
-
}
|
|
73
|
-
|
|
72
|
+
};
|
|
73
|
+
const useMyLocalStorageProvider = () => {
|
|
74
74
|
return useContext(LocalStorageContext);
|
|
75
|
-
}
|
|
75
|
+
};
|
|
76
76
|
export {
|
|
77
77
|
useMyLocalStorage as default,
|
|
78
78
|
useMyLocalStorageItem,
|
package/icons/Action.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
3
|
import { useTheme, Stack, Divider, Typography } from "@mui/material";
|
|
4
4
|
import CountBadge from "../components/CountBadge.js";
|
|
5
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
6
|
-
import { u as useClueActions } from "../ActionForm-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CQwKs8se.js";
|
|
6
|
+
import { u as useClueActions } from "../ActionForm-ByeOzpc4.js";
|
|
7
7
|
import { g as groupBy } from "../groupBy-DC2oOuBN.js";
|
|
8
8
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
9
9
|
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
package/icons/Assessment.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
3
|
import { useTheme, Stack, Chip, Divider, Grid, Tooltip } from "@mui/material";
|
|
4
4
|
import CountBadge from "../components/CountBadge.js";
|
|
5
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CQwKs8se.js";
|
|
6
6
|
import { g as groupBy } from "../groupBy-DC2oOuBN.js";
|
|
7
7
|
import { l as last } from "../last-CUCl67Im.js";
|
|
8
8
|
import { m as maxBy, s as sortBy } from "../sortBy-B-UKp4GT.js";
|
package/icons/Context.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Stack, Divider } from "@mui/material";
|
|
|
4
4
|
import AnnotationEntry from "../components/AnnotationEntry.js";
|
|
5
5
|
import CountBadge from "../components/CountBadge.js";
|
|
6
6
|
import Iconified from "../components/display/icons/Iconified.js";
|
|
7
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
7
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CQwKs8se.js";
|
|
8
8
|
import { g as groupBy } from "../groupBy-DC2oOuBN.js";
|
|
9
9
|
import { memo, useRef, useMemo, useEffect } from "react";
|
|
10
10
|
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
|
@@ -24,7 +24,10 @@ const ContextIcon = ({
|
|
|
24
24
|
() => annotations.filter((annotation) => annotation.type === "context" && annotation.ubiquitous === ubiquitous),
|
|
25
25
|
[annotations, ubiquitous]
|
|
26
26
|
);
|
|
27
|
-
const additionalIcons = useMemo(
|
|
27
|
+
const additionalIcons = useMemo(
|
|
28
|
+
() => contextAnnotations.filter((annotation) => annotation.icon || annotation.analytic_icon),
|
|
29
|
+
[contextAnnotations]
|
|
30
|
+
);
|
|
28
31
|
useEffect(() => {
|
|
29
32
|
if (disableTooltip) {
|
|
30
33
|
closeInfo("context", value);
|
|
@@ -35,7 +38,7 @@ const ContextIcon = ({
|
|
|
35
38
|
}
|
|
36
39
|
const icons = [];
|
|
37
40
|
if (additionalIcons.length) {
|
|
38
|
-
Object.entries(groupBy(additionalIcons,
|
|
41
|
+
Object.entries(groupBy(additionalIcons, (annotation) => annotation.icon || annotation.analytic_icon)).forEach(
|
|
39
42
|
([icon, _annotations]) => icons.push(
|
|
40
43
|
/* @__PURE__ */ jsx(
|
|
41
44
|
"span",
|
package/icons/Opinion.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
3
|
import { useTheme, Stack, Chip, Divider, Grid } from "@mui/material";
|
|
4
4
|
import CountBadge from "../components/CountBadge.js";
|
|
5
|
-
import { C as CluePopupContext } from "../AnnotationPreview-
|
|
5
|
+
import { C as CluePopupContext } from "../AnnotationPreview-CQwKs8se.js";
|
|
6
6
|
import chain from "../utils/chain.js";
|
|
7
7
|
import { g as groupBy } from "../groupBy-DC2oOuBN.js";
|
|
8
8
|
import { s as sortBy } from "../sortBy-B-UKp4GT.js";
|
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ClickAwayListener, TextField, InputAdornment, Popper, Paper, MenuList, MenuItem, ListItemText, useTheme, Stack, Skeleton } from "@mui/material";
|
|
6
6
|
import { useRef, useState, useEffect, useMemo, lazy } from "react";
|
|
7
|
-
import { r as removeEmpty, s as searchObject, f as flatten } from "./utils-
|
|
7
|
+
import { r as removeEmpty, s as searchObject, f as flatten } from "./utils-7OtvGnmf.js";
|
|
8
8
|
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
9
9
|
import { useMyLocalStorageItem } from "./hooks/useMyLocalStorage.js";
|
|
10
10
|
import { StorageKey } from "./utils/constants.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NON_PREMIUM_COLLECTION_LIMIT, R as RxDatabaseBase, a as RxCollectionBase, c as createRxDocumentConstructor, d as basePrototype, n as newRxError, i as isMaybeReadonlyArray, g as getSchemaByObjectPath, f as flattenObject, e as getProperty, t as trimDots, h as appendToArray, j as getPrimaryFieldOfPrimaryKey, k as newRxTypeError, l as getPreviousVersions, m as isFolderPath, o as findUndefinedPath, p as deepEqual, q as prepareQuery, r as fillPrimaryKey, s as hasPremiumFlag, u as RXDB_VERSION, v as hashStringToNumber, w as deepFreeze } from "./index-
|
|
1
|
+
import { N as NON_PREMIUM_COLLECTION_LIMIT, R as RxDatabaseBase, a as RxCollectionBase, c as createRxDocumentConstructor, d as basePrototype, n as newRxError, i as isMaybeReadonlyArray, g as getSchemaByObjectPath, f as flattenObject, e as getProperty, t as trimDots, h as appendToArray, j as getPrimaryFieldOfPrimaryKey, k as newRxTypeError, l as getPreviousVersions, m as isFolderPath, o as findUndefinedPath, p as deepEqual, q as prepareQuery, r as fillPrimaryKey, s as hasPremiumFlag, u as RXDB_VERSION, v as hashStringToNumber, w as deepFreeze } from "./index-CC12Ux-9.js";
|
|
2
2
|
var ERROR_MESSAGES = {
|
|
3
3
|
// util.js / config
|
|
4
4
|
UT1: "given name is no string or empty",
|
|
@@ -11,7 +11,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
11
11
|
var _hashFn, _keyMap, _unpack, _options, _root, _local, _operators, _iteratees, _yieldedValues, _getNext, _a, _source, _predicate, _projection, _options2, _operators2, _result, _buffer, _compiled, _options3, _condition;
|
|
12
12
|
import { d as debounce } from "./debounce-bV0h5FC5.js";
|
|
13
13
|
import { i as isObject$3 } from "./isObject-FTY-5JQX.js";
|
|
14
|
-
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-
|
|
14
|
+
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.js";
|
|
15
15
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
16
16
|
function throttle(func, wait, options) {
|
|
17
17
|
var leading = true, trailing = true;
|
|
@@ -17583,7 +17583,7 @@ const buildDatabase = async (_config = {}) => {
|
|
|
17583
17583
|
addRxPlugin(RxDBUpdatePlugin);
|
|
17584
17584
|
/* v8 ignore next 10 -- @preserve */
|
|
17585
17585
|
if (config2.devMode) {
|
|
17586
|
-
await import("./index-
|
|
17586
|
+
await import("./index-C3lkTD69.js").then((module) => {
|
|
17587
17587
|
addRxPlugin(module.RxDBDevModePlugin);
|
|
17588
17588
|
if (config2.testing) {
|
|
17589
17589
|
module.disableWarnings();
|
package/main.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { default as SourcePicker } from './components/SourcePicker';
|
|
|
23
23
|
import { SNACKBAR_EVENT_ID, SnackbarEvents } from './data/event';
|
|
24
24
|
import { default as buildDatabase } from './database';
|
|
25
25
|
import { ClueComponentContext } from './hooks/ClueComponentContext';
|
|
26
|
-
import { ClueConfigContextProps } from './hooks/ClueConfigProvider';
|
|
26
|
+
import { ClueConfigContextProps, ClueConfigContext } from './hooks/ClueConfigProvider';
|
|
27
27
|
import { ClueDatabaseContext, ClueDatabaseContextProps } from './hooks/ClueDatabaseContext';
|
|
28
28
|
import { ClueEnrichContext } from './hooks/ClueEnrichContext';
|
|
29
29
|
import { CluePopupContext } from './hooks/CluePopupContext';
|
|
@@ -31,11 +31,12 @@ import { ClueProvider } from './hooks/ClueProvider';
|
|
|
31
31
|
import { useClueActionsSelector, useClueEnrichSelector, useClueFetcherSelector } from './hooks/selectors';
|
|
32
32
|
import { default as useClue } from './hooks/useClue';
|
|
33
33
|
import { default as useClueActions } from './hooks/useClueActions';
|
|
34
|
+
import { default as useClueConfig } from './hooks/useClueConfig';
|
|
34
35
|
import { default as AssessmentIcon } from './icons/Assessment';
|
|
35
36
|
import { default as ContextIcon } from './icons/Context';
|
|
36
37
|
import { default as OpinionIcon } from './icons/Opinion';
|
|
37
38
|
import { default as FrequencyText } from './text/Frequency';
|
|
38
39
|
|
|
39
|
-
export { ActionForm, AnnotationDetailPopover, AnnotationDetails, AnnotationEntry, AnnotationPreview, AssessmentIcon, buildDatabase, ClueComponentContext, ClueDatabaseContext, ClueEnrichContext, CluePopupContext, ClueProvider, ContextIcon, CountBadge, EnrichedCard, EnrichedChip, EnrichedTypography, Entry, Fetcher, FrequencyText, Group, GroupControl, OpinionIcon, SNACKBAR_EVENT_ID, SourcePicker, StatusChip, useClue, useClueActions, useClueActionsSelector, useClueEnrichSelector, useClueFetcherSelector };
|
|
40
|
+
export { ActionForm, AnnotationDetailPopover, AnnotationDetails, AnnotationEntry, AnnotationPreview, AssessmentIcon, buildDatabase, ClueComponentContext, ClueConfigContext, ClueDatabaseContext, ClueEnrichContext, CluePopupContext, ClueProvider, ContextIcon, CountBadge, EnrichedCard, EnrichedChip, EnrichedTypography, Entry, Fetcher, FrequencyText, Group, GroupControl, OpinionIcon, SNACKBAR_EVENT_ID, SourcePicker, StatusChip, useClue, useClueActions, useClueActionsSelector, useClueConfig, useClueEnrichSelector, useClueFetcherSelector };
|
|
40
41
|
export type { ActionDefinition, ActionDefinitionsResponse, ActionResult, Annotation, BulkEnrichRequest, BulkEnrichResponses, ClueConfigContextProps, ClueDatabase, ClueDatabaseCollections, ClueDatabaseContextProps, ClueResponse, EnrichedCardProps, EnrichedTypographyProps, Enrichment, EnrichmentProps, EnrichResponse, EnrichResponses, FailedRequest, FetcherDefinition, FetcherDefinitionsResponse, FetcherResult, RunningActionData, Selector, SelectorCollection, SelectorCollectionMethods, SelectorDocMethods, SelectorDocType, SelectorDocument, SnackbarEvents, StatusCollection, StatusCollectionMethods, StatusDocMethods, StatusDocType, StatusDocument, TypesDetectionResponse, TypesResponse, WithExtra };
|
|
41
42
|
export type { ClueConfigContextProps as BorealisConfigContextProps, ClueDatabase as BorealisDatabase, ClueDatabaseCollections as BorealisDatabaseCollections, ClueDatabaseContextProps as BorealisDatabaseContextProps, ClueResponse as BorealisResponse };
|
package/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A, u } from "./ActionForm-
|
|
1
|
+
import { A, u } from "./ActionForm-ByeOzpc4.js";
|
|
2
2
|
import { default as default2 } from "./components/AnnotationDetailPopover.js";
|
|
3
|
-
import { A as A2 } from "./AnnotationDetails-
|
|
3
|
+
import { A as A2 } from "./AnnotationDetails-DknbKDyl.js";
|
|
4
4
|
import { default as default3 } from "./components/AnnotationEntry.js";
|
|
5
|
-
import { A as A3, C } from "./AnnotationPreview-
|
|
5
|
+
import { A as A3, C } from "./AnnotationPreview-CQwKs8se.js";
|
|
6
6
|
import { default as default4 } from "./components/CountBadge.js";
|
|
7
7
|
import { default as default5 } from "./components/EnrichedCard.js";
|
|
8
8
|
import { default as default6 } from "./components/EnrichedChip.js";
|
|
@@ -14,40 +14,43 @@ import { default as default11 } from "./components/group/Group.js";
|
|
|
14
14
|
import { default as default12 } from "./components/group/GroupControl.js";
|
|
15
15
|
import { default as default13 } from "./components/SourcePicker.js";
|
|
16
16
|
import { SNACKBAR_EVENT_ID } from "./data/event.js";
|
|
17
|
-
import { b } from "./index-
|
|
17
|
+
import { b } from "./index-CC12Ux-9.js";
|
|
18
18
|
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
19
|
+
import { ClueConfigContext } from "./hooks/ClueConfigProvider.js";
|
|
19
20
|
import { ClueDatabaseContext } from "./hooks/ClueDatabaseContext.js";
|
|
20
|
-
import { C as C2 } from "./ClueEnrichContext-
|
|
21
|
+
import { C as C2 } from "./ClueEnrichContext-6NJfXpUB.js";
|
|
21
22
|
import { ClueProvider } from "./hooks/ClueProvider.js";
|
|
22
23
|
import { useClueActionsSelector, useClueEnrichSelector, useClueFetcherSelector } from "./hooks/selectors.js";
|
|
23
24
|
import { default as default14 } from "./hooks/useClue.js";
|
|
24
|
-
import { default as default15 } from "./
|
|
25
|
-
import { default as default16 } from "./icons/
|
|
26
|
-
import { default as default17 } from "./icons/
|
|
27
|
-
import { default as default18 } from "./
|
|
25
|
+
import { default as default15 } from "./hooks/useClueConfig.js";
|
|
26
|
+
import { default as default16 } from "./icons/Assessment.js";
|
|
27
|
+
import { default as default17 } from "./icons/Context.js";
|
|
28
|
+
import { default as default18 } from "./icons/Opinion.js";
|
|
29
|
+
import { default as default19 } from "./text/Frequency.js";
|
|
28
30
|
export {
|
|
29
31
|
A as ActionForm,
|
|
30
32
|
default2 as AnnotationDetailPopover,
|
|
31
33
|
A2 as AnnotationDetails,
|
|
32
34
|
default3 as AnnotationEntry,
|
|
33
35
|
A3 as AnnotationPreview,
|
|
34
|
-
|
|
36
|
+
default16 as AssessmentIcon,
|
|
35
37
|
ClueComponentContext,
|
|
38
|
+
ClueConfigContext,
|
|
36
39
|
ClueDatabaseContext,
|
|
37
40
|
C2 as ClueEnrichContext,
|
|
38
41
|
C as CluePopupContext,
|
|
39
42
|
ClueProvider,
|
|
40
|
-
|
|
43
|
+
default17 as ContextIcon,
|
|
41
44
|
default4 as CountBadge,
|
|
42
45
|
default5 as EnrichedCard,
|
|
43
46
|
default6 as EnrichedChip,
|
|
44
47
|
default7 as EnrichedTypography,
|
|
45
48
|
default10 as Entry,
|
|
46
49
|
default8 as Fetcher,
|
|
47
|
-
|
|
50
|
+
default19 as FrequencyText,
|
|
48
51
|
default11 as Group,
|
|
49
52
|
default12 as GroupControl,
|
|
50
|
-
|
|
53
|
+
default18 as OpinionIcon,
|
|
51
54
|
SNACKBAR_EVENT_ID,
|
|
52
55
|
default13 as SourcePicker,
|
|
53
56
|
default9 as StatusChip,
|
|
@@ -55,6 +58,7 @@ export {
|
|
|
55
58
|
default14 as useClue,
|
|
56
59
|
u as useClueActions,
|
|
57
60
|
useClueActionsSelector,
|
|
61
|
+
default15 as useClueConfig,
|
|
58
62
|
useClueEnrichSelector,
|
|
59
63
|
useClueFetcherSelector
|
|
60
64
|
};
|
package/package.json
CHANGED
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"@testing-library/user-event": "^14.6.1",
|
|
20
20
|
"ajv": "^8.17.1",
|
|
21
21
|
"d3": "^7.9.0",
|
|
22
|
+
"dayjs": "^1.11.19",
|
|
22
23
|
"fuse.js": "^7.1.0",
|
|
23
24
|
"i18next": "^23.16.8",
|
|
24
25
|
"i18next-browser-languagedetector": "^7.2.2",
|
|
25
|
-
"lodash-es": "^4.17.
|
|
26
|
+
"lodash-es": "^4.17.23",
|
|
26
27
|
"react-i18next": "^13.5.0",
|
|
27
28
|
"react-markdown": "10.1.0",
|
|
28
29
|
"react-syntax-highlighter": "^15.6.1",
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
},
|
|
63
64
|
"type": "module",
|
|
64
65
|
"types": "main.d.ts",
|
|
65
|
-
"version": "1.1.0-dev.
|
|
66
|
+
"version": "1.1.0-dev.100",
|
|
66
67
|
"exports": {
|
|
67
68
|
".": "./main.js",
|
|
68
69
|
"./index.css": "./index.css",
|
|
@@ -100,7 +101,6 @@
|
|
|
100
101
|
"./components/display/graph/visualizations/tree/*": "./components/display/graph/visualizations/tree/*.js",
|
|
101
102
|
"./components/display/graph/visualizations/tree": "./components/display/graph/visualizations/tree/index.js",
|
|
102
103
|
"./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
|
|
103
|
-
"./components/display/markdown/markdownPlugins/*.md": "./components/display/markdown/markdownPlugins/*.md.js",
|
|
104
104
|
"./components/actions/form/*": "./components/actions/form/*.js"
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionDefinition, ActionResult } from "../
|
|
2
|
-
import { Selector } from
|
|
3
|
-
import {
|
|
1
|
+
import { ActionContextInformation, ActionDefinition, ActionResult } from "../types/action";
|
|
2
|
+
import { Selector } from "../types/lookup";
|
|
3
|
+
import { WithActionData } from './WithActionData';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
interface RunningActionData {
|
|
@@ -8,6 +8,7 @@ interface RunningActionData {
|
|
|
8
8
|
action: ActionDefinition;
|
|
9
9
|
selectors: Selector[];
|
|
10
10
|
params: { [index: string]: any };
|
|
11
|
+
context?: ActionContextInformation;
|
|
11
12
|
onComplete?: (result: WithActionData<ActionResult>) => void;
|
|
12
13
|
timeout?: number;
|
|
13
14
|
}
|
package/types/action.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { JSONSchema7 } from 'json-schema';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
export interface ActionContextInformation {
|
|
5
|
+
url?: string;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
language?: string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
export interface ActionDefinition {
|
|
5
12
|
accept_multiple?: boolean;
|
|
6
13
|
action_icon?: string;
|
|
@@ -15,11 +22,13 @@ export interface ActionDefinition {
|
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
export interface ActionResult<T = any> {
|
|
18
|
-
outcome: 'success' | 'failure';
|
|
25
|
+
outcome: 'success' | 'failure' | 'pending';
|
|
19
26
|
summary?: string;
|
|
20
27
|
output?: T;
|
|
21
28
|
format?: string;
|
|
22
29
|
link?: string;
|
|
30
|
+
done?: boolean;
|
|
31
|
+
task_id?: string;
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
export type ActionDefinitionsResponse = { [type: string]: ActionDefinition };
|
package/types/config.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ClassificationDefinition } from "../utils/classificationParser";
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
export interface ApiType {
|
|
2
5
|
configuration: {
|
|
3
6
|
auth: {
|
|
@@ -12,5 +15,5 @@ export interface ApiType {
|
|
|
12
15
|
apps: any[];
|
|
13
16
|
};
|
|
14
17
|
};
|
|
15
|
-
c12nDef:
|
|
18
|
+
c12nDef: ClassificationDefinition;
|
|
16
19
|
}
|
|
@@ -3,18 +3,33 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { i as isNil } from "./isNil-CIubwp4T.js";
|
|
5
5
|
import { MY_LOCAL_STORAGE_PREFIX, StorageKey } from "./utils/constants.js";
|
|
6
|
-
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-
|
|
6
|
+
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.js";
|
|
7
7
|
import { getAxiosCache, setAxiosCache } from "./utils/sessionStorage.js";
|
|
8
8
|
import { clueDebugLogger } from "./utils/loggerUtil.js";
|
|
9
9
|
import { i as isEmpty } from "./isEmpty-BQkZubqU.js";
|
|
10
10
|
import { useState, useEffect } from "react";
|
|
11
|
+
const get$8 = (actionId, taskId, options = { timeout: null }, config) => {
|
|
12
|
+
const searchParams = [];
|
|
13
|
+
if (!isNil(options.timeout)) {
|
|
14
|
+
searchParams.push(`max_timeout=${options.timeout}`);
|
|
15
|
+
}
|
|
16
|
+
return hget(
|
|
17
|
+
joinUri(uri$c(), `${actionId.replace(".", "/")}/status/${taskId}`),
|
|
18
|
+
searchParams.length > 0 ? new URLSearchParams(searchParams.join("&")) : null,
|
|
19
|
+
config
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
const status = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
23
|
+
__proto__: null,
|
|
24
|
+
get: get$8
|
|
25
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
11
26
|
const uri$c = () => {
|
|
12
27
|
return joinUri(uri(), "actions");
|
|
13
28
|
};
|
|
14
29
|
const get$7 = (config) => {
|
|
15
30
|
return hget(uri$c(), null, config);
|
|
16
31
|
};
|
|
17
|
-
const post$3 = (actionId, selectors, params, options = { timeout: null }, config) => {
|
|
32
|
+
const post$3 = (actionId, selectors, params, context, options = { timeout: null }, config) => {
|
|
18
33
|
const searchParams = [];
|
|
19
34
|
if (!isNil(options.timeout)) {
|
|
20
35
|
searchParams.push(`max_timeout=${options.timeout}`);
|
|
@@ -29,6 +44,7 @@ const post$3 = (actionId, selectors, params, options = { timeout: null }, config
|
|
|
29
44
|
} else {
|
|
30
45
|
payload.selectors = selectors;
|
|
31
46
|
}
|
|
47
|
+
payload.context = context ?? null;
|
|
32
48
|
return hpost(
|
|
33
49
|
joinUri(
|
|
34
50
|
joinUri(uri$c(), "execute"),
|
|
@@ -43,6 +59,7 @@ const actions = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
43
59
|
__proto__: null,
|
|
44
60
|
get: get$7,
|
|
45
61
|
post: post$3,
|
|
62
|
+
status,
|
|
46
63
|
uri: uri$c
|
|
47
64
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
48
65
|
const uri$b = (searchParams) => {
|
|
@@ -65,34 +82,34 @@ const login = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
65
82
|
post: post$2,
|
|
66
83
|
uri: uri$b
|
|
67
84
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
68
|
-
|
|
85
|
+
const uri$a = () => {
|
|
69
86
|
return joinUri(uri(), "auth");
|
|
70
|
-
}
|
|
87
|
+
};
|
|
71
88
|
const auth = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72
89
|
__proto__: null,
|
|
73
90
|
login,
|
|
74
91
|
uri: uri$a
|
|
75
92
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
76
|
-
|
|
93
|
+
const uri$9 = () => {
|
|
77
94
|
return joinUri(uri(), "configs");
|
|
78
|
-
}
|
|
79
|
-
|
|
95
|
+
};
|
|
96
|
+
const get$5 = (config) => {
|
|
80
97
|
return hget(uri$9(), null, config);
|
|
81
|
-
}
|
|
98
|
+
};
|
|
82
99
|
const configs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
83
100
|
__proto__: null,
|
|
84
101
|
get: get$5,
|
|
85
102
|
uri: uri$9
|
|
86
103
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
87
|
-
|
|
104
|
+
const uri$8 = () => {
|
|
88
105
|
return joinUri(uri(), "fetchers");
|
|
89
|
-
}
|
|
90
|
-
|
|
106
|
+
};
|
|
107
|
+
const get$4 = (config) => {
|
|
91
108
|
return hget(uri$8(), null, config);
|
|
92
|
-
}
|
|
93
|
-
|
|
109
|
+
};
|
|
110
|
+
const post$1 = (fetcherId, selector, config) => {
|
|
94
111
|
return hpost(joinAllUri(uri$8(), fetcherId.replace(".", "/")), selector, config);
|
|
95
|
-
}
|
|
112
|
+
};
|
|
96
113
|
const fetchers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97
114
|
__proto__: null,
|
|
98
115
|
get: get$4,
|
|
@@ -130,31 +147,31 @@ const enrich = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
130
147
|
post,
|
|
131
148
|
uri: uri$7
|
|
132
149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
133
|
-
|
|
150
|
+
const uri$6 = () => {
|
|
134
151
|
return joinUri(uri$4(), "types");
|
|
135
|
-
}
|
|
136
|
-
|
|
152
|
+
};
|
|
153
|
+
const get$3 = (config) => {
|
|
137
154
|
return hget(uri$6(), null, config);
|
|
138
|
-
}
|
|
155
|
+
};
|
|
139
156
|
const types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
140
157
|
__proto__: null,
|
|
141
158
|
get: get$3,
|
|
142
159
|
uri: uri$6
|
|
143
160
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
144
|
-
|
|
161
|
+
const uri$5 = () => {
|
|
145
162
|
return joinUri(uri$4(), "types_detection");
|
|
146
|
-
}
|
|
147
|
-
|
|
163
|
+
};
|
|
164
|
+
const get$2 = (config) => {
|
|
148
165
|
return hget(uri$5(), null, config);
|
|
149
|
-
}
|
|
166
|
+
};
|
|
150
167
|
const types_detection = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151
168
|
__proto__: null,
|
|
152
169
|
get: get$2,
|
|
153
170
|
uri: uri$5
|
|
154
171
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
155
|
-
|
|
172
|
+
const uri$4 = () => {
|
|
156
173
|
return joinUri(uri(), "lookup");
|
|
157
|
-
}
|
|
174
|
+
};
|
|
158
175
|
const lookup = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
159
176
|
__proto__: null,
|
|
160
177
|
enrich,
|
|
@@ -162,31 +179,31 @@ const lookup = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
162
179
|
types_detection,
|
|
163
180
|
uri: uri$4
|
|
164
181
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
165
|
-
|
|
182
|
+
const uri$3 = (filter2) => {
|
|
166
183
|
return joinUri(uri$1(), filter2 ? "/docs?filter=" + filter2 : "/docs");
|
|
167
|
-
}
|
|
168
|
-
|
|
184
|
+
};
|
|
185
|
+
const get$1 = (filter2, config) => {
|
|
169
186
|
return hget(uri$3(filter2), null, config);
|
|
170
|
-
}
|
|
187
|
+
};
|
|
171
188
|
const all_documentation = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
172
189
|
__proto__: null,
|
|
173
190
|
get: get$1,
|
|
174
191
|
uri: uri$3
|
|
175
192
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
176
|
-
|
|
193
|
+
const uri$2 = (file) => {
|
|
177
194
|
return joinAllUri(uri$1(), "docs", file);
|
|
178
|
-
}
|
|
179
|
-
|
|
195
|
+
};
|
|
196
|
+
const get = (file, config) => {
|
|
180
197
|
return hget(uri$2(file), null, config);
|
|
181
|
-
}
|
|
198
|
+
};
|
|
182
199
|
const documentation = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
200
|
__proto__: null,
|
|
184
201
|
get,
|
|
185
202
|
uri: uri$2
|
|
186
203
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
187
|
-
|
|
204
|
+
const uri$1 = () => {
|
|
188
205
|
return joinUri(uri(), "static");
|
|
189
|
-
}
|
|
206
|
+
};
|
|
190
207
|
const _static = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
191
208
|
__proto__: null,
|
|
192
209
|
all_documentation,
|
|
@@ -1084,8 +1101,8 @@ const defaults = {
|
|
|
1084
1101
|
FormData: platform.classes.FormData,
|
|
1085
1102
|
Blob: platform.classes.Blob
|
|
1086
1103
|
},
|
|
1087
|
-
validateStatus: function validateStatus(
|
|
1088
|
-
return
|
|
1104
|
+
validateStatus: function validateStatus(status2) {
|
|
1105
|
+
return status2 >= 200 && status2 < 300;
|
|
1089
1106
|
},
|
|
1090
1107
|
headers: {
|
|
1091
1108
|
common: {
|
|
@@ -2921,7 +2938,7 @@ class AxiosClient {
|
|
|
2921
2938
|
constructor() {
|
|
2922
2939
|
__publicField(this, "client");
|
|
2923
2940
|
this.client = axios.create({
|
|
2924
|
-
validateStatus: (
|
|
2941
|
+
validateStatus: (status2) => status2 >= 200 && status2 < 300 || status2 === 304
|
|
2925
2942
|
});
|
|
2926
2943
|
new AxiosCache(this.client);
|
|
2927
2944
|
axiosRetry(this.client, {
|
package/utils/graph.js
CHANGED
|
@@ -16,7 +16,7 @@ const findNode = (nodeId, flatNodes) => {
|
|
|
16
16
|
return flatNodes.find((node) => node.id === nodeId);
|
|
17
17
|
};
|
|
18
18
|
const getPathToRoot = (nodeId, data) => {
|
|
19
|
-
|
|
19
|
+
const getRoot = (currNodeId, results) => {
|
|
20
20
|
if (results.has(currNodeId)) {
|
|
21
21
|
return results;
|
|
22
22
|
}
|
|
@@ -28,11 +28,11 @@ const getPathToRoot = (nodeId, data) => {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
return newResults;
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
32
|
return getRoot(nodeId, /* @__PURE__ */ new Set());
|
|
33
33
|
};
|
|
34
34
|
const getAllChildren = (nodeId, data) => {
|
|
35
|
-
|
|
35
|
+
const getChildren = (currNodeId, results) => {
|
|
36
36
|
if (results.has(currNodeId)) {
|
|
37
37
|
return results;
|
|
38
38
|
}
|
|
@@ -48,7 +48,7 @@ const getAllChildren = (nodeId, data) => {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
return newResults;
|
|
51
|
-
}
|
|
51
|
+
};
|
|
52
52
|
return getChildren(nodeId, /* @__PURE__ */ new Set());
|
|
53
53
|
};
|
|
54
54
|
const getSubGraphNodeSet = (nodeId, data) => {
|
package/utils/loggerUtil.d.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @param message The debug message.
|
|
4
4
|
* @param loggingEnabled the flag to determine if debugging is enabled.
|
|
5
5
|
*/
|
|
6
|
-
export declare
|
|
6
|
+
export declare const clueDebugLogger: (message: string, loggingEnabled: boolean) => void;
|