@orchestrator-ui/orchestrator-ui-components 1.38.2 → 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.
- package/.turbo/turbo-build.log +7 -7
- package/.turbo/turbo-lint.log +5 -2
- package/.turbo/turbo-test.log +12 -12
- package/CHANGELOG.md +18 -0
- package/dist/index.d.ts +246 -170
- package/dist/index.js +4350 -3504
- package/package.json +1 -1
- package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +6 -5
- package/src/components/WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx +3 -1
- package/src/components/WfoPageTemplate/WfoSidebar/WfoCopyright.tsx +1 -1
- package/src/components/WfoProcessList/WfoProcessesList.tsx +52 -51
- package/src/components/WfoRadioDropdown/WfoRadioDropdown.tsx +88 -0
- package/src/components/WfoRadioDropdown/index.ts +1 -0
- package/src/components/WfoSubscription/WfoInSyncField.tsx +13 -9
- package/src/components/WfoSubscription/WfoInUseByRelations.tsx +4 -2
- package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +76 -29
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +50 -56
- package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +17 -9
- package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +18 -156
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionDetailSection.tsx +113 -0
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionFixedInputSection.tsx +28 -0
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionMetadataSection.tsx +29 -0
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionProductInfoSection.tsx +55 -0
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/index.ts +4 -0
- package/src/components/WfoSubscription/index.ts +3 -0
- package/src/components/WfoSubscription/overrides/index.ts +1 -0
- package/src/components/WfoSubscription/styles.ts +4 -1
- package/src/components/WfoSubscription/utils/utils.spec.ts +0 -13
- package/src/components/WfoSubscription/utils/utils.ts +18 -5
- package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +105 -100
- package/src/components/WfoTable/{WfoTableWithFilter/WfoTableWithFilter.tsx → WfoAdvancedTable/WfoAdvancedTable.tsx} +65 -123
- package/src/components/WfoTable/WfoAdvancedTable/getRowDetailData.tsx +55 -0
- package/src/components/WfoTable/WfoAdvancedTable/index.ts +4 -0
- package/src/components/WfoTable/WfoAdvancedTable/toSortedTableColumnConfig.ts +12 -0
- package/src/components/WfoTable/WfoAdvancedTable/types.ts +23 -0
- package/src/components/WfoTable/WfoStatusColorField/WfoStatusColorField.tsx +16 -0
- package/src/components/WfoTable/WfoStatusColorField/index.ts +1 -0
- package/src/components/WfoTable/WfoStatusColorField/styles.ts +20 -0
- package/src/components/WfoTable/WfoTable/WfoExpandedRow.tsx +33 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandableRow.tsx +48 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandedGroupRow.tsx +71 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoGroupedTable.tsx +100 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoGroupedTableGroups.tsx +74 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/styles.ts +39 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/useGroupedTableConfig.tsx +184 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.spec.ts +133 -0
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.ts +41 -0
- package/src/components/WfoTable/WfoTable/WfoMultilineCell.tsx +13 -0
- package/src/components/WfoTable/WfoTable/WfoTable.tsx +201 -0
- package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +112 -0
- package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/WfoSortDirectionIcon.tsx +3 -3
- package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/WfoTableHeaderCell.tsx +4 -3
- package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/index.ts +2 -0
- package/src/components/WfoTable/WfoTable/WfoTableHeaderRow.tsx +114 -0
- package/src/components/WfoTable/WfoTable/WfoTruncateCell.tsx +23 -0
- package/src/components/WfoTable/WfoTable/constants.ts +1 -0
- package/src/components/WfoTable/WfoTable/index.ts +14 -0
- package/src/components/WfoTable/WfoTable/styles.ts +117 -0
- package/src/components/WfoTable/WfoTable/utils.spec.ts +79 -0
- package/src/components/WfoTable/WfoTable/utils.ts +78 -0
- package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +13 -12
- package/src/components/WfoTable/WfoTableWithFilter/index.ts +1 -1
- package/src/components/WfoTable/index.ts +4 -5
- package/src/components/WfoTable/utils/columns.ts +1 -48
- package/src/components/WfoTable/utils/tableUtils.ts +13 -10
- package/src/components/WfoTree/WfoTreeBranch.tsx +10 -1
- package/src/components/WfoTree/WfoTreeNode.tsx +8 -57
- package/src/components/WfoTree/WfoTreeNodeListItem.tsx +65 -0
- package/src/components/WfoTree/styles.ts +28 -4
- package/src/components/index.ts +1 -0
- package/src/configuration/policy-resources.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/icons/WfoXMarkSmall.tsx +29 -0
- package/src/messages/en-GB.json +4 -0
- package/src/messages/nl-NL.json +4 -0
- package/src/pages/metadata/WfoProductBlocksPage.tsx +42 -59
- package/src/pages/metadata/WfoProductsPage.tsx +41 -47
- package/src/pages/metadata/WfoResourceTypesPage.tsx +26 -35
- package/src/pages/metadata/WfoTasksPage.tsx +35 -33
- package/src/pages/metadata/WfoWorkflowsPage.tsx +33 -29
- package/src/pages/tasks/WfoTasksListPage.tsx +25 -19
- package/src/utils/getObjectKeys.ts +3 -0
- package/src/utils/index.ts +5 -3
- package/src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx +0 -194
- package/src/components/WfoTable/WfoBasicTable/WfoStatusColorField.tsx +0 -21
- package/src/components/WfoTable/WfoBasicTable/index.ts +0 -5
- package/src/components/WfoTable/WfoDataGridTable/WfoDataGridTable.stories.tsx +0 -136
- package/src/components/WfoTable/WfoDataGridTable/WfoDataGridTable.tsx +0 -146
- package/src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts +0 -113
- package/src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.ts +0 -81
- package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts +0 -52
- package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.ts +0 -23
- /package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/styles.ts +0 -0
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { EuiDataGridColumn } from '@elastic/eui';
|
|
4
|
-
import {
|
|
5
|
-
EuiDataGridControlColumn,
|
|
6
|
-
EuiDataGridSorting,
|
|
7
|
-
} from '@elastic/eui/src/components/datagrid/data_grid_types';
|
|
8
|
-
|
|
9
|
-
import { SortOrder } from '../../../types';
|
|
10
|
-
import { TableColumnKeys, WfoDataSorting } from '../utils/columns';
|
|
11
|
-
|
|
12
|
-
export type WfoDataGridTableColumns<T> = {
|
|
13
|
-
[Property in keyof T]: Omit<EuiDataGridColumn, 'id'> & {
|
|
14
|
-
renderCell?: (cellValue: T[Property], row: T) => ReactNode;
|
|
15
|
-
isHiddenByDefault?: boolean;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type WfoControlColumn<T> = Omit<
|
|
20
|
-
EuiDataGridControlColumn,
|
|
21
|
-
| 'rowCellRender'
|
|
22
|
-
| 'headerCellRender'
|
|
23
|
-
| 'footerCellRender'
|
|
24
|
-
| 'footerCellProps'
|
|
25
|
-
| 'headerCellProps'
|
|
26
|
-
> & {
|
|
27
|
-
rowCellRender: (row: T) => ReactNode;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const getInitialColumnOrder = <T>(
|
|
31
|
-
columns: WfoDataGridTableColumns<T>,
|
|
32
|
-
initialColumnOrder: TableColumnKeys<T>,
|
|
33
|
-
) => {
|
|
34
|
-
const euiDataGridColumns: EuiDataGridColumn[] = Object.keys(columns).map(
|
|
35
|
-
(colKey) => {
|
|
36
|
-
const column = columns[colKey as keyof T];
|
|
37
|
-
return {
|
|
38
|
-
id: colKey,
|
|
39
|
-
isExpandable: false,
|
|
40
|
-
...column,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
);
|
|
44
|
-
const columnOrderIds = initialColumnOrder.map((columnId) =>
|
|
45
|
-
columnId.toString(),
|
|
46
|
-
);
|
|
47
|
-
return euiDataGridColumns
|
|
48
|
-
.slice()
|
|
49
|
-
.sort(
|
|
50
|
-
(left, right) =>
|
|
51
|
-
columnOrderIds.indexOf(left.id) -
|
|
52
|
-
columnOrderIds.indexOf(right.id),
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const mapColumnSortToEuiDataGridSorting = <T>(
|
|
57
|
-
columnSort?: WfoDataSorting<T>,
|
|
58
|
-
updateColumnSort?: (columnSort: WfoDataSorting<T>) => void,
|
|
59
|
-
): EuiDataGridSorting => ({
|
|
60
|
-
columns: columnSort
|
|
61
|
-
? [
|
|
62
|
-
{
|
|
63
|
-
id: columnSort.field?.toString() ?? '',
|
|
64
|
-
direction:
|
|
65
|
-
columnSort.sortOrder === SortOrder.ASC ? 'asc' : 'desc',
|
|
66
|
-
},
|
|
67
|
-
]
|
|
68
|
-
: [],
|
|
69
|
-
onSort: (columns) => {
|
|
70
|
-
const lastSortData = columns.slice(-1)[0];
|
|
71
|
-
if (updateColumnSort && lastSortData) {
|
|
72
|
-
updateColumnSort({
|
|
73
|
-
field: lastSortData.id as keyof T,
|
|
74
|
-
sortOrder:
|
|
75
|
-
lastSortData.direction === 'asc'
|
|
76
|
-
? SortOrder.ASC
|
|
77
|
-
: SortOrder.DESC,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
});
|
package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { WfoTableColumns } from './columns';
|
|
2
|
-
import { mapSortableAndFilterableValuesToTableColumnConfig } from './mapSortableAndFilterableValuesToTableColumnConfig';
|
|
3
|
-
|
|
4
|
-
type TestObject = {
|
|
5
|
-
name: string;
|
|
6
|
-
age: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const tableColumnConfig: WfoTableColumns<TestObject> = {
|
|
10
|
-
name: {
|
|
11
|
-
field: 'name',
|
|
12
|
-
name: 'tesName',
|
|
13
|
-
},
|
|
14
|
-
age: {
|
|
15
|
-
field: 'age',
|
|
16
|
-
name: 'testAge',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
describe('mapSortableAndFilterableValuesToTableColumnConfig', () => {
|
|
21
|
-
it('sets the sortable and filterable properties for the columnConfig object to true when the colum name is specified in the list', () => {
|
|
22
|
-
const sortableFieldNames = ['name', 'age', 'nonExistingFieldName'];
|
|
23
|
-
const filterableFieldNames = ['name', 'age', 'nonExistingFieldName'];
|
|
24
|
-
|
|
25
|
-
const result = mapSortableAndFilterableValuesToTableColumnConfig(
|
|
26
|
-
tableColumnConfig,
|
|
27
|
-
sortableFieldNames,
|
|
28
|
-
filterableFieldNames,
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
expect(result.name.sortable).toEqual(true);
|
|
32
|
-
expect(result.name.filterable).toEqual(true);
|
|
33
|
-
expect(result.age.sortable).toEqual(true);
|
|
34
|
-
expect(result.age.filterable).toEqual(true);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('sets the sortable and filterable properties for the columnConfig object to false when the colum name is not specified in the list', () => {
|
|
38
|
-
const sortableFieldNames = ['nonExistingFieldName'];
|
|
39
|
-
const filterableFieldNames: string[] = [];
|
|
40
|
-
|
|
41
|
-
const result = mapSortableAndFilterableValuesToTableColumnConfig(
|
|
42
|
-
tableColumnConfig,
|
|
43
|
-
sortableFieldNames,
|
|
44
|
-
filterableFieldNames,
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
expect(result.name.sortable).toEqual(false);
|
|
48
|
-
expect(result.name.filterable).toEqual(false);
|
|
49
|
-
expect(result.age.sortable).toEqual(false);
|
|
50
|
-
expect(result.age.filterable).toEqual(false);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { WfoTableColumns, WfoTableDataColumnConfig } from './columns';
|
|
2
|
-
|
|
3
|
-
export function mapSortableAndFilterableValuesToTableColumnConfig<
|
|
4
|
-
T extends object,
|
|
5
|
-
>(
|
|
6
|
-
tableColumnConfig: WfoTableColumns<T>,
|
|
7
|
-
sortableFieldNames: string[] = [],
|
|
8
|
-
filterableFieldNames: string[] = [],
|
|
9
|
-
): WfoTableColumns<T> {
|
|
10
|
-
const tableConfigValues =
|
|
11
|
-
Object.values<WfoTableDataColumnConfig<T, keyof T>>(tableColumnConfig);
|
|
12
|
-
|
|
13
|
-
const updatedTableConfigEntries = tableConfigValues.map((value) => [
|
|
14
|
-
value.field,
|
|
15
|
-
{
|
|
16
|
-
...value,
|
|
17
|
-
sortable: sortableFieldNames.includes(value.field.toString()),
|
|
18
|
-
filterable: filterableFieldNames.includes(value.field.toString()),
|
|
19
|
-
},
|
|
20
|
-
]);
|
|
21
|
-
|
|
22
|
-
return Object.fromEntries(updatedTableConfigEntries);
|
|
23
|
-
}
|
|
File without changes
|