@valtimo/dossier-management 4.21.0 → 5.0.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 (52) hide show
  1. package/esm2020/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.mjs +92 -0
  2. package/esm2020/lib/dossier-management-detail/dossier-management-detail.component.mjs +102 -0
  3. package/esm2020/lib/dossier-management-list/dossier-management-list.component.mjs +76 -0
  4. package/esm2020/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.mjs +57 -0
  5. package/esm2020/lib/dossier-management-roles/dossier-management-roles.component.mjs +97 -0
  6. package/esm2020/lib/dossier-management-routing.module.mjs +51 -0
  7. package/esm2020/lib/dossier-management-upload/dossier-management-upload.component.mjs +157 -0
  8. package/esm2020/lib/dossier-management.module.mjs +90 -0
  9. package/esm2020/public-api.mjs +21 -0
  10. package/esm2020/valtimo-dossier-management.mjs +5 -0
  11. package/fesm2015/valtimo-dossier-management.mjs +691 -0
  12. package/fesm2015/valtimo-dossier-management.mjs.map +1 -0
  13. package/fesm2020/valtimo-dossier-management.mjs +691 -0
  14. package/fesm2020/valtimo-dossier-management.mjs.map +1 -0
  15. package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts +4 -0
  16. package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts.map +1 -0
  17. package/lib/dossier-management-detail/dossier-management-detail.component.d.ts +4 -0
  18. package/lib/dossier-management-detail/dossier-management-detail.component.d.ts.map +1 -0
  19. package/lib/dossier-management-list/dossier-management-list.component.d.ts +4 -0
  20. package/lib/dossier-management-list/dossier-management-list.component.d.ts.map +1 -0
  21. package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts +4 -0
  22. package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts.map +1 -0
  23. package/lib/dossier-management-roles/dossier-management-roles.component.d.ts +5 -1
  24. package/lib/dossier-management-roles/dossier-management-roles.component.d.ts.map +1 -0
  25. package/lib/dossier-management-routing.module.d.ts +6 -0
  26. package/lib/dossier-management-routing.module.d.ts.map +1 -0
  27. package/lib/dossier-management-upload/dossier-management-upload.component.d.ts +4 -0
  28. package/lib/dossier-management-upload/dossier-management-upload.component.d.ts.map +1 -0
  29. package/lib/dossier-management.module.d.ts +18 -0
  30. package/lib/dossier-management.module.d.ts.map +1 -0
  31. package/package.json +22 -10
  32. package/public-api.d.ts +1 -0
  33. package/public-api.d.ts.map +1 -0
  34. package/valtimo-dossier-management.d.ts +2 -6
  35. package/valtimo-dossier-management.d.ts.map +1 -0
  36. package/bundles/valtimo-dossier-management.umd.js +0 -708
  37. package/bundles/valtimo-dossier-management.umd.js.map +0 -1
  38. package/bundles/valtimo-dossier-management.umd.min.js +0 -2
  39. package/bundles/valtimo-dossier-management.umd.min.js.map +0 -1
  40. package/esm2015/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.js +0 -92
  41. package/esm2015/lib/dossier-management-detail/dossier-management-detail.component.js +0 -99
  42. package/esm2015/lib/dossier-management-list/dossier-management-list.component.js +0 -78
  43. package/esm2015/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.js +0 -63
  44. package/esm2015/lib/dossier-management-roles/dossier-management-roles.component.js +0 -103
  45. package/esm2015/lib/dossier-management-routing.module.js +0 -47
  46. package/esm2015/lib/dossier-management-upload/dossier-management-upload.component.js +0 -158
  47. package/esm2015/lib/dossier-management.module.js +0 -59
  48. package/esm2015/public-api.js +0 -21
  49. package/esm2015/valtimo-dossier-management.js +0 -11
  50. package/fesm2015/valtimo-dossier-management.js +0 -682
  51. package/fesm2015/valtimo-dossier-management.js.map +0 -1
  52. package/valtimo-dossier-management.metadata.json +0 -1
