@orchestrator-ui/orchestrator-ui-components 7.1.1 → 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.
Files changed (126) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-lint.log +5 -2
  3. package/.turbo/turbo-test.log +6 -6
  4. package/CHANGELOG.md +13 -0
  5. package/dist/index.d.ts +2892 -24
  6. package/dist/index.js +2929 -2478
  7. package/dist/index.js.map +1 -1
  8. package/package.json +5 -4
  9. package/src/components/WfoAgent/ExportButton/styles.ts +9 -9
  10. package/src/components/WfoAgent/ToolProgress/SetFilterTreeDisplay.styles.ts +5 -5
  11. package/src/components/WfoAgent/ToolProgress/styles.ts +7 -7
  12. package/src/components/WfoAgent/WfoAgentChart/WfoAgentLineChart.tsx +2 -2
  13. package/src/components/WfoAgent/WfoAgentChart/WfoAgentPieChart.tsx +2 -2
  14. package/src/components/WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.tsx +2 -2
  15. package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +21 -29
  16. package/src/components/WfoBadges/WfoProcessStatusBadge/WfoProcessStatusBadge.tsx +12 -12
  17. package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +12 -12
  18. package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.tsx +8 -8
  19. package/src/components/WfoBadges/WfoScheduledTasksBadges/WfoScheduledTasksBadges.tsx +38 -0
  20. package/src/components/WfoBadges/WfoScheduledTasksBadges/WfoScheduledTasksBadgesContainer.tsx +27 -0
  21. package/src/components/WfoBadges/WfoScheduledTasksBadges/index.ts +2 -0
  22. package/src/components/WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx +8 -8
  23. package/src/components/WfoBadges/WfoSubscriptionSyncStatusBadge/WfoSubscriptionSyncStatusBadge.tsx +5 -4
  24. package/src/components/WfoBadges/WfoWebsocketStatusBadge/styles.ts +5 -3
  25. package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +14 -13
  26. package/src/components/WfoBadges/index.ts +1 -0
  27. package/src/components/WfoButtonComboBox/styles.ts +6 -6
  28. package/src/components/WfoDiff/styles.ts +6 -6
  29. package/src/components/WfoError/WfoError.tsx +1 -1
  30. package/src/components/WfoExpandableField/styles.ts +2 -2
  31. package/src/components/WfoFilterTabs/styles.ts +2 -2
  32. package/src/components/WfoJsonCodeBlock/styles.ts +2 -2
  33. package/src/components/WfoKeyValueTable/WfoValueCell.tsx +1 -1
  34. package/src/components/WfoKeyValueTable/styles.ts +6 -6
  35. package/src/components/WfoLogoSpinner/styles.ts +6 -0
  36. package/src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx +7 -7
  37. package/src/components/WfoMonacoCodeBlock/styles.ts +5 -3
  38. package/src/components/WfoNoResults/styles.ts +3 -3
  39. package/src/components/WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx +1 -1
  40. package/src/components/WfoPageTemplate/WfoPageHeader/WfoHamburgerMenu.tsx +3 -7
  41. package/src/components/WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx +6 -6
  42. package/src/components/WfoPageTemplate/WfoPageHeader/styles.ts +3 -3
  43. package/src/components/WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx +56 -8
  44. package/src/components/WfoPageTemplate/WfoPageTemplate/styles.ts +4 -4
  45. package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +19 -0
  46. package/src/components/WfoPageTemplate/WfoSidebar/styles.ts +26 -24
  47. package/src/components/WfoPageTemplate/paths.ts +1 -0
  48. package/src/components/WfoPydanticForm/Footer.tsx +5 -5
  49. package/src/components/WfoPydanticForm/fields/WfoArrayField/WfoArrayField.tsx +4 -3
  50. package/src/components/WfoPydanticForm/fields/WfoArrayField/styles.ts +4 -2
  51. package/src/components/WfoPydanticForm/fields/WfoInteger.tsx +5 -5
  52. package/src/components/WfoPydanticForm/fields/WfoLabel.tsx +1 -1
  53. package/src/components/WfoPydanticForm/fields/WfoReactSelect/styles.ts +36 -13
  54. package/src/components/WfoPydanticForm/fields/styles.ts +8 -8
  55. package/src/components/WfoSearchPage/WfoConditionRow/WfoPathChips.tsx +1 -1
  56. package/src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx +8 -5
  57. package/src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx +1 -1
  58. package/src/components/WfoSettings/styles.ts +5 -6
  59. package/src/components/WfoStartButton/WfoStartButtonComboBox.tsx +4 -7
  60. package/src/components/WfoStartButton/styles.ts +6 -6
  61. package/src/components/WfoSubscription/WfoSubscriptionActions/styles.ts +3 -3
  62. package/src/components/WfoSubscription/WfoSubscriptionProductBlock/styles.ts +8 -9
  63. package/src/components/WfoSubscription/WfoTargetTypeIcon.tsx +4 -2
  64. package/src/components/WfoSubscription/styles.ts +9 -4
  65. package/src/components/WfoSubscription/utils/utils.spec.ts +8 -8
  66. package/src/components/WfoSubscription/utils/utils.ts +4 -4
  67. package/src/components/WfoSummary/WfoSummaryCardHeader/WfoSummaryCardHeader.tsx +5 -1
  68. package/src/components/WfoSummary/WfoSummaryCardHeader/styles.ts +2 -2
  69. package/src/components/WfoSummary/WfoSummaryCardList/WfoSummaryCardListItem.tsx +3 -1
  70. package/src/components/WfoSummary/WfoSummaryCardList/styles.ts +4 -3
  71. package/src/components/WfoSummary/styles.ts +2 -2
  72. package/src/components/WfoTable/WfoAdvancedTable/WfoAdvancedTable.tsx +17 -11
  73. package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +1 -1
  74. package/src/components/WfoTable/WfoFirstPartUUID/styles.ts +2 -2
  75. package/src/components/WfoTable/WfoSortButtons/WfoSortButton.tsx +5 -1
  76. package/src/components/WfoTable/WfoStatusColorField/styles.ts +2 -2
  77. package/src/components/WfoTable/WfoTable/WfoGroupedTable/styles.ts +3 -3
  78. package/src/components/WfoTable/WfoTable/WfoTable.tsx +9 -3
  79. package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/WfoSortDirectionIcon.tsx +3 -3
  80. package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/styles.ts +10 -10
  81. package/src/components/WfoTable/WfoTable/styles.ts +13 -14
  82. package/src/components/WfoTable/WfoTable/utils.ts +29 -1
  83. package/src/components/WfoTable/WfoTableSettingsModal/styles.ts +6 -6
  84. package/src/components/WfoTable/utils/constants.ts +1 -0
  85. package/src/components/WfoTable/utils/tableUtils.ts +0 -1
  86. package/src/components/WfoTableCodeBlock/styles.ts +2 -2
  87. package/src/components/WfoTextAnchor/styles.ts +2 -2
  88. package/src/components/WfoTimeline/styles.ts +8 -8
  89. package/src/components/WfoTree/styles.ts +5 -6
  90. package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +6 -2
  91. package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +12 -9
  92. package/src/components/WfoWorkflowSteps/WfoTraceback/styles.ts +2 -2
  93. package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx +1 -1
  94. package/src/components/WfoWorkflowSteps/styles.ts +9 -6
  95. package/src/components/confirmationDialog/WfoConfirmationDialog.tsx +1 -1
  96. package/src/configuration/constants.ts +1 -0
  97. package/src/configuration/version.ts +1 -1
  98. package/src/hooks/index.ts +2 -0
  99. package/src/hooks/useGetSchedulesForWorkflow.tsx +30 -0
  100. package/src/hooks/useGetWorkflowNameById.tsx +23 -0
  101. package/src/hooks/useOrchestratorTheme.ts +20 -18
  102. package/src/hooks/useWithOrchestratorTheme.ts +4 -4
  103. package/src/icons/heroicons/WfoScheduledTaskOnce.tsx +32 -0
  104. package/src/icons/heroicons/WfoScheduledTaskRecurring.tsx +32 -0
  105. package/src/icons/heroicons/index.ts +2 -0
  106. package/src/messages/en-GB.json +11 -1
  107. package/src/messages/nl-NL.json +10 -1
  108. package/src/pages/metadata/WfoMetadataPageLayout.tsx +6 -1
  109. package/src/pages/metadata/WfoScheduledTasksPage.tsx +223 -0
  110. package/src/pages/metadata/WfoTasksPage.tsx +20 -3
  111. package/src/pages/metadata/index.ts +1 -0
  112. package/src/pages/metadata/taskListObjectMapper.ts +3 -0
  113. package/src/pages/processes/WfoProcessDetail.tsx +3 -3
  114. package/src/pages/processes/WfoProcessListSubscriptionsCell.tsx +1 -1
  115. package/src/pages/processes/WfoProductInformationWithLink.tsx +1 -1
  116. package/src/pages/processes/WfoStartProcessPage.tsx +6 -1
  117. package/src/pages/settings/WfoSettingsPage.tsx +2 -1
  118. package/src/pages/tasks/WfoTasksListPage.tsx +1 -1
  119. package/src/rtk/endpoints/metadata/index.ts +1 -0
  120. package/src/rtk/endpoints/metadata/scheduledTasks.ts +66 -0
  121. package/src/rtk/endpoints/metadata/tasks.ts +1 -1
  122. package/src/theme/baseStyles/formFieldsBaseStyle.ts +8 -6
  123. package/src/theme/index.ts +1 -1
  124. package/src/theme/wfoThemeModifications.ts +117 -0
  125. package/src/types/types.ts +18 -3
  126. package/src/theme/defaultOrchestratorTheme.ts +0 -129
