@orchestrator-ui/orchestrator-ui-components 6.1.1 → 6.2.1
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 +16 -0
- package/dist/index.d.ts +44 -8
- package/dist/index.js +2196 -1889
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
- package/src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx +92 -0
- package/src/components/WfoMonacoCodeBlock/index.ts +1 -0
- package/src/components/WfoMonacoCodeBlock/styles.ts +16 -0
- package/src/components/WfoSubscription/WfoInSyncField/WfoInSyncErrorToastMessage.tsx +25 -0
- package/src/components/WfoSubscription/{WfoInSyncField.tsx → WfoInSyncField/WfoInSyncField.tsx} +12 -4
- package/src/components/WfoSubscription/index.ts +1 -1
- package/src/components/WfoSubscription/utils/utils.spec.ts +50 -0
- package/src/components/WfoSubscription/utils/utils.ts +22 -0
- package/src/components/WfoWorkflowSteps/WfoStep/WfoCodeViewSelector.tsx +116 -0
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +24 -27
- package/src/components/index.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useShowToastMessage.ts +3 -1
- package/src/icons/heroicons/WfoBracketSquare.tsx +29 -0
- package/src/icons/heroicons/WfoCommandLine.tsx +29 -0
- package/src/icons/heroicons/WfoTableCells.tsx +29 -0
- package/src/icons/heroicons/index.ts +3 -0
- package/src/messages/en-GB.json +5 -2
- package/src/messages/nl-NL.json +5 -2
- package/src/pages/processes/WfoProcessDetail.tsx +20 -2
- package/src/rtk/slices/toastMessages.ts +1 -1
- package/src/types/types.ts +4 -5
- package/src/utils/getToastMessage.ts +6 -4
package/src/messages/nl-NL.json
CHANGED
|
@@ -249,8 +249,11 @@
|
|
|
249
249
|
"submitTaskFormLabel": "Verstuur het formulier om deze taak te starten",
|
|
250
250
|
"submitWorkflowFormLabel": "Verstuur het formulier om deze workflow te starten",
|
|
251
251
|
"traceback": "Traceback",
|
|
252
|
-
"
|
|
253
|
-
|
|
252
|
+
"codeView": {
|
|
253
|
+
"json": "JSON",
|
|
254
|
+
"table": "Tab",
|
|
255
|
+
"raw": "Raw"
|
|
256
|
+
}
|
|
254
257
|
},
|
|
255
258
|
"delta": {
|
|
256
259
|
"title": "Subscription delta",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
1
|
+
import React, { useContext, useEffect, useRef } from 'react';
|
|
2
2
|
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { useRouter } from 'next/router';
|
|
@@ -88,6 +88,18 @@ interface ProcessDetailProps {
|
|
|
88
88
|
hasError?: boolean;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
function useHasPreviousRoute() {
|
|
92
|
+
const hasPrev = useRef(false);
|
|
93
|
+
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (document.referrer && document.referrer !== window.location.href) {
|
|
96
|
+
hasPrev.current = true;
|
|
97
|
+
}
|
|
98
|
+
}, []);
|
|
99
|
+
|
|
100
|
+
return hasPrev.current;
|
|
101
|
+
}
|
|
102
|
+
|
|
91
103
|
export const WfoProcessDetail = ({
|
|
92
104
|
children,
|
|
93
105
|
processDetail,
|
|
@@ -105,6 +117,7 @@ export const WfoProcessDetail = ({
|
|
|
105
117
|
const [retryProcess] = useRetryProcessMutation();
|
|
106
118
|
const [deleteProcess] = useDeleteProcessMutation();
|
|
107
119
|
const [abortProcess] = useAbortProcessMutation();
|
|
120
|
+
const hasPreviousRoute = useHasPreviousRoute();
|
|
108
121
|
|
|
109
122
|
const router = useRouter();
|
|
110
123
|
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
@@ -177,7 +190,12 @@ export const WfoProcessDetail = ({
|
|
|
177
190
|
if (processDetail?.processId) {
|
|
178
191
|
abortProcess({ processId: processDetail.processId });
|
|
179
192
|
}
|
|
180
|
-
|
|
193
|
+
|
|
194
|
+
if (hasPreviousRoute) {
|
|
195
|
+
router.back();
|
|
196
|
+
} else {
|
|
197
|
+
router.push(processIsTask ? PATH_TASKS : PATH_WORKFLOWS);
|
|
198
|
+
}
|
|
181
199
|
},
|
|
182
200
|
});
|
|
183
201
|
|
package/src/types/types.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Toast } from '@elastic/eui/src/components/toast/global_toast_list';
|
|
4
|
-
|
|
5
3
|
import { FormUserPermissions, InputForm } from './forms';
|
|
6
4
|
|
|
7
5
|
export type Nullable<T> = T | null;
|
|
@@ -570,13 +568,14 @@ export type ExternalService = {
|
|
|
570
568
|
|
|
571
569
|
export type WfoTreeNodeMap = { [key: number]: TreeBlock };
|
|
572
570
|
|
|
573
|
-
export type { Toast };
|
|
574
|
-
|
|
575
571
|
export enum ToastTypes {
|
|
576
572
|
ERROR = 'ERROR',
|
|
577
573
|
SUCCESS = 'SUCCESS',
|
|
578
574
|
}
|
|
579
|
-
|
|
575
|
+
export type Toast = {
|
|
576
|
+
id: string;
|
|
577
|
+
[key: string]: unknown;
|
|
578
|
+
};
|
|
580
579
|
export enum Environment {
|
|
581
580
|
DEVELOPMENT = 'Development',
|
|
582
581
|
PRODUCTION = 'Production',
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { ToastTypes } from '@/types';
|
|
4
|
+
import type { Toast } from '@/types';
|
|
3
5
|
|
|
4
6
|
export const getToastMessage = (
|
|
5
7
|
type: ToastTypes,
|
|
6
|
-
text:
|
|
7
|
-
title: string,
|
|
8
|
+
text: ReactNode,
|
|
9
|
+
title: string,
|
|
8
10
|
) => {
|
|
9
11
|
const getTypeProps = (type: ToastTypes): Partial<Toast> => {
|
|
10
12
|
switch (type) {
|