@orchestrator-ui/orchestrator-ui-components 6.4.0 → 6.5.0
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-lint.log +2 -2
- package/.turbo/turbo-test.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +17 -93
- package/dist/index.js +603 -332
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoAgent/ExportButton/ExportButton.tsx +96 -0
- package/src/components/WfoAgent/ExportButton/index.ts +1 -0
- package/src/components/WfoAgent/ExportButton/styles.ts +69 -0
- package/src/components/WfoAgent/ToolProgress/DiscoverFilterPathsDisplay.tsx +114 -0
- package/src/components/WfoAgent/ToolProgress/RunSearchDisplay.tsx +34 -0
- package/src/components/WfoAgent/{FilterDisplay/FilterDisplay.tsx → ToolProgress/SetFilterTreeDisplay.tsx} +25 -72
- package/src/components/WfoAgent/ToolProgress/StartNewSearchDisplay.tsx +62 -0
- package/src/components/WfoAgent/ToolProgress/ToolProgress.tsx +138 -0
- package/src/components/WfoAgent/ToolProgress/index.ts +1 -0
- package/src/components/WfoAgent/ToolProgress/styles.ts +50 -0
- package/src/components/WfoAgent/WfoAgent/WfoAgent.tsx +78 -51
- package/src/components/WfoAgent/index.ts +0 -1
- package/src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx +6 -10
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx +4 -4
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx +18 -34
- package/src/components/WfoSearchPage/WfoSearchResults/index.ts +0 -1
- package/src/components/WfoSearchPage/utils.ts +12 -112
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useSearchPagination.ts +2 -2
- package/src/messages/en-GB.json +1 -3
- package/src/rtk/endpoints/agentExport.ts +23 -0
- package/src/types/search.ts +8 -70
- package/src/components/WfoAgent/FilterDisplay/index.ts +0 -1
- package/src/components/WfoSearchPage/WfoSearchResults/WfoSubscriptionDetailModal.tsx +0 -55
- /package/src/components/WfoAgent/{FilterDisplay/styles.ts → ToolProgress/SetFilterTreeDisplay.styles.ts} +0 -0
package/src/types/search.ts
CHANGED
|
@@ -1,85 +1,23 @@
|
|
|
1
1
|
export type EntityKind = 'SUBSCRIPTION' | 'PRODUCT' | 'WORKFLOW' | 'PROCESS';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface MatchingField {
|
|
4
4
|
text: string;
|
|
5
5
|
path: string;
|
|
6
6
|
highlight_indices: [number, number][];
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface SearchResult {
|
|
10
|
+
entity_id: string;
|
|
11
|
+
entity_type: EntityKind;
|
|
12
|
+
entity_title: string;
|
|
10
13
|
score: number;
|
|
11
14
|
perfect_match: number;
|
|
12
|
-
matching_field?:
|
|
13
|
-
subscription: {
|
|
14
|
-
subscription_id: string;
|
|
15
|
-
description: string;
|
|
16
|
-
product: {
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
15
|
+
matching_field?: MatchingField | null;
|
|
21
16
|
}
|
|
22
17
|
|
|
23
|
-
export interface ProcessSearchResult {
|
|
24
|
-
score: number;
|
|
25
|
-
perfect_match: number;
|
|
26
|
-
matching_field?: SubscriptionMatchingField | null;
|
|
27
|
-
process: {
|
|
28
|
-
processId: string;
|
|
29
|
-
workflowName: string;
|
|
30
|
-
workflowId: string;
|
|
31
|
-
status: string;
|
|
32
|
-
isTask: boolean;
|
|
33
|
-
createdBy?: string | null;
|
|
34
|
-
startedAt: string;
|
|
35
|
-
lastModifiedAt: string;
|
|
36
|
-
lastStep?: string | null;
|
|
37
|
-
failedReason?: string | null;
|
|
38
|
-
subscriptionIds?: string[] | null;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ProductSearchResult {
|
|
43
|
-
score: number;
|
|
44
|
-
perfect_match: number;
|
|
45
|
-
matching_field?: SubscriptionMatchingField | null;
|
|
46
|
-
product: {
|
|
47
|
-
product_id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
product_type: string;
|
|
50
|
-
tag?: string | null;
|
|
51
|
-
description?: string | null;
|
|
52
|
-
status?: string | null;
|
|
53
|
-
created_at?: string | null;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface WorkflowSearchResult {
|
|
58
|
-
score: number;
|
|
59
|
-
perfect_match: number;
|
|
60
|
-
matching_field?: SubscriptionMatchingField | null;
|
|
61
|
-
workflow: {
|
|
62
|
-
name: string;
|
|
63
|
-
products: {
|
|
64
|
-
product_type: string;
|
|
65
|
-
product_id: string;
|
|
66
|
-
name: string;
|
|
67
|
-
}[];
|
|
68
|
-
description?: string | null;
|
|
69
|
-
created_at?: string | null;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** Union of all search results */
|
|
74
|
-
export type AnySearchResult =
|
|
75
|
-
| SubscriptionSearchResult
|
|
76
|
-
| ProcessSearchResult
|
|
77
|
-
| ProductSearchResult
|
|
78
|
-
| WorkflowSearchResult;
|
|
79
|
-
|
|
80
18
|
/** Paginated search results */
|
|
81
19
|
export type PaginatedSearchResults = {
|
|
82
|
-
data:
|
|
20
|
+
data: SearchResult[];
|
|
83
21
|
page_info: {
|
|
84
22
|
has_next_page: boolean;
|
|
85
23
|
next_page_cursor: number | null;
|
|
@@ -138,7 +76,7 @@ type ActionType = 'select';
|
|
|
138
76
|
type BaseSearchParameters = {
|
|
139
77
|
query?: string | null;
|
|
140
78
|
|
|
141
|
-
filters?: PathFilter[] | null;
|
|
79
|
+
filters?: PathFilter[] | Group | null;
|
|
142
80
|
|
|
143
81
|
action: ActionType;
|
|
144
82
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FilterDisplay';
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
import { useTranslations } from 'next-intl';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
EuiButton,
|
|
7
|
-
EuiModal,
|
|
8
|
-
EuiModalBody,
|
|
9
|
-
EuiModalFooter,
|
|
10
|
-
EuiModalHeader,
|
|
11
|
-
EuiModalHeaderTitle,
|
|
12
|
-
} from '@elastic/eui';
|
|
13
|
-
|
|
14
|
-
import { WfoSubscription } from '@/components';
|
|
15
|
-
import { TreeProvider } from '@/contexts';
|
|
16
|
-
|
|
17
|
-
interface WfoSubscriptionDetailModalProps {
|
|
18
|
-
isVisible: boolean;
|
|
19
|
-
onClose: () => void;
|
|
20
|
-
subscriptionData: unknown | null;
|
|
21
|
-
matchingField?: unknown;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const WfoSubscriptionDetailModal: FC<
|
|
25
|
-
WfoSubscriptionDetailModalProps
|
|
26
|
-
> = ({ isVisible, onClose, subscriptionData }) => {
|
|
27
|
-
const t = useTranslations('search.page');
|
|
28
|
-
if (!isVisible || !subscriptionData) return null;
|
|
29
|
-
|
|
30
|
-
const subscriptionId =
|
|
31
|
-
subscriptionData &&
|
|
32
|
-
(subscriptionData as { subscription_id: string }).subscription_id;
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<EuiModal onClose={onClose} maxWidth={800}>
|
|
36
|
-
<EuiModalHeader>
|
|
37
|
-
<EuiModalHeaderTitle>
|
|
38
|
-
{t('subscriptionDetails')}
|
|
39
|
-
</EuiModalHeaderTitle>
|
|
40
|
-
</EuiModalHeader>
|
|
41
|
-
|
|
42
|
-
<EuiModalBody>
|
|
43
|
-
<TreeProvider>
|
|
44
|
-
<WfoSubscription subscriptionId={subscriptionId} />
|
|
45
|
-
</TreeProvider>
|
|
46
|
-
</EuiModalBody>
|
|
47
|
-
|
|
48
|
-
<EuiModalFooter>
|
|
49
|
-
<EuiButton onClick={onClose} fill>
|
|
50
|
-
{t('closeButton')}
|
|
51
|
-
</EuiButton>
|
|
52
|
-
</EuiModalFooter>
|
|
53
|
-
</EuiModal>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
File without changes
|