@valtimo/task 4.23.0 → 5.2.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 (60) hide show
  1. package/esm2020/lib/assign-user-to-task/assign-user-to-task.component.mjs +125 -0
  2. package/esm2020/lib/models/index.mjs +21 -0
  3. package/esm2020/lib/models/task-definition.model.mjs +17 -0
  4. package/esm2020/lib/models/task-list.model.mjs +29 -0
  5. package/esm2020/lib/models/task.model.mjs +17 -0
  6. package/esm2020/lib/task-detail-modal/task-detail-modal.component.mjs +198 -0
  7. package/esm2020/lib/task-list/task-list.component.mjs +160 -0
  8. package/esm2020/lib/task-routing.module.mjs +45 -0
  9. package/esm2020/lib/task.module.mjs +107 -0
  10. package/esm2020/lib/task.service.mjs +59 -0
  11. package/esm2020/public_api.mjs +25 -0
  12. package/esm2020/valtimo-task.mjs +5 -0
  13. package/fesm2015/valtimo-task.mjs +724 -0
  14. package/fesm2015/valtimo-task.mjs.map +1 -0
  15. package/fesm2020/valtimo-task.mjs +758 -0
  16. package/fesm2020/valtimo-task.mjs.map +1 -0
  17. package/lib/assign-user-to-task/assign-user-to-task.component.d.ts +4 -0
  18. package/lib/assign-user-to-task/assign-user-to-task.component.d.ts.map +1 -0
  19. package/lib/models/index.d.ts +1 -0
  20. package/lib/models/index.d.ts.map +1 -0
  21. package/lib/models/task-definition.model.d.ts +1 -0
  22. package/lib/models/task-definition.model.d.ts.map +1 -0
  23. package/lib/models/task-list.model.d.ts +1 -0
  24. package/lib/models/task-list.model.d.ts.map +1 -0
  25. package/lib/models/task.model.d.ts +10 -0
  26. package/lib/models/task.model.d.ts.map +1 -0
  27. package/lib/task-detail-modal/task-detail-modal.component.d.ts +31 -10
  28. package/lib/task-detail-modal/task-detail-modal.component.d.ts.map +1 -0
  29. package/lib/task-list/task-list.component.d.ts +4 -0
  30. package/lib/task-list/task-list.component.d.ts.map +1 -0
  31. package/lib/task-routing.module.d.ts +7 -0
  32. package/lib/task-routing.module.d.ts.map +1 -0
  33. package/lib/task.module.d.ts +16 -0
  34. package/lib/task.module.d.ts.map +1 -0
  35. package/lib/task.service.d.ts +6 -1
  36. package/lib/task.service.d.ts.map +1 -0
  37. package/package.json +23 -11
  38. package/public_api.d.ts +2 -0
  39. package/public_api.d.ts.map +1 -0
  40. package/valtimo-task.d.ts +2 -2
  41. package/valtimo-task.d.ts.map +1 -0
  42. package/bundles/valtimo-task.umd.js +0 -960
  43. package/bundles/valtimo-task.umd.js.map +0 -1
  44. package/bundles/valtimo-task.umd.min.js +0 -2
  45. package/bundles/valtimo-task.umd.min.js.map +0 -1
  46. package/esm2015/lib/assign-user-to-task/assign-user-to-task.component.js +0 -124
  47. package/esm2015/lib/models/index.js +0 -21
  48. package/esm2015/lib/models/task-definition.model.js +0 -16
  49. package/esm2015/lib/models/task-list.model.js +0 -29
  50. package/esm2015/lib/models/task.model.js +0 -16
  51. package/esm2015/lib/task-detail-modal/task-detail-modal.component.js +0 -127
  52. package/esm2015/lib/task-list/task-list.component.js +0 -166
  53. package/esm2015/lib/task-routing.module.js +0 -41
  54. package/esm2015/lib/task.module.js +0 -66
  55. package/esm2015/lib/task.service.js +0 -60
  56. package/esm2015/public_api.js +0 -24
  57. package/esm2015/valtimo-task.js +0 -7
  58. package/fesm2015/valtimo-task.js +0 -653
  59. package/fesm2015/valtimo-task.js.map +0 -1
  60. package/valtimo-task.metadata.json +0 -1
