@valtimo/task 11.3.2 → 12.1.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 (79) hide show
  1. package/esm2022/lib/components/assign-user-to-task/assign-user-to-task.component.mjs +122 -0
  2. package/esm2022/lib/components/task-detail-modal/task-detail-modal.component.mjs +322 -0
  3. package/esm2022/lib/components/task-list/task-list.component.mjs +360 -0
  4. package/esm2022/lib/constants/index.mjs +17 -0
  5. package/esm2022/lib/constants/task-list.constants.mjs +22 -0
  6. package/esm2022/lib/models/index.mjs +4 -2
  7. package/esm2022/lib/models/task-definition.model.mjs +2 -2
  8. package/esm2022/lib/models/task-intermediate-save.model.mjs +17 -0
  9. package/esm2022/lib/models/task-list-search-field.model.mjs +43 -0
  10. package/esm2022/lib/models/task-list.model.mjs +8 -14
  11. package/esm2022/lib/models/task.model.mjs +2 -2
  12. package/esm2022/lib/services/index.mjs +22 -0
  13. package/esm2022/lib/services/task-intermediate-save.service.mjs +56 -0
  14. package/esm2022/lib/services/task-list-column.service.mjs +193 -0
  15. package/esm2022/lib/services/task-list-pagination.service.mjs +74 -0
  16. package/esm2022/lib/services/task-list-query-param.service.mjs +53 -0
  17. package/esm2022/lib/services/task-list-search.service.mjs +99 -0
  18. package/esm2022/lib/services/task-list-sort.service.mjs +116 -0
  19. package/esm2022/lib/services/task-list.service.mjs +60 -0
  20. package/esm2022/lib/services/task.service.mjs +100 -0
  21. package/esm2022/lib/task-permissions.mjs +2 -2
  22. package/esm2022/lib/task-routing.module.mjs +7 -7
  23. package/esm2022/lib/task.module.mjs +38 -17
  24. package/esm2022/public_api.mjs +7 -6
  25. package/fesm2022/valtimo-task.mjs +1290 -335
  26. package/fesm2022/valtimo-task.mjs.map +1 -1
  27. package/lib/{assign-user-to-task → components/assign-user-to-task}/assign-user-to-task.component.d.ts +7 -7
  28. package/lib/components/assign-user-to-task/assign-user-to-task.component.d.ts.map +1 -0
  29. package/lib/{task-detail-modal → components/task-detail-modal}/task-detail-modal.component.d.ts +34 -12
  30. package/lib/components/task-detail-modal/task-detail-modal.component.d.ts.map +1 -0
  31. package/lib/components/task-list/task-list.component.d.ts +82 -0
  32. package/lib/components/task-list/task-list.component.d.ts.map +1 -0
  33. package/lib/constants/index.d.ts +2 -0
  34. package/lib/constants/index.d.ts.map +1 -0
  35. package/lib/constants/task-list.constants.d.ts +4 -0
  36. package/lib/constants/task-list.constants.d.ts.map +1 -0
  37. package/lib/models/index.d.ts +2 -0
  38. package/lib/models/index.d.ts.map +1 -1
  39. package/lib/models/task-intermediate-save.model.d.ts +13 -0
  40. package/lib/models/task-intermediate-save.model.d.ts.map +1 -0
  41. package/lib/models/task-list-search-field.model.d.ts +40 -0
  42. package/lib/models/task-list-search-field.model.d.ts.map +1 -0
  43. package/lib/models/task-list.model.d.ts +56 -8
  44. package/lib/models/task-list.model.d.ts.map +1 -1
  45. package/lib/models/task.model.d.ts +25 -2
  46. package/lib/models/task.model.d.ts.map +1 -1
  47. package/lib/services/index.d.ts +7 -0
  48. package/lib/services/index.d.ts.map +1 -0
  49. package/lib/services/task-intermediate-save.service.d.ts +16 -0
  50. package/lib/services/task-intermediate-save.service.d.ts.map +1 -0
  51. package/lib/services/task-list-column.service.d.ts +27 -0
  52. package/lib/services/task-list-column.service.d.ts.map +1 -0
  53. package/lib/services/task-list-pagination.service.d.ts +20 -0
  54. package/lib/services/task-list-pagination.service.d.ts.map +1 -0
  55. package/lib/services/task-list-query-param.service.d.ts +16 -0
  56. package/lib/services/task-list-query-param.service.d.ts.map +1 -0
  57. package/lib/services/task-list-search.service.d.ts +25 -0
  58. package/lib/services/task-list-search.service.d.ts.map +1 -0
  59. package/lib/services/task-list-sort.service.d.ts +29 -0
  60. package/lib/services/task-list-sort.service.d.ts.map +1 -0
  61. package/lib/services/task-list.service.d.ts +23 -0
  62. package/lib/services/task-list.service.d.ts.map +1 -0
  63. package/lib/services/task.service.d.ts +27 -0
  64. package/lib/services/task.service.d.ts.map +1 -0
  65. package/lib/task.module.d.ts +5 -5
  66. package/lib/task.module.d.ts.map +1 -1
  67. package/package.json +7 -6
  68. package/public_api.d.ts +5 -4
  69. package/public_api.d.ts.map +1 -1
  70. package/esm2022/lib/assign-user-to-task/assign-user-to-task.component.mjs +0 -122
  71. package/esm2022/lib/task-detail-modal/task-detail-modal.component.mjs +0 -219
  72. package/esm2022/lib/task-list/task-list.component.mjs +0 -259
  73. package/esm2022/lib/task.service.mjs +0 -72
  74. package/lib/assign-user-to-task/assign-user-to-task.component.d.ts.map +0 -1
  75. package/lib/task-detail-modal/task-detail-modal.component.d.ts.map +0 -1
  76. package/lib/task-list/task-list.component.d.ts +0 -54
  77. package/lib/task-list/task-list.component.d.ts.map +0 -1
  78. package/lib/task.service.d.ts +0 -24
  79. package/lib/task.service.d.ts.map +0 -1
@@ -1,38 +1,39 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
3
- import * as i5 from '@valtimo/security';
4
- import { InterceptorSkip, AuthGuardService } from '@valtimo/security';
2
+ import { Injectable, EventEmitter, Component, Input, Output, ViewContainerRef, ViewEncapsulation, Optional, Inject, ViewChild, ChangeDetectionStrategy, HostListener, NgModule } from '@angular/core';
5
3
  import * as i1 from '@angular/common/http';
6
- import { HttpClient } from '@angular/common/http';
4
+ import { HttpParams, HttpHeaders, HttpClient } from '@angular/common/http';
7
5
  import * as i2 from '@valtimo/config';
8
- import { ROLE_USER, HttpLoaderFactory } from '@valtimo/config';
9
- import * as i8 from '@angular/common';
6
+ import { BaseApiService, TaskListTab, FORM_VIEW_MODEL_TOKEN, ROLE_USER, HttpLoaderFactory } from '@valtimo/config';
7
+ import * as i5 from '@valtimo/security';
8
+ import { InterceptorSkip, AuthGuardService } from '@valtimo/security';
9
+ import * as i10 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
11
  import { FormsModule } from '@angular/forms';
12
12
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
13
- import * as i10 from '@ng-bootstrap/ng-bootstrap';
13
+ import * as i11$1 from '@ng-bootstrap/ng-bootstrap';
14
14
  import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
15
- import * as i8$1 from '@ngx-translate/core';
15
+ import * as i8 from '@ngx-translate/core';
16
16
  import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
17
17
  import * as i6 from '@valtimo/components';
18
- import { FormioOptionsImpl, CarbonListModule, PageHeaderModule, WidgetModule, SpinnerModule, SearchableDropdownSelectModule, CamundaFormModule, FormIoModule, ModalModule } from '@valtimo/components';
19
- import * as i2$1 from '@valtimo/form-link';
20
- import { FormLinkModule } from '@valtimo/form-link';
18
+ import { ViewType, FormioOptionsImpl, CarbonListModule, PageHeaderModule, WidgetModule, SpinnerModule, SearchableDropdownSelectModule, CamundaFormModule, FormIoModule, RenderInPageHeaderDirectiveModule, ConfirmationModalModule, SearchFieldsModule } from '@valtimo/components';
19
+ import * as i2$1 from '@valtimo/process-link';
20
+ import { ProcessLinkModule } from '@valtimo/process-link';
21
21
  import * as i11 from 'carbon-components-angular';
22
- import { LinkModule, TabsModule, ContentSwitcherModule } from 'carbon-components-angular';
23
- import * as i1$1 from 'ngx-toastr';
22
+ import { ModalModule, LinkModule, TabsModule, ContentSwitcherModule, DropdownModule, ButtonModule, IconModule, TooltipModule } from 'carbon-components-angular';
23
+ import * as i1$2 from 'ngx-toastr';
24
24
  import { ToastrModule } from 'ngx-toastr';
25
- import { BehaviorSubject, Subscription, take, combineLatest, tap, distinctUntilChanged, switchMap, of, forkJoin, defaultIfEmpty } from 'rxjs';
26
- import moment from 'moment';
27
- import { map, take as take$1 } from 'rxjs/operators';
28
- import * as i3 from '@angular/router';
25
+ import { BehaviorSubject, combineLatest, tap, filter, switchMap, of, map as map$1, Subscription, take as take$1, Subject } from 'rxjs';
26
+ import { map, take, distinctUntilChanged, switchMap as switchMap$1, filter as filter$1 } from 'rxjs/operators';
27
+ import { omit, isEqual } from 'lodash';
28
+ import * as i1$1 from '@angular/router';
29
29
  import { RouterModule } from '@angular/router';
30
+ import moment from 'moment';
31
+ import { RecentlyViewed16 } from '@carbon/icons';
30
32
  import * as i7 from '@valtimo/document';
31
- import * as i3$1 from 'ngx-logger';
32
- import * as i4 from '@valtimo/access-control';
33
+ import * as i3 from '@valtimo/access-control';
33
34
 
34
35
  /*
35
- * Copyright 2015-2023 Ritense BV, the Netherlands.
36
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
36
37
  *
37
38
  * Licensed under EUPL, Version 1.2 (the "License");
38
39
  * you may not use this file except in compliance with the License.
@@ -48,7 +49,7 @@ import * as i4 from '@valtimo/access-control';
48
49
  */
49
50
 
50
51
  /*
51
- * Copyright 2015-2023 Ritense BV, the Netherlands.
52
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
52
53
  *
53
54
  * Licensed under EUPL, Version 1.2 (the "License");
54
55
  * you may not use this file except in compliance with the License.
@@ -64,7 +65,7 @@ import * as i4 from '@valtimo/access-control';
64
65
  */
65
66
 
66
67
  /*
67
- * Copyright 2015-2023 Ritense BV, the Netherlands.
68
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
68
69
  *
69
70
  * Licensed under EUPL, Version 1.2 (the "License");
70
71
  * you may not use this file except in compliance with the License.
@@ -78,21 +79,72 @@ import * as i4 from '@valtimo/access-control';
78
79
  * See the License for the specific language governing permissions and
79
80
  * limitations under the License.
80
81
  */
81
- class TaskList {
82
- constructor() {
83
- this.tasks = [];
84
- this.fields = [];
85
- this.pagination = {
86
- collectionSize: 0,
87
- page: 1,
88
- size: 10,
89
- };
90
- this.page = 0;
91
- }
92
- }
82
+ var TaskListColumnDefaultSort;
83
+ (function (TaskListColumnDefaultSort) {
84
+ TaskListColumnDefaultSort["ASC"] = "ASC";
85
+ TaskListColumnDefaultSort["DESC"] = "DESC";
86
+ })(TaskListColumnDefaultSort || (TaskListColumnDefaultSort = {}));
87
+
88
+ /*
89
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
90
+ *
91
+ * Licensed under EUPL, Version 1.2 (the "License");
92
+ * you may not use this file except in compliance with the License.
93
+ * You may obtain a copy of the License at
94
+ *
95
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
96
+ *
97
+ * Unless required by applicable law or agreed to in writing, software
98
+ * distributed under the License is distributed on an "AS IS" basis,
99
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
100
+ * See the License for the specific language governing permissions and
101
+ * limitations under the License.
102
+ */
103
+
104
+ /*
105
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
106
+ *
107
+ * Licensed under EUPL, Version 1.2 (the "License");
108
+ * you may not use this file except in compliance with the License.
109
+ * You may obtain a copy of the License at
110
+ *
111
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
112
+ *
113
+ * Unless required by applicable law or agreed to in writing, software
114
+ * distributed under the License is distributed on an "AS IS" basis,
115
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
116
+ * See the License for the specific language governing permissions and
117
+ * limitations under the License.
118
+ */
119
+ var TaskListSearchFieldDataType;
120
+ (function (TaskListSearchFieldDataType) {
121
+ TaskListSearchFieldDataType["TEXT"] = "text";
122
+ TaskListSearchFieldDataType["NUMBER"] = "number";
123
+ TaskListSearchFieldDataType["DATE"] = "date";
124
+ TaskListSearchFieldDataType["DATETIME"] = "datetime";
125
+ TaskListSearchFieldDataType["TIME"] = "time";
126
+ TaskListSearchFieldDataType["BOOLEAN"] = "boolean";
127
+ })(TaskListSearchFieldDataType || (TaskListSearchFieldDataType = {}));
128
+ var TaskListSearchFieldFieldType;
129
+ (function (TaskListSearchFieldFieldType) {
130
+ TaskListSearchFieldFieldType["SINGLE"] = "single";
131
+ TaskListSearchFieldFieldType["RANGE"] = "range";
132
+ TaskListSearchFieldFieldType["SINGLE_SELECT_DROPDOWN"] = "single_select_dropdown";
133
+ TaskListSearchFieldFieldType["MULTI_SELECT_DROPDOWN"] = "multi_select_dropdown";
134
+ })(TaskListSearchFieldFieldType || (TaskListSearchFieldFieldType = {}));
135
+ var TaskListSearchFieldMatchType;
136
+ (function (TaskListSearchFieldMatchType) {
137
+ TaskListSearchFieldMatchType["LIKE"] = "like";
138
+ TaskListSearchFieldMatchType["EXACT"] = "exact";
139
+ })(TaskListSearchFieldMatchType || (TaskListSearchFieldMatchType = {}));
140
+ var TaskListSearchDropdownDataProvider;
141
+ (function (TaskListSearchDropdownDataProvider) {
142
+ TaskListSearchDropdownDataProvider["DATABASE"] = "dropdownDatabaseDataProvider";
143
+ TaskListSearchDropdownDataProvider["JSON"] = "dropdownJsonFileDataProvider";
144
+ })(TaskListSearchDropdownDataProvider || (TaskListSearchDropdownDataProvider = {}));
93
145
 
94
146
  /*
95
- * Copyright 2015-2023 Ritense BV, the Netherlands.
147
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
96
148
  *
97
149
  * Licensed under EUPL, Version 1.2 (the "License");
98
150
  * you may not use this file except in compliance with the License.
@@ -108,7 +160,7 @@ class TaskList {
108
160
  */
109
161
 
110
162
  /*
111
- * Copyright 2015-2023 Ritense BV, the Netherlands.
163
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
112
164
  *
113
165
  * Licensed under EUPL, Version 1.2 (the "License");
114
166
  * you may not use this file except in compliance with the License.
@@ -122,60 +174,662 @@ class TaskList {
122
174
  * See the License for the specific language governing permissions and
123
175
  * limitations under the License.
124
176
  */
