@orchestrator-ui/orchestrator-ui-components 1.38.1 → 2.0.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.
Files changed (97) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/.turbo/turbo-lint.log +5 -2
  3. package/.turbo/turbo-test.log +11 -11
  4. package/CHANGELOG.md +25 -0
  5. package/dist/index.d.ts +252 -170
  6. package/dist/index.js +4355 -3498
  7. package/package.json +1 -1
  8. package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +6 -5
  9. package/src/components/WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx +3 -1
  10. package/src/components/WfoPageTemplate/WfoSidebar/WfoCopyright.tsx +1 -1
  11. package/src/components/WfoProcessList/WfoProcessesList.tsx +52 -51
  12. package/src/components/WfoRadioDropdown/WfoRadioDropdown.tsx +88 -0
  13. package/src/components/WfoRadioDropdown/index.ts +1 -0
  14. package/src/components/WfoStartButton/WfoStartButtonComboBox.tsx +4 -0
  15. package/src/components/WfoStartButton/WfoStartTaskComboBox.tsx +1 -0
  16. package/src/components/WfoStartButton/WfoStartWorkflowComboBox.tsx +1 -0
  17. package/src/components/WfoStartButton/styles.ts +0 -4
  18. package/src/components/WfoSubscription/WfoInSyncField.tsx +13 -9
  19. package/src/components/WfoSubscription/WfoInUseByRelations.tsx +4 -2
  20. package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +76 -29
  21. package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +50 -56
  22. package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +17 -9
  23. package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +29 -160
  24. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionDetailSection.tsx +113 -0
  25. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionFixedInputSection.tsx +28 -0
  26. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionMetadataSection.tsx +29 -0
  27. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionProductInfoSection.tsx +55 -0
  28. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/index.ts +4 -0
  29. package/src/components/WfoSubscription/index.ts +3 -0
  30. package/src/components/WfoSubscription/overrides/index.ts +1 -0
  31. package/src/components/WfoSubscription/styles.ts +4 -1
  32. package/src/components/WfoSubscription/utils/utils.spec.ts +0 -13
  33. package/src/components/WfoSubscription/utils/utils.ts +18 -5
  34. package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +105 -100
  35. package/src/components/WfoTable/{WfoTableWithFilter/WfoTableWithFilter.tsx → WfoAdvancedTable/WfoAdvancedTable.tsx} +65 -123
  36. package/src/components/WfoTable/WfoAdvancedTable/getRowDetailData.tsx +55 -0
  37. package/src/components/WfoTable/WfoAdvancedTable/index.ts +4 -0
  38. package/src/components/WfoTable/WfoAdvancedTable/toSortedTableColumnConfig.ts +12 -0
  39. package/src/components/WfoTable/WfoAdvancedTable/types.ts +23 -0
  40. package/src/components/WfoTable/WfoStatusColorField/WfoStatusColorField.tsx +16 -0
  41. package/src/components/WfoTable/WfoStatusColorField/index.ts +1 -0
  42. package/src/components/WfoTable/WfoStatusColorField/styles.ts +20 -0
  43. package/src/components/WfoTable/WfoTable/WfoExpandedRow.tsx +33 -0
  44. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandableRow.tsx +48 -0
  45. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandedGroupRow.tsx +71 -0
  46. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoGroupedTable.tsx +100 -0
  47. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoGroupedTableGroups.tsx +74 -0
  48. package/src/components/WfoTable/WfoTable/WfoGroupedTable/styles.ts +39 -0
  49. package/src/components/WfoTable/WfoTable/WfoGroupedTable/useGroupedTableConfig.tsx +184 -0
  50. package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.spec.ts +133 -0
  51. package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.ts +41 -0
  52. package/src/components/WfoTable/WfoTable/WfoMultilineCell.tsx +13 -0
  53. package/src/components/WfoTable/WfoTable/WfoTable.tsx +201 -0
  54. package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +112 -0
  55. package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/WfoSortDirectionIcon.tsx +3 -3
  56. package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/WfoTableHeaderCell.tsx +4 -3
  57. package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/index.ts +2 -0
  58. package/src/components/WfoTable/WfoTable/WfoTableHeaderRow.tsx +114 -0
  59. package/src/components/WfoTable/WfoTable/WfoTruncateCell.tsx +23 -0
  60. package/src/components/WfoTable/WfoTable/constants.ts +1 -0
  61. package/src/components/WfoTable/WfoTable/index.ts +14 -0
  62. package/src/components/WfoTable/WfoTable/styles.ts +117 -0
  63. package/src/components/WfoTable/WfoTable/utils.spec.ts +79 -0
  64. package/src/components/WfoTable/WfoTable/utils.ts +78 -0
  65. package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +13 -12
  66. package/src/components/WfoTable/WfoTableWithFilter/index.ts +1 -1
  67. package/src/components/WfoTable/index.ts +4 -5
  68. package/src/components/WfoTable/utils/columns.ts +1 -48
  69. package/src/components/WfoTable/utils/tableUtils.ts +13 -10
  70. package/src/components/WfoTree/WfoTreeBranch.tsx +10 -1
  71. package/src/components/WfoTree/WfoTreeNode.tsx +8 -57
  72. package/src/components/WfoTree/WfoTreeNodeListItem.tsx +65 -0
  73. package/src/components/WfoTree/styles.ts +28 -4
  74. package/src/components/index.ts +1 -0
  75. package/src/configuration/policy-resources.ts +1 -0
  76. package/src/configuration/version.ts +1 -1
  77. package/src/icons/WfoXMarkSmall.tsx +29 -0
  78. package/src/messages/en-GB.json +4 -0
  79. package/src/messages/nl-NL.json +4 -0
  80. package/src/pages/metadata/WfoProductBlocksPage.tsx +42 -59
  81. package/src/pages/metadata/WfoProductsPage.tsx +41 -47
  82. package/src/pages/metadata/WfoResourceTypesPage.tsx +26 -35
  83. package/src/pages/metadata/WfoTasksPage.tsx +35 -33
  84. package/src/pages/metadata/WfoWorkflowsPage.tsx +33 -29
  85. package/src/pages/tasks/WfoTasksListPage.tsx +25 -19
  86. package/src/utils/getObjectKeys.ts +3 -0
  87. package/src/utils/index.ts +5 -3
  88. package/src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx +0 -194
  89. package/src/components/WfoTable/WfoBasicTable/WfoStatusColorField.tsx +0 -21
  90. package/src/components/WfoTable/WfoBasicTable/index.ts +0 -5
  91. package/src/components/WfoTable/WfoDataGridTable/WfoDataGridTable.stories.tsx +0 -136
  92. package/src/components/WfoTable/WfoDataGridTable/WfoDataGridTable.tsx +0 -146
  93. package/src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts +0 -113
  94. package/src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.ts +0 -81
  95. package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts +0 -52
  96. package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.ts +0 -23
  97. /package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/styles.ts +0 -0
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+
3
+ import { useTranslations } from 'next-intl';
4
+
5
+ import { SubscriptionKeyValueBlock, WfoProductStatusBadge } from '@/components';
6
+ import { SubscriptionDetail } from '@/types';
7
+ import { formatDate } from '@/utils';
8
+
9
+ interface WfoSubscriptionProductInfoSectionProps {
10
+ product: SubscriptionDetail['product'];
11
+ }
12
+
13
+ export const WfoSubscriptionProductInfoSection = ({
14
+ product,
15
+ }: WfoSubscriptionProductInfoSectionProps) => {
16
+ const t = useTranslations('subscriptions.detail');
17
+
18
+ const productInfoBlockData = [
19
+ {
20
+ key: t('name'),
21
+ value: product.name,
22
+ },
23
+ {
24
+ key: t('description'),
25
+ value: product.description,
26
+ },
27
+ {
28
+ key: t('productType'),
29
+ value: product.productType,
30
+ },
31
+ {
32
+ key: t('tag'),
33
+ value: product.tag,
34
+ },
35
+ {
36
+ key: t('status'),
37
+ value: <WfoProductStatusBadge status={product.status} />,
38
+ },
39
+ {
40
+ key: t('created'),
41
+ value: formatDate(product.createdAt),
42
+ },
43
+ {
44
+ key: t('endDate'),
45
+ value: formatDate(product.endDate),
46
+ },
47
+ ];
48
+
49
+ return (
50
+ <SubscriptionKeyValueBlock
51
+ title={t('blockTitleProductInfo')}
52
+ keyValues={productInfoBlockData}
53
+ />
54
+ );
55
+ };
@@ -0,0 +1,4 @@
1
+ export * from './WfoSubscriptionDetailSection';
2
+ export * from './WfoSubscriptionFixedInputSection';
3
+ export * from './WfoSubscriptionMetadataSection';
4
+ export * from './WfoSubscriptionProductInfoSection';
@@ -2,6 +2,8 @@ export * from './utils';
2
2
 
