@valtimo/task 10.5.0 → 10.6.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.
@@ -1,5 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
3
+ import * as i6 from '@valtimo/security';
4
+ import { InterceptorSkip, AuthGuardService } from '@valtimo/security';
3
5
  import * as i1 from '@angular/common/http';
4
6
  import { HttpClient } from '@angular/common/http';
5
7
  import * as i2 from '@valtimo/config';
@@ -20,11 +22,10 @@ import moment from 'moment';
20
22
  import { take, tap, map } from 'rxjs/operators';
21
23
  import { BehaviorSubject, Subscription, combineLatest, distinctUntilChanged, tap as tap$1 } from 'rxjs';
22
24
  import * as i2$2 from '@valtimo/form-link';
25
+ import { FormLinkModule } from '@valtimo/form-link';
23
26
  import * as i3 from '@angular/router';
24
27
  import { RouterModule } from '@angular/router';
25
28
  import * as i4$1 from 'ngx-logger';
26
- import * as i6 from '@valtimo/security';
27
- import { AuthGuardService } from '@valtimo/security';
28
29
  import * as i8 from '@valtimo/document';
29
30
  import * as i10 from 'carbon-components-angular';
30
31
  import { LinkModule } from 'carbon-components-angular';
@@ -120,6 +121,11 @@ class TaskService {
120
121
  });
121
122
  }
122
123
  getTaskProcessLink(taskId) {
124
+ return this.http.get(`${this.valtimoEndpointUri}v2/process-link/task/${taskId}`, {
125
+ headers: { [InterceptorSkip]: '' },
126
+ });
127
+ }
128
+ getTaskProcessLinkV1(taskId) {
123
129
  return this.http.get(`${this.valtimoEndpointUri}v1/process-link/task/${taskId}`);
124
130
  }
