@valtimo/dossier-management 10.8.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/dossier-management-assignee/dossier-management-assignee.component.mjs +75 -0
- package/esm2022/lib/components/dossier-management-connect-modal/dossier-management-connect-modal.component.mjs +92 -0
- package/esm2022/lib/components/dossier-management-detail/dossier-management-detail.component.mjs +100 -0
- package/esm2022/lib/components/dossier-management-detail-container/dossier-management-detail-container.component.mjs +68 -0
- package/esm2022/lib/components/dossier-management-link-process/dossier-management-link-process.component.mjs +84 -0
- package/esm2022/lib/components/dossier-management-list/dossier-management-list.component.mjs +75 -0
- package/esm2022/lib/components/dossier-management-list-columns/dossier-management-list-columns.component.mjs +458 -0
- package/esm2022/lib/components/dossier-management-remove-modal/dossier-management-remove-modal.component.mjs +59 -0
- package/esm2022/lib/components/dossier-management-search-fields/dossier-management-search-fields.component.mjs +416 -0
- package/esm2022/lib/components/dossier-management-tabs/dossier-management-add-tab-modal/dossier-management-add-tab-modal.component.mjs +103 -0
- package/esm2022/lib/components/dossier-management-tabs/dossier-management-edit-tab-modal/dossier-management-edit-tab-modal.component.mjs +71 -0
- package/esm2022/lib/components/dossier-management-tabs/dossier-management-tabs.component.mjs +179 -0
- package/esm2022/lib/components/dossier-management-tabs/tab-form/tab-form.component.mjs +76 -0
- package/esm2022/lib/components/dossier-management-upload/dossier-management-upload.component.mjs +161 -0
- package/{esm2020 → esm2022}/lib/dossier-management-routing.module.mjs +7 -7
- package/esm2022/lib/dossier-management.module.mjs +186 -0
- package/esm2022/lib/models/index.mjs +18 -0
- package/esm2022/lib/models/tab.enum.mjs +23 -0
- package/esm2022/lib/services/index.mjs +18 -0
- package/esm2022/lib/services/tab-management.service.mjs +74 -0
- package/esm2022/lib/services/tab.service.mjs +88 -0
- package/{esm2020 → esm2022}/public-api.mjs +2 -2
- package/fesm2022/valtimo-dossier-management.mjs +2348 -0
- package/fesm2022/valtimo-dossier-management.mjs.map +1 -0
- package/lib/{dossier-management-assignee → components/dossier-management-assignee}/dossier-management-assignee.component.d.ts +1 -1
- package/lib/components/dossier-management-assignee/dossier-management-assignee.component.d.ts.map +1 -0
- package/lib/{dossier-management-connect-modal → components/dossier-management-connect-modal}/dossier-management-connect-modal.component.d.ts +1 -1
- package/lib/components/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts.map +1 -0
- package/lib/{dossier-management-detail-container/tabs → components}/dossier-management-detail/dossier-management-detail.component.d.ts +3 -5
- package/lib/components/dossier-management-detail/dossier-management-detail.component.d.ts.map +1 -0
- package/lib/{dossier-management-detail-container → components/dossier-management-detail-container}/dossier-management-detail-container.component.d.ts +4 -3
- package/lib/components/dossier-management-detail-container/dossier-management-detail-container.component.d.ts.map +1 -0
- package/lib/{dossier-management-link-process → components/dossier-management-link-process}/dossier-management-link-process.component.d.ts +2 -2
- package/lib/components/dossier-management-link-process/dossier-management-link-process.component.d.ts.map +1 -0
- package/lib/{dossier-management-list → components/dossier-management-list}/dossier-management-list.component.d.ts +1 -2
- package/lib/components/dossier-management-list/dossier-management-list.component.d.ts.map +1 -0
- package/lib/{dossier-management-detail-container/tabs → components}/dossier-management-list-columns/dossier-management-list-columns.component.d.ts +9 -10
- package/lib/components/dossier-management-list-columns/dossier-management-list-columns.component.d.ts.map +1 -0
- package/lib/{dossier-management-remove-modal → components/dossier-management-remove-modal}/dossier-management-remove-modal.component.d.ts +1 -1
- package/lib/components/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts.map +1 -0
- package/lib/{dossier-management-detail-container/tabs → components}/dossier-management-search-fields/dossier-management-search-fields.component.d.ts +2 -2
- package/lib/components/dossier-management-search-fields/dossier-management-search-fields.component.d.ts.map +1 -0
- package/lib/components/dossier-management-tabs/dossier-management-add-tab-modal/dossier-management-add-tab-modal.component.d.ts +38 -0
- package/lib/components/dossier-management-tabs/dossier-management-add-tab-modal/dossier-management-add-tab-modal.component.d.ts.map +1 -0
- package/lib/components/dossier-management-tabs/dossier-management-edit-tab-modal/dossier-management-edit-tab-modal.component.d.ts +22 -0
- package/lib/components/dossier-management-tabs/dossier-management-edit-tab-modal/dossier-management-edit-tab-modal.component.d.ts.map +1 -0
- package/lib/components/dossier-management-tabs/dossier-management-tabs.component.d.ts +48 -0
- package/lib/components/dossier-management-tabs/dossier-management-tabs.component.d.ts.map +1 -0
- package/lib/components/dossier-management-tabs/tab-form/tab-form.component.d.ts +22 -0
- package/lib/components/dossier-management-tabs/tab-form/tab-form.component.d.ts.map +1 -0
- package/lib/{dossier-management-upload → components/dossier-management-upload}/dossier-management-upload.component.d.ts +1 -1
- package/lib/components/dossier-management-upload/dossier-management-upload.component.d.ts.map +1 -0
- package/lib/dossier-management.module.d.ts +23 -21
- package/lib/dossier-management.module.d.ts.map +1 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/list-column.model.d.ts +1 -1
- package/lib/models/list-column.model.d.ts.map +1 -1
- package/lib/models/tab.enum.d.ts +7 -0
- package/lib/models/tab.enum.d.ts.map +1 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/tab-management.service.d.ts +26 -0
- package/lib/services/tab-management.service.d.ts.map +1 -0
- package/lib/services/tab.service.d.ts +31 -0
- package/lib/services/tab.service.d.ts.map +1 -0
- package/package.json +8 -14
- package/public-api.d.ts +1 -1
- package/public-api.d.ts.map +1 -1
- package/esm2020/lib/dossier-management-assignee/dossier-management-assignee.component.mjs +0 -73
- package/esm2020/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.mjs +0 -92
- package/esm2020/lib/dossier-management-detail-container/dossier-management-detail-container.component.mjs +0 -65
- package/esm2020/lib/dossier-management-detail-container/tabs/dossier-management-detail/dossier-management-detail.component.mjs +0 -104
- package/esm2020/lib/dossier-management-detail-container/tabs/dossier-management-list-columns/dossier-management-list-columns.component.mjs +0 -456
- package/esm2020/lib/dossier-management-detail-container/tabs/dossier-management-search-fields/dossier-management-search-fields.component.mjs +0 -417
- package/esm2020/lib/dossier-management-link-process/dossier-management-link-process.component.mjs +0 -84
- package/esm2020/lib/dossier-management-list/dossier-management-list.component.mjs +0 -76
- package/esm2020/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.mjs +0 -57
- package/esm2020/lib/dossier-management-roles/dossier-management-roles.component.mjs +0 -97
- package/esm2020/lib/dossier-management-upload/dossier-management-upload.component.mjs +0 -161
- package/esm2020/lib/dossier-management.module.mjs +0 -171
- package/esm2020/lib/models/index.mjs +0 -17
- package/esm2020/lib/tab.enum.mjs +0 -22
- package/esm2020/lib/tab.service.mjs +0 -39
- package/fesm2015/valtimo-dossier-management.mjs +0 -1846
- package/fesm2015/valtimo-dossier-management.mjs.map +0 -1
- package/fesm2020/valtimo-dossier-management.mjs +0 -1898
- package/fesm2020/valtimo-dossier-management.mjs.map +0 -1
- package/lib/dossier-management-assignee/dossier-management-assignee.component.d.ts.map +0 -1
- package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts.map +0 -1
- package/lib/dossier-management-detail-container/dossier-management-detail-container.component.d.ts.map +0 -1
- package/lib/dossier-management-detail-container/tabs/dossier-management-detail/dossier-management-detail.component.d.ts.map +0 -1
- package/lib/dossier-management-detail-container/tabs/dossier-management-list-columns/dossier-management-list-columns.component.d.ts.map +0 -1
- package/lib/dossier-management-detail-container/tabs/dossier-management-search-fields/dossier-management-search-fields.component.d.ts.map +0 -1
- package/lib/dossier-management-link-process/dossier-management-link-process.component.d.ts.map +0 -1
- package/lib/dossier-management-list/dossier-management-list.component.d.ts.map +0 -1
- package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts.map +0 -1
- package/lib/dossier-management-roles/dossier-management-roles.component.d.ts +0 -33
- package/lib/dossier-management-roles/dossier-management-roles.component.d.ts.map +0 -1
- package/lib/dossier-management-upload/dossier-management-upload.component.d.ts.map +0 -1
- package/lib/tab.enum.d.ts +0 -6
- package/lib/tab.enum.d.ts.map +0 -1
- package/lib/tab.service.d.ts +0 -11
- package/lib/tab.service.d.ts.map +0 -1
- /package/{esm2020 → esm2022}/lib/models/list-column.model.mjs +0 -0
- /package/{esm2020 → esm2022}/valtimo-dossier-management.mjs +0 -0
|
@@ -1,1846 +0,0 @@
|
|
|
1
|
-
import * as i6 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Component, Output, ViewChild, Input, Injectable, NgModule } from '@angular/core';
|
|
5
|
-
import * as i5 from '@angular/forms';
|
|
6
|
-
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } 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, SpinnerModule, CarbonMultiInputModule, ConfirmationModalModule, ValtimoCdsModalDirectiveModule } from '@valtimo/components';
|
|
11
|
-
import * as i1$3 from '@valtimo/config';
|
|
12
|
-
import { UploadProvider, 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, map, switchMap, Subject, Subscription, combineLatest, filter, tap as tap$1, take as take$1, distinctUntilChanged, of, delay, startWith } from 'rxjs';
|
|
22
|
-
import { isEqual } from 'lodash';
|
|
23
|
-
import * as i1$2 from '@valtimo/authority';
|
|
24
|
-
import * as i7$1 from '@valtimo/user-interface';
|
|
25
|
-
import { ParagraphModule, SelectModule, InputModule, FormModule, TooltipIconModule, MultiInputModule, TableModule } from '@valtimo/user-interface';
|
|
26
|
-
import { tap, switchMap as switchMap$1, take } from 'rxjs/operators';
|
|
27
|
-
import moment from 'moment';
|
|
28
|
-
import { AuthGuardService } from '@valtimo/security';
|
|
29
|
-
import * as i4$1 from '@angular/platform-browser';
|
|
30
|
-
import * as i9 from 'carbon-components-angular';
|
|
31
|
-
import { NotificationModule, ButtonModule, IconModule, ModalModule as ModalModule$1, InputModule as InputModule$1, DropdownModule, CheckboxModule, LoadingModule, LinkModule } from 'carbon-components-angular';
|
|
32
|
-
|
|
33
|
-
/*
|
|
34
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
35
|
-
*
|
|
36
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
37
|
-
* you may not use this file except in compliance with the License.
|
|
38
|
-
* You may obtain a copy of the License at
|
|
39
|
-
*
|
|
40
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
41
|
-
*
|
|
42
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
43
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
44
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45
|
-
* See the License for the specific language governing permissions and
|
|
46
|
-
* limitations under the License.
|
|
47
|
-
*/
|
|
48
|
-
class DossierManagementConnectModalComponent {
|
|
49
|
-
constructor(processService, documentService, toasterService) {
|
|
50
|
-
this.processService = processService;
|
|
51
|
-
this.documentService = documentService;
|
|
52
|
-
this.toasterService = toasterService;
|
|
53
|
-
this.documentDefinition = null;
|
|
54
|
-
this.newDocumentProcessDefinition = null;
|
|
55
|
-
this.newDocumentProcessDefinitionInit = true;
|
|
56
|
-
this.newDocumentProcessDefinitionStartableByUser = false;
|
|
57
|
-
this.processDocumentDefinitionExists = {};
|
|
58
|
-
this.reloadProcessDocumentDefinitions = new EventEmitter();
|
|
59
|
-
}
|
|
60
|
-
loadProcessDocumentDefinitions() {
|
|
61
|
-
this.processDocumentDefinitionExists = {};
|
|
62
|
-
this.documentService
|
|
63
|
-
.findProcessDocumentDefinitions(this.documentDefinition.id.name)
|
|
64
|
-
.subscribe((processDocumentDefinitions) => {
|
|
65
|
-
processDocumentDefinitions.forEach((processDocumentDefinition) => {
|
|
66
|
-
this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
loadProcessDefinitions() {
|
|
71
|
-
this.processService
|
|
72
|
-
.getProcessDefinitions()
|
|
73
|
-
.subscribe((processDefinitions) => {
|
|
74
|
-
this.processDefinitions = processDefinitions;
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
ngOnInit() {
|
|
78
|
-
this.loadProcessDefinitions();
|
|
79
|
-
}
|
|
80
|
-
openModal(dossier) {
|
|
81
|
-
this.documentDefinition = dossier;
|
|
82
|
-
this.newDocumentProcessDefinition = null;
|
|
83
|
-
this.newDocumentProcessDefinitionInit = true;
|
|
84
|
-
this.newDocumentProcessDefinitionStartableByUser = false;
|
|
85
|
-
this.loadProcessDocumentDefinitions();
|
|
86
|
-
this.modal.show();
|
|
87
|
-
}
|
|
88
|
-
submit() {
|
|
89
|
-
const request = {
|
|
90
|
-
canInitializeDocument: this.newDocumentProcessDefinitionInit,
|
|
91
|
-
startableByUser: this.newDocumentProcessDefinitionStartableByUser,
|
|
92
|
-
documentDefinitionName: this.documentDefinition.id.name,
|
|
93
|
-
processDefinitionKey: this.newDocumentProcessDefinition.key,
|
|
94
|
-
};
|
|
95
|
-
this.documentService.createProcessDocumentDefinition(request).subscribe(() => {
|
|
96
|
-
this.toasterService.success('Successfully added new process document definition');
|
|
97
|
-
this.reloadProcessDocumentDefinitions.emit();
|
|
98
|
-
}, err => {
|
|
99
|
-
this.toasterService.error('Failed to add new process document definition');
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
DossierManagementConnectModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementConnectModalComponent, deps: [{ token: i1.ProcessService }, { token: i1$1.DocumentService }, { token: i3.ToastrService }], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
-
DossierManagementConnectModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.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: i4.TranslatePipe, name: "translate" }] });
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementConnectModalComponent, decorators: [{
|
|
106
|
-
type: Component,
|
|
107
|
-
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"] }]
|
|
108
|
-
}], ctorParameters: function () { return [{ type: i1.ProcessService }, { type: i1$1.DocumentService }, { type: i3.ToastrService }]; }, propDecorators: { reloadProcessDocumentDefinitions: [{
|
|
109
|
-
type: Output
|
|
110
|
-
}], modal: [{
|
|
111
|
-
type: ViewChild,
|
|
112
|
-
args: ['dossierConnectModal']
|
|
113
|
-
}] } });
|
|
114
|
-
|
|
115
|
-
/*
|
|
116
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
117
|
-
*
|
|
118
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
119
|
-
* you may not use this file except in compliance with the License.
|
|
120
|
-
* You may obtain a copy of the License at
|
|
121
|
-
*
|
|
122
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
123
|
-
*
|
|
124
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
125
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
126
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
127
|
-
* See the License for the specific language governing permissions and
|
|
128
|
-
* limitations under the License.
|
|
129
|
-
*/
|
|
130
|
-
class DossierManagementRemoveModalComponent {
|
|
131
|
-
constructor(documentService, toasterService, router, translateService, menuService) {
|
|
132
|
-
this.documentService = documentService;
|
|
133
|
-
this.toasterService = toasterService;
|
|
134
|
-
this.router = router;
|
|
135
|
-
this.translateService = translateService;
|
|
136
|
-
this.menuService = menuService;
|
|
137
|
-
this.documentDefinition = null;
|
|
138
|
-
this.errors = [];
|
|
139
|
-
}
|
|
140
|
-
openModal(documentDefinition) {
|
|
141
|
-
this.documentDefinition = documentDefinition;
|
|
142
|
-
this.modal.show();
|
|
143
|
-
}
|
|
144
|
-
removeDocumentDefinition() {
|
|
145
|
-
this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(() => {
|
|
146
|
-
this.menuService.reload();
|
|
147
|
-
this.router.navigate(['/dossier-management']);
|
|
148
|
-
this.toasterService.success(this.translateService.instant('remove-document-definition-success'));
|
|
149
|
-
}, (result) => {
|
|
150
|
-
this.errors = result.errors;
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
DossierManagementRemoveModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", 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 });
|
|
155
|
-
DossierManagementRemoveModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: i3$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRemoveModalComponent, decorators: [{
|
|
157
|
-
type: Component,
|
|
158
|
-
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"] }]
|
|
159
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i3.ToastrService }, { type: i2.Router }, { type: i4.TranslateService }, { type: i3$1.MenuService }]; }, propDecorators: { modal: [{
|
|
160
|
-
type: ViewChild,
|
|
161
|
-
args: ['documentDefinitionRemoveModal']
|
|
162
|
-
}] } });
|
|
163
|
-
|
|
164
|
-
/*
|
|
165
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
166
|
-
*
|
|
167
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
168
|
-
* you may not use this file except in compliance with the License.
|
|
169
|
-
* You may obtain a copy of the License at
|
|
170
|
-
*
|
|
171
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
172
|
-
*
|
|
173
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
174
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
175
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
176
|
-
* See the License for the specific language governing permissions and
|
|
177
|
-
* limitations under the License.
|
|
178
|
-
*/
|
|
179
|
-
class DossierManagementRolesComponent {
|
|
180
|
-
constructor(authorityService, documentService, alertService, translateService) {
|
|
181
|
-
this.authorityService = authorityService;
|
|
182
|
-
this.documentService = documentService;
|
|
183
|
-
this.alertService = alertService;
|
|
184
|
-
this.translateService = translateService;
|
|
185
|
-
this.dropdownSettings = {
|
|
186
|
-
singleSelection: false,
|
|
187
|
-
idField: 'name',
|
|
188
|
-
textField: 'name',
|
|
189
|
-
selectAllText: 'Select All',
|
|
190
|
-
unSelectAllText: 'UnSelect All',
|
|
191
|
-
itemsShowLimit: 3,
|
|
192
|
-
enableCheckAll: true,
|
|
193
|
-
allowSearchFilter: true,
|
|
194
|
-
};
|
|
195
|
-
this.roles = new BehaviorSubject(undefined);
|
|
196
|
-
this.preSelectedItems = new BehaviorSubject(undefined);
|
|
197
|
-
}
|
|
198
|
-
ngOnInit() {
|
|
199
|
-
this.loadAllRoles();
|
|
200
|
-
}
|
|
201
|
-
loadAllRoles() {
|
|
202
|
-
this.authorityService.query().subscribe(result => {
|
|
203
|
-
this.roles.next(result.body);
|
|
204
|
-
this.loadDocumentRoles();
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
loadDocumentRoles() {
|
|
208
|
-
if (this.documentDefinitionName) {
|
|
209
|
-
this.documentService.getDocumentRoles(this.documentDefinitionName).subscribe(result => {
|
|
210
|
-
this.preSelectedItems.next(result);
|
|
211
|
-
}, err => {
|
|
212
|
-
this.alertService.warning(this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyRetrievedRoles'));
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
onSelectedItems(data) {
|
|
217
|
-
const roles = this.returnArrayOfString(data);
|
|
218
|
-
if (isEqual(roles, this.preSelectedItems.value)) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
this.documentService.modifyDocumentRoles(this.documentDefinitionName, roles).subscribe(() => {
|
|
222
|
-
this.alertService.success(this.translateService.instant('dossierManagement.roles.messages.successfullyStored'));
|
|
223
|
-
this.preSelectedItems.next(roles);
|
|
224
|
-
}, err => {
|
|
225
|
-
this.alertService.error(this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyStored'));
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* The data could be either an array of string (i.e. ["ROLE_ADMIN", "ROLE_DEVELOPER"]
|
|
230
|
-
* or an array of object with name parameters (i.e. [{"name": "ROLE_ADMIN"},{"name":"ROLE_DEVELOPER}]
|
|
231
|
-
*
|
|
232
|
-
* This method will always make sure an array of strings is returned
|
|
233
|
-
*/
|
|
234
|
-
returnArrayOfString(data) {
|
|
235
|
-
return data.map(el => {
|
|
236
|
-
if (typeof el === 'string') {
|
|
237
|
-
return el;
|
|
238
|
-
}
|
|
239
|
-
return el.name;
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
DossierManagementRolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRolesComponent, deps: [{ token: i1$2.AuthorityService }, { token: i1$1.DocumentService }, { token: i3$1.AlertService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
-
DossierManagementRolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierManagementRolesComponent, selector: "valtimo-dossier-management-roles", inputs: { documentDefinitionName: "documentDefinitionName" }, 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\">{{ '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: ["/*!\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: i3$1.MultiselectDropdownComponent, selector: "valtimo-multiselect-dropdown", inputs: ["selectedItems", "items", "placeHolder", "dropdownSettings"], outputs: ["itemsSelected"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRolesComponent, decorators: [{
|
|
246
|
-
type: Component,
|
|
247
|
-
args: [{ selector: 'valtimo-dossier-management-roles', 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\">{{ '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: ["/*!\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"] }]
|
|
248
|
-
}], ctorParameters: function () { return [{ type: i1$2.AuthorityService }, { type: i1$1.DocumentService }, { type: i3$1.AlertService }, { type: i4.TranslateService }]; }, propDecorators: { documentDefinitionName: [{
|
|
249
|
-
type: Input
|
|
250
|
-
}] } });
|
|
251
|
-
|
|
252
|
-
/*
|
|
253
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
254
|
-
*
|
|
255
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
256
|
-
* you may not use this file except in compliance with the License.
|
|
257
|
-
* You may obtain a copy of the License at
|
|
258
|
-
*
|
|
259
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
260
|
-
*
|
|
261
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
262
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
263
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
264
|
-
* See the License for the specific language governing permissions and
|
|
265
|
-
* limitations under the License.
|
|
266
|
-
*/
|
|
267
|
-
class DossierManagementLinkProcessComponent {
|
|
268
|
-
constructor(configService, processService, route, documentService) {
|
|
269
|
-
this.configService = configService;
|
|
270
|
-
this.processService = processService;
|
|
271
|
-
this.route = route;
|
|
272
|
-
this.documentService = documentService;
|
|
273
|
-
this.documentDefinitionName = null;
|
|
274
|
-
this.selectionId$ = new BehaviorSubject('');
|
|
275
|
-
this.processItems$ = this.processService
|
|
276
|
-
.getProcessDefinitions()
|
|
277
|
-
.pipe(map(processes => processes.map(process => ({ text: process.name, id: process.key }))));
|
|
278
|
-
this.disabled$ = new BehaviorSubject(false);
|
|
279
|
-
this.setDocumentenApiUploaderProvider(configService.config);
|
|
280
|
-
this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
|
|
281
|
-
}
|
|
282
|
-
ngOnInit() {
|
|
283
|
-
if (this.documentenApiUploadProvider) {
|
|
284
|
-
this.getDefaultSelection();
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
selectProcess(processDefinitionKey) {
|
|
288
|
-
this.disabled$.next(true);
|
|
289
|
-
const currentSelectionId = this.selectionId$.getValue();
|
|
290
|
-
if (processDefinitionKey && processDefinitionKey !== currentSelectionId) {
|
|
291
|
-
this.disabled$.next(true);
|
|
292
|
-
this.documentService
|
|
293
|
-
.updateLinkedUploadProcess(this.documentDefinitionName, processDefinitionKey)
|
|
294
|
-
.subscribe(processLink => {
|
|
295
|
-
this.selectionId$.next(processLink.processDefinitionKey);
|
|
296
|
-
this.disabled$.next(false);
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
else if (!processDefinitionKey) {
|
|
300
|
-
this.documentService.deleteLinkedUploadProcess(this.documentDefinitionName).subscribe(() => {
|
|
301
|
-
this.disabled$.next(false);
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
setDocumentenApiUploaderProvider(config) {
|
|
306
|
-
this.documentenApiUploadProvider = config.uploadProvider === UploadProvider.DOCUMENTEN_API;
|
|
307
|
-
}
|
|
308
|
-
getDefaultSelection() {
|
|
309
|
-
this.documentService
|
|
310
|
-
.getLinkedUploadProcess(this.documentDefinitionName)
|
|
311
|
-
.subscribe(linkedUploadProcess => {
|
|
312
|
-
if (linkedUploadProcess) {
|
|
313
|
-
this.selectionId$.next(linkedUploadProcess.processDefinitionKey);
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
DossierManagementLinkProcessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementLinkProcessComponent, deps: [{ token: i1$3.ConfigService }, { token: i1.ProcessService }, { token: i2.ActivatedRoute }, { token: i1$1.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
319
|
-
DossierManagementLinkProcessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: i7$1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin"], outputs: ["selectedChange", "clear"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementLinkProcessComponent, decorators: [{
|
|
321
|
-
type: Component,
|
|
322
|
-
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"] }]
|
|
323
|
-
}], ctorParameters: function () { return [{ type: i1$3.ConfigService }, { type: i1.ProcessService }, { type: i2.ActivatedRoute }, { type: i1$1.DocumentService }]; } });
|
|
324
|
-
|
|
325
|
-
/*
|
|
326
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
327
|
-
*
|
|
328
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
329
|
-
* you may not use this file except in compliance with the License.
|
|
330
|
-
* You may obtain a copy of the License at
|
|
331
|
-
*
|
|
332
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
333
|
-
*
|
|
334
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
335
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
336
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
337
|
-
* See the License for the specific language governing permissions and
|
|
338
|
-
* limitations under the License.
|
|
339
|
-
*/
|
|
340
|
-
class DossierManagementAssigneeComponent {
|
|
341
|
-
constructor(documentService, route) {
|
|
342
|
-
this.documentService = documentService;
|
|
343
|
-
this.route = route;
|
|
344
|
-
this.disabled$ = new BehaviorSubject(false);
|
|
345
|
-
this._refresh$ = new BehaviorSubject(null);
|
|
346
|
-
this.loading$ = new BehaviorSubject(true);
|
|
347
|
-
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''));
|
|
348
|
-
this.currentValue$ = this._refresh$.pipe(switchMap(() => this.documentDefinitionName$), switchMap(documentDefinitionName => this.documentService.getCaseSettings(documentDefinitionName)), tap(() => this.loading$.next(false)));
|
|
349
|
-
this.disabled$ = new BehaviorSubject(false);
|
|
350
|
-
}
|
|
351
|
-
updateCaseSettings(caseSettings, documentDefinitionName) {
|
|
352
|
-
this.disableInput();
|
|
353
|
-
this.documentService.patchCaseSettings(documentDefinitionName, caseSettings).subscribe(() => {
|
|
354
|
-
this.enableInput();
|
|
355
|
-
this.refreshSettings();
|
|
356
|
-
}, () => {
|
|
357
|
-
this.enableInput();
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
disableInput() {
|
|
361
|
-
this.disabled$.next(true);
|
|
362
|
-
}
|
|
363
|
-
enableInput() {
|
|
364
|
-
this.disabled$.next(false);
|
|
365
|
-
}
|
|
366
|
-
refreshSettings() {
|
|
367
|
-
this._refresh$.next(null);
|
|
368
|
-
}
|
|
369
|
-
toggleAssignee(currentSettings, documentDefinitionName) {
|
|
370
|
-
this.updateCaseSettings({
|
|
371
|
-
canHaveAssignee: !currentSettings.canHaveAssignee,
|
|
372
|
-
autoAssignTasks: currentSettings.autoAssignTasks,
|
|
373
|
-
}, documentDefinitionName);
|
|
374
|
-
}
|
|
375
|
-
toggleTaskAssignment(currentSettings, documentDefinitionName) {
|
|
376
|
-
this.updateCaseSettings({
|
|
377
|
-
canHaveAssignee: currentSettings.canHaveAssignee,
|
|
378
|
-
autoAssignTasks: !currentSettings.autoAssignTasks,
|
|
379
|
-
}, documentDefinitionName);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
DossierManagementAssigneeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementAssigneeComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
383
|
-
DossierManagementAssigneeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: i3$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementAssigneeComponent, decorators: [{
|
|
385
|
-
type: Component,
|
|
386
|
-
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" }]
|
|
387
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.ActivatedRoute }]; } });
|
|
388
|
-
|
|
389
|
-
/*
|
|
390
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
391
|
-
*
|
|
392
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
393
|
-
* you may not use this file except in compliance with the License.
|
|
394
|
-
* You may obtain a copy of the License at
|
|
395
|
-
*
|
|
396
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
397
|
-
*
|
|
398
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
399
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
400
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
401
|
-
* See the License for the specific language governing permissions and
|
|
402
|
-
* limitations under the License.
|
|
403
|
-
*/
|
|
404
|
-
class DossierManagementDetailComponent {
|
|
405
|
-
constructor(documentService, route, alertService) {
|
|
406
|
-
this.documentService = documentService;
|
|
407
|
-
this.route = route;
|
|
408
|
-
this.alertService = alertService;
|
|
409
|
-
this.documentDefinitionName = null;
|
|
410
|
-
this.documentDefinition = null;
|
|
411
|
-
this.processDocumentDefinitions = [];
|
|
412
|
-
this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
|
|
413
|
-
}
|
|
414
|
-
ngOnInit() {
|
|
415
|
-
this.loadDocumentDefinition();
|
|
416
|
-
this.loadProcessDocumentDefinitions();
|
|
417
|
-
}
|
|
418
|
-
loadProcessDocumentDefinitions() {
|
|
419
|
-
this.documentService
|
|
420
|
-
.findProcessDocumentDefinitions(this.documentDefinitionName)
|
|
421
|
-
.subscribe((processDocumentDefinitions) => {
|
|
422
|
-
this.processDocumentDefinitions = processDocumentDefinitions;
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
loadDocumentDefinition() {
|
|
426
|
-
this.documentService
|
|
427
|
-
.getDocumentDefinition(this.documentDefinitionName)
|
|
428
|
-
.subscribe((documentDefinition) => {
|
|
429
|
-
this.documentDefinition = documentDefinition;
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
openDossierConnectModal() {
|
|
433
|
-
this.dossierConnectModal.openModal(this.documentDefinition);
|
|
434
|
-
}
|
|
435
|
-
openDossierRemoveModal() {
|
|
436
|
-
this.dossierRemoveModal.openModal(this.documentDefinition);
|
|
437
|
-
}
|
|
438
|
-
deleteProcessDocumentDefinition(processDocumentDefinition) {
|
|
439
|
-
this.documentService
|
|
440
|
-
.deleteProcessDocumentDefinition({
|
|
441
|
-
documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
|
|
442
|
-
processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
|
|
443
|
-
canInitializeDocument: processDocumentDefinition.canInitializeDocument,
|
|
444
|
-
startableByUser: processDocumentDefinition.startableByUser,
|
|
445
|
-
})
|
|
446
|
-
.subscribe(() => {
|
|
447
|
-
this.alertService.success('Successfully deleted process document definition');
|
|
448
|
-
this.loadProcessDocumentDefinitions();
|
|
449
|
-
}, () => {
|
|
450
|
-
this.alertService.error('Failed to delete process document definition');
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
downloadDefinition() {
|
|
454
|
-
const definition = this.documentDefinition;
|
|
455
|
-
const dataString = 'data:text/json;charset=utf-8,' +
|
|
456
|
-
encodeURIComponent(JSON.stringify(definition.schema, null, 2));
|
|
457
|
-
const downloadAnchorElement = document.getElementById('downloadAnchorElement');
|
|
458
|
-
downloadAnchorElement.setAttribute('href', dataString);
|
|
459
|
-
downloadAnchorElement.setAttribute('download', `${definition.id.name}-v${definition.id.version}.json`);
|
|
460
|
-
downloadAnchorElement.click();
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
DossierManagementDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementDetailComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.ActivatedRoute }, { token: i3$1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
-
DossierManagementDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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-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-roles [documentDefinitionName]=\"documentDefinitionName\">\n </valtimo-dossier-management-roles>\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: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i3$1.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: DossierManagementRolesComponent, selector: "valtimo-dossier-management-roles", inputs: ["documentDefinitionName"] }, { kind: "component", type: DossierManagementLinkProcessComponent, selector: "valtimo-dossier-management-link-process" }, { kind: "component", type: DossierManagementAssigneeComponent, selector: "valtimo-dossier-management-assignee" }, { kind: "pipe", type: i6.JsonPipe, name: "json" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementDetailComponent, decorators: [{
|
|
466
|
-
type: Component,
|
|
467
|
-
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-roles [documentDefinitionName]=\"documentDefinitionName\">\n </valtimo-dossier-management-roles>\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"] }]
|
|
468
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.ActivatedRoute }, { type: i3$1.AlertService }]; }, propDecorators: { dossierConnectModal: [{
|
|
469
|
-
type: ViewChild,
|
|
470
|
-
args: ['dossierConnectModal']
|
|
471
|
-
}], dossierRemoveModal: [{
|
|
472
|
-
type: ViewChild,
|
|
473
|
-
args: ['dossierRemoveModal']
|
|
474
|
-
}], documentRoles: [{
|
|
475
|
-
type: ViewChild,
|
|
476
|
-
args: ['documentRoles']
|
|
477
|
-
}] } });
|
|
478
|
-
|
|
479
|
-
/*
|
|
480
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
481
|
-
*
|
|
482
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
483
|
-
* you may not use this file except in compliance with the License.
|
|
484
|
-
* You may obtain a copy of the License at
|
|
485
|
-
*
|
|
486
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
487
|
-
*
|
|
488
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
489
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
490
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
491
|
-
* See the License for the specific language governing permissions and
|
|
492
|
-
* limitations under the License.
|
|
493
|
-
*/
|
|
494
|
-
class DossierManagementUploadComponent {
|
|
495
|
-
constructor(documentService, translateService, menuService) {
|
|
496
|
-
this.documentService = documentService;
|
|
497
|
-
this.translateService = translateService;
|
|
498
|
-
this.menuService = menuService;
|
|
499
|
-
this.definitionUploaded = new EventEmitter();
|
|
500
|
-
this.clear$ = new Subject();
|
|
501
|
-
this.jsonString$ = new BehaviorSubject('');
|
|
502
|
-
this.error$ = new BehaviorSubject('');
|
|
503
|
-
this.disabled$ = new BehaviorSubject(false);
|
|
504
|
-
this.file$ = new BehaviorSubject(undefined);
|
|
505
|
-
}
|
|
506
|
-
ngAfterViewInit() {
|
|
507
|
-
this.openShowSubscription();
|
|
508
|
-
this.openFileSubscription();
|
|
509
|
-
}
|
|
510
|
-
ngOnDestroy() {
|
|
511
|
-
this.showSubscription.unsubscribe();
|
|
512
|
-
this.fileSubscription.unsubscribe();
|
|
513
|
-
this.closeErrorSubscription();
|
|
514
|
-
}
|
|
515
|
-
setFile(file) {
|
|
516
|
-
this.clearError();
|
|
517
|
-
this.file$.next(file);
|
|
518
|
-
}
|
|
519
|
-
uploadDefinition() {
|
|
520
|
-
this.disable();
|
|
521
|
-
this.jsonString$
|
|
522
|
-
.pipe(switchMap$1(jsonString => this.documentService
|
|
523
|
-
.createDocumentDefinition(new DocumentDefinitionCreateRequest(jsonString))
|
|
524
|
-
.pipe(tap(
|
|
525
|
-
// success
|
|
526
|
-
() => {
|
|
527
|
-
this.closeErrorSubscription();
|
|
528
|
-
this.clearError();
|
|
529
|
-
this.enable();
|
|
530
|
-
this.hideModal();
|
|
531
|
-
this.menuService.reload();
|
|
532
|
-
this.definitionUploaded.emit();
|
|
533
|
-
},
|
|
534
|
-
// error
|
|
535
|
-
() => {
|
|
536
|
-
this.openErrorSubscription('dropzone.error.invalidDocDef');
|
|
537
|
-
this.enable();
|
|
538
|
-
}))), take(1))
|
|
539
|
-
.subscribe();
|
|
540
|
-
}
|
|
541
|
-
openErrorSubscription(errorCode) {
|
|
542
|
-
this.closeErrorSubscription();
|
|
543
|
-
this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {
|
|
544
|
-
this.error$.next(error);
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
closeErrorSubscription() {
|
|
548
|
-
if (this.errorSubscription) {
|
|
549
|
-
this.errorSubscription.unsubscribe();
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
clearError() {
|
|
553
|
-
this.error$.next('');
|
|
554
|
-
}
|
|
555
|
-
openFileSubscription() {
|
|
556
|
-
this.fileSubscription = this.file$.subscribe(file => {
|
|
557
|
-
if (file) {
|
|
558
|
-
const reader = new FileReader();
|
|
559
|
-
reader.onloadend = () => {
|
|
560
|
-
const result = reader.result.toString();
|
|
561
|
-
if (this.stringIsValidJson(result)) {
|
|
562
|
-
this.jsonString$.next(result);
|
|
563
|
-
}
|
|
564
|
-
else {
|
|
565
|
-
this.clearJsonString();
|
|
566
|
-
this.error$.next(this.translateService.instant('dropzone.error.invalidJson'));
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
reader.readAsText(file);
|
|
570
|
-
}
|
|
571
|
-
else {
|
|
572
|
-
this.clearJsonString();
|
|
573
|
-
}
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
openShowSubscription() {
|
|
577
|
-
this.showSubscription = this.show$.subscribe(show => {
|
|
578
|
-
if (show) {
|
|
579
|
-
this.showModal();
|
|
580
|
-
}
|
|
581
|
-
else {
|
|
582
|
-
this.hideModal();
|
|
583
|
-
}
|
|
584
|
-
this.clearJsonString();
|
|
585
|
-
this.clearError();
|
|
586
|
-
this.clearDropzone();
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
clearJsonString() {
|
|
590
|
-
this.jsonString$.next('');
|
|
591
|
-
}
|
|
592
|
-
clearDropzone() {
|
|
593
|
-
this.clear$.next(null);
|
|
594
|
-
}
|
|
595
|
-
showModal() {
|
|
596
|
-
this.modal.show();
|
|
597
|
-
}
|
|
598
|
-
hideModal() {
|
|
599
|
-
this.modal.hide();
|
|
600
|
-
}
|
|
601
|
-
stringIsValidJson(string) {
|
|
602
|
-
try {
|
|
603
|
-
JSON.parse(string);
|
|
604
|
-
}
|
|
605
|
-
catch (e) {
|
|
606
|
-
return false;
|
|
607
|
-
}
|
|
608
|
-
return true;
|
|
609
|
-
}
|
|
610
|
-
disable() {
|
|
611
|
-
this.disabled$.next(true);
|
|
612
|
-
}
|
|
613
|
-
enable() {
|
|
614
|
-
this.disabled$.next(false);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
DossierManagementUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementUploadComponent, deps: [{ token: i1$1.DocumentService }, { token: i4.TranslateService }, { token: i3$1.MenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
618
|
-
DossierManagementUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i3$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementUploadComponent, decorators: [{
|
|
620
|
-
type: Component,
|
|
621
|
-
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"] }]
|
|
622
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i4.TranslateService }, { type: i3$1.MenuService }]; }, propDecorators: { show$: [{
|
|
623
|
-
type: Input
|
|
624
|
-
}], definitionUploaded: [{
|
|
625
|
-
type: Output
|
|
626
|
-
}], modal: [{
|
|
627
|
-
type: ViewChild,
|
|
628
|
-
args: ['uploadDefinitionModal']
|
|
629
|
-
}] } });
|
|
630
|
-
|
|
631
|
-
/*
|
|
632
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
633
|
-
*
|
|
634
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
635
|
-
* you may not use this file except in compliance with the License.
|
|
636
|
-
* You may obtain a copy of the License at
|
|
637
|
-
*
|
|
638
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
639
|
-
*
|
|
640
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
641
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
642
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
643
|
-
* See the License for the specific language governing permissions and
|
|
644
|
-
* limitations under the License.
|
|
645
|
-
*/
|
|
646
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
647
|
-
class DossierManagementListComponent {
|
|
648
|
-
constructor(documentService, router) {
|
|
649
|
-
this.documentService = documentService;
|
|
650
|
-
this.router = router;
|
|
651
|
-
this.dossiers = [];
|
|
652
|
-
this.pagination = {
|
|
653
|
-
collectionSize: 0,
|
|
654
|
-
page: 1,
|
|
655
|
-
size: 10,
|
|
656
|
-
maxPaginationItemSize: 5,
|
|
657
|
-
};
|
|
658
|
-
this.pageParam = 0;
|
|
659
|
-
this.dossierFields = [
|
|
660
|
-
{ key: 'schema.title', label: 'Title' },
|
|
661
|
-
{ key: 'createdOn', label: 'Created On' },
|
|
662
|
-
{ key: 'readOnly', label: 'Read-only' },
|
|
663
|
-
];
|
|
664
|
-
this.showModal$ = new BehaviorSubject(false);
|
|
665
|
-
}
|
|
666
|
-
paginationClicked(page) {
|
|
667
|
-
this.pageParam = page - 1;
|
|
668
|
-
this.getDocumentDefinitions();
|
|
669
|
-
}
|
|
670
|
-
paginationSet() {
|
|
671
|
-
this.getDocumentDefinitions();
|
|
672
|
-
}
|
|
673
|
-
redirectToDetails(documentDefinition) {
|
|
674
|
-
this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);
|
|
675
|
-
}
|
|
676
|
-
getDocumentDefinitions() {
|
|
677
|
-
this.documentService
|
|
678
|
-
.queryDefinitions({ filteredOnRole: false, page: this.pageParam, size: this.pagination.size })
|
|
679
|
-
.subscribe((documentDefinitionPage) => {
|
|
680
|
-
this.pagination.collectionSize = documentDefinitionPage.totalElements;
|
|
681
|
-
this.dossiers = documentDefinitionPage.content;
|
|
682
|
-
this.dossiers.map((dossier) => {
|
|
683
|
-
dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');
|
|
684
|
-
});
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
showModal() {
|
|
688
|
-
this.showModal$.next(true);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
DossierManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementListComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
692
|
-
DossierManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: i3$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i3$1.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: i4.TranslatePipe, name: "translate" }] });
|
|
693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementListComponent, decorators: [{
|
|
694
|
-
type: Component,
|
|
695
|
-
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"] }]
|
|
696
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.Router }]; } });
|
|
697
|
-
|
|
698
|
-
/*
|
|
699
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
700
|
-
*
|
|
701
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
702
|
-
* you may not use this file except in compliance with the License.
|
|
703
|
-
* You may obtain a copy of the License at
|
|
704
|
-
*
|
|
705
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
706
|
-
*
|
|
707
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
708
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
709
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
710
|
-
* See the License for the specific language governing permissions and
|
|
711
|
-
* limitations under the License.
|
|
712
|
-
*/
|
|
713
|
-
var TabEnum;
|
|
714
|
-
(function (TabEnum) {
|
|
715
|
-
TabEnum["CASE"] = "case";
|
|
716
|
-
TabEnum["SEARCH"] = "search";
|
|
717
|
-
TabEnum["LIST"] = "list";
|
|
718
|
-
})(TabEnum || (TabEnum = {}));
|
|
719
|
-
|
|
720
|
-
/*
|
|
721
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
722
|
-
*
|
|
723
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
724
|
-
* you may not use this file except in compliance with the License.
|
|
725
|
-
* You may obtain a copy of the License at
|
|
726
|
-
*
|
|
727
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
728
|
-
*
|
|
729
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
730
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
731
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
732
|
-
* See the License for the specific language governing permissions and
|
|
733
|
-
* limitations under the License.
|
|
734
|
-
*/
|
|
735
|
-
class TabService {
|
|
736
|
-
constructor() {
|
|
737
|
-
this._currentTab$ = new BehaviorSubject(TabEnum.CASE);
|
|
738
|
-
}
|
|
739
|
-
get currentTab$() {
|
|
740
|
-
return this._currentTab$.asObservable();
|
|
741
|
-
}
|
|
742
|
-
set currentTab(tab) {
|
|
743
|
-
this._currentTab$.next(tab);
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
TabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
747
|
-
TabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, providedIn: 'root' });
|
|
748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, decorators: [{
|
|
749
|
-
type: Injectable,
|
|
750
|
-
args: [{
|
|
751
|
-
providedIn: 'root',
|
|
752
|
-
}]
|
|
753
|
-
}] });
|
|
754
|
-
|
|
755
|
-
/*
|
|
756
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
757
|
-
*
|
|
758
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
759
|
-
* you may not use this file except in compliance with the License.
|
|
760
|
-
* You may obtain a copy of the License at
|
|
761
|
-
*
|
|
762
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
763
|
-
*
|
|
764
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
765
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
766
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
767
|
-
* See the License for the specific language governing permissions and
|
|
768
|
-
* limitations under the License.
|
|
769
|
-
*/
|
|
770
|
-
class DossierManagementSearchFieldsComponent {
|
|
771
|
-
constructor(documentService, route, translateService, sanitizer) {
|
|
772
|
-
this.documentService = documentService;
|
|
773
|
-
this.route = route;
|
|
774
|
-
this.translateService = translateService;
|
|
775
|
-
this.sanitizer = sanitizer;
|
|
776
|
-
this.searchField = new EventEmitter();
|
|
777
|
-
this.downloadName$ = new BehaviorSubject('');
|
|
778
|
-
this.downloadUrl$ = new BehaviorSubject(undefined);
|
|
779
|
-
this.disableInput$ = new BehaviorSubject(false);
|
|
780
|
-
this.selectedSearchField$ = new BehaviorSubject(null);
|
|
781
|
-
this.formData$ = new BehaviorSubject(null);
|
|
782
|
-
this.valid$ = new BehaviorSubject(false);
|
|
783
|
-
this.subscriptions = new Subscription();
|
|
784
|
-
this.COLUMNS = [
|
|
785
|
-
{
|
|
786
|
-
viewType: 'string',
|
|
787
|
-
sortable: false,
|
|
788
|
-
propertyName: 'title',
|
|
789
|
-
translationKey: 'title',
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
viewType: 'string',
|
|
793
|
-
sortable: false,
|
|
794
|
-
propertyName: 'key',
|
|
795
|
-
translationKey: 'key',
|
|
796
|
-
},
|
|
797
|
-
{
|
|
798
|
-
viewType: 'string',
|
|
799
|
-
sortable: false,
|
|
800
|
-
propertyName: 'path',
|
|
801
|
-
translationKey: 'path',
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
viewType: 'string',
|
|
805
|
-
sortable: false,
|
|
806
|
-
propertyName: 'dataType',
|
|
807
|
-
translationKey: 'dataType',
|
|
808
|
-
},
|
|
809
|
-
{
|
|
810
|
-
viewType: 'string',
|
|
811
|
-
sortable: false,
|
|
812
|
-
propertyName: 'fieldType',
|
|
813
|
-
translationKey: 'fieldType',
|
|
814
|
-
},
|
|
815
|
-
];
|
|
816
|
-
this.dropdownColumns$ = new BehaviorSubject([
|
|
817
|
-
{
|
|
818
|
-
labelTranslationKey: 'searchFieldsOverview.id',
|
|
819
|
-
dataKey: 'key',
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
labelTranslationKey: 'searchFieldsOverview.text',
|
|
823
|
-
dataKey: 'value',
|
|
824
|
-
},
|
|
825
|
-
]);
|
|
826
|
-
this.DATA_TYPES = [
|
|
827
|
-
'text',
|
|
828
|
-
'number',
|
|
829
|
-
'date',
|
|
830
|
-
'datetime',
|
|
831
|
-
'boolean',
|
|
832
|
-
];
|
|
833
|
-
this.dataTypeItems$ = this.translateService.stream('key').pipe(map(() => this.DATA_TYPES.map(dataType => ({
|
|
834
|
-
id: dataType,
|
|
835
|
-
text: this.translateService.instant(`searchFields.${dataType}`),
|
|
836
|
-
}))));
|
|
837
|
-
this.dataTypeIsBoolean$ = new BehaviorSubject(false);
|
|
838
|
-
this.dataTypeIsText$ = new BehaviorSubject(false);
|
|
839
|
-
this.ALL_FIELD_TYPES = [
|
|
840
|
-
'single',
|
|
841
|
-
'range',
|
|
842
|
-
'single-select-dropdown',
|
|
843
|
-
'multi-select-dropdown',
|
|
844
|
-
];
|
|
845
|
-
this.NON_TEXT_FIELD_TYPES = ['single', 'range'];
|
|
846
|
-
this.BOOLEAN_FIELD_TYPES = ['single'];
|
|
847
|
-
this.fieldTypeItems$ = combineLatest([
|
|
848
|
-
this.dataTypeIsBoolean$,
|
|
849
|
-
this.dataTypeIsText$,
|
|
850
|
-
this.translateService.stream('key'),
|
|
851
|
-
]).pipe(map(([dataTypeIsBoolean, dataTypeIsText]) => {
|
|
852
|
-
if (dataTypeIsBoolean) {
|
|
853
|
-
return this.BOOLEAN_FIELD_TYPES.map(fieldType => ({
|
|
854
|
-
id: fieldType,
|
|
855
|
-
text: this.translateService.instant(`searchFieldsOverview.${fieldType}`),
|
|
856
|
-
}));
|
|
857
|
-
}
|
|
858
|
-
else if (!dataTypeIsText) {
|
|
859
|
-
return this.NON_TEXT_FIELD_TYPES.map(fieldType => ({
|
|
860
|
-
id: fieldType,
|
|
861
|
-
text: this.translateService.instant(`searchFieldsOverview.${fieldType}`),
|
|
862
|
-
}));
|
|
863
|
-
}
|
|
864
|
-
return this.ALL_FIELD_TYPES.map(fieldType => ({
|
|
865
|
-
id: fieldType,
|
|
866
|
-
text: this.translateService.instant(`searchFieldsOverview.${fieldType}`),
|
|
867
|
-
}));
|
|
868
|
-
}));
|
|
869
|
-
this.MATCH_TYPES = ['exact', 'like'];
|
|
870
|
-
this.matchTypeItems$ = this.translateService
|
|
871
|
-
.stream('key')
|
|
872
|
-
.pipe(map(() => this.MATCH_TYPES.map(matchType => ({
|
|
873
|
-
id: matchType,
|
|
874
|
-
text: this.translateService.instant(`searchFieldsOverview.${matchType}`),
|
|
875
|
-
}))));
|
|
876
|
-
this.fields$ = this.translateService.stream('key').pipe(map(() => this.COLUMNS.map(column => (Object.assign(Object.assign({ key: column.propertyName, label: this.translateService.instant(`searchFieldsOverview.${column.translationKey}`), sortable: column.sortable }, (column.viewType && { viewType: column.viewType })), (column.enum && { enum: column.enum }))))));
|
|
877
|
-
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName));
|
|
878
|
-
this.loadingSearchFields = true;
|
|
879
|
-
this.showSearchFieldsForm = false;
|
|
880
|
-
this.refreshSearchFields$ = new BehaviorSubject(null);
|
|
881
|
-
this.searchFields$ = combineLatest([
|
|
882
|
-
this.documentDefinitionName$,
|
|
883
|
-
this.refreshSearchFields$,
|
|
884
|
-
]).pipe(switchMap(([documentDefinitionName]) => this.documentService.getDocumentSearchFields(documentDefinitionName)), tap$1(searchFields => {
|
|
885
|
-
this.documentDefinitionName$.pipe(take$1(1)).subscribe(documentDefinitionName => {
|
|
886
|
-
if (searchFields && Array.isArray(searchFields) && searchFields.length > 0) {
|
|
887
|
-
this.setDownload(documentDefinitionName, searchFields);
|
|
888
|
-
}
|
|
889
|
-
});
|
|
890
|
-
}), tap$1(searchFields => {
|
|
891
|
-
this.cachedSearchFields = searchFields;
|
|
892
|
-
this.loadingSearchFields = false;
|
|
893
|
-
}));
|
|
894
|
-
this.translatedSearchFields$ = combineLatest([
|
|
895
|
-
this.searchFields$,
|
|
896
|
-
this.translateService.stream('key'),
|
|
897
|
-
]).pipe(map(([searchFields]) => searchFields.map(searchField => (Object.assign(Object.assign({}, searchField), { title: searchField.title ? searchField.title : '', dataType: this.translateService.instant(`searchFields.${searchField.dataType}`), matchType: this.translateService.instant(`searchFieldsOverview.${searchField.matchType}`), fieldType: this.translateService.instant(`searchFieldsOverview.${searchField.fieldType}`) })))));
|
|
898
|
-
this.fieldTypeIsDropdown$ = new BehaviorSubject(false);
|
|
899
|
-
this.dropdownDataProviderNames$ = combineLatest([
|
|
900
|
-
this.documentService.getDropdownDataProviders(),
|
|
901
|
-
this.translateService.stream('key'),
|
|
902
|
-
]).pipe(map(([providers]) => providers.map(provider => ({
|
|
903
|
-
id: provider,
|
|
904
|
-
text: this.translateService.instant(`searchFieldsOverview.${provider}`),
|
|
905
|
-
}))));
|
|
906
|
-
this.modifiedDropdownValues$ = new BehaviorSubject([]);
|
|
907
|
-
this.initialDropdownValues$ = combineLatest([
|
|
908
|
-
this.documentDefinitionName$,
|
|
909
|
-
this.formData$,
|
|
910
|
-
]).pipe(distinctUntilChanged(([prevDocumentDefinitionName, prevFormData], [currDocumentDefinitionName, currFormData]) => prevDocumentDefinitionName === currDocumentDefinitionName &&
|
|
911
|
-
(prevFormData === null || prevFormData === void 0 ? void 0 : prevFormData.dropdownDataProvider) === (currFormData === null || currFormData === void 0 ? void 0 : currFormData.dropdownDataProvider) &&
|
|
912
|
-
(prevFormData === null || prevFormData === void 0 ? void 0 : prevFormData.key) === (currFormData === null || currFormData === void 0 ? void 0 : currFormData.key)), switchMap(([documentDefinitionName, formData]) => {
|
|
913
|
-
if (!formData || !formData.dropdownDataProvider) {
|
|
914
|
-
return of([]);
|
|
915
|
-
}
|
|
916
|
-
return this.documentService
|
|
917
|
-
.getDropdownData(formData.dropdownDataProvider, documentDefinitionName, formData.key)
|
|
918
|
-
.pipe(map(dropdownData => {
|
|
919
|
-
if (dropdownData) {
|
|
920
|
-
return Object.keys(dropdownData).map(dropdownFieldKey => ({
|
|
921
|
-
key: dropdownFieldKey,
|
|
922
|
-
value: dropdownData[dropdownFieldKey],
|
|
923
|
-
}));
|
|
924
|
-
}
|
|
925
|
-
return [];
|
|
926
|
-
}));
|
|
927
|
-
}));
|
|
928
|
-
this.showMatchTypes$ = combineLatest([
|
|
929
|
-
this.dataTypeIsText$,
|
|
930
|
-
this.fieldTypeIsDropdown$,
|
|
931
|
-
]).pipe(map(([dataTypeIsText, fieldTypeIsDropdown]) => dataTypeIsText && !fieldTypeIsDropdown));
|
|
932
|
-
this.showReadonlyDropdownTable$ = combineLatest([
|
|
933
|
-
this.dataTypeIsText$,
|
|
934
|
-
this.fieldTypeIsDropdown$,
|
|
935
|
-
this.formData$,
|
|
936
|
-
]).pipe(map(([dataTypeIsText, fieldTypeIsDropdown, formData]) => dataTypeIsText &&
|
|
937
|
-
fieldTypeIsDropdown &&
|
|
938
|
-
(formData === null || formData === void 0 ? void 0 : formData.dropdownDataProvider) &&
|
|
939
|
-
!this.dropdownDataProviderSupportsUpdates(formData === null || formData === void 0 ? void 0 : formData.dropdownDataProvider)));
|
|
940
|
-
this.showInputDropdownTable$ = combineLatest([
|
|
941
|
-
this.dataTypeIsText$,
|
|
942
|
-
this.fieldTypeIsDropdown$,
|
|
943
|
-
this.formData$,
|
|
944
|
-
]).pipe(map(([dataTypeIsText, fieldTypeIsDropdown, formData]) => dataTypeIsText &&
|
|
945
|
-
fieldTypeIsDropdown &&
|
|
946
|
-
(formData === null || formData === void 0 ? void 0 : formData.dropdownDataProvider) &&
|
|
947
|
-
this.dropdownDataProviderSupportsUpdates(formData === null || formData === void 0 ? void 0 : formData.dropdownDataProvider)));
|
|
948
|
-
}
|
|
949
|
-
ngOnInit() {
|
|
950
|
-
this.openSelectedSearchFieldSubscription();
|
|
951
|
-
}
|
|
952
|
-
ngAfterViewInit() {
|
|
953
|
-
this.openModalShowingSubscription();
|
|
954
|
-
}
|
|
955
|
-
ngOnDestroy() {
|
|
956
|
-
this.subscriptions.unsubscribe();
|
|
957
|
-
}
|
|
958
|
-
searchFieldClicked(searchField, searchFieldActionTypeIsAdd) {
|
|
959
|
-
this.disableInput$.pipe(take$1(1)).subscribe(inputDisabled => {
|
|
960
|
-
if (!inputDisabled) {
|
|
961
|
-
this.searchFieldActionTypeIsAdd = searchFieldActionTypeIsAdd;
|
|
962
|
-
const searchFieldToSelect = this.cachedSearchFields.find(field => field.key === searchField.key);
|
|
963
|
-
this.selectedSearchField$.next(searchFieldToSelect);
|
|
964
|
-
}
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
formValueChange(data) {
|
|
968
|
-
setTimeout(() => {
|
|
969
|
-
this.nextIfChanged(this.dataTypeIsText$, data.dataType === 'text');
|
|
970
|
-
this.nextIfChanged(this.dataTypeIsBoolean$, data.dataType === 'boolean');
|
|
971
|
-
this.nextIfChanged(this.fieldTypeIsDropdown$, this.isFieldTypeDropdown(data.fieldType));
|
|
972
|
-
this.nextIfChanged(this.formData$, data);
|
|
973
|
-
this.nextIfChanged(this.valid$, this.isValid(data));
|
|
974
|
-
}, 0);
|
|
975
|
-
}
|
|
976
|
-
dropdownDatalistChange(data) {
|
|
977
|
-
this.modifiedDropdownValues$.next(data);
|
|
978
|
-
}
|
|
979
|
-
moveRow(searchFieldRowIndex, moveUp, clickEvent, documentDefinitionName) {
|
|
980
|
-
const searchFields = [...this.cachedSearchFields];
|
|
981
|
-
const searchFieldRow = searchFields[searchFieldRowIndex];
|
|
982
|
-
clickEvent.stopPropagation();
|
|
983
|
-
const searchFieldIndex = searchFields.findIndex(field => field.key === searchFieldRow.key);
|
|
984
|
-
const foundSearchField = Object.assign({}, searchFields[searchFieldIndex]);
|
|
985
|
-
const filteredSearchFields = searchFields.filter(field => field.key !== searchFieldRow.key);
|
|
986
|
-
const multipleSearchFields = searchFields.length > 1;
|
|
987
|
-
if (multipleSearchFields && moveUp && searchFieldIndex > 0) {
|
|
988
|
-
const searchFieldBeforeKey = `${searchFields[searchFieldIndex - 1].key}`;
|
|
989
|
-
const searchFieldBeforeIndex = filteredSearchFields.findIndex(field => field.key === searchFieldBeforeKey);
|
|
990
|
-
filteredSearchFields.splice(searchFieldBeforeIndex, 0, foundSearchField);
|
|
991
|
-
this.updateSearchFields(documentDefinitionName, filteredSearchFields);
|
|
992
|
-
}
|
|
993
|
-
else if (multipleSearchFields && !moveUp && searchFieldIndex < searchFields.length) {
|
|
994
|
-
const searchFieldAfterKey = `${searchFields[searchFieldIndex + 1].key}`;
|
|
995
|
-
const searchFieldAfterIndex = filteredSearchFields.findIndex(field => field.key === searchFieldAfterKey);
|
|
996
|
-
filteredSearchFields.splice(searchFieldAfterIndex + 1, 0, foundSearchField);
|
|
997
|
-
this.updateSearchFields(documentDefinitionName, filteredSearchFields);
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
deleteSelectedSearchField(documentDefinitionName, selectedSearchField) {
|
|
1001
|
-
this.disableInput();
|
|
1002
|
-
if (this.dropdownDataProviderSupportsUpdates(selectedSearchField === null || selectedSearchField === void 0 ? void 0 : selectedSearchField.dropdownDataProvider)) {
|
|
1003
|
-
this.documentService
|
|
1004
|
-
.deleteDropdownData(selectedSearchField.dropdownDataProvider, documentDefinitionName, selectedSearchField.key)
|
|
1005
|
-
.subscribe();
|
|
1006
|
-
}
|
|
1007
|
-
this.documentService
|
|
1008
|
-
.deleteDocumentSearch(documentDefinitionName, selectedSearchField.key)
|
|
1009
|
-
.subscribe(() => {
|
|
1010
|
-
this.enableInput();
|
|
1011
|
-
this.hideModal();
|
|
1012
|
-
this.refreshSearchFields();
|
|
1013
|
-
}, () => {
|
|
1014
|
-
this.enableInput();
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
saveSearchField(documentDefinitionName) {
|
|
1018
|
-
this.disableInput();
|
|
1019
|
-
this.formData$.pipe(take$1(1)).subscribe(formData => {
|
|
1020
|
-
const mappedFormData = Object.assign(Object.assign({}, formData), { matchType: !this.isFieldTypeDropdown(formData.fieldType) && formData.dataType === 'text'
|
|
1021
|
-
? formData.matchType
|
|
1022
|
-
: 'exact', fieldType: formData.dataType !== 'boolean' ? formData.fieldType : 'single' });
|
|
1023
|
-
const prevFormData = this.selectedSearchField$.value;
|
|
1024
|
-
if (this.dropdownDataProviderSupportsUpdates(prevFormData === null || prevFormData === void 0 ? void 0 : prevFormData.dropdownDataProvider) &&
|
|
1025
|
-
prevFormData.dropdownDataProvider !== (mappedFormData === null || mappedFormData === void 0 ? void 0 : mappedFormData.dropdownDataProvider)) {
|
|
1026
|
-
this.documentService
|
|
1027
|
-
.deleteDropdownData(prevFormData.dropdownDataProvider, documentDefinitionName, prevFormData.key)
|
|
1028
|
-
.subscribe();
|
|
1029
|
-
}
|
|
1030
|
-
if (this.dropdownDataProviderSupportsUpdates(mappedFormData.dropdownDataProvider)) {
|
|
1031
|
-
this.modifiedDropdownValues$.pipe(take$1(1)).subscribe(dropdownValues => {
|
|
1032
|
-
const request = dropdownValues.reduce((acc, keyValue) => (Object.assign(Object.assign({}, acc), { [keyValue.key]: keyValue.value })), {});
|
|
1033
|
-
this.documentService
|
|
1034
|
-
.postDropdownData(mappedFormData.dropdownDataProvider, documentDefinitionName, mappedFormData.key, request)
|
|
1035
|
-
.subscribe();
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
if (this.searchFieldActionTypeIsAdd) {
|
|
1039
|
-
this.documentService.postDocumentSearch(documentDefinitionName, mappedFormData).subscribe(() => {
|
|
1040
|
-
this.enableInput();
|
|
1041
|
-
this.hideModal();
|
|
1042
|
-
this.refreshSearchFields();
|
|
1043
|
-
}, () => {
|
|
1044
|
-
this.enableInput();
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
else {
|
|
1048
|
-
const newFields = [...this.cachedSearchFields];
|
|
1049
|
-
const indexToReplace = newFields.findIndex(field => field.key === mappedFormData.key);
|
|
1050
|
-
const filteredFields = newFields.filter(field => field.key !== mappedFormData.key);
|
|
1051
|
-
filteredFields.splice(indexToReplace, 0, mappedFormData);
|
|
1052
|
-
this.updateSearchFields(documentDefinitionName, filteredFields);
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
updateSearchFields(documentDefinitionName, newSearchFields) {
|
|
1057
|
-
this.disableInput();
|
|
1058
|
-
this.documentService.putDocumentSearch(documentDefinitionName, newSearchFields).subscribe(() => {
|
|
1059
|
-
this.enableInput();
|
|
1060
|
-
this.hideModal();
|
|
1061
|
-
this.refreshSearchFields();
|
|
1062
|
-
}, () => {
|
|
1063
|
-
this.enableInput();
|
|
1064
|
-
});
|
|
1065
|
-
}
|
|
1066
|
-
nextIfChanged(behaviourSubject$, value) {
|
|
1067
|
-
if (JSON.stringify(behaviourSubject$.value) !== JSON.stringify(value)) {
|
|
1068
|
-
behaviourSubject$.next(value);
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
isValid(data) {
|
|
1072
|
-
const validMatchType = data.dataType === 'text' && !this.isFieldTypeDropdown(data.fieldType) ? data.matchType : true;
|
|
1073
|
-
const validDropdownDataProvider = this.isFieldTypeDropdown(data.fieldType)
|
|
1074
|
-
? data.dropdownDataProvider
|
|
1075
|
-
: true;
|
|
1076
|
-
const containsAllValues = !!(data.key &&
|
|
1077
|
-
data.dataType &&
|
|
1078
|
-
validMatchType &&
|
|
1079
|
-
validDropdownDataProvider &&
|
|
1080
|
-
data.path);
|
|
1081
|
-
const keyIsUnique = !this.searchFieldActionTypeIsAdd ||
|
|
1082
|
-
this.cachedSearchFields.findIndex(field => field.key === data.key) === -1;
|
|
1083
|
-
return containsAllValues && keyIsUnique;
|
|
1084
|
-
}
|
|
1085
|
-
isFieldTypeDropdown(fieldType) {
|
|
1086
|
-
return fieldType === 'single-select-dropdown' || fieldType === 'multi-select-dropdown';
|
|
1087
|
-
}
|
|
1088
|
-
dropdownDataProviderSupportsUpdates(dropdownDataProvider) {
|
|
1089
|
-
return dropdownDataProvider === 'dropdownDatabaseDataProvider';
|
|
1090
|
-
}
|
|
1091
|
-
openSelectedSearchFieldSubscription() {
|
|
1092
|
-
this.subscriptions.add(this.selectedSearchField$.subscribe(() => {
|
|
1093
|
-
this.showModal();
|
|
1094
|
-
}));
|
|
1095
|
-
}
|
|
1096
|
-
openModalShowingSubscription() {
|
|
1097
|
-
this.subscriptions.add(this.modal.modalShowing$.subscribe(modalShowing => {
|
|
1098
|
-
if (modalShowing) {
|
|
1099
|
-
setTimeout(() => {
|
|
1100
|
-
this.showSearchFieldsForm = true;
|
|
1101
|
-
}, 0);
|
|
1102
|
-
}
|
|
1103
|
-
else {
|
|
1104
|
-
setTimeout(() => {
|
|
1105
|
-
this.showSearchFieldsForm = false;
|
|
1106
|
-
}, 150);
|
|
1107
|
-
}
|
|
1108
|
-
}));
|
|
1109
|
-
}
|
|
1110
|
-
setDownload(documentDefinitionName, searchFields) {
|
|
1111
|
-
this.downloadName$.next(`${documentDefinitionName}.json`);
|
|
1112
|
-
this.downloadUrl$.next(this.sanitizer.bypassSecurityTrustUrl('data:text/json;charset=UTF-8,' +
|
|
1113
|
-
encodeURIComponent(JSON.stringify({ searchFields }, null, 2))));
|
|
1114
|
-
}
|
|
1115
|
-
disableInput() {
|
|
1116
|
-
this.disableInput$.next(true);
|
|
1117
|
-
}
|
|
1118
|
-
enableInput() {
|
|
1119
|
-
this.disableInput$.next(false);
|
|
1120
|
-
}
|
|
1121
|
-
showModal() {
|
|
1122
|
-
var _a;
|
|
1123
|
-
(_a = this.modal) === null || _a === void 0 ? void 0 : _a.show();
|
|
1124
|
-
}
|
|
1125
|
-
hideModal() {
|
|
1126
|
-
var _a;
|
|
1127
|
-
(_a = this.modal) === null || _a === void 0 ? void 0 : _a.hide();
|
|
1128
|
-
}
|
|
1129
|
-
refreshSearchFields() {
|
|
1130
|
-
this.refreshSearchFields$.next(null);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
DossierManagementSearchFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementSearchFieldsComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.ActivatedRoute }, { token: i4.TranslateService }, { token: i4$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
1134
|
-
DossierManagementSearchFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\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 <v-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 </v-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: 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: "component", type: i3$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i3$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i7$1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin"], outputs: ["selectedChange", "clear"] }, { kind: "component", type: i3$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i7$1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.MultiInputComponent, selector: "v-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required"], outputs: ["valueChange"] }, { kind: "component", type: i7$1.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "maxPaginationItemSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
1135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementSearchFieldsComponent, decorators: [{
|
|
1136
|
-
type: Component,
|
|
1137
|
-
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]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\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 <v-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 </v-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"] }]
|
|
1138
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.ActivatedRoute }, { type: i4.TranslateService }, { type: i4$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
|
|
1139
|
-
type: ViewChild,
|
|
1140
|
-
args: ['moveRowButtons']
|
|
1141
|
-
}], modal: [{
|
|
1142
|
-
type: ViewChild,
|
|
1143
|
-
args: ['searchFieldModal']
|
|
1144
|
-
}], searchField: [{
|
|
1145
|
-
type: Output
|
|
1146
|
-
}] } });
|
|
1147
|
-
|
|
1148
|
-
/*
|
|
1149
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1150
|
-
*
|
|
1151
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1152
|
-
* you may not use this file except in compliance with the License.
|
|
1153
|
-
* You may obtain a copy of the License at
|
|
1154
|
-
*
|
|
1155
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1156
|
-
*
|
|
1157
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1158
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1159
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1160
|
-
* See the License for the specific language governing permissions and
|
|
1161
|
-
* limitations under the License.
|
|
1162
|
-
*/
|
|
1163
|
-
class DossierManagementListColumnsComponent {
|
|
1164
|
-
constructor(documentService, route, translateService, configService, sanitizer) {
|
|
1165
|
-
this.documentService = documentService;
|
|
1166
|
-
this.route = route;
|
|
1167
|
-
this.translateService = translateService;
|
|
1168
|
-
this.configService = configService;
|
|
1169
|
-
this.sanitizer = sanitizer;
|
|
1170
|
-
this.downloadName$ = new BehaviorSubject('');
|
|
1171
|
-
this.downloadUrl$ = new BehaviorSubject(undefined);
|
|
1172
|
-
this.COLUMNS = [
|
|
1173
|
-
{
|
|
1174
|
-
viewType: 'string',
|
|
1175
|
-
sortable: false,
|
|
1176
|
-
propertyName: 'title',
|
|
1177
|
-
translationKey: 'title',
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
viewType: 'string',
|
|
1181
|
-
sortable: false,
|
|
1182
|
-
propertyName: 'key',
|
|
1183
|
-
translationKey: 'key',
|
|
1184
|
-
},
|
|
1185
|
-
{
|
|
1186
|
-
viewType: 'string',
|
|
1187
|
-
sortable: false,
|
|
1188
|
-
propertyName: 'path',
|
|
1189
|
-
translationKey: 'path',
|
|
1190
|
-
},
|
|
1191
|
-
{
|
|
1192
|
-
viewType: 'string',
|
|
1193
|
-
sortable: false,
|
|
1194
|
-
propertyName: 'displayType',
|
|
1195
|
-
translationKey: 'displayType',
|
|
1196
|
-
},
|
|
1197
|
-
{
|
|
1198
|
-
viewType: 'string',
|
|
1199
|
-
sortable: false,
|
|
1200
|
-
propertyName: 'displayTypeParameters',
|
|
1201
|
-
translationKey: 'displayTypeParameters',
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
viewType: 'string',
|
|
1205
|
-
sortable: false,
|
|
1206
|
-
propertyName: 'sortable',
|
|
1207
|
-
translationKey: 'sortable',
|
|
1208
|
-
},
|
|
1209
|
-
{
|
|
1210
|
-
viewType: 'string',
|
|
1211
|
-
sortable: false,
|
|
1212
|
-
propertyName: 'defaultSort',
|
|
1213
|
-
translationKey: 'defaultSort',
|
|
1214
|
-
},
|
|
1215
|
-
];
|
|
1216
|
-
this.loadingCaseListColumns = true;
|
|
1217
|
-
this.fields$ = this.translateService.stream('key').pipe(map(() => this.COLUMNS.map(column => (Object.assign(Object.assign({ key: column.propertyName, label: this.translateService.instant(`listColumn.${column.translationKey}`), sortable: column.sortable }, (column.viewType && { viewType: column.viewType })), (column.enum && { enum: column.enum }))))));
|
|
1218
|
-
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName));
|
|
1219
|
-
this.disableInput$ = new BehaviorSubject(false);
|
|
1220
|
-
this.hasEnvironmentConfig$ = this.documentDefinitionName$.pipe(map(documentDefinitionName => { var _a, _b; return !!((_b = (_a = this.configService) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.customDefinitionTables[documentDefinitionName]); }));
|
|
1221
|
-
this.cachedCaseListColumns = [];
|
|
1222
|
-
this.refreshCaseListcolumns$ = new BehaviorSubject(null);
|
|
1223
|
-
this.caseListColumns$ = combineLatest([
|
|
1224
|
-
this.documentDefinitionName$,
|
|
1225
|
-
this.refreshCaseListcolumns$,
|
|
1226
|
-
]).pipe(switchMap(([documentDefinitionName]) => this.documentService.getCaseList(documentDefinitionName)), tap$1(caseListColumns => {
|
|
1227
|
-
this.documentDefinitionName$.pipe(take(1)).subscribe(documentDefinitionName => {
|
|
1228
|
-
if (caseListColumns && Array.isArray(caseListColumns) && caseListColumns.length > 0) {
|
|
1229
|
-
this.setDownload(documentDefinitionName, caseListColumns);
|
|
1230
|
-
}
|
|
1231
|
-
});
|
|
1232
|
-
}), tap$1(caseListColumns => {
|
|
1233
|
-
this.cachedCaseListColumns = caseListColumns;
|
|
1234
|
-
this.loadingCaseListColumns = false;
|
|
1235
|
-
this.enableInput();
|
|
1236
|
-
}));
|
|
1237
|
-
this.translatedCaseListColumns$ = combineLatest([
|
|
1238
|
-
this.caseListColumns$,
|
|
1239
|
-
this.translateService.stream('key'),
|
|
1240
|
-
]).pipe(map(([columns]) => columns.map(column => {
|
|
1241
|
-
var _a;
|
|
1242
|
-
return (Object.assign(Object.assign({}, column), { title: column.title || '-', sortable: column.sortable
|
|
1243
|
-
? this.translateService.instant('listColumn.sortableYes')
|
|
1244
|
-
: this.translateService.instant('listColumn.sortableNo'), defaultSort: (column.defaultSort === 'ASC' &&
|
|
1245
|
-
this.translateService.instant('listColumn.sortableAsc')) ||
|
|
1246
|
-
(column.defaultSort === 'DESC' &&
|
|
1247
|
-
this.translateService.instant('listColumn.sortableDesc')) ||
|
|
1248
|
-
'-', displayType: this.translateService.instant(`listColumnDisplayType.${(_a = column === null || column === void 0 ? void 0 : column.displayType) === null || _a === void 0 ? void 0 : _a.type}`), displayTypeParameters: this.getDisplayTypeParametersView(column.displayType.displayTypeParameters) }));
|
|
1249
|
-
})));
|
|
1250
|
-
this.currentModalType$ = new BehaviorSubject('create');
|
|
1251
|
-
this.showModal$ = new BehaviorSubject(false);
|
|
1252
|
-
this.modalShowing$ = this.showModal$.pipe(delay(250));
|
|
1253
|
-
this.INVALID_KEY = 'invalid';
|
|
1254
|
-
this.formGroup = new FormGroup({
|
|
1255
|
-
title: new FormControl(''),
|
|
1256
|
-
key: new FormControl('', Validators.required),
|
|
1257
|
-
path: new FormControl('', Validators.required),
|
|
1258
|
-
dateFormat: new FormControl(''),
|
|
1259
|
-
displayType: new FormControl({
|
|
1260
|
-
key: this.INVALID_KEY,
|
|
1261
|
-
}),
|
|
1262
|
-
sortable: new FormControl(false),
|
|
1263
|
-
defaultSort: new FormControl({
|
|
1264
|
-
key: this.INVALID_KEY,
|
|
1265
|
-
}),
|
|
1266
|
-
enum: new FormControl([]),
|
|
1267
|
-
});
|
|
1268
|
-
this.disableDefaultSort$ = combineLatest([
|
|
1269
|
-
this.currentModalType$,
|
|
1270
|
-
this.formGroup.valueChanges,
|
|
1271
|
-
]).pipe(map(([currentModalType]) => currentModalType === 'create' &&
|
|
1272
|
-
this.cachedCaseListColumns.find(column => !!column.defaultSort)), startWith(false));
|
|
1273
|
-
this.DISPLAY_TYPES = [
|
|
1274
|
-
'string',
|
|
1275
|
-
'date',
|
|
1276
|
-
'boolean',
|
|
1277
|
-
'enum',
|
|
1278
|
-
'arrayCount',
|
|
1279
|
-
'underscoresToSpaces',
|
|
1280
|
-
];
|
|
1281
|
-
this.showDateFormat$ = this.formGroup.valueChanges.pipe(map(formValues => { var _a; return !!(((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) === this.DISPLAY_TYPES[1]); }), tap$1(showDateFormat => {
|
|
1282
|
-
if (showDateFormat === false && !!this.formGroup.value.dateFormat) {
|
|
1283
|
-
this.formGroup.patchValue({ dateFormat: '' });
|
|
1284
|
-
}
|
|
1285
|
-
}), startWith(false));
|
|
1286
|
-
this.showEnum$ = this.formGroup.valueChanges.pipe(map(formValues => {
|
|
1287
|
-
var _a, _b;
|
|
1288
|
-
return !!(((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) === this.DISPLAY_TYPES[3] ||
|
|
1289
|
-
((_b = formValues.displayType) === null || _b === void 0 ? void 0 : _b.key) === this.DISPLAY_TYPES[2]);
|
|
1290
|
-
}), tap$1(showEnum => {
|
|
1291
|
-
const enumValue = this.formGroup.value.enum;
|
|
1292
|
-
if (showEnum === false && Array.isArray(enumValue) && enumValue.length > 0) {
|
|
1293
|
-
this.formGroup.patchValue({ enum: [] });
|
|
1294
|
-
}
|
|
1295
|
-
}), startWith(false));
|
|
1296
|
-
this.isYesNo$ = this.formGroup.valueChanges.pipe(map(formValues => { var _a; return !!(((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) === this.DISPLAY_TYPES[2]); }));
|
|
1297
|
-
this.selectedViewTypeItemIndex$ = new BehaviorSubject(0);
|
|
1298
|
-
this.viewTypeItems$ = combineLatest([
|
|
1299
|
-
this.selectedViewTypeItemIndex$,
|
|
1300
|
-
this.translateService.stream('key'),
|
|
1301
|
-
]).pipe(map(([selectedViewTypeItemIndex]) => [
|
|
1302
|
-
{
|
|
1303
|
-
content: this.translateService.instant(`listColumnDisplayType.select`),
|
|
1304
|
-
key: this.INVALID_KEY,
|
|
1305
|
-
},
|
|
1306
|
-
...this.DISPLAY_TYPES.map(type => ({
|
|
1307
|
-
content: this.translateService.instant(`listColumnDisplayType.${type}`),
|
|
1308
|
-
key: type,
|
|
1309
|
-
})),
|
|
1310
|
-
].map((item, index) => (Object.assign(Object.assign({}, item), { selected: index === selectedViewTypeItemIndex })))));
|
|
1311
|
-
this.selectedSortItemIndex$ = new BehaviorSubject(0);
|
|
1312
|
-
this.sortItems$ = combineLatest([
|
|
1313
|
-
this.selectedSortItemIndex$,
|
|
1314
|
-
this.translateService.stream('key'),
|
|
1315
|
-
]).pipe(map(([selectedSortItemIndex]) => [
|
|
1316
|
-
{
|
|
1317
|
-
content: this.translateService.instant(`listColumn.selectDefaultSort`),
|
|
1318
|
-
key: this.INVALID_KEY,
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
content: this.translateService.instant(`listColumn.sortableAsc`),
|
|
1322
|
-
key: 'ASC',
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
content: this.translateService.instant(`listColumn.sortableDesc`),
|
|
1326
|
-
key: 'DESC',
|
|
1327
|
-
},
|
|
1328
|
-
].map((item, index) => (Object.assign(Object.assign({}, item), { selected: index === selectedSortItemIndex })))));
|
|
1329
|
-
this.validKey$ = combineLatest([this.formGroup.valueChanges, this.currentModalType$]).pipe(map(([formValues, currentModalType]) => {
|
|
1330
|
-
const existingKeys = this.cachedCaseListColumns.map(column => column.key);
|
|
1331
|
-
return currentModalType === 'create' ? !existingKeys.includes(formValues.key) : true;
|
|
1332
|
-
}), startWith(false));
|
|
1333
|
-
this.valid$ = combineLatest([this.formGroup.valueChanges, this.validKey$]).pipe(map(([formValues, validKey]) => {
|
|
1334
|
-
var _a, _b;
|
|
1335
|
-
return !!(((_a = formValues.displayType) === null || _a === void 0 ? void 0 : _a.key) !== this.INVALID_KEY &&
|
|
1336
|
-
formValues.path &&
|
|
1337
|
-
validKey &&
|
|
1338
|
-
(formValues.displayType.key === 'enum' ? ((_b = formValues.enum) === null || _b === void 0 ? void 0 : _b.length) > 0 : true));
|
|
1339
|
-
}), startWith(false));
|
|
1340
|
-
this.showDeleteModal$ = new Subject();
|
|
1341
|
-
this.deleteRowIndex$ = new BehaviorSubject(0);
|
|
1342
|
-
this.defaultEnumValues$ = new BehaviorSubject(undefined);
|
|
1343
|
-
}
|
|
1344
|
-
openModal(modalType) {
|
|
1345
|
-
this.showModal$.next(true);
|
|
1346
|
-
this.currentModalType$.next(modalType);
|
|
1347
|
-
if (modalType === 'create') {
|
|
1348
|
-
this.formGroup.controls['key'].enable();
|
|
1349
|
-
this.resetFormGroup();
|
|
1350
|
-
}
|
|
1351
|
-
else if (modalType === 'edit') {
|
|
1352
|
-
this.formGroup.controls['key'].disable();
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
closeModal() {
|
|
1356
|
-
this.showModal$.next(false);
|
|
1357
|
-
}
|
|
1358
|
-
deleteRow(caseListColumnRowIndex, clickEvent) {
|
|
1359
|
-
clickEvent.stopPropagation();
|
|
1360
|
-
this.showDeleteModal$.next(true);
|
|
1361
|
-
this.deleteRowIndex$.next(caseListColumnRowIndex);
|
|
1362
|
-
}
|
|
1363
|
-
deleteRowConfirmation(caseListColumnRowIndex) {
|
|
1364
|
-
var _a;
|
|
1365
|
-
const columnKey = (_a = this.cachedCaseListColumns[caseListColumnRowIndex]) === null || _a === void 0 ? void 0 : _a.key;
|
|
1366
|
-
if (columnKey) {
|
|
1367
|
-
this.disableInput();
|
|
1368
|
-
this.documentDefinitionName$.pipe(take(1)).subscribe(docDefName => {
|
|
1369
|
-
this.documentService.deleteCaseList(docDefName, columnKey).subscribe(() => {
|
|
1370
|
-
this.refreshCaseListColumns();
|
|
1371
|
-
}, () => {
|
|
1372
|
-
this.enableInput();
|
|
1373
|
-
});
|
|
1374
|
-
});
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
moveRow(caseListColumnRowIndex, moveUp, clickEvent, documentDefinitionName) {
|
|
1378
|
-
const caseListColumns = [...this.cachedCaseListColumns];
|
|
1379
|
-
const caseListColumnRow = caseListColumns[caseListColumnRowIndex];
|
|
1380
|
-
clickEvent.stopPropagation();
|
|
1381
|
-
const caseListColumnIndex = caseListColumns.findIndex(field => field.key === caseListColumnRow.key);
|
|
1382
|
-
const foundCaseListColumn = Object.assign({}, caseListColumns[caseListColumnIndex]);
|
|
1383
|
-
const filteredCaseListColumns = caseListColumns.filter(field => field.key !== caseListColumnRow.key);
|
|
1384
|
-
const multipleCaseListColumns = caseListColumns.length > 1;
|
|
1385
|
-
if (multipleCaseListColumns && moveUp && caseListColumnIndex > 0) {
|
|
1386
|
-
const caseListColumnBeforeKey = `${caseListColumns[caseListColumnIndex - 1].key}`;
|
|
1387
|
-
const caseListColumnBeforeIndex = filteredCaseListColumns.findIndex(field => field.key === caseListColumnBeforeKey);
|
|
1388
|
-
filteredCaseListColumns.splice(caseListColumnBeforeIndex, 0, foundCaseListColumn);
|
|
1389
|
-
this.updateCaseListColumns(documentDefinitionName, filteredCaseListColumns);
|
|
1390
|
-
}
|
|
1391
|
-
else if (multipleCaseListColumns && !moveUp && caseListColumnIndex < caseListColumns.length) {
|
|
1392
|
-
const caseListColumnAfterKey = `${caseListColumns[caseListColumnIndex + 1].key}`;
|
|
1393
|
-
const caseListColumnAfterIndex = filteredCaseListColumns.findIndex(field => field.key === caseListColumnAfterKey);
|
|
1394
|
-
filteredCaseListColumns.splice(caseListColumnAfterIndex + 1, 0, foundCaseListColumn);
|
|
1395
|
-
this.updateCaseListColumns(documentDefinitionName, filteredCaseListColumns);
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
saveCasListColumns() {
|
|
1399
|
-
this.disableInput();
|
|
1400
|
-
this.currentModalType$.pipe(take(1)).subscribe(currentModalType => {
|
|
1401
|
-
if (currentModalType === 'create') {
|
|
1402
|
-
this.addColumn();
|
|
1403
|
-
}
|
|
1404
|
-
else {
|
|
1405
|
-
this.updateColumn();
|
|
1406
|
-
}
|
|
1407
|
-
});
|
|
1408
|
-
}
|
|
1409
|
-
enumValueChange(value) {
|
|
1410
|
-
this.formGroup.patchValue({ enum: value });
|
|
1411
|
-
}
|
|
1412
|
-
columnRowClicked(row) {
|
|
1413
|
-
this.resetFormGroup();
|
|
1414
|
-
combineLatest([this.viewTypeItems$, this.sortItems$])
|
|
1415
|
-
.pipe(take(1))
|
|
1416
|
-
.subscribe(([viewTypeItems, sortItems]) => {
|
|
1417
|
-
var _a, _b, _c, _d;
|
|
1418
|
-
const column = this.cachedCaseListColumns.find(cachedColumn => cachedColumn.key === row.key);
|
|
1419
|
-
const viewTypeItem = viewTypeItems.find(item => item.key === column.displayType.type);
|
|
1420
|
-
const viewTypeItemIndex = viewTypeItems.findIndex(item => item.key === column.displayType.type);
|
|
1421
|
-
const sortItem = sortItems.find(item => item.key === column.defaultSort);
|
|
1422
|
-
const sortItemIndex = sortItems.findIndex(item => item.key === column.defaultSort);
|
|
1423
|
-
const enumValues = (_b = (_a = column === null || column === void 0 ? void 0 : column.displayType) === null || _a === void 0 ? void 0 : _a.displayTypeParameters) === null || _b === void 0 ? void 0 : _b.enum;
|
|
1424
|
-
const mappedEnumValues = [];
|
|
1425
|
-
const columnDateFormat = (_d = (_c = column === null || column === void 0 ? void 0 : column.displayType) === null || _c === void 0 ? void 0 : _c.displayTypeParameters) === null || _d === void 0 ? void 0 : _d.dateFormat;
|
|
1426
|
-
this.selectedViewTypeItemIndex$.next(viewTypeItemIndex);
|
|
1427
|
-
if (sortItem) {
|
|
1428
|
-
this.selectedSortItemIndex$.next(sortItemIndex);
|
|
1429
|
-
}
|
|
1430
|
-
if (enumValues) {
|
|
1431
|
-
Object.keys(enumValues).forEach(key => {
|
|
1432
|
-
mappedEnumValues.push({ key, value: enumValues[key] });
|
|
1433
|
-
});
|
|
1434
|
-
this.defaultEnumValues$.next(mappedEnumValues);
|
|
1435
|
-
}
|
|
1436
|
-
else {
|
|
1437
|
-
this.defaultEnumValues$.next([{ key: '', value: '' }]);
|
|
1438
|
-
}
|
|
1439
|
-
this.formGroup.patchValue(Object.assign({ key: column.key, title: column.title, path: column.path, sortable: column.sortable,
|
|
1440
|
-
// @ts-ignore
|
|
1441
|
-
displayType: Object.assign({}, viewTypeItem),
|
|
1442
|
-
// @ts-ignore
|
|
1443
|
-
defaultSort: sortItem ? Object.assign({}, sortItem) : Object.assign({}, sortItems[0]) }, (columnDateFormat && {
|
|
1444
|
-
dateFormat: columnDateFormat,
|
|
1445
|
-
})));
|
|
1446
|
-
this.openModal('edit');
|
|
1447
|
-
});
|
|
1448
|
-
}
|
|
1449
|
-
updateCaseListColumns(documentDefinitionName, newCaseListColumns) {
|
|
1450
|
-
this.disableInput();
|
|
1451
|
-
this.documentService.putCaseList(documentDefinitionName, newCaseListColumns).subscribe(() => {
|
|
1452
|
-
this.refreshCaseListColumns();
|
|
1453
|
-
localStorage.setItem(`list-search-${documentDefinitionName}`, null);
|
|
1454
|
-
}, () => {
|
|
1455
|
-
this.enableInput();
|
|
1456
|
-
});
|
|
1457
|
-
}
|
|
1458
|
-
addColumn() {
|
|
1459
|
-
const formValue = this.formGroup.value;
|
|
1460
|
-
this.documentDefinitionName$.pipe(take(1)).subscribe(docDefName => {
|
|
1461
|
-
this.documentService
|
|
1462
|
-
.postCaseList(docDefName, this.mapFormValuesToColumn(formValue))
|
|
1463
|
-
.subscribe(() => {
|
|
1464
|
-
this.closeModal();
|
|
1465
|
-
this.refreshCaseListColumns();
|
|
1466
|
-
}, () => {
|
|
1467
|
-
this.enableInput();
|
|
1468
|
-
});
|
|
1469
|
-
});
|
|
1470
|
-
}
|
|
1471
|
-
getDisplayTypeParametersView(displayTypeParameters) {
|
|
1472
|
-
if (displayTypeParameters === null || displayTypeParameters === void 0 ? void 0 : displayTypeParameters.dateFormat) {
|
|
1473
|
-
return displayTypeParameters.dateFormat;
|
|
1474
|
-
}
|
|
1475
|
-
else if (displayTypeParameters === null || displayTypeParameters === void 0 ? void 0 : displayTypeParameters.enum) {
|
|
1476
|
-
return Object.keys(displayTypeParameters.enum).reduce((acc, curr) => {
|
|
1477
|
-
const keyValuePairString = `${curr}: ${displayTypeParameters.enum[curr]}`;
|
|
1478
|
-
if (!acc) {
|
|
1479
|
-
return `${keyValuePairString}`;
|
|
1480
|
-
}
|
|
1481
|
-
return `${acc}, ${keyValuePairString}`;
|
|
1482
|
-
}, '');
|
|
1483
|
-
}
|
|
1484
|
-
return '-';
|
|
1485
|
-
}
|
|
1486
|
-
updateColumn() {
|
|
1487
|
-
const updatedColumnFormValue = this.formGroup.value;
|
|
1488
|
-
const mappedUpdatedColumn = this.mapFormValuesToColumn(updatedColumnFormValue);
|
|
1489
|
-
const currentColumns = this.cachedCaseListColumns;
|
|
1490
|
-
const mappedCurrentColumns = currentColumns.map(column => {
|
|
1491
|
-
const columnCopy = Object.assign({}, column);
|
|
1492
|
-
if (columnCopy.key === updatedColumnFormValue.key) {
|
|
1493
|
-
const changedColumn = Object.assign(Object.assign({}, columnCopy), mappedUpdatedColumn);
|
|
1494
|
-
if (!mappedUpdatedColumn.defaultSort) {
|
|
1495
|
-
delete changedColumn.defaultSort;
|
|
1496
|
-
}
|
|
1497
|
-
return changedColumn;
|
|
1498
|
-
}
|
|
1499
|
-
if (mappedUpdatedColumn.defaultSort) {
|
|
1500
|
-
delete columnCopy.defaultSort;
|
|
1501
|
-
}
|
|
1502
|
-
return columnCopy;
|
|
1503
|
-
});
|
|
1504
|
-
this.documentDefinitionName$.pipe(take(1)).subscribe(docDefName => {
|
|
1505
|
-
this.documentService.putCaseList(docDefName, mappedCurrentColumns).subscribe(() => {
|
|
1506
|
-
this.closeModal();
|
|
1507
|
-
this.refreshCaseListColumns();
|
|
1508
|
-
}, () => {
|
|
1509
|
-
this.enableInput();
|
|
1510
|
-
});
|
|
1511
|
-
});
|
|
1512
|
-
}
|
|
1513
|
-
setDownload(documentDefinitionName, caseListColumns) {
|
|
1514
|
-
this.downloadName$.next(`${documentDefinitionName}.json`);
|
|
1515
|
-
this.downloadUrl$.next(this.sanitizer.bypassSecurityTrustUrl('data:text/json;charset=UTF-8,' +
|
|
1516
|
-
encodeURIComponent(JSON.stringify(caseListColumns, null, 2))));
|
|
1517
|
-
}
|
|
1518
|
-
disableInput() {
|
|
1519
|
-
this.disableInput$.next(true);
|
|
1520
|
-
this.formGroup.disable();
|
|
1521
|
-
}
|
|
1522
|
-
enableInput() {
|
|
1523
|
-
this.disableInput$.next(false);
|
|
1524
|
-
this.formGroup.enable();
|
|
1525
|
-
}
|
|
1526
|
-
refreshCaseListColumns() {
|
|
1527
|
-
this.refreshCaseListcolumns$.next(null);
|
|
1528
|
-
}
|
|
1529
|
-
resetFormGroup() {
|
|
1530
|
-
this.formGroup.reset();
|
|
1531
|
-
combineLatest([this.sortItems$, this.viewTypeItems$])
|
|
1532
|
-
.pipe(take(1))
|
|
1533
|
-
.subscribe(([sortItems, viewTypeItems]) => {
|
|
1534
|
-
this.defaultEnumValues$.next([{ key: '', value: '' }]);
|
|
1535
|
-
this.selectedViewTypeItemIndex$.next(0);
|
|
1536
|
-
// @ts-ignore
|
|
1537
|
-
this.formGroup.patchValue({ displayType: viewTypeItems[0] });
|
|
1538
|
-
this.selectedSortItemIndex$.next(0);
|
|
1539
|
-
// @ts-ignore
|
|
1540
|
-
this.formGroup.patchValue({ defaultSort: sortItems[0] });
|
|
1541
|
-
});
|
|
1542
|
-
}
|
|
1543
|
-
mapFormValuesToColumn(formValue) {
|
|
1544
|
-
var _a, _b, _c;
|
|
1545
|
-
return Object.assign(Object.assign({ key: formValue.key, sortable: formValue.sortable }, (((_a = formValue.defaultSort) === null || _a === void 0 ? void 0 : _a.key) !== this.INVALID_KEY && {
|
|
1546
|
-
defaultSort: (_b = formValue.defaultSort) === null || _b === void 0 ? void 0 : _b.key,
|
|
1547
|
-
})), { title: formValue.title || '', path: formValue.path, displayType: {
|
|
1548
|
-
type: (_c = formValue.displayType) === null || _c === void 0 ? void 0 : _c.key,
|
|
1549
|
-
displayTypeParameters: Object.assign(Object.assign({}, (formValue.dateFormat && { dateFormat: formValue.dateFormat })), (Array.isArray(formValue.enum) &&
|
|
1550
|
-
formValue.enum.length > 0 && {
|
|
1551
|
-
enum: formValue.enum.reduce((acc, curr) => (Object.assign(Object.assign({}, acc), { [curr.key]: curr.value })), {}),
|
|
1552
|
-
})),
|
|
1553
|
-
} });
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
DossierManagementListColumnsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementListColumnsComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.ActivatedRoute }, { token: i4.TranslateService }, { token: i1$3.ConfigService }, { token: i4$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
1557
|
-
DossierManagementListColumnsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\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: 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: "component", type: i3$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3$1.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: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.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: i7$1.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }, { kind: "component", type: i3$1.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: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm"], outputs: ["confirmEvent"] }, { kind: "directive", type: i3$1.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
1558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementListColumnsComponent, decorators: [{
|
|
1559
|
-
type: Component,
|
|
1560
|
-
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]=\"{'disabled disabled-move-row-button': index === length - 1 || obs.disableInput}\"\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"] }]
|
|
1561
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.ActivatedRoute }, { type: i4.TranslateService }, { type: i1$3.ConfigService }, { type: i4$1.DomSanitizer }]; }, propDecorators: { moveRowButtonsTemplateRef: [{
|
|
1562
|
-
type: ViewChild,
|
|
1563
|
-
args: ['moveRowButtons']
|
|
1564
|
-
}] } });
|
|
1565
|
-
|
|
1566
|
-
/*
|
|
1567
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1568
|
-
*
|
|
1569
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1570
|
-
* you may not use this file except in compliance with the License.
|
|
1571
|
-
* You may obtain a copy of the License at
|
|
1572
|
-
*
|
|
1573
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1574
|
-
*
|
|
1575
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1576
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1577
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1578
|
-
* See the License for the specific language governing permissions and
|
|
1579
|
-
* limitations under the License.
|
|
1580
|
-
*/
|
|
1581
|
-
class DossierManagementDetailContainerComponent {
|
|
1582
|
-
constructor(documentService, route, configService, tabService, pageTitleService) {
|
|
1583
|
-
this.documentService = documentService;
|
|
1584
|
-
this.route = route;
|
|
1585
|
-
this.configService = configService;
|
|
1586
|
-
this.tabService = tabService;
|
|
1587
|
-
this.pageTitleService = pageTitleService;
|
|
1588
|
-
this.TabEnum = TabEnum;
|
|
1589
|
-
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter(docDefName => !!docDefName));
|
|
1590
|
-
this.documentDefinition$ = this.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getDocumentDefinition(documentDefinitionName)), tap(documentDefinition => {
|
|
1591
|
-
this.pageTitleService.setCustomPageTitle(documentDefinition.schema.title);
|
|
1592
|
-
}));
|
|
1593
|
-
this.caseListColumn = this.configService.config.featureToggles.caseListColumn;
|
|
1594
|
-
}
|
|
1595
|
-
ngOnInit() {
|
|
1596
|
-
this.openCurrentTabSubscription();
|
|
1597
|
-
}
|
|
1598
|
-
displayBodyComponent(tab) {
|
|
1599
|
-
this.tabService.currentTab = tab;
|
|
1600
|
-
}
|
|
1601
|
-
openCurrentTabSubscription() {
|
|
1602
|
-
this.tabSubscription = this.tabService.currentTab$.subscribe(value => (this.currentTab = value));
|
|
1603
|
-
}
|
|
1604
|
-
ngOnDestroy() {
|
|
1605
|
-
var _a;
|
|
1606
|
-
this.tabService.currentTab = TabEnum.CASE;
|
|
1607
|
-
(_a = this.tabSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
DossierManagementDetailContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementDetailContainerComponent, deps: [{ token: i1$1.DocumentService }, { token: i2.ActivatedRoute }, { token: i1$3.ConfigService }, { token: TabService }, { token: i3$1.PageTitleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1611
|
-
DossierManagementDetailContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 </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>\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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.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: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
1612
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementDetailContainerComponent, decorators: [{
|
|
1613
|
-
type: Component,
|
|
1614
|
-
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 </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>\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"] }]
|
|
1615
|
-
}], ctorParameters: function () { return [{ type: i1$1.DocumentService }, { type: i2.ActivatedRoute }, { type: i1$3.ConfigService }, { type: TabService }, { type: i3$1.PageTitleService }]; } });
|
|
1616
|
-
|
|
1617
|
-
/*
|
|
1618
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1619
|
-
*
|
|
1620
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1621
|
-
* you may not use this file except in compliance with the License.
|
|
1622
|
-
* You may obtain a copy of the License at
|
|
1623
|
-
*
|
|
1624
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1625
|
-
*
|
|
1626
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1627
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1628
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1629
|
-
* See the License for the specific language governing permissions and
|
|
1630
|
-
* limitations under the License.
|
|
1631
|
-
*/
|
|
1632
|
-
const routes = [
|
|
1633
|
-
{
|
|
1634
|
-
path: 'dossier-management',
|
|
1635
|
-
component: DossierManagementListComponent,
|
|
1636
|
-
canActivate: [AuthGuardService],
|
|
1637
|
-
data: { title: 'Dossiers', roles: [ROLE_ADMIN] },
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
path: 'dossier-management/dossier/:name',
|
|
1641
|
-
component: DossierManagementDetailContainerComponent,
|
|
1642
|
-
canActivate: [AuthGuardService],
|
|
1643
|
-
data: { title: 'Dossier details', roles: [ROLE_ADMIN], customPageTitle: true },
|
|
1644
|
-
},
|
|
1645
|
-
];
|
|
1646
|
-
class DossierManagementRoutingModule {
|
|
1647
|
-
}
|
|
1648
|
-
DossierManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1649
|
-
DossierManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRoutingModule, imports: [i2.RouterModule], exports: [RouterModule] });
|
|
1650
|
-
DossierManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRoutingModule, imports: [RouterModule.forRoot(routes), RouterModule] });
|
|
1651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementRoutingModule, decorators: [{
|
|
1652
|
-
type: NgModule,
|
|
1653
|
-
args: [{
|
|
1654
|
-
imports: [RouterModule.forRoot(routes)],
|
|
1655
|
-
exports: [RouterModule],
|
|
1656
|
-
declarations: [],
|
|
1657
|
-
}]
|
|
1658
|
-
}] });
|
|
1659
|
-
|
|
1660
|
-
/*
|
|
1661
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1662
|
-
*
|
|
1663
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1664
|
-
* you may not use this file except in compliance with the License.
|
|
1665
|
-
* You may obtain a copy of the License at
|
|
1666
|
-
*
|
|
1667
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1668
|
-
*
|
|
1669
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1670
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1671
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1672
|
-
* See the License for the specific language governing permissions and
|
|
1673
|
-
* limitations under the License.
|
|
1674
|
-
*/
|
|
1675
|
-
class DossierManagementModule {
|
|
1676
|
-
}
|
|
1677
|
-
DossierManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1678
|
-
DossierManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementModule, declarations: [DossierManagementListComponent,
|
|
1679
|
-
DossierManagementDetailComponent,
|
|
1680
|
-
DossierManagementConnectModalComponent,
|
|
1681
|
-
DossierManagementRemoveModalComponent,
|
|
1682
|
-
DossierManagementUploadComponent,
|
|
1683
|
-
DossierManagementRolesComponent,
|
|
1684
|
-
DossierManagementLinkProcessComponent,
|
|
1685
|
-
DossierManagementSearchFieldsComponent,
|
|
1686
|
-
DossierManagementDetailContainerComponent,
|
|
1687
|
-
DossierManagementAssigneeComponent,
|
|
1688
|
-
DossierManagementListColumnsComponent], imports: [CommonModule,
|
|
1689
|
-
WidgetModule,
|
|
1690
|
-
DropzoneModule,
|
|
1691
|
-
ListModule,
|
|
1692
|
-
DossierManagementRoutingModule,
|
|
1693
|
-
FormsModule,
|
|
1694
|
-
TranslateModule,
|
|
1695
|
-
ModalModule,
|
|
1696
|
-
ConfigModule,
|
|
1697
|
-
NgbTooltipModule,
|
|
1698
|
-
MultiselectDropdownModule,
|
|
1699
|
-
ParagraphModule,
|
|
1700
|
-
SelectModule,
|
|
1701
|
-
SpinnerModule,
|
|
1702
|
-
InputModule,
|
|
1703
|
-
SelectModule,
|
|
1704
|
-
FormModule,
|
|
1705
|
-
NotificationModule,
|
|
1706
|
-
ButtonModule,
|
|
1707
|
-
IconModule,
|
|
1708
|
-
ModalModule$1,
|
|
1709
|
-
InputModule$1,
|
|
1710
|
-
ReactiveFormsModule,
|
|
1711
|
-
DropdownModule,
|
|
1712
|
-
CheckboxModule,
|
|
1713
|
-
TooltipIconModule,
|
|
1714
|
-
CarbonMultiInputModule,
|
|
1715
|
-
LoadingModule,
|
|
1716
|
-
LinkModule,
|
|
1717
|
-
ConfirmationModalModule,
|
|
1718
|
-
MultiInputModule,
|
|
1719
|
-
TableModule,
|
|
1720
|
-
ValtimoCdsModalDirectiveModule] });
|
|
1721
|
-
DossierManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementModule, imports: [CommonModule,
|
|
1722
|
-
WidgetModule,
|
|
1723
|
-
DropzoneModule,
|
|
1724
|
-
ListModule,
|
|
1725
|
-
DossierManagementRoutingModule,
|
|
1726
|
-
FormsModule,
|
|
1727
|
-
TranslateModule,
|
|
1728
|
-
ModalModule,
|
|
1729
|
-
ConfigModule,
|
|
1730
|
-
NgbTooltipModule,
|
|
1731
|
-
MultiselectDropdownModule,
|
|
1732
|
-
ParagraphModule,
|
|
1733
|
-
SelectModule,
|
|
1734
|
-
SpinnerModule,
|
|
1735
|
-
InputModule,
|
|
1736
|
-
SelectModule,
|
|
1737
|
-
FormModule,
|
|
1738
|
-
NotificationModule,
|
|
1739
|
-
ButtonModule,
|
|
1740
|
-
IconModule,
|
|
1741
|
-
ModalModule$1,
|
|
1742
|
-
InputModule$1,
|
|
1743
|
-
ReactiveFormsModule,
|
|
1744
|
-
DropdownModule,
|
|
1745
|
-
CheckboxModule,
|
|
1746
|
-
TooltipIconModule,
|
|
1747
|
-
CarbonMultiInputModule,
|
|
1748
|
-
LoadingModule,
|
|
1749
|
-
LinkModule,
|
|
1750
|
-
ConfirmationModalModule,
|
|
1751
|
-
MultiInputModule,
|
|
1752
|
-
TableModule,
|
|
1753
|
-
ValtimoCdsModalDirectiveModule] });
|
|
1754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierManagementModule, decorators: [{
|
|
1755
|
-
type: NgModule,
|
|
1756
|
-
args: [{
|
|
1757
|
-
declarations: [
|
|
1758
|
-
DossierManagementListComponent,
|
|
1759
|
-
DossierManagementDetailComponent,
|
|
1760
|
-
DossierManagementConnectModalComponent,
|
|
1761
|
-
DossierManagementRemoveModalComponent,
|
|
1762
|
-
DossierManagementUploadComponent,
|
|
1763
|
-
DossierManagementRolesComponent,
|
|
1764
|
-
DossierManagementLinkProcessComponent,
|
|
1765
|
-
DossierManagementSearchFieldsComponent,
|
|
1766
|
-
DossierManagementDetailContainerComponent,
|
|
1767
|
-
DossierManagementAssigneeComponent,
|
|
1768
|
-
DossierManagementListColumnsComponent,
|
|
1769
|
-
],
|
|
1770
|
-
imports: [
|
|
1771
|
-
CommonModule,
|
|
1772
|
-
WidgetModule,
|
|
1773
|
-
DropzoneModule,
|
|
1774
|
-
ListModule,
|
|
1775
|
-
DossierManagementRoutingModule,
|
|
1776
|
-
FormsModule,
|
|
1777
|
-
TranslateModule,
|
|
1778
|
-
ModalModule,
|
|
1779
|
-
ConfigModule,
|
|
1780
|
-
NgbTooltipModule,
|
|
1781
|
-
MultiselectDropdownModule,
|
|
1782
|
-
ParagraphModule,
|
|
1783
|
-
SelectModule,
|
|
1784
|
-
SpinnerModule,
|
|
1785
|
-
InputModule,
|
|
1786
|
-
SelectModule,
|
|
1787
|
-
FormModule,
|
|
1788
|
-
NotificationModule,
|
|
1789
|
-
ButtonModule,
|
|
1790
|
-
IconModule,
|
|
1791
|
-
ModalModule$1,
|
|
1792
|
-
InputModule$1,
|
|
1793
|
-
ReactiveFormsModule,
|
|
1794
|
-
DropdownModule,
|
|
1795
|
-
CheckboxModule,
|
|
1796
|
-
TooltipIconModule,
|
|
1797
|
-
CarbonMultiInputModule,
|
|
1798
|
-
LoadingModule,
|
|
1799
|
-
LinkModule,
|
|
1800
|
-
ConfirmationModalModule,
|
|
1801
|
-
MultiInputModule,
|
|
1802
|
-
TableModule,
|
|
1803
|
-
ValtimoCdsModalDirectiveModule,
|
|
1804
|
-
],
|
|
1805
|
-
exports: [],
|
|
1806
|
-
}]
|
|
1807
|
-
}] });
|
|
1808
|
-
|
|
1809
|
-
/*
|
|
1810
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1811
|
-
*
|
|
1812
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1813
|
-
* you may not use this file except in compliance with the License.
|
|
1814
|
-
* You may obtain a copy of the License at
|
|
1815
|
-
*
|
|
1816
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1817
|
-
*
|
|
1818
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1819
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1820
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1821
|
-
* See the License for the specific language governing permissions and
|
|
1822
|
-
* limitations under the License.
|
|
1823
|
-
*/
|
|
1824
|
-
|
|
1825
|
-
/*
|
|
1826
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1827
|
-
*
|
|
1828
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1829
|
-
* you may not use this file except in compliance with the License.
|
|
1830
|
-
* You may obtain a copy of the License at
|
|
1831
|
-
*
|
|
1832
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1833
|
-
*
|
|
1834
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1835
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1836
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1837
|
-
* See the License for the specific language governing permissions and
|
|
1838
|
-
* limitations under the License.
|
|
1839
|
-
*/
|
|
1840
|
-
|
|
1841
|
-
/**
|
|
1842
|
-
* Generated bundle index. Do not edit.
|
|
1843
|
-
*/
|
|
1844
|
-
|
|
1845
|
-
export { DossierManagementListComponent, DossierManagementModule };
|
|
1846
|
-
//# sourceMappingURL=valtimo-dossier-management.mjs.map
|