125
- class TaskService {
126
- constructor(http, configService) {
127
- this.http = http;
177
+ class TaskService extends BaseApiService {
178
+ constructor(httpClient, configService) {
179
+ super(httpClient, configService);
180
+ this.httpClient = httpClient;
128
181
  this.configService = configService;
129
- this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
130
182
  }
131
183
  queryTasks(params) {
132
- return this.http.get(`${this.valtimoEndpointUri}v1/task`, {
184
+ return this.httpClient.get(this.getApiUrl('/v1/task'), {
133
185
  observe: 'response',
134
186
  params,
135
187
  });
136
188
  }
189
+ queryTasksPage(params) {
190
+ return this.httpClient.get(this.getApiUrl('/v2/task'), {
191
+ params,
192
+ });
193
+ }
194
+ queryTasksPageV3(assigneeFilter = TaskListTab.ALL, pageParams, caseDefinitionName, otherFilters) {
195
+ let httpParams = new HttpParams().set('page', pageParams.page).set('size', pageParams.size);
196
+ if (pageParams.sort) {
197
+ httpParams = httpParams.append('sort', pageParams.sort);
198
+ }
199
+ if (caseDefinitionName && (otherFilters || []).length > 0) {
200
+ return this.searchTasks(httpParams, caseDefinitionName, otherFilters, assigneeFilter);
201
+ }
202
+ httpParams = httpParams.append('filter', assigneeFilter.toUpperCase());
203
+ return this.httpClient.post(this.getApiUrl('/v3/task'), { ...(caseDefinitionName && { caseDefinitionName }) }, { params: httpParams });
204
+ }
205
+ searchTasks(params, caseDefinitionName, otherFilters, assigneeFilter = TaskListTab.ALL) {
206
+ return this.httpClient.post(this.getApiUrl(`/v1/document-definition/${caseDefinitionName}/task/search`), {
207
+ caseDefinitionName,
208
+ assigneeFilter: assigneeFilter.toUpperCase(),
209
+ ...(otherFilters && { otherFilters }),
210
+ }, { params });
211
+ }
137
212
  getTasks() {
138
- return this.http.get(`${this.valtimoEndpointUri}v1/task?filter=all`);
213
+ return this.httpClient.get(this.getApiUrl('/v1/task?filter=all`'));
139
214
  }
140
215
  getTask(id) {
141
- return this.http.get(this.valtimoEndpointUri + 'v1/task/' + id);
216
+ return this.httpClient.get(this.getApiUrl(`/v1/task/${id}`));
142
217
  }
143
218
  getCandidateUsers(id) {
144
- return this.http.get(this.valtimoEndpointUri + 'v2/task/' + id + '/candidate-user');
219
+ return this.httpClient.get(this.getApiUrl(`/v2/task/${id}/candidate-user`));
145
220
  }
146
221
  assignTask(id, assigneeRequest) {
147
- return this.http.post(this.valtimoEndpointUri + 'v1/task/' + id + '/assign', assigneeRequest);
222
+ return this.httpClient.post(this.getApiUrl(`/v1/task/${id}/assign`), assigneeRequest);
148
223
  }
149
224
  unassignTask(id) {
150
- return this.http.post(this.valtimoEndpointUri + 'v1/task/' + id + '/unassign', null);
225
+ return this.httpClient.post(this.getApiUrl(`/v1/task/${id}/unassign`), null);
151
226
  }
152
227
  completeTask(id, variables) {
153
- return this.http.post(this.valtimoEndpointUri + 'v1/task/' + id + '/complete', {
228
+ return this.httpClient.post(this.getApiUrl(`/v1/task/${id}/complete`), {
154
229
  variables,
155
230
  filesToDelete: [],
156
231
  });
157
232
  }
158
233
  getTaskProcessLink(taskId) {
159
- return this.http.get(`${this.valtimoEndpointUri}v2/process-link/task/${taskId}`, {
160
- headers: { [InterceptorSkip]: '' },
234
+ return this.httpClient.get(this.getApiUrl(`/v2/process-link/task/${taskId}`), {
235
+ headers: { [InterceptorSkip]: '404' },
161
236
  });
162
237
  }
163
- getTaskProcessLinkV1(taskId) {
164
- return this.http.get(`${this.valtimoEndpointUri}v1/process-link/task/${taskId}`);
238
+ getTaskListColumns(caseDefinitionName) {
239
+ return this.httpClient.get(this.getApiUrl(`/v1/case/${caseDefinitionName}/task-list-column`));
165
240
  }
166
241
  getConfigCustomTaskList() {
167
242
  return this.configService.config.customTaskList;
168
243
  }
169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
170
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskService, providedIn: 'root' }); }
244
+ getTaskListSearchFields(caseDefinitionName) {
245
+ return this.httpClient.get(this.getApiUrl(`v1/search/field/TaskListSearchColumns/${caseDefinitionName}`));
246
+ }
247
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
248
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskService, providedIn: 'root' }); }
171
249
  }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskService, decorators: [{
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskService, decorators: [{
173
251
  type: Injectable,
174
252
  args: [{ providedIn: 'root' }]
175
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
253
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
254
+
255
+ /*
256
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
257
+ *
258
+ * Licensed under EUPL, Version 1.2 (the "License");
259
+ * you may not use this file except in compliance with the License.
260
+ * You may obtain a copy of the License at
261
+ *
262
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
263
+ *
264
+ * Unless required by applicable law or agreed to in writing, software
265
+ * distributed under the License is distributed on an "AS IS" basis,
266
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
267
+ * See the License for the specific language governing permissions and
268
+ * limitations under the License.
269
+ */
270
+ class TaskListService {
271
+ get caseDefinitionName$() {
272
+ return this._caseDefinitionName$.asObservable();
273
+ }
274
+ get selectedTaskType$() {
275
+ return this._selectedTaskType$.asObservable();
276
+ }
277
+ get selectedTaskType() {
278
+ return this._selectedTaskType$.getValue();
279
+ }
280
+ get loadingStateForCaseDefinition$() {
281
+ return this._loadingStateForCaseDefinition$.asObservable();
282
+ }
283
+ get ALL_CASES_ID() {
284
+ return this._ALL_CASES_ID;
285
+ }
286
+ constructor(taskService) {
287
+ this.taskService = taskService;
288
+ this._ALL_CASES_ID = 'ALL_CASES';
289
+ this._caseDefinitionName$ = new BehaviorSubject(null);
290
+ this._selectedTaskType$ = new BehaviorSubject(TaskListTab.MINE);
291
+ this._loadingStateForCaseDefinition$ = new BehaviorSubject(false);
292
+ }
293
+ setSelectedTaskType(type) {
294
+ this._selectedTaskType$.next(type);
295
+ }
296
+ setCaseDefinitionName(caseDefinitionName) {
297
+ this._loadingStateForCaseDefinition$.next(true);
298
+ this._caseDefinitionName$.next(caseDefinitionName);
299
+ }
300
+ setLoadingStateForCaseDefinition(loading) {
301
+ this._loadingStateForCaseDefinition$.next(loading);
302
+ }
303
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListService, deps: [{ token: TaskService }], target: i0.ɵɵFactoryTarget.Injectable }); }
304
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListService }); }
305
+ }
306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListService, decorators: [{
307
+ type: Injectable
308
+ }], ctorParameters: () => [{ type: TaskService }] });
309
+
310
+ /*
311
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
312
+ *
313
+ * Licensed under EUPL, Version 1.2 (the "License");
314
+ * you may not use this file except in compliance with the License.
315
+ * You may obtain a copy of the License at
316
+ *
317
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
318
+ *
319
+ * Unless required by applicable law or agreed to in writing, software
320
+ * distributed under the License is distributed on an "AS IS" basis,
321
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
322
+ * See the License for the specific language governing permissions and
323
+ * limitations under the License.
324
+ */
325
+ class TaskListSortService {
326
+ get sortStateForCurrentTaskType$() {
327
+ return this._sortStateForCurrentTaskType$;
328
+ }
329
+ get sortStringForCurrentTaskType$() {
330
+ return this.sortStateForCurrentTaskType$.pipe(map(sortState => (sortState ? this.getSortString(sortState) : null)));
331
+ }
332
+ get overrideSortState$() {
333
+ return this._overrideSortState$.asObservable();
334
+ }
335
+ get overrideSortStateString$() {
336
+ return this._overrideSortState$.pipe(map(state => (state ? this.getSortString(state) : null)));
337
+ }
338
+ get _defaultSortState() {
339
+ return this.taskService.getConfigCustomTaskList()?.defaultSortedColumn || null;
340
+ }
341
+ constructor(taskService, taskListService) {
342
+ this.taskService = taskService;
343
+ this.taskListService = taskListService;
344
+ this._overrideSortState$ = new BehaviorSubject(null);
345
+ this._sortState$ = new BehaviorSubject({
346
+ [TaskListTab.ALL]: this._defaultSortState,
347
+ [TaskListTab.MINE]: this._defaultSortState,
348
+ [TaskListTab.OPEN]: this._defaultSortState,
349
+ });
350
+ this._sortStateForCurrentTaskType$ = combineLatest([
351
+ this.taskListService.selectedTaskType$,
352
+ this._sortState$,
353
+ ]).pipe(map(([selectedTaskType, sortStates]) => sortStates[selectedTaskType]));
354
+ }
355
+ updateSortState(taskType, updatedSortState) {
356
+ this._sortState$.pipe(take(1)).subscribe(sortState => {
357
+ this._sortState$.next({
358
+ ...sortState,
359
+ [taskType]: { ...sortState[taskType], ...updatedSortState },
360
+ });
361
+ });
362
+ }
363
+ updateSortStates(updatedSortState) {
364
+ this._sortState$.pipe(take(1)).subscribe(sortStates => {
365
+ const sortStatesCopy = { ...sortStates };
366
+ Object.keys(sortStates).forEach(taskType => {
367
+ sortStatesCopy[taskType] = { ...sortStatesCopy[taskType], ...updatedSortState };
368
+ });
369
+ this._sortState$.next(sortStatesCopy);
370
+ });
371
+ }
372
+ clearSortStates() {
373
+ this._sortState$.pipe(take(1)).subscribe(sortStates => {
374
+ const sortStatesCopy = { ...sortStates };
375
+ Object.keys(sortStates).forEach(taskType => {
376
+ sortStatesCopy[taskType] = null;
377
+ });
378
+ this._sortState$.next(sortStatesCopy);
379
+ });
380
+ }
381
+ resetDefaultSortStates() {
382
+ this._sortState$.pipe(take(1)).subscribe(sortStates => {
383
+ const sortStatesCopy = { ...sortStates };
384
+ Object.keys(sortStates).forEach(taskType => {
385
+ sortStatesCopy[taskType] = this._defaultSortState;
386
+ });
387
+ this._sortState$.next(sortStatesCopy);
388
+ });
389
+ }
390
+ getSortStateFromSortString(sortString) {
391
+ const splitString = sortString && sortString.split(',');
392
+ if (splitString?.length > 1) {
393
+ return {
394
+ isSorting: true,
395
+ state: {
396
+ name: splitString[0],
397
+ direction: splitString[1],
398
+ },
399
+ };
400
+ }
401
+ return null;
402
+ }
403
+ setOverrideSortState(state) {
404
+ this._overrideSortState$.next(state);
405
+ }
406
+ resetOverrideSortState() {
407
+ this._overrideSortState$.next(null);
408
+ }
409
+ getSortString(sort) {
410
+ return `${sort.state.name},${sort.state.direction}`;
411
+ }
412
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListSortService, deps: [{ token: TaskService }, { token: TaskListService }], target: i0.ɵɵFactoryTarget.Injectable }); }
413
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListSortService }); }
414
+ }
415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListSortService, decorators: [{
416
+ type: Injectable
417
+ }], ctorParameters: () => [{ type: TaskService }, { type: TaskListService }] });
418
+
419
+ /*
420
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
421
+ *
422
+ * Licensed under EUPL, Version 1.2 (the "License");
423
+ * you may not use this file except in compliance with the License.
424
+ * You may obtain a copy of the License at
425
+ *
426
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
427
+ *
428
+ * Unless required by applicable law or agreed to in writing, software
429
+ * distributed under the License is distributed on an "AS IS" basis,
430
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
+ * See the License for the specific language governing permissions and
432
+ * limitations under the License.
433
+ */
434
+ class TaskListColumnService {
435
+ get hasCustomConfigTaskList() {
436
+ return !!this.taskService.getConfigCustomTaskList();
437
+ }
438
+ get fields$() {
439
+ return this._fields$.asObservable();
440
+ }
441
+ get taskListColumnsForCase$() {
442
+ return this.taskListService.caseDefinitionName$.pipe(tap(caseDefinitionName => {
443
+ if (caseDefinitionName === this.taskListService.ALL_CASES_ID) {
444
+ this.resetTaskListFields();
445
+ }
446
+ }), filter(caseDefinitionName => !!caseDefinitionName && caseDefinitionName !== this.taskListService.ALL_CASES_ID), switchMap(caseDefinitionName => this.taskService.getTaskListColumns(caseDefinitionName)), tap(taskListColumns => {
447
+ if (taskListColumns.length === 0) {
448
+ this.taskListSortService.updateSortStates({
449
+ isSorting: true,
450
+ state: {
451
+ name: this._DEFAULT_SPECIFIED_TASK_LIST_FIELDS[0].key,
452
+ direction: 'DESC',
453
+ },
454
+ });
455
+ this._fields$.next(this._DEFAULT_SPECIFIED_TASK_LIST_FIELDS);
456
+ }
457
+ else {
458
+ this._fields$.next(this.mapTaskListColumnToColumnConfig(taskListColumns));
459
+ }
460
+ }), tap(() => this.taskListService.setLoadingStateForCaseDefinition(false)));
461
+ }
462
+ constructor(taskService, taskListService, taskListSortService) {
463
+ this.taskService = taskService;
464
+ this.taskListService = taskListService;
465
+ this.taskListSortService = taskListSortService;
466
+ this._DEFAULT_TASK_LIST_FIELDS = [
467
+ {
468
+ key: 'created',
469
+ label: `task-list.fieldLabels.created`,
470
+ viewType: ViewType.TEXT,
471
+ sortable: true,
472
+ },
473
+ {
474
+ key: 'name',
475
+ label: `task-list.fieldLabels.name`,
476
+ viewType: ViewType.TEXT,
477
+ sortable: true,
478
+ },
479
+ {
480
+ key: 'valtimoAssignee.fullName',
481
+ label: `task-list.fieldLabels.valtimoAssignee.fullName`,
482
+ viewType: ViewType.TEXT,
483
+ },
484
+ {
485
+ key: 'due',
486
+ label: `task-list.fieldLabels.due`,
487
+ viewType: ViewType.TEXT,
488
+ sortable: true,
489
+ },
490
+ {
491
+ key: 'context',
492
+ label: `task-list.fieldLabels.context`,
493
+ viewType: ViewType.TEXT,
494
+ },
495
+ ];
496
+ this._DEFAULT_SPECIFIED_TASK_LIST_FIELDS = [
497
+ {
498
+ key: 'createTime',
499
+ label: `task-list.fieldLabels.created`,
500
+ viewType: ViewType.DATE,
501
+ sortable: true,
502
+ format: 'DD MMM YYYY HH:mm',
503
+ },
504
+ {
505
+ key: 'name',
506
+ label: `task-list.fieldLabels.name`,
507
+ viewType: ViewType.TEXT,
508
+ sortable: true,
509
+ },
510
+ {
511
+ key: 'assignee',
512
+ label: `task-list.fieldLabels.valtimoAssignee.fullName`,
513
+ viewType: ViewType.TEXT,
514
+ },
515
+ {
516
+ key: 'dueDate',
517
+ label: `task-list.fieldLabels.due`,
518
+ viewType: ViewType.TEXT,
519
+ sortable: true,
520
+ },
521
+ ];
522
+ this._fields$ = new BehaviorSubject(this._DEFAULT_TASK_LIST_FIELDS);
523
+ }
524
+ resetTaskListFields() {
525
+ if (this.hasCustomConfigTaskList) {
526
+ this.setFieldsToCustomTaskListFields();
527
+ }
528
+ else {
529
+ this.setFieldsToDefaultTaskListFields();
530
+ }
531
+ this.taskListSortService.resetDefaultSortStates();
532
+ this.taskListService.setLoadingStateForCaseDefinition(false);
533
+ }
534
+ setFieldsToCustomTaskListFields() {
535
+ const customTaskListFields = this.taskService.getConfigCustomTaskList().fields;
536
+ if (customTaskListFields) {
537
+ this._fields$.next(customTaskListFields.map((column, index) => ({
538
+ key: column.propertyName,
539
+ label: `task-list.fieldLabels.${column.translationKey}`,
540
+ sortable: column.sortable,
541
+ ...(column.viewType && { viewType: column.viewType }),
542
+ ...(column.enum && { enum: column.enum }),
543
+ })));
544
+ }
545
+ }
546
+ setFieldsToDefaultTaskListFields() {
547
+ this._fields$.next(this._DEFAULT_TASK_LIST_FIELDS);
548
+ }
549
+ mapTaskListColumnToColumnConfig(taskListColumns) {
550
+ const hasDefaultSort = !!taskListColumns.find(column => column.defaultSort);
551
+ const firstSortableColumn = taskListColumns.find(column => column.sortable);
552
+ if (!hasDefaultSort && firstSortableColumn) {
553
+ this.taskListSortService.updateSortStates({
554
+ isSorting: true,
555
+ state: {
556
+ name: firstSortableColumn.key,
557
+ direction: 'DESC',
558
+ },
559
+ });
560
+ }
561
+ if (!hasDefaultSort && !firstSortableColumn) {
562
+ this.taskListSortService.clearSortStates();
563
+ }
564
+ return taskListColumns.map(column => {
565
+ if (column.defaultSort) {
566
+ this.taskListSortService.updateSortStates({
567
+ isSorting: true,
568
+ state: {
569
+ name: column.key,
570
+ direction: column.defaultSort,
571
+ },
572
+ });
573
+ }
574
+ return {
575
+ viewType: this.getViewType(column.displayType.type),
576
+ key: column.key,
577
+ label: column.title || column.key,
578
+ sortable: column.sortable,
579
+ ...(column?.displayType?.displayTypeParameters?.enum && {
580
+ enum: column?.displayType?.displayTypeParameters?.enum,
581
+ }),
582
+ ...(column?.displayType?.displayTypeParameters?.dateFormat && {
583
+ format: column?.displayType?.displayTypeParameters?.dateFormat,
584
+ }),
585
+ };
586
+ });
587
+ }
588
+ getViewType(taskListColumnColumnDisplayType) {
589
+ switch (taskListColumnColumnDisplayType) {
590
+ case 'arrayCount':
591
+ return 'relatedFiles';
592
+ case 'underscoresToSpaces':
593
+ return 'stringReplaceUnderscore';
594
+ default:
595
+ return taskListColumnColumnDisplayType;
596
+ }
597
+ }
598
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListColumnService, deps: [{ token: TaskService }, { token: TaskListService }, { token: TaskListSortService }], target: i0.ɵɵFactoryTarget.Injectable }); }
599
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListColumnService }); }
600
+ }
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListColumnService, decorators: [{
602
+ type: Injectable
603
+ }], ctorParameters: () => [{ type: TaskService }, { type: TaskListService }, { type: TaskListSortService }] });
604
+
605
+ /*
606
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
607
+ *
608
+ * Licensed under EUPL, Version 1.2 (the "License");
609
+ * you may not use this file except in compliance with the License.
610
+ * You may obtain a copy of the License at
611
+ *
612
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
613
+ *
614
+ * Unless required by applicable law or agreed to in writing, software
615
+ * distributed under the License is distributed on an "AS IS" basis,
616
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
617
+ * See the License for the specific language governing permissions and
618
+ * limitations under the License.
619
+ */
620
+ class TaskListPaginationService {
621
+ get paginationForCurrentTaskType$() {
622
+ return this._paginationForCurrentTaskType$;
623
+ }
624
+ get paginationForCurrentTaskTypeForList$() {
625
+ return this._paginationForCurrentTaskType$.pipe(map(pagination => ({ ...pagination, page: pagination?.page + 1 || 1 })));
626
+ }
627
+ constructor(taskListService) {
628
+ this.taskListService = taskListService;
629
+ this._pagination$ = new BehaviorSubject({
630
+ [TaskListTab.ALL]: this.getDefaultPagination(),
631
+ [TaskListTab.MINE]: this.getDefaultPagination(),
632
+ [TaskListTab.OPEN]: this.getDefaultPagination(),
633
+ });
634
+ this._paginationForCurrentTaskType$ = combineLatest([
635
+ this.taskListService.selectedTaskType$,
636
+ this._pagination$,
637
+ ]).pipe(map(([selectedTaskType, pagination]) => pagination[selectedTaskType]));
638
+ }
639
+ updateTaskPagination(taskType, updatedPagination) {
640
+ this._pagination$.pipe(take(1)).subscribe(pagination => {
641
+ const currentPagination = pagination[taskType];
642
+ this._pagination$.next({
643
+ ...pagination,
644
+ [taskType]: { ...currentPagination, ...updatedPagination },
645
+ });
646
+ });
647
+ }
648
+ getLastAvailablePage(page, size, collectionSize) {
649
+ if (this.isNumber(page) && this.isNumber(size) && this.isNumber(collectionSize) && page !== 0) {
650
+ const amountOfPages = Math.ceil(collectionSize / size);
651
+ if (page + 1 > amountOfPages) {
652
+ return amountOfPages - 1;
653
+ }
654
+ }
655
+ return page;
656
+ }
657
+ isNumber(value) {
658
+ return typeof value === 'number';
659
+ }
660
+ getDefaultPagination() {
661
+ return {
662
+ page: 0,
663
+ size: 10,
664
+ };
665
+ }
666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListPaginationService, deps: [{ token: TaskListService }], target: i0.ɵɵFactoryTarget.Injectable }); }
667
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListPaginationService }); }
668
+ }
669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListPaginationService, decorators: [{
670
+ type: Injectable
671
+ }], ctorParameters: () => [{ type: TaskListService }] });
672
+
673
+ /*
674
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
675
+ *
676
+ * Licensed under EUPL, Version 1.2 (the "License");
677
+ * you may not use this file except in compliance with the License.
678
+ * You may obtain a copy of the License at
679
+ *
680
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
681
+ *
682
+ * Unless required by applicable law or agreed to in writing, software
683
+ * distributed under the License is distributed on an "AS IS" basis,
684
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
685
+ * See the License for the specific language governing permissions and
686
+ * limitations under the License.
687
+ */
688
+ class TaskListSearchService {
689
+ get loadingSearchFields$() {
690
+ return this._loadingSearchFields$.asObservable();
691
+ }
692
+ get otherFilters$() {
693
+ return this._otherFilters$.asObservable();
694
+ }
695
+ constructor(configService, taskListService, taskService) {
696
+ this.configService = configService;
697
+ this.taskListService = taskListService;
698
+ this.taskService = taskService;
699
+ this._loadingSearchFields$ = new BehaviorSubject(true);
700
+ this._otherFilters$ = new BehaviorSubject([]);
701
+ this.searchFields$ = this.taskListService.caseDefinitionName$.pipe(tap(() => this._loadingSearchFields$.next(true)), switchMap(caseDefinitionName => caseDefinitionName
702
+ ? this.taskService.getTaskListSearchFields(caseDefinitionName)
703
+ : of([])), map$1(searchFields => searchFields.map(searchField => {
704
+ const fieldTypeLowerCase = searchField.fieldType?.toLowerCase();
705
+ return {
706
+ ...searchField,
707
+ dataType: searchField.dataType?.toLowerCase(),
708
+ fieldType: fieldTypeLowerCase === 'text_contains' ? 'single' : fieldTypeLowerCase,
709
+ matchType: searchField?.matchType?.toLowerCase(),
710
+ };
711
+ })), tap(() => this._loadingSearchFields$.next(false)));
712
+ }
713
+ setSearchFieldValues(searchFieldValues) {
714
+ this._otherFilters$.next(this.mapSearchValuesToFilters(searchFieldValues));
715
+ }
716
+ setOtherFilters(otherFilters) {
717
+ this._otherFilters$.next(otherFilters);
718
+ }
719
+ resetOtherFilters() {
720
+ this._otherFilters$.next([]);
721
+ }
722
+ mapOtherFilterToSearchValues(otherFilters) {
723
+ return otherFilters.reduce((acc, curr) => {
724
+ const filter = curr;
725
+ if (filter.rangeFrom) {
726
+ return {
727
+ ...acc,
728
+ [filter.key]: {
729
+ start: filter.rangeFrom,
730
+ end: filter.rangeTo,
731
+ },
732
+ };
733
+ }
734
+ else if (filter.multiValue) {
735
+ return { ...acc, [filter.key]: filter.values };
736
+ }
737
+ else if (Array.isArray(filter.values) && filter.values.length > 0 && !filter.multiValue) {
738
+ return { ...acc, [filter.key]: filter.values[0] };
739
+ }
740
+ return acc;
741
+ }, {});
742
+ }
743
+ mapSearchValuesToFilters(values) {
744
+ const filters = [];
745
+ Object.keys(values).forEach(valueKey => {
746
+ const searchValue = values[valueKey];
747
+ if (searchValue.start) {
748
+ filters.push({ key: valueKey, rangeFrom: searchValue.start, rangeTo: searchValue.end });
749
+ }
750
+ else if (Array.isArray(searchValue)) {
751
+ filters.push({ key: valueKey, values: searchValue, multiValue: true });
752
+ }
753
+ else {
754
+ filters.push({ key: valueKey, values: [searchValue], multiValue: false });
755
+ }
756
+ });
757
+ return filters;
758
+ }
759
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListSearchService, deps: [{ token: i2.ConfigService }, { token: TaskListService }, { token: TaskService }], target: i0.ɵɵFactoryTarget.Injectable }); }
760
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListSearchService }); }
761
+ }
762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListSearchService, decorators: [{
763
+ type: Injectable
764
+ }], ctorParameters: () => [{ type: i2.ConfigService }, { type: TaskListService }, { type: TaskService }] });
765
+
766
+ /*
767
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
768
+ *
769
+ * Licensed under EUPL, Version 1.2 (the "License");
770
+ * you may not use this file except in compliance with the License.
771
+ * You may obtain a copy of the License at
772
+ *
773
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
774
+ *
775
+ * Unless required by applicable law or agreed to in writing, software
776
+ * distributed under the License is distributed on an "AS IS" basis,
777
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
778
+ * See the License for the specific language governing permissions and
779
+ * limitations under the License.
780
+ */
781
+ class TaskListQueryParamService {
782
+ setTaskListParams(params) {
783
+ const queryParams = omit(params, 'reload');
784
+ const encodedQueryParams = Object.keys(queryParams).reduce((acc, curr) => ({ ...acc, [curr]: this.objectToBase64(queryParams[curr]) }), {});
785
+ this.router.navigate([this.getUrlWithoutParams()], { queryParams: encodedQueryParams });
786
+ }
787
+ constructor(router, route) {
788
+ this.router = router;
789
+ this.route = route;
790
+ }
791
+ getTaskListQueryParams() {
792
+ const queryParams = this.route.snapshot.queryParams;
793
+ const decodedParams = Object.keys(queryParams).reduce((acc, curr) => ({ ...acc, [curr]: this.parseBase64(queryParams[curr]) }), {});
794
+ return decodedParams;
795
+ }
796
+ getUrlWithoutParams() {
797
+ const urlTree = this.router.parseUrl(this.router.url);
798
+ urlTree.queryParams = {};
799
+ urlTree.fragment = null;
800
+ return urlTree.toString();
801
+ }
802
+ objectToBase64(jsObject) {
803
+ return btoa(JSON.stringify(jsObject));
804
+ }
805
+ parseBase64(base64string) {
806
+ return JSON.parse(atob(base64string));
807
+ }
808
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListQueryParamService, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable }); }
809
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListQueryParamService }); }
810
+ }
811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListQueryParamService, decorators: [{
812
+ type: Injectable
813
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }] });
176
814
 
