@cccsaurora/clue-ui 1.3.0-dev.344 → 1.3.0-dev.347
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/components/ClassificationChip.d.ts +1 -1
- package/components/EnrichedCard.d.ts +1 -1
- package/components/EnrichedChip.d.ts +1 -1
- package/components/EnrichedTypography.d.ts +1 -1
- package/components/ErrorBoundary.d.ts +1 -1
- package/components/actions/formats/index.d.ts +1 -0
- package/components/actions/formats/index.js +8 -2
- package/components/fetchers/Fetcher.js +1 -1
- package/components/fetchers/PreviewModal.js +2 -1
- package/hooks/ClueProvider.js +1 -1
- package/{index-DXpcBpjs.js → index-D4mEq9G4.js} +4 -12
- package/main.d.ts +3 -1
- package/main.js +0 -2
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ interface EnrichedChipProps {
|
|
|
6
6
|
}
|
|
7
7
|
declare const _default: React.NamedExoticComponent<EnrichedChipProps & ChipOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
8
|
ref?: React.Ref<HTMLDivElement>;
|
|
9
|
-
}, "
|
|
9
|
+
}, "children" | "label" | "style" | "className" | "tabIndex" | "color" | "classes" | "sx" | "variant" | "size" | "icon" | "disabled" | "onDelete" | "avatar" | "clickable" | "deleteIcon" | "skipFocusWhenDisabled"> & {
|
|
10
10
|
component?: React.ElementType;
|
|
11
11
|
}>;
|
|
12
12
|
export default _default;
|
|
@@ -8,7 +8,7 @@ export interface EnrichedCardProps {
|
|
|
8
8
|
}
|
|
9
9
|
declare const _default: import('react').NamedExoticComponent<EnrichedCardProps & import('@mui/material').CardOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
10
|
ref?: import('react').Ref<HTMLDivElement>;
|
|
11
|
-
}, "
|
|
11
|
+
}, "children" | "style" | "className" | "classes" | "elevation" | "square" | "sx" | "variant" | "raised"> & {
|
|
12
12
|
component?: React.ElementType;
|
|
13
13
|
}>;
|
|
14
14
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
|
|
4
4
|
declare const _default: React.NamedExoticComponent<EnrichmentProps & import('@mui/material').ChipOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
-
}, "
|
|
6
|
+
}, "children" | "label" | "style" | "className" | "tabIndex" | "color" | "classes" | "sx" | "variant" | "size" | "icon" | "disabled" | "onDelete" | "avatar" | "clickable" | "deleteIcon" | "skipFocusWhenDisabled"> & {
|
|
7
7
|
component?: React.ElementType;
|
|
8
8
|
}>;
|
|
9
9
|
export default _default;
|
|
@@ -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
|
-
}, "
|
|
13
|
+
}, "children" | "p" | "style" | "className" | "color" | "height" | "width" | "align" | "classes" | "sx" | "variant" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "noWrap" | "gutterBottom" | "paragraph" | "variantMapping"> & {
|
|
14
14
|
component?: React.ElementType;
|
|
15
15
|
}>;
|
|
16
16
|
export default _default;
|
|
@@ -10,6 +10,6 @@ declare class ErrorBoundary extends React.Component<PropsWithChildren<{}>, {
|
|
|
10
10
|
error: any;
|
|
11
11
|
};
|
|
12
12
|
componentDidCatch(error: Error): void;
|
|
13
|
-
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element
|
|
13
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
}
|
|
15
15
|
export default ErrorBoundary;
|
|
@@ -4,12 +4,18 @@ import { J as JSONViewer } from "../../../index-BF4c1XBg.js";
|
|
|
4
4
|
import Markdown from "../../display/markdown/index.js";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { u as usePluginStore, c as clueUIPluginStore } from "../../../store-Dslbt6yE.js";
|
|
7
|
-
const Result = ({
|
|
7
|
+
const Result = ({
|
|
8
|
+
result,
|
|
9
|
+
...additionalProps
|
|
10
|
+
}) => {
|
|
8
11
|
const pluginStore = usePluginStore();
|
|
9
12
|
const { t } = useTranslation();
|
|
10
13
|
const plugin = clueUIPluginStore.getPlugin(result.format, "action", result.actionId);
|
|
11
14
|
if (plugin) {
|
|
12
|
-
const component = pluginStore.executeFunction(`${plugin}.actionResult`, {
|
|
15
|
+
const component = pluginStore.executeFunction(`${plugin}.actionResult`, {
|
|
16
|
+
result,
|
|
17
|
+
...additionalProps
|
|
18
|
+
});
|
|
13
19
|
if (component) {
|
|
14
20
|
return component;
|
|
15
21
|
}
|
|
@@ -72,7 +72,7 @@ const Fetcher = React__default.memo(
|
|
|
72
72
|
}, [classification, fetchSelector, fetcherId, t, type, value]);
|
|
73
73
|
const resultAdditionalProps = useMemo(() => {
|
|
74
74
|
if ((result == null ? void 0 : result.outcome) === "success" && result.format === "image") {
|
|
75
|
-
return { setShowPreview, ...imageProps };
|
|
75
|
+
return { onClick: () => setShowPreview(true), ...imageProps };
|
|
76
76
|
}
|
|
77
77
|
return { result };
|
|
78
78
|
}, [imageProps, result]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Modal, Paper } from "@mui/material";
|
|
3
3
|
import { memo } from "react";
|
|
4
|
+
import { FetcherResultView } from "./FetcherResultView.js";
|
|
4
5
|
const PreviewModal = ({ result, onClose, open = false, ...otherProps }) => {
|
|
5
6
|
return /* @__PURE__ */ jsx(
|
|
6
7
|
Modal,
|
|
@@ -12,7 +13,7 @@ const PreviewModal = ({ result, onClose, open = false, ...otherProps }) => {
|
|
|
12
13
|
],
|
|
13
14
|
onClose,
|
|
14
15
|
...otherProps,
|
|
15
|
-
children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "90%", maxWidth: "90%", p: 2, overflow: "auto" }, children:
|
|
16
|
+
children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "90%", maxWidth: "90%", p: 2, overflow: "auto" }, children: /* @__PURE__ */ jsx(FetcherResultView, { result }) })
|
|
16
17
|
}
|
|
17
18
|
);
|
|
18
19
|
};
|
package/hooks/ClueProvider.js
CHANGED
|
@@ -16,7 +16,7 @@ class ClueUIPluginsRegistry {
|
|
|
16
16
|
__publicField(this, "_plugins", [
|
|
17
17
|
// { name: 'TestPlugin', id: 'none', loadPlugin: () => import('./test') },
|
|
18
18
|
{ name: "MarkdownPlugin", id: "markdown", loadPlugin: () => import("../index-BdAUKhOk.js") },
|
|
19
|
-
{ name: "ImagePlugin", id: "image", loadPlugin: () => import("../index-
|
|
19
|
+
{ name: "ImagePlugin", id: "image", loadPlugin: () => import("../index-D4mEq9G4.js") },
|
|
20
20
|
{ name: "JSONPlugin", id: "json", loadPlugin: () => import("../index-BJm74d7l.js") },
|
|
21
21
|
{ name: "GraphPlugin", id: "graph", loadPlugin: () => import("../index-DP0SQqVY.js") },
|
|
22
22
|
{ name: "FilePlugin", id: "file", loadPlugin: () => import("../index-Kt3RwkVk.js") }
|
|
@@ -13,20 +13,12 @@ class ImagePlugin extends ClueUIPlugin {
|
|
|
13
13
|
__publicField(this, "description", "Renders images.");
|
|
14
14
|
}
|
|
15
15
|
actionResult(props) {
|
|
16
|
-
const { result,
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
-
"img",
|
|
19
|
-
{
|
|
20
|
-
src: result.output.image,
|
|
21
|
-
alt: result.output.alt,
|
|
22
|
-
...additionalProps,
|
|
23
|
-
onClick: () => setShowPreview == null ? void 0 : setShowPreview(true)
|
|
24
|
-
}
|
|
25
|
-
);
|
|
16
|
+
const { result, ...additionalProps } = props;
|
|
17
|
+
return /* @__PURE__ */ jsx("img", { src: result.output.image, alt: result.output.alt, ...additionalProps });
|
|
26
18
|
}
|
|
27
19
|
fetcherResult(props) {
|
|
28
|
-
const { result,
|
|
29
|
-
return /* @__PURE__ */ jsx("img", { src: result.data.image, alt: result.data.alt, ...additionalProps
|
|
20
|
+
const { result, ...additionalProps } = props;
|
|
21
|
+
return /* @__PURE__ */ jsx("img", { src: result.data.image, alt: result.data.alt, ...additionalProps });
|
|
30
22
|
}
|
|
31
23
|
}
|
|
32
24
|
export {
|
package/main.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { FetcherDefinition, FetcherDefinitionsResponse, FetcherResult } from "./
|
|
|
5
5
|
import { Annotation, BulkEnrichRequest, BulkEnrichResponses, Enrichment, EnrichResponse, EnrichResponses, FailedRequest, Selector, TypesDetectionResponse, TypesResponse, WithExtra } from "./types/lookup";
|
|
6
6
|
import { ClueResponse } from "./types/network";
|
|
7
7
|
import { default as RunningActionData } from "./types/RunningActionData";
|
|
8
|
+
import { default as ClueUIPlugin } from '../plugins/ClueUIPlugin';
|
|
9
|
+
import { ClueUIPluginDefinition } from '../plugins/registry';
|
|
8
10
|
import { default as ActionForm } from './components/actions/ActionForm';
|
|
9
11
|
import { default as AnnotationDetailPopover } from './components/AnnotationDetailPopover';
|
|
10
12
|
import { default as AnnotationDetails } from './components/AnnotationDetails';
|
|
@@ -38,5 +40,5 @@ import { default as OpinionIcon } from './icons/Opinion';
|
|
|
38
40
|
import { default as FrequencyText } from './text/Frequency';
|
|
39
41
|
|
|
40
42
|
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 };
|
|
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 };
|
|
43
|
+
export type { ActionDefinition, ActionDefinitionsResponse, ActionResult, Annotation, BulkEnrichRequest, BulkEnrichResponses, ClueConfigContextProps, ClueDatabase, ClueDatabaseCollections, ClueDatabaseContextProps, ClueResponse, ClueUIPlugin, ClueUIPluginDefinition, 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 };
|
|
42
44
|
export type { ClueConfigContextProps as BorealisConfigContextProps, ClueDatabase as BorealisDatabase, ClueDatabaseCollections as BorealisDatabaseCollections, ClueDatabaseContextProps as BorealisDatabaseContextProps, ClueResponse as BorealisResponse };
|
package/main.js
CHANGED
|
@@ -25,7 +25,6 @@ import { default as default15 } from "./hooks/useClueConfig.js";
|
|
|
25
25
|
import { default as default16 } from "./icons/Assessment.js";
|
|
26
26
|
import { default as default17 } from "./icons/Context.js";
|
|
27
27
|
import { default as default18 } from "./icons/Opinion.js";
|
|
28
|
-
import { default as default19 } from "./text/Frequency.js";
|
|
29
28
|
export {
|
|
30
29
|
A as ActionForm,
|
|
31
30
|
default2 as AnnotationDetailPopover,
|
|
@@ -46,7 +45,6 @@ export {
|
|
|
46
45
|
default7 as EnrichedTypography,
|
|
47
46
|
default10 as Entry,
|
|
48
47
|
default8 as Fetcher,
|
|
49
|
-
default19 as FrequencyText,
|
|
50
48
|
default11 as Group,
|
|
51
49
|
default12 as GroupControl,
|
|
52
50
|
default18 as OpinionIcon,
|