[MNT-23166] Make tasks and processes lists resizeable (#9145)

This commit is contained in:
MichalKinas 2023-12-08 08:47:51 +01:00 committed by GitHub
parent f47fb2a7e9
commit 064c1fd216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 0 deletions

View File

@ -52,7 +52,9 @@ when the process list is empty:
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. | | appId | `number` | | The id of the app. |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. | | data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for processes list. |
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row | | multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row |
| page | `number` | 0 | The page number of the processes to fetch. | | page | `number` | 0 | The page number of the processes to fetch. |
| presetColumn | `string` | | Custom preset column schema in JSON format. | | presetColumn | `string` | | Custom preset column schema in JSON format. |

View File

@ -55,9 +55,11 @@ when the task list is empty:
| ---- | ---- | ------------- | ----------- | | ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. | | appId | `number` | | The id of the app. |
| assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). | | assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. | | data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. |
| dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. | | dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. |
| dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. | | dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for task list. |
| includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances | | includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances |
| landingTaskId | `string` | | Define which task id should be selected after reloading. If the task id doesn't exist or nothing is passed then the first task will be selected. | | landingTaskId | `string` | | Define which task id should be selected after reloading. If the task id doesn't exist or nothing is passed then the first task will be selected. |
| multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row | | multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |

View File

@ -4,6 +4,8 @@
[columns]="columns" [columns]="columns"
[sorting]="sorting" [sorting]="sorting"
[loading]="isLoading" [loading]="isLoading"
[isResizingEnabled]="isResizingEnabled"
[blurOnResize]="blurOnResize"
[stickyHeader]="stickyHeader" [stickyHeader]="stickyHeader"
[selectionMode]="selectionMode" [selectionMode]="selectionMode"
[multiselect]="multiselect" [multiselect]="multiselect"

View File

@ -111,6 +111,14 @@ export class ProcessInstanceListComponent extends DataTableSchema implements OnC
@Input() @Input()
showContextMenu: boolean = false; showContextMenu: boolean = false;
/** Enables column resizing for datatable */
@Input()
isResizingEnabled = false;
/** Enables blur when resizing datatable columns */
@Input()
blurOnResize = true;
/** Emitted before the context menu is displayed for a row. */ /** Emitted before the context menu is displayed for a row. */
@Output() @Output()
showRowContextMenu = new EventEmitter<DataCellEvent>(); showRowContextMenu = new EventEmitter<DataCellEvent>();

View File

@ -6,6 +6,8 @@
[columns]="columns" [columns]="columns"
[sorting]="sorting" [sorting]="sorting"
[loading]="isLoading" [loading]="isLoading"
[isResizingEnabled]="isResizingEnabled"
[blurOnResize]="blurOnResize"
[stickyHeader]="stickyHeader" [stickyHeader]="stickyHeader"
[multiselect]="multiselect" [multiselect]="multiselect"
[selectionMode]="selectionMode" [selectionMode]="selectionMode"

View File

@ -139,6 +139,14 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
@Input() @Input()
stickyHeader: boolean = false; stickyHeader: boolean = false;
/** Enables column resizing for datatable */
@Input()
isResizingEnabled = false;
/** Enables blur when resizing datatable columns */
@Input()
blurOnResize = true;
/** Emitted before the context menu is displayed for a row. */ /** Emitted before the context menu is displayed for a row. */
@Output() @Output()
showRowContextMenu = new EventEmitter<DataCellEvent>(); showRowContextMenu = new EventEmitter<DataCellEvent>();