From 36b5af3480043dd56f53b37c42da0f36da4d1d3d Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Thu, 7 Dec 2023 09:00:06 +0100 Subject: [PATCH] [MNT-23166] Make tasks and processes lists resizeable --- .../process-services/components/process-list.component.md | 2 ++ docs/process-services/components/task-list.component.md | 2 ++ .../process-list/components/process-list.component.html | 2 ++ .../lib/process-list/components/process-list.component.ts | 8 ++++++++ .../src/lib/task-list/components/task-list.component.html | 2 ++ .../src/lib/task-list/components/task-list.component.ts | 8 ++++++++ 6 files changed, 24 insertions(+) diff --git a/docs/process-services/components/process-list.component.md b/docs/process-services/components/process-list.component.md index 16df20b837d..1d2a7c0cda5 100644 --- a/docs/process-services/components/process-list.component.md +++ b/docs/process-services/components/process-list.component.md @@ -52,7 +52,9 @@ when the process list is empty: | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | 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. | +| 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 | | page | `number` | 0 | The page number of the processes to fetch. | | presetColumn | `string` | | Custom preset column schema in JSON format. | diff --git a/docs/process-services/components/task-list.component.md b/docs/process-services/components/task-list.component.md index 74abe5cf514..ae22c76615a 100644 --- a/docs/process-services/components/task-list.component.md +++ b/docs/process-services/components/task-list.component.md @@ -55,9 +55,11 @@ when the task list is empty: | ---- | ---- | ------------- | ----------- | | 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). | +| 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. | | 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`. | +| isResizingEnabled | `boolean` | false | Toggles column resizing for task list. | | 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. | | multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row | diff --git a/lib/process-services/src/lib/process-list/components/process-list.component.html b/lib/process-services/src/lib/process-list/components/process-list.component.html index 22edececa18..0b99bb091df 100644 --- a/lib/process-services/src/lib/process-list/components/process-list.component.html +++ b/lib/process-services/src/lib/process-list/components/process-list.component.html @@ -4,6 +4,8 @@ [columns]="columns" [sorting]="sorting" [loading]="isLoading" + [isResizingEnabled]="isResizingEnabled" + [blurOnResize]="blurOnResize" [stickyHeader]="stickyHeader" [selectionMode]="selectionMode" [multiselect]="multiselect" diff --git a/lib/process-services/src/lib/process-list/components/process-list.component.ts b/lib/process-services/src/lib/process-list/components/process-list.component.ts index eb7b88e540e..c09e7f7e9f5 100644 --- a/lib/process-services/src/lib/process-list/components/process-list.component.ts +++ b/lib/process-services/src/lib/process-list/components/process-list.component.ts @@ -111,6 +111,14 @@ export class ProcessInstanceListComponent extends DataTableSchema implements OnC @Input() 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. */ @Output() showRowContextMenu = new EventEmitter(); diff --git a/lib/process-services/src/lib/task-list/components/task-list.component.html b/lib/process-services/src/lib/task-list/components/task-list.component.html index c1d70d833a6..19ee13df378 100644 --- a/lib/process-services/src/lib/task-list/components/task-list.component.html +++ b/lib/process-services/src/lib/task-list/components/task-list.component.html @@ -6,6 +6,8 @@ [columns]="columns" [sorting]="sorting" [loading]="isLoading" + [isResizingEnabled]="isResizingEnabled" + [blurOnResize]="blurOnResize" [stickyHeader]="stickyHeader" [multiselect]="multiselect" [selectionMode]="selectionMode" diff --git a/lib/process-services/src/lib/task-list/components/task-list.component.ts b/lib/process-services/src/lib/task-list/components/task-list.component.ts index a7ffcaac842..b87b69a3f2e 100644 --- a/lib/process-services/src/lib/task-list/components/task-list.component.ts +++ b/lib/process-services/src/lib/task-list/components/task-list.component.ts @@ -139,6 +139,14 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft @Input() 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. */ @Output() showRowContextMenu = new EventEmitter();