@orchestrator-ui/orchestrator-ui-components 6.7.5 → 6.7.7
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 +10 -9
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +15 -15
- package/CHANGELOG.md +13 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.js +679 -34299
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/WfoPydanticForm/Footer.tsx +62 -22
- package/src/components/WfoPydanticForm/WfoPydanticForm.tsx +2 -1
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useOrchestratorConfig.ts +1 -7
- package/src/messages/nl-NL.json +8 -2
- package/tsconfig.json +3 -4
- package/tsup.config.ts +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchestrator-ui/orchestrator-ui-components",
|
|
3
|
-
"version": "6.7.
|
|
3
|
+
"version": "6.7.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Library of UI Components used to display the workflow orchestrator frontend",
|
|
6
6
|
"author": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "npm run generate-version && tsup src/index.ts",
|
|
32
32
|
"tsc": "tsc --noEmit",
|
|
33
33
|
"lint": "eslint",
|
|
34
|
-
"dev": "
|
|
34
|
+
"dev": "tsup --watch"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@ag-ui/client": "0.0.39",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"next-query-params": "^5.0.0",
|
|
55
55
|
"object-hash": "^3.0.0",
|
|
56
56
|
"prism-themes": "^1.9.0",
|
|
57
|
-
"pydantic-forms": "^0.10.
|
|
57
|
+
"pydantic-forms": "^0.10.2",
|
|
58
58
|
"react-diff-view": "^3.2.0",
|
|
59
59
|
"react-draggable": "^4.4.6",
|
|
60
60
|
"react-redux": "^9.1.2",
|
|
@@ -12,15 +12,23 @@ import { EuiButton, EuiFlexGroup, EuiHorizontalRule } from '@elastic/eui';
|
|
|
12
12
|
|
|
13
13
|
import { ConfirmationDialogContext } from '@/contexts';
|
|
14
14
|
import { useOrchestratorTheme } from '@/hooks';
|
|
15
|
+
import { WfoPlayCircle } from '@/icons';
|
|
16
|
+
import { WfoThemeExtraColors } from '@/theme';
|
|
15
17
|
|
|
16
18
|
import { RenderFormErrors } from './RenderFormErrors';
|
|
17
19
|
|
|
20
|
+
type FooterProps = PydanticFormFooterProps & {
|
|
21
|
+
isTask?: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
18
24
|
export const Footer = ({
|
|
19
25
|
onCancel,
|
|
20
26
|
onPrevious,
|
|
21
27
|
hasNext,
|
|
22
28
|
hasPrevious,
|
|
23
|
-
|
|
29
|
+
isTask = false,
|
|
30
|
+
buttons,
|
|
31
|
+
}: FooterProps) => {
|
|
24
32
|
const { theme } = useOrchestratorTheme();
|
|
25
33
|
const t = useTranslations('pydanticForms.userInputForm');
|
|
26
34
|
const { showConfirmDialog } = useContext(ConfirmationDialogContext);
|
|
@@ -34,24 +42,37 @@ export const Footer = ({
|
|
|
34
42
|
}
|
|
35
43
|
};
|
|
36
44
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
const { next, previous } = buttons || {};
|
|
46
|
+
|
|
47
|
+
const PreviousButton = () => {
|
|
48
|
+
const previousButtonColor =
|
|
49
|
+
theme.colors[
|
|
50
|
+
(previous?.color as keyof WfoThemeExtraColors['colors']) ??
|
|
51
|
+
'primary'
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<EuiButton
|
|
56
|
+
data-testid="button-submit-form-previous"
|
|
57
|
+
id="button-submit-form-submit"
|
|
58
|
+
tabIndex={0}
|
|
59
|
+
fill
|
|
60
|
+
onClick={() => {
|
|
61
|
+
if (onPrevious) {
|
|
62
|
+
onPrevious();
|
|
63
|
+
}
|
|
64
|
+
}}
|
|
65
|
+
css={{
|
|
66
|
+
backgroundColor: previousButtonColor,
|
|
67
|
+
padding: '12px',
|
|
68
|
+
}}
|
|
69
|
+
iconSide="right"
|
|
70
|
+
aria-label={t('previous')}
|
|
71
|
+
>
|
|
72
|
+
{previous?.text ?? t('previous')}
|
|
73
|
+
</EuiButton>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
55
76
|
|
|
56
77
|
const CancelButton = () => (
|
|
57
78
|
<div
|
|
@@ -71,26 +92,45 @@ export const Footer = ({
|
|
|
71
92
|
);
|
|
72
93
|
|
|
73
94
|
const SubmitButton = () => {
|
|
74
|
-
const submitButtonLabel = hasNext ? t('next') : t('startWorkflow');
|
|
75
|
-
|
|
76
95
|
/*
|
|
77
96
|
* The submit button is used to submit the form data.
|
|
78
97
|
* If there is a next step, it will be labeled as "Next".
|
|
79
98
|
* If there is no next step, it will be labeled as "Start Workflow".
|
|
99
|
+
* If there is a label provided in the buttonNextProps, it will be used instead.
|
|
80
100
|
* The button is styled with primary color and has an icon on the right side.
|
|
81
101
|
* We don't use the disable property based on the form valid state here. When calculating the form valid state
|
|
82
102
|
* react-hook-form might return a false negative - marking the form invalid - when not all fields have a defaultValue
|
|
83
103
|
* which is a valid use case. https://chatgpt.com/share/6874ce66-35e8-800c-9434-725ff895ac44
|
|
84
104
|
*/
|
|
105
|
+
|
|
106
|
+
const submitButtonTranslated = hasNext
|
|
107
|
+
? t('next')
|
|
108
|
+
: isTask
|
|
109
|
+
? t('startTask')
|
|
110
|
+
: t('startWorkflow');
|
|
111
|
+
|
|
112
|
+
const submitButtonLabel = next?.text ?? submitButtonTranslated;
|
|
113
|
+
const submitIconType =
|
|
114
|
+
!hasNext && !next?.text
|
|
115
|
+
? () => <WfoPlayCircle color="currentColor" />
|
|
116
|
+
: undefined;
|
|
117
|
+
const submitButtonColor = next?.color
|
|
118
|
+
? (next?.color as keyof WfoThemeExtraColors['colors'])
|
|
119
|
+
: 'primary';
|
|
120
|
+
|
|
85
121
|
return (
|
|
86
122
|
<EuiButton
|
|
87
123
|
data-testid="button-submit-form-submit"
|
|
88
124
|
id="button-submit-form-submit"
|
|
89
125
|
tabIndex={0}
|
|
90
126
|
fill
|
|
91
|
-
|
|
127
|
+
css={{
|
|
128
|
+
backgroundColor: submitButtonColor,
|
|
129
|
+
padding: '12px',
|
|
130
|
+
}}
|
|
92
131
|
type="submit"
|
|
93
132
|
iconSide="right"
|
|
133
|
+
iconType={submitIconType}
|
|
94
134
|
aria-label={submitButtonLabel}
|
|
95
135
|
>
|
|
96
136
|
{submitButtonLabel}
|
|
@@ -368,7 +368,7 @@ export const WfoPydanticForm = ({
|
|
|
368
368
|
|
|
369
369
|
return {
|
|
370
370
|
apiProvider: getPydanticFormProvider(),
|
|
371
|
-
footerRenderer: Footer
|
|
371
|
+
footerRenderer: (props) => <Footer {...props} isTask={isTask} />,
|
|
372
372
|
headerRenderer: Header,
|
|
373
373
|
componentMatcherExtender: wfoComponentMatcherExtender,
|
|
374
374
|
labelProvider: pydanticLabelProvider,
|
|
@@ -380,6 +380,7 @@ export const WfoPydanticForm = ({
|
|
|
380
380
|
}, [
|
|
381
381
|
customTranslations,
|
|
382
382
|
getPydanticFormProvider,
|
|
383
|
+
isTask,
|
|
383
384
|
pydanticLabelProvider,
|
|
384
385
|
router.locale,
|
|
385
386
|
wfoComponentMatcherExtender,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.7.
|
|
1
|
+
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.7.7';
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
1
|
import { OrchestratorConfig } from '@/types';
|
|
4
2
|
|
|
5
3
|
export const useOrchestratorConfig = (
|
|
6
4
|
initialOrchestratorConfig: OrchestratorConfig,
|
|
7
5
|
) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
orchestratorConfig,
|
|
12
|
-
};
|
|
6
|
+
return { orchestratorConfig: initialOrchestratorConfig };
|
|
13
7
|
};
|
package/src/messages/nl-NL.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"tableSettings": "Tabel instellingen",
|
|
28
28
|
"openMenu": "Open menu",
|
|
29
29
|
"incompatibleVersion": "Incompatibele versie",
|
|
30
|
+
"incompatibleVersionText": "De versie van de WFO UI is incompatibel met de version van orchestrator-core.",
|
|
30
31
|
"minimumOrchestratorCoreVersion": "Minimale versie van orchestrator-core"
|
|
31
32
|
},
|
|
32
33
|
"common": {
|
|
@@ -182,6 +183,7 @@
|
|
|
182
183
|
"usedInProductBlocks": "Gebruikt in product blocks"
|
|
183
184
|
},
|
|
184
185
|
"workflows": {
|
|
186
|
+
"workflowId": "ID",
|
|
185
187
|
"name": "Workflow",
|
|
186
188
|
"description": "Workflow beschrijving",
|
|
187
189
|
"target": "Target",
|
|
@@ -189,6 +191,7 @@
|
|
|
189
191
|
"createdAt": "Aangemaakt"
|
|
190
192
|
},
|
|
191
193
|
"tasks": {
|
|
194
|
+
"workflowId": "ID",
|
|
192
195
|
"name": "Taak",
|
|
193
196
|
"description": "Taak beschrijving",
|
|
194
197
|
"target": "Target",
|
|
@@ -407,10 +410,10 @@
|
|
|
407
410
|
},
|
|
408
411
|
"settings": {
|
|
409
412
|
"page": {
|
|
410
|
-
"engineStatusTitle": "Workflow engine status",
|
|
411
|
-
"workerStatusTitle": "Worker status",
|
|
412
413
|
"flushButton": "Flush",
|
|
413
414
|
"flushCacheSettingsTitle": "Flush cache instellingen",
|
|
415
|
+
"engineStatusTitle": "Workflow engine status",
|
|
416
|
+
"workerStatusTitle": "Worker status",
|
|
414
417
|
"modifyEngine": "Wijzig engine status",
|
|
415
418
|
"pauseEngine": "Pauseer workflow engine",
|
|
416
419
|
"runningProcesses": "Lopende processen",
|
|
@@ -422,6 +425,8 @@
|
|
|
422
425
|
"numberOfQueuedJobs": "Aantal queued jobs",
|
|
423
426
|
"numberOfRunningJobs": "Aantal running jobs",
|
|
424
427
|
"numberOfWorkersOnline": "Aantal workers online",
|
|
428
|
+
"viewStatusPage": "Bekijk AO status pagina",
|
|
429
|
+
"aoStackStatus": "AO stack status",
|
|
425
430
|
"noSettingsExposed": "Er zijn geen instellingen beschikbaar vanuit de backend. Om dit in te schakelen, raadpleeg de ",
|
|
426
431
|
"settingsOverviewLink": "pagina Instellingenoverzicht in de documentatie"
|
|
427
432
|
},
|
|
@@ -462,6 +467,7 @@
|
|
|
462
467
|
}
|
|
463
468
|
},
|
|
464
469
|
"hamburgerMenu": {
|
|
470
|
+
"openMenu": "Open menu",
|
|
465
471
|
"support": "Support",
|
|
466
472
|
"softwareVersions": "Software Versies",
|
|
467
473
|
"logout": "Logout",
|
package/tsconfig.json
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
"extends": "@orchestrator-ui/tsconfig/base.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"strictNullChecks": true,
|
|
5
|
-
"rootDir": "./src",
|
|
6
|
-
"outDir": "./dist",
|
|
7
5
|
"baseUrl": ".",
|
|
8
6
|
"paths": {
|
|
9
7
|
"@/*": ["./src/*"]
|
|
10
|
-
}
|
|
8
|
+
},
|
|
9
|
+
"noEmit": true
|
|
11
10
|
},
|
|
12
|
-
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
|
|
11
|
+
"include": ["src", "./src/**/*.ts", "./src/**/*.tsx"],
|
|
13
12
|
"exclude": [
|
|
14
13
|
"node_modules",
|
|
15
14
|
"**/*.stories.ts",
|
package/tsup.config.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { defineConfig } from 'tsup';
|
|
2
2
|
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
|
|
5
|
-
format: ['esm'],
|
|
6
|
-
splitting: false,
|
|
3
|
+
export default defineConfig((opts) => ({
|
|
4
|
+
entry: ['src/index.ts'],
|
|
7
5
|
sourcemap: true,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
splitting: false,
|
|
7
|
+
clean: !opts.watch,
|
|
8
|
+
dts: !opts.watch,
|
|
9
|
+
outDir: 'dist',
|
|
10
|
+
format: ['esm'],
|
|
11
|
+
platform: 'node',
|
|
12
|
+
target: 'es2022',
|
|
13
|
+
skipNodeModulesBundle: true,
|
|
14
|
+
}));
|