@valtimo/dossier-management 11.1.2 → 11.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 (67) hide show
  1. package/esm2022/lib/components/dossier-management-assignee/dossier-management-assignee.component.mjs +5 -5
  2. package/esm2022/lib/components/dossier-management-connect-modal/dossier-management-connect-modal.component.mjs +56 -27
  3. package/esm2022/lib/components/dossier-management-detail/dossier-management-detail.component.mjs +13 -74
  4. package/esm2022/lib/components/dossier-management-detail-container/dossier-management-detail-container.component.mjs +17 -13
  5. package/esm2022/lib/components/dossier-management-detail-container-actions/dossier-management-detail-container-actions.mjs +152 -0
  6. package/esm2022/lib/components/dossier-management-document-definition/dossier-management-document-definition.mjs +48 -0
  7. package/esm2022/lib/components/dossier-management-link-process/dossier-management-link-process.component.mjs +3 -3
  8. package/esm2022/lib/components/dossier-management-list/dossier-management-list.component.mjs +47 -30
  9. package/esm2022/lib/components/dossier-management-list-columns/dossier-management-list-columns.component.mjs +45 -43
  10. package/esm2022/lib/components/dossier-management-processes/dossier-management-processes.component.mjs +110 -0
  11. package/esm2022/lib/components/dossier-management-search-fields/dossier-management-search-fields.component.mjs +67 -58
  12. package/esm2022/lib/components/dossier-management-tabs/dossier-management-edit-tab-modal/dossier-management-edit-tab-modal.component.mjs +1 -1
  13. package/esm2022/lib/components/dossier-management-tabs/dossier-management-tabs.component.mjs +14 -27
  14. package/esm2022/lib/components/dossier-management-upload/dossier-management-upload.component.mjs +167 -111
  15. package/esm2022/lib/components/dossier-management-upload/dossier-management-upload.constants.mjs +23 -0
  16. package/esm2022/lib/components/dossier-management-upload/step/dossier-management-upload-step.component.mjs +17 -0
  17. package/esm2022/lib/dossier-management.module.mjs +48 -9
  18. package/esm2022/lib/models/tab.enum.mjs +3 -1
  19. package/esm2022/lib/services/dossier-detail.service.mjs +84 -0
  20. package/esm2022/lib/services/dossier-export.service.mjs +39 -0
  21. package/esm2022/lib/services/dossier-import.service.mjs +38 -0
  22. package/esm2022/lib/services/index.mjs +3 -1
  23. package/esm2022/lib/services/tab.service.mjs +2 -2
  24. package/fesm2022/valtimo-dossier-management.mjs +1174 -654
  25. package/fesm2022/valtimo-dossier-management.mjs.map +1 -1
  26. package/lib/components/dossier-management-assignee/dossier-management-assignee.component.d.ts +1 -1
  27. package/lib/components/dossier-management-assignee/dossier-management-assignee.component.d.ts.map +1 -1
  28. package/lib/components/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts +13 -10
  29. package/lib/components/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts.map +1 -1
  30. package/lib/components/dossier-management-detail/dossier-management-detail.component.d.ts +7 -22
  31. package/lib/components/dossier-management-detail/dossier-management-detail.component.d.ts.map +1 -1
  32. package/lib/components/dossier-management-detail-container/dossier-management-detail-container.component.d.ts +3 -1
  33. package/lib/components/dossier-management-detail-container/dossier-management-detail-container.component.d.ts.map +1 -1
  34. package/lib/components/dossier-management-detail-container-actions/dossier-management-detail-container-actions.d.ts +40 -0
  35. package/lib/components/dossier-management-detail-container-actions/dossier-management-detail-container-actions.d.ts.map +1 -0
  36. package/lib/components/dossier-management-document-definition/dossier-management-document-definition.d.ts +15 -0
  37. package/lib/components/dossier-management-document-definition/dossier-management-document-definition.d.ts.map +1 -0
  38. package/lib/components/dossier-management-list/dossier-management-list.component.d.ts +16 -19
  39. package/lib/components/dossier-management-list/dossier-management-list.component.d.ts.map +1 -1
  40. package/lib/components/dossier-management-list-columns/dossier-management-list-columns.component.d.ts +14 -11
  41. package/lib/components/dossier-management-list-columns/dossier-management-list-columns.component.d.ts.map +1 -1
  42. package/lib/components/dossier-management-processes/dossier-management-processes.component.d.ts +29 -0
  43. package/lib/components/dossier-management-processes/dossier-management-processes.component.d.ts.map +1 -0
  44. package/lib/components/dossier-management-search-fields/dossier-management-search-fields.component.d.ts +14 -13
  45. package/lib/components/dossier-management-search-fields/dossier-management-search-fields.component.d.ts.map +1 -1
  46. package/lib/components/dossier-management-tabs/dossier-management-tabs.component.d.ts +3 -2
  47. package/lib/components/dossier-management-tabs/dossier-management-tabs.component.d.ts.map +1 -1
  48. package/lib/components/dossier-management-upload/dossier-management-upload.component.d.ts +42 -30
  49. package/lib/components/dossier-management-upload/dossier-management-upload.component.d.ts.map +1 -1
  50. package/lib/components/dossier-management-upload/dossier-management-upload.constants.d.ts +15 -0
  51. package/lib/components/dossier-management-upload/dossier-management-upload.constants.d.ts.map +1 -0
  52. package/lib/components/dossier-management-upload/step/dossier-management-upload-step.component.d.ts +9 -0
  53. package/lib/components/dossier-management-upload/step/dossier-management-upload-step.component.d.ts.map +1 -0
  54. package/lib/dossier-management.module.d.ts +13 -9
  55. package/lib/dossier-management.module.d.ts.map +1 -1
  56. package/lib/models/tab.enum.d.ts +2 -0
  57. package/lib/models/tab.enum.d.ts.map +1 -1
  58. package/lib/services/dossier-detail.service.d.ts +30 -0
  59. package/lib/services/dossier-detail.service.d.ts.map +1 -0
  60. package/lib/services/dossier-export.service.d.ts +14 -0
  61. package/lib/services/dossier-export.service.d.ts.map +1 -0
  62. package/lib/services/dossier-import.service.d.ts +14 -0
  63. package/lib/services/dossier-import.service.d.ts.map +1 -0
  64. package/lib/services/index.d.ts +2 -0
  65. package/lib/services/index.d.ts.map +1 -1
  66. package/lib/services/tab.service.d.ts.map +1 -1
  67. package/package.json +1 -1
@@ -1,34 +1,34 @@
1
- import * as i4 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
1
+ import * as i6 from '@angular/common';
2
+ import { DOCUMENT, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, EventEmitter, Output, ViewChild, Injectable, Optional, Inject, ChangeDetectionStrategy, Input, ViewEncapsulation, NgModule } from '@angular/core';
4
+ import { Component, Injectable, Optional, Inject, EventEmitter, ViewChild, Output, ChangeDetectionStrategy, Input, ViewEncapsulation, NgModule } from '@angular/core';
5
5
  import * as i2$1 from '@angular/forms';
6
6
  import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
- import * as i7 from '@ng-bootstrap/ng-bootstrap';
7
+ import * as i9 from '@ng-bootstrap/ng-bootstrap';
8
8
  import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
9
9
  import * as i3 from '@ngx-translate/core';
10
10
  import { TranslateModule } from '@ngx-translate/core';
11
- import * as i6 from '@valtimo/components';
12
- import { ViewType, WidgetModule, DropzoneModule, ListModule, ModalModule, MultiselectDropdownModule, ParagraphModule, SelectModule, SpinnerModule, InputModule, FormModule, TooltipIconModule, CarbonMultiInputModule, ConfirmationModalModule, TableModule, ValtimoCdsModalDirectiveModule, CarbonListModule } from '@valtimo/components';
13
- import * as i1$3 from '@valtimo/config';
11
+ import * as i7 from '@valtimo/components';
12
+ import { ViewType, MoveRowDirection, CARBON_CONSTANTS, WidgetModule, DropzoneModule, ListModule, ModalModule, MultiselectDropdownModule, ParagraphModule, SelectModule, SpinnerModule, InputModule, FormModule, TooltipIconModule, CarbonMultiInputModule, ConfirmationModalModule, TableModule, ValtimoCdsModalDirectiveModule, CarbonListModule, RenderInPageHeaderDirectiveModule, ValtimoCdsOverflowButtonDirectiveModule, EditorModule } from '@valtimo/components';
13
+ import * as i1$2 from '@valtimo/config';
14
14
  import { UploadProvider, ROLE_ADMIN, ConfigModule } from '@valtimo/config';
15
- import * as i9 from 'carbon-components-angular';
16
- import { NotificationModule, ButtonModule, IconModule, ModalModule as ModalModule$1, InputModule as InputModule$1, DropdownModule, CheckboxModule, LoadingModule, LinkModule, ComboBoxModule } from 'carbon-components-angular';
17
- import { BehaviorSubject, map, switchMap, combineLatest, take, tap as tap$1, of, catchError, Subscription, filter, distinctUntilChanged, delay, startWith, Subject } from 'rxjs';
18
- import { tap, take as take$1, switchMap as switchMap$1 } from 'rxjs/operators';
15
+ import * as i4 from 'carbon-components-angular';
16
+ import { NotificationService, NotificationModule, ButtonModule, IconModule, ModalModule as ModalModule$1, InputModule as InputModule$1, DropdownModule, CheckboxModule, LoadingModule, LinkModule, ComboBoxModule, DialogModule, TabsModule, TagModule, FileUploaderModule, ProgressBarModule } from 'carbon-components-angular';
17
+ import { BehaviorSubject, map, switchMap, combineLatest, take, tap as tap$1, of, catchError, filter, distinctUntilChanged, Subscription, delay, startWith, Subject } from 'rxjs';
18
+ import { tap, take as take$1 } from 'rxjs/operators';
19
19
  import * as i1 from '@valtimo/document';
20
20
  import { DocumentDefinitionCreateRequest } from '@valtimo/document';
21
21
  import * as i2 from '@angular/router';
22
22
  import { RouterModule } from '@angular/router';
23
- import * as i1$1 from '@valtimo/process';
24
- import * as i3$1 from 'ngx-toastr';
25
23
  import { DefaultTabs, CASE_TAB_TOKEN, ApiTabType } from '@valtimo/dossier';
26
- import * as i1$2 from '@valtimo/form';
27
- import * as i2$2 from '@angular/common/http';
28
- import * as i4$1 from '@angular/platform-browser';
29
- import { Code16, Development16, WatsonHealthPageScroll16, ArrowDown16, ArrowUp16 } from '@carbon/icons';
24
+ import * as i1$1 from '@valtimo/form';
25
+ import * as i1$3 from '@angular/common/http';
26
+ import { InterceptorSkipHeader, AuthGuardService } from '@valtimo/security';
27
+ import * as i4$1 from '@valtimo/process';
28
+ import { ArrowDown16, ArrowUp16, Code16, Development16, WatsonHealthPageScroll16, Link16, WarningFilled16, Upload16 } from '@carbon/icons';
29
+ import * as i4$2 from '@angular/platform-browser';
30
+ import * as i2$2 from 'ngx-toastr';
30
31
  import moment from 'moment';
31
- import { AuthGuardService } from '@valtimo/security';
32
32
 
33
33
  /*
34
34
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -78,122 +78,24 @@ class DossierManagementAssigneeComponent {
78
78
  }
79
79
  toggleAssignee(currentSettings, documentDefinitionName) {
80
80
  this.updateCaseSettings({
81
- canHaveAssignee: !currentSettings.canHaveAssignee,
81
+ canHaveAssignee: !currentSettings?.canHaveAssignee,
82
82
  autoAssignTasks: currentSettings.autoAssignTasks,
83
83
  }, documentDefinitionName);
84
84
  }
85
85
  toggleTaskAssignment(currentSettings, documentDefinitionName) {
86
86
  this.updateCaseSettings({
87
- canHaveAssignee: currentSettings.canHaveAssignee,
87
+ canHaveAssignee: currentSettings?.canHaveAssignee,
88
88
  autoAssignTasks: !currentSettings.autoAssignTasks,
89
89
  }, documentDefinitionName);
90
90
  }
91
91
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementAssigneeComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
92
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementAssigneeComponent, selector: "valtimo-dossier-management-assignee", 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<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.toggleAssignee.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n currentValue: currentValue$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs.currentValue.canHaveAssignee\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleAssignee(obs.currentValue, obs.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAssignee.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n <ng-container *ngIf=\"obs.currentValue.canHaveAssignee\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs.currentValue.autoAssignTasks\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleTaskAssignment(obs.currentValue, obs.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAutoAssignTasks.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
92
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementAssigneeComponent, selector: "valtimo-dossier-management-assignee", 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<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.toggleAssignee.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n currentValue: currentValue$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs?.currentValue?.canHaveAssignee\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleAssignee(obs?.currentValue, obs.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAssignee.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n <ng-container *ngIf=\"obs?.currentValue?.canHaveAssignee\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs?.currentValue?.autoAssignTasks\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleTaskAssignment(obs?.currentValue, obs?.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAutoAssignTasks.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
93
93
  }
94
94
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementAssigneeComponent, decorators: [{
95
95
  type: Component,
96
- args: [{ selector: 'valtimo-dossier-management-assignee', 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<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.toggleAssignee.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n currentValue: currentValue$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs.currentValue.canHaveAssignee\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleAssignee(obs.currentValue, obs.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAssignee.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n <ng-container *ngIf=\"obs.currentValue.canHaveAssignee\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs.currentValue.autoAssignTasks\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleTaskAssignment(obs.currentValue, obs.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAutoAssignTasks.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n" }]
96
+ args: [{ selector: 'valtimo-dossier-management-assignee', 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<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.toggleAssignee.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n currentValue: currentValue$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs?.currentValue?.canHaveAssignee\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleAssignee(obs?.currentValue, obs.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAssignee.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n <ng-container *ngIf=\"obs?.currentValue?.canHaveAssignee\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"obs?.currentValue?.autoAssignTasks\"\n class=\"custom-control-input\"\n type=\"checkbox\"\n [disabled]=\"obs.disabled\"\n (click)=\"toggleTaskAssignment(obs?.currentValue, obs?.documentDefinitionName)\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'dossierManagement.toggleAutoAssignTasks.checkboxDescription' | translate\n }}</span>\n </label>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n" }]
97
97
  }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }]; } });
98
98
 
99
- /*
100
- * Copyright 2015-2023 Ritense BV, the Netherlands.
101
- *
102
- * Licensed under EUPL, Version 1.2 (the "License");
103
- * you may not use this file except in compliance with the License.
104
- * You may obtain a copy of the License at
105
- *
106
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
107
- *
108
- * Unless required by applicable law or agreed to in writing, software
109
- * distributed under the License is distributed on an "AS IS" basis,
110
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111
- * See the License for the specific language governing permissions and
112
- * limitations under the License.
113
- */
114
- class DossierManagementConnectModalComponent {
115
- constructor(processService, documentService, toasterService) {
116
- this.processService = processService;
117
- this.documentService = documentService;
118
- this.toasterService = toasterService;
119
- this.documentDefinition = null;
120
- this.newDocumentProcessDefinition = null;
121
- this.newDocumentProcessDefinitionInit = true;
122
- this.newDocumentProcessDefinitionStartableByUser = false;
123
- this.processDocumentDefinitionExists = {};
124
- this.reloadProcessDocumentDefinitions = new EventEmitter();
125
- }
126
- loadProcessDocumentDefinitions() {
127
- this.processDocumentDefinitionExists = {};
128
- this.documentService
129
- .findProcessDocumentDefinitions(this.documentDefinition.id.name)
130
- .subscribe((processDocumentDefinitions) => {
131
- processDocumentDefinitions.forEach((processDocumentDefinition) => {
132
- this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
133
- });
134
- });
135
- }
136
- loadProcessDefinitions() {
137
- this.processService
138
- .getProcessDefinitions()
139
- .subscribe((processDefinitions) => {
140
- this.processDefinitions = processDefinitions;
141
- });
142
- }
143
- ngOnInit() {
144
- this.loadProcessDefinitions();
145
- }
146
- openModal(dossier) {
147
- this.documentDefinition = dossier;
148
- this.newDocumentProcessDefinition = null;
149
- this.newDocumentProcessDefinitionInit = true;
150
- this.newDocumentProcessDefinitionStartableByUser = false;
151
- this.loadProcessDocumentDefinitions();
152
- this.modal.show();
153
- }
154
- submit() {
155
- const request = {
156
- canInitializeDocument: this.newDocumentProcessDefinitionInit,
157
- startableByUser: this.newDocumentProcessDefinitionStartableByUser,
158
- documentDefinitionName: this.documentDefinition.id.name,
159
- processDefinitionKey: this.newDocumentProcessDefinition.key,
160
- };
161
- this.documentService.createProcessDocumentDefinition(request).subscribe(() => {
162
- this.toasterService.success('Successfully added new process document definition');
163
- this.reloadProcessDocumentDefinitions.emit();
164
- }, err => {
165
- this.toasterService.error('Failed to add new process document definition');
166
- });
167
- }
168
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementConnectModalComponent, deps: [{ token: i1$1.ProcessService }, { token: i1.DocumentService }, { token: i3$1.ToastrService }], target: i0.ɵɵFactoryTarget.Component }); }
169
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementConnectModalComponent, selector: "valtimo-dossier-management-connect-modal", outputs: { reloadProcessDocumentDefinitions: "reloadProcessDocumentDefinitions" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["dossierConnectModal"], 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 #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">{{ 'dossierManagement.selectProcessDef' | translate }}</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
170
- }
171
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementConnectModalComponent, decorators: [{
172
- type: Component,
173
- args: [{ selector: 'valtimo-dossier-management-connect-modal', 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 #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">{{ 'dossierManagement.selectProcessDef' | translate }}</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"] }]
174
- }], ctorParameters: function () { return [{ type: i1$1.ProcessService }, { type: i1.DocumentService }, { type: i3$1.ToastrService }]; }, propDecorators: { reloadProcessDocumentDefinitions: [{
175
- type: Output
176
- }], modal: [{
177
- type: ViewChild,
178
- args: ['dossierConnectModal']
179
- }] } });
180
-
181
- /*
182
- * Copyright 2015-2023 Ritense BV, the Netherlands.
183
- *
184
- * Licensed under EUPL, Version 1.2 (the "License");
185
- * you may not use this file except in compliance with the License.
186
- * You may obtain a copy of the License at
187
- *
188
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
189
- *
190
- * Unless required by applicable law or agreed to in writing, software
191
- * distributed under the License is distributed on an "AS IS" basis,
192
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
193
- * See the License for the specific language governing permissions and
194
- * limitations under the License.
195
- */
196
-
197
99
  /*
198
100
  * Copyright 2015-2023 Ritense BV, the Netherlands.
199
101
  *
@@ -211,28 +113,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
211
113
  */
212
114
  var TabEnum;
213
115
  (function (TabEnum) {
116
+ TabEnum["DOCUMENT"] = "document";
214
117
  TabEnum["CASE"] = "case";
118
+ TabEnum["PROCESSES"] = "processes";
215
119
  TabEnum["SEARCH"] = "search";
216
120
  TabEnum["LIST"] = "list";
217
121
  TabEnum["TABS"] = "tabs";
218
122
  })(TabEnum || (TabEnum = {}));
219
123
 
220
- /*
221
- * Copyright 2015-2023 Ritense BV, the Netherlands.
222
- *
223
- * Licensed under EUPL, Version 1.2 (the "License");
224
- * you may not use this file except in compliance with the License.
225
- * You may obtain a copy of the License at
226
- *
227
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
228
- *
229
- * Unless required by applicable law or agreed to in writing, software
230
- * distributed under the License is distributed on an "AS IS" basis,
231
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
232
- * See the License for the specific language governing permissions and
233
- * limitations under the License.
234
- */
235
-
236
124
  /*
237
125
  * Copyright 2015-2023 Ritense BV, the Netherlands.
238
126
  *
@@ -265,7 +153,7 @@ class TabService {
265
153
  this.caseTabConfig = caseTabConfig;
266
154
  this.formService = formService;
267
155
  this.translateService = translateService;
268
- this._currentTab$ = new BehaviorSubject(TabEnum.CASE);
156
+ this._currentTab$ = new BehaviorSubject(TabEnum.DOCUMENT);
269
157
  this._configuredContentKeys$ = new BehaviorSubject([]);
270
158
  this.formDefinitions$ = this.formService
271
159
  .getAllFormDefinitions()
@@ -299,7 +187,7 @@ class TabService {
299
187
  formDefinitions.every((tabItem) => tabKeys.includes(tabItem.contentKey)),
300
188
  })));
301
189
  }
302
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabService, deps: [{ token: CASE_TAB_TOKEN, optional: true }, { token: i1$2.FormService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabService, deps: [{ token: CASE_TAB_TOKEN, optional: true }, { token: i1$1.FormService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
303
191
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabService, providedIn: 'root' }); }
304
192
  }
305
193
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabService, decorators: [{
@@ -312,7 +200,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
312
200
  }, {
313
201
  type: Inject,
314
202
  args: [CASE_TAB_TOKEN]
315
- }] }, { type: i1$2.FormService }, { type: i3.TranslateService }]; } });
203
+ }] }, { type: i1$1.FormService }, { type: i3.TranslateService }]; } });
316
204
 
317
205
  class TabManagementService {
318
206
  constructor(configService, http) {
@@ -376,20 +264,20 @@ class TabManagementService {
376
264
  }
377
265
  return tab;
378
266
  }
379
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabManagementService, deps: [{ token: i1$3.ConfigService }, { token: i2$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabManagementService, deps: [{ token: i1$2.ConfigService }, { token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
380
268
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabManagementService }); }
381
269
  }
382
270
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabManagementService, decorators: [{
383
271
  type: Injectable
384
- }], ctorParameters: function () { return [{ type: i1$3.ConfigService }, { type: i2$2.HttpClient }]; } });
272
+ }], ctorParameters: function () { return [{ type: i1$2.ConfigService }, { type: i1$3.HttpClient }]; } });
385
273
 
386
274
  /*
387
275
  * Copyright 2015-2023 Ritense BV, the Netherlands.
388
276
  *
389
277
  * Licensed under EUPL, Version 1.2 (the "License");
390
278
  * you may not use this file except in compliance with the License.
391
- * You may obtain a copy of the License at
392
279
  *
280
+ * You may obtain a copy of the License at
393
281
  * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
394
282
  *
395
283
  * Unless required by applicable law or agreed to in writing, software
@@ -398,6 +286,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
398
286
  * See the License for the specific language governing permissions and
399
287
  * limitations under the License.
400
288
  */
289
+ class DossierExportService {
290
+ constructor(http, configService) {
291
+ this.http = http;
292
+ this.configService = configService;
293
+ this.valtimoEndpointUri = this.configService.config.valtimoApi.endpointUri;
294
+ }
295
+ exportDocumentDefinition(documentDefinitionName, version = 1) {
296
+ return this.http.get(`${this.valtimoEndpointUri}management/v1/case/${documentDefinitionName}/${version}/export`, { observe: 'response', responseType: 'blob', headers: InterceptorSkipHeader });
297
+ }
298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierExportService, deps: [{ token: i1$3.HttpClient }, { token: i1$2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
299
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierExportService, providedIn: 'root' }); }
300
+ }
301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierExportService, decorators: [{
302
+ type: Injectable,
303
+ args: [{
304
+ providedIn: 'root',
305
+ }]
306
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: i1$2.ConfigService }]; } });
401
307
 
402
308
  /*
403
309
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -414,41 +320,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
414
320
  * See the License for the specific language governing permissions and
415
321
  * limitations under the License.
416
322
  */
417
- class DossierManagementRemoveModalComponent {
418
- constructor(documentService, toasterService, router, translateService, menuService) {
323
+ class DossierDetailService {
324
+ get selectedVersionNumber$() {
325
+ return this._selectedVersionNumber$.pipe(filter(version => typeof version === 'number'), distinctUntilChanged());
326
+ }
327
+ get selectedDocumentDefinitionName$() {
328
+ return this._selectedDocumentDefinitionName$.pipe(filter(name => !!name), distinctUntilChanged());
329
+ }
330
+ get selectedDocumentDefinitionIsReadOnly$() {
331
+ return this.documentDefinition$.pipe(map(definition => definition.readOnly), distinctUntilChanged());
332
+ }
333
+ get loadingDocumentDefinition$() {
334
+ return this._loadingDocumentDefinition$.asObservable();
335
+ }
336
+ get documentDefinition$() {
337
+ return this._documentDefinition$.pipe(filter(def => !!def));
338
+ }
339
+ get documentDefinitionModel$() {
340
+ return this._documentDefinitionModel$;
341
+ }
342
+ constructor(documentService, pageTitleService) {
419
343
  this.documentService = documentService;
420
- this.toasterService = toasterService;
421
- this.router = router;
422
- this.translateService = translateService;
423
- this.menuService = menuService;
424
- this.documentDefinition = null;
425
- this.errors = [];
344
+ this.pageTitleService = pageTitleService;
345
+ this._loadingDocumentDefinition$ = new BehaviorSubject(true);
346
+ this._selectedVersionNumber$ = new BehaviorSubject(null);
347
+ this._selectedDocumentDefinitionName$ = new BehaviorSubject('');
348
+ this._documentDefinition$ = new BehaviorSubject(null);
349
+ this._documentDefinitionModel$ = this.documentDefinition$.pipe(map(definition => ({
350
+ value: JSON.stringify(definition, null, 2),
351
+ language: 'json',
352
+ })));
353
+ this._subscriptions = new Subscription();
354
+ this.openDocumentDefinitionSubscription();
426
355
  }
427
- openModal(documentDefinition) {
428
- this.documentDefinition = documentDefinition;
429
- this.modal.show();
356
+ ngOnDestroy() {
357
+ this._subscriptions.unsubscribe();
430
358
  }
431
- removeDocumentDefinition() {
432
- this.documentService
433
- .removeDocumentDefinitionForManagement(this.documentDefinition.id.name)
434
- .subscribe(() => {
435
- this.menuService.reload();
436
- this.router.navigate(['/dossier-management']);
437
- this.toasterService.success(this.translateService.instant('remove-document-definition-success'));
438
- }, (result) => {
439
- this.errors = result.errors;
440
- });
359
+ setSelectedVersionNumber(versionNumber) {
360
+ this._selectedVersionNumber$.next(versionNumber);
361
+ }
362
+ setSelectedDocumentDefinitionName(name) {
363
+ this._selectedDocumentDefinitionName$.next(name);
441
364
  }
442
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementRemoveModalComponent, deps: [{ token: i1.DocumentService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: i3.TranslateService }, { token: i6.MenuService }], target: i0.ɵɵFactoryTarget.Component }); }
443
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementRemoveModalComponent, selector: "valtimo-dossier-management-remove-modal", viewQueries: [{ propertyName: "modal", first: true, predicate: ["documentDefinitionRemoveModal"], 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 #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
365
+ setLoadingDocumentDefinition(loading) {
366
+ this._loadingDocumentDefinition$.next(loading);
367
+ }
368
+ openDocumentDefinitionSubscription() {
369
+ this._subscriptions.add(combineLatest([this.selectedVersionNumber$, this.selectedDocumentDefinitionName$])
370
+ .pipe(tap$1(() => {
371
+ this.pageTitleService.setCustomPageTitleSet(false);
372
+ this.setLoadingDocumentDefinition(true);
373
+ }), switchMap(([selectedVersion, selectedDocumentDefinitionName]) => this.documentService.getDocumentDefinitionByVersion(selectedDocumentDefinitionName, selectedVersion)), tap$1(res => {
374
+ this._documentDefinition$.next(res);
375
+ this.pageTitleService.setCustomPageTitle(res?.schema?.title || '-');
376
+ this.setLoadingDocumentDefinition(false);
377
+ }))
378
+ .subscribe());
379
+ }
380
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierDetailService, deps: [{ token: i1.DocumentService }, { token: i7.PageTitleService }], target: i0.ɵɵFactoryTarget.Injectable }); }
381
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierDetailService }); }
444
382
  }
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementRemoveModalComponent, decorators: [{
446
- type: Component,
447
- args: [{ selector: 'valtimo-dossier-management-remove-modal', 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 #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"] }]
448
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: i3.TranslateService }, { type: i6.MenuService }]; }, propDecorators: { modal: [{
449
- type: ViewChild,
450
- args: ['documentDefinitionRemoveModal']
451
- }] } });
383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierDetailService, decorators: [{
384
+ type: Injectable
385
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i7.PageTitleService }]; } });
452
386
 
453
387
  /*
454
388
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -465,63 +399,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
465
399
  * See the License for the specific language governing permissions and
466
400
  * limitations under the License.
467
401
  */
