@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.
Files changed (38) hide show
  1. package/{ActionForm-Hg3A_2XX.js → ActionForm-U5a2mLUv.js} +2 -1
  2. package/{AnnotationDetails-CbXSCkTF.js → AnnotationDetails-BEHFNNv3.js} +1 -1
  3. package/{AnnotationPreview-D5NX8_su.js → AnnotationPreview-MO5UsP5l.js} +1 -1
  4. package/{ClueEnrichContext-DzZhWGxh.js → ClueEnrichContext-DoOHQeVr.js} +1 -1
  5. package/components/AnnotationDetailPopover.js +1 -1
  6. package/components/AnnotationDetails.js +2 -2
  7. package/components/AnnotationEntry.js +2 -1
  8. package/components/AnnotationPreview.js +1 -1
  9. package/components/EnrichedCard.js +1 -1
  10. package/components/EnrichedChip.js +1 -1
  11. package/components/EnrichedTypography.js +1 -1
  12. package/components/actions/ActionForm.js +1 -1
  13. package/components/actions/ResultModal.js +1 -1
  14. package/components/enrichment/EnrichPopover.js +1 -1
  15. package/components/fetchers/Fetcher.js +41 -4
  16. package/components/group/GroupControl.js +1 -1
  17. package/hooks/ClueActionContext.js +2 -2
  18. package/hooks/ClueEnrichContext.js +2 -2
  19. package/hooks/ClueFetcherContext.d.ts +1 -0
  20. package/hooks/ClueFetcherContext.js +43 -24
  21. package/hooks/CluePopupContext.js +2 -2
  22. package/hooks/ClueProvider.js +3 -3
  23. package/hooks/selectors.js +2 -2
  24. package/hooks/useActionResult.js +1 -1
  25. package/hooks/useAnnotations.js +1 -1
  26. package/hooks/useClue.js +1 -1
  27. package/hooks/useClueActions.js +1 -1
  28. package/hooks/useClueTypeConfig.js +1 -1
  29. package/hooks/useFetcherResult.d.ts +14 -0
  30. package/hooks/useFetcherResult.js +40 -0
  31. package/icons/Action.js +2 -2
  32. package/icons/Assessment.js +1 -1
  33. package/icons/Context.js +1 -1
  34. package/icons/Opinion.js +1 -1
  35. package/main.js +4 -4
  36. package/package.json +1 -1
  37. package/types/fetcher.d.ts +19 -7
  38. package/{useClueTypeConfig-CHWm5uda.js → useClueTypeConfig-D2tf4-NM.js} +264 -183
@@ -10,10 +10,12 @@ export interface FetcherDefinition {
10
10
  }
11
11
 
12
12
  interface BaseFetcherResult {
13
- outcome: 'success' | 'failure';
14
- error: string;
15
- link: string;
16
- format: string;
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: 'status';
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 };