@@ -103,27 +103,27 @@ describe('flattenArrayProps', () => {
103
103
  });
104
104
 
105
105
  describe('getWorkflowTargetColor', () => {
106
- it('should return successText color for CREATE', () => {
106
+ it('should return textSuccess color for CREATE', () => {
107
107
  const theme = {
108
108
  colors: {
109
- successText: 'successTextColor',
109
+ textSuccess: 'textSuccessColor',
110
110
  },
111
111
  } as EuiThemeComputed;
112
112
 
113
113
  expect(getWorkflowTargetColor(WorkflowTarget.CREATE, theme)).toBe(
114
- 'successTextColor',
114
+ 'textSuccessColor',
115
115
  );
116
116
  });
117
117
 
118
- it('should return primaryText color for MODIFY', () => {
118
+ it('should return textPrimary color for MODIFY', () => {
119
119
  const theme = {
120
120
  colors: {
121
- primaryText: 'primaryTextColor',
121
+ textPrimary: 'textPrimaryColor',
122
122
  },
123
123
  } as EuiThemeComputed;
124
124
 
125
125
  expect(getWorkflowTargetColor(WorkflowTarget.MODIFY, theme)).toBe(
126
- 'primaryTextColor',
126
+ 'textPrimaryColor',
127
127
  );
128
128
  });
129
129
 
@@ -154,14 +154,14 @@ describe('getWorkflowTargetColor', () => {
154
154
  it('should return body color for unknown targets', () => {
155
155
  const theme = {
156
156
  colors: {
157
- body: 'bodyColor',
157
+ backgroundBaseDisabled: 'gray',
158
158
  },
159
159
  } as EuiThemeComputed;
160
160
 
161
161
  // Test with an unknown target
162
162
  expect(
163
163
  getWorkflowTargetColor('UNKNOWN_TARGET' as WorkflowTarget, theme),
164
- ).toBe('bodyColor');
164
+ ).toBe('gray');
165
165
  });
166
166
  });
167
167
 
@@ -68,9 +68,9 @@ export const getWorkflowTargetColor = (
68
68
  // Data returned from graphql can't always be depended on to be lowercase
69
69
  switch (workflowTarget.toLocaleLowerCase()) {
70
70
  case WorkflowTarget.CREATE:
71
- return theme.colors.successText;
71
+ return theme.colors.textSuccess;
72
72
  case WorkflowTarget.MODIFY:
73
- return theme.colors.primaryText;
73
+ return theme.colors.textPrimary;
74
74
  case WorkflowTarget.SYSTEM:
75
75
  case WorkflowTarget.VALIDATE:
76
76
  return theme.colors.warning;
@@ -78,9 +78,9 @@ export const getWorkflowTargetColor = (
78
78
  return theme.colors.accent;
79
79
  case WorkflowTarget.TERMINATE:
80
80
  return theme.colors.danger;
81
+ default:
82
+ return theme.colors.backgroundBaseDisabled;
81
83
  }
82
-
83
- return theme.colors.body;
84
84
  };
85
85
 
86
86
  export const getWorkflowTargetIconContent = (
@@ -35,7 +35,11 @@ export const WfoSummaryCardHeader: FC<WfoSummaryCardHeaderProps> = ({
35
35
 
36
36
  return (
37
37
  <EuiFlexItem grow={0}>
38
- <EuiPanel hasShadow={false} color="subdued" paddingSize="l">
38
+ <EuiPanel
39
+ hasShadow={false}
40
+ css={{ backgroundColor: theme.colors.backgroundBaseSubdued }}
41
+ paddingSize="l"
42
+ >
39
43
  <EuiFlexGroup alignItems="center">
40
44
  <EuiAvatar
41
45
  iconSize="l"
@@ -1,8 +1,8 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
- import { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
- export const getWfoSummaryCardHeaderStyles = ({ theme }: WfoTheme) => {
5
+ export const getWfoSummaryCardHeaderStyles = ({ theme }: WfoThemeHelpers) => {
6
6
  const avatarStyle = css({
7
7
  maxHeight: theme.base * 3,
8
8
  maxWidth: theme.base * 3,
@@ -37,7 +37,9 @@ export const WfoSummaryCardListItem: FC<WfoSummaryCardListItemProps> = ({
37
37
  <EuiFlexGroup css={listItemContainerStyle} gutterSize="none">
38
38
  <EuiFlexItem>
39
39
  <EuiTextColor
40
- color={url ? theme.colors.link : theme.colors.title}
40
+ color={
41
+ url ? theme.colors.link : theme.colors.textHeading
42
+ }
41
43
  css={listItemTitleStyle}
42
44
  >
43
45
  {title}
@@ -1,14 +1,15 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
- import { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
- export const getWfoSummaryCardListStyles = ({ theme }: WfoTheme) => {
5
+ export const getWfoSummaryCardListStyles = ({ theme }: WfoThemeHelpers) => {
6
6
  const listContainerStyle = css({
7
7
  display: 'flex',
8
8
  flexDirection: 'column',
9
9
  justifyContent: 'space-between',
10
10
  flexGrow: 1,
11
- borderColor: theme.colors.lightShade,
11
+ borderColor: theme.colors.borderBaseSubdued,
12
+ backgroundColor: theme.colors.backgroundBaseNeutral,
12
13
  });
13
14
 
14
15
  const listHeaderStyle = css({
@@ -1,8 +1,8 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
- import { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
- export const getWfoSummaryCardsStyles = ({ theme }: WfoTheme) => {
5
+ export const getWfoSummaryCardsStyles = ({ theme }: WfoThemeHelpers) => {
6
6
  const cardContainerStyle = css({
7
7
  height: theme.base * 36,
8
8
  minWidth: theme.base * 25,
@@ -50,6 +50,7 @@ export type WfoAdvancedTableProps<T extends object> = Omit<
50
50
  error?: WfoGraphqlError[];
51
51
  onUpdateQueryString: (queryString: string) => void;
52
52
  onExportData?: () => void;
53
+ disableSearch?: boolean;
53
54
  };
54
55
 
55
56
  export const WfoAdvancedTable = <T extends object>({
@@ -63,6 +64,7 @@ export const WfoAdvancedTable = <T extends object>({
63
64
  error,
64
65
  onUpdateQueryString,
65
66
  onExportData,
67
+ disableSearch = false,
66
68
  ...tableProps
67
69
  }: WfoAdvancedTableProps<T>) => {
68
70
  const { theme } = useOrchestratorTheme();
@@ -92,7 +94,7 @@ export const WfoAdvancedTable = <T extends object>({
92
94
  css={{ cursor: 'pointer' }}
93
95
  onClick={() => setSelectedDataForDetailModal(row)}
94
96
  >
95
- <WfoArrowsExpand color={theme.colors.mediumShade} />
97
+ <WfoArrowsExpand color={theme.colors.borderBasePlain} />
96
98
  </EuiFlexItem>
97
99
  ),
98
100
  },
@@ -159,18 +161,22 @@ export const WfoAdvancedTable = <T extends object>({
159
161
  <>
160
162
  <EuiFlexGroup alignItems="center">
161
163
  <EuiFlexItem>
162
- <WfoSearchField
163
- queryString={queryString}
164
- onUpdateQueryString={onUpdateQueryString}
165
- />
164
+ {!disableSearch && (
165
+ <WfoSearchField
166
+ queryString={queryString}
167
+ onUpdateQueryString={onUpdateQueryString}
168
+ />
169
+ )}
166
170
  </EuiFlexItem>
167
171
  <EuiFlexItem grow={false}>
168
- <EuiButtonIcon
169
- onClick={() => setShowSearchModal(true)}
170
- iconSize={'xl'}
171
- iconType={'iInCircle'}
172
- aria-label={t('searchModalTitle')}
173
- />
172
+ {!disableSearch && (
173
+ <EuiButtonIcon
174
+ onClick={() => setShowSearchModal(true)}
175
+ iconSize={'xl'}
176
+ iconType={'info'}
177
+ aria-label={t('searchModalTitle')}
178
+ />
179
+ )}
174
180
  </EuiFlexItem>
175
181
  <EuiButton onClick={() => setShowSettingsModal(true)}>
176
182
  {t('editColumns')}
@@ -34,7 +34,7 @@ export const WfoFirstPartUUID: FC<WfoFirstUUIDPartProps> = ({
34
34
  <WfoClipboardCopy
35
35
  width={16}
36
36
  height={16}
37
- color={theme.colors.mediumShade}
37
+ color={theme.colors.backgroundBaseDisabled}
38
38
  />
39
39
  </div>
40
40
  )}
@@ -1,10 +1,10 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
- import { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
5
  export const COPY_ICON_CLASS = 'copyIcon';
6
6
 
7
- export const getStyles = ({ theme }: WfoTheme) => {
7
+ export const getStyles = ({ theme }: WfoThemeHelpers) => {
8
8
  const uuidFieldStyle = css({
9
9
  fontWeight: theme.font.weight.medium,
10
10
  display: 'flex',
@@ -24,7 +24,11 @@ export const WfoSortButton: FC<WfoSortButtonProps> = ({
24
24
  onClick={() => isActive && onClick?.()}
25
25
  >
26
26
  <WfoIconComponent
27
- color={isActive ? theme.colors.title : theme.colors.lightShade}
27
+ color={
28
+ isActive
29
+ ? theme.colors.textHeading
30
+ : theme.colors.borderBaseSubdued
31
+ }
28
32
  />
29
33
  </button>
30
34
  );
@@ -2,9 +2,9 @@ import { tint } from '@elastic/eui';
2
2
  import { css } from '@emotion/react';
3
3
 
4
4
  import { TABLE_ROW_HEIGHT } from '@/components';
5
- import { WfoTheme } from '@/hooks';
5
+ import { WfoThemeHelpers } from '@/hooks';
6
6
 
7
- export const getWfoStatusColorFieldStyles = ({ theme }: WfoTheme) => {
7
+ export const getWfoStatusColorFieldStyles = ({ theme }: WfoThemeHelpers) => {
8
8
  const toStatusColorFieldColor = (color: string) => tint(color, 0.3);
9
9
 
10
10
  const getStatusColorFieldStyle = (color: string) =>
@@ -1,8 +1,8 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
- import { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
- export const getWfoGroupedTableStyles = ({ theme }: WfoTheme) => {
5
+ export const getWfoGroupedTableStyles = ({ theme }: WfoThemeHelpers) => {
6
6
  // Matches the default width of a EuiButtonIcon component
7
7
  const expandRowButtonWidth = '24px';
8
8
  const marginBetweenButtonAndGroupLabel = theme.size.m;
@@ -10,7 +10,7 @@ export const getWfoGroupedTableStyles = ({ theme }: WfoTheme) => {
10
10
  const innerTableHeaderStyle = css({
11
11
  fontSize: theme.size.m,
12
12
  textAlign: 'left',
13
- backgroundColor: theme.colors.lightestShade,
13
+ backgroundColor: theme.colors.backgroundBaseSubdued,
14
14
  });
15
15
 
16
16
  const expandableRowContainerStyle = css({
@@ -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 { getColumnWidthsFromConfig, getSortedVisibleColumns } from './utils';
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: data.length,
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
- {data.length === 0 ? (
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.subduedText}
25
+ color={theme.colors.textSubdued}
26
26
  />
27
27
  );
28
28
  }
29
29
 
30
30
  return sortDirection === SortOrder.ASC ? (
31
- <WfoArrowUp color={theme.colors.subduedText} />
31
+ <WfoArrowUp color={theme.colors.textSubdued} />
32
32
  ) : (
33
- <WfoArrowDown color={theme.colors.subduedText} />
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 { WfoTheme } from '@/hooks';
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 }: WfoTheme) => {
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.emptyShade,
15
+ backgroundColor: theme.colors.backgroundBaseNeutral,
16
16
  },
17
17
 
18
18
  // The lines between rows
19
19
  'tr>td': {
20
- borderColor: theme.colors.lightShade,
20
+ borderColor: theme.colors.borderBaseSubdued,
21
21
  },
22
22
 
23
23
  '.euiTableCellContent__text': {
24
24
  display: 'flex',
25
- color: theme.colors.text,
25
+ color: theme.colors.textParagraph,
26
26
  },
27
27
  thead: {
28
- backgroundColor: theme.colors.lightShade,
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.lightestShade,
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.lightestShade,
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.lightestShade,
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.lightestShade,
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 { WfoTheme } from '@/hooks';
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 = ({ theme, isDarkThemeActive }: WfoTheme) => {
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
- position: 'sticky',
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.lightShade,
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.lightestShade,
81
+ backgroundColor: theme.colors.backgroundBasePlain,
83
82
  },
84
83
  });
85
84
 
86
85
  const expandedRowStyle = css({
87
- backgroundColor: theme.colors.lightestShade,
86
+ backgroundColor: theme.colors.backgroundBaseSubdued,
88
87
  });
89
88
 
90
89
  const sortableHeaderCellStyle = css({
91
90
  paddingRight: 0,
92
- '&:hover': {
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: isDarkThemeActive
146
- ? theme.colors.mediumShade
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.mediumShade,
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 { LocalColumnWidths, TableColumnKeys } from '@/components';
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 { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
  import { getFormFieldsBaseStyle } from '@/theme';
5
5
 
6
- export const getWfoTableSettingsModalStyles = (wfoTheme: WfoTheme) => {
7
- const { formFieldBaseStyle } = getFormFieldsBaseStyle(wfoTheme);
8
-
9
- const { theme } = wfoTheme;
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.text,
14
+ color: wfoThemeHelpers.theme.colors.textParagraph,
15
15
  },
16
16
  });
17
17
 
@@ -15,6 +15,7 @@ export const METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY =
15
15
  export const METADATA_PRODUCT_BLOCKS_TABLE_LOCAL_STORAGE_KEY =
16
16
  'metadataProductBlocksTable';
17
17
  export const METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY = 'metadataProductTable';
18
+ export const METADATA_SCHEDULES_LOCAL_STORAGE_KEY = 'metadataScheduleTable';
18
19
  export const METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY =
19
20
  'metadataWorkflowsTable';
20
21
  export const METADATA_TASKS_TABLE_LOCAL_STORAGE_KEY = 'metadataTasksTable';
@@ -64,7 +64,6 @@ export const getQueryStringHandler =
64
64
  ? `${queryString}*`
65
65
  : queryString;
66
66
  setDataDisplayParam('queryString', query);
67
- setDataDisplayParam('pageIndex', 0);
68
67
  };
69
68
 
70
69
  export const getPageCount = (pagination: Pagination) =>
@@ -1,8 +1,8 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
- import { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
- export const getStyles = ({ theme }: WfoTheme) => {
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 { WfoTheme } from '@/hooks';
3
+ import { WfoThemeHelpers } from '@/hooks';
4
4
 
5
- export const getStyles = ({ theme }: WfoTheme) => {
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 { WfoTheme } from '@/hooks';
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 }: WfoTheme) => {
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.mediumShade;
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.body,
47
+ backgroundColor: theme.colors.backgroundBaseSubdued,
48
48
  borderRadius: theme.border.radius.medium,
49
- outline: `${timelineOutlineWidthPx} solid ${theme.colors.emptyShade}`,
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.lightShade;
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.lightShade;
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.emptyShade,
132
+ backgroundColor: theme.colors.backgroundBaseNeutral,
133
133
  height: hasContent
134
134
  ? stepWithValueOuterDiameter
135
135
  : emptyStepOuterDiameter,