125
131
  getConfigCustomTaskList() {
@@ -271,9 +277,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
271
277
  */
272
278
  moment.locale(localStorage.getItem('langKey') || '');
273
279
  class TaskDetailModalComponent {
274
- constructor(toastr, formLinkService, formFlowService, router, logger, route, taskService, userProviderService, modalService, documentService, translateService) {
280
+ constructor(toastr, formLinkService, processLinkService, formFlowService, router, logger, route, taskService, userProviderService, modalService, documentService, translateService) {
275
281
  this.toastr = toastr;
276
282
  this.formLinkService = formLinkService;
283
+ this.processLinkService = processLinkService;
277
284
  this.formFlowService = formFlowService;
278
285
  this.router = router;
279
286
  this.logger = logger;
@@ -294,8 +301,6 @@ class TaskDetailModalComponent {
294
301
  this.taskProcessLinkType$ = new BehaviorSubject(null);
295
302
  this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
296
303
  this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
297
- this.formFlowStepType$ = new BehaviorSubject(null);
298
- this.formFlowStepTypeIsForm$ = this.formFlowStepType$.pipe(map(type => type === 'form'));
299
304
  this.formIoFormData$ = new BehaviorSubject(null);
300
305
  this._subscriptions = new Subscription();
301
306
  this.formioOptions = new FormioOptionsImpl();
@@ -304,10 +309,9 @@ class TaskDetailModalComponent {
304
309
  ngAfterViewInit() {
305
310
  this._subscriptions.add(this.modal.modalShowing$
306
311
  .pipe(distinctUntilChanged(), tap$1(modalShowing => {
307
- const formIoFormData = this.formIoFormData$.getValue();
308
- if (!modalShowing && formIoFormData && this.formFlowInstanceId) {
309
- if (this.taskProcessLinkType$.getValue() === 'form-flow') {
310
- this.formFlowService.save(this.formFlowInstanceId, formIoFormData).subscribe(() => null, errors => this.form.showErrors(errors));
312
+ if (!modalShowing) {
313
+ if (this.formFlow) {
314
+ this.formFlow.saveData();
311
315
  }
312
316
  }
313
317
  }))
@@ -326,37 +330,41 @@ class TaskDetailModalComponent {
326
330
  title: task.name,
327
331
  subtitle: `${this.translateService.instant('taskDetail.taskCreated')} ${task.created}`,
328
332
  };
329
- this.formLinkService
330
- .getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
331
- )
332
- .subscribe(formDefinition => {
333
- this.formAssociation = formDefinition.formAssociation;
334
- const className = this.formAssociation.formLink.className.split('.');
335
- const linkType = className[className.length - 1];
336
- switch (linkType) {
337
- case 'BpmnElementFormIdLink':
338
- this.setFormDefinitionAndOpenModal(formDefinition);
339
- break;
340
- case 'BpmnElementFormFlowIdLink':
341
- // We can't use the formDefinition here because the form definition is provided per form flow step
342
- // I'm still leaving this in here in case we want to add form flow specific code.
343
- break;
344
- case 'BpmnElementUrlLink':
345
- this.openUrlLink(formDefinition);
346
- break;
347
- case 'BpmnElementAngularStateUrlLink':
348
- this.openAngularStateUrlLink(task, formDefinition);
349
- break;
350
- default:
351
- this.logger.fatal('Unsupported class name');
352
- }
353
- }, errors => {
354
- var _a;
355
- if ((_a = errors === null || errors === void 0 ? void 0 : errors.error) === null || _a === void 0 ? void 0 : _a.detail) {
356
- this.errorMessage = errors.error.detail;
357
- }
358
- this.modal.show();
359
- });
333
+ //only load from formlink when process link failed for backwards compatibility
334
+ if (!this.taskProcessLinkType$.getValue()) {
335
+ this.formLinkService
336
+ .getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
337
+ )
338
+ .subscribe(formDefinition => {
339
+ this.formAssociation = formDefinition.formAssociation;
340
+ const className = this.formAssociation.formLink.className.split('.');
341
+ const linkType = className[className.length - 1];
342
+ switch (linkType) {
343
+ case 'BpmnElementFormIdLink':
344
+ this.setFormDefinitionAndOpenModal(formDefinition);
345
+ break;
346
+ case 'BpmnElementFormFlowIdLink':
347
+ // We can't use the formDefinition here because the form definition is provided per form flow step
348
+ // I'm still leaving this in here in case we want to add form flow specific code.
349
+ this.modal.show();
350
+ break;
351
+ case 'BpmnElementUrlLink':
352
+ this.openUrlLink(formDefinition);
353
+ break;
354
+ case 'BpmnElementAngularStateUrlLink':
355
+ this.openAngularStateUrlLink(task, formDefinition);
356
+ break;
357
+ default:
358
+ this.logger.fatal('Unsupported class name');
359
+ }
360
+ }, errors => {
361
+ var _a;
362
+ if ((_a = errors === null || errors === void 0 ? void 0 : errors.error) === null || _a === void 0 ? void 0 : _a.detail) {
363
+ this.errorMessage = errors.error.detail;
364
+ }
365
+ this.modal.show();
366
+ });
367
+ }
360
368
  }
361
369
  gotoFormLinkScreen() {
362
370
  this.modal.hide();
@@ -372,22 +380,26 @@ class TaskDetailModalComponent {
372
380
  this.formIoFormData$.next(submission.data);
373
381
  }
374
382
  if (this.taskProcessLinkType$.getValue() === 'form') {
375
- this.formLinkService
376
- .onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
377
- .subscribe((_) => {
378
- this.completeTask();
379
- }, errors => {
380
- this.form.showErrors(errors);
381
- });
382
- }
383
- if (this.taskProcessLinkType$.getValue() === 'form-flow') {
384
- if (submission.data.submit) {
385
- this.formFlowService
386
- .submitStep(this.formFlowInstanceId, this.formFlowStepInstanceId, submission.data)
387
- .subscribe((result) => this.handleFormFlowStep(result), errors => this.form.showErrors(errors));
383
+ if (this.processLinkId) {
384
+ this.processLinkService
385
+ .submitForm(this.processLinkId, submission.data, this.task.businessKey, this.task.id)
386
+ .subscribe({
387
+ next: (_) => {
388
+ this.completeTask();
389
+ },
390
+ error: errors => {
391
+ this.form.showErrors(errors);
392
+ },
393
+ });
388
394
  }
389
- else if (submission.data['back']) {
390
- this.formFlowService.back(this.formFlowInstanceId, submission.data).subscribe((result) => this.handleFormFlowStep(result), errors => this.form.showErrors(errors));
395
+ else {
396
+ this.formLinkService
397
+ .onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
398
+ .subscribe((_) => {
399
+ this.completeTask();
400
+ }, errors => {
401
+ this.form.showErrors(errors);
402
+ });
391
403
  }
392
404
  }
393
405
  }
@@ -395,50 +407,56 @@ class TaskDetailModalComponent {
395
407
  this.formDefinition = null;
396
408
  }
397
409
  getTaskProcessLink(taskId) {
398
- this.taskService.getTaskProcessLink(taskId).subscribe(res => {
399
- switch (res === null || res === void 0 ? void 0 : res.type) {
410
+ this.taskService.getTaskProcessLink(taskId).subscribe({
411
+ next: res => {
412
+ if (res != null) {
413
+ switch (res === null || res === void 0 ? void 0 : res.type) {
414
+ case 'form':
415
+ this.taskProcessLinkType$.next('form');
416
+ this.processLinkId = res.processLinkId;
417
+ this.setFormDefinitionAndOpenModal(res.properties.prefilledForm);
418
+ break;
419
+ case 'form-flow':
420
+ this.taskProcessLinkType$.next('form-flow');
421
+ this.formFlowInstanceId = res.properties.formFlowInstanceId;
422
+ break;
423
+ }
424
+ }
425
+ else {
426
+ this.getLegacyTaskProcessLink(taskId);
427
+ }
428
+ },
429
+ error: _ => {
430
+ this.getLegacyTaskProcessLink(taskId);
431
+ },
432
+ });
433
+ }
434
+ completeTask() {
435
+ this.toastr.success(`${this.task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
436
+ this.modal.hide();
437
+ this.task = null;
438
+ this.formSubmit.emit();
439
+ }
440
+ getLegacyTaskProcessLink(taskId) {
441
+ this.taskService.getTaskProcessLinkV1(taskId).subscribe(resV1 => {
442
+ switch (resV1 === null || resV1 === void 0 ? void 0 : resV1.type) {
400
443
  case 'form':
401
444
  this.taskProcessLinkType$.next('form');
402
445
  break;
403
446
  case 'form-flow':
404
447
  this.taskProcessLinkType$.next('form-flow');
405
- this.getFormFlowStep(res === null || res === void 0 ? void 0 : res.properties.formFlowInstanceId);
448
+ this.formFlowInstanceId = resV1.properties.formFlowInstanceId;
406
449
  break;
407
450
  }
408
451
  });
409
452
  }
410
- getFormFlowStep(formFlowInstanceId) {
411
- this.formFlowService
412
- .getFormFlowStep(formFlowInstanceId)
413
- .subscribe((result) => {
414
- this.handleFormFlowStep(result);
415
- });
416
- }
417
- handleFormFlowStep(formFlowInstance) {
418
- if (formFlowInstance.step === null) {
419
- this.formFlowStepType$.next(null);
420
- this.formFlowInstanceId = null;
421
- this.formFlowStepInstanceId = null;
422
- this.completeTask();
423
- }
424
- else {
425
- this.modalService.scrollToTop();
426
- this.formFlowStepType$.next(formFlowInstance.step.type);
427
- this.formFlowInstanceId = formFlowInstance.id;
428
- this.formFlowStepInstanceId = formFlowInstance.step.id;
429
- this.setFormDefinitionAndOpenModal(formFlowInstance.step.typeProperties.definition);
430
- }
431
- }
432
- completeTask() {
433
- this.toastr.success(`${this.task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
434
- this.modal.hide();
435
- this.task = null;
436
- this.formSubmit.emit();
437
- }
438
453
  resetTaskProcessLinkType() {
439
454
  this.taskProcessLinkType$.next(null);
455
+ this.processLinkId = null;
456
+ this.formAssociation = null;
440
457
  }
441
458
  setFormDefinitionAndOpenModal(formDefinition) {
459
+ this.taskProcessLinkType$.next('form');
442
460
  this.formDefinition = formDefinition;
443
461
  this.modal.show();
444
462
  }
@@ -463,14 +481,17 @@ class TaskDetailModalComponent {
463
481
  });
464
482
  }
465
483
  }
466
- TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$2.FormLinkService }, { token: i2$2.FormFlowService }, { token: i3.Router }, { token: i4$1.NGXLogger }, { token: i3.ActivatedRoute }, { token: TaskService }, { token: i6.UserProviderService }, { token: i7.ValtimoModalService }, { token: i8.DocumentService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
467
- TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", 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-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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div\n body\n *ngIf=\"formDefinition && ((processLinkIsForm$ | async) || (formFlowStepTypeIsForm$ | async))\"\n >\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && !errorMessage\">\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=\"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-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: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i7.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeEmail"], outputs: ["assignmentOfTaskChanged"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
484
+ TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$2.FormLinkService }, { token: i2$2.ProcessLinkService }, { token: i2$2.FormFlowService }, { token: i3.Router }, { token: i4$1.NGXLogger }, { token: i3.ActivatedRoute }, { token: TaskService }, { token: i6.UserProviderService }, { token: i7.ValtimoModalService }, { token: i8.DocumentService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
485
+ TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition && (processLinkIsForm$ | async)\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"processLinkIsFormFlow$ | async\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formDefinition && !formFlowInstanceId && !errorMessage\">\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=\"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-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: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i7.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i2$2.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: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
468
486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
469
487
  type: Component,
470
- 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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div\n body\n *ngIf=\"formDefinition && ((processLinkIsForm$ | async) || (formFlowStepTypeIsForm$ | async))\"\n >\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && !errorMessage\">\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=\"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-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"] }]
471
- }], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$2.FormLinkService }, { type: i2$2.FormFlowService }, { type: i3.Router }, { type: i4$1.NGXLogger }, { type: i3.ActivatedRoute }, { type: TaskService }, { type: i6.UserProviderService }, { type: i7.ValtimoModalService }, { type: i8.DocumentService }, { type: i4.TranslateService }]; }, propDecorators: { form: [{
488
+ 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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition && (processLinkIsForm$ | async)\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"processLinkIsFormFlow$ | async\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formDefinition && !formFlowInstanceId && !errorMessage\">\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=\"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-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"] }]
489
+ }], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$2.FormLinkService }, { type: i2$2.ProcessLinkService }, { type: i2$2.FormFlowService }, { type: i3.Router }, { type: i4$1.NGXLogger }, { type: i3.ActivatedRoute }, { type: TaskService }, { type: i6.UserProviderService }, { type: i7.ValtimoModalService }, { type: i8.DocumentService }, { type: i4.TranslateService }]; }, propDecorators: { form: [{
472
490
  type: ViewChild,
473
491
  args: ['form']
492
+ }], formFlow: [{
493
+ type: ViewChild,
494
+ args: ['formFlow']
474
495
  }], modal: [{
475
496
  type: ViewChild,
476
497
  args: ['taskDetailModal']
@@ -748,7 +769,8 @@ TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14
748
769
  FormsModule, i1$1.ToastrModule, i4.TranslateModule, NgbModule,
749
770
  FormIoModule,
750
771
  ModalModule,
751
- LinkModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] });
772
+ LinkModule,
773
+ FormLinkModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] });
752
774
  TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskModule, imports: [CommonModule,
753
775
  TaskRoutingModule,
754
776
  ListModule,
@@ -773,7 +795,8 @@ TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14
773
795
  NgbModule,
774
796
  FormIoModule,
775
797
  ModalModule,
776
- LinkModule] });
798
+ LinkModule,
799
+ FormLinkModule] });
777
800
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskModule, decorators: [{
778
801
  type: NgModule,
779
802
  args: [{
@@ -804,6 +827,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
804
827
  FormIoModule,
805
828
  ModalModule,
806
829
  LinkModule,
830
+ FormLinkModule,
807
831
  ],
808
832
  exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
809
833
  }]