@cccsaurora/clue-ui 1.2.0-dev.194 → 1.2.0-dev.236
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-Hg3A_2XX.js → ActionForm-U5a2mLUv.js} +2 -1
- package/{AnnotationDetails-CbXSCkTF.js → AnnotationDetails-BEHFNNv3.js} +1 -1
- package/{AnnotationPreview-D5NX8_su.js → AnnotationPreview-MO5UsP5l.js} +1 -1
- package/{ClueEnrichContext-DzZhWGxh.js → ClueEnrichContext-DoOHQeVr.js} +1 -1
- package/components/AnnotationDetailPopover.js +1 -1
- package/components/AnnotationDetails.js +2 -2
- package/components/AnnotationEntry.js +2 -1
- package/components/AnnotationPreview.js +1 -1
- package/components/EnrichedCard.js +1 -1
- package/components/EnrichedChip.js +1 -1
- package/components/EnrichedTypography.js +1 -1
- package/components/actions/ActionForm.js +1 -1
- package/components/actions/ResultModal.js +1 -1
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/fetchers/Fetcher.js +41 -4
- package/components/group/GroupControl.js +1 -1
- package/hooks/ClueActionContext.js +2 -2
- package/hooks/ClueEnrichContext.js +2 -2
- package/hooks/ClueFetcherContext.d.ts +1 -0
- package/hooks/ClueFetcherContext.js +43 -24
- package/hooks/CluePopupContext.js +2 -2
- package/hooks/ClueProvider.js +3 -3
- package/hooks/selectors.js +2 -2
- package/hooks/useActionResult.js +1 -1
- package/hooks/useAnnotations.js +1 -1
- package/hooks/useClue.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/hooks/useClueTypeConfig.js +1 -1
- package/hooks/useFetcherResult.d.ts +14 -0
- package/hooks/useFetcherResult.js +40 -0
- 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 -1
- package/types/fetcher.d.ts +19 -7
- package/{useClueTypeConfig-CHWm5uda.js → useClueTypeConfig-D2tf4-NM.js} +264 -183
package/types/fetcher.d.ts
CHANGED
|
@@ -10,10 +10,12 @@ export interface FetcherDefinition {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
interface BaseFetcherResult {
|
|
13
|
-
outcome: 'success' | 'failure';
|
|
14
|
-
error
|
|
15
|
-
link
|
|
16
|
-
format
|
|
13
|
+
outcome: 'success' | 'failure' | 'pending';
|
|
14
|
+
error?: string;
|
|
15
|
+
link?: string;
|
|
16
|
+
format?: string;
|
|
17
|
+
done?: boolean;
|
|
18
|
+
task_id?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export interface FetcherImageResult extends BaseFetcherResult {
|
|
@@ -40,14 +42,23 @@ export interface FetcherGraphResult extends BaseFetcherResult {
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
export interface FetcherStatusResult extends BaseFetcherResult {
|
|
43
|
-
data
|
|
45
|
+
data?: {
|
|
44
46
|
empty: boolean;
|
|
45
47
|
labels: { language: string; label: string }[];
|
|
46
48
|
link?: string;
|
|
47
49
|
icon?: string;
|
|
48
50
|
color?: string;
|
|
49
51
|
};
|
|
50
|
-
format
|
|
52
|
+
format?: 'status';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface GetFetcherStatusResult extends BaseFetcherResult {
|
|
56
|
+
task_id: string;
|
|
57
|
+
outcome: 'pending';
|
|
58
|
+
data?: {
|
|
59
|
+
summary?: string;
|
|
60
|
+
progress?: number;
|
|
61
|
+
};
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
export type FetcherResult =
|
|
@@ -55,6 +66,7 @@ export type FetcherResult =
|
|
|
55
66
|
| FetcherJsonResult
|
|
56
67
|
| FetcherGraphResult
|
|
57
68
|
| FetcherMarkdownResult
|
|
58
|
-
| FetcherStatusResult
|
|
69
|
+
| FetcherStatusResult
|
|
70
|
+
| GetFetcherStatusResult;
|
|
59
71
|
|
|
60
72
|
export type FetcherDefinitionsResponse = { [type: string]: FetcherDefinition };
|