@orchestrator-ui/orchestrator-ui-components 7.2.0 → 7.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 +5 -2
- package/.turbo/turbo-test.log +9 -9
- package/CHANGELOG.md +7 -0
- package/dist/index.d.ts +1964 -20
- package/dist/index.js +656 -603
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/WfoAgent/ExportButton/styles.ts +9 -9
- package/src/components/WfoAgent/ToolProgress/SetFilterTreeDisplay.styles.ts +5 -5
- package/src/components/WfoAgent/ToolProgress/styles.ts +7 -7
- package/src/components/WfoAgent/WfoAgentChart/WfoAgentLineChart.tsx +2 -2
- package/src/components/WfoAgent/WfoAgentChart/WfoAgentPieChart.tsx +2 -2
- package/src/components/WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.tsx +2 -2
- package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +21 -29
- package/src/components/WfoBadges/WfoProcessStatusBadge/WfoProcessStatusBadge.tsx +12 -12
- package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +12 -12
- package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.tsx +8 -8
- package/src/components/WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx +8 -8
- package/src/components/WfoBadges/WfoSubscriptionSyncStatusBadge/WfoSubscriptionSyncStatusBadge.tsx +5 -4
- package/src/components/WfoBadges/WfoWebsocketStatusBadge/styles.ts +5 -3
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +14 -13
- package/src/components/WfoButtonComboBox/styles.ts +6 -6
- package/src/components/WfoDiff/styles.ts +6 -6
- package/src/components/WfoError/WfoError.tsx +1 -1
- package/src/components/WfoExpandableField/styles.ts +2 -2
- package/src/components/WfoFilterTabs/styles.ts +2 -2
- package/src/components/WfoJsonCodeBlock/styles.ts +2 -2
- package/src/components/WfoKeyValueTable/WfoValueCell.tsx +1 -1
- package/src/components/WfoKeyValueTable/styles.ts +6 -6
- package/src/components/WfoLogoSpinner/styles.ts +6 -0
- package/src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx +7 -7
- package/src/components/WfoMonacoCodeBlock/styles.ts +5 -3
- package/src/components/WfoNoResults/styles.ts +3 -3
- package/src/components/WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx +1 -1
- package/src/components/WfoPageTemplate/WfoPageHeader/WfoHamburgerMenu.tsx +3 -7
- package/src/components/WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx +6 -6
- package/src/components/WfoPageTemplate/WfoPageHeader/styles.ts +3 -3
- package/src/components/WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx +56 -8
- package/src/components/WfoPageTemplate/WfoPageTemplate/styles.ts +4 -4
- package/src/components/WfoPageTemplate/WfoSidebar/styles.ts +26 -24
- package/src/components/WfoPydanticForm/Footer.tsx +5 -5
- package/src/components/WfoPydanticForm/fields/WfoArrayField/WfoArrayField.tsx +4 -3
- package/src/components/WfoPydanticForm/fields/WfoArrayField/styles.ts +4 -2
- package/src/components/WfoPydanticForm/fields/WfoInteger.tsx +5 -5
- package/src/components/WfoPydanticForm/fields/WfoLabel.tsx +1 -1
- package/src/components/WfoPydanticForm/fields/WfoReactSelect/styles.ts +36 -13
- package/src/components/WfoPydanticForm/fields/styles.ts +8 -8
- package/src/components/WfoSearchPage/WfoConditionRow/WfoPathChips.tsx +1 -1
- package/src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx +8 -5
- package/src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx +1 -1
- package/src/components/WfoSettings/styles.ts +5 -6
- package/src/components/WfoStartButton/WfoStartButtonComboBox.tsx +4 -7
- package/src/components/WfoStartButton/styles.ts +6 -6
- package/src/components/WfoSubscription/WfoSubscriptionActions/styles.ts +3 -3
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/styles.ts +8 -9
- package/src/components/WfoSubscription/WfoTargetTypeIcon.tsx +4 -2
- package/src/components/WfoSubscription/styles.ts +9 -4
- package/src/components/WfoSubscription/utils/utils.spec.ts +8 -8
- package/src/components/WfoSubscription/utils/utils.ts +4 -4
- package/src/components/WfoSummary/WfoSummaryCardHeader/WfoSummaryCardHeader.tsx +5 -1
- package/src/components/WfoSummary/WfoSummaryCardHeader/styles.ts +2 -2
- package/src/components/WfoSummary/WfoSummaryCardList/WfoSummaryCardListItem.tsx +3 -1
- package/src/components/WfoSummary/WfoSummaryCardList/styles.ts +4 -3
- package/src/components/WfoSummary/styles.ts +2 -2
- package/src/components/WfoTable/WfoAdvancedTable/WfoAdvancedTable.tsx +2 -2
- package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +1 -1
- package/src/components/WfoTable/WfoFirstPartUUID/styles.ts +2 -2
- package/src/components/WfoTable/WfoSortButtons/WfoSortButton.tsx +5 -1
- package/src/components/WfoTable/WfoStatusColorField/styles.ts +2 -2
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/styles.ts +3 -3
- package/src/components/WfoTable/WfoTable/WfoTable.tsx +9 -3
- package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/WfoSortDirectionIcon.tsx +3 -3
- package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/styles.ts +10 -10
- package/src/components/WfoTable/WfoTable/styles.ts +13 -14
- package/src/components/WfoTable/WfoTable/utils.ts +29 -1
- package/src/components/WfoTable/WfoTableSettingsModal/styles.ts +6 -6
- package/src/components/WfoTable/utils/tableUtils.ts +0 -1
- package/src/components/WfoTableCodeBlock/styles.ts +2 -2
- package/src/components/WfoTextAnchor/styles.ts +2 -2
- package/src/components/WfoTimeline/styles.ts +8 -8
- package/src/components/WfoTree/styles.ts +5 -6
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +6 -2
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +12 -9
- package/src/components/WfoWorkflowSteps/WfoTraceback/styles.ts +2 -2
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx +1 -1
- package/src/components/WfoWorkflowSteps/styles.ts +9 -6
- package/src/components/confirmationDialog/WfoConfirmationDialog.tsx +1 -1
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useOrchestratorTheme.ts +20 -18
- package/src/hooks/useWithOrchestratorTheme.ts +4 -4
- package/src/pages/processes/WfoProcessDetail.tsx +3 -3
- package/src/pages/processes/WfoProcessListSubscriptionsCell.tsx +1 -1
- package/src/pages/processes/WfoProductInformationWithLink.tsx +1 -1
- package/src/pages/processes/WfoStartProcessPage.tsx +6 -1
- package/src/pages/settings/WfoSettingsPage.tsx +2 -1
- package/src/pages/tasks/WfoTasksListPage.tsx +1 -1
- package/src/theme/baseStyles/formFieldsBaseStyle.ts +8 -6
- package/src/theme/index.ts +1 -1
- package/src/theme/wfoThemeModifications.ts +117 -0
- package/src/theme/defaultOrchestratorTheme.ts +0 -129
|
@@ -18,7 +18,11 @@ import { getPageCount } from '../utils/tableUtils';
|
|
|
18
18
|
import { WfoTableDataRows } from './WfoTableDataRows';
|
|
19
19
|
import { WfoTableHeaderRow } from './WfoTableHeaderRow';
|
|
20
20
|
import { getWfoTableStyles } from './styles';
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
getColumnWidthsFromConfig,
|
|
23
|
+
getSortedVisibleColumns,
|
|
24
|
+
usePageIndexBoundsGuard,
|
|
25
|
+
} from './utils';
|
|
22
26
|
|
|
23
27
|
export type Pagination = {
|
|
24
28
|
pageSize: number;
|
|
@@ -133,6 +137,8 @@ export const WfoTable = <T extends object>({
|
|
|
133
137
|
}: WfoTableProps<T>) => {
|
|
134
138
|
const [localColumnWidths, setLocalColumnWidths] =
|
|
135
139
|
useState<LocalColumnWidths>(getColumnWidthsFromConfig(columnConfig));
|
|
140
|
+
const dataLength = data.length;
|
|
141
|
+
usePageIndexBoundsGuard({ dataLength, isLoading, pagination });
|
|
136
142
|
|
|
137
143
|
const parentRef = useRef<HTMLDivElement>(null);
|
|
138
144
|
|
|
@@ -191,7 +197,7 @@ export const WfoTable = <T extends object>({
|
|
|
191
197
|
}, {} as WfoTableColumnConfig<T>);
|
|
192
198
|
|
|
193
199
|
const rowVirtualizer = useVirtualizer({
|
|
194
|
-
count:
|
|
200
|
+
count: dataLength,
|
|
195
201
|
getScrollElement: () => parentRef.current,
|
|
196
202
|
estimateSize: () => ROW_HEIGHT,
|
|
197
203
|
overscan: 10,
|
|
@@ -231,7 +237,7 @@ export const WfoTable = <T extends object>({
|
|
|
231
237
|
/>
|
|
232
238
|
</thead>
|
|
233
239
|
)}
|
|
234
|
-
{
|
|
240
|
+
{dataLength === 0 ? (
|
|
235
241
|
<tbody css={isLoading && bodyLoadingStyle}>
|
|
236
242
|
<tr css={rowStyle}>
|
|
237
243
|
<td
|
|
@@ -22,14 +22,14 @@ export const WfoSortDirectionIcon: FC<WfoSortDirectionIconProps> = ({
|
|
|
22
22
|
width={16}
|
|
23
23
|
className={SORTABLE_ICON_CLASS}
|
|
24
24
|
css={{ visibility: 'hidden' }}
|
|
25
|
-
color={theme.colors.
|
|
25
|
+
color={theme.colors.textSubdued}
|
|
26
26
|
/>
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
return sortDirection === SortOrder.ASC ? (
|
|
31
|
-
<WfoArrowUp color={theme.colors.
|
|
31
|
+
<WfoArrowUp color={theme.colors.textSubdued} />
|
|
32
32
|
) : (
|
|
33
|
-
<WfoArrowDown color={theme.colors.
|
|
33
|
+
<WfoArrowDown color={theme.colors.textSubdued} />
|
|
34
34
|
);
|
|
35
35
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
import { SortOrder } from '@/types';
|
|
5
5
|
|
|
6
6
|
export const HEADER_CELL_TITLE_BUTTON_CLASS = 'headerCellTitleButton';
|
|
7
7
|
export const HEADER_CELL_SORT_BUTTON_CLASS = 'headerCellSortButton';
|
|
8
8
|
export const SORTABLE_ICON_CLASS = 'sortableIcon';
|
|
9
9
|
|
|
10
|
-
export const getWfoBasicTableStyles = ({ theme }:
|
|
10
|
+
export const getWfoBasicTableStyles = ({ theme }: WfoThemeHelpers) => {
|
|
11
11
|
const radius = theme.border.radius.medium;
|
|
12
12
|
|
|
13
13
|
const basicTableStyle = css({
|
|
14
14
|
table: {
|
|
15
|
-
backgroundColor: theme.colors.
|
|
15
|
+
backgroundColor: theme.colors.backgroundBaseNeutral,
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
// The lines between rows
|
|
19
19
|
'tr>td': {
|
|
20
|
-
borderColor: theme.colors.
|
|
20
|
+
borderColor: theme.colors.borderBaseSubdued,
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
'.euiTableCellContent__text': {
|
|
24
24
|
display: 'flex',
|
|
25
|
-
color: theme.colors.
|
|
25
|
+
color: theme.colors.textParagraph,
|
|
26
26
|
},
|
|
27
27
|
thead: {
|
|
28
|
-
backgroundColor: theme.colors.
|
|
28
|
+
backgroundColor: theme.colors.borderBaseSubdued,
|
|
29
29
|
'tr>:first-child': {
|
|
30
30
|
borderTopLeftRadius: radius,
|
|
31
31
|
},
|
|
@@ -35,7 +35,7 @@ export const getWfoBasicTableStyles = ({ theme }: WfoTheme) => {
|
|
|
35
35
|
},
|
|
36
36
|
tbody: {
|
|
37
37
|
'tr.euiTableRow:hover': {
|
|
38
|
-
backgroundColor: theme.colors.
|
|
38
|
+
backgroundColor: theme.colors.backgroundBasePlain,
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
});
|
|
@@ -55,7 +55,7 @@ export const getWfoBasicTableStyles = ({ theme }: WfoTheme) => {
|
|
|
55
55
|
|
|
56
56
|
const dropDownTableStyle = css({
|
|
57
57
|
thead: {
|
|
58
|
-
backgroundColor: theme.colors.
|
|
58
|
+
backgroundColor: theme.colors.backgroundBasePlain,
|
|
59
59
|
'tr>:first-child': {
|
|
60
60
|
borderTopLeftRadius: 0,
|
|
61
61
|
},
|
|
@@ -64,7 +64,7 @@ export const getWfoBasicTableStyles = ({ theme }: WfoTheme) => {
|
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
tbody: {
|
|
67
|
-
backgroundColor: theme.colors.
|
|
67
|
+
backgroundColor: theme.colors.backgroundBasePlain,
|
|
68
68
|
},
|
|
69
69
|
});
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ export const getWfoBasicTableStyles = ({ theme }: WfoTheme) => {
|
|
|
72
72
|
basicTableStyle,
|
|
73
73
|
{
|
|
74
74
|
'tr.euiTableRow-isExpandedRow': {
|
|
75
|
-
backgroundColor: theme.colors.
|
|
75
|
+
backgroundColor: theme.colors.backgroundBasePlain,
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
]);
|
|
@@ -2,7 +2,7 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { css, keyframes } from '@emotion/react';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
HEADER_CELL_TITLE_BUTTON_CLASS,
|
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
} from './WfoTableHeaderCell/styles';
|
|
11
11
|
import { TABLE_ROW_HEIGHT } from './constants';
|
|
12
12
|
|
|
13
|
-
export const getWfoTableStyles = ({
|
|
13
|
+
export const getWfoTableStyles = ({
|
|
14
|
+
theme,
|
|
15
|
+
isDarkModeActive,
|
|
16
|
+
}: WfoThemeHelpers) => {
|
|
14
17
|
const radius = theme.border.radius.medium;
|
|
15
18
|
|
|
16
19
|
const tableLoadingLineKeyframes = keyframes({
|
|
@@ -41,13 +44,9 @@ export const getWfoTableStyles = ({ theme, isDarkThemeActive }: WfoTheme) => {
|
|
|
41
44
|
});
|
|
42
45
|
|
|
43
46
|
const headerStyle = css({
|
|
44
|
-
|
|
45
|
-
top: 0,
|
|
46
|
-
zIndex: 3,
|
|
47
|
-
backgroundColor: theme.colors.lightShade,
|
|
47
|
+
backgroundColor: theme.colors.borderBaseSubdued,
|
|
48
48
|
fontSize: theme.size.m,
|
|
49
49
|
textAlign: 'left',
|
|
50
|
-
|
|
51
50
|
'tr>:first-child': {
|
|
52
51
|
borderTopLeftRadius: radius,
|
|
53
52
|
},
|
|
@@ -73,23 +72,23 @@ export const getWfoTableStyles = ({ theme, isDarkThemeActive }: WfoTheme) => {
|
|
|
73
72
|
height: TABLE_ROW_HEIGHT,
|
|
74
73
|
borderStyle: 'solid',
|
|
75
74
|
borderWidth: '0 0 1px 0',
|
|
76
|
-
borderColor: theme.colors.
|
|
75
|
+
borderColor: theme.colors.borderBaseSubdued,
|
|
77
76
|
position: 'relative',
|
|
78
77
|
});
|
|
79
78
|
|
|
80
79
|
const dataRowStyle = css({
|
|
81
80
|
'&:hover': {
|
|
82
|
-
backgroundColor: theme.colors.
|
|
81
|
+
backgroundColor: theme.colors.backgroundBasePlain,
|
|
83
82
|
},
|
|
84
83
|
});
|
|
85
84
|
|
|
86
85
|
const expandedRowStyle = css({
|
|
87
|
-
backgroundColor: theme.colors.
|
|
86
|
+
backgroundColor: theme.colors.backgroundBaseSubdued,
|
|
88
87
|
});
|
|
89
88
|
|
|
90
89
|
const sortableHeaderCellStyle = css({
|
|
91
90
|
paddingRight: 0,
|
|
92
|
-
|
|
91
|
+
[`&:hover`]: {
|
|
93
92
|
[`.${SORTABLE_ICON_CLASS}`]: {
|
|
94
93
|
visibility: 'visible',
|
|
95
94
|
},
|
|
@@ -142,8 +141,8 @@ export const getWfoTableStyles = ({ theme, isDarkThemeActive }: WfoTheme) => {
|
|
|
142
141
|
zIndex: theme.levels.menu,
|
|
143
142
|
'&:active, &:focus': {
|
|
144
143
|
transition: 'background-color 0.15s',
|
|
145
|
-
backgroundColor:
|
|
146
|
-
? theme.colors.
|
|
144
|
+
backgroundColor: isDarkModeActive
|
|
145
|
+
? theme.colors.textHeading
|
|
147
146
|
: theme.colors.header,
|
|
148
147
|
},
|
|
149
148
|
'&::after': {
|
|
@@ -151,7 +150,7 @@ export const getWfoTableStyles = ({ theme, isDarkThemeActive }: WfoTheme) => {
|
|
|
151
150
|
paddingTop: theme.base - (theme.base / 16) * 2,
|
|
152
151
|
content: `"|"`, // Inserts a vertical line
|
|
153
152
|
fontSize: theme.size.m,
|
|
154
|
-
color: theme.colors.
|
|
153
|
+
color: theme.colors.backgroundBaseAccent,
|
|
155
154
|
cursor: 'col-resize',
|
|
156
155
|
opacity: 0.6,
|
|
157
156
|
zIndex: theme.levels.navigation,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
import { LocalColumnWidths, Pagination, TableColumnKeys } from '@/components';
|
|
2
4
|
import { SortOrder } from '@/types';
|
|
3
5
|
import { toObjectWithSortedKeys } from '@/utils';
|
|
4
6
|
|
|
@@ -93,3 +95,29 @@ export const getColumnWidthsFromConfig = <T extends object>(
|
|
|
93
95
|
return columnWidths;
|
|
94
96
|
}, {} as LocalColumnWidths);
|
|
95
97
|
};
|
|
98
|
+
|
|
99
|
+
export const usePageIndexBoundsGuard = ({
|
|
100
|
+
dataLength,
|
|
101
|
+
isLoading,
|
|
102
|
+
pagination,
|
|
103
|
+
}: {
|
|
104
|
+
dataLength: number;
|
|
105
|
+
isLoading: boolean;
|
|
106
|
+
pagination?: Pagination;
|
|
107
|
+
}) => {
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (!pagination) return;
|
|
110
|
+
|
|
111
|
+
const { pageIndex, pageSize, totalItemCount, onChangePage } =
|
|
112
|
+
pagination;
|
|
113
|
+
|
|
114
|
+
const maxPage = Math.max(
|
|
115
|
+
0,
|
|
116
|
+
Math.floor(((totalItemCount ?? 1) - 1) / pageSize),
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
if (!isLoading && dataLength === 0 && pageIndex > maxPage) {
|
|
120
|
+
onChangePage?.(maxPage);
|
|
121
|
+
}
|
|
122
|
+
}, [dataLength, isLoading, pagination]);
|
|
123
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
import { getFormFieldsBaseStyle } from '@/theme';
|
|
5
5
|
|
|
6
|
-
export const getWfoTableSettingsModalStyles = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const {
|
|
6
|
+
export const getWfoTableSettingsModalStyles = (
|
|
7
|
+
wfoThemeHelpers: WfoThemeHelpers,
|
|
8
|
+
) => {
|
|
9
|
+
const { formFieldBaseStyle } = getFormFieldsBaseStyle(wfoThemeHelpers);
|
|
10
10
|
|
|
11
11
|
const formRowStyle = css({
|
|
12
12
|
justifyContent: 'space-between',
|
|
13
13
|
'.euiFormLabel': {
|
|
14
|
-
color: theme.colors.
|
|
14
|
+
color: wfoThemeHelpers.theme.colors.textParagraph,
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
|
|
5
|
-
export const getStyles = ({ theme }:
|
|
5
|
+
export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
6
6
|
const tableCodeBlockMarginStyle = css({
|
|
7
7
|
margin: theme.size.base,
|
|
8
8
|
marginTop: theme.size.l,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
|
|
5
|
-
export const getStyles = ({ theme }:
|
|
5
|
+
export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
6
6
|
const textAnchorStyle = css({
|
|
7
7
|
marginTop: theme.size.xxs,
|
|
8
8
|
marginLeft: 0,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
import { StepStatus } from '@/types';
|
|
5
5
|
|
|
6
6
|
import { TimelinePosition } from './WfoTimeline';
|
|
7
7
|
|
|
8
|
-
export const getTimelineStyles = ({ theme }:
|
|
8
|
+
export const getTimelineStyles = ({ theme }: WfoThemeHelpers) => {
|
|
9
9
|
const TIMELINE_HEIGHT = theme.base * 2.5;
|
|
10
10
|
const TIMELINE_OUTLINE_WIDTH = theme.base * 0.75;
|
|
11
11
|
|
|
@@ -30,7 +30,7 @@ export const getTimelineStyles = ({ theme }: WfoTheme) => {
|
|
|
30
30
|
case StepStatus.RUNNING:
|
|
31
31
|
case StepStatus.PENDING:
|
|
32
32
|
default:
|
|
33
|
-
return theme.colors.
|
|
33
|
+
return theme.colors.textDisabled;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -44,9 +44,9 @@ export const getTimelineStyles = ({ theme }: WfoTheme) => {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
const timelinePanelStyle = css({
|
|
47
|
-
backgroundColor: theme.colors.
|
|
47
|
+
backgroundColor: theme.colors.backgroundBaseSubdued,
|
|
48
48
|
borderRadius: theme.border.radius.medium,
|
|
49
|
-
outline: `${timelineOutlineWidthPx} solid ${theme.colors.
|
|
49
|
+
outline: `${timelineOutlineWidthPx} solid ${theme.colors.backgroundBaseNeutral}`,
|
|
50
50
|
height: timelineHeightPx,
|
|
51
51
|
marginTop: timelineOutlineWidthPx,
|
|
52
52
|
marginBottom: timelineOutlineWidthPx,
|
|
@@ -90,7 +90,7 @@ export const getTimelineStyles = ({ theme }: WfoTheme) => {
|
|
|
90
90
|
return theme.colors.primary;
|
|
91
91
|
case TimelinePosition.FUTURE:
|
|
92
92
|
default:
|
|
93
|
-
return theme.colors.
|
|
93
|
+
return theme.colors.borderBaseSubdued;
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
|
|
@@ -101,7 +101,7 @@ export const getTimelineStyles = ({ theme }: WfoTheme) => {
|
|
|
101
101
|
case TimelinePosition.CURRENT:
|
|
102
102
|
case TimelinePosition.FUTURE:
|
|
103
103
|
default:
|
|
104
|
-
return theme.colors.
|
|
104
|
+
return theme.colors.borderBaseSubdued;
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
|
|
@@ -129,7 +129,7 @@ export const getTimelineStyles = ({ theme }: WfoTheme) => {
|
|
|
129
129
|
justifyContent: 'center',
|
|
130
130
|
alignItems: 'center',
|
|
131
131
|
borderRadius: '50%',
|
|
132
|
-
backgroundColor: theme.colors.
|
|
132
|
+
backgroundColor: theme.colors.backgroundBaseNeutral,
|
|
133
133
|
height: hasContent
|
|
134
134
|
? stepWithValueOuterDiameter
|
|
135
135
|
: emptyStepOuterDiameter,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WfoThemeHelpers } from '@/hooks';
|
|
2
2
|
|
|
3
|
-
export const getStyles = (
|
|
4
|
-
const { theme, toSecondaryColor } = wfoTheme;
|
|
3
|
+
export const getStyles = ({ theme, toSecondaryColor }: WfoThemeHelpers) => {
|
|
5
4
|
const expandIconContainerStyle = {
|
|
6
5
|
cursor: 'pointer',
|
|
7
6
|
};
|
|
@@ -25,7 +24,7 @@ export const getStyles = (wfoTheme: WfoTheme) => {
|
|
|
25
24
|
textDecoration: 'underline',
|
|
26
25
|
},
|
|
27
26
|
border: isOutsideCurrentSubscription
|
|
28
|
-
? `1px dashed ${theme.colors.
|
|
27
|
+
? `1px dashed ${theme.colors.borderBaseSubdued}`
|
|
29
28
|
: 'none',
|
|
30
29
|
};
|
|
31
30
|
};
|
|
@@ -34,9 +33,9 @@ export const getStyles = (wfoTheme: WfoTheme) => {
|
|
|
34
33
|
return {
|
|
35
34
|
...treeItemStyle(isOutsideCurrentSubscription),
|
|
36
35
|
backgroundColor: isOutsideCurrentSubscription
|
|
37
|
-
? theme.colors.
|
|
36
|
+
? theme.colors.borderBaseSubdued
|
|
38
37
|
: toSecondaryColor(theme.colors.primary),
|
|
39
|
-
color: theme.colors.
|
|
38
|
+
color: theme.colors.textPrimary,
|
|
40
39
|
};
|
|
41
40
|
};
|
|
42
41
|
|
|
@@ -176,11 +176,15 @@ export const WfoStep = React.forwardRef(
|
|
|
176
176
|
>
|
|
177
177
|
{(isExpanded && (
|
|
178
178
|
<WfoChevronUp
|
|
179
|
-
color={
|
|
179
|
+
color={
|
|
180
|
+
theme.colors.textParagraph
|
|
181
|
+
}
|
|
180
182
|
/>
|
|
181
183
|
)) || (
|
|
182
184
|
<WfoChevronDown
|
|
183
|
-
color={
|
|
185
|
+
color={
|
|
186
|
+
theme.colors.textParagraph
|
|
187
|
+
}
|
|
184
188
|
/>
|
|
185
189
|
)}
|
|
186
190
|
</EuiFlexItem>
|
|
@@ -73,25 +73,28 @@ export const WfoStepStatusIcon = ({
|
|
|
73
73
|
case StepStatus.SUSPEND:
|
|
74
74
|
return [
|
|
75
75
|
stepStateSuspendIconStyle,
|
|
76
|
-
theme.colors.
|
|
76
|
+
theme.colors.textWarning,
|
|
77
77
|
true,
|
|
78
|
-
theme.colors.
|
|
78
|
+
theme.colors.textWarning,
|
|
79
79
|
];
|
|
80
80
|
case StepStatus.PENDING:
|
|
81
|
-
return [
|
|
81
|
+
return [
|
|
82
|
+
stepStatePendingIconStyle,
|
|
83
|
+
theme.colors.backgroundBaseAccent,
|
|
84
|
+
];
|
|
82
85
|
case StepStatus.FAILED:
|
|
83
86
|
return [
|
|
84
87
|
stepStateFailedIconStyle,
|
|
85
|
-
theme.colors.
|
|
88
|
+
theme.colors.textDanger,
|
|
86
89
|
true,
|
|
87
|
-
theme.colors.
|
|
90
|
+
theme.colors.textDanger,
|
|
88
91
|
];
|
|
89
92
|
case StepStatus.SKIPPED:
|
|
90
93
|
return [
|
|
91
94
|
stepStateSuccessIconStyle,
|
|
92
|
-
theme.colors.
|
|
95
|
+
theme.colors.textPrimary,
|
|
93
96
|
true,
|
|
94
|
-
theme.colors.
|
|
97
|
+
theme.colors.backgroundBaseAccent,
|
|
95
98
|
];
|
|
96
99
|
case StepStatus.FORM:
|
|
97
100
|
return [stepStateSuccessIconStyle, theme.colors.link];
|
|
@@ -99,9 +102,9 @@ export const WfoStepStatusIcon = ({
|
|
|
99
102
|
default:
|
|
100
103
|
return [
|
|
101
104
|
stepStateSuccessIconStyle,
|
|
102
|
-
theme.colors.
|
|
105
|
+
theme.colors.textPrimary,
|
|
103
106
|
true,
|
|
104
|
-
theme.colors.
|
|
107
|
+
theme.colors.textSuccess,
|
|
105
108
|
];
|
|
106
109
|
}
|
|
107
110
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
|
|
5
|
-
export const getStyles = ({ theme }:
|
|
5
|
+
export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
6
6
|
const codeBlockStyle = css({
|
|
7
7
|
marginTop: theme.size.m,
|
|
8
8
|
marginBottom: theme.size.l,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
|
|
5
5
|
export const getWorkflowStepsStyles = ({
|
|
6
6
|
theme,
|
|
7
7
|
toSecondaryColor,
|
|
8
|
-
|
|
8
|
+
isDarkModeActive,
|
|
9
|
+
}: WfoThemeHelpers) => {
|
|
9
10
|
const SPACE_BETWEEN_STEPS = theme.base * 1.5;
|
|
10
11
|
|
|
11
12
|
const stepSpacerStyle = css({
|
|
12
|
-
borderLeft: `1px solid ${theme.colors.
|
|
13
|
+
borderLeft: `1px solid ${theme.colors.backgroundBaseAccent}`,
|
|
13
14
|
height: `${SPACE_BETWEEN_STEPS}px`,
|
|
14
15
|
marginLeft: '36px',
|
|
15
16
|
});
|
|
@@ -60,13 +61,15 @@ export const getWorkflowStepsStyles = ({
|
|
|
60
61
|
|
|
61
62
|
const stepDurationStyle = {
|
|
62
63
|
fontSize: theme.size.m,
|
|
63
|
-
color: theme.colors.
|
|
64
|
+
color: theme.colors.textSubdued,
|
|
64
65
|
fontWeight: theme.font.weight.semiBold,
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
const stepStateSuccessIconStyle = css({
|
|
68
69
|
...stepStateIcon,
|
|
69
|
-
backgroundColor:
|
|
70
|
+
backgroundColor: isDarkModeActive
|
|
71
|
+
? toSecondaryColor(theme.colors.link)
|
|
72
|
+
: theme.colors.backgroundLightPrimary,
|
|
70
73
|
});
|
|
71
74
|
|
|
72
75
|
const stepStateSuspendIconStyle = css({
|
|
@@ -76,7 +79,7 @@ export const getWorkflowStepsStyles = ({
|
|
|
76
79
|
|
|
77
80
|
const stepStatePendingIconStyle = css({
|
|
78
81
|
...stepStateIcon,
|
|
79
|
-
backgroundColor: toSecondaryColor(theme.colors.
|
|
82
|
+
backgroundColor: toSecondaryColor(theme.colors.backgroundBaseAccent),
|
|
80
83
|
});
|
|
81
84
|
const stepStateFailedIconStyle = css({
|
|
82
85
|
...stepStateIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '7.2.
|
|
1
|
+
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '7.2.1';
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
tint,
|
|
5
|
-
useEuiTheme,
|
|
6
|
-
} from '@elastic/eui';
|
|
7
|
-
|
|
8
|
-
import { WfoThemeComputed } from '@/theme';
|
|
1
|
+
import { EuiThemeColorMode, shade, tint, useEuiTheme } from '@elastic/eui';
|
|
2
|
+
|
|
3
|
+
import { WfoComputedModifications, WfoComputedTheme } from '@/theme';
|
|
9
4
|
import { ColorModes } from '@/types';
|
|
10
5
|
|
|
11
|
-
export type
|
|
12
|
-
theme:
|
|
6
|
+
export type WfoThemeHelpers = Readonly<{
|
|
7
|
+
theme: WfoComputedTheme;
|
|
13
8
|
multiplyByBaseUnit: (multiplier: number) => number;
|
|
14
9
|
toSecondaryColor: (color: string) => string;
|
|
15
|
-
colorMode:
|
|
16
|
-
|
|
17
|
-
}
|
|
10
|
+
colorMode: EuiThemeColorMode;
|
|
11
|
+
isDarkModeActive: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
export const shadeOrchestratorColor = (color: string) =>
|
|
15
|
+
shade(color, 0.65).toString();
|
|
16
|
+
export const tintOrchestratorColor = (color: string) =>
|
|
17
|
+
tint(color, 0.8).toString();
|
|
18
18
|
|
|
19
|
-
export const useOrchestratorTheme = ():
|
|
20
|
-
const { euiTheme, colorMode } = useEuiTheme<
|
|
21
|
-
const
|
|
19
|
+
export const useOrchestratorTheme = (): WfoThemeHelpers => {
|
|
20
|
+
const { euiTheme, colorMode } = useEuiTheme<WfoComputedModifications>();
|
|
21
|
+
const isDarkModeActive = colorMode === ColorModes.DARK;
|
|
22
22
|
|
|
23
23
|
const baseUnit = euiTheme.base;
|
|
24
24
|
|
|
25
25
|
const multiplyByBaseUnit = (multiplier: number) => baseUnit * multiplier;
|
|
26
26
|
|
|
27
27
|
const toSecondaryColor = (color: string) =>
|
|
28
|
-
|
|
28
|
+
isDarkModeActive
|
|
29
|
+
? shadeOrchestratorColor(color)
|
|
30
|
+
: tintOrchestratorColor(color);
|
|
29
31
|
|
|
30
32
|
return {
|
|
31
33
|
theme: euiTheme,
|
|
32
34
|
multiplyByBaseUnit,
|
|
33
35
|
toSecondaryColor,
|
|
34
36
|
colorMode,
|
|
35
|
-
|
|
37
|
+
isDarkModeActive,
|
|
36
38
|
};
|
|
37
39
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useOrchestratorTheme } from './useOrchestratorTheme';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WfoThemeHelpers } from './useOrchestratorTheme';
|
|
3
3
|
|
|
4
4
|
export function useWithOrchestratorTheme<T>(
|
|
5
|
-
getStylesFunction: (
|
|
5
|
+
getStylesFunction: (wfoThemeHelpers: WfoThemeHelpers) => T,
|
|
6
6
|
) {
|
|
7
|
-
const
|
|
8
|
-
return getStylesFunction(
|
|
7
|
+
const wfoThemeHelpers = useOrchestratorTheme();
|
|
8
|
+
return getStylesFunction(wfoThemeHelpers);
|
|
9
9
|
}
|
|
@@ -230,7 +230,7 @@ export const WfoProcessDetail = ({
|
|
|
230
230
|
<WfoRefresh
|
|
231
231
|
color={
|
|
232
232
|
retryButtonIsDisabled
|
|
233
|
-
? theme.colors.
|
|
233
|
+
? theme.colors.textSubdued
|
|
234
234
|
: theme.colors.link
|
|
235
235
|
}
|
|
236
236
|
/>
|
|
@@ -247,7 +247,7 @@ export const WfoProcessDetail = ({
|
|
|
247
247
|
<WfoXCircleFill
|
|
248
248
|
color={
|
|
249
249
|
abortButtonIsDisabled
|
|
250
|
-
? theme.colors.
|
|
250
|
+
? theme.colors.textSubdued
|
|
251
251
|
: theme.colors.danger
|
|
252
252
|
}
|
|
253
253
|
/>
|
|
@@ -269,7 +269,7 @@ export const WfoProcessDetail = ({
|
|
|
269
269
|
<WfoXCircleFill
|
|
270
270
|
color={
|
|
271
271
|
deleteButtonIsDisabled
|
|
272
|
-
? theme.colors.
|
|
272
|
+
? theme.colors.textSubdued
|
|
273
273
|
: theme.colors.danger
|
|
274
274
|
}
|
|
275
275
|
/>
|