3
3
  export * from './overrides';
4
4
 
5
+ export * from './WfoSubscriptionGeneralSections';
6
+
5
7
  export * from './SubscriptionKeyValueBlock';
6
8
  export * from './WfoInSyncField';
7
9
  export * from './WfoProcessesTimeline';
@@ -11,3 +13,4 @@ export * from './WfoSubscriptionActions';
11
13
  export * from './WfoSubscriptionProductBlock';
12
14
  export * from './WfoSubscriptionDetailTree';
13
15
  export * from './WfoSubscriptionGeneral';
16
+ export * from './WfoCustomerDescriptionsField';
@@ -1 +1,2 @@
1
1
  export * from './useSubscriptionDetailValueOverride';
2
+ export * from './useSubscriptionDetailGeneralSectionConfigurationOverride';
@@ -2,7 +2,9 @@ import { css } from '@emotion/react';
2
2
 
3
3
  import { WfoTheme } from '@/hooks';
4
4
 
5
- export const getStyles = ({ theme }: WfoTheme) => {
5
+ export const getSubscriptionDetailStyles = ({ theme }: WfoTheme) => {
6
+ const productBlockTreeWidth = theme.base * 28;
7
+
6
8
  const contentCellStyle = css({
7
9
  padding: (theme.base / 4) * 3,
8
10
  borderBottom: theme.border.thin,
@@ -63,5 +65,6 @@ export const getStyles = ({ theme }: WfoTheme) => {
63
65
  lastContentCellStyle,
64
66
  lastHeaderCellStyle,
65
67
  inUseByRelationDetailsStyle,
68
+ productBlockTreeWidth,
66
69
  };
67
70
  };
@@ -64,19 +64,6 @@ describe('getProductBlockTitle()', () => {
64
64
  );
65
65
  });
66
66
 
67
- it("returns '[title]...' when title field is to long", () => {
68
- const longTitle =
69
- 'title_value title_value title_value title_value title_value';
70
- const valuesWithNameAndLongTitle = [
71
- ...instanceValues,
72
- { field: 'name', value: 'name_value' },
73
- { field: 'title', value: longTitle },
74
- ];
75
- expect(getProductBlockTitle(valuesWithNameAndLongTitle)).toBe(
76
- 'title_value title_value title_value title_val...',
77
- );
78
- });
79
-
80
67
  it('returns empty string when there are no title or name fields', () => {
81
68
  expect(getProductBlockTitle(instanceValues)).toBe('');
82
69
  });
@@ -5,13 +5,12 @@ import { EuiThemeComputed } from '@elastic/eui';
5
5
  import {
6
6
  FieldValue,
7
7
  ProcessStatus,
8
+ SortOrder,
8
9
  SubscriptionAction,
9
10
  SubscriptionDetailProcess,
10
11
  WorkflowTarget,
11
12
  } from '@/types';
12
13
 
13
- const MAX_LABEL_LENGTH = 45;
14
-
15
14
  export enum SubscriptionDetailTab {
16
15
  GENERAL_TAB = 'general',
17
16
  SERVICE_CONFIGURATION_TAB = 'service-configuration',
@@ -41,9 +40,7 @@ export const getProductBlockTitle = (
41
40
  return getFieldFromProductBlockInstanceValues(instanceValues, 'name');
42
41
  }
43
42
 
44
- return title && typeof title === 'string' && title.length > MAX_LABEL_LENGTH
45
- ? `${title.substring(0, MAX_LABEL_LENGTH)}...`
46
- : title;
43
+ return title;
47
44
  };
48
45
 
49
46
  export const flattenArrayProps = (
@@ -130,3 +127,19 @@ export const getLatestTaskDate = (processes: SubscriptionDetailProcess[]) => {
130
127
 
131
128
  return tasks.length > 0 ? tasks[0].startedAt : '';
132
129
  };
130
+
131
+ export const sortProcessesByDate = (
132
+ processList: SubscriptionDetailProcess[],
133
+ sortOrder: SortOrder,
134
+ ) => {
135
+ return [...processList].sort((a, b) => {
136
+ const dateA = new Date(a.startedAt).getTime();
137
+ const dateB = new Date(b.startedAt).getTime();
138
+
139
+ if (sortOrder === SortOrder.ASC) {
140
+ return dateA - dateB; // Ascending order (oldest first)
141
+ } else {
142
+ return dateB - dateA; // Descending order (newest first)
143
+ }
144
+ });
145
+ };
@@ -4,17 +4,22 @@ import { useTranslations } from 'next-intl';
4
4
  import Link from 'next/link';
5
5
  import { useRouter } from 'next/router';
6
6
 
7
- import { Pagination } from '@elastic/eui';
8
-
9
7
  import {
10
8
  FilterQuery,
11
9
  PATH_SUBSCRIPTIONS,
10
+ Pagination,
12
11
  WfoDateTime,
13
12
  WfoInlineJson,
14
13
  WfoInsyncIcon,
15
14
  WfoJsonCodeBlock,
16
15
  WfoSubscriptionStatusBadge,
16
+ getPageIndexChangeHandler,
17
+ getPageSizeChangeHandler,
17
18
  } from '@/components';
19
+ import { WfoAdvancedTable } from '@/components/WfoTable/WfoAdvancedTable';
20
+ import { WfoAdvancedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/types';
21
+ import { ColumnType } from '@/components/WfoTable/WfoTable';
22
+ import { mapSortableAndFilterableValuesToTableColumnConfig } from '@/components/WfoTable/WfoTable/utils';
18
23
  import { DataDisplayParams, useShowToastMessage } from '@/hooks';
19
24
  import {
20
25
  useGetSubscriptionListQuery,
@@ -37,14 +42,10 @@ import {
37
42
  SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY,
38
43
  TableColumnKeys,
39
44
  WfoDataSorting,
40
- WfoTableColumns,
41
- WfoTableWithFilter,
45
+ WfoFirstPartUUID,
42
46
  getDataSortHandler,
43
- getPageChangeHandler,
44
47
  getQueryStringHandler,
45
48
  } from '../WfoTable';
46
- import { WfoFirstPartUUID } from '../WfoTable/WfoFirstPartUUID';
47
- import { mapSortableAndFilterableValuesToTableColumnConfig } from '../WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig';
48
49
  import {
49
50
  SubscriptionListItem,
50
51
  mapGraphQlSubscriptionsResultToPageInfo,
@@ -69,91 +70,88 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
69
70
  setDataDisplayParam,
70
71
  hiddenColumns,
71
72
  }) => {
72
- // TODO: There seems to be a problem showing the product/productName in this list
73
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/262
74
-
75
73
  const router = useRouter();
76
74
  const t = useTranslations('subscriptions.index');
77
75
  const tError = useTranslations('errors');
78
76
  const { showToastMessage } = useShowToastMessage();
79
77
 
80
- const tableColumns: WfoTableColumns<SubscriptionListItem> = {
81
- subscriptionId: {
82
- field: 'subscriptionId',
83
- name: t('id'),
84
- width: '100',
85
- render: (value) => <WfoFirstPartUUID UUID={value} />,
86
- renderDetails: (value) => value,
87
- },
88
- description: {
89
- field: 'description',
90
- name: t('description'),
91
- width: '400',
92
- render: (value, record) => (
93
- <Link href={`/subscriptions/${record.subscriptionId}`}>
94
- {value}
95
- </Link>
96
- ),
97
- },
98
- status: {
99
- field: 'status',
100
- name: t('status'),
101
- width: '110',
102
- render: (value) => <WfoSubscriptionStatusBadge status={value} />,
103
- },
104
- insync: {
105
- field: 'insync',
106
- name: t('insync'),
107
- width: '110',
108
- render: (value) => <WfoInsyncIcon inSync={value} />,
109
- },
110
- productName: {
111
- field: 'productName',
112
- name: t('product'),
113
- },
114
- tag: {
115
- field: 'tag',
116
- name: t('tag'),
117
- width: '100',
118
- },
119
- customerFullname: {
120
- field: 'customerFullname',
121
- name: t('customerFullname'),
122
- width: '150',
123
- },
124
- customerShortcode: {
125
- field: 'customerShortcode',
126
- name: t('customerShortcode'),
127
- width: '150',
128
- },
129
- startDate: {
130
- field: 'startDate',
131
- name: t('startDate'),
132
- width: '150',
133
- render: (value) => <WfoDateTime dateOrIsoString={value} />,
134
- renderDetails: parseDateToLocaleDateTimeString,
135
- clipboardText: parseDateToLocaleDateTimeString,
136
- },
137
- endDate: {
138
- field: 'endDate',
139
- name: t('endDate'),
140
- width: '150',
141
- render: (value) => <WfoDateTime dateOrIsoString={value} />,
142
- renderDetails: parseDateToLocaleDateTimeString,
143
- clipboardText: parseDateToLocaleDateTimeString,
144
- },
145
- note: {
146
- field: 'note',
147
- name: t('note'),
148
- },
149
- metadata: {
150
- field: 'metadata',
151
- name: t('metadata'),
152
- render: (value) => <WfoInlineJson data={value} />,
153
- renderDetails: (value) =>
154
- value && <WfoJsonCodeBlock data={value} isBasicStyle />,
155
- },
156
- };
78
+ const tableColumnConfig: WfoAdvancedTableColumnConfig<SubscriptionListItem> =
79
+ {
80
+ subscriptionId: {
81
+ columnType: ColumnType.DATA,
82
+ label: t('id'),
83
+ renderData: (value) => <WfoFirstPartUUID UUID={value} />,
84
+ renderDetails: (value) => value,
85
+ },
86
+ description: {
87
+ columnType: ColumnType.DATA,
88
+ label: t('description'),
89
+ width: '400px',
90
+ renderData: (value, record) => (
91
+ <Link href={`/subscriptions/${record.subscriptionId}`}>
92
+ {value}
93
+ </Link>
94
+ ),
95
+ },
96
+ status: {
97
+ columnType: ColumnType.DATA,
98
+ label: t('status'),
99
+ renderData: (value) => (
100
+ <WfoSubscriptionStatusBadge status={value} />
101
+ ),
102
+ },
103
+ insync: {
104
+ columnType: ColumnType.DATA,
105
+ label: t('insync'),
106
+ renderData: (value) => <WfoInsyncIcon inSync={value} />,
107
+ },
108
+ productName: {
109
+ columnType: ColumnType.DATA,
110
+ label: t('product'),
111
+ },
112
+ tag: {
113
+ columnType: ColumnType.DATA,
114
+ label: t('tag'),
115
+ width: '100px',
116
+ },
117
+ customerFullname: {
118
+ columnType: ColumnType.DATA,
119
+ label: t('customerFullname'),
120
+ width: '150px',
121
+ },
122
+ customerShortcode: {
123
+ columnType: ColumnType.DATA,
124
+ label: t('customerShortcode'),
125
+ width: '150px',
126
+ },
127
+ startDate: {
128
+ columnType: ColumnType.DATA,
129
+ label: t('startDate'),
130
+ renderData: (value) => <WfoDateTime dateOrIsoString={value} />,
131
+ renderDetails: parseDateToLocaleDateTimeString,
132
+ clipboardText: parseDateToLocaleDateTimeString,
133
+ },
134
+ endDate: {
135
+ columnType: ColumnType.DATA,
136
+ label: t('endDate'),
137
+ renderData: (value) => <WfoDateTime dateOrIsoString={value} />,
138
+ renderDetails: parseDateToLocaleDateTimeString,
139
+ clipboardText: parseDateToLocaleDateTimeString,
140
+ },
141
+ note: {
142
+ columnType: ColumnType.DATA,
143
+ label: t('note'),
144
+ width: '100px',
145
+ },
146
+ metadata: {
147
+ columnType: ColumnType.DATA,
148
+ label: t('metadata'),
149
+ width: '100px',
150
+ renderData: (value) => <WfoInlineJson data={value} />,
151
+ renderDetails: (value) =>
152
+ value && <WfoJsonCodeBlock data={value} isBasicStyle />,
153
+ },
154
+ };
157
155
 
158
156
  const { sortBy, queryString, pageIndex, pageSize } = dataDisplayParams;
159
157
 
@@ -175,7 +173,10 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
175
173
  getQueryVariablesForExport(graphqlQueryVariables),
176
174
  ).unwrap();
177
175
 
178
- const sortedColumnId = getTypedFieldFromObject(sortBy?.field, tableColumns);
176
+ const sortedColumnId = getTypedFieldFromObject(
177
+ sortBy?.field,
178
+ tableColumnConfig,
179
+ );
179
180
  if (!sortedColumnId) {
180
181
  router.replace(PATH_SUBSCRIPTIONS);
181
182
  return null;
@@ -186,15 +187,22 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
186
187
  sortOrder: dataDisplayParams.sortBy?.order ?? SortOrder.ASC,
187
188
  };
188
189
  const { totalItems, sortFields, filterFields } = data?.pageInfo ?? {};
190
+
189
191
  const pagination: Pagination = {
190
- pageSize: dataDisplayParams.pageSize,
191
192
  pageIndex: dataDisplayParams.pageIndex,
193
+ pageSize: dataDisplayParams.pageSize,
192
194
  pageSizeOptions: DEFAULT_PAGE_SIZES,
193
195
  totalItemCount: totalItems ?? 0,
196
+ onChangePage:
197
+ getPageIndexChangeHandler<SubscriptionListItem>(
198
+ setDataDisplayParam,
199
+ ),
200
+ onChangeItemsPerPage:
201
+ getPageSizeChangeHandler<SubscriptionListItem>(setDataDisplayParam),
194
202
  };
195
203
 
196
204
  return (
197
- <WfoTableWithFilter<SubscriptionListItem>
205
+ <WfoAdvancedTable
198
206
  queryString={dataDisplayParams.queryString}
199
207
  onUpdateQueryString={getQueryStringHandler<SubscriptionListItem>(
200
208
  setDataDisplayParam,
@@ -204,29 +212,26 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
204
212
  ? mapGraphQlSubscriptionsResultToSubscriptionListItems(data)
205
213
  : []
206
214
  }
207
- tableColumns={mapSortableAndFilterableValuesToTableColumnConfig(
208
- tableColumns,
215
+ tableColumnConfig={mapSortableAndFilterableValuesToTableColumnConfig(
216
+ tableColumnConfig,
209
217
  sortFields,
210
218
  filterFields,
211
219
  )}
212
220
  defaultHiddenColumns={hiddenColumns}
213
- dataSorting={dataSorting}
214
- pagination={pagination}
221
+ dataSorting={[dataSorting]}
215
222
  isLoading={isFetching}
216
223
  localStorageKey={SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY}
217
224
  detailModalTitle={'Details - Subscription'}
218
- onUpdatePage={getPageChangeHandler<SubscriptionListItem>(
219
- setDataDisplayParam,
220
- )}
221
- onUpdateDataSort={getDataSortHandler<SubscriptionListItem>(
225
+ pagination={pagination}
226
+ error={mapRtkErrorToWfoError(error)}
227
+ onUpdateDataSorting={getDataSortHandler<SubscriptionListItem>(
222
228
  setDataDisplayParam,
223
229
  )}
224
- error={mapRtkErrorToWfoError(error)}
225
230
  onExportData={csvDownloadHandler(
226
231
  getSubscriptionListForExport,
227
232
  mapGraphQlSubscriptionsResultToSubscriptionListItems,
228
233
  mapGraphQlSubscriptionsResultToPageInfo,
229
- Object.keys(tableColumns),
234
+ Object.keys(tableColumnConfig),
230
235
  getCsvFileNameWithDate('Subscriptions'),
231
236
  showToastMessage,
232
237
  tError,