@@ -0,0 +1,691 @@
1
+ import * as i5 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Component, Output, ViewChild, Input, NgModule } from '@angular/core';
5
+ import * as i6 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i4 from '@ngx-translate/core';
8
+ import { TranslateModule } from '@ngx-translate/core';
9
+ import * as i3$1 from '@valtimo/components';
10
+ import { WidgetModule, DropzoneModule, ListModule, ModalModule, MultiselectDropdownModule } from '@valtimo/components';
11
+ import * as i5$1 from '@valtimo/config';
12
+ import { ROLE_ADMIN, ConfigModule } from '@valtimo/config';
13
+ import * as i1 from '@valtimo/process';
14
+ import * as i1$1 from '@valtimo/document';
15
+ import { DocumentDefinitionCreateRequest } from '@valtimo/document';
16
+ import * as i3 from 'ngx-toastr';
17
+ import * as i7 from '@ng-bootstrap/ng-bootstrap';
18
+ import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
19
+ import * as i2 from '@angular/router';
20
+ import { RouterModule } from '@angular/router';
21
+ import { BehaviorSubject, Subject } from 'rxjs';
22
+ import { isEqual } from 'lodash';
23
+ import * as i1$2 from '@valtimo/authority';
24
+ import moment from 'moment';
25
+ import { switchMap, tap, take } from 'rxjs/operators';
26
+ import { AuthGuardService } from '@valtimo/security';
27
+
28
+ /*
29
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
30
+ *
31
+ * Licensed under EUPL, Version 1.2 (the "License");
32
+ * you may not use this file except in compliance with the License.
33
+ * You may obtain a copy of the License at
34
+ *
35
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
36
+ *
37
+ * Unless required by applicable law or agreed to in writing, software
38
+ * distributed under the License is distributed on an "AS IS" basis,
39
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40
+ * See the License for the specific language governing permissions and
41
+ * limitations under the License.
42
+ */
43
+ class DossierManagementConnectModalComponent {
44
+ constructor(processService, documentService, toasterService) {
45
+ this.processService = processService;
46
+ this.documentService = documentService;
47
+ this.toasterService = toasterService;
48
+ this.documentDefinition = null;
49
+ this.newDocumentProcessDefinition = null;
50
+ this.newDocumentProcessDefinitionInit = true;
51
+ this.newDocumentProcessDefinitionStartableByUser = false;
52
+ this.processDocumentDefinitionExists = {};
53
+ this.reloadProcessDocumentDefinitions = new EventEmitter();
54
+ }
55
+ loadProcessDocumentDefinitions() {
56
+ this.processDocumentDefinitionExists = {};
57
+ this.documentService
58
+ .findProcessDocumentDefinitions(this.documentDefinition.id.name)
59
+ .subscribe((processDocumentDefinitions) => {
60
+ processDocumentDefinitions.forEach((processDocumentDefinition) => {
61
+ this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
62
+ });
63
+ });
64
+ }
65
+ loadProcessDefinitions() {
66
+ this.processService
67
+ .getProcessDefinitions()
68
+ .subscribe((processDefinitions) => {
69
+ this.processDefinitions = processDefinitions;
70
+ });
71
+ }
72
+ ngOnInit() {
73
+ this.loadProcessDefinitions();
74
+ }
75
+ openModal(dossier) {
76
+ this.documentDefinition = dossier;
77
+ this.newDocumentProcessDefinition = null;
78
+ this.newDocumentProcessDefinitionInit = true;
79
+ this.newDocumentProcessDefinitionStartableByUser = false;
80
+ this.loadProcessDocumentDefinitions();
81
+ this.modal.show();
82
+ }
83
+ submit() {
84
+ const request = {
85
+ canInitializeDocument: this.newDocumentProcessDefinitionInit,
86
+ startableByUser: this.newDocumentProcessDefinitionStartableByUser,
87
+ documentDefinitionName: this.documentDefinition.id.name,
88
+ processDefinitionKey: this.newDocumentProcessDefinition.key,
89
+ };
90
+ this.documentService.createProcessDocumentDefinition(request).subscribe(() => {
91
+ this.toasterService.success('Successfully added new process document definition');
92
+ this.reloadProcessDocumentDefinitions.emit();
93
+ }, err => {
94
+ this.toasterService.error('Failed to add new process document definition');
95
+ });
96
+ }
97
+ }
98
+ DossierManagementConnectModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementConnectModalComponent, deps: [{ token: i1.ProcessService }, { token: i1$1.DocumentService }, { token: i3.ToastrService }], target: i0.ɵɵFactoryTarget.Component });
99
+ DossierManagementConnectModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", 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-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #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-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], components: [{ type: i3$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }], pipes: { "translate": i4.TranslatePipe } });
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementConnectModalComponent, decorators: [{
101
+ type: Component,
102
+ args: [{ selector: 'valtimo-dossier-management-connect-modal', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #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-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
103
+ }], ctorParameters: function () { return [{ type: i1.ProcessService }, { type: i1$1.DocumentService }, { type: i3.ToastrService }]; }, propDecorators: { reloadProcessDocumentDefinitions: [{
104
+ type: Output
105
+ }], modal: [{
106
+ type: ViewChild,
107
+ args: ['dossierConnectModal']
108
+ }] } });
109
+
110
+ /*
111
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
112
+ *
113
+ * Licensed under EUPL, Version 1.2 (the "License");
114
+ * you may not use this file except in compliance with the License.
115
+ * You may obtain a copy of the License at
116
+ *
117
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
118
+ *
119
+ * Unless required by applicable law or agreed to in writing, software
120
+ * distributed under the License is distributed on an "AS IS" basis,
121
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122
+ * See the License for the specific language governing permissions and
123
+ * limitations under the License.
124
+ */
125
+ class DossierManagementRolesComponent {
126
+ constructor(authorityService, documentService, alertService, translateService) {
127
+ this.authorityService = authorityService;
128
+ this.documentService = documentService;
129
+ this.alertService = alertService;
130
+ this.translateService = translateService;
131
+ this.dropdownSettings = {
132
+ singleSelection: false,
133
+ idField: 'name',
134
+ textField: 'name',
135
+ selectAllText: 'Select All',
136
+ unSelectAllText: 'UnSelect All',
137
+ itemsShowLimit: 3,
138
+ enableCheckAll: true,
139
+ allowSearchFilter: true,
140
+ };
141
+ this.roles = new BehaviorSubject(undefined);
142
+ this.preSelectedItems = new BehaviorSubject(undefined);
143
+ }
144
+ ngOnInit() {
145
+ this.loadAllRoles();
146
+ }
147
+ loadAllRoles() {
148
+ this.authorityService.query().subscribe(result => {
149
+ this.roles.next(result.body);
150
+ this.loadDocumentRoles();
151
+ });
152
+ }
153
+ loadDocumentRoles() {
154
+ if (this.documentDefinitionName) {
155
+ this.documentService.getDocumentRoles(this.documentDefinitionName).subscribe(result => {
156
+ this.preSelectedItems.next(result);
157
+ }, err => {
158
+ this.alertService.warning(this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyRetrievedRoles'));
159
+ });
160
+ }
161
+ }
162
+ onSelectedItems(data) {
163
+ const roles = this.returnArrayOfString(data);
164
+ if (isEqual(roles, this.preSelectedItems.value)) {
165
+ return;
166
+ }
167
+ this.documentService.modifyDocumentRoles(this.documentDefinitionName, roles).subscribe(() => {
168
+ this.alertService.success(this.translateService.instant('dossierManagement.roles.messages.successfullyStored'));
169
+ this.preSelectedItems.next(roles);
170
+ }, err => {
171
+ this.alertService.error(this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyStored'));
172
+ });
173
+ }
174
+ /**
175
+ * The data could be either an array of string (i.e. ["ROLE_ADMIN", "ROLE_DEVELOPER"]
176
+ * or an array of object with name parameters (i.e. [{"name": "ROLE_ADMIN"},{"name":"ROLE_DEVELOPER}]
177
+ *
178
+ * This method will always make sure an array of strings is returned
179
+ */
180
+ returnArrayOfString(data) {
181
+ return data.map(el => {
182
+ if (typeof el === 'string') {
183
+ return el;
184
+ }
185
+ return el.name;
186
+ });
187
+ }
188
+ }
189
+ DossierManagementRolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRolesComponent, deps: [{ token: i1$2.AuthorityService }, { token: i1$1.DocumentService }, { token: i3$1.AlertService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
190
+ DossierManagementRolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierManagementRolesComponent, selector: "valtimo-dossier-management-roles", inputs: { documentDefinitionName: "documentDefinitionName" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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\">{{ 'connectorManagement.extension.title' | translate }}</h2>-->\n<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.roles.rolesTitle' | translate }}</h2>\n<p class=\"card-text\">{{ 'dossierManagement.roles.rolesDescription' | translate }}</p>\n\n<valtimo-multiselect-dropdown\n [items]=\"roles | async\"\n [selectedItems]=\"preSelectedItems | async\"\n [dropdownSettings]=\"dropdownSettings\"\n [placeHolder]=\"'dossierManagement.roles.rolesPlaceHolder' | translate\"\n (itemsSelected)=\"onSelectedItems($event)\"\n></valtimo-multiselect-dropdown>\n", styles: [""], components: [{ type: i3$1.MultiselectDropdownComponent, selector: "valtimo-multiselect-dropdown", inputs: ["selectedItems", "items", "placeHolder", "dropdownSettings"], outputs: ["itemsSelected"] }], pipes: { "translate": i4.TranslatePipe, "async": i5.AsyncPipe } });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRolesComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'valtimo-dossier-management-roles', template: "<!--\n ~ Copyright 2015-2022 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\">{{ 'connectorManagement.extension.title' | translate }}</h2>-->\n<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.roles.rolesTitle' | translate }}</h2>\n<p class=\"card-text\">{{ 'dossierManagement.roles.rolesDescription' | translate }}</p>\n\n<valtimo-multiselect-dropdown\n [items]=\"roles | async\"\n [selectedItems]=\"preSelectedItems | async\"\n [dropdownSettings]=\"dropdownSettings\"\n [placeHolder]=\"'dossierManagement.roles.rolesPlaceHolder' | translate\"\n (itemsSelected)=\"onSelectedItems($event)\"\n></valtimo-multiselect-dropdown>\n", styles: [""] }]
194
+ }], ctorParameters: function () { return [{ type: i1$2.AuthorityService }, { type: i1$1.DocumentService }, { type: i3$1.AlertService }, { type: i4.TranslateService }]; }, propDecorators: { documentDefinitionName: [{
195
+ type: Input
196
+ }] } });
197
+
198
+ /*
199
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
200
+ *
201
+ * Licensed under EUPL, Version 1.2 (the "License");
202
+ * you may not use this file except in compliance with the License.
203
+ * You may obtain a copy of the License at
204
+ *
205
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
206
+ *
207
+ * Unless required by applicable law or agreed to in writing, software
208
+ * distributed under the License is distributed on an "AS IS" basis,
209
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
210
+ * See the License for the specific language governing permissions and
211
+ * limitations under the License.
212
+ */
213
+ class DossierManagementRemoveModalComponent {
214
+ constructor(documentService, toasterService, router, translateService, menuService) {
215
+ this.documentService = documentService;
216
+ this.toasterService = toasterService;
217
+ this.router = router;
218
+ this.translateService = translateService;
219
+ this.menuService = menuService;
220
+ this.documentDefinition = null;
221
+ this.errors = [];
222
+ }
223
+ openModal(documentDefinition) {
224
+ this.documentDefinition = documentDefinition;
225
+ this.modal.show();
226
+ }
227
+ removeDocumentDefinition() {
228
+ this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(() => {
229
+ this.menuService.reload();
230
+ this.router.navigate(['/dossier-management']);
231
+ this.toasterService.success(this.translateService.instant('remove-document-definition-success'));
232
+ }, (result) => {
233
+ this.errors = result.errors;
234
+ });
235
+ }
236
+ }
237
+ DossierManagementRemoveModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRemoveModalComponent, deps: [{ token: i1$1.DocumentService }, { token: i3.ToastrService }, { token: i2.Router }, { token: i4.TranslateService }, { token: i3$1.MenuService }], target: i0.ɵɵFactoryTarget.Component });
238
+ DossierManagementRemoveModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierManagementRemoveModalComponent, selector: "valtimo-dossier-management-remove-modal", viewQueries: [{ propertyName: "modal", first: true, predicate: ["documentDefinitionRemoveModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #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-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], components: [{ type: i3$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe } });
239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRemoveModalComponent, decorators: [{
240
+ type: Component,
241
+ args: [{ selector: 'valtimo-dossier-management-remove-modal', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #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-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
242
+ }], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i3.ToastrService }, { type: i2.Router }, { type: i4.TranslateService }, { type: i3$1.MenuService }]; }, propDecorators: { modal: [{
243
+ type: ViewChild,
244
+ args: ['documentDefinitionRemoveModal']
245
+ }] } });
246
+
247
+ /*
248
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
249
+ *
250
+ * Licensed under EUPL, Version 1.2 (the "License");
251
+ * you may not use this file except in compliance with the License.
252
+ * You may obtain a copy of the License at
253
+ *
254
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
255
+ *
256
+ * Unless required by applicable law or agreed to in writing, software
257
+ * distributed under the License is distributed on an "AS IS" basis,
258
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
259
+ * See the License for the specific language governing permissions and
260
+ * limitations under the License.
261
+ */
262
+ class DossierManagementDetailComponent {
263
+ constructor(documentService, route, alertService) {
264
+ this.documentService = documentService;
265
+ this.route = route;
266
+ this.alertService = alertService;
267
+ this.documentDefinitionName = null;
268
+ this.documentDefinition = null;
269
+ this.processDocumentDefinitions = [];
270
+ this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
271
+ }
272
+ ngOnInit() {
273
+ this.loadDocumentDefinition();
274
+ this.loadProcessDocumentDefinitions();
275
+ }
276
+ loadProcessDocumentDefinitions() {
277
+ this.documentService
278
+ .findProcessDocumentDefinitions(this.documentDefinitionName)
279
+ .subscribe((processDocumentDefinitions) => {
280
+ this.processDocumentDefinitions = processDocumentDefinitions;
281
+ });
282
+ }
283
+ loadDocumentDefinition() {
284
+ this.documentService
285
+ .getDocumentDefinition(this.documentDefinitionName)
286
+ .subscribe((documentDefinition) => {
287
+ this.documentDefinition = documentDefinition;
288
+ });
289
+ }
290
+ openDossierConnectModal() {
291
+ this.dossierConnectModal.openModal(this.documentDefinition);
292
+ }
293
+ openDossierRemoveModal() {
294
+ this.dossierRemoveModal.openModal(this.documentDefinition);
295
+ }
296
+ deleteProcessDocumentDefinition(processDocumentDefinition) {
297
+ this.documentService
298
+ .deleteProcessDocumentDefinition({
299
+ documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
300
+ processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
301
+ canInitializeDocument: processDocumentDefinition.canInitializeDocument,
302
+ startableByUser: processDocumentDefinition.startableByUser,
303
+ })
304
+ .subscribe(() => {
305
+ this.alertService.success('Successfully deleted process document definition');
306
+ this.loadProcessDocumentDefinitions();
307
+ }, () => {
308
+ this.alertService.error('Failed to delete process document definition');
309
+ });
310
+ }
311
+ downloadDefinition() {
312
+ const definition = this.documentDefinition;
313
+ const dataString = 'data:text/json;charset=utf-8,' +
314
+ encodeURIComponent(JSON.stringify(definition.schema, null, 2));
315
+ const downloadAnchorElement = document.getElementById('downloadAnchorElement');
316
+ downloadAnchorElement.setAttribute('href', dataString);
317
+ downloadAnchorElement.setAttribute('download', `${definition.id.name}-v${definition.id.version}.json`);
318
+ downloadAnchorElement.click();
319
+ }
320
+ }
321
+ DossierManagementDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementDetailComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.ActivatedRoute }, { token: i3$1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
322
+ DossierManagementDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierManagementDetailComponent, selector: "valtimo-dossier-management-detail", viewQueries: [{ propertyName: "dossierConnectModal", first: true, predicate: ["dossierConnectModal"], descendants: true }, { propertyName: "dossierRemoveModal", first: true, predicate: ["dossierRemoveModal"], descendants: true }, { propertyName: "documentRoles", first: true, predicate: ["documentRoles"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadDefinition()\">\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 *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n (click)=\"openDossierRemoveModal()\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ documentDefinition.schema.title }}\n <div *ngIf=\"documentDefinition.readOnly\" 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 <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\" rows=\"25\" disabled\n >{{ documentDefinition | json }}\n </textarea>\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n class=\"input-group mb-5\"\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n class=\"btn btn-danger\"\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n data-toggle=\"tooltip\"\n data-placement=\"left\"\n title=\"Delete this connected process\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n </button>\n <input\n class=\"form-control\"\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n type=\"text\"\n disabled\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 placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n disabled\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 placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.startableByUser\"\n disabled\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 class=\"btn btn-primary\" (click)=\"openDossierConnectModal()\">\n <i class=\"icon mdi mdi-plus mr-1\"></i\n >{{ 'dossierManagement.connectProcess' | translate }}\n </button>\n </div>\n <valtimo-dossier-management-roles [documentDefinitionName]=\"documentDefinitionName\">\n </valtimo-dossier-management-roles>\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n </div>\n </div>\n </valtimo-widget>\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 </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid #dee2e6}.dossier-title{margin-top:0;margin-bottom:7px}.row{margin:0}.dossier-schema{resize:none}\n"], components: [{ type: i3$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: DossierManagementRolesComponent, selector: "valtimo-dossier-management-roles", inputs: ["documentDefinitionName"] }, { type: i5$1.ExtensionComponent, selector: "valtimo-extension", inputs: ["module", "page", "section"] }, { type: DossierManagementConnectModalComponent, selector: "valtimo-dossier-management-connect-modal", outputs: ["reloadProcessDocumentDefinitions"] }, { type: DossierManagementRemoveModalComponent, selector: "valtimo-dossier-management-remove-modal" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }], pipes: { "translate": i4.TranslatePipe, "json": i5.JsonPipe } });
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementDetailComponent, decorators: [{
324
+ type: Component,
325
+ args: [{ selector: 'valtimo-dossier-management-detail', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadDefinition()\">\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 *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n (click)=\"openDossierRemoveModal()\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ documentDefinition.schema.title }}\n <div *ngIf=\"documentDefinition.readOnly\" 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 <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\" rows=\"25\" disabled\n >{{ documentDefinition | json }}\n </textarea>\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n class=\"input-group mb-5\"\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n class=\"btn btn-danger\"\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n data-toggle=\"tooltip\"\n data-placement=\"left\"\n title=\"Delete this connected process\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n </button>\n <input\n class=\"form-control\"\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n type=\"text\"\n disabled\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 placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n disabled\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 placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.startableByUser\"\n disabled\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 class=\"btn btn-primary\" (click)=\"openDossierConnectModal()\">\n <i class=\"icon mdi mdi-plus mr-1\"></i\n >{{ 'dossierManagement.connectProcess' | translate }}\n </button>\n </div>\n <valtimo-dossier-management-roles [documentDefinitionName]=\"documentDefinitionName\">\n </valtimo-dossier-management-roles>\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n </div>\n </div>\n </valtimo-widget>\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 </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dossier-header{height:80px;padding-top:21px;padding-left:18px;padding-right:18px;border-bottom:1px solid #dee2e6}.dossier-title{margin-top:0;margin-bottom:7px}.row{margin:0}.dossier-schema{resize:none}\n"] }]
326
+ }], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.ActivatedRoute }, { type: i3$1.AlertService }]; }, propDecorators: { dossierConnectModal: [{
327
+ type: ViewChild,
328
+ args: ['dossierConnectModal']
329
+ }], dossierRemoveModal: [{
330
+ type: ViewChild,
331
+ args: ['dossierRemoveModal']
332
+ }], documentRoles: [{
333
+ type: ViewChild,
334
+ args: ['documentRoles']
335
+ }] } });
336
+
337
+ /*
338
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
339
+ *
340
+ * Licensed under EUPL, Version 1.2 (the "License");
341
+ * you may not use this file except in compliance with the License.
342
+ * You may obtain a copy of the License at
343
+ *
344
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
345
+ *
346
+ * Unless required by applicable law or agreed to in writing, software
347
+ * distributed under the License is distributed on an "AS IS" basis,
348
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
349
+ * See the License for the specific language governing permissions and
350
+ * limitations under the License.
351
+ */
352
+ class DossierManagementUploadComponent {
353
+ constructor(documentService, translateService, menuService) {
354
+ this.documentService = documentService;
355
+ this.translateService = translateService;
356
+ this.menuService = menuService;
357
+ this.definitionUploaded = new EventEmitter();
358
+ this.clear$ = new Subject();
359
+ this.jsonString$ = new BehaviorSubject('');
360
+ this.error$ = new BehaviorSubject('');
361
+ this.disabled$ = new BehaviorSubject(false);
362
+ this.file$ = new BehaviorSubject(undefined);
363
+ }
364
+ ngAfterViewInit() {
365
+ this.openShowSubscription();
366
+ this.openFileSubscription();
367
+ }
368
+ ngOnDestroy() {
369
+ this.showSubscription.unsubscribe();
370
+ this.fileSubscription.unsubscribe();
371
+ this.closeErrorSubscription();
372
+ }
373
+ setFile(file) {
374
+ this.clearError();
375
+ this.file$.next(file);
376
+ }
377
+ uploadDefinition() {
378
+ this.disable();
379
+ this.jsonString$
380
+ .pipe(switchMap(jsonString => this.documentService
381
+ .createDocumentDefinition(new DocumentDefinitionCreateRequest(jsonString))
382
+ .pipe(tap(
383
+ // success
384
+ () => {
385
+ this.closeErrorSubscription();
386
+ this.clearError();
387
+ this.enable();
388
+ this.hideModal();
389
+ this.menuService.reload();
390
+ this.definitionUploaded.emit();
391
+ },
392
+ // error
393
+ () => {
394
+ this.openErrorSubscription('dropzone.error.invalidDocDef');
395
+ this.enable();
396
+ }))), take(1))
397
+ .subscribe();
398
+ }
399
+ openErrorSubscription(errorCode) {
400
+ this.closeErrorSubscription();
401
+ this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {
402
+ this.error$.next(error);
403
+ });
404
+ }
405
+ closeErrorSubscription() {
406
+ if (this.errorSubscription) {
407
+ this.errorSubscription.unsubscribe();
408
+ }
409
+ }
410
+ clearError() {
411
+ this.error$.next('');
412
+ }
413
+ openFileSubscription() {
414
+ this.fileSubscription = this.file$.subscribe(file => {
415
+ if (file) {
416
+ const reader = new FileReader();
417
+ reader.onloadend = () => {
418
+ const result = reader.result.toString();
419
+ if (this.stringIsValidJson(result)) {
420
+ this.jsonString$.next(result);
421
+ }
422
+ };
423
+ reader.readAsText(file);
424
+ }
425
+ else {
426
+ this.clearJsonString();
427
+ }
428
+ });
429
+ }
430
+ openShowSubscription() {
431
+ this.showSubscription = this.show$.subscribe(show => {
432
+ if (show) {
433
+ this.showModal();
434
+ }
435
+ else {
436
+ this.hideModal();
437
+ }
438
+ this.clearJsonString();
439
+ this.clearError();
440
+ this.clearDropzone();
441
+ });
442
+ }
443
+ clearJsonString() {
444
+ this.jsonString$.next('');
445
+ }
446
+ clearDropzone() {
447
+ this.clear$.next();
448
+ }
449
+ showModal() {
450
+ this.modal.show();
451
+ }
452
+ hideModal() {
453
+ this.modal.hide();
454
+ }
455
+ stringIsValidJson(string) {
456
+ try {
457
+ JSON.parse(string);
458
+ }
459
+ catch (e) {
460
+ return false;
461
+ }
462
+ return true;
463
+ }
464
+ disable() {
465
+ this.disabled$.next(true);
466
+ }
467
+ enable() {
468
+ this.disabled$.next(false);
469
+ }
470
+ }
471
+ DossierManagementUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementUploadComponent, deps: [{ token: i1$1.DocumentService }, { token: i4.TranslateService }, { token: i3$1.MenuService }], target: i0.ɵɵFactoryTarget.Component });
472
+ DossierManagementUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", 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: "<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 ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && (error$ | async) === ''; else pleaseSelect\">\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 #pleaseSelect>\n <button class=\"btn btn-primary\" [disabled]=\"true\">\n {{ 'Select a document definition' | translate }}\n </button>\n</ng-template>\n", styles: [""], components: [{ type: i3$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { type: i3$1.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera"], outputs: ["fileSelected"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe, "async": i5.AsyncPipe } });
473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementUploadComponent, decorators: [{
474
+ type: Component,
475
+ args: [{ selector: 'valtimo-dossier-management-upload', template: "<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 ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && (error$ | async) === ''; else pleaseSelect\">\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 #pleaseSelect>\n <button class=\"btn btn-primary\" [disabled]=\"true\">\n {{ 'Select a document definition' | translate }}\n </button>\n</ng-template>\n", styles: [""] }]
476
+ }], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i4.TranslateService }, { type: i3$1.MenuService }]; }, propDecorators: { show$: [{
477
+ type: Input
478
+ }], definitionUploaded: [{
479
+ type: Output
480
+ }], modal: [{
481
+ type: ViewChild,
482
+ args: ['uploadDefinitionModal']
483
+ }] } });
484
+
485
+ /*
486
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
487
+ *
488
+ * Licensed under EUPL, Version 1.2 (the "License");
489
+ * you may not use this file except in compliance with the License.
490
+ * You may obtain a copy of the License at
491
+ *
492
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
493
+ *
494
+ * Unless required by applicable law or agreed to in writing, software
495
+ * distributed under the License is distributed on an "AS IS" basis,
496
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
497
+ * See the License for the specific language governing permissions and
498
+ * limitations under the License.
499
+ */
500
+ moment.locale(localStorage.getItem('langKey') || '');
501
+ class DossierManagementListComponent {
502
+ constructor(documentService, router) {
503
+ this.documentService = documentService;
504
+ this.router = router;
505
+ this.dossiers = [];
506
+ this.pagination = {
507
+ collectionSize: 0,
508
+ page: 1,
509
+ size: 10,
510
+ maxPaginationItemSize: 5,
511
+ };
512
+ this.pageParam = 0;
513
+ this.dossierFields = [
514
+ { key: 'schema.title', label: 'Title' },
515
+ { key: 'createdOn', label: 'Created On' },
516
+ { key: 'readOnly', label: 'Read-only' },
517
+ ];
518
+ this.showModal$ = new BehaviorSubject(false);
519
+ }
520
+ paginationClicked(page) {
521
+ this.pageParam = page - 1;
522
+ this.getDocumentDefinitions();
523
+ }
524
+ paginationSet() {
525
+ this.getDocumentDefinitions();
526
+ }
527
+ redirectToDetails(documentDefinition) {
528
+ this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);
529
+ }
530
+ getDocumentDefinitions() {
531
+ this.documentService
532
+ .queryDefinitions({ filteredOnRole: false, page: this.pageParam, size: this.pagination.size })
533
+ .subscribe((documentDefinitionPage) => {
534
+ this.pagination.collectionSize = documentDefinitionPage.totalElements;
535
+ this.dossiers = documentDefinitionPage.content;
536
+ this.dossiers.map((dossier) => {
537
+ dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');
538
+ });
539
+ });
540
+ }
541
+ showModal() {
542
+ this.showModal$.next(true);
543
+ }
544
+ }
545
+ DossierManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementListComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
546
+ DossierManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierManagementListComponent, selector: "valtimo-dossier-management-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content 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-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], components: [{ type: i3$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i3$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { type: DossierManagementUploadComponent, selector: "valtimo-dossier-management-upload", inputs: ["show$"], outputs: ["definitionUploaded"] }], pipes: { "translate": i4.TranslatePipe } });
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementListComponent, decorators: [{
548
+ type: Component,
549
+ args: [{ selector: 'valtimo-dossier-management-list', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content 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-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
550
+ }], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.Router }]; } });
551
+
552
+ /*
553
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
554
+ *
555
+ * Licensed under EUPL, Version 1.2 (the "License");
556
+ * you may not use this file except in compliance with the License.
557
+ * You may obtain a copy of the License at
558
+ *
559
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
560
+ *
561
+ * Unless required by applicable law or agreed to in writing, software
562
+ * distributed under the License is distributed on an "AS IS" basis,
563
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
564
+ * See the License for the specific language governing permissions and
565
+ * limitations under the License.
566
+ */
567
+ const routes = [
568
+ {
569
+ path: 'dossier-management',
570
+ component: DossierManagementListComponent,
571
+ canActivate: [AuthGuardService],
572
+ data: { title: 'Dossiers', roles: [ROLE_ADMIN] },
573
+ },
574
+ {
575
+ path: 'dossier-management/dossier/:name',
576
+ component: DossierManagementDetailComponent,
577
+ canActivate: [AuthGuardService],
578
+ data: { title: 'Dossier details', roles: [ROLE_ADMIN] },
579
+ },
580
+ ];
581
+ class DossierManagementRoutingModule {
582
+ }
583
+ DossierManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
584
+ DossierManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRoutingModule, imports: [i2.RouterModule], exports: [RouterModule] });
585
+ DossierManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRoutingModule, imports: [[RouterModule.forRoot(routes)], RouterModule] });
586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementRoutingModule, decorators: [{
587
+ type: NgModule,
588
+ args: [{
589
+ imports: [RouterModule.forRoot(routes)],
590
+ exports: [RouterModule],
591
+ declarations: [],
592
+ }]
593
+ }] });
594
+
595
+ /*
596
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
597
+ *
598
+ * Licensed under EUPL, Version 1.2 (the "License");
599
+ * you may not use this file except in compliance with the License.
600
+ * You may obtain a copy of the License at
601
+ *
602
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
603
+ *
604
+ * Unless required by applicable law or agreed to in writing, software
605
+ * distributed under the License is distributed on an "AS IS" basis,
606
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
607
+ * See the License for the specific language governing permissions and
608
+ * limitations under the License.
609
+ */
610
+ class DossierManagementModule {
611
+ }
612
+ DossierManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
613
+ DossierManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementModule, declarations: [DossierManagementListComponent,
614
+ DossierManagementDetailComponent,
615
+ DossierManagementConnectModalComponent,
616
+ DossierManagementRemoveModalComponent,
617
+ DossierManagementUploadComponent,
618
+ DossierManagementRolesComponent], imports: [CommonModule,
619
+ WidgetModule,
620
+ DropzoneModule,
621
+ ListModule,
622
+ DossierManagementRoutingModule,
623
+ FormsModule,
624
+ TranslateModule,
625
+ ModalModule,
626
+ ConfigModule,
627
+ NgbTooltipModule,
628
+ MultiselectDropdownModule] });
629
+ DossierManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementModule, imports: [[
630
+ CommonModule,
631
+ WidgetModule,
632
+ DropzoneModule,
633
+ ListModule,
634
+ DossierManagementRoutingModule,
635
+ FormsModule,
636
+ TranslateModule,
637
+ ModalModule,
638
+ ConfigModule,
639
+ NgbTooltipModule,
640
+ MultiselectDropdownModule,
641
+ ]] });
642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierManagementModule, decorators: [{
643
+ type: NgModule,
644
+ args: [{
645
+ declarations: [
646
+ DossierManagementListComponent,
647
+ DossierManagementDetailComponent,
648
+ DossierManagementConnectModalComponent,
649
+ DossierManagementRemoveModalComponent,
650
+ DossierManagementUploadComponent,
651
+ DossierManagementRolesComponent,
652
+ ],
653
+ imports: [
654
+ CommonModule,
655
+ WidgetModule,
656
+ DropzoneModule,
657
+ ListModule,
658
+ DossierManagementRoutingModule,
659
+ FormsModule,
660
+ TranslateModule,
661
+ ModalModule,
662
+ ConfigModule,
663
+ NgbTooltipModule,
664
+ MultiselectDropdownModule,
665
+ ],
666
+ exports: [],
667
+ }]
668
+ }] });
669
+
670
+ /*
671
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
672
+ *
673
+ * Licensed under EUPL, Version 1.2 (the "License");
674
+ * you may not use this file except in compliance with the License.
675
+ * You may obtain a copy of the License at
676
+ *
677
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
678
+ *
679
+ * Unless required by applicable law or agreed to in writing, software
680
+ * distributed under the License is distributed on an "AS IS" basis,
681
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
682
+ * See the License for the specific language governing permissions and
683
+ * limitations under the License.
684
+ */
685
+
686
+ /**
687
+ * Generated bundle index. Do not edit.
688
+ */
689
+
690
+ export { DossierManagementListComponent, DossierManagementModule };
691
+ //# sourceMappingURL=valtimo-dossier-management.mjs.map