177
815
  /*
178
- * Copyright 2015-2023 Ritense BV, the Netherlands.
816
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
817
+ *
818
+ * Licensed under EUPL, Version 1.2 (the "License");
819
+ * you may not use this file except in compliance with the License.
820
+ * You may obtain a copy of the License at
821
+ *
822
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
823
+ *
824
+ * Unless required by applicable law or agreed to in writing, software
825
+ * distributed under the License is distributed on an "AS IS" basis,
826
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
827
+ * See the License for the specific language governing permissions and
828
+ * limitations under the License.
829
+ */
830
+
831
+ /*
832
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
179
833
  *
180
834
  * Licensed under EUPL, Version 1.2 (the "License");
181
835
  * you may not use this file except in compliance with the License.
@@ -193,45 +847,45 @@ class AssignUserToTaskComponent {
193
847
  constructor(taskService) {
194
848
  this.taskService = taskService;
195
849
  this.assignmentOfTaskChanged = new EventEmitter();
196
- this.assignedEmailOnServer$ = new BehaviorSubject(null);
850
+ this.assignedIdOnServer$ = new BehaviorSubject(null);
197
851
  this.assignedUserFullName$ = new BehaviorSubject(null);
198
852
  this.candidateUsersForTask$ = new BehaviorSubject(undefined);
199
853
  this.disabled$ = new BehaviorSubject(true);
200
- this.userEmailToAssign = null;
854
+ this.userIdToAssign = null;
201
855
  this._subscriptions = new Subscription();
202
856
  }
203
857
  ngOnInit() {
204
858
  this._subscriptions.add(this.taskService.getCandidateUsers(this.taskId).subscribe(candidateUsers => {
205
859
  this.candidateUsersForTask$.next(candidateUsers);
206
- if (this.assigneeEmail) {
207
- this.assignedEmailOnServer$.next(this.assigneeEmail);
208
- this.userEmailToAssign = this.assigneeEmail;
209
- this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, this.assigneeEmail));
860
+ if (this.assigneeId) {
861
+ this.assignedIdOnServer$.next(this.assigneeId);
862
+ this.userIdToAssign = this.assigneeId;
863
+ this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, this.assigneeId));
210
864
  }
211
865
  this.enable();
212
866
  }));
213
867
  }
214
868
  ngOnChanges(changes) {
215
- this.candidateUsersForTask$.pipe(take(1)).subscribe(candidateUsers => {
216
- const currentUserEmail = changes.assigneeEmail?.currentValue || this.assigneeEmail;
217
- this.assignedEmailOnServer$.next(currentUserEmail || null);
218
- this.userEmailToAssign = currentUserEmail || null;
219
- this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers ?? [], currentUserEmail));
869
+ this.candidateUsersForTask$.pipe(take$1(1)).subscribe(candidateUsers => {
870
+ const currentUserId = changes.assigneeId?.currentValue || this.assigneeId;
871
+ this.assignedIdOnServer$.next(currentUserId || null);
872
+ this.userIdToAssign = currentUserId || null;
873
+ this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers ?? [], currentUserId));
220
874
  });
221
875
  }
222
876
  ngOnDestroy() {
223
877
  this._subscriptions.unsubscribe();
224
878
  }
225
- assignTask(userEmail) {
879
+ assignTask(userId) {
226
880
  this.disable();
227
881
  combineLatest([
228
882
  this.candidateUsersForTask$,
229
- this.taskService.assignTask(this.taskId, { assignee: userEmail }),
883
+ this.taskService.assignTask(this.taskId, { assignee: userId }),
230
884
  ])
231
- .pipe(take(1), tap(([candidateUsers]) => {
232
- this.userEmailToAssign = userEmail;
233
- this.assignedEmailOnServer$.next(userEmail);
234
- this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers ?? [], userEmail));
885
+ .pipe(take$1(1), tap(([candidateUsers]) => {
886
+ this.userIdToAssign = userId;
887
+ this.assignedIdOnServer$.next(userId);
888
+ this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers ?? [], userId));
235
889
  this.emitChange();
236
890
  this.enable();
237
891
  }))
@@ -248,23 +902,23 @@ class AssignUserToTaskComponent {
248
902
  }))
249
903
  .subscribe();
250
904
  }
251
- getAssignedUserName(users, userEmail) {
252
- if (users && userEmail) {
253
- const findUser = users.find(user => user.email === userEmail);
254
- return findUser ? findUser.label : userEmail;
905
+ getAssignedUserName(users, userId) {
906
+ if (users && userId) {
907
+ const findUser = users.find(user => user.id === userId) || users.find(user => user.userName === userId);
908
+ return findUser ? findUser.label : userId;
255
909
  }
256
- return userEmail || '-';
910
+ return userId || '-';
257
911
  }
258
912
  mapUsersForDropdown(users) {
259
913
  return (users &&
260
914
  users
261
915
  .map(user => ({ ...user, lastName: user.lastName?.split(' ').splice(-1)[0] || '' }))
262
916
  .sort((a, b) => a.lastName.localeCompare(b.lastName))
263
- .map(user => ({ text: user.label, id: user.email })));
917
+ .map(user => ({ text: user.label, id: user.id })));
264
918
  }
265
919
  clear() {
266
- this.assignedEmailOnServer$.next(null);
267
- this.userEmailToAssign = null;
920
+ this.assignedIdOnServer$.next(null);
921
+ this.userIdToAssign = null;
268
922
  }
269
923
  emitChange() {
270
924
  this.assignmentOfTaskChanged.emit();
@@ -275,22 +929,71 @@ class AssignUserToTaskComponent {
275
929
  disable() {
276
930
  this.disabled$.next(true);
277
931
  }
278
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AssignUserToTaskComponent, deps: [{ token: TaskService }], target: i0.ɵɵFactoryTarget.Component }); }
279
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: { taskId: "taskId", assigneeEmail: "assigneeEmail" }, outputs: { assignmentOfTaskChanged: "assignmentOfTaskChanged" }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n candidateUsers: candidateUsersForTask$ | async,\n disabled: disabled$ | async,\n emailOnServer: assignedEmailOnServer$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row mt-2 mb-2\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <valtimo-searchable-dropdown-select\n *ngIf=\"obs.candidateUsers; else loading\"\n [style]=\"'underlinedText'\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [buttonText]=\"'assignTask.header' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [disabled]=\"obs.disabled\"\n [selectedText]=\"'assignTask.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [clearSelectionButtonTitle]=\"'assignTask.remove' | translate\"\n [hasSelection]=\"userEmailToAssign === obs.emailOnServer && obs.emailOnServer !== null\"\n [width]=\"250\"\n (itemSelected)=\"assignTask($event)\"\n (clearSelection)=\"unassignTask()\"\n >\n </valtimo-searchable-dropdown-select>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignTask.fetchingUsers' | translate }}</b>\n </h5>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.container-fluid{color:#959595}i{font-size:13px}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.SearchableDropdownSelectComponent, selector: "valtimo-searchable-dropdown-select", inputs: ["style", "items", "buttonText", "searchText", "noResultsText", "disabled", "selectedText", "selectedTextValue", "clearSelectionButtonTitle", "hasSelection", "width", "hasPermission"], outputs: ["itemSelected", "clearSelection"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i8$1.TranslatePipe, name: "translate" }] }); }
932
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AssignUserToTaskComponent, deps: [{ token: TaskService }], target: i0.ɵɵFactoryTarget.Component }); }
933
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: { taskId: "taskId", assigneeId: "assigneeId" }, outputs: { assignmentOfTaskChanged: "assignmentOfTaskChanged" }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n candidateUsers: candidateUsersForTask$ | async,\n disabled: disabled$ | async,\n idOnServer: assignedIdOnServer$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row mt-2 mb-2\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <valtimo-searchable-dropdown-select\n *ngIf=\"obs.candidateUsers; else loading\"\n [style]=\"'underlinedText'\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [buttonText]=\"'assignTask.header' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [disabled]=\"obs.disabled\"\n [selectedText]=\"'assignTask.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [clearSelectionButtonTitle]=\"'assignTask.remove' | translate\"\n [hasSelection]=\"userIdToAssign === obs.idOnServer && obs.idOnServer !== null\"\n [width]=\"250\"\n (itemSelected)=\"assignTask($event)\"\n (clearSelection)=\"unassignTask()\"\n >\n </valtimo-searchable-dropdown-select>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignTask.fetchingUsers' | translate }}</b>\n </h5>\n</ng-template>\n", styles: [".container-fluid{color:#959595}i{font-size:13px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.SearchableDropdownSelectComponent, selector: "valtimo-searchable-dropdown-select", inputs: ["style", "items", "buttonText", "searchText", "noResultsText", "disabled", "selectedText", "selectedTextValue", "clearSelectionButtonTitle", "hasSelection", "width", "hasPermission", "showClearSelection"], outputs: ["itemSelected", "clearSelection"] }, { kind: "pipe", type: i10.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] }); }
280
934
  }
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AssignUserToTaskComponent, decorators: [{
935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AssignUserToTaskComponent, decorators: [{
282
936
  type: Component,
283
- args: [{ selector: 'valtimo-assign-user-to-task', template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n candidateUsers: candidateUsersForTask$ | async,\n disabled: disabled$ | async,\n emailOnServer: assignedEmailOnServer$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row mt-2 mb-2\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <valtimo-searchable-dropdown-select\n *ngIf=\"obs.candidateUsers; else loading\"\n [style]=\"'underlinedText'\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [buttonText]=\"'assignTask.header' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [disabled]=\"obs.disabled\"\n [selectedText]=\"'assignTask.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [clearSelectionButtonTitle]=\"'assignTask.remove' | translate\"\n [hasSelection]=\"userEmailToAssign === obs.emailOnServer && obs.emailOnServer !== null\"\n [width]=\"250\"\n (itemSelected)=\"assignTask($event)\"\n (clearSelection)=\"unassignTask()\"\n >\n </valtimo-searchable-dropdown-select>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignTask.fetchingUsers' | translate }}</b>\n </h5>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.container-fluid{color:#959595}i{font-size:13px}\n"] }]
284
- }], ctorParameters: function () { return [{ type: TaskService }]; }, propDecorators: { taskId: [{
937
+ args: [{ selector: 'valtimo-assign-user-to-task', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n candidateUsers: candidateUsersForTask$ | async,\n disabled: disabled$ | async,\n idOnServer: assignedIdOnServer$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row mt-2 mb-2\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <valtimo-searchable-dropdown-select\n *ngIf=\"obs.candidateUsers; else loading\"\n [style]=\"'underlinedText'\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [buttonText]=\"'assignTask.header' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [disabled]=\"obs.disabled\"\n [selectedText]=\"'assignTask.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [clearSelectionButtonTitle]=\"'assignTask.remove' | translate\"\n [hasSelection]=\"userIdToAssign === obs.idOnServer && obs.idOnServer !== null\"\n [width]=\"250\"\n (itemSelected)=\"assignTask($event)\"\n (clearSelection)=\"unassignTask()\"\n >\n </valtimo-searchable-dropdown-select>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignTask.fetchingUsers' | translate }}</b>\n </h5>\n</ng-template>\n", styles: [".container-fluid{color:#959595}i{font-size:13px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
938
+ }], ctorParameters: () => [{ type: TaskService }], propDecorators: { taskId: [{
285
939
  type: Input
286
- }], assigneeEmail: [{
940
+ }], assigneeId: [{
287
941
  type: Input
288
942
  }], assignmentOfTaskChanged: [{
289
943
  type: Output
290
944
  }] } });
291
945
 
292
946
  /*
293
- * Copyright 2015-2023 Ritense BV, the Netherlands.
947
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
948
+ *
949
+ * Licensed under EUPL, Version 1.2 (the "License");
950
+ * you may not use this file except in compliance with the License.
951
+ * You may obtain a copy of the License at
952
+ *
953
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
954
+ *
955
+ * Unless required by applicable law or agreed to in writing, software
956
+ * distributed under the License is distributed on an "AS IS" basis,
957
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
958
+ * See the License for the specific language governing permissions and
959
+ * limitations under the License.
960
+ */
961
+ class TaskIntermediateSaveService extends BaseApiService {
962
+ constructor(httpClient, configService) {
963
+ super(httpClient, configService);
964
+ this.httpClient = httpClient;
965
+ this.configService = configService;
966
+ }
967
+ getIntermediateSubmission(taskInstanceId) {
968
+ return this.httpClient.get(this.getApiUrl('/v1/form/intermediate/submission'), {
969
+ params: {
970
+ taskInstanceId,
971
+ },
972
+ headers: new HttpHeaders().set(InterceptorSkip, '404'),
973
+ });
974
+ }
975
+ storeIntermediateSubmission(request) {
976
+ return this.httpClient.post(this.getApiUrl('/v1/form/intermediate/submission'), request, {
977
+ headers: new HttpHeaders().set(InterceptorSkip, '400'),
978
+ });
979
+ }
980
+ clearIntermediateSubmission(taskInstanceId) {
981
+ return this.httpClient.delete(this.getApiUrl('/v1/form/intermediate/submission'), {
982
+ params: {
983
+ taskInstanceId,
984
+ },
985
+ });
986
+ }
987
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskIntermediateSaveService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
988
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskIntermediateSaveService, providedIn: 'root' }); }
989
+ }
990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskIntermediateSaveService, decorators: [{
991
+ type: Injectable,
992
+ args: [{ providedIn: 'root' }]
993
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
994
+
995
+ /*
996
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
294
997
  *
295
998
  * Licensed under EUPL, Version 1.2 (the "License");
296
999
  * you may not use this file except in compliance with the License.
@@ -306,7 +1009,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
306
1009
  */
307
1010
  moment.locale(localStorage.getItem('langKey') || '');
308
1011
  class TaskDetailModalComponent {
309
- constructor(toastr, processLinkService, router, taskService, userProviderService, modalService, stateService, documentService, translateService) {
1012
+ constructor(toastr, processLinkService, router, taskService, userProviderService, modalService, stateService, documentService, translateService, formViewModel, taskIntermediateSaveService, configService, iconService) {
310
1013
  this.toastr = toastr;
311
1014
  this.processLinkService = processLinkService;
312
1015
  this.router = router;
@@ -316,10 +1019,20 @@ class TaskDetailModalComponent {
316
1019
  this.stateService = stateService;
317
1020
  this.documentService = documentService;
318
1021
  this.translateService = translateService;
1022
+ this.formViewModel = formViewModel;
1023
+ this.taskIntermediateSaveService = taskIntermediateSaveService;
1024
+ this.configService = configService;
1025
+ this.iconService = iconService;
319
1026
  this.formSubmit = new EventEmitter();
320
1027
  this.assignmentOfTaskChanged = new EventEmitter();
1028
+ this.intermediateSaveEnabled = false;
1029
+ this.currentIntermediateSave = null;
321
1030
  this.task$ = new BehaviorSubject(null);
1031
+ this.taskInstanceId$ = new BehaviorSubject(null);
322
1032
  this.formDefinition$ = new BehaviorSubject(undefined);
1033
+ this.formDefinitionId$ = new BehaviorSubject(undefined);
1034
+ this.formName$ = new BehaviorSubject(undefined);
1035
+ this.submission$ = new BehaviorSubject({});
323
1036
  this.formFlowInstanceId$ = new BehaviorSubject(undefined);
324
1037
  this.page$ = new BehaviorSubject(null);
325
1038
  this.formioOptions$ = new BehaviorSubject(null);
@@ -329,28 +1042,21 @@ class TaskDetailModalComponent {
329
1042
  .pipe(map(userIdentity => userIdentity?.roles?.includes('ROLE_ADMIN')));
330
1043
  this.formIoFormData$ = new BehaviorSubject(null);
331
1044
  this.loading$ = new BehaviorSubject(true);
1045
+ this.showConfirmationModal$ = new BehaviorSubject(false);
332
1046
  this.taskProcessLinkType$ = new BehaviorSubject(null);
333
1047
  this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
1048
+ this.processLinkIsFormViewModel$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-view-model'));
334
1049
  this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
335
1050
  this.processLinkId$ = new BehaviorSubject(undefined);
336
- this._subscriptions = new Subscription();
337
1051
  const options = new FormioOptionsImpl();
338
1052
  options.disableAlerts = true;
339
1053
  this.formioOptions$.next(options);
340
- }
341
- ngAfterViewInit() {
342
- this._subscriptions.add(this.modal.modalShowing$
343
- .pipe(distinctUntilChanged(), tap(modalShowing => {
344
- if (!modalShowing) {
345
- if (this.formFlow) {
346
- this.formFlow.saveData();
347
- }
348
- }
349
- }))
350
- .subscribe());
1054
+ this.intermediateSaveEnabled = this.configService.featureToggles.enableIntermediateSave;
1055
+ this.iconService.registerAll([RecentlyViewed16]);
351
1056
  }
352
1057
  ngOnDestroy() {
353
- this._subscriptions.unsubscribe();
1058
+ this._fvmSubmissionSubscription?.unsubscribe();
1059
+ this._submissionSubscription?.unsubscribe();
354
1060
  }
355
1061
  openTaskDetails(task) {
356
1062
  this.resetTaskProcessLinkType();
@@ -360,17 +1066,18 @@ class TaskDetailModalComponent {
360
1066
  const documentId = task.businessKey;
361
1067
  this.stateService.setDocumentId(documentId);
362
1068
  this.task$.next(task);
1069
+ this.taskInstanceId$.next(task.id);
363
1070
  this.page$.next({
364
1071
  title: task.name,
365
1072
  subtitle: `${this.translateService.instant('taskDetail.taskCreated')} ${task.created}`,
366
1073
  });
367
1074
  //only load from formlink when process link failed for backwards compatibility
368
1075
  if (!this.taskProcessLinkType$.getValue()) {
369
- this.modal.show();
1076
+ this.openModal();
370
1077
  }
371
1078
  }
372
1079
  gotoProcessLinkScreen() {
373
- this.modal.hide();
1080
+ this.closeModal();
374
1081
  this.router.navigate(['process-links']);
375
1082
  }
376
1083
  onChange(event) {
@@ -383,7 +1090,7 @@ class TaskDetailModalComponent {
383
1090
  this.formIoFormData$.next(submission.data);
384
1091
  }
385
1092
  combineLatest([this.processLinkId$, this.taskProcessLinkType$, this.task$])
386
- .pipe(take$1(1))
1093
+ .pipe(take(1))
387
1094
  .subscribe(([processLinkId, taskProcessLinkType, task]) => {
388
1095
  if (taskProcessLinkType === 'form') {
389
1096
  if (processLinkId) {
@@ -399,12 +1106,15 @@ class TaskDetailModalComponent {
399
1106
  });
400
1107
  }
401
1108
  }
1109
+ else if (taskProcessLinkType === 'form-view-model') {
1110
+ this.completeTask();
1111
+ }
402
1112
  });
403
1113
  }
404
1114
  completeTask() {
405
- this.task$.pipe(take$1(1)).subscribe(task => {
1115
+ this.task$.pipe(take(1)).subscribe(task => {
406
1116
  this.toastr.success(`${task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
407
- this.modal.hide();
1117
+ this.closeModal();
408
1118
  this.task$.next(null);
409
1119
  this.formSubmit.emit();
410
1120
  });
@@ -421,38 +1131,31 @@ class TaskDetailModalComponent {
421
1131
  case 'form':
422
1132
  this.taskProcessLinkType$.next('form');
423
1133
  this.processLinkId$.next(res.processLinkId);
1134
+ if (this.intermediateSaveEnabled)
1135
+ this.getCurrentProgress();
424
1136
  this.setFormDefinitionAndOpenModal(res.properties.prefilledForm);
425
1137
  break;
426
1138
  case 'form-flow':
427
1139
  this.taskProcessLinkType$.next('form-flow');
428
1140
  this.formFlowInstanceId$.next(res.properties.formFlowInstanceId);
429
1141
  break;
1142
+ case 'form-view-model':
1143
+ this.taskProcessLinkType$.next('form-view-model');
1144
+ this.processLinkId$.next(res.processLinkId);
1145
+ this.formDefinition$.next(res.properties.formDefinition);
1146
+ this.formName$.next(res.properties.formName);
1147
+ this.openModal();
1148
+ this.setFormViewModelComponent();
1149
+ break;
430
1150
  }
431
1151
  this.loading$.next(false);
432
1152
  }
433
- else {
434
- this.getLegacyTaskProcessLink(taskId);
435
- }
436
1153
  },
437
1154
  error: _ => {
438
- this.getLegacyTaskProcessLink(taskId);
1155
+ this.loading$.next(false);
439
1156
  },
440
1157
  });
441
1158
  }
442
- getLegacyTaskProcessLink(taskId) {
443
- this.taskService.getTaskProcessLinkV1(taskId).subscribe(resV1 => {
444
- switch (resV1?.type) {
445
- case 'form':
446
- this.taskProcessLinkType$.next('form');
447
- break;
448
- case 'form-flow':
449
- this.taskProcessLinkType$.next('form-flow');
450
- this.formFlowInstanceId$.next(resV1.properties.formFlowInstanceId);
451
- break;
452
- }
453
- this.loading$.next(false);
454
- });
455
- }
456
1159
  resetTaskProcessLinkType() {
457
1160
  this.taskProcessLinkType$.next(null);
458
1161
  this.processLinkId$.next(null);
@@ -460,7 +1163,7 @@ class TaskDetailModalComponent {
460
1163
  setFormDefinitionAndOpenModal(formDefinition) {
461
1164
  this.taskProcessLinkType$.next('form');
462
1165
  this.formDefinition$.next(formDefinition);
463
- this.modal.show();
1166
+ this.openModal();
464
1167
  }
465
1168
  setDocumentDefinitionNameInService(task) {
466
1169
  this.documentService
@@ -471,13 +1174,108 @@ class TaskDetailModalComponent {
471
1174
  this.stateService.setDocumentDefinitionName(documentDefinitionName);
472
1175
  });
473
1176
  }
474
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$1.ProcessLinkService }, { token: i3.Router }, { token: TaskService }, { token: i5.UserProviderService }, { token: i6.ValtimoModalService }, { token: i6.FormIoStateService }, { token: i7.DocumentService }, { token: i8$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
475
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #taskDetailModal\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n formDefinition: formDefinition$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"obs.page?.title\"\n [subtitle]=\"obs.page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n body\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n </div>\n <div body *ngIf=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!!obs.formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoProcessLinkScreen()\"\n id=\"process-link-button\"\n >\n {{ 'formManagement.gotoProcessLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\n <ng-container *ngIf=\"task$ | async as task\">\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeEmail]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */#taskDetailModal .formio-component-submit{text-align:right}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i2$1.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete"] }, { kind: "component", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeEmail"], outputs: ["assignmentOfTaskChanged"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i8$1.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
1177
+ setFormViewModelComponent() {
1178
+ this.formViewModelDynamicContainer.clear();
1179
+ if (!this.formViewModel)
1180
+ return;
1181
+ const formViewModelComponent = this.formViewModelDynamicContainer.createComponent(this.formViewModel.component);
1182
+ formViewModelComponent.instance.form = this.formDefinition$.getValue();
1183
+ formViewModelComponent.instance.formName = this.formName$.getValue();
1184
+ formViewModelComponent.instance.taskInstanceId = this.taskInstanceId$.getValue();
1185
+ formViewModelComponent.instance.isStartForm = false;
1186
+ formViewModelComponent.instance.formSubmit.pipe(take(1)).subscribe(() => {
1187
+ this.completeTask();
1188
+ this.closeModal();
1189
+ });
1190
+ if (this.intermediateSaveEnabled) {
1191
+ this._fvmSubmissionSubscription = formViewModelComponent.instance.submission$.subscribe(submission => {
1192
+ this.submission$.next(submission);
1193
+ });
1194
+ this._submissionSubscription = this.submission$
1195
+ .pipe(distinctUntilChanged())
1196
+ .subscribe((submission) => {
1197
+ if (submission?.data && Object.keys(submission.data).length === 0) {
1198
+ formViewModelComponent.instance.submission = { data: {} };
1199
+ }
1200
+ });
1201
+ this.getCurrentProgress(formViewModelComponent);
1202
+ }
1203
+ }
1204
+ getCurrentProgress(formViewModelComponentRef) {
1205
+ this.taskInstanceId$
1206
+ .pipe(take(1), switchMap$1((taskInstanceId) => this.taskIntermediateSaveService.getIntermediateSubmission(taskInstanceId)))
1207
+ .subscribe({
1208
+ next: (intermediateSubmission) => {
1209
+ this.submission$.next({ data: intermediateSubmission.submission });
1210
+ this.currentIntermediateSave = this.formatIntermediateSubmission(intermediateSubmission);
1211
+ if (formViewModelComponentRef) {
1212
+ formViewModelComponentRef.instance.submission = {
1213
+ data: intermediateSubmission.submission,
1214
+ };
1215
+ }
1216
+ },
1217
+ });
1218
+ }
1219
+ saveCurrentProgress() {
1220
+ const intermediateSaveRequest = {
1221
+ submission: this.submission$.getValue().data
1222
+ ? this.submission$.getValue().data
1223
+ : this.formIoFormData$.getValue(),
1224
+ taskInstanceId: this.taskInstanceId$.getValue(),
1225
+ };
1226
+ this.taskIntermediateSaveService
1227
+ .storeIntermediateSubmission(intermediateSaveRequest)
1228
+ .pipe(take(1))
1229
+ .subscribe({
1230
+ next: intermediateSubmission => {
1231
+ this.toastr.success(this.translateService.instant('formManagement.intermediateSave.success'));
1232
+ this.currentIntermediateSave = this.formatIntermediateSubmission(intermediateSubmission);
1233
+ },
1234
+ error: () => {
1235
+ this.toastr.error(this.translateService.instant('formManagement.intermediateSave.error'));
1236
+ },
1237
+ });
1238
+ }
1239
+ clearCurrentProgress() {
1240
+ this.taskInstanceId$
1241
+ .pipe(take(1), switchMap$1((taskInstanceId) => this.taskIntermediateSaveService.clearIntermediateSubmission(taskInstanceId)))
1242
+ .subscribe({
1243
+ next: () => {
1244
+ this.submission$.next({ data: {} });
1245
+ this.currentIntermediateSave = null;
1246
+ },
1247
+ });
1248
+ }
1249
+ formatIntermediateSubmission(intermediateSubmission) {
1250
+ intermediateSubmission.createdOn = moment(intermediateSubmission.createdOn).format('DD MMM YYYY HH:mm');
1251
+ if (intermediateSubmission.editedOn) {
1252
+ intermediateSubmission.editedOn = moment(new Date(intermediateSubmission.editedOn)).format('DD MMM YYYY HH:mm');
1253
+ }
1254
+ return intermediateSubmission;
1255
+ }
1256
+ openModal() {
1257
+ this.modal.open = true;
1258
+ }
1259
+ closeModal() {
1260
+ this.modal.open = false;
1261
+ this._fvmSubmissionSubscription?.unsubscribe();
1262
+ this._submissionSubscription?.unsubscribe();
1263
+ if (this.formFlow) {
1264
+ this.formFlow.saveData();
1265
+ }
1266
+ }
1267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$2.ToastrService }, { token: i2$1.ProcessLinkService }, { token: i1$1.Router }, { token: TaskService }, { token: i5.UserProviderService }, { token: i6.ValtimoModalService }, { token: i6.FormIoStateService }, { token: i7.DocumentService }, { token: i8.TranslateService }, { token: FORM_VIEW_MODEL_TOKEN, optional: true }, { token: TaskIntermediateSaveService }, { token: i2.ConfigService }, { token: i11.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
1268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], descendants: true }, { propertyName: "formViewModelDynamicContainer", first: true, predicate: ["formViewModelComponent"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<cds-modal #taskDetailModal id=\"taskDetailModal\">\n <cds-modal-header (closeSelect)=\"closeModal()\">\n <div class=\"cds-modal-header\">\n <div class=\"title-container\">\n <p class=\"cds--modal-header__heading cds--type-beta\">{{ (page$ | async)?.title }}</p>\n <p class=\"cds--modal-header__label cds--type-delta\">{{ (page$ | async)?.subtitle }}</p>\n <p class=\"cds--modal-header__label cds--type-delta\" *ngIf=\"currentIntermediateSave\">\n {{ 'formManagement.intermediateSave.lastSavedBy' | translate }}:\n {{\n currentIntermediateSave?.editedBy\n ? currentIntermediateSave?.editedBy\n : currentIntermediateSave.createdBy\n }}\n {{ 'formManagement.intermediateSave.on' | translate }}:\n {{\n currentIntermediateSave?.editedOn\n ? currentIntermediateSave?.editedOn\n : currentIntermediateSave.createdOn\n }}\n </p>\n <ng-container *ngTemplateOutlet=\"assignUserToTask\"></ng-container>\n </div>\n <div\n *ngIf=\"intermediateSaveEnabled && (formFlowInstanceId$ | async) === undefined\"\n class=\"save-buttons-margin\"\n >\n <cds-tooltip\n [caret]=\"true\"\n enterDelayMs=\"0\"\n leaveDelayMs=\"0\"\n [description]=\"'formManagement.intermediateSave.save' | translate\"\n >\n <button\n cdsButton=\"ghost\"\n iconOnly=\"true\"\n cdsIcon=\"save\"\n (click)=\"saveCurrentProgress()\"\n ></button>\n </cds-tooltip>\n <cds-tooltip\n [caret]=\"true\"\n enterDelayMs=\"0\"\n leaveDelayMs=\"0\"\n [description]=\"'formManagement.intermediateSave.clear' | translate\"\n >\n <button\n cdsButton=\"ghost\"\n iconOnly=\"true\"\n cdsIcon=\"recently-viewed\"\n [disabled]=\"!currentIntermediateSave\"\n (click)=\"showConfirmationModal$.next(true)\"\n ></button>\n </cds-tooltip>\n </div>\n </div>\n </cds-modal-header>\n <div\n body\n class=\"cds--modal-content pb-1\"\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n taskId: taskInstanceId$ | async,\n formDefinition: formDefinition$ | async,\n formDefinitionId: formDefinitionId$ | async,\n formName: formName$ | async,\n formIoFormData: formIoFormData$ | async,\n submission: submission$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n processLinkIsFormViewModel: processLinkIsFormViewModel$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n >\n <div *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n [submission]=\"obs.submission\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n </div>\n <div *ngIf=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n </div>\n <div\n footer\n *ngIf=\"{\n formDefinition: formDefinition$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async\n } as obs\"\n >\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!obs.formDefinition && !obs.formFlowInstanceId\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoProcessLinkScreen()\"\n id=\"process-link-button\"\n >\n {{ 'formManagement.gotoProcessLinksButton' | translate }}\n </button>\n </div>\n </div>\n <div body class=\"m-2\">\n <ng-template #formViewModelComponent></ng-template>\n </div>\n</cds-modal>\n\n<valtimo-confirmation-modal\n [showModalSubject$]=\"showConfirmationModal$\"\n (confirmEvent)=\"clearCurrentProgress()\"\n (cancelEvent)=\"showConfirmationModal$.next(false)\"\n cancelButtonType=\"ghost\"\n confirmButtonTextTranslationKey=\"interface.confirm\"\n titleTranslationKey=\"formManagement.intermediateSave.clear\"\n contentTranslationKey=\"formManagement.intermediateSave.clearConfirm\"\n></valtimo-confirmation-modal>\n\n<ng-template #assignUserToTask>\n <ng-container *ngIf=\"task$ | async as task\">\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeId]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\n </ng-container>\n</ng-template>\n", styles: ["#taskDetailModal .formio-component-submit{text-align:right}.cds-modal-header{width:100%;display:flex;justify-content:space-between}.title-container{width:50%}.save-buttons-margin{margin-top:-15px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i11.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i11.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete"] }, { kind: "directive", type: i11.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i11.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i11.Tooltip, selector: "cds-tooltip, ibm-tooltip", inputs: ["id", "enterDelayMs", "leaveDelayMs", "disabled", "description"] }, { kind: "component", type: i6.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "component", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeId"], outputs: ["assignmentOfTaskChanged"] }, { kind: "pipe", type: i10.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
476
1269
  }
477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
1270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
478
1271
  type: Component,
479
- args: [{ selector: 'valtimo-task-detail-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #taskDetailModal\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n formDefinition: formDefinition$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"obs.page?.title\"\n [subtitle]=\"obs.page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n body\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n </div>\n <div body *ngIf=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!!obs.formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoProcessLinkScreen()\"\n id=\"process-link-button\"\n >\n {{ 'formManagement.gotoProcessLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\n <ng-container *ngIf=\"task$ | async as task\">\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeEmail]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */#taskDetailModal .formio-component-submit{text-align:right}\n"] }]
480
- }], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$1.ProcessLinkService }, { type: i3.Router }, { type: TaskService }, { type: i5.UserProviderService }, { type: i6.ValtimoModalService }, { type: i6.FormIoStateService }, { type: i7.DocumentService }, { type: i8$1.TranslateService }]; }, propDecorators: { form: [{
1272
+ args: [{ selector: 'valtimo-task-detail-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<cds-modal #taskDetailModal id=\"taskDetailModal\">\n <cds-modal-header (closeSelect)=\"closeModal()\">\n <div class=\"cds-modal-header\">\n <div class=\"title-container\">\n <p class=\"cds--modal-header__heading cds--type-beta\">{{ (page$ | async)?.title }}</p>\n <p class=\"cds--modal-header__label cds--type-delta\">{{ (page$ | async)?.subtitle }}</p>\n <p class=\"cds--modal-header__label cds--type-delta\" *ngIf=\"currentIntermediateSave\">\n {{ 'formManagement.intermediateSave.lastSavedBy' | translate }}:\n {{\n currentIntermediateSave?.editedBy\n ? currentIntermediateSave?.editedBy\n : currentIntermediateSave.createdBy\n }}\n {{ 'formManagement.intermediateSave.on' | translate }}:\n {{\n currentIntermediateSave?.editedOn\n ? currentIntermediateSave?.editedOn\n : currentIntermediateSave.createdOn\n }}\n </p>\n <ng-container *ngTemplateOutlet=\"assignUserToTask\"></ng-container>\n </div>\n <div\n *ngIf=\"intermediateSaveEnabled && (formFlowInstanceId$ | async) === undefined\"\n class=\"save-buttons-margin\"\n >\n <cds-tooltip\n [caret]=\"true\"\n enterDelayMs=\"0\"\n leaveDelayMs=\"0\"\n [description]=\"'formManagement.intermediateSave.save' | translate\"\n >\n <button\n cdsButton=\"ghost\"\n iconOnly=\"true\"\n cdsIcon=\"save\"\n (click)=\"saveCurrentProgress()\"\n ></button>\n </cds-tooltip>\n <cds-tooltip\n [caret]=\"true\"\n enterDelayMs=\"0\"\n leaveDelayMs=\"0\"\n [description]=\"'formManagement.intermediateSave.clear' | translate\"\n >\n <button\n cdsButton=\"ghost\"\n iconOnly=\"true\"\n cdsIcon=\"recently-viewed\"\n [disabled]=\"!currentIntermediateSave\"\n (click)=\"showConfirmationModal$.next(true)\"\n ></button>\n </cds-tooltip>\n </div>\n </div>\n </cds-modal-header>\n <div\n body\n class=\"cds--modal-content pb-1\"\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n taskId: taskInstanceId$ | async,\n formDefinition: formDefinition$ | async,\n formDefinitionId: formDefinitionId$ | async,\n formName: formName$ | async,\n formIoFormData: formIoFormData$ | async,\n submission: submission$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n processLinkIsFormViewModel: processLinkIsFormViewModel$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n >\n <div *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n [submission]=\"obs.submission\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n </div>\n <div *ngIf=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n </div>\n <div\n footer\n *ngIf=\"{\n formDefinition: formDefinition$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async\n } as obs\"\n >\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!obs.formDefinition && !obs.formFlowInstanceId\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoProcessLinkScreen()\"\n id=\"process-link-button\"\n >\n {{ 'formManagement.gotoProcessLinksButton' | translate }}\n </button>\n </div>\n </div>\n <div body class=\"m-2\">\n <ng-template #formViewModelComponent></ng-template>\n </div>\n</cds-modal>\n\n<valtimo-confirmation-modal\n [showModalSubject$]=\"showConfirmationModal$\"\n (confirmEvent)=\"clearCurrentProgress()\"\n (cancelEvent)=\"showConfirmationModal$.next(false)\"\n cancelButtonType=\"ghost\"\n confirmButtonTextTranslationKey=\"interface.confirm\"\n titleTranslationKey=\"formManagement.intermediateSave.clear\"\n contentTranslationKey=\"formManagement.intermediateSave.clearConfirm\"\n></valtimo-confirmation-modal>\n\n<ng-template #assignUserToTask>\n <ng-container *ngIf=\"task$ | async as task\">\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeId]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\n </ng-container>\n</ng-template>\n", styles: ["#taskDetailModal .formio-component-submit{text-align:right}.cds-modal-header{width:100%;display:flex;justify-content:space-between}.title-container{width:50%}.save-buttons-margin{margin-top:-15px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
1273
+ }], ctorParameters: () => [{ type: i1$2.ToastrService }, { type: i2$1.ProcessLinkService }, { type: i1$1.Router }, { type: TaskService }, { type: i5.UserProviderService }, { type: i6.ValtimoModalService }, { type: i6.FormIoStateService }, { type: i7.DocumentService }, { type: i8.TranslateService }, { type: undefined, decorators: [{
1274
+ type: Optional
1275
+ }, {
1276
+ type: Inject,
1277
+ args: [FORM_VIEW_MODEL_TOKEN]
1278
+ }] }, { type: TaskIntermediateSaveService }, { type: i2.ConfigService }, { type: i11.IconService }], propDecorators: { form: [{
481
1279
  type: ViewChild,
482
1280
  args: ['form']
483
1281
  }], formFlow: [{
@@ -486,6 +1284,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
486
1284
  }], modal: [{
487
1285
  type: ViewChild,
488
1286
  args: ['taskDetailModal']
1287
+ }], formViewModelDynamicContainer: [{
1288
+ type: ViewChild,
1289
+ args: ['formViewModelComponent', { static: true, read: ViewContainerRef }]
489
1290
  }], formSubmit: [{
490
1291
  type: Output
491
1292
  }], assignmentOfTaskChanged: [{
@@ -493,7 +1294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
493
1294
  }] } });
494
1295
 
495
1296
  /*
496
- * Copyright 2015-2023 Ritense BV, the Netherlands.
1297
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
497
1298
  *
498
1299
  * Licensed under EUPL, Version 1.2 (the "License");
499
1300
  * you may not use this file except in compliance with the License.
@@ -531,7 +1332,44 @@ const CAN_VIEW_CASE_PERMISSION = {
531
1332
  };
532
1333
 
533
1334
  /*
534
- * Copyright 2015-2023 Ritense BV, the Netherlands.
1335
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1336
+ *
1337
+ * Licensed under EUPL, Version 1.2 (the "License");
1338
+ * you may not use this file except in compliance with the License.
1339
+ * You may obtain a copy of the License at
1340
+ *
1341
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1342
+ *
1343
+ * Unless required by applicable law or agreed to in writing, software
1344
+ * distributed under the License is distributed on an "AS IS" basis,
1345
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1346
+ * See the License for the specific language governing permissions and
1347
+ * limitations under the License.
1348
+ */
1349
+ const TASK_LIST_NO_SEARCH_RESULTS_MESSAGE = {
1350
+ description: 'task-list.noSearchResultsDescription',
1351
+ isSearchResult: true,
1352
+ title: 'task-list.noSearchResultsTitle',
1353
+ };
1354
+
1355
+ /*
1356
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1357
+ *
1358
+ * Licensed under EUPL, Version 1.2 (the "License");
1359
+ * you may not use this file except in compliance with the License.
1360
+ * You may obtain a copy of the License at
1361
+ *
1362
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1363
+ *
1364
+ * Unless required by applicable law or agreed to in writing, software
1365
+ * distributed under the License is distributed on an "AS IS" basis,
1366
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1367
+ * See the License for the specific language governing permissions and
1368
+ * limitations under the License.
1369
+ */
1370
+
1371
+ /*
1372
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
535
1373
  *
536
1374
  * Licensed under EUPL, Version 1.2 (the "License");
537
1375
  * you may not use this file except in compliance with the License.
@@ -547,231 +1385,327 @@ const CAN_VIEW_CASE_PERMISSION = {
547
1385
  */
548
1386
  moment.locale(localStorage.getItem('langKey') || '');
549
1387
  class TaskListComponent {
550
- constructor(configService, documentService, logger, permissionService, router, taskService, translateService) {
1388
+ onPopState() {
1389
+ setTimeout(() => {
1390
+ this.setParamsFromQueryParams();
1391
+ });
1392
+ }
1393
+ constructor(configService, documentService, permissionService, router, taskService, taskListService, translateService, taskListColumnService, taskListPaginationService, taskListSortService, taskListSearchService, taskListQueryParamService, pageTitleService) {
551
1394
  this.configService = configService;
552
1395
  this.documentService = documentService;
553
- this.logger = logger;
554
1396
  this.permissionService = permissionService;
555
1397
  this.router = router;
556
1398
  this.taskService = taskService;
1399
+ this.taskListService = taskListService;
557
1400
  this.translateService = translateService;
558
- this.tasks = {
559
- mine: new TaskList(),
560
- open: new TaskList(),
561
- all: new TaskList(),
562
- };
563
- this.visibleTabs = null;
564
- this.currentTaskType = 'mine';
565
- this.listTitle = null;
566
- this.listDescription = null;
567
- this.sortState = null;
1401
+ this.taskListColumnService = taskListColumnService;
1402
+ this.taskListPaginationService = taskListPaginationService;
1403
+ this.taskListSortService = taskListSortService;
1404
+ this.taskListSearchService = taskListSearchService;
1405
+ this.taskListQueryParamService = taskListQueryParamService;
1406
+ this.pageTitleService = pageTitleService;
1407
+ this.ALL_CASES_ID = this.taskListService.ALL_CASES_ID;
1408
+ this.selectedTaskType$ = this.taskListService.selectedTaskType$;
1409
+ this._overrideNoResultsMessage$ = new BehaviorSubject(null);
1410
+ this.noResultsMessage$ = combineLatest([
1411
+ this.selectedTaskType$,
1412
+ this._overrideNoResultsMessage$,
1413
+ ]).pipe(map(([selectedTaskType, overrideNoResultsMessage]) => overrideNoResultsMessage || {
1414
+ title: 'task-list.' + selectedTaskType + '.noResultsDescription',
1415
+ description: 'task-list.' + selectedTaskType + '.noResultsTitle',
1416
+ isSearchResult: false,
1417
+ }));
1418
+ this.fields$ = this.taskListColumnService.fields$;
568
1419
  this.loadingTasks$ = new BehaviorSubject(true);
569
- this.activeTab$ = new BehaviorSubject('');
570
- this.visibleTabs = this.configService.config?.visibleTaskListTabs || null;
571
- if (this.visibleTabs) {
572
- this.currentTaskType = this.visibleTabs[0];
573
- }
574
- this.setDefaultSorting();
1420
+ this.visibleTabs$ = new BehaviorSubject(null);
1421
+ this._enableLoadingAnimation$ = new BehaviorSubject(true);
1422
+ this.cachedTasks$ = new BehaviorSubject(null);
1423
+ this.paginationForCurrentTaskTypeForList$ = this.taskListPaginationService.paginationForCurrentTaskTypeForList$;
1424
+ this.sortStateForCurrentTaskType$ = this.taskListSortService.sortStateForCurrentTaskType$;
1425
+ this.overrideSortState$ = this.taskListSortService.overrideSortState$;
1426
+ this._reload$ = new BehaviorSubject(true);
1427
+ this.caseDefinitionName$ = this.taskListService.caseDefinitionName$;
1428
+ this.tasks$ = combineLatest([
1429
+ this.taskListService.loadingStateForCaseDefinition$,
1430
+ this.selectedTaskType$,
1431
+ this.taskListPaginationService.paginationForCurrentTaskType$,
1432
+ this.taskListSortService.sortStringForCurrentTaskType$,
1433
+ this.caseDefinitionName$,
1434
+ this._enableLoadingAnimation$,
1435
+ this._reload$,
1436
+ this.taskListSearchService.otherFilters$,
1437
+ this.taskListSortService.overrideSortStateString$,
1438
+ ]).pipe(filter$1(([loadingStateForCaseDefinition]) => loadingStateForCaseDefinition === false), map(([_, selectedTaskType, paginationForSelectedTaskType, sortStringForSelectedTaskType, caseDefinitionName, enableLoadingAnimation, reload, otherFilters, overrideSortStateString,]) => this.getTaskListParams(paginationForSelectedTaskType, overrideSortStateString || sortStringForSelectedTaskType, selectedTaskType, caseDefinitionName, enableLoadingAnimation, reload, otherFilters)), distinctUntilChanged((previous, current) => isEqual(previous.params, current.params)), tap(params => {
1439
+ if (params.enableLoadingAnimation)
1440
+ this.loadingTasks$.next(true);
1441
+ this.taskListQueryParamService.setTaskListParams(params.params);
1442
+ }), switchMap(({ params }) => combineLatest([
1443
+ this.taskService.queryTasksPageV3(params.selectedTaskType, params.params, params.caseDefinitionName, params.otherFilters),
1444
+ of(!!params.caseDefinitionName),
1445
+ ])), switchMap(([tasksResult, isSpecified]) => this.getTaskListPermissionsRequest(tasksResult, isSpecified)), map(([isSpecified, taskResult, canViewTaskPermissions, canViewCasePermissions]) => {
1446
+ this.updateTaskListPaginationAfterResponse(Number(taskResult.totalElements));
1447
+ return this.mapTasksForList(isSpecified, taskResult, canViewTaskPermissions, canViewCasePermissions);
1448
+ }), tap(tasks => {
1449
+ this.cachedTasks$.next(tasks);
1450
+ this.loadingTasks$.next(false);
1451
+ this.disableLoadingAnimation();
1452
+ this.taskListSearchService.otherFilters$.pipe(take(1)).subscribe(otherFilters => {
1453
+ this._overrideNoResultsMessage$.next(otherFilters?.length > 0 ? TASK_LIST_NO_SEARCH_RESULTS_MESSAGE : null);
1454
+ });
1455
+ }));
1456
+ this.loadingCaseListItems$ = new BehaviorSubject(true);
1457
+ this._selectedCaseDefinitionId$ = new BehaviorSubject(this.ALL_CASES_ID);
1458
+ this.caseListItems$ = combineLatest([
1459
+ this.documentService.getAllDefinitions(),
1460
+ this._selectedCaseDefinitionId$,
1461
+ this.translateService.stream('key'),
1462
+ ]).pipe(map(([documentDefinitionRes, selectedCaseDefinitionId]) => [
1463
+ {
1464
+ content: this.translateService.instant('task-list.allCases'),
1465
+ id: this.ALL_CASES_ID,
1466
+ selected: selectedCaseDefinitionId === this.ALL_CASES_ID,
1467
+ },
1468
+ ...documentDefinitionRes.content.map(documentDefinition => ({
1469
+ id: documentDefinition.id.name,
1470
+ content: documentDefinition?.schema?.title,
1471
+ selected: documentDefinition.id.name === selectedCaseDefinitionId,
1472
+ })),
1473
+ ]), tap(() => this.loadingCaseListItems$.next(false)));
1474
+ this.taskListColumnsForCase$ = this.taskListColumnService.taskListColumnsForCase$;
1475
+ this.loadingSearchFields$ = this.taskListSearchService.loadingSearchFields$;
1476
+ this.searchFields$ = this.taskListSearchService.searchFields$;
1477
+ this._DEFAULT_TASK_LIST_TABS = [
1478
+ TaskListTab.MINE,
1479
+ TaskListTab.OPEN,
1480
+ TaskListTab.ALL,
1481
+ ];
1482
+ this.setSearchFieldValuesSubject$ = new BehaviorSubject({});
1483
+ this.clearSearchFieldValuesSubject$ = new Subject();
1484
+ }
1485
+ ngOnInit() {
1486
+ this.taskListColumnService.resetTaskListFields();
1487
+ this.setVisibleTabs();
1488
+ this.pageTitleService.disableReset();
1489
+ this.setParamsFromQueryParams();
575
1490
  }
576
1491
  ngOnDestroy() {
577
- this.closeTranslationSubscription();
1492
+ this.pageTitleService.enableReset();
578
1493
  }
579
1494
  paginationClicked(page, type) {
580
- this.tasks[type].page = page - 1;
581
- this.tasks[type].pagination.page = page;
582
- this.getTasks(type);
1495
+ this.taskListPaginationService.updateTaskPagination(type, { page: page - 1 });
583
1496
  }
584
- paginationSet(size) {
585
- this.tasks.mine.pagination.size =
586
- this.tasks.all.pagination.size =
587
- this.tasks.open.pagination.size =
588
- size;
589
- this.getTasks(this.currentTaskType);
1497
+ paginationSet(newSize) {
1498
+ combineLatest([
1499
+ this.taskListPaginationService.paginationForCurrentTaskType$,
1500
+ this.taskListService.selectedTaskType$,
1501
+ ])
1502
+ .pipe(take(1))
1503
+ .subscribe(([pagination, selectedTaskType]) => {
1504
+ this.taskListPaginationService.updateTaskPagination(selectedTaskType, {
1505
+ size: Number(newSize),
1506
+ page: this.taskListPaginationService.getLastAvailablePage(pagination.page, Number(newSize), pagination.collectionSize),
1507
+ });
1508
+ });
590
1509
  }
591
1510
  tabChange(tab) {
592
- this.clearPagination(this.currentTaskType);
593
- this.getTasks(tab);
594
- }
595
- showTask(task) {
596
- this.router.navigate(['tasks', task.id]);
597
- }
598
- getTasks(type) {
599
- this.loadingTasks$.next(true);
600
- this.activeTab$.next(type);
601
- let params;
602
- this.closeTranslationSubscription();
603
- this._translationSubscription = combineLatest([
604
- this.translateService.stream(`task-list.${type}.title`),
605
- this.translateService.stream(`task-list.${type}.description`),
606
- ]).subscribe(([title, description]) => {
607
- this.listTitle = title;
608
- this.listDescription = description;
609
- });
610
- switch (type) {
611
- case 'mine':
612
- params = {
613
- page: this.tasks.mine.page,
614
- size: this.tasks.mine.pagination.size,
615
- filter: 'mine',
616
- };
617
- this.currentTaskType = 'mine';
618
- break;
619
- case 'open':
620
- params = {
621
- page: this.tasks.open.page,
622
- size: this.tasks.open.pagination.size,
623
- filter: 'open',
624
- };
625
- this.currentTaskType = 'open';
626
- break;
627
- case 'all':
628
- params = { page: this.tasks.all.page, size: this.tasks.open.pagination.size, filter: 'all' };
629
- this.currentTaskType = 'all';
630
- break;
631
- default:
632
- this.logger.fatal('Unreachable case');
633
- }
634
- if (this.sortState) {
635
- params.sort = this.getSortString(this.sortState);
636
- }
637
- this.taskService
638
- .queryTasks(params)
639
- .pipe(switchMap(tasksResult => combineLatest([
640
- of(tasksResult),
641
- forkJoin(tasksResult.body.map(task => this.permissionService
642
- .requestPermission(CAN_VIEW_TASK_PERMISSION, {
643
- resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
644
- identifier: task.id,
645
- })
646
- .pipe(take$1(1)))).pipe(defaultIfEmpty(null)),
647
- forkJoin(tasksResult.body.map(task => this.permissionService
648
- .requestPermission(CAN_VIEW_CASE_PERMISSION, {
649
- resource: TASK_DETAIL_PERMISSION_RESOURCE.jsonSchemaDocument,
650
- identifier: task.businessKey,
651
- })
652
- .pipe(take$1(1)))).pipe(defaultIfEmpty(null)),
653
- ])))
654
- .subscribe(([tasksResult, taskPermissions, taskCasePermissions]) => {
655
- this.tasks[type].pagination = {
656
- ...this.tasks[type].pagination,
657
- collectionSize: tasksResult.headers.get('x-total-count'),
658
- };
659
- this.tasks[type].tasks = tasksResult.body;
660
- this.tasks[type].tasks.map((task, taskIndex) => {
661
- task.created = moment(task.created).format('DD MMM YYYY HH:mm');
662
- if (task.due) {
663
- task.due = moment(task.due).format('DD MMM YYYY HH:mm');
664
- }
665
- task.locked = !taskPermissions[taskIndex];
666
- task.caseLocked = !taskCasePermissions[taskIndex];
667
- });
668
- if (this.taskService.getConfigCustomTaskList()) {
669
- this.customTaskListFields(type);
670
- }
671
- else {
672
- this.defaultTaskListFields(type);
1511
+ this.taskListService.selectedTaskType$.pipe(take(1)).subscribe(selectedTaskType => {
1512
+ if (selectedTaskType !== tab) {
1513
+ this.enableLoadingAnimation();
1514
+ this.taskListService.setSelectedTaskType(tab);
1515
+ this.taskListPaginationService.updateTaskPagination(tab, { page: 0 });
673
1516
  }
674
- this.loadingTasks$.next(false);
675
1517
  });
676
1518
  }
677
1519
  openRelatedCase(event, index) {
678
1520
  event.stopPropagation();
679
- const tasks = this.tasks[this.currentTaskType].tasks;
680
- const currentTask = tasks && tasks[index];
681
- if (currentTask && !currentTask.caseLocked) {
682
- this.documentService
683
- .getDocument(currentTask.businessKey)
684
- .pipe(take$1(1))
685
- .subscribe(document => {
686
- this.router.navigate([
687
- `/dossiers/${document.definitionId?.name}/document/${currentTask.businessKey}`,
688
- ]);
689
- });
1521
+ this.cachedTasks$.pipe(take(1)).subscribe(cachedTasks => {
1522
+ const currentTask = cachedTasks && cachedTasks[index];
1523
+ if (currentTask && !currentTask.caseLocked) {
1524
+ this.documentService
1525
+ .getDocument(currentTask.businessKey)
1526
+ .pipe(take(1))
1527
+ .subscribe(document => {
1528
+ this.router.navigate([
1529
+ `/dossiers/${document.definitionId?.name}/document/${currentTask.businessKey}`,
1530
+ ]);
1531
+ });
1532
+ }
1533
+ });
1534
+ }
1535
+ rowOpenTaskClick(task) {
1536
+ return !task.endTime && !task.locked ? this._taskDetail.openTaskDetails(task) : false;
1537
+ }
1538
+ sortChanged(sortState) {
1539
+ this.taskListSortService.setOverrideSortState(sortState);
1540
+ this.taskListSortService.updateSortState(this.taskListService.selectedTaskType, sortState);
1541
+ }
1542
+ setCaseDefinition(definition) {
1543
+ if (definition.item.id) {
1544
+ this.taskListSortService.resetOverrideSortState();
1545
+ this.loadingTasks$.next(true);
1546
+ this.taskListService.setCaseDefinitionName(definition.item.id);
690
1547
  }
691
1548
  }
692
- defaultTaskListFields(type) {
693
- this.closeTranslationSubscription();
694
- this._translationSubscription = combineLatest([
695
- this.translateService.stream(`task-list.fieldLabels.created`),
696
- this.translateService.stream(`task-list.fieldLabels.name`),
697
- this.translateService.stream(`task-list.fieldLabels.valtimoAssignee.fullName`),
698
- this.translateService.stream(`task-list.fieldLabels.due`),
699
- this.translateService.stream(`task-list.fieldLabels.context`),
700
- ]).subscribe(([created, name, assignee, due, context]) => {
701
- this.tasks[type].fields = [
702
- {
703
- key: 'created',
704
- label: created,
705
- },
706
- {
707
- key: 'name',
708
- label: name,
709
- },
710
- {
711
- key: 'valtimoAssignee.fullName',
712
- label: assignee,
713
- },
714
- {
715
- key: 'due',
716
- label: due,
717
- },
718
- {
719
- key: 'context',
720
- label: context,
721
- },
722
- ];
723
- });
1549
+ reload() {
1550
+ this.enableLoadingAnimation();
1551
+ this._reload$.next(!this._reload$.getValue());
724
1552
  }
725
- customTaskListFields(type) {
726
- const customTaskListFields = this.taskService.getConfigCustomTaskList().fields;
727
- this.closeTranslationSubscription();
728
- this._translationSubscription = combineLatest(customTaskListFields.map(column => this.translateService.stream(`task-list.fieldLabels.${column.translationKey}`))).subscribe(labels => {
729
- this.tasks[type].fields = customTaskListFields.map((column, index) => ({
730
- key: column.propertyName,
731
- label: labels[index],
732
- sortable: column.sortable,
733
- ...(column.viewType && { viewType: column.viewType }),
734
- ...(column.enum && { enum: column.enum }),
735
- }));
1553
+ search(searchFieldValues) {
1554
+ if (!searchFieldValues)
1555
+ return;
1556
+ this.taskListSearchService.setSearchFieldValues(searchFieldValues);
1557
+ }
1558
+ updateTaskListPaginationAfterResponse(newCollectionSize) {
1559
+ this.taskListPaginationService.paginationForCurrentTaskType$
1560
+ .pipe(take(1))
1561
+ .subscribe(currentPagination => {
1562
+ this.taskListPaginationService.updateTaskPagination(this.taskListService.selectedTaskType, {
1563
+ collectionSize: Number(newCollectionSize),
1564
+ page: this.taskListPaginationService.getLastAvailablePage(currentPagination.page, currentPagination.size, newCollectionSize),
1565
+ });
736
1566
  });
737
1567
  }
738
- rowOpenTaskClick(task) {
739
- if (!task.endTime && !task.locked) {
740
- this.taskDetail.openTaskDetails(task);
1568
+ setVisibleTabs() {
1569
+ const visibleTabs = this.configService.config?.visibleTaskListTabs;
1570
+ if (visibleTabs) {
1571
+ this.visibleTabs$.next(visibleTabs);
1572
+ this.taskListService.setSelectedTaskType(visibleTabs[0]);
741
1573
  }
742
1574
  else {
743
- return false;
1575
+ this.visibleTabs$.next(this._DEFAULT_TASK_LIST_TABS);
1576
+ this.taskListService.setSelectedTaskType(this._DEFAULT_TASK_LIST_TABS[0]);
744
1577
  }
745
1578
  }
746
- setDefaultSorting() {
747
- this.sortState = this.taskService.getConfigCustomTaskList()?.defaultSortedColumn || null;
1579
+ disableLoadingAnimation() {
1580
+ this._enableLoadingAnimation$.next(false);
748
1581
  }
749
- sortChanged(sortState) {
750
- this.sortState = sortState;
751
- this.getTasks(this.currentTaskType);
1582
+ enableLoadingAnimation() {
1583
+ this._enableLoadingAnimation$.next(true);
752
1584
  }
753
- getSortString(sort) {
754
- return `${sort.state.name},${sort.state.direction}`;
1585
+ getTaskListParams(paginationForSelectedTaskType, sortStringForSelectedTaskType, selectedTaskType, caseDefinitionName, enableLoadingAnimation, reload, otherFilters) {
1586
+ const params = {
1587
+ ...paginationForSelectedTaskType,
1588
+ ...(sortStringForSelectedTaskType && { sort: sortStringForSelectedTaskType }),
1589
+ };
1590
+ delete params.collectionSize;
1591
+ return {
1592
+ params: {
1593
+ reload,
1594
+ selectedTaskType,
1595
+ params,
1596
+ ...(caseDefinitionName && caseDefinitionName !== this.ALL_CASES_ID && { caseDefinitionName }),
1597
+ ...(otherFilters && { otherFilters }),
1598
+ },
1599
+ enableLoadingAnimation,
1600
+ };
755
1601
  }
756
- clearPagination(type) {
757
- this.tasks[type].page = 0;
1602
+ getTaskListPermissionsRequest(tasksResult, isSpecified) {
1603
+ const taskResults = tasksResult.content;
1604
+ const hasTaskResults = Array.isArray(taskResults) && taskResults.length > 0;
1605
+ return combineLatest([
1606
+ of(isSpecified),
1607
+ of(tasksResult),
1608
+ hasTaskResults
1609
+ ? combineLatest(taskResults.map(task => this.permissionService.requestPermission(CAN_VIEW_TASK_PERMISSION, {
1610
+ resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
1611
+ identifier: !isSpecified ? task.id : task.id,
1612
+ })))
1613
+ : of(null),
1614
+ hasTaskResults
1615
+ ? combineLatest(taskResults.map(task => this.permissionService.requestPermission(CAN_VIEW_CASE_PERMISSION, {
1616
+ resource: TASK_DETAIL_PERMISSION_RESOURCE.jsonSchemaDocument,
1617
+ identifier: task.businessKey,
1618
+ })))
1619
+ : of(null),
1620
+ ]);
758
1621
  }
759
- closeTranslationSubscription() {
760
- this._translationSubscription?.unsubscribe();
1622
+ mapTasksForList(isSpecified, tasks, canViewTaskPermissions, canViewCasePermissions) {
1623
+ const MOMENT_FORMAT = 'DD MMM YYYY HH:mm';
1624
+ if (isSpecified) {
1625
+ return tasks.content.map((specifiedTask, specifiedTaskIndex) => specifiedTask.items.reduce((acc, curr) => ({
1626
+ id: specifiedTask.id,
1627
+ businessKey: specifiedTask.businessKey,
1628
+ processInstanceId: specifiedTask.processInstanceId,
1629
+ name: specifiedTask.name,
1630
+ ...(moment(specifiedTask.created).isValid() && {
1631
+ created: moment(specifiedTask.created).format(MOMENT_FORMAT),
1632
+ }),
1633
+ ...(canViewTaskPermissions && { locked: !canViewTaskPermissions[specifiedTaskIndex] }),
1634
+ ...(canViewCasePermissions && {
1635
+ caseLocked: !canViewCasePermissions[specifiedTaskIndex],
1636
+ }),
1637
+ ...acc,
1638
+ [curr.key]: curr.value,
1639
+ }), {}));
1640
+ }
1641
+ return tasks?.content?.map((task, taskIndex) => {
1642
+ const createdDate = moment(task.created);
1643
+ const dueDate = moment(task.due);
1644
+ const taskCopy = { ...task };
1645
+ if (task.due && dueDate.isValid())
1646
+ taskCopy.due = dueDate.format(MOMENT_FORMAT);
1647
+ if (createdDate.isValid())
1648
+ taskCopy.created = createdDate.format(MOMENT_FORMAT);
1649
+ if (canViewTaskPermissions)
1650
+ taskCopy.locked = !canViewTaskPermissions[taskIndex];
1651
+ if (canViewCasePermissions)
1652
+ taskCopy.caseLocked = !canViewCasePermissions[taskIndex];
1653
+ return taskCopy;
1654
+ });
1655
+ }
1656
+ setParamsFromQueryParams() {
1657
+ const decodedParams = this.taskListQueryParamService.getTaskListQueryParams();
1658
+ if (decodedParams.caseDefinitionName) {
1659
+ this.taskListService.setCaseDefinitionName(decodedParams.caseDefinitionName);
1660
+ this._selectedCaseDefinitionId$.next(decodedParams.caseDefinitionName);
1661
+ }
1662
+ if (decodedParams.otherFilters?.length > 0) {
1663
+ const searchFieldValues = this.taskListSearchService.mapOtherFilterToSearchValues(decodedParams.otherFilters);
1664
+ this.setSearchFieldValuesSubject$.next(searchFieldValues);
1665
+ }
1666
+ else {
1667
+ this.clearSearchFieldValuesSubject$.next(null);
1668
+ }
1669
+ if (decodedParams.selectedTaskType)
1670
+ this.taskListService.setSelectedTaskType(decodedParams.selectedTaskType);
1671
+ if (decodedParams.params?.sort) {
1672
+ const stateFromSortString = this.taskListSortService.getSortStateFromSortString(decodedParams.params.sort);
1673
+ if (stateFromSortString)
1674
+ this.taskListSortService.setOverrideSortState(stateFromSortString);
1675
+ }
1676
+ if (decodedParams.params)
1677
+ this.taskListPaginationService.updateTaskPagination(this.taskListService.selectedTaskType, decodedParams.params);
761
1678
  }
762
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskListComponent, deps: [{ token: i2.ConfigService }, { token: i7.DocumentService }, { token: i3$1.NGXLogger }, { token: i4.PermissionService }, { token: i3.Router }, { token: TaskService }, { token: i8$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
763
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TaskListComponent, selector: "valtimo-task-list", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"main-content\"\n *ngIf=\"{loadingTasks: loadingTasks$ | async, activeTab: activeTab$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container\n *ngTemplateOutlet=\"tasksList; context: {show: !obs.loadingTasks, activeTab: obs.activeTab}\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {show: obs.loadingTasks, activeTab: obs.activeTab}\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getTasks(currentTaskType)\"\n (assignmentOfTaskChanged)=\"getTasks(currentTaskType)\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-activeTab=\"activeTab\">\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLink let-data=\"data\">\n <div *ngIf=\"tasks[currentTaskType].tasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link--disabled\"\n cdsLink\n href=\"javascript:void(0)\"\n ngbTooltip=\"{{ 'task-list.caseLocked' | translate }}\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n <div *ngIf=\"!tasks[currentTaskType].tasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n</ng-template>\n\n<ng-template #tasksList let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list\n [ngClass]=\"{'hide-tasks-list': !show}\"\n [fields]=\"tasks[currentTaskType].fields\"\n [header]=\"false\"\n [items]=\"tasks[currentTaskType].tasks\"\n [lastColumnTemplate]=\"caseLink\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n paginationIdentifier=\"taskList\"\n lockedTooltipTranslationKey=\"task-list.rowLocked\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <cds-tabs\n *ngIf=\"visibleTabs === null; else configuredTabs; context: {activeTab: activeTab}\"\n type=\"contained\"\n class=\"valtimo-carbon-list__tabs\"\n >\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n (selected)=\"tabChange('mine')\"\n [active]=\"activeTab === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n (selected)=\"tabChange('open')\"\n [active]=\"activeTab === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n (selected)=\"tabChange('all')\"\n [active]=\"activeTab === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n </div>\n\n <valtimo-no-results\n [description]=\"'task-list.' + currentTaskType + '.noResultsDescription' | translate\"\n [title]=\"'task-list.' + currentTaskType + '.noResultsTitle' | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list [ngClass]=\"{'hide-tasks-list': !show}\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"visibleTabs === null\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab [heading]=\"'task-list.mine.title' | translate\" [active]=\"activeTab === 'mine'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.open.title' | translate\" [active]=\"activeTab === 'open'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.all.title' | translate\" [active]=\"activeTab === 'all'\">\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\" *ngIf=\"visibleTabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.hide-tasks-list{display:none}.cds--link--disabled{cursor:not-allowed;pointer-events:auto!important;outline:0!important}\n"], dependencies: [{ kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "header", "hideColumnHeader", "initialSortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow"] }, { kind: "component", type: i6.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "directive", type: i10.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i11.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "component", type: i11.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i11.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive"], outputs: ["selected"] }, { kind: "component", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i8$1.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
1679
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListComponent, deps: [{ token: i2.ConfigService }, { token: i7.DocumentService }, { token: i3.PermissionService }, { token: i1$1.Router }, { token: TaskService }, { token: TaskListService }, { token: i8.TranslateService }, { token: TaskListColumnService }, { token: TaskListPaginationService }, { token: TaskListSortService }, { token: TaskListSearchService }, { token: TaskListQueryParamService }, { token: i6.PageTitleService }], target: i0.ɵɵFactoryTarget.Component }); }
1680
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: TaskListComponent, selector: "valtimo-task-list", host: { listeners: { "window:popstate": "onPopState($event)" } }, providers: [
1681
+ TaskListService,
1682
+ TaskListColumnService,
1683
+ TaskListPaginationService,
1684
+ TaskListSortService,
1685
+ TaskListSearchService,
1686
+ TaskListQueryParamService,
1687
+ ], viewQueries: [{ propertyName: "_taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n *ngIf=\"{\n loading: loadingTasks$ | async,\n selectedTaskType: selectedTaskType$ | async,\n tasks: tasks$ | async,\n fields: fields$ | async,\n visibleTabs: visibleTabs$ | async,\n pagination: paginationForCurrentTaskTypeForList$ | async,\n taskListColumnsForCase: taskListColumnsForCase$ | async,\n sortState: sortStateForCurrentTaskType$ | async,\n overrideSortState: overrideSortState$ | async,\n searchFields: searchFields$ | async,\n loadingSearchFields: loadingSearchFields$ | async,\n caseDefinitionName: caseDefinitionName$ | async,\n noResultsMessage: noResultsMessage$ | async\n } as obs\"\n class=\"main-content\"\n>\n <div class=\"container-fluid\">\n @if (obs.caseDefinitionName && obs.caseDefinitionName !== ALL_CASES_ID) {\n <ng-container\n *ngTemplateOutlet=\"\n searchFields;\n context: {\n obs: obs\n }\n \"\n ></ng-container>\n }\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksList;\n context: {\n obs: obs\n }\n \"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {\n obs: obs\n }\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"reload()\"\n (assignmentOfTaskChanged)=\"reload()\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-selectedTaskType=\"selectedTaskType\" let-visibleTabs=\"visibleTabs\">\n <cds-tabs *ngIf=\"visibleTabs\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"selectedTaskType === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLink let-data=\"data\">\n <ng-container *ngIf=\"cachedTasks$ | async as cachedTasks\">\n <div *ngIf=\"cachedTasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link--disabled\"\n cdsLink\n href=\"javascript:void(0)\"\n ngbTooltip=\"{{ 'task-list.caseLocked' | translate }}\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n <div *ngIf=\"!cachedTasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tasksList let-obs=\"obs\">\n <valtimo-carbon-list\n *ngIf=\"!obs.loading\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [items]=\"obs.tasks\"\n [lastColumnTemplate]=\"caseLink\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"taskList\"\n lockedTooltipTranslationKey=\"task-list.rowLocked\"\n [sortState]=\"obs.overrideSortState || obs.sortState\"\n (paginationClicked)=\"paginationClicked($event, obs.selectedTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <ng-container *ngIf=\"obs.visibleTabs\">\n <ng-container\n *ngTemplateOutlet=\"\n configuredTabs;\n context: {selectedTaskType: obs.selectedTaskType, visibleTabs: obs.visibleTabs}\n \"\n ></ng-container>\n </ng-container>\n </div>\n\n <valtimo-no-results\n [description]=\"obs.noResultsMessage.description | translate\"\n [title]=\"obs.noResultsMessage.title | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-obs=\"obs\">\n <valtimo-carbon-list *ngIf=\"obs.loading\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"!obs.visibleTabs\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n [active]=\"obs.selectedTaskType === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n [active]=\"obs.selectedTaskType === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n [active]=\"obs.selectedTaskType === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs *ngIf=\"obs.visibleTabs\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of obs.visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"obs.selectedTaskType === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [searchFields]=\"obs.searchFields\"\n [inputDisabled]=\"obs.loadingSearchFields\"\n [documentDefinitionName]=\"obs.caseDefinitionName\"\n [setValuesSubject$]=\"setSearchFieldValuesSubject$\"\n [clearValuesSubject$]=\"clearSearchFieldValuesSubject$\"\n (doSearch)=\"search($event)\"\n >\n </valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <cds-dropdown\n class=\"case-definition-selection\"\n *ngIf=\"{\n loadingCaseListItems: loadingCaseListItems$ | async,\n caseListItems: caseListItems$ | async\n } as obs\"\n [disabled]=\"obs.loadingCaseListItems || (obs.caseListItems || []).length === 1\"\n [skeleton]=\"obs.loadingCaseListItems\"\n (selected)=\"setCaseDefinition($event)\"\n >\n <cds-dropdown-list [items]=\"obs.caseListItems || []\"></cds-dropdown-list>\n </cds-dropdown>\n </ng-template>\n</ng-container>\n", styles: [".cds--link--disabled{cursor:not-allowed;pointer-events:auto!important;outline:0!important}.case-definition-selection{display:flex;width:250px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i6.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "directive", type: i11$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i11.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "component", type: i11.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i11.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive"], outputs: ["selected"] }, { kind: "directive", type: i6.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "component", type: i11.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i11.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i6.SearchFieldsComponent, selector: "valtimo-search-fields", inputs: ["loading", "searchFields", "documentDefinitionName", "setValuesSubject$", "clearValuesSubject$", "defaultValues", "inputDisabled", "externalSearchField"], outputs: ["doSearch"] }, { kind: "component", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }, { kind: "pipe", type: i10.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
764
1688
  }
765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskListComponent, decorators: [{
1689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskListComponent, decorators: [{
766
1690
  type: Component,
767
- args: [{ selector: 'valtimo-task-list', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"main-content\"\n *ngIf=\"{loadingTasks: loadingTasks$ | async, activeTab: activeTab$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container\n *ngTemplateOutlet=\"tasksList; context: {show: !obs.loadingTasks, activeTab: obs.activeTab}\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {show: obs.loadingTasks, activeTab: obs.activeTab}\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getTasks(currentTaskType)\"\n (assignmentOfTaskChanged)=\"getTasks(currentTaskType)\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-activeTab=\"activeTab\">\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLink let-data=\"data\">\n <div *ngIf=\"tasks[currentTaskType].tasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link--disabled\"\n cdsLink\n href=\"javascript:void(0)\"\n ngbTooltip=\"{{ 'task-list.caseLocked' | translate }}\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n <div *ngIf=\"!tasks[currentTaskType].tasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n</ng-template>\n\n<ng-template #tasksList let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list\n [ngClass]=\"{'hide-tasks-list': !show}\"\n [fields]=\"tasks[currentTaskType].fields\"\n [header]=\"false\"\n [items]=\"tasks[currentTaskType].tasks\"\n [lastColumnTemplate]=\"caseLink\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n paginationIdentifier=\"taskList\"\n lockedTooltipTranslationKey=\"task-list.rowLocked\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <cds-tabs\n *ngIf=\"visibleTabs === null; else configuredTabs; context: {activeTab: activeTab}\"\n type=\"contained\"\n class=\"valtimo-carbon-list__tabs\"\n >\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n (selected)=\"tabChange('mine')\"\n [active]=\"activeTab === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n (selected)=\"tabChange('open')\"\n [active]=\"activeTab === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n (selected)=\"tabChange('all')\"\n [active]=\"activeTab === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n </div>\n\n <valtimo-no-results\n [description]=\"'task-list.' + currentTaskType + '.noResultsDescription' | translate\"\n [title]=\"'task-list.' + currentTaskType + '.noResultsTitle' | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list [ngClass]=\"{'hide-tasks-list': !show}\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"visibleTabs === null\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab [heading]=\"'task-list.mine.title' | translate\" [active]=\"activeTab === 'mine'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.open.title' | translate\" [active]=\"activeTab === 'open'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.all.title' | translate\" [active]=\"activeTab === 'all'\">\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\" *ngIf=\"visibleTabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.hide-tasks-list{display:none}.cds--link--disabled{cursor:not-allowed;pointer-events:auto!important;outline:0!important}\n"] }]
768
- }], ctorParameters: function () { return [{ type: i2.ConfigService }, { type: i7.DocumentService }, { type: i3$1.NGXLogger }, { type: i4.PermissionService }, { type: i3.Router }, { type: TaskService }, { type: i8$1.TranslateService }]; }, propDecorators: { taskDetail: [{
1691
+ args: [{ selector: 'valtimo-task-list', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1692
+ TaskListService,
1693
+ TaskListColumnService,
1694
+ TaskListPaginationService,
1695
+ TaskListSortService,
1696
+ TaskListSearchService,
1697
+ TaskListQueryParamService,
1698
+ ], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n *ngIf=\"{\n loading: loadingTasks$ | async,\n selectedTaskType: selectedTaskType$ | async,\n tasks: tasks$ | async,\n fields: fields$ | async,\n visibleTabs: visibleTabs$ | async,\n pagination: paginationForCurrentTaskTypeForList$ | async,\n taskListColumnsForCase: taskListColumnsForCase$ | async,\n sortState: sortStateForCurrentTaskType$ | async,\n overrideSortState: overrideSortState$ | async,\n searchFields: searchFields$ | async,\n loadingSearchFields: loadingSearchFields$ | async,\n caseDefinitionName: caseDefinitionName$ | async,\n noResultsMessage: noResultsMessage$ | async\n } as obs\"\n class=\"main-content\"\n>\n <div class=\"container-fluid\">\n @if (obs.caseDefinitionName && obs.caseDefinitionName !== ALL_CASES_ID) {\n <ng-container\n *ngTemplateOutlet=\"\n searchFields;\n context: {\n obs: obs\n }\n \"\n ></ng-container>\n }\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksList;\n context: {\n obs: obs\n }\n \"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {\n obs: obs\n }\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"reload()\"\n (assignmentOfTaskChanged)=\"reload()\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-selectedTaskType=\"selectedTaskType\" let-visibleTabs=\"visibleTabs\">\n <cds-tabs *ngIf=\"visibleTabs\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"selectedTaskType === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLink let-data=\"data\">\n <ng-container *ngIf=\"cachedTasks$ | async as cachedTasks\">\n <div *ngIf=\"cachedTasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link--disabled\"\n cdsLink\n href=\"javascript:void(0)\"\n ngbTooltip=\"{{ 'task-list.caseLocked' | translate }}\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n <div *ngIf=\"!cachedTasks[data.index].caseLocked\">\n <a\n class=\"float-left cds--link\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tasksList let-obs=\"obs\">\n <valtimo-carbon-list\n *ngIf=\"!obs.loading\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [items]=\"obs.tasks\"\n [lastColumnTemplate]=\"caseLink\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"taskList\"\n lockedTooltipTranslationKey=\"task-list.rowLocked\"\n [sortState]=\"obs.overrideSortState || obs.sortState\"\n (paginationClicked)=\"paginationClicked($event, obs.selectedTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <ng-container *ngIf=\"obs.visibleTabs\">\n <ng-container\n *ngTemplateOutlet=\"\n configuredTabs;\n context: {selectedTaskType: obs.selectedTaskType, visibleTabs: obs.visibleTabs}\n \"\n ></ng-container>\n </ng-container>\n </div>\n\n <valtimo-no-results\n [description]=\"obs.noResultsMessage.description | translate\"\n [title]=\"obs.noResultsMessage.title | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-obs=\"obs\">\n <valtimo-carbon-list *ngIf=\"obs.loading\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"!obs.visibleTabs\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n [active]=\"obs.selectedTaskType === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n [active]=\"obs.selectedTaskType === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n [active]=\"obs.selectedTaskType === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs *ngIf=\"obs.visibleTabs\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of obs.visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"obs.selectedTaskType === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [searchFields]=\"obs.searchFields\"\n [inputDisabled]=\"obs.loadingSearchFields\"\n [documentDefinitionName]=\"obs.caseDefinitionName\"\n [setValuesSubject$]=\"setSearchFieldValuesSubject$\"\n [clearValuesSubject$]=\"clearSearchFieldValuesSubject$\"\n (doSearch)=\"search($event)\"\n >\n </valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <cds-dropdown\n class=\"case-definition-selection\"\n *ngIf=\"{\n loadingCaseListItems: loadingCaseListItems$ | async,\n caseListItems: caseListItems$ | async\n } as obs\"\n [disabled]=\"obs.loadingCaseListItems || (obs.caseListItems || []).length === 1\"\n [skeleton]=\"obs.loadingCaseListItems\"\n (selected)=\"setCaseDefinition($event)\"\n >\n <cds-dropdown-list [items]=\"obs.caseListItems || []\"></cds-dropdown-list>\n </cds-dropdown>\n </ng-template>\n</ng-container>\n", styles: [".cds--link--disabled{cursor:not-allowed;pointer-events:auto!important;outline:0!important}.case-definition-selection{display:flex;width:250px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
1699
+ }], ctorParameters: () => [{ type: i2.ConfigService }, { type: i7.DocumentService }, { type: i3.PermissionService }, { type: i1$1.Router }, { type: TaskService }, { type: TaskListService }, { type: i8.TranslateService }, { type: TaskListColumnService }, { type: TaskListPaginationService }, { type: TaskListSortService }, { type: TaskListSearchService }, { type: TaskListQueryParamService }, { type: i6.PageTitleService }], propDecorators: { _taskDetail: [{
769
1700
  type: ViewChild,
770
1701
  args: ['taskDetail']
1702
+ }], onPopState: [{
1703
+ type: HostListener,
1704
+ args: ['window:popstate', ['$event']]
771
1705
  }] } });
772
1706
 
773
1707
  /*
774
- * Copyright 2015-2023 Ritense BV, the Netherlands.
1708
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
775
1709
  *
776
1710
  * Licensed under EUPL, Version 1.2 (the "License");
777
1711
  * you may not use this file except in compliance with the License.
@@ -794,11 +1728,11 @@ const routes = [
794
1728
  },
795
1729
  ];
796
1730
  class TaskRoutingModule {
797
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
798
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, i3.RouterModule], exports: [RouterModule] }); }
799
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
1731
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1732
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] }); }
1733
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
800
1734
  }
801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, decorators: [{
1735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskRoutingModule, decorators: [{
802
1736
  type: NgModule,
803
1737
  args: [{
804
1738
  declarations: [],
@@ -808,7 +1742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
808
1742
  }] });
809
1743
 
810
1744
  /*
811
- * Copyright 2015-2023 Ritense BV, the Netherlands.
1745
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
812
1746
  *
813
1747
  * Licensed under EUPL, Version 1.2 (the "License");
814
1748
  * you may not use this file except in compliance with the License.
@@ -823,8 +1757,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
823
1757
  * limitations under the License.
824
1758
  */
825
1759
  class TaskModule {
826
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
827
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TaskModule, declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent], imports: [CommonModule,
1760
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1761
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TaskModule, declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent], imports: [CommonModule,
828
1762
  TaskRoutingModule,
829
1763
  CarbonListModule,
830
1764
  PageHeaderModule,
@@ -833,14 +1767,21 @@ class TaskModule {
833
1767
  SearchableDropdownSelectModule,
834
1768
  CamundaFormModule,
835
1769
  BrowserAnimationsModule,
836
- FormsModule, i1$1.ToastrModule, i8$1.TranslateModule, NgbModule,
1770
+ FormsModule, i1$2.ToastrModule, i8.TranslateModule, NgbModule,
837
1771
  FormIoModule,
838
1772
  ModalModule,
839
1773
  LinkModule,
840
- FormLinkModule,
1774
+ ProcessLinkModule,
841
1775
  TabsModule,
842
- ContentSwitcherModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] }); }
843
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskModule, imports: [CommonModule,
1776
+ ContentSwitcherModule,
1777
+ RenderInPageHeaderDirectiveModule,
1778
+ DropdownModule,
1779
+ ButtonModule,
1780
+ IconModule,
1781
+ TooltipModule,
1782
+ ConfirmationModalModule,
1783
+ SearchFieldsModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] }); }
1784
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskModule, imports: [CommonModule,
844
1785
  TaskRoutingModule,
845
1786
  CarbonListModule,
846
1787
  PageHeaderModule,
@@ -865,11 +1806,18 @@ class TaskModule {
865
1806
  FormIoModule,
866
1807
  ModalModule,
867
1808
  LinkModule,
868
- FormLinkModule,
1809
+ ProcessLinkModule,
869
1810
  TabsModule,
870
- ContentSwitcherModule] }); }
1811
+ ContentSwitcherModule,
1812
+ RenderInPageHeaderDirectiveModule,
1813
+ DropdownModule,
1814
+ ButtonModule,
1815
+ IconModule,
1816
+ TooltipModule,
1817
+ ConfirmationModalModule,
1818
+ SearchFieldsModule] }); }
871
1819
  }
872
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskModule, decorators: [{
1820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TaskModule, decorators: [{
873
1821
  type: NgModule,
874
1822
  args: [{
875
1823
  declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
@@ -899,16 +1847,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
899
1847
  FormIoModule,
900
1848
  ModalModule,
901
1849
  LinkModule,
902
- FormLinkModule,
1850
+ ProcessLinkModule,
903
1851
  TabsModule,
904
1852
  ContentSwitcherModule,
1853
+ RenderInPageHeaderDirectiveModule,
1854
+ DropdownModule,
1855
+ ButtonModule,
1856
+ IconModule,
1857
+ TooltipModule,
1858
+ ConfirmationModalModule,
1859
+ SearchFieldsModule,
905
1860
  ],
906
1861
  exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
907
1862
  }]
908
1863
  }] });
909
1864
 
910
1865
  /*
911
- * Copyright 2015-2023 Ritense BV, the Netherlands.
1866
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
912
1867
  *
913
1868
  * Licensed under EUPL, Version 1.2 (the "License");
914
1869
  * you may not use this file except in compliance with the License.
@@ -930,5 +1885,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
930
1885
  * Generated bundle index. Do not edit.
931
1886
  */
932
1887
 
933
- export { AssignUserToTaskComponent, CAN_ASSIGN_TASK_PERMISSION, CAN_VIEW_CASE_PERMISSION, CAN_VIEW_TASK_PERMISSION, TASK_DETAIL_PERMISSION_RESOURCE, TaskDetailModalComponent, TaskList, TaskListComponent, TaskModule, TaskService };
1888
+ export { AssignUserToTaskComponent, CAN_ASSIGN_TASK_PERMISSION, CAN_VIEW_CASE_PERMISSION, CAN_VIEW_TASK_PERMISSION, TASK_DETAIL_PERMISSION_RESOURCE, TASK_LIST_NO_SEARCH_RESULTS_MESSAGE, TaskDetailModalComponent, TaskListColumnDefaultSort, TaskListComponent, TaskListSearchDropdownDataProvider, TaskListSearchFieldDataType, TaskListSearchFieldFieldType, TaskListSearchFieldMatchType, TaskModule, TaskService };
934
1889
  //# sourceMappingURL=valtimo-task.mjs.map