@orchestrator-ui/orchestrator-ui-components 4.2.0 → 5.1.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 +1 -1
- package/.turbo/turbo-test.log +6 -6
- package/CHANGELOG.md +26 -0
- package/dist/index.d.ts +2115 -336
- package/dist/index.js +2147 -1670
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx +6 -5
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +1 -0
- package/src/components/WfoButtonComboBox/WfoButtonComboBox.tsx +79 -0
- package/src/components/WfoButtonComboBox/index.ts +1 -0
- package/src/components/WfoButtonComboBox/styles.ts +28 -0
- package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +1 -1
- package/src/components/WfoForms/formFields/commonStyles.ts +2 -0
- package/src/components/WfoForms/formFields/index.ts +1 -0
- package/src/components/WfoPydanticForm/Footer.tsx +75 -34
- package/src/components/WfoPydanticForm/Row.tsx +2 -2
- package/src/components/WfoPydanticForm/WfoPydanticForm.tsx +99 -8
- package/src/components/WfoPydanticForm/fields/Checkbox.tsx +22 -0
- package/src/components/WfoPydanticForm/fields/Divider.tsx +17 -0
- package/src/components/WfoPydanticForm/fields/Label.tsx +23 -0
- package/src/components/WfoPydanticForm/fields/Summary.tsx +125 -0
- package/src/components/WfoPydanticForm/fields/Text.tsx +28 -0
- package/src/components/WfoPydanticForm/fields/index.ts +5 -0
- package/src/components/WfoSubscription/WfoInSyncField.tsx +2 -2
- package/src/components/WfoSubscription/WfoSubscription.tsx +3 -2
- package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActions.tsx +3 -3
- package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +64 -14
- package/src/components/WfoSubscription/utils/utils.spec.ts +121 -0
- package/src/components/WfoSubscription/utils/utils.ts +42 -6
- package/src/configuration/version.ts +1 -1
- package/src/contexts/TreeContext.tsx +16 -0
- package/src/icons/WfoExclamationTriangle.tsx +29 -0
- package/src/icons/index.ts +1 -0
- package/src/messages/en-GB.json +2 -0
- package/src/messages/nl-NL.json +2 -0
- package/src/pages/metadata/WfoTasksPage.tsx +11 -26
- package/src/pages/metadata/WfoWorkflowsPage.tsx +11 -12
- package/src/rtk/endpoints/index.ts +1 -0
- package/src/rtk/endpoints/metadata/tasks.ts +9 -4
- package/src/rtk/endpoints/metadata/workflows.ts +10 -5
- package/src/rtk/endpoints/startOptions.ts +9 -3
- package/src/types/types.ts +7 -3
|
@@ -128,33 +128,18 @@ export const WfoTasksPage = () => {
|
|
|
128
128
|
columnType: ColumnType.DATA,
|
|
129
129
|
label: t('description'),
|
|
130
130
|
width: '700px',
|
|
131
|
-
renderData: (value, row) =>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
) : null,
|
|
131
|
+
renderData: (value, row) => (
|
|
132
|
+
<WfoMetadataDescriptionField
|
|
133
|
+
onSave={(updatedNote) =>
|
|
134
|
+
updateWorkflow({
|
|
135
|
+
id: row.workflowId,
|
|
136
|
+
description: updatedNote,
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
description={value}
|
|
140
|
+
/>
|
|
141
|
+
),
|
|
143
142
|
},
|
|
144
|
-
|
|
145
|
-
// description: {
|
|
146
|
-
// columnType: ColumnType.DATA,
|
|
147
|
-
// label: t('description'),
|
|
148
|
-
// width: '450px',
|
|
149
|
-
// renderData: (value, row) =>
|
|
150
|
-
// value ? (
|
|
151
|
-
// <WfoWorkflowDescriptionField
|
|
152
|
-
// workflow_id={row.workflowId}
|
|
153
|
-
// description={value}
|
|
154
|
-
// />
|
|
155
|
-
// ) : null,
|
|
156
|
-
// },
|
|
157
|
-
|
|
158
143
|
target: {
|
|
159
144
|
columnType: ColumnType.DATA,
|
|
160
145
|
label: t('target'),
|
|
@@ -131,18 +131,17 @@ export const WfoWorkflowsPage = () => {
|
|
|
131
131
|
columnType: ColumnType.DATA,
|
|
132
132
|
label: t('description'),
|
|
133
133
|
width: '700px',
|
|
134
|
-
renderData: (value, row) =>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
) : null,
|
|
134
|
+
renderData: (value, row) => (
|
|
135
|
+
<WfoMetadataDescriptionField
|
|
136
|
+
onSave={(updatedNote) =>
|
|
137
|
+
updateWorkflow({
|
|
138
|
+
id: row.workflowId,
|
|
139
|
+
description: updatedNote,
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
description={value}
|
|
143
|
+
/>
|
|
144
|
+
),
|
|
146
145
|
},
|
|
147
146
|
target: {
|
|
148
147
|
columnType: ColumnType.DATA,
|
|
@@ -18,13 +18,14 @@ query MetadataWorkflows(
|
|
|
18
18
|
after: $after
|
|
19
19
|
sortBy: $sortBy
|
|
20
20
|
query: $query
|
|
21
|
-
filterBy: { field: "
|
|
21
|
+
filterBy: { field: "isTask", value: "true" }
|
|
22
22
|
) {
|
|
23
23
|
page {
|
|
24
24
|
workflowId
|
|
25
25
|
name
|
|
26
26
|
description
|
|
27
27
|
target
|
|
28
|
+
isTask
|
|
28
29
|
products {
|
|
29
30
|
tag
|
|
30
31
|
}
|
|
@@ -50,7 +51,7 @@ export type TasksResponse = {
|
|
|
50
51
|
const tasksApi = orchestratorApi.injectEndpoints({
|
|
51
52
|
endpoints: (builder) => ({
|
|
52
53
|
getTasks: builder.query<
|
|
53
|
-
TasksResponse,
|
|
54
|
+
TasksResponse | undefined,
|
|
54
55
|
GraphqlQueryVariables<TaskDefinition>
|
|
55
56
|
>({
|
|
56
57
|
query: (variables) => ({
|
|
@@ -58,8 +59,12 @@ const tasksApi = orchestratorApi.injectEndpoints({
|
|
|
58
59
|
variables,
|
|
59
60
|
}),
|
|
60
61
|
transformResponse: (
|
|
61
|
-
response: TaskDefinitionsResult,
|
|
62
|
-
): TasksResponse => {
|
|
62
|
+
response: TaskDefinitionsResult | undefined,
|
|
63
|
+
): TasksResponse | undefined => {
|
|
64
|
+
if (!response) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
const tasks = response.workflows.page || [];
|
|
64
69
|
const pageInfo = response.workflows.pageInfo || {};
|
|
65
70
|
|
|
@@ -42,6 +42,7 @@ query MetadataWorkflows(
|
|
|
42
42
|
name
|
|
43
43
|
description
|
|
44
44
|
target
|
|
45
|
+
isTask
|
|
45
46
|
products {
|
|
46
47
|
tag
|
|
47
48
|
}
|
|
@@ -76,7 +77,7 @@ export type WorkflowsResponse = {
|
|
|
76
77
|
const workflowsApi = orchestratorApi.injectEndpoints({
|
|
77
78
|
endpoints: (builder) => ({
|
|
78
79
|
getWorkflows: builder.query<
|
|
79
|
-
WorkflowsResponse,
|
|
80
|
+
WorkflowsResponse | undefined,
|
|
80
81
|
GraphqlQueryVariables<WorkflowDefinition>
|
|
81
82
|
>({
|
|
82
83
|
query: (variables) => ({
|
|
@@ -84,10 +85,14 @@ const workflowsApi = orchestratorApi.injectEndpoints({
|
|
|
84
85
|
variables,
|
|
85
86
|
}),
|
|
86
87
|
transformResponse: (
|
|
87
|
-
response: WorkflowDefinitionsResult,
|
|
88
|
-
): WorkflowsResponse => {
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
response: WorkflowDefinitionsResult | undefined,
|
|
89
|
+
): WorkflowsResponse | undefined => {
|
|
90
|
+
if (!response) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const workflows = response?.workflows.page || [];
|
|
95
|
+
const pageInfo = response?.workflows.pageInfo || {};
|
|
91
96
|
|
|
92
97
|
return {
|
|
93
98
|
workflows,
|
|
@@ -16,6 +16,7 @@ const workflowOptionsQuery = `
|
|
|
16
16
|
productType
|
|
17
17
|
productId
|
|
18
18
|
name
|
|
19
|
+
tag
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -24,7 +25,7 @@ const workflowOptionsQuery = `
|
|
|
24
25
|
|
|
25
26
|
const taskOptionsQuery = `
|
|
26
27
|
query StartOptions {
|
|
27
|
-
workflows(first: 1000000, after: 0, filterBy: [{ field: "
|
|
28
|
+
workflows(first: 1000000, after: 0, filterBy: [{ field: "isTask", value: "true"}]) {
|
|
28
29
|
page {
|
|
29
30
|
name
|
|
30
31
|
description
|
|
@@ -38,6 +39,7 @@ type WorkflowOption = {
|
|
|
38
39
|
productName: ProductDefinition['name'];
|
|
39
40
|
productId: ProductDefinition['productId'];
|
|
40
41
|
productType: ProductDefinition['productType'];
|
|
42
|
+
productTag: ProductDefinition['tag'];
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
type WorkflowOptionsResult = StartOptionsResult<{
|
|
@@ -46,6 +48,7 @@ type WorkflowOptionsResult = StartOptionsResult<{
|
|
|
46
48
|
name: ProductDefinition['name'];
|
|
47
49
|
productId: ProductDefinition['productId'];
|
|
48
50
|
productType: ProductDefinition['productType'];
|
|
51
|
+
tag: ProductDefinition['tag'];
|
|
49
52
|
}[];
|
|
50
53
|
}>;
|
|
51
54
|
|
|
@@ -65,9 +68,11 @@ const startButtonOptionsApi = orchestratorApi.injectEndpoints({
|
|
|
65
68
|
query: () => ({
|
|
66
69
|
document: workflowOptionsQuery,
|
|
67
70
|
}),
|
|
68
|
-
transformResponse: (
|
|
71
|
+
transformResponse: (
|
|
72
|
+
response: WorkflowOptionsResult | undefined,
|
|
73
|
+
) => {
|
|
69
74
|
const startOptions: WorkflowOption[] = [];
|
|
70
|
-
const workflows = response
|
|
75
|
+
const workflows = response?.workflows?.page || [];
|
|
71
76
|
workflows.forEach((workflow) => {
|
|
72
77
|
const workflowName = workflow.name;
|
|
73
78
|
workflow.products.forEach((product) => {
|
|
@@ -76,6 +81,7 @@ const startButtonOptionsApi = orchestratorApi.injectEndpoints({
|
|
|
76
81
|
productName: product.name,
|
|
77
82
|
productId: product.productId,
|
|
78
83
|
productType: product.productType,
|
|
84
|
+
productTag: product.tag,
|
|
79
85
|
});
|
|
80
86
|
});
|
|
81
87
|
});
|
package/src/types/types.ts
CHANGED
|
@@ -144,6 +144,7 @@ export enum WorkflowTarget {
|
|
|
144
144
|
MODIFY = 'modify',
|
|
145
145
|
TERMINATE = 'terminate',
|
|
146
146
|
SYSTEM = 'system',
|
|
147
|
+
VALIDATE = 'validate',
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
export type Process = {
|
|
@@ -258,8 +259,9 @@ export interface Step {
|
|
|
258
259
|
export interface WorkflowDefinition {
|
|
259
260
|
workflowId: string;
|
|
260
261
|
name: string;
|
|
261
|
-
description
|
|
262
|
+
description: string;
|
|
262
263
|
target: WorkflowTarget;
|
|
264
|
+
isTask: boolean;
|
|
263
265
|
products: Pick<ProductDefinition, 'tag' | 'productId' | 'name'>[];
|
|
264
266
|
createdAt: string;
|
|
265
267
|
}
|
|
@@ -267,8 +269,9 @@ export interface WorkflowDefinition {
|
|
|
267
269
|
export interface TaskDefinition {
|
|
268
270
|
workflowId: string;
|
|
269
271
|
name: string;
|
|
270
|
-
description
|
|
272
|
+
description: string;
|
|
271
273
|
target: WorkflowTarget;
|
|
274
|
+
isTask: boolean;
|
|
272
275
|
products: Pick<ProductDefinition, 'tag' | 'productId' | 'name'>[];
|
|
273
276
|
createdAt: string;
|
|
274
277
|
}
|
|
@@ -514,7 +517,7 @@ export type SubscriptionDetail = {
|
|
|
514
517
|
|
|
515
518
|
externalServices?: ExternalService[];
|
|
516
519
|
|
|
517
|
-
processes
|
|
520
|
+
processes?: GraphQlSinglePage<SubscriptionDetailProcess>;
|
|
518
521
|
};
|
|
519
522
|
|
|
520
523
|
export type SubscriptionDetailProcess = Pick<
|
|
@@ -600,6 +603,7 @@ export type SubscriptionActions = {
|
|
|
600
603
|
modify: SubscriptionAction[];
|
|
601
604
|
terminate: SubscriptionAction[];
|
|
602
605
|
system: SubscriptionAction[];
|
|
606
|
+
validate: SubscriptionAction[];
|
|
603
607
|
};
|
|
604
608
|
|
|
605
609
|
export enum CacheTagType {
|