468
- class DossierManagementLinkProcessComponent {
469
- constructor(configService, processService, route, documentService) {
470
- this.configService = configService;
471
- this.processService = processService;
472
- this.route = route;
473
- this.documentService = documentService;
474
- this.documentDefinitionName = null;
475
- this.selectionId$ = new BehaviorSubject('');
476
- this.processItems$ = this.processService
477
- .getProcessDefinitions()
478
- .pipe(map(definitions => definitions.filter(definition => !!definition?.key) || []), map(processes => processes.map(process => ({ text: process?.name || '-', id: process.key }))));
479
- this.disabled$ = new BehaviorSubject(false);
480
- this.setDocumentenApiUploaderProvider(configService.config);
481
- this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
482
- }
483
- ngOnInit() {
484
- if (this.documentenApiUploadProvider) {
485
- this.getDefaultSelection();
486
- }
487
- }
488
- selectProcess(processDefinitionKey) {
489
- this.disabled$.next(true);
490
- const currentSelectionId = this.selectionId$.getValue();
491
- if (processDefinitionKey && processDefinitionKey !== currentSelectionId) {
492
- this.disabled$.next(true);
493
- this.documentService
494
- .updateLinkedUploadProcess(this.documentDefinitionName, processDefinitionKey)
495
- .subscribe(processLink => {
496
- this.selectionId$.next(processLink.processDefinitionKey);
497
- this.disabled$.next(false);
498
- });
499
- }
500
- else if (!processDefinitionKey) {
501
- this.documentService.deleteLinkedUploadProcess(this.documentDefinitionName).subscribe(() => {
502
- this.disabled$.next(false);
503
- });
504
- }
505
- }
506
- setDocumentenApiUploaderProvider(config) {
507
- this.documentenApiUploadProvider = config.uploadProvider === UploadProvider.DOCUMENTEN_API;
508
- }
509
- getDefaultSelection() {
510
- this.documentService
511
- .getLinkedUploadProcess(this.documentDefinitionName)
512
- .subscribe(linkedUploadProcess => {
513
- if (linkedUploadProcess) {
514
- this.selectionId$.next(linkedUploadProcess.processDefinitionKey);
515
- }
516
- });
517
- }
518
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementLinkProcessComponent, deps: [{ token: i1$3.ConfigService }, { token: i1$1.ProcessService }, { token: i2.ActivatedRoute }, { token: i1.DocumentService }], target: i0.ɵɵFactoryTarget.Component }); }
519
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementLinkProcessComponent, selector: "valtimo-dossier-management-link-process", 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 *ngIf=\"documentenApiUploadProvider\">\n <h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.linkProcess.title' | translate }}</h2>\n <v-paragraph [margin]=\"true\">{{\n 'dossierManagement.linkProcess.description' | translate\n }}</v-paragraph>\n <ng-container\n *ngIf=\"{\n processItems: processItems$ | async,\n disabled: disabled$ | async,\n defaultSelectionId: selectionId$ | async\n } as obs\"\n >\n <v-select\n *ngIf=\"obs.processItems\"\n (selectedChange)=\"selectProcess($event)\"\n [defaultSelectionId]=\"obs.defaultSelectionId\"\n [disabled]=\"obs.disabled\"\n [items]=\"obs.processItems\"\n [loading]=\"!obs.processItems\"\n [margin]=\"true\"\n [required]=\"false\"\n ></v-select>\n </ng-container>\n</ng-container>\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 */\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: i6.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme"], outputs: ["selectedChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
520
- }
521
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementLinkProcessComponent, decorators: [{
522
- type: Component,
523
- args: [{ selector: 'valtimo-dossier-management-link-process', 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 *ngIf=\"documentenApiUploadProvider\">\n <h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.linkProcess.title' | translate }}</h2>\n <v-paragraph [margin]=\"true\">{{\n 'dossierManagement.linkProcess.description' | translate\n }}</v-paragraph>\n <ng-container\n *ngIf=\"{\n processItems: processItems$ | async,\n disabled: disabled$ | async,\n defaultSelectionId: selectionId$ | async\n } as obs\"\n >\n <v-select\n *ngIf=\"obs.processItems\"\n (selectedChange)=\"selectProcess($event)\"\n [defaultSelectionId]=\"obs.defaultSelectionId\"\n [disabled]=\"obs.disabled\"\n [items]=\"obs.processItems\"\n [loading]=\"!obs.processItems\"\n [margin]=\"true\"\n [required]=\"false\"\n ></v-select>\n </ng-container>\n</ng-container>\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 */\n"] }]
524
- }], ctorParameters: function () { return [{ type: i1$3.ConfigService }, { type: i1$1.ProcessService }, { type: i2.ActivatedRoute }, { type: i1.DocumentService }]; } });
525
402
 
526
403
  /*
527
404
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -538,78 +415,233 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
538
415
  * See the License for the specific language governing permissions and
539
416
  * limitations under the License.
540
417
  */
541
- class DossierManagementDetailComponent {
542
- constructor(documentService, route, alertService) {
418
+ class DossierManagementConnectModalComponent {
419
+ constructor(documentService, dossierDetailService, notificationService, processService, translateService) {
543
420
  this.documentService = documentService;
544
- this.route = route;
545
- this.alertService = alertService;
546
- this.documentDefinitionName = null;
421
+ this.dossierDetailService = dossierDetailService;
422
+ this.notificationService = notificationService;
423
+ this.processService = processService;
424
+ this.translateService = translateService;
425
+ this.reloadProcessDocumentDefinitions = new EventEmitter();
547
426
  this.documentDefinition = null;
548
- this.processDocumentDefinitions = [];
549
- this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
550
- }
551
- ngOnInit() {
552
- this.loadDocumentDefinition();
553
- this.loadProcessDocumentDefinitions();
427
+ this.newDocumentProcessDefinition = null;
428
+ this.newDocumentProcessDefinitionInit = true;
429
+ this.newDocumentProcessDefinitionStartableByUser = false;
430
+ this.processDocumentDefinitionExists = {};
554
431
  }
555
432
  loadProcessDocumentDefinitions() {
433
+ if (!this.documentDefinition) {
434
+ return;
435
+ }
436
+ const { name, version } = this.documentDefinition.id;
437
+ this.processDocumentDefinitionExists = {};
556
438
  this.documentService
557
- .findProcessDocumentDefinitions(this.documentDefinitionName)
439
+ .findProcessDocumentDefinitionsByVersion(name, version)
558
440
  .subscribe((processDocumentDefinitions) => {
559
- this.processDocumentDefinitions = processDocumentDefinitions;
441
+ processDocumentDefinitions.forEach((processDocumentDefinition) => {
442
+ this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
443
+ });
560
444
  });
561
445
  }
562
- loadDocumentDefinition() {
563
- this.documentService
564
- .getDocumentDefinitionForManagement(this.documentDefinitionName)
565
- .subscribe((documentDefinition) => {
566
- this.documentDefinition = documentDefinition;
446
+ loadProcessDefinitions() {
447
+ this.processService
448
+ .getProcessDefinitions()
449
+ .subscribe((processDefinitions) => {
450
+ this.processDefinitions = processDefinitions;
567
451
  });
568
452
  }
569
- openDossierConnectModal() {
570
- this.dossierConnectModal.openModal(this.documentDefinition);
571
- }
572
- openDossierRemoveModal() {
573
- this.dossierRemoveModal.openModal(this.documentDefinition);
453
+ ngOnInit() {
454
+ this.loadProcessDefinitions();
574
455
  }
575
- deleteProcessDocumentDefinition(processDocumentDefinition) {
576
- this.documentService
577
- .deleteProcessDocumentDefinition({
578
- documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
579
- processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
580
- canInitializeDocument: processDocumentDefinition.canInitializeDocument,
581
- startableByUser: processDocumentDefinition.startableByUser,
582
- })
583
- .subscribe(() => {
584
- this.alertService.success('Successfully deleted process document definition');
585
- this.loadProcessDocumentDefinitions();
586
- }, () => {
587
- this.alertService.error('Failed to delete process document definition');
588
- });
456
+ openModal(dossier) {
457
+ this.documentDefinition = dossier;
458
+ this.newDocumentProcessDefinition = null;
459
+ this.newDocumentProcessDefinitionInit = true;
460
+ this.newDocumentProcessDefinitionStartableByUser = false;
461
+ this.loadProcessDocumentDefinitions();
462
+ this._modal.show();
589
463
  }
590
- downloadDefinition() {
591
- const definition = this.documentDefinition;
592
- const dataString = 'data:text/json;charset=utf-8,' +
593
- encodeURIComponent(JSON.stringify(definition.schema, null, 2));
594
- const downloadAnchorElement = document.getElementById('downloadAnchorElement');
595
- downloadAnchorElement.setAttribute('href', dataString);
596
- downloadAnchorElement.setAttribute('download', `${definition.id.name}-v${definition.id.version}.json`);
597
- downloadAnchorElement.click();
598
- }
599
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i6.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
600
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementDetailComponent, selector: "valtimo-dossier-management-detail", viewQueries: [{ propertyName: "dossierConnectModal", first: true, predicate: ["dossierConnectModal"], descendants: true }, { propertyName: "dossierRemoveModal", first: true, predicate: ["dossierRemoveModal"], 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 id=\"management-datail-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"buttons\"></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5\">\n <h2>{{ 'document definition' | translate }}</h2>\n </div>\n <div class=\"col-5 offset-2\">\n <h2>{{ 'dossierManagement.connectedProcesses' | translate }}</h2>\n </div>\n </div>\n <div class=\"row bg-white mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 dossier-schema\" disabled rows=\"25\"\n >{{ documentDefinition | json }}\n </textarea\n >\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"input-group mb-5\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n class=\"btn btn-danger\"\n data-placement=\"left\"\n data-toggle=\"tooltip\"\n title=\"Delete this connected process\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n </button>\n <input\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n class=\"form-control\"\n disabled\n type=\"text\"\n />\n </div>\n <div class=\"row mb-2 mt-2\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n class=\"custom-control-input\"\n disabled\n type=\"checkbox\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"processDocumentDefinition.startableByUser\"\n class=\"custom-control-input\"\n disabled\n type=\"checkbox\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div class=\"text-right mt-5 mb-5\">\n <button (click)=\"openDossierConnectModal()\" class=\"btn btn-primary\">\n <i class=\"icon mdi mdi-plus mr-1\"></i\n >{{ 'dossierManagement.connectProcess' | translate }}\n </button>\n </div>\n <valtimo-dossier-management-link-process></valtimo-dossier-management-link-process\n ><valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n <valtimo-dossier-management-assignee></valtimo-dossier-management-assignee>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #buttons>\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button (click)=\"downloadDefinition()\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'Download document definition' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n <button\n (click)=\"openDossierRemoveModal()\"\n *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n</ng-template>\n\n<valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n></valtimo-dossier-management-connect-modal>\n<valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n></valtimo-dossier-management-remove-modal>\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 */.row{margin:0}.dossier-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i1$3.ExtensionComponent, selector: "valtimo-extension", inputs: ["module", "page", "section"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: DossierManagementConnectModalComponent, selector: "valtimo-dossier-management-connect-modal", outputs: ["reloadProcessDocumentDefinitions"] }, { kind: "component", type: DossierManagementRemoveModalComponent, selector: "valtimo-dossier-management-remove-modal" }, { kind: "component", type: DossierManagementLinkProcessComponent, selector: "valtimo-dossier-management-link-process" }, { kind: "component", type: DossierManagementAssigneeComponent, selector: "valtimo-dossier-management-assignee" }, { kind: "pipe", type: i4.JsonPipe, name: "json" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
601
- }
602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailComponent, decorators: [{
464
+ submit() {
465
+ if (!this.documentDefinition || !this.newDocumentProcessDefinition) {
466
+ return;
467
+ }
468
+ const request = {
469
+ canInitializeDocument: this.newDocumentProcessDefinitionInit,
470
+ documentDefinitionName: this.documentDefinition.id.name,
471
+ documentDefinitionVersion: this.documentDefinition.id.version,
472
+ processDefinitionKey: this.newDocumentProcessDefinition.key,
473
+ startableByUser: this.newDocumentProcessDefinitionStartableByUser,
474
+ };
475
+ this.dossierDetailService.selectedVersionNumber$
476
+ .pipe(switchMap((documentDefinitionVersion) => this.documentService.createProcessDocumentDefinition({
477
+ ...request,
478
+ documentDefinitionVersion,
479
+ })), take(1))
480
+ .subscribe({
481
+ next: () => {
482
+ this.notificationService.showNotification({
483
+ type: 'success',
484
+ title: this.translateService.instant('dossierManagement.processLinkNotification.linkSuccess'),
485
+ duration: 5000,
486
+ });
487
+ this.reloadProcessDocumentDefinitions.emit();
488
+ },
489
+ error: () => {
490
+ this.notificationService.showNotification({
491
+ type: 'error',
492
+ title: this.translateService.instant('dossierManagement.processLinkNotification.linkFailure'),
493
+ duration: 5000,
494
+ });
495
+ },
496
+ });
497
+ }
498
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementConnectModalComponent, deps: [{ token: i1.DocumentService }, { token: DossierDetailService }, { token: i4.NotificationService }, { token: i4$1.ProcessService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
499
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementConnectModalComponent, selector: "valtimo-dossier-management-connect-modal", outputs: { reloadProcessDocumentDefinitions: "reloadProcessDocumentDefinitions" }, providers: [NotificationService], viewQueries: [{ propertyName: "_modal", first: true, predicate: ["dossierConnectModal"], 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 #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">{{ 'dossierManagement.selectProcessDef' | translate }}</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "directive", type: i9.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
500
+ }
501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementConnectModalComponent, decorators: [{
603
502
  type: Component,
604
- args: [{ selector: 'valtimo-dossier-management-detail', 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 id=\"management-datail-content\" class=\"pt-0\">\n <ng-container *ngTemplateOutlet=\"buttons\"></ng-container>\n <div class=\"clearfix\"></div>\n <ng-container *ngTemplateOutlet=\"widget\"></ng-container>\n</div>\n\n<ng-template #widget>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5\">\n <h2>{{ 'document definition' | translate }}</h2>\n </div>\n <div class=\"col-5 offset-2\">\n <h2>{{ 'dossierManagement.connectedProcesses' | translate }}</h2>\n </div>\n </div>\n <div class=\"row bg-white mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 dossier-schema\" disabled rows=\"25\"\n >{{ documentDefinition | json }}\n </textarea\n >\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"input-group mb-5\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n class=\"btn btn-danger\"\n data-placement=\"left\"\n data-toggle=\"tooltip\"\n title=\"Delete this connected process\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n </button>\n <input\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n class=\"form-control\"\n disabled\n type=\"text\"\n />\n </div>\n <div class=\"row mb-2 mt-2\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n class=\"custom-control-input\"\n disabled\n type=\"checkbox\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n placement=\"bottom\"\n >\n <input\n [checked]=\"processDocumentDefinition.startableByUser\"\n class=\"custom-control-input\"\n disabled\n type=\"checkbox\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div class=\"text-right mt-5 mb-5\">\n <button (click)=\"openDossierConnectModal()\" class=\"btn btn-primary\">\n <i class=\"icon mdi mdi-plus mr-1\"></i\n >{{ 'dossierManagement.connectProcess' | translate }}\n </button>\n </div>\n <valtimo-dossier-management-link-process></valtimo-dossier-management-link-process\n ><valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n <valtimo-dossier-management-assignee></valtimo-dossier-management-assignee>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #buttons>\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <button (click)=\"downloadDefinition()\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'Download document definition' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n <button\n (click)=\"openDossierRemoveModal()\"\n *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n</ng-template>\n\n<valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n></valtimo-dossier-management-connect-modal>\n<valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n></valtimo-dossier-management-remove-modal>\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 */.row{margin:0}.dossier-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{border:none}\n"] }]
605
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i6.AlertService }]; }, propDecorators: { dossierConnectModal: [{
503
+ args: [{ selector: 'valtimo-dossier-management-connect-modal', providers: [NotificationService], 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 #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">{{ 'dossierManagement.selectProcessDef' | translate }}</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"] }]
504
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: DossierDetailService }, { type: i4.NotificationService }, { type: i4$1.ProcessService }, { type: i3.TranslateService }]; }, propDecorators: { _modal: [{
606
505
  type: ViewChild,
607
506
  args: ['dossierConnectModal']
608
- }], dossierRemoveModal: [{
609
- type: ViewChild,
610
- args: ['dossierRemoveModal']
507
+ }], reloadProcessDocumentDefinitions: [{
508
+ type: Output
611
509
  }] } });
612
510
 
511
+ /*
512
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
513
+ *
514
+ * Licensed under EUPL, Version 1.2 (the "License");
515
+ * you may not use this file except in compliance with the License.
516
+ * You may obtain a copy of the License at
517
+ *
518
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
519
+ *
520
+ * Unless required by applicable law or agreed to in writing, software
521
+ * distributed under the License is distributed on an "AS IS" basis,
522
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
523
+ * See the License for the specific language governing permissions and
524
+ * limitations under the License.
525
+ */
526
+
527
+ /*
528
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
529
+ *
530
+ * Licensed under EUPL, Version 1.2 (the "License");
531
+ * you may not use this file except in compliance with the License.
532
+ * You may obtain a copy of the License at
533
+ *
534
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
535
+ *
536
+ * Unless required by applicable law or agreed to in writing, software
537
+ * distributed under the License is distributed on an "AS IS" basis,
538
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
539
+ * See the License for the specific language governing permissions and
540
+ * limitations under the License.
541
+ */
542
+
543
+ /*
544
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
545
+ *
546
+ * Licensed under EUPL, Version 1.2 (the "License");
547
+ * you may not use this file except in compliance with the License.
548
+ * You may obtain a copy of the License at
549
+ *
550
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
551
+ *
552
+ * Unless required by applicable law or agreed to in writing, software
553
+ * distributed under the License is distributed on an "AS IS" basis,
554
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
555
+ * See the License for the specific language governing permissions and
556
+ * limitations under the License.
557
+ */
558
+ class DossierManagementLinkProcessComponent {
559
+ constructor(configService, processService, route, documentService) {
560
+ this.configService = configService;
561
+ this.processService = processService;
562
+ this.route = route;
563
+ this.documentService = documentService;
564
+ this.documentDefinitionName = null;
565
+ this.selectionId$ = new BehaviorSubject('');
566
+ this.processItems$ = this.processService
567
+ .getProcessDefinitions()
568
+ .pipe(map(definitions => definitions.filter(definition => !!definition?.key) || []), map(processes => processes.map(process => ({ text: process?.name || '-', id: process.key }))));
569
+ this.disabled$ = new BehaviorSubject(false);
570
+ this.setDocumentenApiUploaderProvider(configService.config);
571
+ this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
572
+ }
573
+ ngOnInit() {
574
+ if (this.documentenApiUploadProvider) {
575
+ this.getDefaultSelection();
576
+ }
577
+ }
578
+ selectProcess(processDefinitionKey) {
579
+ this.disabled$.next(true);
580
+ const currentSelectionId = this.selectionId$.getValue();
581
+ if (processDefinitionKey && processDefinitionKey !== currentSelectionId) {
582
+ this.disabled$.next(true);
583
+ this.documentService
584
+ .updateLinkedUploadProcess(this.documentDefinitionName, processDefinitionKey)
585
+ .subscribe(processLink => {
586
+ this.selectionId$.next(processLink.processDefinitionKey);
587
+ this.disabled$.next(false);
588
+ });
589
+ }
590
+ else if (!processDefinitionKey) {
591
+ this.documentService.deleteLinkedUploadProcess(this.documentDefinitionName).subscribe(() => {
592
+ this.disabled$.next(false);
593
+ });
594
+ }
595
+ }
596
+ setDocumentenApiUploaderProvider(config) {
597
+ this.documentenApiUploadProvider = config.uploadProvider === UploadProvider.DOCUMENTEN_API;
598
+ }
599
+ getDefaultSelection() {
600
+ this.documentService
601
+ .getLinkedUploadProcess(this.documentDefinitionName)
602
+ .subscribe(linkedUploadProcess => {
603
+ if (linkedUploadProcess) {
604
+ this.selectionId$.next(linkedUploadProcess.processDefinitionKey);
605
+ }
606
+ });
607
+ }
608
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementLinkProcessComponent, deps: [{ token: i1$2.ConfigService }, { token: i4$1.ProcessService }, { token: i2.ActivatedRoute }, { token: i1.DocumentService }], target: i0.ɵɵFactoryTarget.Component }); }
609
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementLinkProcessComponent, selector: "valtimo-dossier-management-link-process", 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 *ngIf=\"documentenApiUploadProvider\">\n <h2 class=\"mb-4\">{{ 'dossierManagement.linkProcess.title' | translate }}</h2>\n <v-paragraph [margin]=\"true\">{{\n 'dossierManagement.linkProcess.description' | translate\n }}</v-paragraph>\n <ng-container\n *ngIf=\"{\n processItems: processItems$ | async,\n disabled: disabled$ | async,\n defaultSelectionId: selectionId$ | async\n } as obs\"\n >\n <v-select\n *ngIf=\"obs.processItems\"\n (selectedChange)=\"selectProcess($event)\"\n [defaultSelectionId]=\"obs.defaultSelectionId\"\n [disabled]=\"obs.disabled\"\n [items]=\"obs.processItems\"\n [loading]=\"!obs.processItems\"\n [margin]=\"true\"\n [required]=\"false\"\n ></v-select>\n </ng-container>\n</ng-container>\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: i7.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme"], outputs: ["selectedChange"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
610
+ }
611
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementLinkProcessComponent, decorators: [{
612
+ type: Component,
613
+ args: [{ selector: 'valtimo-dossier-management-link-process', 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 *ngIf=\"documentenApiUploadProvider\">\n <h2 class=\"mb-4\">{{ 'dossierManagement.linkProcess.title' | translate }}</h2>\n <v-paragraph [margin]=\"true\">{{\n 'dossierManagement.linkProcess.description' | translate\n }}</v-paragraph>\n <ng-container\n *ngIf=\"{\n processItems: processItems$ | async,\n disabled: disabled$ | async,\n defaultSelectionId: selectionId$ | async\n } as obs\"\n >\n <v-select\n *ngIf=\"obs.processItems\"\n (selectedChange)=\"selectProcess($event)\"\n [defaultSelectionId]=\"obs.defaultSelectionId\"\n [disabled]=\"obs.disabled\"\n [items]=\"obs.processItems\"\n [loading]=\"!obs.processItems\"\n [margin]=\"true\"\n [required]=\"false\"\n ></v-select>\n </ng-container>\n</ng-container>\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 */\n"] }]
614
+ }], ctorParameters: function () { return [{ type: i1$2.ConfigService }, { type: i4$1.ProcessService }, { type: i2.ActivatedRoute }, { type: i1.DocumentService }]; } });
615
+
616
+ /*
617
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
618
+ *
619
+ * Licensed under EUPL, Version 1.2 (the "License");
620
+ * you may not use this file except in compliance with the License.
621
+ * You may obtain a copy of the License at
622
+ *
623
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
624
+ *
625
+ * Unless required by applicable law or agreed to in writing, software
626
+ * distributed under the License is distributed on an "AS IS" basis,
627
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
628
+ * See the License for the specific language governing permissions and
629
+ * limitations under the License.
630
+ */
631
+ class DossierManagementDetailComponent {
632
+ constructor(documentService, route) {
633
+ this.documentService = documentService;
634
+ this.route = route;
635
+ this.documentDefinition$ = this.route.paramMap.pipe(switchMap((params) => this.documentService.getDocumentDefinitionForManagement(params.get('name') ?? '')));
636
+ }
637
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
638
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementDetailComponent, selector: "valtimo-dossier-management-detail", 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 class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"documentDefinition$ | async\">\n <div class=\"row pt-4 mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-10 offset-1\">\n <valtimo-dossier-management-link-process></valtimo-dossier-management-link-process>\n\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n <valtimo-dossier-management-assignee></valtimo-dossier-management-assignee>\n </div>\n </div>\n </valtimo-widget>\n</div>\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 */.row{margin:0}.dossier-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{background:transparent;border:none}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i1$2.ExtensionComponent, selector: "valtimo-extension", inputs: ["module", "page", "section"] }, { kind: "component", type: DossierManagementLinkProcessComponent, selector: "valtimo-dossier-management-link-process" }, { kind: "component", type: DossierManagementAssigneeComponent, selector: "valtimo-dossier-management-assignee" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }] }); }
639
+ }
640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailComponent, decorators: [{
641
+ type: Component,
642
+ args: [{ selector: 'valtimo-dossier-management-detail', 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 class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"documentDefinition$ | async\">\n <div class=\"row pt-4 mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-10 offset-1\">\n <valtimo-dossier-management-link-process></valtimo-dossier-management-link-process>\n\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n <valtimo-dossier-management-assignee></valtimo-dossier-management-assignee>\n </div>\n </div>\n </valtimo-widget>\n</div>\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 */.row{margin:0}.dossier-schema{resize:none}valtimo-widget::ng-deep .card-border.card-full-default{background:transparent;border:none}\n"] }]
643
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }]; } });
644
+
613
645
  /*
614
646
  * Copyright 2015-2023 Ritense BV, the Netherlands.
615
647
  *
@@ -626,49 +658,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
626
658
  * limitations under the License.
627
659
  */
628
660
  class DossierManagementSearchFieldsComponent {
629
- constructor(documentService, route, translateService, sanitizer) {
661
+ constructor(documentService, route, translateService, sanitizer, iconService) {
630
662
  this.documentService = documentService;
631
663
  this.route = route;
632
664
  this.translateService = translateService;
633
665
  this.sanitizer = sanitizer;
666
+ this.iconService = iconService;
634
667
  this.searchField = new EventEmitter();
635
668
  this.downloadName$ = new BehaviorSubject('');
636
669
  this.downloadUrl$ = new BehaviorSubject(undefined);
637
670
  this.disableInput$ = new BehaviorSubject(false);
638
- this.selectedSearchField$ = new BehaviorSubject(null);
671
+ this.selectedSearchField$ = new BehaviorSubject(undefined);
639
672
  this.formData$ = new BehaviorSubject(null);
640
673
  this.valid$ = new BehaviorSubject(false);
641
- this.subscriptions = new Subscription();
642
- this.COLUMNS = [
674
+ this._subscriptions = new Subscription();
675
+ this.actionItems = [
643
676
  {
644
- viewType: 'string',
677
+ callback: this.deleteSelectedSearchField.bind(this),
678
+ label: 'interface.delete',
679
+ type: 'danger',
680
+ },
681
+ ];
682
+ this.fields = [
683
+ {
684
+ viewType: ViewType.TEXT,
645
685
  sortable: false,
646
- propertyName: 'title',
647
- translationKey: 'title',
686
+ key: 'title',
687
+ label: 'searchFieldsOverview.title',
648
688
  },
649
689
  {
650
- viewType: 'string',
690
+ viewType: ViewType.TEXT,
651
691
  sortable: false,
652
- propertyName: 'key',
653
- translationKey: 'key',
692
+ key: 'key',
693
+ label: 'searchFieldsOverview.key',
654
694
  },
655
695
  {
656
- viewType: 'string',
696
+ viewType: ViewType.TEXT,
657
697
  sortable: false,
658
- propertyName: 'path',
659
- translationKey: 'path',
698
+ key: 'path',
699
+ label: 'searchFieldsOverview.path',
660
700
  },
661
701
  {
662
- viewType: 'string',
702
+ viewType: ViewType.TEXT,
663
703
  sortable: false,
664
- propertyName: 'dataType',
665
- translationKey: 'dataType',
704
+ key: 'dataType',
705
+ label: 'searchFieldsOverview.dataType',
666
706
  },
667
707
  {
668
- viewType: 'string',
708
+ viewType: ViewType.TEXT,
669
709
  sortable: false,
670
- propertyName: 'fieldType',
671
- translationKey: 'fieldType',
710
+ key: 'fieldType',
711
+ label: 'searchFieldsOverview.fieldType',
672
712
  },
673
713
  ];
674
714
  this.dropdownColumns$ = new BehaviorSubject([
@@ -731,14 +771,7 @@ class DossierManagementSearchFieldsComponent {
731
771
  id: matchType,
732
772
  text: this.translateService.instant(`searchFieldsOverview.${matchType}`),
733
773
  }))));
734
- this.fields$ = this.translateService.stream('key').pipe(map(() => this.COLUMNS.map(column => ({
735
- key: column.propertyName,
736
- label: this.translateService.instant(`searchFieldsOverview.${column.translationKey}`),
737
- sortable: column.sortable,
738
- ...(column.viewType && { viewType: column.viewType }),
739
- ...(column.enum && { enum: column.enum }),
740
- }))));
741
- this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName));
774
+ this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName), tap$1((documentDefinitionName) => (this._documentDefinitionName = documentDefinitionName)));
742
775
  this.loadingSearchFields = true;
743
776
  this.showSearchFieldsForm = false;
744
777
  this.refreshSearchFields$ = new BehaviorSubject(null);
@@ -805,7 +838,7 @@ class DossierManagementSearchFieldsComponent {
805
838
  this.formData$,
806
839
  ]).pipe(map(([dataTypeIsText, fieldTypeIsDropdown, formData]) => dataTypeIsText &&
807
840
  fieldTypeIsDropdown &&
808
- formData?.dropdownDataProvider &&
841
+ !!formData?.dropdownDataProvider &&
809
842
  !this.dropdownDataProviderSupportsUpdates(formData?.dropdownDataProvider)));
810
843
  this.showInputDropdownTable$ = combineLatest([
811
844
  this.dataTypeIsText$,
@@ -813,8 +846,9 @@ class DossierManagementSearchFieldsComponent {
813
846
  this.formData$,
814
847
  ]).pipe(map(([dataTypeIsText, fieldTypeIsDropdown, formData]) => dataTypeIsText &&
815
848
  fieldTypeIsDropdown &&
816
- formData?.dropdownDataProvider &&
849
+ !!formData?.dropdownDataProvider &&
817
850
  this.dropdownDataProviderSupportsUpdates(formData?.dropdownDataProvider)));
851
+ this.iconService.registerAll([ArrowDown16, ArrowUp16]);
818
852
  }