@@ -0,0 +1,758 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpClient } from '@angular/common/http';
5
+ import * as i2 from '@valtimo/config';
6
+ import { ROLE_USER, HttpLoaderFactory } from '@valtimo/config';
7
+ import * as i3 from '@angular/common';
8
+ import { CommonModule } from '@angular/common';
9
+ import { FormsModule } from '@angular/forms';
10
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
11
+ import * as i7 from '@ng-bootstrap/ng-bootstrap';
12
+ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
13
+ import * as i4 from '@ngx-translate/core';
14
+ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
15
+ import * as i6 from '@valtimo/components';
16
+ import { FormioOptionsImpl, ListModule, PageHeaderModule, WidgetModule, SpinnerModule, SearchableDropdownSelectModule, CamundaFormModule, FormIoModule, ModalModule } from '@valtimo/components';
17
+ import * as i1$1 from 'ngx-toastr';
18
+ import { ToastrModule } from 'ngx-toastr';
19
+ import moment from 'moment';
20
+ import { take, tap, map } from 'rxjs/operators';
21
+ import { BehaviorSubject, combineLatest } from 'rxjs';
22
+ import * as i2$1 from '@valtimo/form-link';
23
+ import * as i3$1 from '@angular/router';
24
+ import { RouterModule } from '@angular/router';
25
+ import * as i4$1 from 'ngx-logger';
26
+ import { AuthGuardService } from '@valtimo/security';
27
+
28
+ /*
29
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
30
+ *
31
+ * Licensed under EUPL, Version 1.2 (the "License");
32
+ * you may not use this file except in compliance with the License.
33
+ * You may obtain a copy of the License at
34
+ *
35
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
36
+ *
37
+ * Unless required by applicable law or agreed to in writing, software
38
+ * distributed under the License is distributed on an "AS IS" basis,
39
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40
+ * See the License for the specific language governing permissions and
41
+ * limitations under the License.
42
+ */
43
+
44
+ /*
45
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
46
+ *
47
+ * Licensed under EUPL, Version 1.2 (the "License");
48
+ * you may not use this file except in compliance with the License.
49
+ * You may obtain a copy of the License at
50
+ *
51
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
52
+ *
53
+ * Unless required by applicable law or agreed to in writing, software
54
+ * distributed under the License is distributed on an "AS IS" basis,
55
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56
+ * See the License for the specific language governing permissions and
57
+ * limitations under the License.
58
+ */
59
+
60
+ /*
61
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
62
+ *
63
+ * Licensed under EUPL, Version 1.2 (the "License");
64
+ * you may not use this file except in compliance with the License.
65
+ * You may obtain a copy of the License at
66
+ *
67
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
68
+ *
69
+ * Unless required by applicable law or agreed to in writing, software
70
+ * distributed under the License is distributed on an "AS IS" basis,
71
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ * See the License for the specific language governing permissions and
73
+ * limitations under the License.
74
+ */
75
+ class TaskList {
76
+ constructor() {
77
+ this.tasks = [];
78
+ this.fields = [];
79
+ this.pagination = {
80
+ collectionSize: 0,
81
+ page: 1,
82
+ size: 10,
83
+ maxPaginationItemSize: 5,
84
+ };
85
+ this.page = 0;
86
+ }
87
+ }
88
+
89
+ /*
90
+ *
91
+ * * Copyright 2015-2020 Ritense BV, the Netherlands.
92
+ * *
93
+ * * Licensed under EUPL, Version 1.2 (the "License");
94
+ * * you may not use this file except in compliance with the License.
95
+ * * You may obtain a copy of the License at
96
+ * *
97
+ * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
98
+ * *
99
+ * * Unless required by applicable law or agreed to in writing, software
100
+ * * distributed under the License is distributed on an "AS IS" basis,
101
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102
+ * * See the License for the specific language governing permissions and
103
+ * * limitations under the License.
104
+ *
105
+ */
106
+
107
+ /*
108
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
109
+ *
110
+ * Licensed under EUPL, Version 1.2 (the "License");
111
+ * you may not use this file except in compliance with the License.
112
+ * You may obtain a copy of the License at
113
+ *
114
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
115
+ *
116
+ * Unless required by applicable law or agreed to in writing, software
117
+ * distributed under the License is distributed on an "AS IS" basis,
118
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
+ * See the License for the specific language governing permissions and
120
+ * limitations under the License.
121
+ */
122
+ class TaskService {
123
+ constructor(http, configService) {
124
+ this.http = http;
125
+ this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
126
+ }
127
+ queryTasks(params) {
128
+ return this.http.get(`${this.valtimoEndpointUri}task`, { observe: 'response', params });
129
+ }
130
+ getTasks() {
131
+ return this.http.get(`${this.valtimoEndpointUri}task?filter=all`);
132
+ }
133
+ getTask(id) {
134
+ return this.http.get(this.valtimoEndpointUri + 'task/' + id);
135
+ }
136
+ getCandidateUsers(id) {
137
+ return this.http.get(this.valtimoEndpointUri + 'task/' + id + '/candidate-user');
138
+ }
139
+ assignTask(id, assigneeRequest) {
140
+ return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/assign', assigneeRequest);
141
+ }
142
+ unassignTask(id) {
143
+ return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/unassign', null);
144
+ }
145
+ completeTask(id, variables) {
146
+ return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/complete', {
147
+ variables,
148
+ filesToDelete: [],
149
+ });
150
+ }
151
+ getTaskProcessLink(taskId) {
152
+ return this.http.get(`${this.valtimoEndpointUri}process-link/task/${taskId}`);
153
+ }
154
+ }
155
+ TaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
156
+ TaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskService, providedIn: 'root' });
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskService, decorators: [{
158
+ type: Injectable,
159
+ args: [{ providedIn: 'root' }]
160
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
161
+
162
+ /*
163
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
164
+ *
165
+ * Licensed under EUPL, Version 1.2 (the "License");
166
+ * you may not use this file except in compliance with the License.
167
+ * You may obtain a copy of the License at
168
+ *
169
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
170
+ *
171
+ * Unless required by applicable law or agreed to in writing, software
172
+ * distributed under the License is distributed on an "AS IS" basis,
173
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
174
+ * See the License for the specific language governing permissions and
175
+ * limitations under the License.
176
+ */
177
+ class AssignUserToTaskComponent {
178
+ constructor(taskService) {
179
+ this.taskService = taskService;
180
+ this.assignmentOfTaskChanged = new EventEmitter();
181
+ this.candidateUsersForTask$ = new BehaviorSubject(undefined);
182
+ this.disabled$ = new BehaviorSubject(true);
183
+ this.assignedEmailOnServer$ = new BehaviorSubject(null);
184
+ this.userEmailToAssign = null;
185
+ this.assignedUserFullName$ = new BehaviorSubject(null);
186
+ }
187
+ ngOnInit() {
188
+ this.taskService.getCandidateUsers(this.taskId).subscribe(candidateUsers => {
189
+ this.candidateUsersForTask$.next(candidateUsers);
190
+ if (this.assigneeEmail) {
191
+ this.assignedEmailOnServer$.next(this.assigneeEmail);
192
+ this.userEmailToAssign = this.assigneeEmail;
193
+ this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, this.assigneeEmail));
194
+ }
195
+ this.enable();
196
+ });
197
+ }
198
+ ngOnChanges(changes) {
199
+ const assigneeEmail = changes.assigneeEmail;
200
+ if (assigneeEmail) {
201
+ this.candidateUsersForTask$.pipe(take(1)).subscribe(candidateUsers => {
202
+ const currentUserEmail = assigneeEmail.currentValue;
203
+ this.assignedEmailOnServer$.next(currentUserEmail || null);
204
+ this.userEmailToAssign = currentUserEmail || null;
205
+ this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, currentUserEmail));
206
+ });
207
+ }
208
+ else {
209
+ this.clear();
210
+ }
211
+ }
212
+ assignTask(userEmail) {
213
+ this.disable();
214
+ combineLatest([
215
+ this.candidateUsersForTask$,
216
+ this.taskService.assignTask(this.taskId, { assignee: userEmail }),
217
+ ])
218
+ .pipe(take(1), tap(([candidateUsers]) => {
219
+ this.userEmailToAssign = userEmail;
220
+ this.assignedEmailOnServer$.next(userEmail);
221
+ this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, userEmail));
222
+ this.emitChange();
223
+ this.enable();
224
+ }))
225
+ .subscribe();
226
+ }
227
+ unassignTask() {
228
+ this.disable();
229
+ this.taskService
230
+ .unassignTask(this.taskId)
231
+ .pipe(tap(() => {
232
+ this.clear();
233
+ this.emitChange();
234
+ this.enable();
235
+ }))
236
+ .subscribe();
237
+ }
238
+ getAssignedUserName(users, userEmail) {
239
+ if (users && userEmail) {
240
+ const findUser = users.find(user => user.email === userEmail);
241
+ return findUser ? findUser.fullName : '';
242
+ }
243
+ return '';
244
+ }
245
+ mapUsersForDropdown(users) {
246
+ return (users &&
247
+ users
248
+ .map(user => ({ ...user, lastName: user.lastName?.split(' ').splice(-1)[0] || '' }))
249
+ .sort((a, b) => a.lastName.localeCompare(b.lastName))
250
+ .map(user => ({ text: user.fullName, id: user.email })));
251
+ }
252
+ clear() {
253
+ this.assignedEmailOnServer$.next(null);
254
+ this.userEmailToAssign = null;
255
+ }
256
+ emitChange() {
257
+ this.assignmentOfTaskChanged.emit();
258
+ }
259
+ enable() {
260
+ this.disabled$.next(false);
261
+ }
262
+ disable() {
263
+ this.disabled$.next(true);
264
+ }
265
+ }
266
+ AssignUserToTaskComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: AssignUserToTaskComponent, deps: [{ token: TaskService }], target: i0.ɵɵFactoryTarget.Component });
267
+ AssignUserToTaskComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: { taskId: "taskId", assigneeEmail: "assigneeEmail" }, outputs: { assignmentOfTaskChanged: "assignmentOfTaskChanged" }, usesOnChanges: true, ngImport: i0, template: "<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 <ng-container *ngIf=\"obs.candidateUsers; else loading\">\n <valtimo-searchable-dropdown-select\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 </ng-container>\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"], components: [{ type: i6.SearchableDropdownSelectComponent, selector: "valtimo-searchable-dropdown-select", inputs: ["style", "items", "buttonText", "searchText", "noResultsText", "disabled", "selectedText", "selectedTextValue", "clearSelectionButtonTitle", "hasSelection", "width"], outputs: ["itemSelected", "clearSelection"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe, "translate": i4.TranslatePipe } });
268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: AssignUserToTaskComponent, decorators: [{
269
+ type: Component,
270
+ args: [{ selector: 'valtimo-assign-user-to-task', template: "<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 <ng-container *ngIf=\"obs.candidateUsers; else loading\">\n <valtimo-searchable-dropdown-select\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 </ng-container>\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"] }]
271
+ }], ctorParameters: function () { return [{ type: TaskService }]; }, propDecorators: { taskId: [{
272
+ type: Input
273
+ }], assigneeEmail: [{
274
+ type: Input
275
+ }], assignmentOfTaskChanged: [{
276
+ type: Output
277
+ }] } });
278
+
279
+ /*
280
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
281
+ *
282
+ * Licensed under EUPL, Version 1.2 (the "License");
283
+ * you may not use this file except in compliance with the License.
284
+ * You may obtain a copy of the License at
285
+ *
286
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
287
+ *
288
+ * Unless required by applicable law or agreed to in writing, software
289
+ * distributed under the License is distributed on an "AS IS" basis,
290
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
291
+ * See the License for the specific language governing permissions and
292
+ * limitations under the License.
293
+ */
294
+ moment.locale(localStorage.getItem('langKey') || '');
295
+ class TaskDetailModalComponent {
296
+ constructor(toastr, formLinkService, formFlowService, router, logger, route, taskService) {
297
+ this.toastr = toastr;
298
+ this.formLinkService = formLinkService;
299
+ this.formFlowService = formFlowService;
300
+ this.router = router;
301
+ this.logger = logger;
302
+ this.route = route;
303
+ this.taskService = taskService;
304
+ this.formSubmit = new EventEmitter();
305
+ this.assignmentOfTaskChanged = new EventEmitter();
306
+ this.task = null;
307
+ this.page = null;
308
+ this.errorMessage = null;
309
+ this.taskProcessLinkType$ = new BehaviorSubject(null);
310
+ this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
311
+ this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
312
+ this.formFlowStepType$ = new BehaviorSubject(null);
313
+ this.formFlowStepTypeIsForm$ = this.formFlowStepType$.pipe(map(type => type === 'form'));
314
+ this.formioOptions = new FormioOptionsImpl();
315
+ this.formioOptions.disableAlerts = true;
316
+ }
317
+ openTaskDetails(task) {
318
+ this.resetTaskProcessLinkType();
319
+ this.resetFormDefinition();
320
+ this.getTaskProcessLink(task.id);
321
+ this.task = task;
322
+ this.page = {
323
+ title: task.name,
324
+ subtitle: `Created ${task.created}`,
325
+ };
326
+ this.formLinkService
327
+ .getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
328
+ )
329
+ .subscribe(formDefinition => {
330
+ this.formAssociation = formDefinition.formAssociation;
331
+ const className = this.formAssociation.formLink.className.split('.');
332
+ const linkType = className[className.length - 1];
333
+ switch (linkType) {
334
+ case 'BpmnElementFormIdLink':
335
+ this.setFormDefinitionAndOpenModal(formDefinition);
336
+ break;
337
+ case 'BpmnElementFormFlowIdLink':
338
+ // We can't use the formDefinition here because the form definition is provided per form flow step
339
+ // I'm still leaving this in here in case we want to add form flow specific code.
340
+ break;
341
+ case 'BpmnElementUrlLink':
342
+ this.openUrlLink(formDefinition);
343
+ break;
344
+ case 'BpmnElementAngularStateUrlLink':
345
+ this.openAngularStateUrlLink(task, formDefinition);
346
+ break;
347
+ default:
348
+ this.logger.fatal('Unsupported class name');
349
+ }
350
+ }, errors => {
351
+ if (errors?.error?.detail) {
352
+ this.errorMessage = errors.error.detail;
353
+ }
354
+ this.modal.show();
355
+ });
356
+ }
357
+ gotoFormLinkScreen() {
358
+ this.modal.hide();
359
+ this.router.navigate(['form-links']);
360
+ }
361
+ onSubmit(submission) {
362
+ if (this.taskProcessLinkType$.getValue() === 'form') {
363
+ this.formLinkService
364
+ .onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
365
+ .subscribe((_) => {
366
+ this.completeTask();
367
+ }, errors => {
368
+ this.form.showErrors(errors);
369
+ });
370
+ }
371
+ if (this.taskProcessLinkType$.getValue() === 'form-flow') {
372
+ if (submission.data.submit) {
373
+ this.formFlowService.submitStep(this.formFlowInstanceId, this.formFlowStepInstanceId, submission.data).subscribe((result) => this.handleFormFlowStep(result), errors => this.form.showErrors(errors));
374
+ }
375
+ else if (submission.data['back']) {
376
+ this.formFlowService.back(this.formFlowInstanceId).subscribe((result) => this.handleFormFlowStep(result), errors => this.form.showErrors(errors));
377
+ }
378
+ }
379
+ }
380
+ resetFormDefinition() {
381
+ this.formDefinition = null;
382
+ }
383
+ getTaskProcessLink(taskId) {
384
+ this.taskService.getTaskProcessLink(taskId).subscribe(res => {
385
+ switch (res?.type) {
386
+ case 'form':
387
+ this.taskProcessLinkType$.next('form');
388
+ break;
389
+ case 'form-flow':
390
+ this.taskProcessLinkType$.next('form-flow');
391
+ this.getFormFlowStep(res?.properties.formFlowInstanceId);
392
+ break;
393
+ }
394
+ });
395
+ }
396
+ getFormFlowStep(formFlowInstanceId) {
397
+ this.formFlowService.getFormFlowStep(formFlowInstanceId).subscribe((result) => {
398
+ this.handleFormFlowStep(result);
399
+ });
400
+ }
401
+ handleFormFlowStep(formFlowInstance) {
402
+ if (formFlowInstance.step === null) {
403
+ this.formFlowStepType$.next(null);
404
+ this.formFlowInstanceId = null;
405
+ this.formFlowStepInstanceId = null;
406
+ this.completeTask();
407
+ }
408
+ else {
409
+ this.formFlowStepType$.next(formFlowInstance.step.type);
410
+ this.formFlowInstanceId = formFlowInstance.id;
411
+ this.formFlowStepInstanceId = formFlowInstance.step.id;
412
+ this.setFormDefinitionAndOpenModal(formFlowInstance.step.typeProperties.definition);
413
+ }
414
+ }
415
+ completeTask() {
416
+ this.toastr.success(this.task.name + ' has successfully been completed');
417
+ this.modal.hide();
418
+ this.task = null;
419
+ this.formSubmit.emit();
420
+ }
421
+ resetTaskProcessLinkType() {
422
+ this.taskProcessLinkType$.next(null);
423
+ }
424
+ setFormDefinitionAndOpenModal(formDefinition) {
425
+ this.formDefinition = formDefinition;
426
+ this.modal.show();
427
+ }
428
+ openUrlLink(formDefinition) {
429
+ const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
430
+ window.open(url, '_blank');
431
+ }
432
+ openAngularStateUrlLink(task, formDefinition) {
433
+ this.route.params.pipe(take(1)).subscribe(params => {
434
+ const taskId = task?.id;
435
+ const documentId = params?.documentId;
436
+ this.router.navigate([formDefinition.formAssociation.formLink.url], {
437
+ state: {
438
+ ...(taskId && { taskId }),
439
+ ...(documentId && { documentId }),
440
+ },
441
+ });
442
+ });
443
+ }
444
+ }
445
+ TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$1.FormLinkService }, { token: i2$1.FormFlowService }, { token: i3$1.Router }, { token: i4$1.NGXLogger }, { token: i3$1.ActivatedRoute }, { token: TaskService }], target: i0.ɵɵFactoryTarget.Component });
446
+ TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition && ((processLinkIsForm$ | async) || (formFlowStepTypeIsForm$ | async))\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && !errorMessage\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFound'\"\n ></div>\n </div>\n <div body *ngIf=\"errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\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-template>\n", styles: ["/*!\n * Copyright 2015-2020 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"], components: [{ type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { type: i6.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "formRefresh$"], outputs: ["submit", "change"] }, { type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeEmail"], outputs: ["assignmentOfTaskChanged"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "async": i3.AsyncPipe, "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
448
+ type: Component,
449
+ args: [{ selector: 'valtimo-task-detail-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2020 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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition && ((processLinkIsForm$ | async) || (formFlowStepTypeIsForm$ | async))\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && !errorMessage\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFound'\"\n ></div>\n </div>\n <div body *ngIf=\"errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\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-template>\n", styles: ["/*!\n * Copyright 2015-2020 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"] }]
450
+ }], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$1.FormLinkService }, { type: i2$1.FormFlowService }, { type: i3$1.Router }, { type: i4$1.NGXLogger }, { type: i3$1.ActivatedRoute }, { type: TaskService }]; }, propDecorators: { form: [{
451
+ type: ViewChild,
452
+ args: ['form']
453
+ }], modal: [{
454
+ type: ViewChild,
455
+ args: ['taskDetailModal']
456
+ }], formSubmit: [{
457
+ type: Output
458
+ }], assignmentOfTaskChanged: [{
459
+ type: Output
460
+ }] } });
461
+
462
+ /*
463
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
464
+ *
465
+ * Licensed under EUPL, Version 1.2 (the "License");
466
+ * you may not use this file except in compliance with the License.
467
+ * You may obtain a copy of the License at
468
+ *
469
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
470
+ *
471
+ * Unless required by applicable law or agreed to in writing, software
472
+ * distributed under the License is distributed on an "AS IS" basis,
473
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
474
+ * See the License for the specific language governing permissions and
475
+ * limitations under the License.
476
+ */
477
+ moment.locale(localStorage.getItem('langKey') || '');
478
+ class TaskListComponent {
479
+ constructor(taskService, router, logger, translateService) {
480
+ this.taskService = taskService;
481
+ this.router = router;
482
+ this.logger = logger;
483
+ this.translateService = translateService;
484
+ this.tasks = {
485
+ mine: new TaskList(),
486
+ open: new TaskList(),
487
+ all: new TaskList(),
488
+ };
489
+ this.currentTaskType = 'mine';
490
+ this.listTitle = null;
491
+ this.listDescription = null;
492
+ }
493
+ paginationClicked(page, type) {
494
+ this.tasks[type].page = page - 1;
495
+ this.getTasks(type);
496
+ }
497
+ paginationSet() {
498
+ this.tasks.mine.pagination.size =
499
+ this.tasks.all.pagination.size =
500
+ this.tasks.open.pagination.size =
501
+ this.tasks[this.currentTaskType].pagination.size;
502
+ this.getTasks(this.currentTaskType);
503
+ }
504
+ clearPagination(type) {
505
+ this.tasks[type].page = 0;
506
+ }
507
+ tabChange(tab) {
508
+ this.clearPagination(this.currentTaskType);
509
+ switch (tab.nextId) {
510
+ case 1:
511
+ this.getTasks('mine');
512
+ break;
513
+ case 2:
514
+ this.getTasks('open');
515
+ break;
516
+ case 3:
517
+ this.getTasks('all');
518
+ break;
519
+ default:
520
+ this.logger.fatal('Unreachable case');
521
+ }
522
+ }
523
+ showTask(task) {
524
+ this.router.navigate(['tasks', task.id]);
525
+ }
526
+ getTasks(type) {
527
+ let params;
528
+ this.translationSubscription = combineLatest([
529
+ this.translateService.stream(`task-list.${type}.title`),
530
+ this.translateService.stream(`task-list.${type}.description`),
531
+ ]).subscribe(([title, description]) => {
532
+ this.listTitle = title;
533
+ this.listDescription = description;
534
+ });
535
+ switch (type) {
536
+ case 'mine':
537
+ params = {
538
+ page: this.tasks.mine.page,
539
+ size: this.tasks.mine.pagination.size,
540
+ filter: 'mine',
541
+ };
542
+ this.currentTaskType = 'mine';
543
+ break;
544
+ case 'open':
545
+ params = {
546
+ page: this.tasks.open.page,
547
+ size: this.tasks.open.pagination.size,
548
+ filter: 'open',
549
+ };
550
+ this.currentTaskType = 'open';
551
+ break;
552
+ case 'all':
553
+ params = { page: this.tasks.all.page, size: this.tasks.open.pagination.size, filter: 'all' };
554
+ this.currentTaskType = 'all';
555
+ break;
556
+ default:
557
+ this.logger.fatal('Unreachable case');
558
+ }
559
+ this.taskService.queryTasks(params).subscribe((results) => {
560
+ this.tasks[type].pagination.collectionSize = results.headers.get('x-total-count');
561
+ this.tasks[type].tasks = results.body;
562
+ this.tasks[type].tasks.map((task) => {
563
+ task.created = moment(task.created).format('DD MMM YYYY HH:mm');
564
+ if (task.due) {
565
+ task.due = moment(task.due).format('DD MMM YYYY HH:mm');
566
+ }
567
+ });
568
+ this.tasks[type].fields = [
569
+ {
570
+ key: 'created',
571
+ label: 'Created on',
572
+ },
573
+ {
574
+ key: 'name',
575
+ label: 'Name',
576
+ },
577
+ {
578
+ key: 'valtimoAssignee.fullName',
579
+ label: 'Assignee',
580
+ },
581
+ {
582
+ key: 'due',
583
+ label: 'Due date',
584
+ },
585
+ ];
586
+ });
587
+ }
588
+ rowOpenTaskClick(task) {
589
+ if (!task.endTime) {
590
+ this.taskDetail.openTaskDetails(task);
591
+ }
592
+ else {
593
+ return false;
594
+ }
595
+ }
596
+ ngOnDestroy() {
597
+ this.translationSubscription.unsubscribe();
598
+ }
599
+ }
600
+ TaskListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskListComponent, deps: [{ token: TaskService }, { token: i3$1.Router }, { token: i4$1.NGXLogger }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
601
+ TaskListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: TaskListComponent, selector: "valtimo-task-list", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"tasks[currentTaskType].tasks\"\n [fields]=\"tasks[currentTaskType].fields\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n [viewMode]=\"true\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet()\"\n paginationIdentifier=\"taskList\"\n [isSearchable]=\"true\"\n [header]=\"true\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ listTitle }}</h3>\n <h5 class=\"list-header-description\">{{ listDescription }}</h5>\n </div>\n <div tabs>\n <ul ngbNav [destroyOnHide]=\"false\" (navChange)=\"tabChange($event)\" class=\"nav-tabs\">\n <li [ngbNavItem]=\"1\" [title]=\"'task-list.mine.title' | translate\">\n <a ngbNavLink>{{ 'task-list.mine.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"2\" [title]=\"'task-list.open.title' | translate\">\n <a ngbNavLink>{{ 'task-list.open.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"3\" [title]=\"'task-list.all.title' | translate\">\n <a ngbNavLink>{{ 'task-list.all.title' | translate }}</a>\n </li>\n </ul>\n </div>\n </valtimo-list>\n </valtimo-widget>\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", styles: ["/*!\n * Copyright 2015-2020 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 */.tab-content{padding:0;margin:0}.nav.nav-tabs{background-color:#f5f5f5}\n"], components: [{ type: i6.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i6.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }], directives: [{ type: i7.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i7.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { type: i7.NgbNavLink, selector: "a[ngbNavLink]" }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskListComponent, decorators: [{
603
+ type: Component,
604
+ args: [{ selector: 'valtimo-task-list', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2020 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"tasks[currentTaskType].tasks\"\n [fields]=\"tasks[currentTaskType].fields\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n [viewMode]=\"true\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet()\"\n paginationIdentifier=\"taskList\"\n [isSearchable]=\"true\"\n [header]=\"true\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ listTitle }}</h3>\n <h5 class=\"list-header-description\">{{ listDescription }}</h5>\n </div>\n <div tabs>\n <ul ngbNav [destroyOnHide]=\"false\" (navChange)=\"tabChange($event)\" class=\"nav-tabs\">\n <li [ngbNavItem]=\"1\" [title]=\"'task-list.mine.title' | translate\">\n <a ngbNavLink>{{ 'task-list.mine.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"2\" [title]=\"'task-list.open.title' | translate\">\n <a ngbNavLink>{{ 'task-list.open.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"3\" [title]=\"'task-list.all.title' | translate\">\n <a ngbNavLink>{{ 'task-list.all.title' | translate }}</a>\n </li>\n </ul>\n </div>\n </valtimo-list>\n </valtimo-widget>\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", styles: ["/*!\n * Copyright 2015-2020 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 */.tab-content{padding:0;margin:0}.nav.nav-tabs{background-color:#f5f5f5}\n"] }]
605
+ }], ctorParameters: function () { return [{ type: TaskService }, { type: i3$1.Router }, { type: i4$1.NGXLogger }, { type: i4.TranslateService }]; }, propDecorators: { taskDetail: [{
606
+ type: ViewChild,
607
+ args: ['taskDetail']
608
+ }] } });
609
+
610
+ /*
611
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
612
+ *
613
+ * Licensed under EUPL, Version 1.2 (the "License");
614
+ * you may not use this file except in compliance with the License.
615
+ * You may obtain a copy of the License at
616
+ *
617
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
618
+ *
619
+ * Unless required by applicable law or agreed to in writing, software
620
+ * distributed under the License is distributed on an "AS IS" basis,
621
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
622
+ * See the License for the specific language governing permissions and
623
+ * limitations under the License.
624
+ */
625
+ const routes = [
626
+ {
627
+ path: 'tasks',
628
+ component: TaskListComponent,
629
+ canActivate: [AuthGuardService],
630
+ data: { title: 'Tasks', roles: [ROLE_USER] },
631
+ },
632
+ ];
633
+ class TaskRoutingModule {
634
+ }
635
+ TaskRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
636
+ TaskRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, i3$1.RouterModule], exports: [RouterModule] });
637
+ TaskRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskRoutingModule, imports: [[CommonModule, RouterModule.forChild(routes)], RouterModule] });
638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskRoutingModule, decorators: [{
639
+ type: NgModule,
640
+ args: [{
641
+ declarations: [],
642
+ imports: [CommonModule, RouterModule.forChild(routes)],
643
+ exports: [RouterModule],
644
+ }]
645
+ }] });
646
+
647
+ /*
648
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
649
+ *
650
+ * Licensed under EUPL, Version 1.2 (the "License");
651
+ * you may not use this file except in compliance with the License.
652
+ * You may obtain a copy of the License at
653
+ *
654
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
655
+ *
656
+ * Unless required by applicable law or agreed to in writing, software
657
+ * distributed under the License is distributed on an "AS IS" basis,
658
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
659
+ * See the License for the specific language governing permissions and
660
+ * limitations under the License.
661
+ */
662
+ class TaskModule {
663
+ }
664
+ TaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
665
+ TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskModule, declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent], imports: [CommonModule,
666
+ TaskRoutingModule,
667
+ ListModule,
668
+ PageHeaderModule,
669
+ WidgetModule,
670
+ SpinnerModule,
671
+ SearchableDropdownSelectModule,
672
+ CamundaFormModule,
673
+ BrowserAnimationsModule,
674
+ FormsModule, i1$1.ToastrModule, i4.TranslateModule, NgbModule,
675
+ FormIoModule,
676
+ ModalModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] });
677
+ TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskModule, imports: [[
678
+ CommonModule,
679
+ TaskRoutingModule,
680
+ ListModule,
681
+ PageHeaderModule,
682
+ WidgetModule,
683
+ SpinnerModule,
684
+ SearchableDropdownSelectModule,
685
+ CamundaFormModule,
686
+ BrowserAnimationsModule,
687
+ FormsModule,
688
+ ToastrModule.forRoot({
689
+ positionClass: 'toast-bottom-full-width',
690
+ preventDuplicates: true,
691
+ }),
692
+ TranslateModule.forRoot({
693
+ loader: {
694
+ provide: TranslateLoader,
695
+ useFactory: HttpLoaderFactory,
696
+ deps: [HttpClient],
697
+ },
698
+ }),
699
+ NgbModule,
700
+ FormIoModule,
701
+ ModalModule,
702
+ ]] });
703
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TaskModule, decorators: [{
704
+ type: NgModule,
705
+ args: [{
706
+ declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
707
+ imports: [
708
+ CommonModule,
709
+ TaskRoutingModule,
710
+ ListModule,
711
+ PageHeaderModule,
712
+ WidgetModule,
713
+ SpinnerModule,
714
+ SearchableDropdownSelectModule,
715
+ CamundaFormModule,
716
+ BrowserAnimationsModule,
717
+ FormsModule,
718
+ ToastrModule.forRoot({
719
+ positionClass: 'toast-bottom-full-width',
720
+ preventDuplicates: true,
721
+ }),
722
+ TranslateModule.forRoot({
723
+ loader: {
724
+ provide: TranslateLoader,
725
+ useFactory: HttpLoaderFactory,
726
+ deps: [HttpClient],
727
+ },
728
+ }),
729
+ NgbModule,
730
+ FormIoModule,
731
+ ModalModule,
732
+ ],
733
+ exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
734
+ }]
735
+ }] });
736
+
737
+ /*
738
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
739
+ *
740
+ * Licensed under EUPL, Version 1.2 (the "License");
741
+ * you may not use this file except in compliance with the License.
742
+ * You may obtain a copy of the License at
743
+ *
744
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
745
+ *
746
+ * Unless required by applicable law or agreed to in writing, software
747
+ * distributed under the License is distributed on an "AS IS" basis,
748
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
749
+ * See the License for the specific language governing permissions and
750
+ * limitations under the License.
751
+ */
752
+
753
+ /**
754
+ * Generated bundle index. Do not edit.
755
+ */
756
+
757
+ export { AssignUserToTaskComponent, TaskDetailModalComponent, TaskList, TaskListComponent, TaskModule, TaskService };
758
+ //# sourceMappingURL=valtimo-task.mjs.map