@orchestrator-ui/orchestrator-ui-components 2.1.0 → 2.2.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 -5
- package/.turbo/turbo-test.log +11 -11
- package/CHANGELOG.md +19 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +1160 -1075
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoBadges/WfoBadge/WfoBadge.tsx +1 -1
- package/src/components/WfoContentHeader/WfoContentHeader.tsx +9 -8
- package/src/components/WfoDateTime/WfoDateTime.tsx +2 -10
- package/src/components/WfoForms/formFields/BoolField.tsx +1 -1
- package/src/components/WfoProcessList/WfoProcessesList.tsx +4 -0
- package/src/components/WfoStartButton/WfoStartTaskComboBox.tsx +5 -5
- package/src/components/WfoStartButton/WfoStartWorkflowComboBox.tsx +6 -4
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +3 -0
- package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +3 -0
- package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +1 -5
- package/src/components/WfoTable/WfoTable/WfoDataCell.tsx +31 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/useGroupedTableConfig.tsx +6 -6
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.spec.ts +58 -33
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.ts +11 -6
- package/src/components/WfoTable/WfoTable/WfoTable.tsx +1 -0
- package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +12 -4
- package/src/components/WfoTable/WfoTable/index.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useWfoSession.ts +2 -0
- package/src/icons/WfoCheckmarkCircleFill.tsx +0 -1
- package/src/icons/WfoMinusCircleOutline.tsx +0 -1
- package/src/pages/metadata/WfoProductBlocksPage.tsx +15 -0
- package/src/pages/metadata/WfoProductsPage.tsx +15 -0
- package/src/pages/metadata/WfoResourceTypesPage.tsx +6 -0
- package/src/pages/metadata/WfoTasksPage.tsx +9 -0
- package/src/pages/metadata/WfoWorkflowsPage.tsx +9 -0
- package/src/rtk/api.ts +7 -2
- package/src/rtk/wfoGraphqlRequestBaseQuery.ts +14 -16
|
@@ -91,6 +91,7 @@ export const WfoResourceTypesPage = () => {
|
|
|
91
91
|
width: '90',
|
|
92
92
|
renderData: (value) => <WfoFirstPartUUID UUID={value} />,
|
|
93
93
|
renderDetails: (value) => value,
|
|
94
|
+
renderTooltip: (value) => value,
|
|
94
95
|
},
|
|
95
96
|
resourceType: {
|
|
96
97
|
columnType: ColumnType.DATA,
|
|
@@ -133,6 +134,11 @@ export const WfoResourceTypesPage = () => {
|
|
|
133
134
|
))}
|
|
134
135
|
</EuiBadgeGroup>
|
|
135
136
|
),
|
|
137
|
+
renderTooltip: (productBlocks) => {
|
|
138
|
+
return productBlocks.map((productBlock) => (
|
|
139
|
+
<p key={productBlock.name}>- {productBlock.name}</p>
|
|
140
|
+
));
|
|
141
|
+
},
|
|
136
142
|
},
|
|
137
143
|
};
|
|
138
144
|
|
|
@@ -148,6 +148,14 @@ export const WfoTasksPage = () => {
|
|
|
148
148
|
))}
|
|
149
149
|
</EuiBadgeGroup>
|
|
150
150
|
),
|
|
151
|
+
renderTooltip: (productTags) => {
|
|
152
|
+
return productTags
|
|
153
|
+
?.filter(onlyUnique)
|
|
154
|
+
.sort((tagA, tagB) => tagA.localeCompare(tagB))
|
|
155
|
+
.map((productTag) => (
|
|
156
|
+
<p key={productTag}>- {productTag}</p>
|
|
157
|
+
));
|
|
158
|
+
},
|
|
151
159
|
},
|
|
152
160
|
createdAt: {
|
|
153
161
|
columnType: ColumnType.DATA,
|
|
@@ -156,6 +164,7 @@ export const WfoTasksPage = () => {
|
|
|
156
164
|
renderData: (date) => <WfoDateTime dateOrIsoString={date} />,
|
|
157
165
|
renderDetails: parseIsoString(parseDateToLocaleDateTimeString),
|
|
158
166
|
clipboardText: parseIsoString(parseDateToLocaleDateTimeString),
|
|
167
|
+
renderTooltip: parseIsoString(parseDateToLocaleDateTimeString),
|
|
159
168
|
},
|
|
160
169
|
};
|
|
161
170
|
|
|
@@ -154,6 +154,14 @@ export const WfoWorkflowsPage = () => {
|
|
|
154
154
|
))}
|
|
155
155
|
</EuiBadgeGroup>
|
|
156
156
|
),
|
|
157
|
+
renderTooltip: (productTags) => {
|
|
158
|
+
return productTags
|
|
159
|
+
?.filter(onlyUnique)
|
|
160
|
+
.sort((tagA, tagB) => tagA.localeCompare(tagB))
|
|
161
|
+
.map((productTag) => (
|
|
162
|
+
<p key={productTag}>- {productTag}</p>
|
|
163
|
+
));
|
|
164
|
+
},
|
|
157
165
|
},
|
|
158
166
|
createdAt: {
|
|
159
167
|
columnType: ColumnType.DATA,
|
|
@@ -162,6 +170,7 @@ export const WfoWorkflowsPage = () => {
|
|
|
162
170
|
renderData: (date) => <WfoDateTime dateOrIsoString={date} />,
|
|
163
171
|
renderDetails: parseIsoString(parseDateToLocaleDateTimeString),
|
|
164
172
|
clipboardText: parseIsoString(parseDateToLocaleDateTimeString),
|
|
173
|
+
renderTooltip: parseIsoString(parseDateToLocaleDateTimeString),
|
|
165
174
|
},
|
|
166
175
|
};
|
|
167
176
|
|
package/src/rtk/api.ts
CHANGED
|
@@ -63,8 +63,13 @@ export const handlePromiseErrorWithCallback = <T>(
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
// There are cases where a GraphQL endpoint return both data and errors
|
|
67
|
+
// Only throwing the error when the data is not there or invalid
|
|
68
|
+
export const handleGraphqlMetaErrors = (
|
|
69
|
+
meta: WfoGraphqlErrorsMeta,
|
|
70
|
+
responseHasInvalidData?: boolean,
|
|
71
|
+
) => {
|
|
72
|
+
if (responseHasInvalidData && meta.errors && meta.errors.length > 0) {
|
|
68
73
|
throw meta.errors[0];
|
|
69
74
|
}
|
|
70
75
|
};
|
|
@@ -53,22 +53,6 @@ export const wfoGraphqlRequestBaseQuery = <T, E = ErrorResponse>(
|
|
|
53
53
|
preparedHeaders,
|
|
54
54
|
);
|
|
55
55
|
|
|
56
|
-
if (errors?.length && authActive) {
|
|
57
|
-
errors.map((error: GraphQLError) => {
|
|
58
|
-
if (error.extensions?.error_type === 'not_authenticated') {
|
|
59
|
-
signOut();
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (!data && errors) {
|
|
65
|
-
return {
|
|
66
|
-
data: null,
|
|
67
|
-
errors,
|
|
68
|
-
meta: { errors: [] },
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
56
|
return {
|
|
73
57
|
data,
|
|
74
58
|
meta: { errors },
|
|
@@ -76,8 +60,22 @@ export const wfoGraphqlRequestBaseQuery = <T, E = ErrorResponse>(
|
|
|
76
60
|
} catch (error) {
|
|
77
61
|
if (error instanceof ClientError) {
|
|
78
62
|
const { request, response } = error;
|
|
63
|
+
const errors = response.errors;
|
|
64
|
+
|
|
65
|
+
if (
|
|
66
|
+
authActive &&
|
|
67
|
+
errors?.some(
|
|
68
|
+
(error: GraphQLError) =>
|
|
69
|
+
error.extensions?.error_type ===
|
|
70
|
+
'not_authenticated',
|
|
71
|
+
)
|
|
72
|
+
) {
|
|
73
|
+
signOut();
|
|
74
|
+
}
|
|
75
|
+
|
|
79
76
|
const customErrors =
|
|
80
77
|
options.customErrors ?? ((error) => error.response.errors);
|
|
78
|
+
|
|
81
79
|
const customizedErrors = customErrors(error) as E;
|
|
82
80
|
return { error: customizedErrors, meta: { request, response } };
|
|
83
81
|
}
|