819
853
  ngOnInit() {
820
854
  this.openSelectedSearchFieldSubscription();
@@ -823,7 +857,7 @@ class DossierManagementSearchFieldsComponent {
823
857
  this.openModalShowingSubscription();
824
858
  }
825
859
  ngOnDestroy() {
826
- this.subscriptions.unsubscribe();
860
+ this._subscriptions.unsubscribe();
827
861
  }
828
862
  searchFieldClicked(searchField, searchFieldActionTypeIsAdd) {
829
863
  this.disableInput$.pipe(take(1)).subscribe(inputDisabled => {
@@ -846,10 +880,11 @@ class DossierManagementSearchFieldsComponent {
846
880
  dropdownDatalistChange(data) {
847
881
  this.modifiedDropdownValues$.next(data);
848
882
  }
849
- moveRow(searchFieldRowIndex, moveUp, clickEvent, documentDefinitionName) {
883
+ onMoveRowClick(moveEvent, documentDefinitionName) {
884
+ const { index, direction } = moveEvent;
885
+ const moveUp = direction === MoveRowDirection.UP;
850
886
  const searchFields = [...this.cachedSearchFields];
851
- const searchFieldRow = searchFields[searchFieldRowIndex];
852
- clickEvent.stopPropagation();
887
+ const searchFieldRow = searchFields[index];
853
888
  const searchFieldIndex = searchFields.findIndex(field => field.key === searchFieldRow.key);
854
889
  const foundSearchField = { ...searchFields[searchFieldIndex] };
855
890
  const filteredSearchFields = searchFields.filter(field => field.key !== searchFieldRow.key);
@@ -867,45 +902,51 @@ class DossierManagementSearchFieldsComponent {
867
902
  this.updateSearchFields(documentDefinitionName, filteredSearchFields);
868
903
  }
869
904
  }
870
- deleteSelectedSearchField(documentDefinitionName, selectedSearchField) {
905
+ deleteSelectedSearchField(selectedSearchField) {
871
906
  this.disableInput();
872
907
  if (this.dropdownDataProviderSupportsUpdates(selectedSearchField?.dropdownDataProvider)) {
873
908
  this.documentService
874
- .deleteDropdownData(selectedSearchField.dropdownDataProvider, documentDefinitionName, selectedSearchField.key)
909
+ .deleteDropdownData(selectedSearchField?.dropdownDataProvider ?? '', this._documentDefinitionName, selectedSearchField.key)
875
910
  .subscribe();
876
911
  }
877
912
  this.documentService
878
- .deleteDocumentSearch(documentDefinitionName, selectedSearchField.key)
879
- .subscribe(() => {
880
- this.enableInput();
881
- this.hideModal();
882
- this.refreshSearchFields();
883
- }, () => {
884
- this.enableInput();
913
+ .deleteDocumentSearch(this._documentDefinitionName, selectedSearchField.key)
914
+ .subscribe({
915
+ next: () => {
916
+ this.enableInput();
917
+ this.hideModal();
918
+ this.refreshSearchFields();
919
+ },
920
+ error: () => {
921
+ this.enableInput();
922
+ },
885
923
  });
886
924
  }
887
925
  saveSearchField(documentDefinitionName) {
888
926
  this.disableInput();
889
927
  this.formData$.pipe(take(1)).subscribe(formData => {
928
+ if (!formData) {
929
+ return;
930
+ }
890
931
  const mappedFormData = {
891
932
  ...formData,
892
- matchType: !this.isFieldTypeDropdown(formData.fieldType) && formData.dataType === 'text'
933
+ matchType: !this.isFieldTypeDropdown(formData?.fieldType) && formData?.dataType === 'text'
893
934
  ? formData.matchType
894
935
  : 'exact',
895
936
  fieldType: formData.dataType !== 'boolean' ? formData.fieldType : 'single',
896
937
  };
897
938
  const prevFormData = this.selectedSearchField$.value;
898
939
  if (this.dropdownDataProviderSupportsUpdates(prevFormData?.dropdownDataProvider) &&
899
- prevFormData.dropdownDataProvider !== mappedFormData?.dropdownDataProvider) {
940
+ prevFormData?.dropdownDataProvider !== mappedFormData?.dropdownDataProvider) {
900
941
  this.documentService
901
- .deleteDropdownData(prevFormData.dropdownDataProvider, documentDefinitionName, prevFormData.key)
942
+ .deleteDropdownData(prevFormData?.dropdownDataProvider ?? '', documentDefinitionName, prevFormData?.key ?? '')
902
943
  .subscribe();
903
944
  }
904
945
  if (this.dropdownDataProviderSupportsUpdates(mappedFormData.dropdownDataProvider)) {
905
946
  this.modifiedDropdownValues$.pipe(take(1)).subscribe(dropdownValues => {
906
947
  const request = dropdownValues.reduce((acc, keyValue) => ({ ...acc, [keyValue.key]: keyValue.value }), {});
907
948
  this.documentService
908
- .postDropdownData(mappedFormData.dropdownDataProvider, documentDefinitionName, mappedFormData.key, request)
949
+ .postDropdownData(mappedFormData.dropdownDataProvider ?? '', documentDefinitionName, mappedFormData.key, request)
909
950
  .subscribe();
910
951
  });
911
952
  }
@@ -963,12 +1004,12 @@ class DossierManagementSearchFieldsComponent {
963
1004
  return dropdownDataProvider === 'dropdownDatabaseDataProvider';
964
1005
  }
965
1006
  openSelectedSearchFieldSubscription() {
966
- this.subscriptions.add(this.selectedSearchField$.subscribe(() => {
1007
+ this._subscriptions.add(this.selectedSearchField$.subscribe(() => {
967
1008
  this.showModal();
968
1009
  }));
969
1010
  }
970
1011
  openModalShowingSubscription() {
971
- this.subscriptions.add(this.modal.modalShowing$.subscribe(modalShowing => {
1012
+ this._subscriptions.add(this.modal.modalShowing$.subscribe(modalShowing => {
972
1013
  if (modalShowing) {
973
1014
  setTimeout(() => {
974
1015
  this.showSearchFieldsForm = true;
@@ -1001,16 +1042,13 @@ class DossierManagementSearchFieldsComponent {
1001
1042
  refreshSearchFields() {
1002
1043
  this.refreshSearchFields$.next(null);
1003
1044
  }
1004
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementSearchFieldsComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i3.TranslateService }, { token: i4$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
1005
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementSearchFieldsComponent, selector: "valtimo-dossier-management-search-fields", outputs: { searchField: "searchField" }, viewQueries: [{ propertyName: "moveRowButtonsTemplateRef", first: true, predicate: ["moveRowButtons"], descendants: true }, { propertyName: "modal", first: true, predicate: ["searchFieldModal"], 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<ng-container\n *ngIf=\"{\n searchFields: translatedSearchFields$ | async,\n fields: fields$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"modal; context: {obs: obs}\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <a\n class=\"btn btn-secondary btn-space\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [ngClass]=\"{\n disabled:\n !obs.downloadUrl || !obs.downloadName || obs.searchFields.length <= 0 || obs.disableInput\n }\"\n >\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'searchFields.downloadButtonText' | translate }}\n </a>\n <button\n (click)=\"searchFieldClicked($event, true)\"\n class=\"btn btn-primary btn-space\"\n [ngClass]=\"{disabled: loadingSearchFields || obs.disableInput}\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'searchFieldsOverview.addRow' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.searchFields\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n (rowClicked)=\"searchFieldClicked($event, false)\"\n *ngIf=\"obs.searchFields; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n documentDefinitionName: documentDefinitionName$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{\n 'disabled disabled-move-row-button': index === length - 1 || obs.disableInput\n }\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #modal let-obs=\"obs\">\n <valtimo-modal\n #searchFieldModal\n elementId=\"searchFieldModal\"\n [title]=\"\n searchFieldActionTypeIsAdd\n ? ('searchFieldsOverview.addRow' | translate)\n : ('searchFieldsOverview.edit' | translate)\n \"\n [showFooter]=\"true\"\n >\n <div body class=\"mt-2\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"showSearchFieldsForm && {searchField: selectedSearchField$ | async} as searchObs\"\n >\n <v-input\n name=\"title\"\n [title]=\"'searchFieldsOverview.title' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.title\"\n [disabled]=\"obs.disableInput\"\n [required]=\"false\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n >\n </v-input>\n <v-input\n name=\"key\"\n [title]=\"'searchFieldsOverview.key' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.key\"\n [disabled]=\"obs.disableInput || !searchFieldActionTypeIsAdd\"\n [required]=\"true\"\n [widthPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n >\n </v-input>\n <v-input\n name=\"path\"\n [title]=\"'searchFieldsOverview.path' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.path\"\n [disabled]=\"obs.disableInput\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n >\n </v-input>\n <v-select\n *ngIf=\"dataTypeItems$ | async as dataTypeItems\"\n [items]=\"dataTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dataType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"dataType\"\n [defaultSelectionId]=\"searchObs.searchField?.dataType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"(showMatchTypes$ | async) && (matchTypeItems$ | async) as matchTypeItems\"\n [items]=\"matchTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.matchType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"matchType\"\n [defaultSelectionId]=\"searchObs.searchField?.matchType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.matchType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"fieldTypeItems$ | async as fieldTypeItems\"\n [items]=\"fieldTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.fieldType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"fieldType\"\n [defaultSelectionId]=\"searchObs.searchField?.fieldType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"\n (fieldTypeIsDropdown$ | async) &&\n (dropdownDataProviderNames$ | async) as dropdownDataProviderNames\n \"\n [items]=\"dropdownDataProviderNames\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dropdownDataProvider' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"false\"\n name=\"dropdownDataProvider\"\n [defaultSelectionId]=\"searchObs.searchField?.dropdownDataProvider\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownDataProvider' | translate\"\n ></v-select>\n <valtimo-carbon-multi-input\n *ngIf=\"\n (showInputDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n name=\"dropdownValues\"\n [title]=\"'searchFieldsOverview.dropdownListValues' | translate\"\n type=\"keyValue\"\n [disabled]=\"obs.disableInput\"\n [defaultValues]=\"initialDropdownValues\"\n [margin]=\"true\"\n [required]=\"false\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownListValues' | translate\"\n (valueChange)=\"dropdownDatalistChange($event)\"\n >\n </valtimo-carbon-multi-input>\n <v-table\n *ngIf=\"\n (showReadonlyDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n [items]=\"initialDropdownValues\"\n [columns]=\"dropdownColumns$ | async\"\n [showEditButtons]=\"false\"\n [itemsTranslationKey]=\"'searchFieldsOverview'\"\n [showPagination]=\"false\"\n [mobileBreakpointPx]=\"200\"\n ></v-table>\n </v-form>\n </div>\n <div footer>\n <div class=\"col-12 p-0\">\n <ng-container *ngTemplateOutlet=\"buttonsFooterModal; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </valtimo-modal>\n</ng-template>\n\n<ng-template #buttonsFooterModal let-obs=\"obs\">\n <div class=\"buttons-container\" *ngIf=\"{searchField: selectedSearchField$ | async} as searchObs\">\n <div class=\"right-buttons\">\n <button\n class=\"btn btn-space btn-secondary\"\n *ngIf=\"!searchFieldActionTypeIsAdd\"\n [disabled]=\"obs.disableInput\"\n (click)=\"deleteSelectedSearchField(obs.documentDefinitionName, searchObs.searchField)\"\n >\n {{ 'searchFieldsOverview.delete' | translate }}\n </button>\n <button\n (click)=\"saveSearchField(obs.documentDefinitionName)\"\n type=\"button\"\n class=\"btn btn-primary btn-space mr-0\"\n [disabled]=\"obs.disableInput || !obs.valid\"\n >\n {{ 'searchFieldsOverview.submit' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"mb-3\">\n <valtimo-spinner></valtimo-spinner>\n </div>\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 */valtimo-list::ng-deep table{border-top:1px solid rgba(0,0,0,.125)}.modal-header::ng-deep{background-color:#f3f4f7}::ng-deep .disabled-move-row-button{cursor:default!important;filter:grayscale(1);opacity:.5}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}::ng-deep .tab-container{min-height:unset!important}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i6.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme"], outputs: ["selectedChange"] }, { kind: "component", type: i6.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i6.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder"], outputs: ["valueChange"] }, { kind: "component", type: i6.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i6.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "component", type: i6.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1045
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementSearchFieldsComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i3.TranslateService }, { token: i4$2.DomSanitizer }, { token: i4.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
1046
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementSearchFieldsComponent, selector: "valtimo-dossier-management-search-fields", outputs: { searchField: "searchField" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["searchFieldModal"], 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<ng-container\n *ngIf=\"{\n searchFields: translatedSearchFields$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n\n <ng-container *ngTemplateOutlet=\"modal; context: {obs: obs}\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <div class=\"dossier-management-search-fields__buttons\">\n <a\n cdsLink\n class=\"center-link\"\n [disabled]=\"\n !obs.downloadUrl || !obs.downloadName || obs.searchFields.length <= 0 || obs.disableInput\n \"\n [download]=\"obs.downloadName\"\n [href]=\"obs.downloadUrl\"\n >\n {{ 'searchFields.downloadButtonText' | translate }}\n </a>\n\n <button\n cdsButton=\"primary\"\n [disabled]=\"loadingSearchFields || obs.disableInput\"\n (click)=\"searchFieldClicked($event, true)\"\n >\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'searchFieldsOverview.addRow' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [fields]=\"fields\"\n [header]=\"false\"\n [items]=\"obs.searchFields\"\n [loading]=\"!obs.searchFields\"\n [movingRowsEnabled]=\"true\"\n (rowClicked)=\"searchFieldClicked($event, false)\"\n (moveRow)=\"onMoveRowClick($event, obs.documentDefinitionName)\"\n >\n <ng-container\n carbonToolbarContent\n *ngTemplateOutlet=\"buttons; context: {obs: obs}\"\n ></ng-container>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #modal let-obs=\"obs\">\n <valtimo-modal\n #searchFieldModal\n elementId=\"searchFieldModal\"\n [title]=\"\n searchFieldActionTypeIsAdd\n ? ('searchFieldsOverview.addRow' | translate)\n : ('searchFieldsOverview.edit' | translate)\n \"\n [showFooter]=\"true\"\n >\n <div body class=\"mt-2\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"showSearchFieldsForm && {searchField: selectedSearchField$ | async} as searchObs\"\n >\n <v-input\n name=\"title\"\n [title]=\"'searchFieldsOverview.title' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.title\"\n [disabled]=\"obs.disableInput\"\n [required]=\"false\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n >\n </v-input>\n <v-input\n name=\"key\"\n [title]=\"'searchFieldsOverview.key' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.key\"\n [disabled]=\"obs.disableInput || !searchFieldActionTypeIsAdd\"\n [required]=\"true\"\n [widthPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n >\n </v-input>\n <v-input\n name=\"path\"\n [title]=\"'searchFieldsOverview.path' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.path\"\n [disabled]=\"obs.disableInput\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n >\n </v-input>\n <v-select\n *ngIf=\"dataTypeItems$ | async as dataTypeItems\"\n [items]=\"dataTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dataType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"dataType\"\n [defaultSelectionId]=\"searchObs.searchField?.dataType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"(showMatchTypes$ | async) && (matchTypeItems$ | async) as matchTypeItems\"\n [items]=\"matchTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.matchType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"matchType\"\n [defaultSelectionId]=\"searchObs.searchField?.matchType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.matchType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"fieldTypeItems$ | async as fieldTypeItems\"\n [items]=\"fieldTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.fieldType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"fieldType\"\n [defaultSelectionId]=\"searchObs.searchField?.fieldType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"\n (fieldTypeIsDropdown$ | async) &&\n (dropdownDataProviderNames$ | async) as dropdownDataProviderNames\n \"\n [items]=\"dropdownDataProviderNames\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dropdownDataProvider' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"false\"\n name=\"dropdownDataProvider\"\n [defaultSelectionId]=\"searchObs.searchField?.dropdownDataProvider\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownDataProvider' | translate\"\n ></v-select>\n <valtimo-carbon-multi-input\n *ngIf=\"\n (showInputDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n name=\"dropdownValues\"\n [title]=\"'searchFieldsOverview.dropdownListValues' | translate\"\n type=\"keyValue\"\n [disabled]=\"obs.disableInput\"\n [defaultValues]=\"initialDropdownValues\"\n [margin]=\"true\"\n [required]=\"false\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownListValues' | translate\"\n (valueChange)=\"dropdownDatalistChange($event)\"\n >\n </valtimo-carbon-multi-input>\n <v-table\n *ngIf=\"\n (showReadonlyDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n [items]=\"initialDropdownValues\"\n [columns]=\"dropdownColumns$ | async\"\n [showEditButtons]=\"false\"\n [itemsTranslationKey]=\"'searchFieldsOverview'\"\n [showPagination]=\"false\"\n [mobileBreakpointPx]=\"200\"\n ></v-table>\n </v-form>\n </div>\n <div footer>\n <div class=\"col-12 p-0\">\n <ng-container *ngTemplateOutlet=\"buttonsFooterModal; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </valtimo-modal>\n</ng-template>\n\n<ng-template #buttonsFooterModal let-obs=\"obs\">\n <div class=\"buttons-container\" *ngIf=\"{searchField: selectedSearchField$ | async} as searchObs\">\n <div class=\"right-buttons\">\n <button\n class=\"btn btn-space btn-secondary\"\n *ngIf=\"!searchFieldActionTypeIsAdd\"\n [disabled]=\"obs.disableInput\"\n (click)=\"deleteSelectedSearchField(searchObs.searchField)\"\n >\n {{ 'searchFieldsOverview.delete' | translate }}\n </button>\n <button\n (click)=\"saveSearchField(obs.documentDefinitionName)\"\n type=\"button\"\n class=\"btn btn-primary btn-space mr-0\"\n [disabled]=\"obs.disableInput || !obs.valid\"\n >\n {{ 'searchFieldsOverview.submit' | translate }}\n </button>\n </div>\n </div>\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 */valtimo-list::ng-deep table{border-top:1px solid rgba(0,0,0,.125)}.dossier-management-search-fields__buttons{display:flex;gap:16px}.dossier-management-search-fields__buttons .center-link{display:flex;align-items:center}.dossier-management-search-fields__move-buttons{width:100%;justify-content:flex-end;display:flex;flex-direction:row;position:relative}.dossier-management-search-fields__move-buttons button:not(:last-child){margin-right:8px}.list-actions{width:1px}.modal-header::ng-deep{background-color:#f3f4f7}::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--tab-content{padding-top:0!important}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i7.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i7.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme"], outputs: ["selectedChange"] }, { kind: "component", type: i7.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder"], outputs: ["valueChange"] }, { kind: "component", type: i7.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i7.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "directive", type: i4.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "component", type: i7.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "component", type: i7.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: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1006
1047
  }
1007
1048
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementSearchFieldsComponent, decorators: [{
1008
1049
  type: Component,
1009
- args: [{ selector: 'valtimo-dossier-management-search-fields', 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 searchFields: translatedSearchFields$ | async,\n fields: fields$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"modal; context: {obs: obs}\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <div class=\"btn-group mt-m3px mb-3 pr-2 float-right\">\n <a\n class=\"btn btn-secondary btn-space\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [ngClass]=\"{\n disabled:\n !obs.downloadUrl || !obs.downloadName || obs.searchFields.length <= 0 || obs.disableInput\n }\"\n >\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'searchFields.downloadButtonText' | translate }}\n </a>\n <button\n (click)=\"searchFieldClicked($event, true)\"\n class=\"btn btn-primary btn-space\"\n [ngClass]=\"{disabled: loadingSearchFields || obs.disableInput}\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'searchFieldsOverview.addRow' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.searchFields\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n (rowClicked)=\"searchFieldClicked($event, false)\"\n *ngIf=\"obs.searchFields; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n documentDefinitionName: documentDefinitionName$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{\n 'disabled disabled-move-row-button': index === length - 1 || obs.disableInput\n }\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #modal let-obs=\"obs\">\n <valtimo-modal\n #searchFieldModal\n elementId=\"searchFieldModal\"\n [title]=\"\n searchFieldActionTypeIsAdd\n ? ('searchFieldsOverview.addRow' | translate)\n : ('searchFieldsOverview.edit' | translate)\n \"\n [showFooter]=\"true\"\n >\n <div body class=\"mt-2\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"showSearchFieldsForm && {searchField: selectedSearchField$ | async} as searchObs\"\n >\n <v-input\n name=\"title\"\n [title]=\"'searchFieldsOverview.title' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.title\"\n [disabled]=\"obs.disableInput\"\n [required]=\"false\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n >\n </v-input>\n <v-input\n name=\"key\"\n [title]=\"'searchFieldsOverview.key' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.key\"\n [disabled]=\"obs.disableInput || !searchFieldActionTypeIsAdd\"\n [required]=\"true\"\n [widthPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n >\n </v-input>\n <v-input\n name=\"path\"\n [title]=\"'searchFieldsOverview.path' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.path\"\n [disabled]=\"obs.disableInput\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n >\n </v-input>\n <v-select\n *ngIf=\"dataTypeItems$ | async as dataTypeItems\"\n [items]=\"dataTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dataType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"dataType\"\n [defaultSelectionId]=\"searchObs.searchField?.dataType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"(showMatchTypes$ | async) && (matchTypeItems$ | async) as matchTypeItems\"\n [items]=\"matchTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.matchType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"matchType\"\n [defaultSelectionId]=\"searchObs.searchField?.matchType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.matchType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"fieldTypeItems$ | async as fieldTypeItems\"\n [items]=\"fieldTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.fieldType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"fieldType\"\n [defaultSelectionId]=\"searchObs.searchField?.fieldType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"\n (fieldTypeIsDropdown$ | async) &&\n (dropdownDataProviderNames$ | async) as dropdownDataProviderNames\n \"\n [items]=\"dropdownDataProviderNames\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dropdownDataProvider' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"false\"\n name=\"dropdownDataProvider\"\n [defaultSelectionId]=\"searchObs.searchField?.dropdownDataProvider\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownDataProvider' | translate\"\n ></v-select>\n <valtimo-carbon-multi-input\n *ngIf=\"\n (showInputDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n name=\"dropdownValues\"\n [title]=\"'searchFieldsOverview.dropdownListValues' | translate\"\n type=\"keyValue\"\n [disabled]=\"obs.disableInput\"\n [defaultValues]=\"initialDropdownValues\"\n [margin]=\"true\"\n [required]=\"false\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownListValues' | translate\"\n (valueChange)=\"dropdownDatalistChange($event)\"\n >\n </valtimo-carbon-multi-input>\n <v-table\n *ngIf=\"\n (showReadonlyDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n [items]=\"initialDropdownValues\"\n [columns]=\"dropdownColumns$ | async\"\n [showEditButtons]=\"false\"\n [itemsTranslationKey]=\"'searchFieldsOverview'\"\n [showPagination]=\"false\"\n [mobileBreakpointPx]=\"200\"\n ></v-table>\n </v-form>\n </div>\n <div footer>\n <div class=\"col-12 p-0\">\n <ng-container *ngTemplateOutlet=\"buttonsFooterModal; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </valtimo-modal>\n</ng-template>\n\n<ng-template #buttonsFooterModal let-obs=\"obs\">\n <div class=\"buttons-container\" *ngIf=\"{searchField: selectedSearchField$ | async} as searchObs\">\n <div class=\"right-buttons\">\n <button\n class=\"btn btn-space btn-secondary\"\n *ngIf=\"!searchFieldActionTypeIsAdd\"\n [disabled]=\"obs.disableInput\"\n (click)=\"deleteSelectedSearchField(obs.documentDefinitionName, searchObs.searchField)\"\n >\n {{ 'searchFieldsOverview.delete' | translate }}\n </button>\n <button\n (click)=\"saveSearchField(obs.documentDefinitionName)\"\n type=\"button\"\n class=\"btn btn-primary btn-space mr-0\"\n [disabled]=\"obs.disableInput || !obs.valid\"\n >\n {{ 'searchFieldsOverview.submit' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"mb-3\">\n <valtimo-spinner></valtimo-spinner>\n </div>\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 */valtimo-list::ng-deep table{border-top:1px solid rgba(0,0,0,.125)}.modal-header::ng-deep{background-color:#f3f4f7}::ng-deep .disabled-move-row-button{cursor:default!important;filter:grayscale(1);opacity:.5}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}::ng-deep .tab-container{min-height:unset!important}\n"] }]
1010
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i3.TranslateService }, { type: i4$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
1011
- type: ViewChild,
1012
- args: ['moveRowButtons']
1013
- }], modal: [{
1050
+ args: [{ selector: 'valtimo-dossier-management-search-fields', 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 searchFields: translatedSearchFields$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async\n } as obs\"\n>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n\n <ng-container *ngTemplateOutlet=\"modal; context: {obs: obs}\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <div class=\"dossier-management-search-fields__buttons\">\n <a\n cdsLink\n class=\"center-link\"\n [disabled]=\"\n !obs.downloadUrl || !obs.downloadName || obs.searchFields.length <= 0 || obs.disableInput\n \"\n [download]=\"obs.downloadName\"\n [href]=\"obs.downloadUrl\"\n >\n {{ 'searchFields.downloadButtonText' | translate }}\n </a>\n\n <button\n cdsButton=\"primary\"\n [disabled]=\"loadingSearchFields || obs.disableInput\"\n (click)=\"searchFieldClicked($event, true)\"\n >\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'searchFieldsOverview.addRow' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [fields]=\"fields\"\n [header]=\"false\"\n [items]=\"obs.searchFields\"\n [loading]=\"!obs.searchFields\"\n [movingRowsEnabled]=\"true\"\n (rowClicked)=\"searchFieldClicked($event, false)\"\n (moveRow)=\"onMoveRowClick($event, obs.documentDefinitionName)\"\n >\n <ng-container\n carbonToolbarContent\n *ngTemplateOutlet=\"buttons; context: {obs: obs}\"\n ></ng-container>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #modal let-obs=\"obs\">\n <valtimo-modal\n #searchFieldModal\n elementId=\"searchFieldModal\"\n [title]=\"\n searchFieldActionTypeIsAdd\n ? ('searchFieldsOverview.addRow' | translate)\n : ('searchFieldsOverview.edit' | translate)\n \"\n [showFooter]=\"true\"\n >\n <div body class=\"mt-2\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"showSearchFieldsForm && {searchField: selectedSearchField$ | async} as searchObs\"\n >\n <v-input\n name=\"title\"\n [title]=\"'searchFieldsOverview.title' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.title\"\n [disabled]=\"obs.disableInput\"\n [required]=\"false\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n >\n </v-input>\n <v-input\n name=\"key\"\n [title]=\"'searchFieldsOverview.key' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.key\"\n [disabled]=\"obs.disableInput || !searchFieldActionTypeIsAdd\"\n [required]=\"true\"\n [widthPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n >\n </v-input>\n <v-input\n name=\"path\"\n [title]=\"'searchFieldsOverview.path' | translate\"\n [margin]=\"true\"\n [defaultValue]=\"searchObs.searchField?.path\"\n [disabled]=\"obs.disableInput\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n >\n </v-input>\n <v-select\n *ngIf=\"dataTypeItems$ | async as dataTypeItems\"\n [items]=\"dataTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dataType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"dataType\"\n [defaultSelectionId]=\"searchObs.searchField?.dataType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"(showMatchTypes$ | async) && (matchTypeItems$ | async) as matchTypeItems\"\n [items]=\"matchTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.matchType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"matchType\"\n [defaultSelectionId]=\"searchObs.searchField?.matchType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.matchType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"fieldTypeItems$ | async as fieldTypeItems\"\n [items]=\"fieldTypeItems\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.fieldType' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"fieldType\"\n [defaultSelectionId]=\"searchObs.searchField?.fieldType\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n ></v-select>\n <v-select\n *ngIf=\"\n (fieldTypeIsDropdown$ | async) &&\n (dropdownDataProviderNames$ | async) as dropdownDataProviderNames\n \"\n [items]=\"dropdownDataProviderNames\"\n [placeholder]=\"'searchFieldsOverview.searchFieldPlaceholder' | translate\"\n [title]=\"'searchFieldsOverview.dropdownDataProvider' | translate\"\n [disabled]=\"obs.disableInput\"\n [margin]=\"true\"\n [required]=\"false\"\n name=\"dropdownDataProvider\"\n [defaultSelectionId]=\"searchObs.searchField?.dropdownDataProvider\"\n [widthInPx]=\"200\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownDataProvider' | translate\"\n ></v-select>\n <valtimo-carbon-multi-input\n *ngIf=\"\n (showInputDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n name=\"dropdownValues\"\n [title]=\"'searchFieldsOverview.dropdownListValues' | translate\"\n type=\"keyValue\"\n [disabled]=\"obs.disableInput\"\n [defaultValues]=\"initialDropdownValues\"\n [margin]=\"true\"\n [required]=\"false\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownListValues' | translate\"\n (valueChange)=\"dropdownDatalistChange($event)\"\n >\n </valtimo-carbon-multi-input>\n <v-table\n *ngIf=\"\n (showReadonlyDropdownTable$ | async) &&\n (initialDropdownValues$ | async) as initialDropdownValues\n \"\n [items]=\"initialDropdownValues\"\n [columns]=\"dropdownColumns$ | async\"\n [showEditButtons]=\"false\"\n [itemsTranslationKey]=\"'searchFieldsOverview'\"\n [showPagination]=\"false\"\n [mobileBreakpointPx]=\"200\"\n ></v-table>\n </v-form>\n </div>\n <div footer>\n <div class=\"col-12 p-0\">\n <ng-container *ngTemplateOutlet=\"buttonsFooterModal; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n </valtimo-modal>\n</ng-template>\n\n<ng-template #buttonsFooterModal let-obs=\"obs\">\n <div class=\"buttons-container\" *ngIf=\"{searchField: selectedSearchField$ | async} as searchObs\">\n <div class=\"right-buttons\">\n <button\n class=\"btn btn-space btn-secondary\"\n *ngIf=\"!searchFieldActionTypeIsAdd\"\n [disabled]=\"obs.disableInput\"\n (click)=\"deleteSelectedSearchField(searchObs.searchField)\"\n >\n {{ 'searchFieldsOverview.delete' | translate }}\n </button>\n <button\n (click)=\"saveSearchField(obs.documentDefinitionName)\"\n type=\"button\"\n class=\"btn btn-primary btn-space mr-0\"\n [disabled]=\"obs.disableInput || !obs.valid\"\n >\n {{ 'searchFieldsOverview.submit' | translate }}\n </button>\n </div>\n </div>\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 */valtimo-list::ng-deep table{border-top:1px solid rgba(0,0,0,.125)}.dossier-management-search-fields__buttons{display:flex;gap:16px}.dossier-management-search-fields__buttons .center-link{display:flex;align-items:center}.dossier-management-search-fields__move-buttons{width:100%;justify-content:flex-end;display:flex;flex-direction:row;position:relative}.dossier-management-search-fields__move-buttons button:not(:last-child){margin-right:8px}.list-actions{width:1px}.modal-header::ng-deep{background-color:#f3f4f7}::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--tab-content{padding-top:0!important}\n"] }]
1051
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i3.TranslateService }, { type: i4$2.DomSanitizer }, { type: i4.IconService }]; }, propDecorators: { modal: [{
1014
1052
  type: ViewChild,
1015
1053
  args: ['searchFieldModal']
1016
1054
  }], searchField: [{
@@ -1033,66 +1071,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1033
1071
  * limitations under the License.
1034
1072
  */
1035
1073
  class DossierManagementListColumnsComponent {
1036
- constructor(documentService, route, translateService, configService, sanitizer) {
1074
+ constructor(documentService, route, translateService, configService, sanitizer, iconService) {
1037
1075
  this.documentService = documentService;
1038
1076
  this.route = route;
1039
1077
  this.translateService = translateService;
1040
1078
  this.configService = configService;
1041
1079
  this.sanitizer = sanitizer;
1080
+ this.iconService = iconService;
1042
1081
  this.downloadName$ = new BehaviorSubject('');
1043
1082
  this.downloadUrl$ = new BehaviorSubject(undefined);
1044
- this.COLUMNS = [
1083
+ this.actionItems = [
1084
+ {
1085
+ label: 'interface.delete',
1086
+ callback: this.deleteRow.bind(this),
1087
+ type: 'danger',
1088
+ },
1089
+ ];
1090
+ this.loadingCaseListColumns$ = new BehaviorSubject(true);
1091
+ this.lastItemIndex$ = new BehaviorSubject(-1);
1092
+ this.fields = [
1045
1093
  {
1046
1094
  viewType: 'string',
1047
1095
  sortable: false,
1048
- propertyName: 'title',
1049
- translationKey: 'title',
1096
+ key: 'title',
1097
+ label: 'listColumn.title',
1050
1098
  },
1051
1099
  {
1052
1100
  viewType: 'string',
1053
1101
  sortable: false,
1054
- propertyName: 'key',
1055
- translationKey: 'key',
1102
+ key: 'key',
1103
+ label: 'listColumn.key',
1056
1104
  },
1057
1105
  {
1058
1106
  viewType: 'string',
1059
1107
  sortable: false,
1060
- propertyName: 'path',
1061
- translationKey: 'path',
1108
+ key: 'path',
1109
+ label: 'listColumn.path',
1062
1110
  },
1063
1111
  {
1064
1112
  viewType: 'string',
1065
1113
  sortable: false,
1066
- propertyName: 'displayType',
1067
- translationKey: 'displayType',
1114
+ key: 'displayType',
1115
+ label: 'listColumn.displayType',
1068
1116
  },
1069
1117
  {
1070
1118
  viewType: 'string',
1071
1119
  sortable: false,
1072
- propertyName: 'displayTypeParameters',
1073
- translationKey: 'displayTypeParameters',
1120
+ key: 'displayTypeParameters',
1121
+ label: 'listColumn.displayTypeParameters',
1074
1122
  },
1075
1123
  {
1076
1124
  viewType: 'string',
1077
1125
  sortable: false,
1078
- propertyName: 'sortable',
1079
- translationKey: 'sortable',
1126
+ key: 'sortable',
1127
+ label: 'listColumn.sortable',
1080
1128
  },
1081
1129
  {
1082
1130
  viewType: 'string',
1083
1131
  sortable: false,
1084
- propertyName: 'defaultSort',
1085
- translationKey: 'defaultSort',
1132
+ key: 'defaultSort',
1133
+ label: 'listColumn.defaultSort',
1086
1134
  },
1087
1135
  ];
1088
- this.loadingCaseListColumns = true;
1089
- this.fields$ = this.translateService.stream('key').pipe(map(() => this.COLUMNS.map(column => ({
1090
- key: column.propertyName,
1091
- label: this.translateService.instant(`listColumn.${column.translationKey}`),
1092
- sortable: column.sortable,
1093
- ...(column.viewType && { viewType: column.viewType }),
1094
- ...(column.enum && { enum: column.enum }),
1095
- }))));
1096
1136
  this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName));
1097
1137
  this.disableInput$ = new BehaviorSubject(false);
1098
1138
  this.hasEnvironmentConfig$ = this.documentDefinitionName$.pipe(map(documentDefinitionName => !!this.configService?.config?.customDefinitionTables[documentDefinitionName]));
@@ -1108,8 +1148,9 @@ class DossierManagementListColumnsComponent {
1108
1148
  }
1109
1149
  });
1110
1150
  }), tap$1(caseListColumns => {
1151
+ this.lastItemIndex$.next(caseListColumns.length - 1);
1111
1152
  this.cachedCaseListColumns = caseListColumns;
1112
- this.loadingCaseListColumns = false;
1153
+ this.loadingCaseListColumns$.next(false);
1113
1154
  this.enableInput();
1114
1155
  }));
1115
1156
  this.translatedCaseListColumns$ = combineLatest([
@@ -1220,9 +1261,12 @@ class DossierManagementListColumnsComponent {
1220
1261
  validKey &&
1221
1262
  (formValues.displayType.key === 'enum' ? formValues.enum?.length > 0 : true))), startWith(false));
1222
1263
  this.showDeleteModal$ = new Subject();
1223
- this.deleteRowIndex$ = new BehaviorSubject(0);
1264
+ this.deleteRowKey$ = new BehaviorSubject('');
1224
1265
  this.defaultEnumValues$ = new BehaviorSubject(undefined);
1225
1266
  }
1267
+ ngAfterViewInit() {
1268
+ this.iconService.registerAll([ArrowDown16, ArrowUp16]);
1269
+ }
1226
1270
  openModal(modalType) {
1227
1271
  this.showModal$.next(true);
1228
1272
  this.currentModalType$.next(modalType);
@@ -1237,13 +1281,11 @@ class DossierManagementListColumnsComponent {
1237
1281
  closeModal() {
1238
1282
  this.showModal$.next(false);
1239
1283
  }
1240
- deleteRow(caseListColumnRowIndex, clickEvent) {
1241
- clickEvent.stopPropagation();
1284
+ deleteRow(caseListColumn) {
1242
1285
  this.showDeleteModal$.next(true);
1243
- this.deleteRowIndex$.next(caseListColumnRowIndex);
1286
+ this.deleteRowKey$.next(caseListColumn.key);
1244
1287
  }
1245
- deleteRowConfirmation(caseListColumnRowIndex) {
1246
- const columnKey = this.cachedCaseListColumns[caseListColumnRowIndex]?.key;
1288
+ deleteRowConfirmation(columnKey) {
1247
1289
  if (columnKey) {
1248
1290
  this.disableInput();
1249
1291
  this.documentDefinitionName$.pipe(take$1(1)).subscribe(docDefName => {
@@ -1449,16 +1491,13 @@ class DossierManagementListColumnsComponent {
1449
1491
  },
1450
1492
  };
1451
1493
  }
1452
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementListColumnsComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i3.TranslateService }, { token: i1$3.ConfigService }, { token: i4$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
1453
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementListColumnsComponent, selector: "valtimo-dossier-management-list-columns", viewQueries: [{ propertyName: "moveRowButtonsTemplateRef", first: true, predicate: ["moveRowButtons"], 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<ng-container\n *ngIf=\"{\n caseListColumn: translatedCaseListColumns$ | async,\n fields: fields$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n hasEnvironmentConfig: hasEnvironmentConfig$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-2\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!obs.hasEnvironmentConfig; else environmentConfigWarning\">\n <ng-container *ngIf=\"!loadingCaseListColumns; else loading\">\n <ng-container *ngIf=\"obs.caseListColumn?.length > 0; else noConfigWarning\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n cdsLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n obs.hasEnvironmentConfig ||\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.caseListColumn?.length < 1 ||\n obs.disableInput ||\n loadingCaseListColumns\n \"\n >\n {{ 'listColumn.downloadButtonText' | translate }}\n </a>\n <button\n (click)=\"openModal('create')\"\n cdsButton=\"primary\"\n size=\"md\"\n [disabled]=\"obs.hasEnvironmentConfig || loadingCaseListColumns\"\n class=\"ml-3\"\n >\n {{ 'listColumn.addButtonText' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n documentDefinitionName: documentDefinitionName$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-delete btn btn-outline-danger mr-1\"\n (click)=\"deleteRow(index, $event)\"\n [ngClass]=\"{'disabled disabled-move-row-button': obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{\n 'disabled disabled-move-row-button': index === length - 1 || obs.disableInput\n }\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.caseListColumn\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n *ngIf=\"obs.caseListColumn; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"mb-3\">\n <valtimo-spinner></valtimo-spinner>\n </div>\n</ng-template>\n\n<ng-template #environmentConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'listColumn.hasEnvConfigWarningTitle' | translate,\n message: 'listColumn.hasEnvConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'listColumn.noConfigWarningTitle' | translate,\n message: 'listColumn.noConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #createEditModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async,\n disableDefaultSort: disableDefaultSort$ | async,\n showEnum: showEnum$ | async,\n isYesNo: isYesNo$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('listColumn.addButtonText' | translate)\n : ('listColumn.editColumnTitle' | translate)\n }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.titleTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.titleTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"title\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'listColumn.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.keyTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.pathTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"path\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.displayType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.displayTypeTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown formControlName=\"displayType\" [disabled]=\"modalObs.disableInput\">\n <cds-dropdown-list [items]=\"viewTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"showDateFormat$ | async\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.dateFormat' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.dateFormatTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"dateFormat\" />\n </cds-label>\n </div>\n <div\n class=\"cds--text-input__field-wrapper\"\n *ngIf=\"modalObs.showEnum || modalObs.isYesNo\"\n [ngClass]=\"{'no-margin': modalObs.isYesNo}\"\n >\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{\n modalObs.isYesNo\n ? ('listColumn.enumTitleOptional' | translate)\n : ('listColumn.enumTitle' | translate)\n }}\n <v-tooltip-icon\n [tooltip]=\"\n modalObs.isYesNo\n ? ('listColumn.enumTooltipOptional' | translate)\n : ('listColumn.enumTooltip' | translate)\n \"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <valtimo-carbon-multi-input\n *ngIf=\"(showModal$ | async) || (modalShowing$ | async)\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n [defaultValues]=\"defaultEnumValues$ | async\"\n [hideAddButton]=\"modalObs.isYesNo\"\n [hideDeleteButton]=\"modalObs.isYesNo\"\n [maxRows]=\"modalObs.isYesNo ? 1 : null\"\n [keyColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.Yes' | translate)\"\n [valueColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.No' | translate)\"\n ></valtimo-carbon-multi-input>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-checkbox formControlName=\"sortable\"\n >{{ 'listColumn.sortable' | translate }}\n </cds-checkbox>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.defaultSortTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.defaultSortTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown\n formControlName=\"defaultSort\"\n [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\"\n >\n <cds-dropdown-list [items]=\"sortItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n </form>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'listColumn.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveCasListColumns()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'listColumn.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><<cds-loading></cds-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowIndex$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"listColumn.deleteColumn\"\n titleTranslationKey=\"listColumn.deleteColumn\"\n contentTranslationKey=\"listColumn.deleteColumnConfirmation\"\n ></valtimo-confirmation-modal>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.no-margin{margin-bottom:0!important}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.loading-icon{width:100%;display:flex;align-items:center;justify-content:center}.center-link{display:flex;align-items:center}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i6.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i9.Notification, selector: "cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "directive", type: i9.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "component", type: i9.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i9.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.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: i9.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i9.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "component", type: i6.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }, { kind: "component", type: i6.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "component", type: i9.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "directive", type: i9.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "component", type: i6.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent", "cancelEvent"] }, { kind: "directive", type: i6.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1494
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementListColumnsComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i3.TranslateService }, { token: i1$2.ConfigService }, { token: i4$2.DomSanitizer }, { token: i4.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
1495
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementListColumnsComponent, selector: "valtimo-dossier-management-list-columns", 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 caseListColumn: translatedCaseListColumns$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n hasEnvironmentConfig: hasEnvironmentConfig$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n loadingCaseListColumns: loadingCaseListColumns$ | async\n } as obs\"\n>\n <div class=\"cds--toolbar-content list-columns__buttons\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n\n <ng-container *ngIf=\"!obs.hasEnvironmentConfig; else environmentConfigWarning\">\n <ng-container *ngIf=\"!obs.caseListColumn || obs.caseListColumn?.length > 0\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"obs.caseListColumn?.length === 0\">\n <ng-container *ngTemplateOutlet=\"noConfigWarning\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [loading]=\"obs.loadingCaseListColumns\"\n [items]=\"obs.caseListColumn\"\n [fields]=\"fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n [hideToolbar]=\"true\"\n [movingRowsEnabled]=\"true\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n cdsLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n obs.hasEnvironmentConfig ||\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.caseListColumn?.length < 1 ||\n obs.disableInput ||\n loadingCaseListColumns\n \"\n >\n {{ 'listColumn.downloadButtonText' | translate }}\n </a>\n\n <button\n (click)=\"openModal('create')\"\n cdsButton=\"primary\"\n [disabled]=\"obs.hasEnvironmentConfig || loadingCaseListColumns\"\n >\n {{ 'listColumn.addButtonText' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #environmentConfigWarning>\n <div class=\"pl-2 pr-2 pb-2 pt-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'listColumn.hasEnvConfigWarningTitle' | translate,\n message: 'listColumn.hasEnvConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2 pt-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'listColumn.noConfigWarningTitle' | translate,\n message: 'listColumn.noConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #createEditModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async,\n disableDefaultSort: disableDefaultSort$ | async,\n showEnum: showEnum$ | async,\n isYesNo: isYesNo$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('listColumn.addButtonText' | translate)\n : ('listColumn.editColumnTitle' | translate)\n }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.titleTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.titleTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"title\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'listColumn.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.keyTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.pathTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"path\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.displayType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.displayTypeTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown formControlName=\"displayType\" [disabled]=\"modalObs.disableInput\">\n <cds-dropdown-list [items]=\"viewTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"showDateFormat$ | async\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.dateFormat' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.dateFormatTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"dateFormat\" />\n </cds-label>\n </div>\n <div\n class=\"cds--text-input__field-wrapper\"\n *ngIf=\"modalObs.showEnum || modalObs.isYesNo\"\n [ngClass]=\"{'no-margin': modalObs.isYesNo}\"\n >\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{\n modalObs.isYesNo\n ? ('listColumn.enumTitleOptional' | translate)\n : ('listColumn.enumTitle' | translate)\n }}\n <v-tooltip-icon\n [tooltip]=\"\n modalObs.isYesNo\n ? ('listColumn.enumTooltipOptional' | translate)\n : ('listColumn.enumTooltip' | translate)\n \"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <valtimo-carbon-multi-input\n *ngIf=\"(showModal$ | async) || (modalShowing$ | async)\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n [defaultValues]=\"defaultEnumValues$ | async\"\n [hideAddButton]=\"modalObs.isYesNo\"\n [hideDeleteButton]=\"modalObs.isYesNo\"\n [maxRows]=\"modalObs.isYesNo ? 1 : null\"\n [keyColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.Yes' | translate)\"\n [valueColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.No' | translate)\"\n ></valtimo-carbon-multi-input>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-checkbox formControlName=\"sortable\"\n >{{ 'listColumn.sortable' | translate }}\n </cds-checkbox>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.defaultSortTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.defaultSortTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown\n formControlName=\"defaultSort\"\n [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\"\n >\n <cds-dropdown-list [items]=\"sortItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n </form>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'listColumn.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveCasListColumns()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'listColumn.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowKey$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"listColumn.deleteColumn\"\n titleTranslationKey=\"listColumn.deleteColumn\"\n contentTranslationKey=\"listColumn.deleteColumnConfirmation\"\n ></valtimo-confirmation-modal>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.no-margin{margin-bottom:0!important}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.center-link{display:flex;align-items:center}.dossier-list-columns__actions{display:flex;gap:8px}.list-columns__buttons{display:flex;gap:16px;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.Notification, selector: "cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.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: i4.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i4.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "component", type: i7.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }, { kind: "component", type: i7.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "directive", type: i4.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "component", type: i7.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent", "cancelEvent"] }, { kind: "directive", type: i7.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "component", type: i7.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: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1454
1496
  }
1455
1497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementListColumnsComponent, decorators: [{
1456
1498
  type: Component,
1457
- args: [{ selector: 'valtimo-dossier-management-list-columns', 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 caseListColumn: translatedCaseListColumns$ | async,\n fields: fields$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n hasEnvironmentConfig: hasEnvironmentConfig$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async\n } as obs\"\n>\n <div class=\"container-fluid pr-0 pl-0\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3 mr-2\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!obs.hasEnvironmentConfig; else environmentConfigWarning\">\n <ng-container *ngIf=\"!loadingCaseListColumns; else loading\">\n <ng-container *ngIf=\"obs.caseListColumn?.length > 0; else noConfigWarning\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n cdsLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n obs.hasEnvironmentConfig ||\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.caseListColumn?.length < 1 ||\n obs.disableInput ||\n loadingCaseListColumns\n \"\n >\n {{ 'listColumn.downloadButtonText' | translate }}\n </a>\n <button\n (click)=\"openModal('create')\"\n cdsButton=\"primary\"\n size=\"md\"\n [disabled]=\"obs.hasEnvironmentConfig || loadingCaseListColumns\"\n class=\"ml-3\"\n >\n {{ 'listColumn.addButtonText' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveRowButtons let-index=\"index\" let-length=\"length\">\n <div\n class=\"move-row-buttons\"\n *ngIf=\"{\n disableInput: disableInput$ | async,\n documentDefinitionName: documentDefinitionName$ | async\n } as obs\"\n >\n <i\n class=\"mdi mdi-delete btn btn-outline-danger mr-1\"\n (click)=\"deleteRow(index, $event)\"\n [ngClass]=\"{'disabled disabled-move-row-button': obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-up-bold btn btn-outline-primary mr-1\"\n (click)=\"moveRow(index, true, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{'disabled disabled-move-row-button': index === 0 || obs.disableInput}\"\n ></i>\n <i\n class=\"mdi mdi-arrow-down-bold btn btn-outline-secondary\"\n (click)=\"moveRow(index, false, $event, obs.documentDefinitionName)\"\n [ngClass]=\"{\n 'disabled disabled-move-row-button': index === length - 1 || obs.disableInput\n }\"\n ></i>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-list\n [items]=\"obs.caseListColumn\"\n [fields]=\"obs.fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n *ngIf=\"obs.caseListColumn; else loading\"\n [lastColumnTemplate]=\"moveRowButtonsTemplateRef\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-list>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"mb-3\">\n <valtimo-spinner></valtimo-spinner>\n </div>\n</ng-template>\n\n<ng-template #environmentConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'listColumn.hasEnvConfigWarningTitle' | translate,\n message: 'listColumn.hasEnvConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'listColumn.noConfigWarningTitle' | translate,\n message: 'listColumn.noConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #createEditModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async,\n disableDefaultSort: disableDefaultSort$ | async,\n showEnum: showEnum$ | async,\n isYesNo: isYesNo$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('listColumn.addButtonText' | translate)\n : ('listColumn.editColumnTitle' | translate)\n }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.titleTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.titleTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"title\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'listColumn.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.keyTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.pathTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"path\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.displayType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.displayTypeTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown formControlName=\"displayType\" [disabled]=\"modalObs.disableInput\">\n <cds-dropdown-list [items]=\"viewTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"showDateFormat$ | async\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.dateFormat' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.dateFormatTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"dateFormat\" />\n </cds-label>\n </div>\n <div\n class=\"cds--text-input__field-wrapper\"\n *ngIf=\"modalObs.showEnum || modalObs.isYesNo\"\n [ngClass]=\"{'no-margin': modalObs.isYesNo}\"\n >\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{\n modalObs.isYesNo\n ? ('listColumn.enumTitleOptional' | translate)\n : ('listColumn.enumTitle' | translate)\n }}\n <v-tooltip-icon\n [tooltip]=\"\n modalObs.isYesNo\n ? ('listColumn.enumTooltipOptional' | translate)\n : ('listColumn.enumTooltip' | translate)\n \"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <valtimo-carbon-multi-input\n *ngIf=\"(showModal$ | async) || (modalShowing$ | async)\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n [defaultValues]=\"defaultEnumValues$ | async\"\n [hideAddButton]=\"modalObs.isYesNo\"\n [hideDeleteButton]=\"modalObs.isYesNo\"\n [maxRows]=\"modalObs.isYesNo ? 1 : null\"\n [keyColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.Yes' | translate)\"\n [valueColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.No' | translate)\"\n ></valtimo-carbon-multi-input>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-checkbox formControlName=\"sortable\"\n >{{ 'listColumn.sortable' | translate }}\n </cds-checkbox>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.defaultSortTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.defaultSortTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown\n formControlName=\"defaultSort\"\n [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\"\n >\n <cds-dropdown-list [items]=\"sortItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n </form>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'listColumn.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveCasListColumns()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'listColumn.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-icon\"><<cds-loading></cds-loading></div>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowIndex$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"listColumn.deleteColumn\"\n titleTranslationKey=\"listColumn.deleteColumn\"\n contentTranslationKey=\"listColumn.deleteColumnConfirmation\"\n ></valtimo-confirmation-modal>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.no-margin{margin-bottom:0!important}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.loading-icon{width:100%;display:flex;align-items:center;justify-content:center}.center-link{display:flex;align-items:center}::ng-deep .move-row-buttons{display:flex;flex-direction:row;justify-content:flex-end;padding-right:13px}\n"] }]
1458
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i3.TranslateService }, { type: i1$3.ConfigService }, { type: i4$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
1459
- type: ViewChild,
1460
- args: ['moveRowButtons']
1461
- }] } });
1499
+ args: [{ selector: 'valtimo-dossier-management-list-columns', 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 caseListColumn: translatedCaseListColumns$ | async,\n documentDefinitionName: documentDefinitionName$ | async,\n hasEnvironmentConfig: hasEnvironmentConfig$ | async,\n downloadUrl: downloadUrl$ | async,\n downloadName: downloadName$ | async,\n loadingCaseListColumns: loadingCaseListColumns$ | async\n } as obs\"\n>\n <div class=\"cds--toolbar-content list-columns__buttons\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </div>\n\n <ng-container *ngIf=\"!obs.hasEnvironmentConfig; else environmentConfigWarning\">\n <ng-container *ngIf=\"!obs.caseListColumn || obs.caseListColumn?.length > 0\">\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"obs.caseListColumn?.length === 0\">\n <ng-container *ngTemplateOutlet=\"noConfigWarning\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"createEditModal\"></ng-container>\n\n <ng-container *ngTemplateOutlet=\"deleteModal\"></ng-container>\n</ng-container>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [loading]=\"obs.loadingCaseListColumns\"\n [items]=\"obs.caseListColumn\"\n [fields]=\"fields\"\n [viewMode]=\"false\"\n [header]=\"false\"\n [hideToolbar]=\"true\"\n [movingRowsEnabled]=\"true\"\n (rowClicked)=\"columnRowClicked($event)\"\n >\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #buttons let-obs=\"obs\">\n <a\n cdsLink\n class=\"center-link\"\n [href]=\"obs.downloadUrl\"\n [download]=\"obs.downloadName\"\n [disabled]=\"\n obs.hasEnvironmentConfig ||\n !obs.downloadUrl ||\n !obs.downloadName ||\n obs.caseListColumn?.length < 1 ||\n obs.disableInput ||\n loadingCaseListColumns\n \"\n >\n {{ 'listColumn.downloadButtonText' | translate }}\n </a>\n\n <button\n (click)=\"openModal('create')\"\n cdsButton=\"primary\"\n [disabled]=\"obs.hasEnvironmentConfig || loadingCaseListColumns\"\n >\n {{ 'listColumn.addButtonText' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #environmentConfigWarning>\n <div class=\"pl-2 pr-2 pb-2 pt-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'listColumn.hasEnvConfigWarningTitle' | translate,\n message: 'listColumn.hasEnvConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #noConfigWarning>\n <div class=\"pl-2 pr-2 pb-2 pt-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'info',\n title: 'listColumn.noConfigWarningTitle' | translate,\n message: 'listColumn.noConfigWarning' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #createEditModal>\n <cds-modal\n valtimoCdsModal\n *ngIf=\"{\n type: currentModalType$ | async,\n show: showModal$ | async,\n valid: valid$ | async,\n disableInput: disableInput$ | async,\n validKey: validKey$ | async,\n disableDefaultSort: disableDefaultSort$ | async,\n showEnum: showEnum$ | async,\n isYesNo: isYesNo$ | async\n } as modalObs\"\n [open]=\"modalObs.show\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n modalObs.type === 'create'\n ? ('listColumn.addButtonText' | translate)\n : ('listColumn.editColumnTitle' | translate)\n }}\n </h3>\n </cds-modal-header>\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"modalContent; context: {modalObs: modalObs}\"></ng-container>\n </section>\n <ng-container *ngTemplateOutlet=\"modalFooter; context: {modalObs: modalObs}\"></ng-container>\n </cds-modal>\n</ng-template>\n\n<ng-template #modalContent let-modalObs=\"modalObs\">\n <form [formGroup]=\"formGroup\" class=\"list-column-form\">\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.titleTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.titleTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"title\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label\n [disabled]=\"modalObs.disableInput || modalObs.type === 'edit'\"\n [invalid]=\"modalObs.validKey === false\"\n [invalidText]=\"'listColumn.uniqueKeyWarning' | translate\"\n >\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.key' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.keyTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"key\" [invalid]=\"modalObs.validKey === false\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.path' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.pathTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"path\" />\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.displayType' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.displayTypeTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown formControlName=\"displayType\" [disabled]=\"modalObs.disableInput\">\n <cds-dropdown-list [items]=\"viewTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\" *ngIf=\"showDateFormat$ | async\">\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip\">\n {{ 'listColumn.dateFormat' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.dateFormatTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <input cdsText formControlName=\"dateFormat\" />\n </cds-label>\n </div>\n <div\n class=\"cds--text-input__field-wrapper\"\n *ngIf=\"modalObs.showEnum || modalObs.isYesNo\"\n [ngClass]=\"{'no-margin': modalObs.isYesNo}\"\n >\n <cds-label [disabled]=\"modalObs.disableInput\">\n <span class=\"label-with-tooltip select-label\">\n {{\n modalObs.isYesNo\n ? ('listColumn.enumTitleOptional' | translate)\n : ('listColumn.enumTitle' | translate)\n }}\n <v-tooltip-icon\n [tooltip]=\"\n modalObs.isYesNo\n ? ('listColumn.enumTooltipOptional' | translate)\n : ('listColumn.enumTooltip' | translate)\n \"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <valtimo-carbon-multi-input\n *ngIf=\"(showModal$ | async) || (modalShowing$ | async)\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n [defaultValues]=\"defaultEnumValues$ | async\"\n [hideAddButton]=\"modalObs.isYesNo\"\n [hideDeleteButton]=\"modalObs.isYesNo\"\n [maxRows]=\"modalObs.isYesNo ? 1 : null\"\n [keyColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.Yes' | translate)\"\n [valueColumnTitle]=\"modalObs.isYesNo && ('viewTypeConverter.No' | translate)\"\n ></valtimo-carbon-multi-input>\n </cds-label>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-checkbox formControlName=\"sortable\"\n >{{ 'listColumn.sortable' | translate }}\n </cds-checkbox>\n </div>\n <div class=\"cds--text-input__field-wrapper\">\n <cds-label [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\">\n <span class=\"label-with-tooltip select-label\">\n {{ 'listColumn.defaultSortTitle' | translate }}\n <v-tooltip-icon\n [tooltip]=\"'listColumn.defaultSortTooltip' | translate\"\n [disabled]=\"modalObs.disableInput\"\n ></v-tooltip-icon>\n </span>\n <cds-dropdown\n formControlName=\"defaultSort\"\n [disabled]=\"modalObs.disableInput || modalObs.disableDefaultSort\"\n >\n <cds-dropdown-list [items]=\"sortItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n </div>\n </form>\n</ng-template>\n\n<ng-template #modalFooter let-modalObs=\"modalObs\">\n <cds-modal-footer>\n <ng-container>\n <button\n cdsButton=\"secondary\"\n [attr.modal-primary-focus]=\"true\"\n (click)=\"closeModal()\"\n [disabled]=\"modalObs.disableInput\"\n >\n {{ 'listColumn.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n [disabled]=\"modalObs.valid === false\"\n (click)=\"saveCasListColumns()\"\n [disabled]=\"\n modalObs.disableInput || modalObs.valid === false || modalObs.validKey === false\n \"\n >\n {{ 'listColumn.save' | translate }}\n </button>\n </ng-container>\n </cds-modal-footer>\n</ng-template>\n\n<ng-template #deleteModal>\n <valtimo-confirmation-modal\n [showModalSubject$]=\"showDeleteModal$\"\n [outputOnConfirm]=\"deleteRowKey$ | async\"\n (confirmEvent)=\"deleteRowConfirmation($event)\"\n confirmButtonTextTranslationKey=\"listColumn.deleteColumn\"\n titleTranslationKey=\"listColumn.deleteColumn\"\n contentTranslationKey=\"listColumn.deleteColumnConfirmation\"\n ></valtimo-confirmation-modal>\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 */::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}.label-with-tooltip{display:flex;align-items:center}.cds--text-input__field-wrapper:not(:last-child){margin-bottom:1rem}.no-margin{margin-bottom:0!important}.display-type-dropdown{width:300px}.list-column-form{margin-bottom:3rem}.select-label{padding-bottom:.5rem;width:250px}.center-link{display:flex;align-items:center}.dossier-list-columns__actions{display:flex;gap:8px}.list-columns__buttons{display:flex;gap:16px;flex-direction:row;justify-content:flex-end}\n"] }]
1500
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i3.TranslateService }, { type: i1$2.ConfigService }, { type: i4$2.DomSanitizer }, { type: i4.IconService }]; } });
1462
1501
 
1463
1502
  /*
1464
1503
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -1518,7 +1557,7 @@ class TabFormComponent {
1518
1557
  }));
1519
1558
  }
1520
1559
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabFormComponent, deps: [{ token: TabService }, { token: i2$1.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component }); }
1521
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TabFormComponent, selector: "valtimo-tab-form", inputs: { tabType: "tabType" }, 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<form *ngIf=\"form\" [formGroup]=\"form\" class=\"valtimo-tab-form-modal\">\n <cds-label>\n {{ 'dossierManagement.tabManagement.addModal.tabNameLabel' | translate }}\n\n <input cdsText formControlName=\"name\" [attr.modal-primary-focus]=\"true\" />\n </cds-label>\n\n <cds-label\n [invalid]=\"!!this.form.get('key').errors?.uniqueKey\"\n [invalidText]=\"'dossierManagement.tabManagement.addModal.uniqueKeyError' | translate\"\n >\n {{ 'dossierManagement.tabManagement.addModal.tabKeyLabel' | translate }}\n\n <input\n cdsText\n formControlName=\"key\"\n [invalid]=\"!!this.form.get('key').errors?.uniqueKey\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n\n <cds-combo-box\n [dropUp]=\"false\"\n formControlName=\"contentKey\"\n [items]=\"listItems$ | async\"\n itemValueKey=\"contentKey\"\n [label]=\"'dossierManagement.tabManagement.contentLabels.' + tabType | translate\"\n (search)=\"onSearch($event)\"\n (selected)=\"onSelected($event)\"\n >\n <cds-dropdown-list></cds-dropdown-list>\n </cds-combo-box>\n</form>\n", styles: ["::ng-deep .valtimo-tab-form-modal{display:flex;flex-direction:column;gap:32px}::ng-deep .valtimo-tab-form-modal .cds--list-box__field{background-color:#fff}::ng-deep .valtimo-tab-form-modal .cds--modal-container,::ng-deep .valtimo-tab-form-modal .cds--modal-content{overflow:unset}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i9.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i9.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i9.ComboBox, selector: "cds-combo-box, ibm-combo-box", inputs: ["placeholder", "openMenuAria", "closeMenuAria", "clearSelectionsTitle", "clearSelectionsAria", "clearSelectionTitle", "clearSelectionAria", "id", "items", "type", "size", "itemValueKey", "label", "helperText", "appendInline", "invalid", "invalidText", "warn", "warnText", "maxLength", "theme", "selectionFeedback", "autocomplete", "dropUp", "disabled"], outputs: ["selected", "submit", "close", "search", "clear"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1560
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TabFormComponent, selector: "valtimo-tab-form", inputs: { tabType: "tabType" }, 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<form *ngIf=\"form\" [formGroup]=\"form\" class=\"valtimo-tab-form-modal\">\n <cds-label>\n {{ 'dossierManagement.tabManagement.addModal.tabNameLabel' | translate }}\n\n <input cdsText formControlName=\"name\" [attr.modal-primary-focus]=\"true\" />\n </cds-label>\n\n <cds-label\n [invalid]=\"!!this.form.get('key').errors?.uniqueKey\"\n [invalidText]=\"'dossierManagement.tabManagement.addModal.uniqueKeyError' | translate\"\n >\n {{ 'dossierManagement.tabManagement.addModal.tabKeyLabel' | translate }}\n\n <input\n cdsText\n formControlName=\"key\"\n [invalid]=\"!!this.form.get('key').errors?.uniqueKey\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n\n <cds-combo-box\n [dropUp]=\"false\"\n formControlName=\"contentKey\"\n [items]=\"listItems$ | async\"\n itemValueKey=\"contentKey\"\n [label]=\"'dossierManagement.tabManagement.contentLabels.' + tabType | translate\"\n (search)=\"onSearch($event)\"\n (selected)=\"onSelected($event)\"\n >\n <cds-dropdown-list></cds-dropdown-list>\n </cds-combo-box>\n</form>\n", styles: ["::ng-deep .valtimo-tab-form-modal{display:flex;flex-direction:column;gap:32px}::ng-deep .valtimo-tab-form-modal .cds--list-box__field{background-color:#fff}::ng-deep .valtimo-tab-form-modal .cds--modal-container,::ng-deep .valtimo-tab-form-modal .cds--modal-content{overflow:unset}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i4.ComboBox, selector: "cds-combo-box, ibm-combo-box", inputs: ["placeholder", "openMenuAria", "closeMenuAria", "clearSelectionsTitle", "clearSelectionsAria", "clearSelectionTitle", "clearSelectionAria", "id", "items", "type", "size", "itemValueKey", "label", "helperText", "appendInline", "invalid", "invalidText", "warn", "warnText", "maxLength", "theme", "selectionFeedback", "autocomplete", "dropUp", "disabled"], outputs: ["selected", "submit", "close", "search", "clear"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1522
1561
  }
1523
1562
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabFormComponent, decorators: [{
1524
1563
  type: Component,
@@ -1604,13 +1643,13 @@ class DossierManagementAddTabModalComponent {
1604
1643
  ? null
1605
1644
  : { uniqueKey: { value: control.value } };
1606
1645
  }
1607
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementAddTabModalComponent, deps: [{ token: i2$1.FormBuilder }, { token: i9.IconService }, { token: TabService }], target: i0.ɵɵFactoryTarget.Component }); }
1608
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementAddTabModalComponent, selector: "valtimo-dossier-management-add-tab-modal", inputs: { documentDefinitionName: "documentDefinitionName", open: "open" }, outputs: { closeModalEvent: "closeModalEvent" }, 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<cds-modal *ngIf=\"{selectedTabType: selectedTabType$ | async} as obs\" [open]=\"open\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onCloseModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n !obs.selectedTabType\n ? ('dossierManagement.tabManagement.addModal.title'\n | translate: {documentDefinitionName: (documentDefinitionName | titlecase)})\n : ('dossierManagement.tabManagement.titles.' + obs.selectedTabType | translate)\n }}\n </h3>\n </cds-modal-header>\n\n <section [formGroup]=\"form\" cdsModalContent class=\"valtimo-add-tab-modal__content\">\n <valtimo-tab-form\n *ngIf=\"obs.selectedTabType; else tabTypeSelection\"\n [tabType]=\"obs.selectedTabType\"\n ></valtimo-tab-form>\n\n <ng-template #tabTypeSelection>\n <span> {{ 'dossierManagement.tabManagement.addModal.description' | translate }} </span>\n\n <div *ngIf=\"tabTypes$ | async as tabTypes\" class=\"valtimo-add-tab-modal__types\">\n <button\n *ngFor=\"let tabType of tabTypes\"\n cdsButton=\"secondary\"\n [disabled]=\"tabType.disabled\"\n (click)=\"onTabTypeSelect(tabType.type)\"\n >\n {{ tabType.title | translate }}\n\n <svg [cdsIcon]=\"tabType.icon\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n </ng-template>\n </section>\n\n <cds-modal-footer class=\"valtimo-add-tab-modal__footer\">\n <button class=\"valtimo-add-tab-modal__cancel\" cdsButton=\"ghost\" (click)=\"onCloseModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <div class=\"valtimo-add-tab-modal__actions\" *ngIf=\"obs.selectedTabType\">\n <button cdsButton=\"secondary\" (click)=\"backClick()\">\n {{ 'interface.back' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"form.invalid\" (click)=\"addTab(obs.selectedTabType)\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n </button>\n </div>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-add-tab-modal__footer .cds--modal-footer{justify-content:unset;display:grid;grid-template-columns:1fr 1fr 2fr;grid-template-areas:\"cancel . actions\"}.valtimo-add-tab-modal__cancel{grid-area:cancel;width:100%}.valtimo-add-tab-modal__actions{grid-area:actions;display:flex}.valtimo-add-tab-modal__types{display:grid;grid-template:1fr/repeat(3,1fr);gap:16px}.valtimo-add-tab-modal__types button{width:100%}.valtimo-add-tab-modal__content{display:flex;flex-direction:column;gap:24px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i9.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i9.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: TabFormComponent, selector: "valtimo-tab-form", inputs: ["tabType"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1646
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementAddTabModalComponent, deps: [{ token: i2$1.FormBuilder }, { token: i4.IconService }, { token: TabService }], target: i0.ɵɵFactoryTarget.Component }); }
1647
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementAddTabModalComponent, selector: "valtimo-dossier-management-add-tab-modal", inputs: { documentDefinitionName: "documentDefinitionName", open: "open" }, outputs: { closeModalEvent: "closeModalEvent" }, 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<cds-modal *ngIf=\"{selectedTabType: selectedTabType$ | async} as obs\" [open]=\"open\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onCloseModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n !obs.selectedTabType\n ? ('dossierManagement.tabManagement.addModal.title'\n | translate: {documentDefinitionName: (documentDefinitionName | titlecase)})\n : ('dossierManagement.tabManagement.titles.' + obs.selectedTabType | translate)\n }}\n </h3>\n </cds-modal-header>\n\n <section [formGroup]=\"form\" cdsModalContent class=\"valtimo-add-tab-modal__content\">\n <valtimo-tab-form\n *ngIf=\"obs.selectedTabType; else tabTypeSelection\"\n [tabType]=\"obs.selectedTabType\"\n ></valtimo-tab-form>\n\n <ng-template #tabTypeSelection>\n <span> {{ 'dossierManagement.tabManagement.addModal.description' | translate }} </span>\n\n <div *ngIf=\"tabTypes$ | async as tabTypes\" class=\"valtimo-add-tab-modal__types\">\n <button\n *ngFor=\"let tabType of tabTypes\"\n cdsButton=\"secondary\"\n [disabled]=\"tabType.disabled\"\n (click)=\"onTabTypeSelect(tabType.type)\"\n >\n {{ tabType.title | translate }}\n\n <svg [cdsIcon]=\"tabType.icon\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n </ng-template>\n </section>\n\n <cds-modal-footer class=\"valtimo-add-tab-modal__footer\">\n <button class=\"valtimo-add-tab-modal__cancel\" cdsButton=\"ghost\" (click)=\"onCloseModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <div class=\"valtimo-add-tab-modal__actions\" *ngIf=\"obs.selectedTabType\">\n <button cdsButton=\"secondary\" (click)=\"backClick()\">\n {{ 'interface.back' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"form.invalid\" (click)=\"addTab(obs.selectedTabType)\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n </button>\n </div>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-add-tab-modal__footer .cds--modal-footer{justify-content:unset;display:grid;grid-template-columns:1fr 1fr 2fr;grid-template-areas:\"cancel . actions\"}.valtimo-add-tab-modal__cancel{grid-area:cancel;width:100%}.valtimo-add-tab-modal__actions{grid-area:actions;display:flex}.valtimo-add-tab-modal__types{display:grid;grid-template:1fr/repeat(3,1fr);gap:16px}.valtimo-add-tab-modal__types button{width:100%}.valtimo-add-tab-modal__content{display:flex;flex-direction:column;gap:24px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: TabFormComponent, selector: "valtimo-tab-form", inputs: ["tabType"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1609
1648
  }
1610
1649
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementAddTabModalComponent, decorators: [{
1611
1650
  type: Component,
1612
1651
  args: [{ selector: 'valtimo-dossier-management-add-tab-modal', changeDetection: ChangeDetectionStrategy.OnPush, 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<cds-modal *ngIf=\"{selectedTabType: selectedTabType$ | async} as obs\" [open]=\"open\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onCloseModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n !obs.selectedTabType\n ? ('dossierManagement.tabManagement.addModal.title'\n | translate: {documentDefinitionName: (documentDefinitionName | titlecase)})\n : ('dossierManagement.tabManagement.titles.' + obs.selectedTabType | translate)\n }}\n </h3>\n </cds-modal-header>\n\n <section [formGroup]=\"form\" cdsModalContent class=\"valtimo-add-tab-modal__content\">\n <valtimo-tab-form\n *ngIf=\"obs.selectedTabType; else tabTypeSelection\"\n [tabType]=\"obs.selectedTabType\"\n ></valtimo-tab-form>\n\n <ng-template #tabTypeSelection>\n <span> {{ 'dossierManagement.tabManagement.addModal.description' | translate }} </span>\n\n <div *ngIf=\"tabTypes$ | async as tabTypes\" class=\"valtimo-add-tab-modal__types\">\n <button\n *ngFor=\"let tabType of tabTypes\"\n cdsButton=\"secondary\"\n [disabled]=\"tabType.disabled\"\n (click)=\"onTabTypeSelect(tabType.type)\"\n >\n {{ tabType.title | translate }}\n\n <svg [cdsIcon]=\"tabType.icon\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n </ng-template>\n </section>\n\n <cds-modal-footer class=\"valtimo-add-tab-modal__footer\">\n <button class=\"valtimo-add-tab-modal__cancel\" cdsButton=\"ghost\" (click)=\"onCloseModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <div class=\"valtimo-add-tab-modal__actions\" *ngIf=\"obs.selectedTabType\">\n <button cdsButton=\"secondary\" (click)=\"backClick()\">\n {{ 'interface.back' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"form.invalid\" (click)=\"addTab(obs.selectedTabType)\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n </button>\n </div>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-add-tab-modal__footer .cds--modal-footer{justify-content:unset;display:grid;grid-template-columns:1fr 1fr 2fr;grid-template-areas:\"cancel . actions\"}.valtimo-add-tab-modal__cancel{grid-area:cancel;width:100%}.valtimo-add-tab-modal__actions{grid-area:actions;display:flex}.valtimo-add-tab-modal__types{display:grid;grid-template:1fr/repeat(3,1fr);gap:16px}.valtimo-add-tab-modal__types button{width:100%}.valtimo-add-tab-modal__content{display:flex;flex-direction:column;gap:24px}\n"] }]
1613
- }], ctorParameters: function () { return [{ type: i2$1.FormBuilder }, { type: i9.IconService }, { type: TabService }]; }, propDecorators: { documentDefinitionName: [{
1652
+ }], ctorParameters: function () { return [{ type: i2$1.FormBuilder }, { type: i4.IconService }, { type: TabService }]; }, propDecorators: { documentDefinitionName: [{
1614
1653
  type: Input
1615
1654
  }], open: [{
1616
1655
  type: Input
@@ -1667,7 +1706,7 @@ class DossierManagementEditTabModalComponent {
1667
1706
  this.closeModalEvent.emit({ ...this.tab, name, contentKey });
1668
1707
  }
1669
1708
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementEditTabModalComponent, deps: [{ token: i2$1.FormBuilder }, { token: TabService }], target: i0.ɵɵFactoryTarget.Component }); }
1670
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementEditTabModalComponent, selector: "valtimo-dossier-management-edit-tab-modal", inputs: { open: "open", tab: "tab" }, outputs: { closeModalEvent: "closeModalEvent" }, 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<cds-modal *ngIf=\"form\" [open]=\"open\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onCloseModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n 'dossierManagement.tabManagement.editModal.title'\n | translate: {name: tab?.name ?? 'dossier.tabs.' + tab.key | translate}\n }}\n </h3>\n </cds-modal-header>\n\n <section [formGroup]=\"form\" cdsModalContent>\n <valtimo-tab-form\n [configuredContentKeys]=\"configuredKeysForEdit\"\n [tabType]=\"tab?.type\"\n ></valtimo-tab-form>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"onCloseModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"form.invalid\" (click)=\"editTab()\">\n {{ 'dossierManagement.tabManagement.editModal.updateTab' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i9.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i9.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i9.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i9.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i9.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i9.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: TabFormComponent, selector: "valtimo-tab-form", inputs: ["tabType"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1709
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementEditTabModalComponent, selector: "valtimo-dossier-management-edit-tab-modal", inputs: { open: "open", tab: "tab" }, outputs: { closeModalEvent: "closeModalEvent" }, 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<cds-modal *ngIf=\"form\" [open]=\"open\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onCloseModal()\">\n <h3 cdsModalHeaderHeading>\n {{\n 'dossierManagement.tabManagement.editModal.title'\n | translate: {name: tab?.name ?? 'dossier.tabs.' + tab.key | translate}\n }}\n </h3>\n </cds-modal-header>\n\n <section [formGroup]=\"form\" cdsModalContent>\n <valtimo-tab-form\n [configuredContentKeys]=\"configuredKeysForEdit\"\n [tabType]=\"tab?.type\"\n ></valtimo-tab-form>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"onCloseModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"form.invalid\" (click)=\"editTab()\">\n {{ 'dossierManagement.tabManagement.editModal.updateTab' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: TabFormComponent, selector: "valtimo-tab-form", inputs: ["tabType"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1671
1710
  }
1672
1711
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementEditTabModalComponent, decorators: [{
1673
1712
  type: Component,
@@ -1695,156 +1734,469 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1695
1734
  * See the License for the specific language governing permissions and
1696
1735
  * limitations under the License.
1697
1736
  */
1698
- class DossierManagementTabsComponent {
1699
- set documentDefinitionName(value) {
1700
- if (!value) {
1701
- return;
1702
- }
1703
- this._documentDefinitionName = value;
1704
- this.tabManagementService.setCaseDefinitionId(value);
1705
- this.tabManagementService.loadTabs();
1706
- }
1707
- get documentDefinitionName() {
1708
- return this._documentDefinitionName;
1709
- }
1710
- constructor(cd, iconService, tabManagementService, tabService, translateService) {
1711
- this.cd = cd;
1737
+ class DossierManagementTabsComponent {
1738
+ set documentDefinitionName(value) {
1739
+ if (!value) {
1740
+ return;
1741
+ }
1742
+ this._documentDefinitionName = value;
1743
+ this.tabManagementService.setCaseDefinitionId(value);
1744
+ this.tabManagementService.loadTabs();
1745
+ }
1746
+ get documentDefinitionName() {
1747
+ return this._documentDefinitionName;
1748
+ }
1749
+ constructor(cd, iconService, tabManagementService, tabService, translateService) {
1750
+ this.cd = cd;
1751
+ this.iconService = iconService;
1752
+ this.tabManagementService = tabManagementService;
1753
+ this.tabService = tabService;
1754
+ this.translateService = translateService;
1755
+ this.actionItems = [
1756
+ {
1757
+ label: 'interface.delete',
1758
+ callback: this.openDeleteConfirmationModal.bind(this),
1759
+ type: 'danger',
1760
+ },
1761
+ ];
1762
+ this.deleteRowKey$ = new BehaviorSubject(null);
1763
+ this.showDeleteModal$ = this.deleteRowKey$.pipe(map((key) => !!key));
1764
+ this.openEditModal$ = new BehaviorSubject(false);
1765
+ this.fields$ = new BehaviorSubject([]);
1766
+ this.loading$ = this.tabManagementService.loading$;
1767
+ this.openAddModal$ = new BehaviorSubject(false);
1768
+ this.lastItemIndex$ = new BehaviorSubject(-1);
1769
+ this.tabs$ = this.tabManagementService.tabs$.pipe(tap$1((tabs) => {
1770
+ this._tabs = tabs;
1771
+ this.tabService.configuredContentKeys = tabs.map((tab) => tab.contentKey);
1772
+ this.tabService.configuredTabKeys = tabs.map((tab) => tab.key);
1773
+ this.lastItemIndex$.next(tabs.length - 1);
1774
+ }));
1775
+ this.tab$ = new BehaviorSubject(null);
1776
+ }
1777
+ ngAfterViewInit() {
1778
+ this.iconService.registerAll([ArrowDown16, ArrowUp16]);
1779
+ this.fields$.next([
1780
+ {
1781
+ key: 'name',
1782
+ label: 'dossierManagement.tabManagement.columns.name',
1783
+ viewType: ViewType.TEXT,
1784
+ },
1785
+ {
1786
+ key: 'key',
1787
+ label: 'dossierManagement.tabManagement.columns.key',
1788
+ viewType: ViewType.TEXT,
1789
+ },
1790
+ {
1791
+ viewType: ViewType.TEMPLATE,
1792
+ template: this.tabTypeColumnTemplate,
1793
+ key: '',
1794
+ label: 'dossierManagement.tabManagement.columns.type',
1795
+ },
1796
+ {
1797
+ viewType: ViewType.TEMPLATE,
1798
+ template: this.tabContentColumnTemplate,
1799
+ key: '',
1800
+ label: 'dossierManagement.tabManagement.columns.content',
1801
+ },
1802
+ ]);
1803
+ this.cd.detectChanges();
1804
+ }
1805
+ isTranslated(key) {
1806
+ return this.translateService.instant(key) !== key;
1807
+ }
1808
+ onMoveRowClick(event) {
1809
+ const { direction, index } = event;
1810
+ const orderedTabs = direction === MoveRowDirection.UP
1811
+ ? this.swapTabs(this._tabs, index - 1, index)
1812
+ : this.swapTabs(this._tabs, index, index + 1);
1813
+ this.tabManagementService.dispatchAction(this.tabManagementService.editTabsOrder(orderedTabs));
1814
+ }
1815
+ openAddTabModal() {
1816
+ this.openAddModal$.next(true);
1817
+ }
1818
+ onRowClicked(tab) {
1819
+ this.tab$.next(tab);
1820
+ this.openEditModal$.next(true);
1821
+ }
1822
+ onCloseAddModalEvent(tab) {
1823
+ this.openAddModal$.next(false);
1824
+ if (!tab) {
1825
+ return;
1826
+ }
1827
+ this.addTab(tab);
1828
+ }
1829
+ onCloseEditModalEvent(tab) {
1830
+ this.openEditModal$.next(false);
1831
+ this.tab$.next(null);
1832
+ if (!tab) {
1833
+ return;
1834
+ }
1835
+ this.editTab(tab);
1836
+ }
1837
+ openDeleteConfirmationModal(tab) {
1838
+ this.deleteRowKey$.next(tab.key);
1839
+ }
1840
+ onConfirmEvent(tabKey) {
1841
+ this.deleteTab(tabKey);
1842
+ }
1843
+ addTab(tab) {
1844
+ this.tabManagementService.dispatchAction(this.tabManagementService.addTab(tab));
1845
+ }
1846
+ deleteTab(tabKey) {
1847
+ this.tabManagementService.dispatchAction(this.tabManagementService.deleteTab(tabKey));
1848
+ }
1849
+ editTab(tab) {
1850
+ this.tabManagementService.dispatchAction(this.tabManagementService.editTab(tab, tab.key));
1851
+ }
1852
+ swapTabs(tabItems, index1, index2) {
1853
+ const temp = [...tabItems];
1854
+ temp[index1] = temp.splice(index2, 1, temp[index1])[0];
1855
+ return temp;
1856
+ }
1857
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementTabsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i4.IconService }, { token: TabManagementService }, { token: TabService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1858
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementTabsComponent, selector: "valtimo-dossier-management-tabs", inputs: { documentDefinitionName: "documentDefinitionName" }, viewQueries: [{ propertyName: "tabContentColumnTemplate", first: true, predicate: ["tabContentColumn"], descendants: true }, { propertyName: "tabTypeColumnTemplate", first: true, predicate: ["tabTypeColumn"], descendants: true }, { propertyName: "moveButtonsTemplate", first: true, predicate: ["moveButtonsTemplate"], 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-carbon-list\n *ngIf=\"{fields: fields$ | async, loading: loading$ | async, tabs: tabs$ | async} as obs\"\n [actionItems]=\"actionItems\"\n [items]=\"obs.tabs\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [loading]=\"obs.loading\"\n [movingRowsEnabled]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n (moveRow)=\"onMoveRowClick($event)\"\n>\n <ng-container carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTabButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTabButton\"\n [description]=\"'dossier.tabs.noResultsDescription' | translate\"\n [title]=\"'dossier.tabs.noResults' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #tabTypeColumn let-data=\"data\">\n {{\n isTranslated('dossierManagement.tabType.' + data.item.type)\n ? ('dossierManagement.tabType.' + data.item.type | translate)\n : data.item.type\n }}\n</ng-template>\n\n<ng-template #tabContentColumn let-data=\"data\">\n {{\n isTranslated('dossier.tabs.' + data.item.contentKey)\n ? ('dossier.tabs.' + data.item.contentKey | translate)\n : data.item.contentKey\n }}\n</ng-template>\n\n<ng-template #addTabButton>\n <button cdsButton=\"primary\" (click)=\"openAddTabModal()\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n</ng-template>\n\n<valtimo-dossier-management-add-tab-modal\n *ngIf=\"openAddModal$ | async\"\n [documentDefinitionName]=\"documentDefinitionName\"\n [open]=\"openAddModal$ | async\"\n (closeModalEvent)=\"onCloseAddModalEvent($event)\"\n></valtimo-dossier-management-add-tab-modal>\n\n<valtimo-dossier-management-edit-tab-modal\n *ngIf=\"openEditModal$ | async\"\n [tab]=\"tab$ | async\"\n (closeModalEvent)=\"onCloseEditModalEvent($event)\"\n [open]=\"openEditModal$ | async\"\n></valtimo-dossier-management-edit-tab-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"dossierManagement.tabManagement.deleteModal.description\"\n [outputOnConfirm]=\"deleteRowKey$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dossierManagement.tabManagement.deleteModal.title\"\n (confirmEvent)=\"onConfirmEvent($event)\"\n></valtimo-confirmation-modal>\n", styles: [".valtimo-dossier-management-tabs__actions{width:1px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i7.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent", "cancelEvent"] }, { kind: "component", type: i7.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: i7.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "component", type: DossierManagementAddTabModalComponent, selector: "valtimo-dossier-management-add-tab-modal", inputs: ["documentDefinitionName", "open"], outputs: ["closeModalEvent"] }, { kind: "component", type: DossierManagementEditTabModalComponent, selector: "valtimo-dossier-management-edit-tab-modal", inputs: ["open", "tab"], outputs: ["closeModalEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1859
+ }
1860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementTabsComponent, decorators: [{
1861
+ type: Component,
1862
+ args: [{ selector: 'valtimo-dossier-management-tabs', changeDetection: ChangeDetectionStrategy.OnPush, 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-carbon-list\n *ngIf=\"{fields: fields$ | async, loading: loading$ | async, tabs: tabs$ | async} as obs\"\n [actionItems]=\"actionItems\"\n [items]=\"obs.tabs\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [loading]=\"obs.loading\"\n [movingRowsEnabled]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n (moveRow)=\"onMoveRowClick($event)\"\n>\n <ng-container carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTabButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTabButton\"\n [description]=\"'dossier.tabs.noResultsDescription' | translate\"\n [title]=\"'dossier.tabs.noResults' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #tabTypeColumn let-data=\"data\">\n {{\n isTranslated('dossierManagement.tabType.' + data.item.type)\n ? ('dossierManagement.tabType.' + data.item.type | translate)\n : data.item.type\n }}\n</ng-template>\n\n<ng-template #tabContentColumn let-data=\"data\">\n {{\n isTranslated('dossier.tabs.' + data.item.contentKey)\n ? ('dossier.tabs.' + data.item.contentKey | translate)\n : data.item.contentKey\n }}\n</ng-template>\n\n<ng-template #addTabButton>\n <button cdsButton=\"primary\" (click)=\"openAddTabModal()\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n</ng-template>\n\n<valtimo-dossier-management-add-tab-modal\n *ngIf=\"openAddModal$ | async\"\n [documentDefinitionName]=\"documentDefinitionName\"\n [open]=\"openAddModal$ | async\"\n (closeModalEvent)=\"onCloseAddModalEvent($event)\"\n></valtimo-dossier-management-add-tab-modal>\n\n<valtimo-dossier-management-edit-tab-modal\n *ngIf=\"openEditModal$ | async\"\n [tab]=\"tab$ | async\"\n (closeModalEvent)=\"onCloseEditModalEvent($event)\"\n [open]=\"openEditModal$ | async\"\n></valtimo-dossier-management-edit-tab-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"dossierManagement.tabManagement.deleteModal.description\"\n [outputOnConfirm]=\"deleteRowKey$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dossierManagement.tabManagement.deleteModal.title\"\n (confirmEvent)=\"onConfirmEvent($event)\"\n></valtimo-confirmation-modal>\n", styles: [".valtimo-dossier-management-tabs__actions{width:1px}\n"] }]
1863
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i4.IconService }, { type: TabManagementService }, { type: TabService }, { type: i3.TranslateService }]; }, propDecorators: { tabContentColumnTemplate: [{
1864
+ type: ViewChild,
1865
+ args: ['tabContentColumn']
1866
+ }], tabTypeColumnTemplate: [{
1867
+ type: ViewChild,
1868
+ args: ['tabTypeColumn']
1869
+ }], moveButtonsTemplate: [{
1870
+ type: ViewChild,
1871
+ args: ['moveButtonsTemplate']
1872
+ }], documentDefinitionName: [{
1873
+ type: Input
1874
+ }] } });
1875
+
1876
+ /*
1877
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
1878
+ *
1879
+ * Licensed under EUPL, Version 1.2 (the "License");
1880
+ * you may not use this file except in compliance with the License.
1881
+ * You may obtain a copy of the License at
1882
+ *
1883
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1884
+ *
1885
+ * Unless required by applicable law or agreed to in writing, software
1886
+ * distributed under the License is distributed on an "AS IS" basis,
1887
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1888
+ * See the License for the specific language governing permissions and
1889
+ * limitations under the License.
1890
+ */
1891
+ class DossierManagementRemoveModalComponent {
1892
+ constructor(documentService, toasterService, router, translateService, menuService) {
1893
+ this.documentService = documentService;
1894
+ this.toasterService = toasterService;
1895
+ this.router = router;
1896
+ this.translateService = translateService;
1897
+ this.menuService = menuService;
1898
+ this.documentDefinition = null;
1899
+ this.errors = [];
1900
+ }
1901
+ openModal(documentDefinition) {
1902
+ this.documentDefinition = documentDefinition;
1903
+ this.modal.show();
1904
+ }
1905
+ removeDocumentDefinition() {
1906
+ this.documentService
1907
+ .removeDocumentDefinitionForManagement(this.documentDefinition.id.name)
1908
+ .subscribe(() => {
1909
+ this.menuService.reload();
1910
+ this.router.navigate(['/dossier-management']);
1911
+ this.toasterService.success(this.translateService.instant('remove-document-definition-success'));
1912
+ }, (result) => {
1913
+ this.errors = result.errors;
1914
+ });
1915
+ }
1916
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementRemoveModalComponent, deps: [{ token: i1.DocumentService }, { token: i2$2.ToastrService }, { token: i2.Router }, { token: i3.TranslateService }, { token: i7.MenuService }], target: i0.ɵɵFactoryTarget.Component }); }
1917
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementRemoveModalComponent, selector: "valtimo-dossier-management-remove-modal", viewQueries: [{ propertyName: "modal", first: true, predicate: ["documentDefinitionRemoveModal"], 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 #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1918
+ }
1919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementRemoveModalComponent, decorators: [{
1920
+ type: Component,
1921
+ args: [{ selector: 'valtimo-dossier-management-remove-modal', 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 #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\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 */\n"] }]
1922
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2$2.ToastrService }, { type: i2.Router }, { type: i3.TranslateService }, { type: i7.MenuService }]; }, propDecorators: { modal: [{
1923
+ type: ViewChild,
1924
+ args: ['documentDefinitionRemoveModal']
1925
+ }] } });
1926
+
1927
+ /*
1928
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
1929
+ *
1930
+ * Licensed under EUPL, Version 1.2 (the "License");
1931
+ * you may not use this file except in compliance with the License.
1932
+ * You may obtain a copy of the License at
1933
+ *
1934
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1935
+ *
1936
+ * Unless required by applicable law or agreed to in writing, software
1937
+ * distributed under the License is distributed on an "AS IS" basis,
1938
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1939
+ * See the License for the specific language governing permissions and
1940
+ * limitations under the License.
1941
+ */
1942
+ class DossierManagementDetailContainerActionsComponent {
1943
+ set documentDefinitionName(value) {
1944
+ this.dossierDetailService.setSelectedDocumentDefinitionName(value);
1945
+ }
1946
+ constructor(document, notificationService, dossierExportService, translateService, documentService, dossierDetailService) {
1947
+ this.document = document;
1948
+ this.notificationService = notificationService;
1949
+ this.dossierExportService = dossierExportService;
1950
+ this.translateService = translateService;
1951
+ this.documentService = documentService;
1952
+ this.dossierDetailService = dossierDetailService;
1953
+ this.documentDefinitionTitle = '';
1954
+ this.CARBON_THEME = 'g10';
1955
+ this.exporting$ = new BehaviorSubject(false);
1956
+ this.selectedVersionNumber$ = this.dossierDetailService.selectedVersionNumber$;
1957
+ this._documentDefinitionName$ = this.dossierDetailService.selectedDocumentDefinitionName$;
1958
+ this.loadingVersion$ = new BehaviorSubject(true);
1959
+ this._documentDefinitionVersions$ = this._documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getDocumentDefinitionVersions(documentDefinitionName)), tap$1(res => {
1960
+ this.dossierDetailService.setSelectedVersionNumber(this.findLargestInArray(res.versions));
1961
+ this.loadingVersion$.next(false);
1962
+ }));
1963
+ this.versionListItems$ = combineLatest([
1964
+ this._documentDefinitionVersions$,
1965
+ this.selectedVersionNumber$,
1966
+ this.translateService.stream('key'),
1967
+ ]).pipe(map(([versionsRes, selectVersionNumber]) => versionsRes?.versions?.map(version => ({
1968
+ content: `${this.translateService.instant('dossierManagement.version')}${version}`,
1969
+ selected: selectVersionNumber === version,
1970
+ id: `${version}`,
1971
+ })) || []));
1972
+ this.selectedDocumentDefinition$ = this.dossierDetailService.documentDefinition$;
1973
+ this.selectedDocumentDefinitionIsReadOnly$ = this.dossierDetailService.selectedDocumentDefinitionIsReadOnly$;
1974
+ }
1975
+ export() {
1976
+ this.closeCurrentNotification();
1977
+ this._currentNotification = this.notificationService.showNotification({
1978
+ type: 'info',
1979
+ title: '',
1980
+ showClose: false,
1981
+ template: this._exportMessageTemplateRef,
1982
+ });
1983
+ let selectedVersionNumber;
1984
+ this.startExporting();
1985
+ combineLatest([this.selectedVersionNumber$, this._documentDefinitionName$])
1986
+ .pipe(take$1(1), tap$1(([selectedVersion]) => (selectedVersionNumber = selectedVersion)), switchMap(([selectedVersion, documentDefinitionName]) => this.dossierExportService.exportDocumentDefinition(documentDefinitionName, selectedVersion)))
1987
+ .subscribe({
1988
+ next: response => {
1989
+ this.closeCurrentNotification();
1990
+ this._currentNotification = this.notificationService.showNotification({
1991
+ type: 'success',
1992
+ title: this.translateService.instant('dossierManagement.exportSuccessTitle'),
1993
+ duration: 5000,
1994
+ });
1995
+ this.downloadZip(response, selectedVersionNumber);
1996
+ this.stopExporting();
1997
+ },
1998
+ error: () => {
1999
+ this.closeCurrentNotification();
2000
+ this._currentNotification = this.notificationService.showNotification({
2001
+ type: 'error',
2002
+ title: this.translateService.instant('dossierManagement.exportErrorTitle'),
2003
+ message: this.translateService.instant('dossierManagement.exportErrorMessage'),
2004
+ duration: 5000,
2005
+ });
2006
+ this.stopExporting();
2007
+ },
2008
+ });
2009
+ }
2010
+ setVersion(version) {
2011
+ this.dossierDetailService.setSelectedVersionNumber(Number(version.item.id));
2012
+ }
2013
+ openDossierRemoveModal() {
2014
+ this.selectedDocumentDefinition$.pipe(take$1(1)).subscribe(definition => {
2015
+ this._dossierRemoveModal.openModal(definition);
2016
+ });
2017
+ }
2018
+ startExporting() {
2019
+ this.exporting$.next(true);
2020
+ }
2021
+ stopExporting() {
2022
+ this.exporting$.next(false);
2023
+ }
2024
+ downloadZip(response, versionNumber) {
2025
+ const link = document.createElement('a');
2026
+ const contentDisposition = response.headers.get('content-disposition');
2027
+ const splitContentDisposition = contentDisposition.split('filename=');
2028
+ const fileName = splitContentDisposition.length > 1 && splitContentDisposition[1];
2029
+ link.href = this.document.defaultView.URL.createObjectURL(response.body);
2030
+ link.download = fileName || `${this.documentDefinitionName}_${versionNumber}.valtimo.zip`;
2031
+ link.target = '_blank';
2032
+ link.click();
2033
+ link.remove();
2034
+ }
2035
+ closeCurrentNotification() {
2036
+ if (this._currentNotification) {
2037
+ this.notificationService.close(this._currentNotification);
2038
+ }
2039
+ }
2040
+ findLargestInArray(array) {
2041
+ return array.reduce(function (a, b) {
2042
+ return a > b ? a : b;
2043
+ });
2044
+ }
2045
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailContainerActionsComponent, deps: [{ token: DOCUMENT }, { token: i4.NotificationService }, { token: DossierExportService }, { token: i3.TranslateService }, { token: i1.DocumentService }, { token: DossierDetailService }], target: i0.ɵɵFactoryTarget.Component }); }
2046
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementDetailContainerActionsComponent, selector: "valtimo-dossier-management-detail-container-actions", inputs: { documentDefinitionTitle: "documentDefinitionTitle", documentDefinitionName: "documentDefinitionName" }, providers: [NotificationService], viewQueries: [{ propertyName: "_exportMessageTemplateRef", first: true, predicate: ["exportingMessage"], descendants: true }, { propertyName: "_dossierRemoveModal", first: true, predicate: ["dossierRemoveModal"], 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=\"dossier-actions\"\n *ngIf=\"{\n exporting: exporting$ | async,\n loadingVersion: loadingVersion$ | async,\n versionListItems: versionListItems$ | async,\n selectedDocumentDefinition: selectedDocumentDefinition$ | async,\n selectedDocumentDefinitionIsReadOnly: selectedDocumentDefinitionIsReadOnly$ | async\n } as obs\"\n>\n <div class=\"dossier-metadata\">\n <ng-container *ngTemplateOutlet=\"versionSelection;context:{obs:obs}\"></ng-container>\n\n <ng-container *ngTemplateOutlet=\"readOnly;context:{obs:obs}\"></ng-container>\n </div>\n\n <ng-container *ngTemplateOutlet=\"exportMenu;context:{obs:obs}\"></ng-container>\n</div>\n\n<ng-template #versionSelection let-obs=\"obs\">\n <cds-dropdown\n class=\"version-selection\"\n [disabled]=\"obs.loadingVersion || obs.versionListItems.length === 1\"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n [skeleton]=\"obs.loadingVersion\"\n (selected)=\"setVersion($event)\"\n >\n <cds-dropdown-list [items]=\"obs.versionListItems\"></cds-dropdown-list>\n </cds-dropdown>\n</ng-template>\n\n<ng-template #exportMenu let-obs=\"obs\">\n <cds-overflow-menu\n valtimoCdsOverflowButton\n [width]=\"250\"\n [customTrigger]=\"customTrigger\"\n [offset]=\"{y: 48, x: 37}\"\n class=\"overflow-button\"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >\n <cds-overflow-menu-option\n [disabled]=\"obs.exporting || obs.loadingVersion\"\n (selected)=\"export() \"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >{{ 'dossierManagement.export' | translate: {value: documentDefinitionTitle}\n }}</cds-overflow-menu-option\n >\n\n <cds-overflow-menu-option\n *ngIf=\"obs.selectedDocumentDefinition && !obs.selectedDocumentDefinition.readOnly\"\n [disabled]=\"obs.exporting || obs.loadingVersion\"\n (selected)=\"openDossierRemoveModal() \"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >{{ 'Remove document definition' | translate}}</cds-overflow-menu-option\n >\n </cds-overflow-menu>\n</ng-template>\n\n<ng-template #customTrigger>\n <button cdsButton=\"tertiary\" [attr.data-carbon-theme]=\"CARBON_THEME\">\n {{ 'dossierManagement.more' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"overflow-menu--vertical\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #exportingMessage>\n <div class=\"exporting-message\">\n <span class=\"cds--inline-notification__title\"\n >{{'dossierManagement.preparingDownload' | translate}}</span\n >\n\n <cds-loading size=\"sm\"></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #readOnly let-obs=\"obs\">\n <cds-tag *ngIf=\"obs.selectedDocumentDefinitionIsReadOnly\" type=\"blue\"\n >{{'dossierManagement.readonly' | translate}}</cds-tag\n >\n</ng-template>\n\n<valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n></valtimo-dossier-management-remove-modal>\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 */.dossier-actions{display:flex;width:100%;justify-content:space-between;align-items:flex-end}.dossier-actions ::ng-deep .version-selection{width:160px}.dossier-actions ::ng-deep .version-selection .cds--list-box__selection{display:none}.exporting-message{width:100%;display:flex;justify-content:space-between;align-items:center;gap:16px}.dossier-metadata{display:flex;gap:24px;align-items:flex-end}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i4.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: i4.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i4.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i4.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "directive", type: i7.ValtimoCdsOverflowButtonDirective, selector: "[valtimoCdsOverflowButton]", inputs: ["width"] }, { kind: "component", type: i4.Tag, selector: "cds-tag, ibm-tag", inputs: ["type", "size", "class"] }, { kind: "component", type: DossierManagementRemoveModalComponent, selector: "valtimo-dossier-management-remove-modal" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2047
+ }
2048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailContainerActionsComponent, decorators: [{
2049
+ type: Component,
2050
+ args: [{ selector: 'valtimo-dossier-management-detail-container-actions', changeDetection: ChangeDetectionStrategy.OnPush, providers: [NotificationService], 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=\"dossier-actions\"\n *ngIf=\"{\n exporting: exporting$ | async,\n loadingVersion: loadingVersion$ | async,\n versionListItems: versionListItems$ | async,\n selectedDocumentDefinition: selectedDocumentDefinition$ | async,\n selectedDocumentDefinitionIsReadOnly: selectedDocumentDefinitionIsReadOnly$ | async\n } as obs\"\n>\n <div class=\"dossier-metadata\">\n <ng-container *ngTemplateOutlet=\"versionSelection;context:{obs:obs}\"></ng-container>\n\n <ng-container *ngTemplateOutlet=\"readOnly;context:{obs:obs}\"></ng-container>\n </div>\n\n <ng-container *ngTemplateOutlet=\"exportMenu;context:{obs:obs}\"></ng-container>\n</div>\n\n<ng-template #versionSelection let-obs=\"obs\">\n <cds-dropdown\n class=\"version-selection\"\n [disabled]=\"obs.loadingVersion || obs.versionListItems.length === 1\"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n [skeleton]=\"obs.loadingVersion\"\n (selected)=\"setVersion($event)\"\n >\n <cds-dropdown-list [items]=\"obs.versionListItems\"></cds-dropdown-list>\n </cds-dropdown>\n</ng-template>\n\n<ng-template #exportMenu let-obs=\"obs\">\n <cds-overflow-menu\n valtimoCdsOverflowButton\n [width]=\"250\"\n [customTrigger]=\"customTrigger\"\n [offset]=\"{y: 48, x: 37}\"\n class=\"overflow-button\"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >\n <cds-overflow-menu-option\n [disabled]=\"obs.exporting || obs.loadingVersion\"\n (selected)=\"export() \"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >{{ 'dossierManagement.export' | translate: {value: documentDefinitionTitle}\n }}</cds-overflow-menu-option\n >\n\n <cds-overflow-menu-option\n *ngIf=\"obs.selectedDocumentDefinition && !obs.selectedDocumentDefinition.readOnly\"\n [disabled]=\"obs.exporting || obs.loadingVersion\"\n (selected)=\"openDossierRemoveModal() \"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >{{ 'Remove document definition' | translate}}</cds-overflow-menu-option\n >\n </cds-overflow-menu>\n</ng-template>\n\n<ng-template #customTrigger>\n <button cdsButton=\"tertiary\" [attr.data-carbon-theme]=\"CARBON_THEME\">\n {{ 'dossierManagement.more' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"overflow-menu--vertical\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #exportingMessage>\n <div class=\"exporting-message\">\n <span class=\"cds--inline-notification__title\"\n >{{'dossierManagement.preparingDownload' | translate}}</span\n >\n\n <cds-loading size=\"sm\"></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #readOnly let-obs=\"obs\">\n <cds-tag *ngIf=\"obs.selectedDocumentDefinitionIsReadOnly\" type=\"blue\"\n >{{'dossierManagement.readonly' | translate}}</cds-tag\n >\n</ng-template>\n\n<valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n></valtimo-dossier-management-remove-modal>\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 */.dossier-actions{display:flex;width:100%;justify-content:space-between;align-items:flex-end}.dossier-actions ::ng-deep .version-selection{width:160px}.dossier-actions ::ng-deep .version-selection .cds--list-box__selection{display:none}.exporting-message{width:100%;display:flex;justify-content:space-between;align-items:center;gap:16px}.dossier-metadata{display:flex;gap:24px;align-items:flex-end}\n"] }]
2051
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
2052
+ type: Inject,
2053
+ args: [DOCUMENT]
2054
+ }] }, { type: i4.NotificationService }, { type: DossierExportService }, { type: i3.TranslateService }, { type: i1.DocumentService }, { type: DossierDetailService }]; }, propDecorators: { _exportMessageTemplateRef: [{
2055
+ type: ViewChild,
2056
+ args: ['exportingMessage']
2057
+ }], _dossierRemoveModal: [{
2058
+ type: ViewChild,
2059
+ args: ['dossierRemoveModal']
2060
+ }], documentDefinitionTitle: [{
2061
+ type: Input
2062
+ }], documentDefinitionName: [{
2063
+ type: Input
2064
+ }] } });
2065
+
2066
+ /*
2067
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
2068
+ *
2069
+ * Licensed under EUPL, Version 1.2 (the "License");
2070
+ * you may not use this file except in compliance with the License.
2071
+ * You may obtain a copy of the License at
2072
+ *
2073
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2074
+ *
2075
+ * Unless required by applicable law or agreed to in writing, software
2076
+ * distributed under the License is distributed on an "AS IS" basis,
2077
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2078
+ * See the License for the specific language governing permissions and
2079
+ * limitations under the License.
2080
+ */
2081
+ class DossierManagementDocumentDefinitionComponent {
2082
+ constructor(dossierDetailService) {
2083
+ this.dossierDetailService = dossierDetailService;
2084
+ this.loadingDocumentDefinition$ = this.dossierDetailService.loadingDocumentDefinition$;
2085
+ this.documentDefinitionModel$ = this.dossierDetailService.documentDefinitionModel$;
2086
+ this.selectedDocumentDefinition$ = this.dossierDetailService.documentDefinition$;
2087
+ }
2088
+ downloadDefinition() {
2089
+ this.selectedDocumentDefinition$.pipe(take$1(1)).subscribe(definition => {
2090
+ const dataString = 'data:text/json;charset=utf-8,' +
2091
+ encodeURIComponent(JSON.stringify(definition.schema, null, 2));
2092
+ const downloadAnchorElement = document.getElementById('downloadAnchorElement');
2093
+ downloadAnchorElement.setAttribute('href', dataString);
2094
+ downloadAnchorElement.setAttribute('download', `${definition.id.name}-v${definition.id.version}.json`);
2095
+ downloadAnchorElement.click();
2096
+ });
2097
+ }
2098
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDocumentDefinitionComponent, deps: [{ token: DossierDetailService }], target: i0.ɵɵFactoryTarget.Component }); }
2099
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementDocumentDefinitionComponent, selector: "valtimo-dossier-management-document-definition", 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=\"{documentDefinitionModel: documentDefinitionModel$ | async, loadingDocumentDefinition: loadingDocumentDefinition$ | async, selectedDocumentDefinition:selectedDocumentDefinition$ | async} as obs\"\n>\n <div class=\"cds--toolbar-content\">\n <button\n cdsButton=\"primary\"\n (click)=\"downloadDefinition()\"\n [disabled]=\"obs.loadingDocumentDefinition || !obs.selectedDocumentDefinition\"\n >\n <svg cdsIcon=\"download\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'Download document definition'| translate }}\n </button>\n </div>\n\n <valtimo-editor\n *ngIf=\"!obs.loadingDocumentDefinition; else loading\"\n [model]=\"obs.documentDefinitionModel\"\n [disabled]=\"true\"\n heightStyle=\"calc(100vh - 316px)\"\n >\n </valtimo-editor>\n\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\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 */.loading-container{display:flex;width:100%;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i7.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2100
+ }
2101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDocumentDefinitionComponent, decorators: [{
2102
+ type: Component,
2103
+ args: [{ selector: 'valtimo-dossier-management-document-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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=\"{documentDefinitionModel: documentDefinitionModel$ | async, loadingDocumentDefinition: loadingDocumentDefinition$ | async, selectedDocumentDefinition:selectedDocumentDefinition$ | async} as obs\"\n>\n <div class=\"cds--toolbar-content\">\n <button\n cdsButton=\"primary\"\n (click)=\"downloadDefinition()\"\n [disabled]=\"obs.loadingDocumentDefinition || !obs.selectedDocumentDefinition\"\n >\n <svg cdsIcon=\"download\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'Download document definition'| translate }}\n </button>\n </div>\n\n <valtimo-editor\n *ngIf=\"!obs.loadingDocumentDefinition; else loading\"\n [model]=\"obs.documentDefinitionModel\"\n [disabled]=\"true\"\n heightStyle=\"calc(100vh - 316px)\"\n >\n </valtimo-editor>\n\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\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 */.loading-container{display:flex;width:100%;justify-content:center}\n"] }]
2104
+ }], ctorParameters: function () { return [{ type: DossierDetailService }]; } });
2105
+
2106
+ /*
2107
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
2108
+ *
2109
+ * Licensed under EUPL, Version 1.2 (the "License");
2110
+ * you may not use this file except in compliance with the License.
2111
+ * You may obtain a copy of the License at
2112
+ *
2113
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2114
+ *
2115
+ * Unless required by applicable law or agreed to in writing, software
2116
+ * distributed under the License is distributed on an "AS IS" basis,
2117
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2118
+ * See the License for the specific language governing permissions and
2119
+ * limitations under the License.
2120
+ */
2121
+ class DossierManagementProcessesComponent {
2122
+ constructor(documentService, iconService, dossierDetailService, route, notificationService, translateService) {
2123
+ this.documentService = documentService;
1712
2124
  this.iconService = iconService;
1713
- this.tabManagementService = tabManagementService;
1714
- this.tabService = tabService;
2125
+ this.dossierDetailService = dossierDetailService;
2126
+ this.route = route;
2127
+ this.notificationService = notificationService;
1715
2128
  this.translateService = translateService;
1716
- this.deleteRowKey$ = new BehaviorSubject(null);
1717
- this.showDeleteModal$ = this.deleteRowKey$.pipe(map((key) => !!key));
1718
- this.openEditModal$ = new BehaviorSubject(false);
1719
- this.fields$ = new BehaviorSubject([]);
1720
- this.loading$ = this.tabManagementService.loading$;
1721
- this.openAddModal$ = new BehaviorSubject(false);
1722
- this.lastItemIndex$ = new BehaviorSubject(-1);
1723
- this.tabs$ = this.tabManagementService.tabs$.pipe(tap$1((tabs) => {
1724
- this._tabs = tabs;
1725
- this.tabService.configuredContentKeys = tabs.map((tab) => tab.contentKey);
1726
- this.tabService.configuredTabKeys = tabs.map((tab) => tab.key);
1727
- this.lastItemIndex$.next(tabs.length - 1);
1728
- }));
1729
- this.tab$ = new BehaviorSubject(null);
1730
- }
1731
- ngAfterViewInit() {
1732
- this.iconService.registerAll([ArrowDown16, ArrowUp16]);
1733
- this.fields$.next([
2129
+ this._refresh$ = new BehaviorSubject(null);
2130
+ this.processDocumentDefinitions$ = this._refresh$.pipe(switchMap(() => combineLatest([this.route.paramMap, this.dossierDetailService.selectedVersionNumber$])), switchMap(([params, version]) => this.documentService.findProcessDocumentDefinitionsByVersion(params.get('name') ?? '', version)));
2131
+ this.documentDefinition$ = this.route.paramMap.pipe(switchMap((params) => this.documentService.getDocumentDefinitionForManagement(params.get('name') ?? '')));
2132
+ this.actionItems = [
1734
2133
  {
1735
- key: 'name',
1736
- label: 'dossierManagement.tabManagement.columns.name',
1737
- viewType: ViewType.TEXT,
2134
+ label: 'dossierManagement.unlinkProcess',
2135
+ callback: this.deleteProcessDocumentDefinition.bind(this),
2136
+ type: 'danger',
1738
2137
  },
2138
+ ];
2139
+ this.fields = [
1739
2140
  {
1740
- key: 'key',
1741
- label: 'dossierManagement.tabManagement.columns.key',
2141
+ key: 'processName',
2142
+ label: 'interface.name',
1742
2143
  viewType: ViewType.TEXT,
1743
2144
  },
1744
2145
  {
1745
- viewType: ViewType.TEMPLATE,
1746
- template: this.tabTypeColumnTemplate,
1747
- key: '',
1748
- label: 'dossierManagement.tabManagement.columns.type',
2146
+ key: 'canInitializeDocument',
2147
+ label: 'processCaseConnection.processCreatesCase',
2148
+ viewType: ViewType.BOOLEAN,
1749
2149
  },
1750
2150
  {
1751
- viewType: ViewType.TEMPLATE,
1752
- template: this.tabContentColumnTemplate,
1753
- key: '',
1754
- label: 'dossierManagement.tabManagement.columns.content',
2151
+ key: 'startableByUser',
2152
+ label: 'processCaseConnection.startableWithinCase',
2153
+ viewType: ViewType.BOOLEAN,
1755
2154
  },
1756
- {
1757
- className: 'valtimo-dossier-management-tabs__actions',
1758
- key: '',
1759
- label: '',
1760
- template: this.moveButtonsTemplate,
1761
- viewType: ViewType.TEMPLATE,
2155
+ ];
2156
+ this.iconService.register(Link16);
2157
+ }
2158
+ deleteProcessDocumentDefinition(processDocumentDefinition) {
2159
+ this.documentService
2160
+ .deleteProcessDocumentDefinition({
2161
+ documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
2162
+ processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
2163
+ documentDefinitionVersion: processDocumentDefinition.id.documentDefinitionId.version,
2164
+ canInitializeDocument: processDocumentDefinition.canInitializeDocument,
2165
+ startableByUser: processDocumentDefinition.startableByUser,
2166
+ })
2167
+ .subscribe({
2168
+ next: () => {
2169
+ this.notificationService.showNotification({
2170
+ type: 'success',
2171
+ title: this.translateService.instant('dossierManagement.processLinkNotification.unlinkSuccess'),
2172
+ duration: 5000,
2173
+ });
2174
+ this.loadProcessDocumentDefinitions();
1762
2175
  },
1763
- {
1764
- actions: [
1765
- {
1766
- label: 'interface.delete',
1767
- callback: this.openDeleteConfirmationModal.bind(this),
1768
- type: 'danger',
1769
- },
1770
- ],
1771
- className: 'valtimo-dossier-management-tabs__actions',
1772
- key: '',
1773
- label: '',
1774
- viewType: ViewType.ACTION,
2176
+ error: () => {
2177
+ this.notificationService.showNotification({
2178
+ type: 'error',
2179
+ title: this.translateService.instant('dossierManagement.processLinkNotification.unlinkFailure'),
2180
+ duration: 5000,
2181
+ });
1775
2182
  },
1776
- ]);
1777
- this.cd.detectChanges();
1778
- }
1779
- isTranslated(key) {
1780
- return this.translateService.instant(key) !== key;
1781
- }
1782
- onArrowClick(direction, index, event) {
1783
- event.stopImmediatePropagation();
1784
- const orderedTabs = direction === 'UP'
1785
- ? this.swapTabs(this._tabs, index - 1, index)
1786
- : this.swapTabs(this._tabs, index, index + 1);
1787
- this.tabManagementService.dispatchAction(this.tabManagementService.editTabsOrder(orderedTabs));
1788
- }
1789
- openAddTabModal() {
1790
- this.openAddModal$.next(true);
1791
- }
1792
- onRowClicked(tab) {
1793
- this.tab$.next(tab);
1794
- this.openEditModal$.next(true);
1795
- }
1796
- onCloseAddModalEvent(tab) {
1797
- this.openAddModal$.next(false);
1798
- if (!tab) {
1799
- return;
1800
- }
1801
- this.addTab(tab);
1802
- }
1803
- onCloseEditModalEvent(tab) {
1804
- this.openEditModal$.next(false);
1805
- this.tab$.next(null);
1806
- if (!tab) {
1807
- return;
1808
- }
1809
- this.editTab(tab);
1810
- }
1811
- openDeleteConfirmationModal(tab) {
1812
- this.deleteRowKey$.next(tab.key);
1813
- }
1814
- onConfirmEvent(tabKey) {
1815
- this.deleteTab(tabKey);
1816
- }
1817
- addTab(tab) {
1818
- this.tabManagementService.dispatchAction(this.tabManagementService.addTab(tab));
1819
- }
1820
- deleteTab(tabKey) {
1821
- this.tabManagementService.dispatchAction(this.tabManagementService.deleteTab(tabKey));
2183
+ });
1822
2184
  }
1823
- editTab(tab) {
1824
- this.tabManagementService.dispatchAction(this.tabManagementService.editTab(tab, tab.key));
2185
+ loadProcessDocumentDefinitions() {
2186
+ this._refresh$.next(null);
1825
2187
  }
1826
- swapTabs(tabItems, index1, index2) {
1827
- const temp = [...tabItems];
1828
- temp[index1] = temp.splice(index2, 1, temp[index1])[0];
1829
- return temp;
2188
+ openDossierConnectModal(documentDefinition) {
2189
+ this._dossierConnectModal.openModal(documentDefinition);
1830
2190
  }
1831
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementTabsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i9.IconService }, { token: TabManagementService }, { token: TabService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1832
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementTabsComponent, selector: "valtimo-dossier-management-tabs", inputs: { documentDefinitionName: "documentDefinitionName" }, viewQueries: [{ propertyName: "tabContentColumnTemplate", first: true, predicate: ["tabContentColumn"], descendants: true }, { propertyName: "tabTypeColumnTemplate", first: true, predicate: ["tabTypeColumn"], descendants: true }, { propertyName: "moveButtonsTemplate", first: true, predicate: ["moveButtonsTemplate"], 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-carbon-list\n *ngIf=\"{fields: fields$ | async, loading: loading$ | async, tabs: tabs$ | async} as obs\"\n [items]=\"obs.tabs\"\n [fields]=\"obs.fields\"\n header=\"false\"\n [loading]=\"obs.loading\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <ng-container carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTabButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTabButton\"\n [description]=\"'dossier.tabs.noResultsDescription' | translate\"\n [title]=\"'dossier.tabs.noResults' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #tabTypeColumn let-data=\"data\">\n {{\n isTranslated('dossierManagement.tabType.' + data.item.type)\n ? ('dossierManagement.tabType.' + data.item.type | translate)\n : data.item.type\n }}\n</ng-template>\n\n<ng-template #tabContentColumn let-data=\"data\">\n {{\n isTranslated('dossier.tabs.' + data.item.contentKey)\n ? ('dossier.tabs.' + data.item.contentKey | translate)\n : data.item.contentKey\n }}\n</ng-template>\n\n<ng-template #addTabButton>\n <button cdsButton=\"primary\" (click)=\"openAddTabModal()\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveButtonsTemplate let-data=\"data\">\n <div class=\"move-buttons-container\">\n <button\n cdsButton=\"tertiary\"\n [disabled]=\"data.index === 0\"\n [iconOnly]=\"true\"\n (click)=\"onArrowClick('UP', data.index, $event)\"\n >\n <svg cdsIcon=\"arrow--up\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n\n <button\n cdsButton=\"tertiary\"\n [disabled]=\"(lastItemIndex$ | async) === data.index\"\n [iconOnly]=\"true\"\n (click)=\"onArrowClick('DOWN', data.index, $event)\"\n >\n <svg cdsIcon=\"arrow--down\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n</ng-template>\n\n<valtimo-dossier-management-add-tab-modal\n *ngIf=\"openAddModal$ | async\"\n [documentDefinitionName]=\"documentDefinitionName\"\n [open]=\"openAddModal$ | async\"\n (closeModalEvent)=\"onCloseAddModalEvent($event)\"\n></valtimo-dossier-management-add-tab-modal>\n\n<valtimo-dossier-management-edit-tab-modal\n *ngIf=\"openEditModal$ | async\"\n [tab]=\"tab$ | async\"\n (closeModalEvent)=\"onCloseEditModalEvent($event)\"\n [open]=\"openEditModal$ | async\"\n></valtimo-dossier-management-edit-tab-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"dossierManagement.tabManagement.deleteModal.description\"\n [outputOnConfirm]=\"deleteRowKey$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dossierManagement.tabManagement.deleteModal.title\"\n (confirmEvent)=\"onConfirmEvent($event)\"\n></valtimo-confirmation-modal>\n", styles: [".valtimo-dossier-management-tabs__actions{width:1px}.valtimo-dossier-management-tabs__actions .move-buttons-container{display:flex;gap:8px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i9.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i6.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent", "cancelEvent"] }, { kind: "component", type: i6.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "header", "initialSortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i6.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "component", type: DossierManagementAddTabModalComponent, selector: "valtimo-dossier-management-add-tab-modal", inputs: ["documentDefinitionName", "open"], outputs: ["closeModalEvent"] }, { kind: "component", type: DossierManagementEditTabModalComponent, selector: "valtimo-dossier-management-edit-tab-modal", inputs: ["open", "tab"], outputs: ["closeModalEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2191
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementProcessesComponent, deps: [{ token: i1.DocumentService }, { token: i4.IconService }, { token: DossierDetailService }, { token: i2.ActivatedRoute }, { token: i4.NotificationService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2192
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementProcessesComponent, selector: "valtimo-dossier-management-processes", providers: [NotificationService], viewQueries: [{ propertyName: "_dossierConnectModal", first: true, predicate: ["dossierConnectModal"], 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<ng-container\n *ngIf=\"{\n documentDefinition: documentDefinition$ | async,\n processDocumentDefinitions: processDocumentDefinitions$ | async\n } as obs\"\n>\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"obs.processDocumentDefinitions\"\n [loading]=\"!obs.processDocumentDefinitions\"\n [fields]=\"fields\"\n [header]=\"false\"\n >\n <ng-container carbonToolbarContent [ngTemplateOutlet]=\"connectProcessButton\"></ng-container>\n\n <valtimo-no-results\n [title]=\"'processCaseConnection.noProcesses' | translate\"\n [action]=\"connectProcessButton\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <ng-template #connectProcessButton>\n <button\n cdsButton=\"primary\"\n [disabled]=\"!obs.processDocumentDefinitions\"\n (click)=\"openDossierConnectModal(obs.documentDefinition)\"\n >\n {{ 'dossierManagement.processLink' | translate }}\n\n <svg cdsIcon=\"link\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </ng-template>\n</ng-container>\n\n<valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n></valtimo-dossier-management-connect-modal>\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 */::ng-deep .cds--tab-content{padding:0!important}::ng-deep .dossier-management-processes_actions{width:1px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i7.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: i7.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "component", type: DossierManagementConnectModalComponent, selector: "valtimo-dossier-management-connect-modal", outputs: ["reloadProcessDocumentDefinitions"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1833
2193
  }
1834
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementTabsComponent, decorators: [{
2194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementProcessesComponent, decorators: [{
1835
2195
  type: Component,
1836
- args: [{ selector: 'valtimo-dossier-management-tabs', changeDetection: ChangeDetectionStrategy.OnPush, 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-carbon-list\n *ngIf=\"{fields: fields$ | async, loading: loading$ | async, tabs: tabs$ | async} as obs\"\n [items]=\"obs.tabs\"\n [fields]=\"obs.fields\"\n header=\"false\"\n [loading]=\"obs.loading\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <ng-container carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTabButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTabButton\"\n [description]=\"'dossier.tabs.noResultsDescription' | translate\"\n [title]=\"'dossier.tabs.noResults' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #tabTypeColumn let-data=\"data\">\n {{\n isTranslated('dossierManagement.tabType.' + data.item.type)\n ? ('dossierManagement.tabType.' + data.item.type | translate)\n : data.item.type\n }}\n</ng-template>\n\n<ng-template #tabContentColumn let-data=\"data\">\n {{\n isTranslated('dossier.tabs.' + data.item.contentKey)\n ? ('dossier.tabs.' + data.item.contentKey | translate)\n : data.item.contentKey\n }}\n</ng-template>\n\n<ng-template #addTabButton>\n <button cdsButton=\"primary\" (click)=\"openAddTabModal()\">\n {{ 'dossierManagement.tabManagement.addModal.addTab' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n</ng-template>\n\n<ng-template #moveButtonsTemplate let-data=\"data\">\n <div class=\"move-buttons-container\">\n <button\n cdsButton=\"tertiary\"\n [disabled]=\"data.index === 0\"\n [iconOnly]=\"true\"\n (click)=\"onArrowClick('UP', data.index, $event)\"\n >\n <svg cdsIcon=\"arrow--up\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n\n <button\n cdsButton=\"tertiary\"\n [disabled]=\"(lastItemIndex$ | async) === data.index\"\n [iconOnly]=\"true\"\n (click)=\"onArrowClick('DOWN', data.index, $event)\"\n >\n <svg cdsIcon=\"arrow--down\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n</ng-template>\n\n<valtimo-dossier-management-add-tab-modal\n *ngIf=\"openAddModal$ | async\"\n [documentDefinitionName]=\"documentDefinitionName\"\n [open]=\"openAddModal$ | async\"\n (closeModalEvent)=\"onCloseAddModalEvent($event)\"\n></valtimo-dossier-management-add-tab-modal>\n\n<valtimo-dossier-management-edit-tab-modal\n *ngIf=\"openEditModal$ | async\"\n [tab]=\"tab$ | async\"\n (closeModalEvent)=\"onCloseEditModalEvent($event)\"\n [open]=\"openEditModal$ | async\"\n></valtimo-dossier-management-edit-tab-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"dossierManagement.tabManagement.deleteModal.description\"\n [outputOnConfirm]=\"deleteRowKey$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dossierManagement.tabManagement.deleteModal.title\"\n (confirmEvent)=\"onConfirmEvent($event)\"\n></valtimo-confirmation-modal>\n", styles: [".valtimo-dossier-management-tabs__actions{width:1px}.valtimo-dossier-management-tabs__actions .move-buttons-container{display:flex;gap:8px}\n"] }]
1837
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i9.IconService }, { type: TabManagementService }, { type: TabService }, { type: i3.TranslateService }]; }, propDecorators: { tabContentColumnTemplate: [{
1838
- type: ViewChild,
1839
- args: ['tabContentColumn']
1840
- }], tabTypeColumnTemplate: [{
1841
- type: ViewChild,
1842
- args: ['tabTypeColumn']
1843
- }], moveButtonsTemplate: [{
2196
+ args: [{ selector: 'valtimo-dossier-management-processes', providers: [NotificationService], 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 documentDefinition: documentDefinition$ | async,\n processDocumentDefinitions: processDocumentDefinitions$ | async\n } as obs\"\n>\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"obs.processDocumentDefinitions\"\n [loading]=\"!obs.processDocumentDefinitions\"\n [fields]=\"fields\"\n [header]=\"false\"\n >\n <ng-container carbonToolbarContent [ngTemplateOutlet]=\"connectProcessButton\"></ng-container>\n\n <valtimo-no-results\n [title]=\"'processCaseConnection.noProcesses' | translate\"\n [action]=\"connectProcessButton\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <ng-template #connectProcessButton>\n <button\n cdsButton=\"primary\"\n [disabled]=\"!obs.processDocumentDefinitions\"\n (click)=\"openDossierConnectModal(obs.documentDefinition)\"\n >\n {{ 'dossierManagement.processLink' | translate }}\n\n <svg cdsIcon=\"link\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </ng-template>\n</ng-container>\n\n<valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n></valtimo-dossier-management-connect-modal>\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 */::ng-deep .cds--tab-content{padding:0!important}::ng-deep .dossier-management-processes_actions{width:1px}\n"] }]
2197
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i4.IconService }, { type: DossierDetailService }, { type: i2.ActivatedRoute }, { type: i4.NotificationService }, { type: i3.TranslateService }]; }, propDecorators: { _dossierConnectModal: [{
1844
2198
  type: ViewChild,
1845
- args: ['moveButtonsTemplate']
1846
- }], documentDefinitionName: [{
1847
- type: Input
2199
+ args: ['dossierConnectModal']
1848
2200
  }] } });
1849
2201
 
1850
2202
  /*
@@ -1869,11 +2221,11 @@ class DossierManagementDetailContainerComponent {
1869
2221
  this.configService = configService;
1870
2222
  this.tabService = tabService;
1871
2223
  this.pageTitleService = pageTitleService;
2224
+ this.documentDefinitionTitle$ = this.pageTitleService.customPageTitle$;
2225
+ this.CARBON_THEME = 'g10';
1872
2226
  this.TabEnum = TabEnum;
1873
2227
  this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName));
1874
- this.documentDefinition$ = this.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getDocumentDefinitionForManagement(documentDefinitionName)), tap(documentDefinition => {
1875
- this.pageTitleService.setCustomPageTitle(documentDefinition.schema.title);
1876
- }));
2228
+ this.documentDefinition$ = this.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getDocumentDefinitionForManagement(documentDefinitionName)));
1877
2229
  const featureToggles = this.configService.config.featureToggles;
1878
2230
  this.caseListColumn = !!featureToggles?.caseListColumn;
1879
2231
  this.tabManagementEnabled = !!featureToggles?.enableTabManagement;
@@ -1888,16 +2240,87 @@ class DossierManagementDetailContainerComponent {
1888
2240
  this.tabSubscription = this.tabService.currentTab$.subscribe(value => (this.currentTab = value));
1889
2241
  }
1890
2242
  ngOnDestroy() {
1891
- this.tabService.currentTab = TabEnum.CASE;
2243
+ this.tabService.currentTab = TabEnum.DOCUMENT;
1892
2244
  this.tabSubscription?.unsubscribe();
1893
2245
  }
1894
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailContainerComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i1$3.ConfigService }, { token: TabService }, { token: i6.PageTitleService }], target: i0.ɵɵFactoryTarget.Component }); }
1895
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementDetailContainerComponent, selector: "valtimo-dossier-management-detail-container", 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <ng-container *ngIf=\"documentDefinition$ | async as documentDefinition\">\n <div class=\"bg-light dossier-header\" *ngIf=\"documentDefinition.readOnly\">\n <h3 class=\"dossier-title\">\n <div class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'dossierManagement.readonly' | translate\n }}</span>\n </div>\n </h3>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"case-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.CASE)\"\n >\n {{ 'dossierManagement.tabs.cases' | translate }}\n </a>\n </li>\n <li class=\"nav-item\">\n <a\n id=\"search-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.SEARCH)\"\n >\n {{ 'dossierManagement.tabs.searchFields' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"caseListColumn\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n {{ 'dossierManagement.tabs.listColumns' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"tabManagementEnabled\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.TABS)\"\n >\n {{ 'dossierManagement.tabs.tabManagement' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.CASE\">\n <valtimo-dossier-management-detail></valtimo-dossier-management-detail>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.SEARCH\">\n <valtimo-dossier-management-search-fields></valtimo-dossier-management-search-fields>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.LIST\">\n <valtimo-dossier-management-list-columns></valtimo-dossier-management-list-columns>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.TABS\">\n <valtimo-dossier-management-tabs\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n ></valtimo-dossier-management-tabs>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: DossierManagementDetailComponent, selector: "valtimo-dossier-management-detail" }, { kind: "component", type: DossierManagementSearchFieldsComponent, selector: "valtimo-dossier-management-search-fields", outputs: ["searchField"] }, { kind: "component", type: DossierManagementListColumnsComponent, selector: "valtimo-dossier-management-list-columns" }, { kind: "component", type: DossierManagementTabsComponent, selector: "valtimo-dossier-management-tabs", inputs: ["documentDefinitionName"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
2246
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailContainerComponent, deps: [{ token: i1.DocumentService }, { token: i2.ActivatedRoute }, { token: i1$2.ConfigService }, { token: TabService }, { token: i7.PageTitleService }], target: i0.ɵɵFactoryTarget.Component }); }
2247
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementDetailContainerComponent, selector: "valtimo-dossier-management-detail-container", providers: [DossierDetailService], 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 class=\"dossier-management-detail-container\">\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n</div>\n\n<ng-template #tabs>\n <cds-tabs\n class=\"dossier-management-tabs\"\n type=\"contained\"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.DOCUMENT} as vars\"\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.document' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.DOCUMENT)\"\n >\n <valtimo-dossier-management-document-definition\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-document-definition>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.CASE} as vars\"\n class=\"no-padding-left-right main-content\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.cases' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.CASE)\"\n >\n <valtimo-dossier-management-detail *ngIf=\"vars.active\"></valtimo-dossier-management-detail>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.PROCESSES} as vars\"\n class=\"no-padding-left-right main-content\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.processes' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.PROCESSES)\"\n >\n <valtimo-dossier-management-processes\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-processes>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.SEARCH} as vars\"\n class=\"main-content no-padding-left-right no-padding-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.searchFields' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.SEARCH)\"\n >\n <valtimo-dossier-management-search-fields\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-search-fields>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.LIST} as vars\"\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.listColumns' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n <valtimo-dossier-management-list-columns\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-list-columns>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.TABS} as vars\"\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.tabManagement' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.TABS)\"\n >\n <valtimo-dossier-management-tabs\n *ngIf=\"vars.active\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n ></valtimo-dossier-management-tabs>\n </cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <valtimo-dossier-management-detail-container-actions\n [documentDefinitionTitle]=\"documentDefinitionTitle$ | async\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n ></valtimo-dossier-management-detail-container-actions>\n </ng-template>\n</ng-container>\n", styles: ["::ng-deep .dossier-management-tabs .cds--tab-content{background-color:var(--cds-layer)}::ng-deep .dossier-management-tabs .cds--tab-content:focus{outline:none}::ng-deep .dossier-management-tabs .no-padding-left-right .cds--tab-content{padding-left:0;padding-right:0}::ng-deep .dossier-management-tabs .no-padding-top-bottom .cds--tab-content{padding-top:0;padding-bottom:0}::ng-deep .dossier-management-tabs .no-padding-bottom .cds--tab-content{padding-bottom:0}.tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}.dossier-management-detail-container{display:flex;flex-direction:column;width:100%}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "component", type: i4.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive"], outputs: ["selected"] }, { kind: "component", type: DossierManagementDetailComponent, selector: "valtimo-dossier-management-detail" }, { kind: "component", type: DossierManagementSearchFieldsComponent, selector: "valtimo-dossier-management-search-fields", outputs: ["searchField"] }, { kind: "component", type: DossierManagementListColumnsComponent, selector: "valtimo-dossier-management-list-columns" }, { kind: "component", type: DossierManagementTabsComponent, selector: "valtimo-dossier-management-tabs", inputs: ["documentDefinitionName"] }, { kind: "component", type: DossierManagementDetailContainerActionsComponent, selector: "valtimo-dossier-management-detail-container-actions", inputs: ["documentDefinitionTitle", "documentDefinitionName"] }, { kind: "component", type: DossierManagementDocumentDefinitionComponent, selector: "valtimo-dossier-management-document-definition" }, { kind: "component", type: DossierManagementProcessesComponent, selector: "valtimo-dossier-management-processes" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
1896
2248
  }
1897
2249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementDetailContainerComponent, decorators: [{
1898
2250
  type: Component,
1899
- args: [{ selector: 'valtimo-dossier-management-detail-container', 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 class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tabContent\"></ng-container>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<ng-template #title>\n <ng-container *ngIf=\"documentDefinition$ | async as documentDefinition\">\n <div class=\"bg-light dossier-header\" *ngIf=\"documentDefinition.readOnly\">\n <h3 class=\"dossier-title\">\n <div class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'dossierManagement.readonly' | translate\n }}</span>\n </div>\n </h3>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tabs>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a\n id=\"case-tab\"\n class=\"nav-link clickable active\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.CASE)\"\n >\n {{ 'dossierManagement.tabs.cases' | translate }}\n </a>\n </li>\n <li class=\"nav-item\">\n <a\n id=\"search-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.SEARCH)\"\n >\n {{ 'dossierManagement.tabs.searchFields' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"caseListColumn\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n {{ 'dossierManagement.tabs.listColumns' | translate }}\n </a>\n </li>\n <li class=\"nav-item\" *ngIf=\"tabManagementEnabled\">\n <a\n id=\"list-tab\"\n class=\"nav-link clickable\"\n data-toggle=\"tab\"\n (click)=\"displayBodyComponent(TabEnum.TABS)\"\n >\n {{ 'dossierManagement.tabs.tabManagement' | translate }}\n </a>\n </li>\n </ul>\n</ng-template>\n\n<ng-template #tabContent>\n <div class=\"pt-3 bg-white position-relative tab-container\">\n <div *ngIf=\"currentTab && currentTab === TabEnum.CASE\">\n <valtimo-dossier-management-detail></valtimo-dossier-management-detail>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.SEARCH\">\n <valtimo-dossier-management-search-fields></valtimo-dossier-management-search-fields>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.LIST\">\n <valtimo-dossier-management-list-columns></valtimo-dossier-management-list-columns>\n </div>\n <div *ngIf=\"currentTab && currentTab === TabEnum.TABS\">\n <valtimo-dossier-management-tabs\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n ></valtimo-dossier-management-tabs>\n </div>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}\n"] }]
1900
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i1$3.ConfigService }, { type: TabService }, { type: i6.PageTitleService }]; } });
2251
+ args: [{ selector: 'valtimo-dossier-management-detail-container', providers: [DossierDetailService], 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 class=\"dossier-management-detail-container\">\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n</div>\n\n<ng-template #tabs>\n <cds-tabs\n class=\"dossier-management-tabs\"\n type=\"contained\"\n [attr.data-carbon-theme]=\"CARBON_THEME\"\n >\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.DOCUMENT} as vars\"\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.document' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.DOCUMENT)\"\n >\n <valtimo-dossier-management-document-definition\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-document-definition>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.CASE} as vars\"\n class=\"no-padding-left-right main-content\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.cases' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.CASE)\"\n >\n <valtimo-dossier-management-detail *ngIf=\"vars.active\"></valtimo-dossier-management-detail>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.PROCESSES} as vars\"\n class=\"no-padding-left-right main-content\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.processes' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.PROCESSES)\"\n >\n <valtimo-dossier-management-processes\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-processes>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.SEARCH} as vars\"\n class=\"main-content no-padding-left-right no-padding-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.searchFields' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.SEARCH)\"\n >\n <valtimo-dossier-management-search-fields\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-search-fields>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.LIST} as vars\"\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.listColumns' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.LIST)\"\n >\n <valtimo-dossier-management-list-columns\n *ngIf=\"vars.active\"\n ></valtimo-dossier-management-list-columns>\n </cds-tab>\n <cds-tab\n *ngIf=\"{active: currentTab === TabEnum.TABS} as vars\"\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.active\"\n [heading]=\"'dossierManagement.tabs.tabManagement' | translate\"\n (selected)=\"displayBodyComponent(TabEnum.TABS)\"\n >\n <valtimo-dossier-management-tabs\n *ngIf=\"vars.active\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n ></valtimo-dossier-management-tabs>\n </cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <valtimo-dossier-management-detail-container-actions\n [documentDefinitionTitle]=\"documentDefinitionTitle$ | async\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n ></valtimo-dossier-management-detail-container-actions>\n </ng-template>\n</ng-container>\n", styles: ["::ng-deep .dossier-management-tabs .cds--tab-content{background-color:var(--cds-layer)}::ng-deep .dossier-management-tabs .cds--tab-content:focus{outline:none}::ng-deep .dossier-management-tabs .no-padding-left-right .cds--tab-content{padding-left:0;padding-right:0}::ng-deep .dossier-management-tabs .no-padding-top-bottom .cds--tab-content{padding-top:0;padding-bottom:0}::ng-deep .dossier-management-tabs .no-padding-bottom .cds--tab-content{padding-bottom:0}.tab-container{min-height:300px}.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid rgba(0,0,0,.125)}.dossier-title{margin-top:0;margin-bottom:7px}.dossier-management-detail-container{display:flex;flex-direction:column;width:100%}\n"] }]
2252
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.ActivatedRoute }, { type: i1$2.ConfigService }, { type: TabService }, { type: i7.PageTitleService }]; } });
2253
+
2254
+ var UPLOAD_STATUS;
2255
+ (function (UPLOAD_STATUS) {
2256
+ UPLOAD_STATUS["ACTIVE"] = "active";
2257
+ UPLOAD_STATUS["ERROR"] = "error";
2258
+ UPLOAD_STATUS["FINISHED"] = "finished";
2259
+ })(UPLOAD_STATUS || (UPLOAD_STATUS = {}));
2260
+ var UPLOAD_STEP;
2261
+ (function (UPLOAD_STEP) {
2262
+ UPLOAD_STEP["ACCESS_CONTROL"] = "accessControl";
2263
+ UPLOAD_STEP["DASHBOARD"] = "dashboard";
2264
+ UPLOAD_STEP["FILE_SELECT"] = "fileSelect";
2265
+ UPLOAD_STEP["FILE_UPLOAD"] = "fileUpload";
2266
+ UPLOAD_STEP["PLUGINS"] = "plugins";
2267
+ })(UPLOAD_STEP || (UPLOAD_STEP = {}));
2268
+ const STEPS = [
2269
+ UPLOAD_STEP.PLUGINS,
2270
+ UPLOAD_STEP.FILE_SELECT,
2271
+ UPLOAD_STEP.FILE_UPLOAD,
2272
+ UPLOAD_STEP.ACCESS_CONTROL,
2273
+ UPLOAD_STEP.DASHBOARD,
2274
+ ];
2275
+
2276
+ /*
2277
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
2278
+ *
2279
+ * Licensed under EUPL, Version 1.2 (the "License");
2280
+ * you may not use this file except in compliance with the License.
2281
+ *
2282
+ * You may obtain a copy of the License at
2283
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2284
+ *
2285
+ * Unless required by applicable law or agreed to in writing, software
2286
+ * distributed under the License is distributed on an "AS IS" basis,
2287
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2288
+ * See the License for the specific language governing permissions and
2289
+ * limitations under the License.
2290
+ */
2291
+ class DossierImportService {
2292
+ constructor(http, configService) {
2293
+ this.http = http;
2294
+ this.configService = configService;
2295
+ this.valtimoEndpointUri = this.configService.config.valtimoApi.endpointUri;
2296
+ }
2297
+ importDocumentDefinitionZip(file) {
2298
+ return this.http.post(`${this.valtimoEndpointUri}management/v1/case/import`, file);
2299
+ }
2300
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierImportService, deps: [{ token: i1$3.HttpClient }, { token: i1$2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2301
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierImportService, providedIn: 'root' }); }
2302
+ }
2303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierImportService, decorators: [{
2304
+ type: Injectable,
2305
+ args: [{
2306
+ providedIn: 'root',
2307
+ }]
2308
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: i1$2.ConfigService }]; } });
2309
+
2310
+ class DossierManagementUploadStepComponent {
2311
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementUploadStepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2312
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementUploadStepComponent, selector: "valtimo-dossier-management-upload-step", inputs: { illustration: "illustration", message: "message", title: "title" }, ngImport: i0, template: "<div class=\"valtimo-upload-step__content\">\n <div class=\"valtimo-upload-step__title\">{{ title }}</div>\n\n <div class=\"valtimo-upload-step__message\">{{ message }}</div>\n</div>\n\n<img [src]=\"illustration\" alt=\"{{ illustration }}\" class=\"valtimo-upload-step__illustration\" />\n", styles: [":host{display:flex;justify-content:space-around;align-items:center;gap:32px;height:100%}:host label{color:unset}.valtimo-upload-step__content{display:flex;flex-direction:column;gap:16px}.valtimo-upload-step__title{font-weight:600;font-size:16px}.valtimo-upload-step__message{font-size:16px;line-height:28px}.valtimo-upload-step__illustration{max-width:200px}\n"] }); }
2313
+ }
2314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementUploadStepComponent, decorators: [{
2315
+ type: Component,
2316
+ args: [{ selector: 'valtimo-dossier-management-upload-step', template: "<div class=\"valtimo-upload-step__content\">\n <div class=\"valtimo-upload-step__title\">{{ title }}</div>\n\n <div class=\"valtimo-upload-step__message\">{{ message }}</div>\n</div>\n\n<img [src]=\"illustration\" alt=\"{{ illustration }}\" class=\"valtimo-upload-step__illustration\" />\n", styles: [":host{display:flex;justify-content:space-around;align-items:center;gap:32px;height:100%}:host label{color:unset}.valtimo-upload-step__content{display:flex;flex-direction:column;gap:16px}.valtimo-upload-step__title{font-weight:600;font-size:16px}.valtimo-upload-step__message{font-size:16px;line-height:28px}.valtimo-upload-step__illustration{max-width:200px}\n"] }]
2317
+ }], propDecorators: { illustration: [{
2318
+ type: Input
2319
+ }], message: [{
2320
+ type: Input
2321
+ }], title: [{
2322
+ type: Input
2323
+ }] } });
1901
2324
 
1902
2325
  /*
1903
2326
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -1915,111 +2338,152 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1915
2338
  * limitations under the License.
1916
2339
  */
1917
2340
  class DossierManagementUploadComponent {
1918
- constructor(documentService, translateService, menuService) {
2341
+ constructor(documentService, dossierImportService, fb, iconService, translateService) {
1919
2342
  this.documentService = documentService;
2343
+ this.dossierImportService = dossierImportService;
2344
+ this.fb = fb;
2345
+ this.iconService = iconService;
1920
2346
  this.translateService = translateService;
1921
- this.menuService = menuService;
1922
- this.definitionUploaded = new EventEmitter();
1923
- this.clear$ = new Subject();
1924
- this.jsonString$ = new BehaviorSubject('');
1925
- this.error$ = new BehaviorSubject('');
1926
- this.disabled$ = new BehaviorSubject(false);
1927
- this.file$ = new BehaviorSubject(undefined);
2347
+ this.open = false;
2348
+ this.closeModal = new EventEmitter();
2349
+ this.acceptedFiles = ['.json', '.zip'];
2350
+ this._disabled$ = new BehaviorSubject(true);
2351
+ this.UPLOAD_STEP = UPLOAD_STEP;
2352
+ this.UPLOAD_STATUS = UPLOAD_STATUS;
2353
+ this.activeStep$ = new BehaviorSubject(UPLOAD_STEP.PLUGINS);
2354
+ this.backButtonEnabled$ = this.activeStep$.pipe(map((activeStep) => [UPLOAD_STEP.FILE_SELECT, UPLOAD_STEP.ACCESS_CONTROL, UPLOAD_STEP.DASHBOARD].includes(activeStep)));
2355
+ this.isStepAfterUpload$ = this.activeStep$.pipe(map((activeStep) => ![UPLOAD_STEP.PLUGINS, UPLOAD_STEP.FILE_SELECT].includes(activeStep)));
2356
+ this.showCloseButton$ = this.activeStep$.pipe(map((activeStep) => [UPLOAD_STEP.PLUGINS, UPLOAD_STEP.FILE_SELECT, UPLOAD_STEP.FILE_UPLOAD].includes(activeStep)));
2357
+ this.nextButtonDisabled$ = combineLatest([
2358
+ this.activeStep$,
2359
+ this._disabled$,
2360
+ ]).pipe(map(([activeStep, disabled]) => activeStep !== UPLOAD_STEP.PLUGINS && disabled));
2361
+ this.notificationObj$ = combineLatest([
2362
+ this.translateService.stream('interface.warning'),
2363
+ this.translateService.stream('dossierManagement.importDefinition.overwriteWarning'),
2364
+ ]).pipe(map(([title, message]) => ({
2365
+ type: 'warning',
2366
+ title,
2367
+ message,
2368
+ showClose: false,
2369
+ lowContrast: true,
2370
+ })));
2371
+ this.showCheckboxError$ = new BehaviorSubject(false);
2372
+ this.uploadStatus$ = new BehaviorSubject(UPLOAD_STATUS.ACTIVE);
2373
+ this.form = this.fb.group({
2374
+ file: this.fb.control(new Set(), [Validators.required]),
2375
+ });
2376
+ this._checked = false;
2377
+ this._importFile$ = new BehaviorSubject('');
2378
+ this._subscriptions = new Subscription();
2379
+ this.iconService.register(WarningFilled16);
1928
2380
  }
1929
- ngAfterViewInit() {
1930
- this.openShowSubscription();
1931
- this.openFileSubscription();
2381
+ ngOnInit() {
2382
+ const control = this.form.get('file');
2383
+ if (!control) {
2384
+ return;
2385
+ }
2386
+ this._subscriptions.add(control.valueChanges.subscribe((fileSet) => {
2387
+ const [fileItem] = fileSet;
2388
+ if (!fileItem) {
2389
+ this._disabled$.next(true);
2390
+ this.showCheckboxError$.next(false);
2391
+ this._checked = false;
2392
+ return;
2393
+ }
2394
+ if (fileItem.file.type === 'application/json') {
2395
+ this.setJsonFile(fileItem);
2396
+ return;
2397
+ }
2398
+ this.setZipFile(fileItem);
2399
+ }));
1932
2400
  }
1933
2401
  ngOnDestroy() {
1934
- this.showSubscription.unsubscribe();
1935
- this.fileSubscription.unsubscribe();
1936
- this.closeErrorSubscription();
2402
+ this.resetModal();
1937
2403
  }
1938
- setFile(file) {
1939
- this.clearError();
1940
- this.file$.next(file);
2404
+ onCloseModal(definitionUploaded) {
2405
+ this.closeModal.emit(definitionUploaded ?? false);
2406
+ this.resetModal();
1941
2407
  }
1942
- uploadDefinition() {
1943
- this.disable();
1944
- this.jsonString$
1945
- .pipe(switchMap$1(jsonString => this.documentService
1946
- .createDocumentDefinitionForManagement(new DocumentDefinitionCreateRequest(jsonString))
1947
- .pipe(tap(
1948
- // success
1949
- () => {
1950
- this.closeErrorSubscription();
1951
- this.clearError();
1952
- this.enable();
1953
- this.hideModal();
1954
- this.menuService.reload();
1955
- this.definitionUploaded.emit();
1956
- },
1957
- // error
1958
- () => {
1959
- this.openErrorSubscription('dropzone.error.invalidDocDef');
1960
- this.enable();
1961
- }))), take$1(1))
1962
- .subscribe();
1963
- }
1964
- openErrorSubscription(errorCode) {
1965
- this.closeErrorSubscription();
1966
- this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {
1967
- this.error$.next(error);
1968
- });
2408
+ onBackClick(activeStep) {
2409
+ const prevIndex = STEPS.findIndex((step) => step === activeStep) - 1;
2410
+ if (prevIndex === -1) {
2411
+ return;
2412
+ }
2413
+ this.activeStep$.next(STEPS[prevIndex]);
1969
2414
  }
1970
- closeErrorSubscription() {
1971
- if (this.errorSubscription) {
1972
- this.errorSubscription.unsubscribe();
2415
+ onNextClick(activeStep) {
2416
+ const nextIndex = STEPS.findIndex((step) => step === activeStep) + 1;
2417
+ if (nextIndex === STEPS.length) {
2418
+ return;
2419
+ }
2420
+ if (activeStep === UPLOAD_STEP.FILE_SELECT && !this._checked) {
2421
+ this.showCheckboxError$.next(true);
2422
+ return;
2423
+ }
2424
+ this.activeStep$.next(STEPS[nextIndex]);
2425
+ if (STEPS[nextIndex] !== UPLOAD_STEP.FILE_UPLOAD) {
2426
+ return;
1973
2427
  }
2428
+ this.uploadDefinition();
1974
2429
  }
1975
- clearError() {
1976
- this.error$.next('');
1977
- }
1978
- openFileSubscription() {
1979
- this.fileSubscription = this.file$.subscribe(file => {
1980
- if (file) {
1981
- const reader = new FileReader();
1982
- reader.onloadend = () => {
1983
- const result = reader.result.toString();
1984
- if (this.stringIsValidJson(result)) {
1985
- this.jsonString$.next(result);
1986
- }
1987
- else {
1988
- this.clearJsonString();
1989
- this.error$.next(this.translateService.instant('dropzone.error.invalidJson'));
1990
- }
1991
- };
1992
- reader.readAsText(file);
1993
- }
1994
- else {
1995
- this.clearJsonString();
1996
- }
1997
- });
2430
+ onCheckedChange(checked) {
2431
+ this._checked = checked;
2432
+ if (!checked) {
2433
+ return;
2434
+ }
2435
+ this.showCheckboxError$.next(false);
1998
2436
  }
1999
- openShowSubscription() {
2000
- this.showSubscription = this.show$.subscribe(show => {
2001
- if (show) {
2002
- this.showModal();
2003
- }
2004
- else {
2005
- this.hideModal();
2437
+ setJsonFile(fileItem) {
2438
+ const file = fileItem?.file;
2439
+ if (!file) {
2440
+ this.clearJsonString();
2441
+ return;
2442
+ }
2443
+ const reader = new FileReader();
2444
+ reader.onloadend = () => {
2445
+ const result = (reader.result ?? '').toString();
2446
+ if (this.stringIsValidJson(result)) {
2447
+ this._disabled$.next(false);
2448
+ this._importFile$.next(result);
2449
+ return;
2006
2450
  }
2007
2451
  this.clearJsonString();
2008
- this.clearError();
2009
- this.clearDropzone();
2010
- });
2011
- }
2012
- clearJsonString() {
2013
- this.jsonString$.next('');
2452
+ this.setErrorState(fileItem);
2453
+ };
2454
+ reader.readAsText(file);
2014
2455
  }
2015
- clearDropzone() {
2016
- this.clear$.next(null);
2456
+ setZipFile(fileItem) {
2457
+ const file = fileItem?.file;
2458
+ if (!file) {
2459
+ this._importFile$.next('');
2460
+ return;
2461
+ }
2462
+ const blob = new Blob([fileItem.file], { type: fileItem.file.type });
2463
+ const fd = new FormData();
2464
+ fd.append('file', blob, fileItem.file.name);
2465
+ this._importFile$.next(fd);
2466
+ this._disabled$.next(false);
2017
2467
  }
2018
- showModal() {
2019
- this.modal.show();
2468
+ uploadDefinition() {
2469
+ this._disabled$.next(true);
2470
+ this._importFile$
2471
+ .pipe(switchMap((file) => file instanceof FormData
2472
+ ? this.dossierImportService.importDocumentDefinitionZip(file)
2473
+ : this.documentService.createDocumentDefinitionForManagement(new DocumentDefinitionCreateRequest(file))), take(1))
2474
+ .subscribe({
2475
+ next: () => {
2476
+ this._disabled$.next(false);
2477
+ this.uploadStatus$.next(UPLOAD_STATUS.FINISHED);
2478
+ },
2479
+ error: () => {
2480
+ this.uploadStatus$.next(UPLOAD_STATUS.ERROR);
2481
+ this._disabled$.next(false);
2482
+ },
2483
+ });
2020
2484
  }
2021
- hideModal() {
2022
- this.modal.hide();
2485
+ clearJsonString() {
2486
+ this._importFile$.next('');
2023
2487
  }
2024
2488
  stringIsValidJson(string) {
2025
2489
  try {
@@ -2030,25 +2494,33 @@ class DossierManagementUploadComponent {
2030
2494
  }
2031
2495
  return true;
2032
2496
  }
2033
- disable() {
2034
- this.disabled$.next(true);
2035
- }
2036
- enable() {
2037
- this.disabled$.next(false);
2497
+ setErrorState(fileItem) {
2498
+ this._disabled$.next(true);
2499
+ fileItem.invalid = true;
2500
+ fileItem.invalidTitle = this.translateService.instant('dossierManagement.importDefinition.invalidJsonError.title');
2501
+ fileItem.invalidText = this.translateService.instant('dossierManagement.importDefinition.invalidJsonError.text');
2038
2502
  }
2039
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementUploadComponent, deps: [{ token: i1.DocumentService }, { token: i3.TranslateService }, { token: i6.MenuService }], target: i0.ɵɵFactoryTarget.Component }); }
2040
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementUploadComponent, selector: "valtimo-dossier-management-upload", inputs: { show$: "show$" }, outputs: { definitionUploaded: "definitionUploaded" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["uploadDefinitionModal"], 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 #uploadDefinitionModal\n [title]=\"'Upload document definition' | translate\"\n showFooter=\"true\"\n>\n <div class=\"mt-2\" body>\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.jsonDocDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && (error$ | async) === ''; else disabledUpload\">\n <button [disabled]=\"disabled$ | async\" class=\"btn btn-primary\" (click)=\"uploadDefinition()\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #disabledUpload>\n <button [disabled]=\"true\" class=\"btn btn-primary\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\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 */\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
2503
+ resetModal() {
2504
+ setTimeout(() => {
2505
+ this.activeStep$.next(UPLOAD_STEP.PLUGINS);
2506
+ this.uploadStatus$.next(UPLOAD_STATUS.ACTIVE);
2507
+ this.showCheckboxError$.next(false);
2508
+ this._subscriptions.unsubscribe();
2509
+ }, CARBON_CONSTANTS.modalAnimationMs);
2510
+ }
2511
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementUploadComponent, deps: [{ token: i1.DocumentService }, { token: DossierImportService }, { token: i2$1.FormBuilder }, { token: i4.IconService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2512
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementUploadComponent, selector: "valtimo-dossier-management-upload", inputs: { open: "open" }, outputs: { closeModal: "closeModal" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["uploadDefinitionModal"], 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<cds-modal\n *ngIf=\"{\n activeStep: activeStep$ | async,\n backButtonEnabled: backButtonEnabled$ | async,\n isStepAfterUpload: isStepAfterUpload$ | async,\n nextButtonDisabled: nextButtonDisabled$ | async,\n notificationObj: notificationObj$ | async,\n showCheckboxError: showCheckboxError$ | async,\n showCloseButton: showCloseButton$ | async,\n uploadStatus: uploadStatus$ | async\n } as obs\"\n valtimoCdsModal\n [open]=\"open\"\n showFooter=\"true\"\n class=\"valtimo-definition-uploader\"\n (close)=\"onCloseModal()\"\n>\n <cds-modal-header\n [showCloseButton]=\"obs.showCloseButton\"\n (closeSelect)=\"onCloseModal(obs.isStepAfterUpload && obs.uploadStatus !== UPLOAD_STATUS.ERROR)\"\n >\n <h3 cdsModalHeaderHeading>\n {{ 'dossierManagement.importDefinition.title' | translate }}\n </h3>\n </cds-modal-header>\n\n <section [ngSwitch]=\"obs.activeStep\" cdsModalContent class=\"valtimo-definition-uploader__content\">\n <ng-template ngSwitchDefault>\n <valtimo-dossier-management-upload-step\n [message]=\"\n 'dossierManagement.importDefinition.steps.' + obs.activeStep + '.message' | translate\n \"\n [title]=\"\n 'dossierManagement.importDefinition.steps.' + obs.activeStep + '.title' | translate\n \"\n [illustration]=\"'valtimo-layout/img/' + obs.activeStep + '.svg'\"\n >\n </valtimo-dossier-management-upload-step>\n </ng-template>\n\n <form *ngSwitchCase=\"UPLOAD_STEP.FILE_SELECT\" [formGroup]=\"form\">\n <cds-file-uploader\n [accept]=\"acceptedFiles\"\n [buttonText]=\"'dossierManagement.importDefinition.upload.buttonText' | translate\"\n [description]=\"'dossierManagement.importDefinition.upload.description' | translate\"\n [multiple]=\"false\"\n [title]=\"'dossierManagement.importDefinition.upload.title' | translate\"\n buttonType=\"primary\"\n data-carbon-theme=\"g10\"\n formControlName=\"file\"\n class=\"valtimo-definition-uploader__file-uploader\"\n >\n </cds-file-uploader>\n\n <ng-container *ngIf=\"!obs.nextButtonDisabled\">\n <cds-inline-notification [notificationObj]=\"obs.notificationObj\"></cds-inline-notification>\n\n <div class=\"valtimo-uploader__checkbox\">\n <cds-checkbox\n [class.valtimo-definition-uploader__checkbox--invalid]=\"obs.showCheckboxError\"\n (checkedChange)=\"onCheckedChange($event)\"\n >\n {{ 'dossierManagement.importDefinition.checkbox.message' | translate }}\n </cds-checkbox>\n\n <div *ngIf=\"obs.showCheckboxError\" class=\"valtimo-definition-uploader__error\">\n <svg cdsIcon=\"warning--filled\" size=\"16\"></svg>\n\n {{ 'dossierManagement.importDefinition.checkbox.error' | translate }}\n </div>\n </div>\n </ng-container>\n </form>\n\n <cds-progress-bar\n *ngSwitchCase=\"UPLOAD_STEP.FILE_UPLOAD\"\n class=\"valtimo-definition-uploader__progress-bar\"\n [label]=\"'dossierManagement.importDefinition.progressBar.label' | translate\"\n [status]=\"obs.uploadStatus\"\n [helperText]=\"\n 'dossierManagement.importDefinition.progressBar.' + obs.uploadStatus | translate\n \"\n ></cds-progress-bar>\n </section>\n\n <cds-modal-footer\n class=\"valtimo-definition-uploader__footer\"\n [class.valtimo-definition-uploader__footer--double]=\"obs.activeStep === UPLOAD_STEP.PLUGINS\"\n >\n <button\n *ngIf=\"obs.uploadStatus !== UPLOAD_STATUS.ERROR && obs.activeStep !== UPLOAD_STEP.FILE_UPLOAD\"\n class=\"valtimo-definition-uploader__cancel\"\n cdsButton=\"ghost\"\n (click)=\"onCloseModal(obs.isStepAfterUpload)\"\n >\n {{ (obs.isStepAfterUpload ? 'interface.skip' : 'interface.cancel') | translate }}\n </button>\n\n <div class=\"valtimo-definition-uploader__actions\">\n <button\n *ngIf=\"obs.backButtonEnabled\"\n cdsButton=\"secondary\"\n (click)=\"onBackClick(obs.activeStep)\"\n >\n {{ 'interface.back' | translate }}\n </button>\n\n <button\n *ngIf=\"obs.uploadStatus !== UPLOAD_STATUS.ERROR && obs.activeStep !== UPLOAD_STEP.DASHBOARD\"\n cdsButton=\"primary\"\n [disabled]=\"obs.nextButtonDisabled\"\n (click)=\"onNextClick(obs.activeStep)\"\n >\n {{\n (obs.activeStep === UPLOAD_STEP.FILE_SELECT\n ? 'dossierManagement.importDefinition.startUpload'\n : 'interface.next'\n ) | translate\n }}\n </button>\n\n <button\n *ngIf=\"obs.uploadStatus === UPLOAD_STATUS.ERROR || obs.activeStep === UPLOAD_STEP.DASHBOARD\"\n class=\"valtimo-definition-uploader__cancel\"\n cdsButton=\"primary\"\n (click)=\"onCloseModal(true)\"\n >\n {{ 'interface.finish' | translate }}\n </button>\n </div>\n </cds-modal-footer>\n</cds-modal>\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 */.valtimo-definition-uploader__content,.valtimo-definition-uploader__content form{display:flex;flex-direction:column;gap:16px}.valtimo-definition-uploader__footer ::ng-deep .cds--modal-footer{justify-content:unset!important;display:grid!important;grid-template-columns:1fr 1fr 2fr!important;grid-template-areas:\"cancel . actions\"!important}.valtimo-definition-uploader__footer--double ::ng-deep .cds--modal-footer{grid-template-columns:1fr 1fr!important;grid-template-areas:\"cancel actions\"!important}.valtimo-definition-uploader__progress-bar{height:100%;display:flex;flex-direction:column;justify-content:center}.valtimo-definition-uploader__error{display:flex;align-items:center;gap:10px;color:#da1e28;fill:#da1e28;font-size:12px}.valtimo-definition-uploader__cancel{grid-area:cancel;width:100%}.valtimo-definition-uploader__actions{grid-area:actions;display:flex}.valtimo-definition-uploader__actions button{flex:unset;width:100%}.valtimo-definition-uploader__file-uploader ::ng-deep cds-file{max-width:unset}.valtimo-definition-uploader__checkbox{display:flex;flex-direction:column;gap:8px}.valtimo-definition-uploader__checkbox--invalid ::ng-deep label:before{border-color:#da1e28;margin-inline:0}.valtimo-definition-uploader ::ng-deep .cds--modal-container{height:550px}.valtimo-definition-uploader ::ng-deep .cds--checkbox-label-text{color:#000}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.Notification, selector: "cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "directive", type: i7.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "component", type: i4.FileUploader, selector: "cds-file-uploader, ibm-file-uploader", inputs: ["buttonText", "buttonType", "title", "description", "accept", "multiple", "skeleton", "size", "fileItemSize", "drop", "dropText", "fileUploaderId", "files", "disabled"], outputs: ["filesChange"] }, { kind: "component", type: i4.ProgressBar, selector: "cds-progress-bar, ibm-progress-bar", inputs: ["value", "id", "label", "helperText", "max", "type", "status", "size"] }, { kind: "component", type: DossierManagementUploadStepComponent, selector: "valtimo-dossier-management-upload-step", inputs: ["illustration", "message", "title"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2041
2513
  }
2042
2514
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementUploadComponent, decorators: [{
2043
2515
  type: Component,
2044
- args: [{ selector: 'valtimo-dossier-management-upload', 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 #uploadDefinitionModal\n [title]=\"'Upload document definition' | translate\"\n showFooter=\"true\"\n>\n <div class=\"mt-2\" body>\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.jsonDocDef' | translate\"\n [externalError$]=\"error$\"\n [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && (error$ | async) === ''; else disabledUpload\">\n <button [disabled]=\"disabled$ | async\" class=\"btn btn-primary\" (click)=\"uploadDefinition()\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #disabledUpload>\n <button [disabled]=\"true\" class=\"btn btn-primary\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\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 */\n"] }]
2045
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i3.TranslateService }, { type: i6.MenuService }]; }, propDecorators: { show$: [{
2046
- type: Input
2047
- }], definitionUploaded: [{
2048
- type: Output
2049
- }], modal: [{
2516
+ args: [{ selector: 'valtimo-dossier-management-upload', changeDetection: ChangeDetectionStrategy.OnPush, 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<cds-modal\n *ngIf=\"{\n activeStep: activeStep$ | async,\n backButtonEnabled: backButtonEnabled$ | async,\n isStepAfterUpload: isStepAfterUpload$ | async,\n nextButtonDisabled: nextButtonDisabled$ | async,\n notificationObj: notificationObj$ | async,\n showCheckboxError: showCheckboxError$ | async,\n showCloseButton: showCloseButton$ | async,\n uploadStatus: uploadStatus$ | async\n } as obs\"\n valtimoCdsModal\n [open]=\"open\"\n showFooter=\"true\"\n class=\"valtimo-definition-uploader\"\n (close)=\"onCloseModal()\"\n>\n <cds-modal-header\n [showCloseButton]=\"obs.showCloseButton\"\n (closeSelect)=\"onCloseModal(obs.isStepAfterUpload && obs.uploadStatus !== UPLOAD_STATUS.ERROR)\"\n >\n <h3 cdsModalHeaderHeading>\n {{ 'dossierManagement.importDefinition.title' | translate }}\n </h3>\n </cds-modal-header>\n\n <section [ngSwitch]=\"obs.activeStep\" cdsModalContent class=\"valtimo-definition-uploader__content\">\n <ng-template ngSwitchDefault>\n <valtimo-dossier-management-upload-step\n [message]=\"\n 'dossierManagement.importDefinition.steps.' + obs.activeStep + '.message' | translate\n \"\n [title]=\"\n 'dossierManagement.importDefinition.steps.' + obs.activeStep + '.title' | translate\n \"\n [illustration]=\"'valtimo-layout/img/' + obs.activeStep + '.svg'\"\n >\n </valtimo-dossier-management-upload-step>\n </ng-template>\n\n <form *ngSwitchCase=\"UPLOAD_STEP.FILE_SELECT\" [formGroup]=\"form\">\n <cds-file-uploader\n [accept]=\"acceptedFiles\"\n [buttonText]=\"'dossierManagement.importDefinition.upload.buttonText' | translate\"\n [description]=\"'dossierManagement.importDefinition.upload.description' | translate\"\n [multiple]=\"false\"\n [title]=\"'dossierManagement.importDefinition.upload.title' | translate\"\n buttonType=\"primary\"\n data-carbon-theme=\"g10\"\n formControlName=\"file\"\n class=\"valtimo-definition-uploader__file-uploader\"\n >\n </cds-file-uploader>\n\n <ng-container *ngIf=\"!obs.nextButtonDisabled\">\n <cds-inline-notification [notificationObj]=\"obs.notificationObj\"></cds-inline-notification>\n\n <div class=\"valtimo-uploader__checkbox\">\n <cds-checkbox\n [class.valtimo-definition-uploader__checkbox--invalid]=\"obs.showCheckboxError\"\n (checkedChange)=\"onCheckedChange($event)\"\n >\n {{ 'dossierManagement.importDefinition.checkbox.message' | translate }}\n </cds-checkbox>\n\n <div *ngIf=\"obs.showCheckboxError\" class=\"valtimo-definition-uploader__error\">\n <svg cdsIcon=\"warning--filled\" size=\"16\"></svg>\n\n {{ 'dossierManagement.importDefinition.checkbox.error' | translate }}\n </div>\n </div>\n </ng-container>\n </form>\n\n <cds-progress-bar\n *ngSwitchCase=\"UPLOAD_STEP.FILE_UPLOAD\"\n class=\"valtimo-definition-uploader__progress-bar\"\n [label]=\"'dossierManagement.importDefinition.progressBar.label' | translate\"\n [status]=\"obs.uploadStatus\"\n [helperText]=\"\n 'dossierManagement.importDefinition.progressBar.' + obs.uploadStatus | translate\n \"\n ></cds-progress-bar>\n </section>\n\n <cds-modal-footer\n class=\"valtimo-definition-uploader__footer\"\n [class.valtimo-definition-uploader__footer--double]=\"obs.activeStep === UPLOAD_STEP.PLUGINS\"\n >\n <button\n *ngIf=\"obs.uploadStatus !== UPLOAD_STATUS.ERROR && obs.activeStep !== UPLOAD_STEP.FILE_UPLOAD\"\n class=\"valtimo-definition-uploader__cancel\"\n cdsButton=\"ghost\"\n (click)=\"onCloseModal(obs.isStepAfterUpload)\"\n >\n {{ (obs.isStepAfterUpload ? 'interface.skip' : 'interface.cancel') | translate }}\n </button>\n\n <div class=\"valtimo-definition-uploader__actions\">\n <button\n *ngIf=\"obs.backButtonEnabled\"\n cdsButton=\"secondary\"\n (click)=\"onBackClick(obs.activeStep)\"\n >\n {{ 'interface.back' | translate }}\n </button>\n\n <button\n *ngIf=\"obs.uploadStatus !== UPLOAD_STATUS.ERROR && obs.activeStep !== UPLOAD_STEP.DASHBOARD\"\n cdsButton=\"primary\"\n [disabled]=\"obs.nextButtonDisabled\"\n (click)=\"onNextClick(obs.activeStep)\"\n >\n {{\n (obs.activeStep === UPLOAD_STEP.FILE_SELECT\n ? 'dossierManagement.importDefinition.startUpload'\n : 'interface.next'\n ) | translate\n }}\n </button>\n\n <button\n *ngIf=\"obs.uploadStatus === UPLOAD_STATUS.ERROR || obs.activeStep === UPLOAD_STEP.DASHBOARD\"\n class=\"valtimo-definition-uploader__cancel\"\n cdsButton=\"primary\"\n (click)=\"onCloseModal(true)\"\n >\n {{ 'interface.finish' | translate }}\n </button>\n </div>\n </cds-modal-footer>\n</cds-modal>\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 */.valtimo-definition-uploader__content,.valtimo-definition-uploader__content form{display:flex;flex-direction:column;gap:16px}.valtimo-definition-uploader__footer ::ng-deep .cds--modal-footer{justify-content:unset!important;display:grid!important;grid-template-columns:1fr 1fr 2fr!important;grid-template-areas:\"cancel . actions\"!important}.valtimo-definition-uploader__footer--double ::ng-deep .cds--modal-footer{grid-template-columns:1fr 1fr!important;grid-template-areas:\"cancel actions\"!important}.valtimo-definition-uploader__progress-bar{height:100%;display:flex;flex-direction:column;justify-content:center}.valtimo-definition-uploader__error{display:flex;align-items:center;gap:10px;color:#da1e28;fill:#da1e28;font-size:12px}.valtimo-definition-uploader__cancel{grid-area:cancel;width:100%}.valtimo-definition-uploader__actions{grid-area:actions;display:flex}.valtimo-definition-uploader__actions button{flex:unset;width:100%}.valtimo-definition-uploader__file-uploader ::ng-deep cds-file{max-width:unset}.valtimo-definition-uploader__checkbox{display:flex;flex-direction:column;gap:8px}.valtimo-definition-uploader__checkbox--invalid ::ng-deep label:before{border-color:#da1e28;margin-inline:0}.valtimo-definition-uploader ::ng-deep .cds--modal-container{height:550px}.valtimo-definition-uploader ::ng-deep .cds--checkbox-label-text{color:#000}\n"] }]
2517
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: DossierImportService }, { type: i2$1.FormBuilder }, { type: i4.IconService }, { type: i3.TranslateService }]; }, propDecorators: { modal: [{
2050
2518
  type: ViewChild,
2051
2519
  args: ['uploadDefinitionModal']
2520
+ }], open: [{
2521
+ type: Input
2522
+ }], closeModal: [{
2523
+ type: Output
2052
2524
  }] } });
2053
2525
 
2054
2526
  /*
@@ -2068,54 +2540,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2068
2540
  */
2069
2541
  moment.locale(localStorage.getItem('langKey') || '');
2070
2542
  class DossierManagementListComponent {
2071
- constructor(documentService, router) {
2543
+ constructor(documentService, iconService, menuService, router) {
2072
2544
  this.documentService = documentService;
2545
+ this.iconService = iconService;
2546
+ this.menuService = menuService;
2073
2547
  this.router = router;
2074
- this.dossiers = [];
2075
2548
  this.pagination = {
2076
2549
  collectionSize: 0,
2077
2550
  page: 1,
2078
2551
  size: 10,
2079
2552
  };
2080
- this.pageParam = 0;
2553
+ this._refreshData$ = new BehaviorSubject(null);
2554
+ this.dossiers$ = this._refreshData$.pipe(switchMap(() => this.documentService.queryDefinitionsForManagement({
2555
+ page: this.pagination.page - 1,
2556
+ size: this.pagination.size,
2557
+ })), map((documentDefinitionPage) => {
2558
+ this.pagination = {
2559
+ ...this.pagination,
2560
+ collectionSize: documentDefinitionPage.totalElements,
2561
+ };
2562
+ return documentDefinitionPage.content.map((documentDefinition) => ({
2563
+ ...documentDefinition,
2564
+ createdOn: moment(documentDefinition.createdOn).format('DD MMM YYYY HH:mm'),
2565
+ }));
2566
+ }));
2081
2567
  this.dossierFields = [
2082
- { key: 'schema.title', label: 'Title' },
2083
- { key: 'createdOn', label: 'Created On' },
2084
- { key: 'readOnly', label: 'Read-only' },
2568
+ { key: 'schema.title', label: 'fieldLabels.title', viewType: ViewType.TEXT },
2569
+ { key: 'createdOn', label: 'fieldLabels.createdOn', viewType: ViewType.TEXT },
2570
+ { key: 'readOnly', label: 'fieldLabels.readOnly', viewType: ViewType.BOOLEAN },
2085
2571
  ];
2086
2572
  this.showModal$ = new BehaviorSubject(false);
2573
+ this.iconService.registerAll([Upload16]);
2574
+ }
2575
+ onCloseModal(definitionUploaded) {
2576
+ this.showModal$.next(false);
2577
+ if (!definitionUploaded) {
2578
+ return;
2579
+ }
2580
+ this._refreshData$.next(null);
2581
+ this.menuService.reload();
2087
2582
  }
2088
2583
  paginationClicked(page) {
2089
- this.pageParam = page - 1;
2090
- this.getDocumentDefinitions();
2584
+ this.pagination = { ...this.pagination, page };
2585
+ this._refreshData$.next(null);
2091
2586
  }
2092
- paginationSet() {
2093
- this.getDocumentDefinitions();
2587
+ paginationSet(size) {
2588
+ this.pagination = { ...this.pagination, size };
2589
+ this._refreshData$.next(null);
2094
2590
  }
2095
2591
  redirectToDetails(documentDefinition) {
2096
2592
  this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);
2097
2593
  }
2098
- getDocumentDefinitions() {
2099
- this.documentService
2100
- .queryDefinitionsForManagement({ page: this.pageParam, size: this.pagination.size })
2101
- .subscribe((documentDefinitionPage) => {
2102
- this.pagination.collectionSize = documentDefinitionPage.totalElements;
2103
- this.dossiers = documentDefinitionPage.content;
2104
- this.dossiers.map((dossier) => {
2105
- dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');
2106
- });
2107
- });
2108
- }
2109
2594
  showModal() {
2110
2595
  this.showModal$.next(true);
2111
2596
  }
2112
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementListComponent, deps: [{ token: i1.DocumentService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2113
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementListComponent, selector: "valtimo-dossier-management-list", 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 class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-secondary btn-space mr-0\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Dossiers' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Dossiers' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"paginationSet()\"\n></valtimo-dossier-management-upload>\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 */\n"], dependencies: [{ kind: "component", type: i6.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: DossierManagementUploadComponent, selector: "valtimo-dossier-management-upload", inputs: ["show$"], outputs: ["definitionUploaded"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
2597
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementListComponent, deps: [{ token: i1.DocumentService }, { token: i4.IconService }, { token: i7.MenuService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2598
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DossierManagementListComponent, selector: "valtimo-dossier-management-list", 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-carbon-list\n *ngIf=\"dossiers$ | async as dossiers; else loading\"\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n>\n <ng-container carbonToolbarContent [ngTemplateOutlet]=\"importCaseDefinitionButton\"></ng-container>\n\n <valtimo-no-results\n [action]=\"addCaseDefinitionButton\"\n [description]=\"'dossierManagement.noResults.description' | translate\"\n [title]=\"'dossierManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #loading>\n <valtimo-carbon-list loading=\"true\"></valtimo-carbon-list>\n</ng-template>\n\n<valtimo-dossier-management-upload\n [open]=\"showModal$ | async\"\n (closeModal)=\"onCloseModal($event)\"\n></valtimo-dossier-management-upload>\n\n<ng-template #importCaseDefinitionButton>\n <button cdsButton=\"primary\" (click)=\"showModal()\">\n <svg cdsIcon=\"upload\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'Import' | translate }}\n </button>\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 */\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i7.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: i7.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "component", type: DossierManagementUploadComponent, selector: "valtimo-dossier-management-upload", inputs: ["open"], outputs: ["closeModal"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
2114
2599
  }
2115
2600
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementListComponent, decorators: [{
2116
2601
  type: Component,
2117
- args: [{ selector: 'valtimo-dossier-management-list', 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 class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-secondary btn-space mr-0\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Dossiers' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Dossiers' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"paginationSet()\"\n></valtimo-dossier-management-upload>\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 */\n"] }]
2118
- }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i2.Router }]; } });
2602
+ args: [{ selector: 'valtimo-dossier-management-list', 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-carbon-list\n *ngIf=\"dossiers$ | async as dossiers; else loading\"\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"redirectToDetails($event)\"\n>\n <ng-container carbonToolbarContent [ngTemplateOutlet]=\"importCaseDefinitionButton\"></ng-container>\n\n <valtimo-no-results\n [action]=\"addCaseDefinitionButton\"\n [description]=\"'dossierManagement.noResults.description' | translate\"\n [title]=\"'dossierManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #loading>\n <valtimo-carbon-list loading=\"true\"></valtimo-carbon-list>\n</ng-template>\n\n<valtimo-dossier-management-upload\n [open]=\"showModal$ | async\"\n (closeModal)=\"onCloseModal($event)\"\n></valtimo-dossier-management-upload>\n\n<ng-template #importCaseDefinitionButton>\n <button cdsButton=\"primary\" (click)=\"showModal()\">\n <svg cdsIcon=\"upload\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'Import' | translate }}\n </button>\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 */\n"] }]
2603
+ }], ctorParameters: function () { return [{ type: i1.DocumentService }, { type: i4.IconService }, { type: i7.MenuService }, { type: i2.Router }]; } });
2119
2604
 
2120
2605
  /*
2121
2606
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -2190,7 +2675,11 @@ class DossierManagementModule {
2190
2675
  DossierManagementTabsComponent,
2191
2676
  DossierManagementAddTabModalComponent,
2192
2677
  TabFormComponent,
2193
- DossierManagementEditTabModalComponent], imports: [CommonModule,
2678
+ DossierManagementEditTabModalComponent,
2679
+ DossierManagementDetailContainerActionsComponent,
2680
+ DossierManagementDocumentDefinitionComponent,
2681
+ DossierManagementProcessesComponent,
2682
+ DossierManagementUploadStepComponent], imports: [CommonModule,
2194
2683
  WidgetModule,
2195
2684
  DropzoneModule,
2196
2685
  ListModule,
@@ -2220,11 +2709,20 @@ class DossierManagementModule {
2220
2709
  LoadingModule,
2221
2710
  LinkModule,
2222
2711
  ConfirmationModalModule,
2223
- CarbonMultiInputModule,
2224
2712
  TableModule,
2225
2713
  ValtimoCdsModalDirectiveModule,
2226
2714
  CarbonListModule,
2227
- ComboBoxModule] }); }
2715
+ ComboBoxModule,
2716
+ RenderInPageHeaderDirectiveModule,
2717
+ DialogModule,
2718
+ ValtimoCdsOverflowButtonDirectiveModule,
2719
+ NotificationModule,
2720
+ EditorModule,
2721
+ CarbonListModule,
2722
+ TabsModule,
2723
+ TagModule,
2724
+ FileUploaderModule,
2725
+ ProgressBarModule] }); }
2228
2726
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementModule, providers: [TabManagementService], imports: [CommonModule,
2229
2727
  WidgetModule,
2230
2728
  DropzoneModule,
@@ -2255,11 +2753,20 @@ class DossierManagementModule {
2255
2753
  LoadingModule,
2256
2754
  LinkModule,
2257
2755
  ConfirmationModalModule,
2258
- CarbonMultiInputModule,
2259
2756
  TableModule,
2260
2757
  ValtimoCdsModalDirectiveModule,
2261
2758
  CarbonListModule,
2262
- ComboBoxModule] }); }
2759
+ ComboBoxModule,
2760
+ RenderInPageHeaderDirectiveModule,
2761
+ DialogModule,
2762
+ ValtimoCdsOverflowButtonDirectiveModule,
2763
+ NotificationModule,
2764
+ EditorModule,
2765
+ CarbonListModule,
2766
+ TabsModule,
2767
+ TagModule,
2768
+ FileUploaderModule,
2769
+ ProgressBarModule] }); }
2263
2770
  }
2264
2771
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DossierManagementModule, decorators: [{
2265
2772
  type: NgModule,
@@ -2279,6 +2786,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2279
2786
  DossierManagementAddTabModalComponent,
2280
2787
  TabFormComponent,
2281
2788
  DossierManagementEditTabModalComponent,
2789
+ DossierManagementDetailContainerActionsComponent,
2790
+ DossierManagementDocumentDefinitionComponent,
2791
+ DossierManagementProcessesComponent,
2792
+ DossierManagementUploadStepComponent,
2282
2793
  ],
2283
2794
  imports: [
2284
2795
  CommonModule,
@@ -2311,11 +2822,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2311
2822
  LoadingModule,
2312
2823
  LinkModule,
2313
2824
  ConfirmationModalModule,
2314
- CarbonMultiInputModule,
2315
2825
  TableModule,
2316
2826
  ValtimoCdsModalDirectiveModule,
2317
2827
  CarbonListModule,
2318
2828
  ComboBoxModule,
2829
+ RenderInPageHeaderDirectiveModule,
2830
+ DialogModule,
2831
+ ValtimoCdsOverflowButtonDirectiveModule,
2832
+ NotificationModule,
2833
+ EditorModule,
2834
+ CarbonListModule,
2835
+ TabsModule,
2836
+ TagModule,
2837
+ FileUploaderModule,
2838
+ ProgressBarModule,
2319
2839
  ],
2320
2840
  providers: [TabManagementService],
2321
2841
  }]