@valtimo/dossier-management 4.17.0 → 4.18.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/bundles/valtimo-dossier-management.umd.js +115 -11
- package/bundles/valtimo-dossier-management.umd.js.map +1 -1
- package/bundles/valtimo-dossier-management.umd.min.js +1 -1
- package/bundles/valtimo-dossier-management.umd.min.js.map +1 -1
- package/esm2015/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.js +2 -2
- package/esm2015/lib/dossier-management-detail/dossier-management-detail.component.js +5 -3
- package/esm2015/lib/dossier-management-list/dossier-management-list.component.js +3 -3
- package/esm2015/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.js +1 -1
- package/esm2015/lib/dossier-management-roles/dossier-management-roles.component.js +103 -0
- package/esm2015/lib/dossier-management-routing.module.js +1 -1
- package/esm2015/lib/dossier-management-upload/dossier-management-upload.component.js +2 -2
- package/esm2015/lib/dossier-management.module.js +5 -2
- package/esm2015/public-api.js +1 -1
- package/esm2015/valtimo-dossier-management.js +3 -2
- package/fesm2015/valtimo-dossier-management.js +111 -10
- package/fesm2015/valtimo-dossier-management.js.map +1 -1
- package/lib/dossier-management-detail/dossier-management-detail.component.d.ts +4 -2
- package/lib/dossier-management-roles/dossier-management-roles.component.d.ts +29 -0
- package/package.json +1 -1
- package/valtimo-dossier-management.d.ts +2 -1
- package/valtimo-dossier-management.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('@valtimo/components'), require('@valtimo/config'), require('@valtimo/document'), require('@valtimo/process'), require('ngx-toastr'), require('@angular/router'), require('moment'), require('rxjs'), require('@valtimo/security'), require('rxjs/operators'), require('@ng-bootstrap/ng-bootstrap')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@valtimo/dossier-management', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', '@valtimo/components', '@valtimo/config', '@valtimo/document', '@valtimo/process', 'ngx-toastr', '@angular/router', 'moment', 'rxjs', '@valtimo/security', 'rxjs/operators', '@ng-bootstrap/ng-bootstrap'], factory) :
|
|
4
|
-
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo['dossier-management'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.core$1, global.components, global.config, global.document, global.process, global.ngxToastr, global.ng.router, global.moment, global.rxjs, global.security, global.rxjs.operators, global.ngBootstrap));
|
|
5
|
-
}(this, (function (exports, common, core, forms, core$1, components, config, document$1, process, ngxToastr, router, moment_, rxjs, security, operators, ngBootstrap) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('@valtimo/components'), require('@valtimo/config'), require('@valtimo/document'), require('@valtimo/process'), require('ngx-toastr'), require('@angular/router'), require('moment'), require('rxjs'), require('@valtimo/security'), require('rxjs/operators'), require('@ng-bootstrap/ng-bootstrap'), require('@valtimo/authority'), require('lodash')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@valtimo/dossier-management', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', '@valtimo/components', '@valtimo/config', '@valtimo/document', '@valtimo/process', 'ngx-toastr', '@angular/router', 'moment', 'rxjs', '@valtimo/security', 'rxjs/operators', '@ng-bootstrap/ng-bootstrap', '@valtimo/authority', 'lodash'], factory) :
|
|
4
|
+
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo['dossier-management'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.core$1, global.components, global.config, global.document, global.process, global.ngxToastr, global.ng.router, global.moment, global.rxjs, global.security, global.rxjs.operators, global.ngBootstrap, global.authority, global.lodash));
|
|
5
|
+
}(this, (function (exports, common, core, forms, core$1, components, config, document$1, process, ngxToastr, router, moment_, rxjs, security, operators, ngBootstrap, authority, lodash) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
DossierManagementConnectModalComponent.decorators = [
|
|
82
82
|
{ type: core.Component, args: [{
|
|
83
83
|
selector: 'valtimo-dossier-management-connect-modal',
|
|
84
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">
|
|
84
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">{{ 'dossierManagement.selectProcessDef' | translate }}</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\n",
|
|
85
85
|
styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
|
|
86
86
|
},] }
|
|
87
87
|
];
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
DossierManagementDetailComponent.decorators = [
|
|
177
177
|
{ type: core.Component, args: [{
|
|
178
178
|
selector: 'valtimo-dossier-management-detail',
|
|
179
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadDefinition()\">\n <i class=\"icon mdi mdi-download\"></i
|
|
179
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadDefinition()\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'Download document definition' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n <button\n *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n (click)=\"openDossierRemoveModal()\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ documentDefinition.schema.title }}\n <div *ngIf=\"documentDefinition.readOnly\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'dossierManagement.readonly' | translate\n }}</span>\n </div>\n </h3>\n </div>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5\">\n <h2>{{ 'document definition' | translate }}</h2>\n </div>\n <div class=\"col-5 offset-2\">\n <h2>{{ 'dossierManagement.connectedProcesses' | translate }}</h2>\n </div>\n </div>\n <div class=\"row bg-white mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 dossier-schema\" rows=\"25\" disabled\n >{{ documentDefinition | json }}\n </textarea>\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n class=\"input-group mb-5\"\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n class=\"btn btn-danger\"\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n data-toggle=\"tooltip\"\n data-placement=\"left\"\n title=\"Delete this connected process\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n </button>\n <input\n class=\"form-control\"\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n type=\"text\"\n disabled\n />\n </div>\n <div class=\"row mb-2 mt-2\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n disabled\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.startableByUser\"\n disabled\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div class=\"text-right mt-5 mb-5\">\n <button class=\"btn btn-primary\" (click)=\"openDossierConnectModal()\">\n <i class=\"icon mdi mdi-plus mr-1\"></i\n >{{ 'dossierManagement.connectProcess' | translate }}\n </button>\n </div>\n <valtimo-dossier-management-roles [documentDefinitionName]=\"documentDefinitionName\">\n </valtimo-dossier-management-roles>\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n </div>\n </div>\n </valtimo-widget>\n\n <valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n ></valtimo-dossier-management-connect-modal>\n <valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n ></valtimo-dossier-management-remove-modal>\n </div>\n</div>\n",
|
|
180
180
|
styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dossier-header{border-bottom:1px solid #dee2e6;height:80px;padding-left:18px;padding-right:18px;padding-top:21px}.dossier-title{margin-bottom:7px;margin-top:0}.row{margin:0}.dossier-schema{resize:none}"]
|
|
181
181
|
},] }
|
|
182
182
|
];
|
|
@@ -187,7 +187,8 @@
|
|
|
187
187
|
]; };
|
|
188
188
|
DossierManagementDetailComponent.propDecorators = {
|
|
189
189
|
dossierConnectModal: [{ type: core.ViewChild, args: ['dossierConnectModal',] }],
|
|
190
|
-
dossierRemoveModal: [{ type: core.ViewChild, args: ['dossierRemoveModal',] }]
|
|
190
|
+
dossierRemoveModal: [{ type: core.ViewChild, args: ['dossierRemoveModal',] }],
|
|
191
|
+
documentRoles: [{ type: core.ViewChild, args: ['documentRoles',] }]
|
|
191
192
|
};
|
|
192
193
|
|
|
193
194
|
/*
|
|
@@ -239,7 +240,7 @@
|
|
|
239
240
|
DossierManagementListComponent.prototype.getDocumentDefinitions = function () {
|
|
240
241
|
var _this = this;
|
|
241
242
|
this.documentService
|
|
242
|
-
.queryDefinitions({ page: this.pageParam, size: this.pagination.size })
|
|
243
|
+
.queryDefinitions({ filteredOnRole: false, page: this.pageParam, size: this.pagination.size })
|
|
243
244
|
.subscribe(function (documentDefinitionPage) {
|
|
244
245
|
_this.pagination.collectionSize = documentDefinitionPage.totalElements;
|
|
245
246
|
_this.dossiers = documentDefinitionPage.content;
|
|
@@ -256,7 +257,7 @@
|
|
|
256
257
|
DossierManagementListComponent.decorators = [
|
|
257
258
|
{ type: core.Component, args: [{
|
|
258
259
|
selector: 'valtimo-dossier-management-list',
|
|
259
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-secondary btn-space mr-0\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-upload\"></i
|
|
260
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-secondary btn-space mr-0\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Dossiers' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Dossiers' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"paginationSet()\"\n></valtimo-dossier-management-upload>\n",
|
|
260
261
|
styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
|
|
261
262
|
},] }
|
|
262
263
|
];
|
|
@@ -450,7 +451,7 @@
|
|
|
450
451
|
DossierManagementUploadComponent.decorators = [
|
|
451
452
|
{ type: core.Component, args: [{
|
|
452
453
|
selector: 'valtimo-dossier-management-upload',
|
|
453
|
-
template: "<valtimo-modal\n #uploadDefinitionModal\n [title]=\"'Upload document definition' | translate\"\n showFooter=\"true\"\n>\n <div class=\"mt-2\" body>\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.jsonDocDef' | translate\"\n [externalError$]=\"error$\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && !(error$ | async); else pleaseSelect\">\n <button [disabled]=\"disabled$ | async\" class=\"btn btn-primary\" (click)=\"uploadDefinition()\">\n {{ 'Upload' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class=\"btn btn-primary\" [disabled]=\"true\">\n {{ 'Select a document definition' | translate }}\n </button>\n</ng-template>\n",
|
|
454
|
+
template: "<valtimo-modal\n #uploadDefinitionModal\n [title]=\"'Upload document definition' | translate\"\n showFooter=\"true\"\n>\n <div class=\"mt-2\" body>\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.jsonDocDef' | translate\"\n [externalError$]=\"error$\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && !(error$ | async); else pleaseSelect\">\n <button [disabled]=\"disabled$ | async\" class=\"btn btn-primary\" (click)=\"uploadDefinition()\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class=\"btn btn-primary\" [disabled]=\"true\">\n {{ 'Select a document definition' | translate }}\n </button>\n</ng-template>\n",
|
|
454
455
|
styles: [""]
|
|
455
456
|
},] }
|
|
456
457
|
];
|
|
@@ -524,6 +525,106 @@
|
|
|
524
525
|
modal: [{ type: core.ViewChild, args: ['documentDefinitionRemoveModal',] }]
|
|
525
526
|
};
|
|
526
527
|
|
|
528
|
+
/*
|
|
529
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
530
|
+
*
|
|
531
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
532
|
+
* you may not use this file except in compliance with the License.
|
|
533
|
+
* You may obtain a copy of the License at
|
|
534
|
+
*
|
|
535
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
536
|
+
*
|
|
537
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
538
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
539
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
540
|
+
* See the License for the specific language governing permissions and
|
|
541
|
+
* limitations under the License.
|
|
542
|
+
*/
|
|
543
|
+
var DossierManagementRolesComponent = /** @class */ (function () {
|
|
544
|
+
function DossierManagementRolesComponent(authorityService, documentService, alertService, translateService) {
|
|
545
|
+
this.authorityService = authorityService;
|
|
546
|
+
this.documentService = documentService;
|
|
547
|
+
this.alertService = alertService;
|
|
548
|
+
this.translateService = translateService;
|
|
549
|
+
this.dropdownSettings = {
|
|
550
|
+
singleSelection: false,
|
|
551
|
+
idField: 'name',
|
|
552
|
+
textField: 'name',
|
|
553
|
+
selectAllText: 'Select All',
|
|
554
|
+
unSelectAllText: 'UnSelect All',
|
|
555
|
+
itemsShowLimit: 3,
|
|
556
|
+
enableCheckAll: true,
|
|
557
|
+
allowSearchFilter: true,
|
|
558
|
+
};
|
|
559
|
+
this.roles = new rxjs.BehaviorSubject(undefined);
|
|
560
|
+
this.preSelectedItems = new rxjs.BehaviorSubject(undefined);
|
|
561
|
+
}
|
|
562
|
+
DossierManagementRolesComponent.prototype.ngOnInit = function () {
|
|
563
|
+
this.loadAllRoles();
|
|
564
|
+
};
|
|
565
|
+
DossierManagementRolesComponent.prototype.loadAllRoles = function () {
|
|
566
|
+
var _this = this;
|
|
567
|
+
this.authorityService.query().subscribe(function (result) {
|
|
568
|
+
_this.roles.next(result.body);
|
|
569
|
+
_this.loadDocumentRoles();
|
|
570
|
+
});
|
|
571
|
+
};
|
|
572
|
+
DossierManagementRolesComponent.prototype.loadDocumentRoles = function () {
|
|
573
|
+
var _this = this;
|
|
574
|
+
if (this.documentDefinitionName) {
|
|
575
|
+
this.documentService.getDocumentRoles(this.documentDefinitionName).subscribe(function (result) {
|
|
576
|
+
_this.preSelectedItems.next(result);
|
|
577
|
+
}, function (err) {
|
|
578
|
+
_this.alertService.warning(_this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyRetrievedRoles'));
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
DossierManagementRolesComponent.prototype.onSelectedItems = function (data) {
|
|
583
|
+
var _this = this;
|
|
584
|
+
var roles = this.returnArrayOfString(data);
|
|
585
|
+
if (lodash.isEqual(roles, this.preSelectedItems.value)) {
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
this.documentService.modifyDocumentRoles(this.documentDefinitionName, roles).subscribe(function () {
|
|
589
|
+
_this.alertService.success(_this.translateService.instant('dossierManagement.roles.messages.successfullyStored'));
|
|
590
|
+
_this.preSelectedItems.next(roles);
|
|
591
|
+
}, function (err) {
|
|
592
|
+
_this.alertService.error(_this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyStored'));
|
|
593
|
+
});
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* The data could be either an array of string (i.e. ["ROLE_ADMIN", "ROLE_DEVELOPER"]
|
|
597
|
+
* or an array of object with name parameters (i.e. [{"name": "ROLE_ADMIN"},{"name":"ROLE_DEVELOPER}]
|
|
598
|
+
*
|
|
599
|
+
* This method will always make sure an array of strings is returned
|
|
600
|
+
*/
|
|
601
|
+
DossierManagementRolesComponent.prototype.returnArrayOfString = function (data) {
|
|
602
|
+
return data.map(function (el) {
|
|
603
|
+
if (typeof el === 'string') {
|
|
604
|
+
return el;
|
|
605
|
+
}
|
|
606
|
+
return el.name;
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
return DossierManagementRolesComponent;
|
|
610
|
+
}());
|
|
611
|
+
DossierManagementRolesComponent.decorators = [
|
|
612
|
+
{ type: core.Component, args: [{
|
|
613
|
+
selector: 'valtimo-dossier-management-roles',
|
|
614
|
+
template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<!--<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>-->\n<h2 class=\"mb-4 mt-6\">{{'dossierManagement.roles.rolesTitle' | translate}}</h2>\n<p class=\"card-text\">{{'dossierManagement.roles.rolesDescription' | translate}}</p>\n\n<valtimo-multiselect-dropdown\n [items]=\"roles | async\"\n [selectedItems]=\"preSelectedItems | async\"\n [dropdownSettings]=\"dropdownSettings\"\n [placeHolder]=\"'dossierManagement.roles.rolesPlaceHolder'|translate\"\n (itemsSelected)=\"onSelectedItems($event)\"\n></valtimo-multiselect-dropdown>\n",
|
|
615
|
+
styles: [""]
|
|
616
|
+
},] }
|
|
617
|
+
];
|
|
618
|
+
DossierManagementRolesComponent.ctorParameters = function () { return [
|
|
619
|
+
{ type: authority.AuthorityService },
|
|
620
|
+
{ type: document$1.DocumentService },
|
|
621
|
+
{ type: components.AlertService },
|
|
622
|
+
{ type: core$1.TranslateService }
|
|
623
|
+
]; };
|
|
624
|
+
DossierManagementRolesComponent.propDecorators = {
|
|
625
|
+
documentDefinitionName: [{ type: core.Input }]
|
|
626
|
+
};
|
|
627
|
+
|
|
527
628
|
/*
|
|
528
629
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
529
630
|
*
|
|
@@ -552,6 +653,7 @@
|
|
|
552
653
|
DossierManagementConnectModalComponent,
|
|
553
654
|
DossierManagementRemoveModalComponent,
|
|
554
655
|
DossierManagementUploadComponent,
|
|
656
|
+
DossierManagementRolesComponent,
|
|
555
657
|
],
|
|
556
658
|
imports: [
|
|
557
659
|
common.CommonModule,
|
|
@@ -564,6 +666,7 @@
|
|
|
564
666
|
components.ModalModule,
|
|
565
667
|
config.ConfigModule,
|
|
566
668
|
ngBootstrap.NgbTooltipModule,
|
|
669
|
+
components.MultiselectDropdownModule,
|
|
567
670
|
],
|
|
568
671
|
exports: [],
|
|
569
672
|
entryComponents: [config.ExtensionComponent],
|
|
@@ -596,7 +699,8 @@
|
|
|
596
699
|
exports.ɵb = DossierManagementConnectModalComponent;
|
|
597
700
|
exports.ɵc = DossierManagementRemoveModalComponent;
|
|
598
701
|
exports.ɵd = DossierManagementUploadComponent;
|
|
599
|
-
exports.ɵe =
|
|
702
|
+
exports.ɵe = DossierManagementRolesComponent;
|
|
703
|
+
exports.ɵf = DossierManagementRoutingModule;
|
|
600
704
|
|
|
601
705
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
602
706
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-dossier-management.umd.js","sources":["../../../../projects/valtimo/dossier-management/src/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-detail/dossier-management-detail.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-list/dossier-management-list.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-routing.module.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-upload/dossier-management-upload.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management.module.ts","../../../../projects/valtimo/dossier-management/src/public-api.ts","../../../../projects/valtimo/dossier-management/src/valtimo-dossier-management.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, EventEmitter, OnInit, Output, ViewChild} from '@angular/core';\nimport {\n DocumentService,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentDefinition,\n DocumentDefinition,\n} from '@valtimo/document';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\nimport {ToastrService} from 'ngx-toastr';\nimport {ModalComponent} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-dossier-management-connect-modal',\n templateUrl: './dossier-management-connect-modal.component.html',\n styleUrls: ['./dossier-management-connect-modal.component.scss'],\n})\nexport class DossierManagementConnectModalComponent implements OnInit {\n public documentDefinition: DocumentDefinition | null = null;\n public processDefinitions: ProcessDefinition[];\n public newDocumentProcessDefinition: ProcessDefinition | null = null;\n public newDocumentProcessDefinitionInit = true;\n public newDocumentProcessDefinitionStartableByUser = false;\n public processDocumentDefinitionExists: any = {};\n @Output() public reloadProcessDocumentDefinitions = new EventEmitter<any>();\n @ViewChild('dossierConnectModal') modal: ModalComponent;\n\n constructor(\n private processService: ProcessService,\n private documentService: DocumentService,\n private toasterService: ToastrService\n ) {}\n\n loadProcessDocumentDefinitions() {\n this.processDocumentDefinitionExists = {};\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinition.id.name)\n .subscribe((processDocumentDefinitions: ProcessDocumentDefinition[]) => {\n processDocumentDefinitions.forEach(\n (processDocumentDefinition: ProcessDocumentDefinition) => {\n this.processDocumentDefinitionExists[\n processDocumentDefinition.id.processDefinitionKey\n ] = true;\n }\n );\n });\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n openModal(dossier: DocumentDefinition) {\n this.documentDefinition = dossier;\n this.newDocumentProcessDefinition = null;\n this.newDocumentProcessDefinitionInit = true;\n this.newDocumentProcessDefinitionStartableByUser = false;\n this.loadProcessDocumentDefinitions();\n this.modal.show();\n }\n\n submit() {\n const request: ProcessDocumentDefinitionRequest = {\n canInitializeDocument: this.newDocumentProcessDefinitionInit,\n startableByUser: this.newDocumentProcessDefinitionStartableByUser,\n documentDefinitionName: this.documentDefinition.id.name,\n processDefinitionKey: this.newDocumentProcessDefinition.key,\n };\n this.documentService.createProcessDocumentDefinition(request).subscribe(\n () => {\n this.toasterService.success('Successfully added new process document definition');\n this.reloadProcessDocumentDefinitions.emit();\n },\n err => {\n this.toasterService.error('Failed to add new process document definition');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit, ViewChild} from '@angular/core';\nimport {DocumentService, DocumentDefinition, ProcessDocumentDefinition} from '@valtimo/document';\nimport {ActivatedRoute} from '@angular/router';\nimport {DossierManagementConnectModalComponent} from '../dossier-management-connect-modal/dossier-management-connect-modal.component';\nimport {AlertService} from '@valtimo/components';\nimport {DossierManagementRemoveModalComponent} from '../dossier-management-remove-modal/dossier-management-remove-modal.component';\n\n@Component({\n selector: 'valtimo-dossier-management-detail',\n templateUrl: './dossier-management-detail.component.html',\n styleUrls: ['./dossier-management-detail.component.scss'],\n})\nexport class DossierManagementDetailComponent implements OnInit {\n private documentDefinitionName: string | null = null;\n public documentDefinition: DocumentDefinition | null = null;\n public processDocumentDefinitions: ProcessDocumentDefinition[] = [];\n\n @ViewChild('dossierConnectModal') dossierConnectModal: DossierManagementConnectModalComponent;\n @ViewChild('dossierRemoveModal') dossierRemoveModal: DossierManagementRemoveModalComponent;\n\n constructor(\n private documentService: DocumentService,\n private route: ActivatedRoute,\n private alertService: AlertService\n ) {\n this.documentDefinitionName = this.route.snapshot.paramMap.get('name');\n }\n\n ngOnInit() {\n this.loadDocumentDefinition();\n this.loadProcessDocumentDefinitions();\n }\n\n loadProcessDocumentDefinitions() {\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinitionName)\n .subscribe((processDocumentDefinitions: ProcessDocumentDefinition[]) => {\n this.processDocumentDefinitions = processDocumentDefinitions;\n });\n }\n\n loadDocumentDefinition() {\n this.documentService\n .getDocumentDefinition(this.documentDefinitionName)\n .subscribe((documentDefinition: DocumentDefinition) => {\n this.documentDefinition = documentDefinition;\n });\n }\n\n openDossierConnectModal() {\n this.dossierConnectModal.openModal(this.documentDefinition);\n }\n\n openDossierRemoveModal() {\n this.dossierRemoveModal.openModal(this.documentDefinition);\n }\n\n deleteProcessDocumentDefinition(processDocumentDefinition: ProcessDocumentDefinition) {\n this.documentService\n .deleteProcessDocumentDefinition({\n documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,\n processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,\n canInitializeDocument: processDocumentDefinition.canInitializeDocument,\n startableByUser: processDocumentDefinition.startableByUser,\n })\n .subscribe(\n () => {\n this.alertService.success('Successfully deleted process document definition');\n this.loadProcessDocumentDefinitions();\n },\n () => {\n this.alertService.error('Failed to delete process document definition');\n }\n );\n }\n\n downloadDefinition(): void {\n const definition = this.documentDefinition;\n const dataString =\n 'data:text/json;charset=utf-8,' +\n encodeURIComponent(JSON.stringify(definition.schema, null, 2));\n const downloadAnchorElement = document.getElementById('downloadAnchorElement');\n downloadAnchorElement.setAttribute('href', dataString);\n downloadAnchorElement.setAttribute(\n 'download',\n `${definition.id.name}-v${definition.id.version}.json`\n );\n downloadAnchorElement.click();\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component} from '@angular/core';\nimport {DocumentService, DocumentDefinition, Page} from '@valtimo/document';\nimport {Router} from '@angular/router';\nimport * as moment_ from 'moment';\nimport {BehaviorSubject} from 'rxjs';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-management-list',\n templateUrl: './dossier-management-list.component.html',\n styleUrls: ['./dossier-management-list.component.scss'],\n})\nexport class DossierManagementListComponent {\n public dossiers: DocumentDefinition[] = [];\n public pagination = {\n collectionSize: 0,\n page: 1,\n size: 10,\n maxPaginationItemSize: 5,\n };\n public pageParam = 0;\n public dossierFields = [\n {key: 'schema.title', label: 'Title'},\n {key: 'createdOn', label: 'Created On'},\n {key: 'readOnly', label: 'Read-only'},\n ];\n\n readonly showModal$ = new BehaviorSubject<boolean>(false);\n\n constructor(private documentService: DocumentService, private router: Router) {}\n\n public paginationClicked(page) {\n this.pageParam = page - 1;\n this.getDocumentDefinitions();\n }\n\n paginationSet() {\n this.getDocumentDefinitions();\n }\n\n redirectToDetails(documentDefinition: DocumentDefinition) {\n this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);\n }\n\n private getDocumentDefinitions() {\n this.documentService\n .queryDefinitions({page: this.pageParam, size: this.pagination.size})\n .subscribe((documentDefinitionPage: Page<DocumentDefinition>) => {\n this.pagination.collectionSize = documentDefinitionPage.totalElements;\n this.dossiers = documentDefinitionPage.content;\n this.dossiers.map((dossier: DocumentDefinition) => {\n dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');\n });\n });\n }\n\n showModal() {\n this.showModal$.next(true);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {AuthGuardService} from '@valtimo/security';\nimport {DossierManagementDetailComponent} from './dossier-management-detail/dossier-management-detail.component';\nimport {DossierManagementListComponent} from './dossier-management-list/dossier-management-list.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'dossier-management',\n component: DossierManagementListComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossiers', roles: [ROLE_ADMIN]},\n },\n {\n path: 'dossier-management/dossier/:name',\n component: DossierManagementDetailComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossier details', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes)],\n exports: [RouterModule],\n declarations: [],\n})\nexport class DossierManagementRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {MenuService, ModalComponent} from '@valtimo/components';\nimport {DocumentService, DocumentDefinitionCreateRequest} from '@valtimo/document';\nimport {BehaviorSubject, Observable, Subject, Subscription} from 'rxjs';\nimport {switchMap, take, tap} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-dossier-management-upload',\n templateUrl: './dossier-management-upload.component.html',\n styleUrls: ['./dossier-management-upload.component.scss'],\n})\nexport class DossierManagementUploadComponent implements AfterViewInit, OnDestroy {\n @Input() show$: Observable<boolean>;\n @Output() definitionUploaded: EventEmitter<any> = new EventEmitter();\n\n @ViewChild('uploadDefinitionModal') modal: ModalComponent;\n\n readonly clear$ = new Subject();\n\n readonly jsonString$ = new BehaviorSubject<string>('');\n\n readonly error$ = new BehaviorSubject<string>('');\n\n readonly disabled$ = new BehaviorSubject<boolean>(false);\n\n private showSubscription: Subscription;\n\n private fileSubscription: Subscription;\n\n private errorSubscription: Subscription;\n\n private readonly file$ = new BehaviorSubject<File>(undefined);\n\n constructor(\n private readonly documentService: DocumentService,\n private readonly translateService: TranslateService,\n private readonly menuService: MenuService\n ) {}\n\n ngAfterViewInit(): void {\n this.openShowSubscription();\n this.openFileSubscription();\n }\n\n ngOnDestroy(): void {\n this.showSubscription.unsubscribe();\n this.fileSubscription.unsubscribe();\n this.closeErrorSubscription();\n }\n\n setFile(file: File): void {\n this.clearError();\n this.file$.next(file);\n }\n\n uploadDefinition(): void {\n this.disable();\n\n this.jsonString$\n .pipe(\n switchMap(jsonString =>\n this.documentService\n .createDocumentDefinition(new DocumentDefinitionCreateRequest(jsonString))\n .pipe(\n tap(\n // success\n () => {\n this.closeErrorSubscription();\n this.clearError();\n this.enable();\n this.hideModal();\n this.menuService.reload();\n this.definitionUploaded.emit();\n },\n // error\n () => {\n this.openErrorSubscription('dropzone.error.invalidDocDef');\n this.enable();\n }\n )\n )\n ),\n take(1)\n )\n .subscribe();\n }\n\n private openErrorSubscription(errorCode: string): void {\n this.closeErrorSubscription();\n this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {\n this.error$.next(error);\n });\n }\n\n private closeErrorSubscription(): void {\n if (this.errorSubscription) {\n this.errorSubscription.unsubscribe();\n }\n }\n\n private clearError(): void {\n this.error$.next('');\n }\n\n private openFileSubscription(): void {\n this.fileSubscription = this.file$.subscribe(file => {\n if (file) {\n const reader = new FileReader();\n\n reader.onloadend = () => {\n const result = reader.result.toString();\n if (this.stringIsValidJson(result)) {\n this.jsonString$.next(result);\n }\n };\n\n reader.readAsText(file);\n } else {\n this.clearJsonString();\n }\n });\n }\n\n private openShowSubscription(): void {\n this.showSubscription = this.show$.subscribe(show => {\n if (show) {\n this.showModal();\n } else {\n this.hideModal();\n }\n\n this.clearJsonString();\n this.clearError();\n this.clearDropzone();\n });\n }\n\n private clearJsonString(): void {\n this.jsonString$.next('');\n }\n\n private clearDropzone(): void {\n this.clear$.next();\n }\n\n private showModal(): void {\n this.modal.show();\n }\n\n private hideModal(): void {\n this.modal.hide();\n }\n\n private stringIsValidJson(string: string) {\n try {\n JSON.parse(string);\n } catch (e) {\n return false;\n }\n return true;\n }\n\n private disable(): void {\n this.disabled$.next(true);\n }\n\n private enable(): void {\n this.disabled$.next(false);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, ViewChild} from '@angular/core';\nimport {\n DocumentService,\n DocumentDefinition,\n UndeployDocumentDefinitionResult,\n} from '@valtimo/document';\nimport {MenuService, ModalComponent} from '@valtimo/components';\nimport {ToastrService} from 'ngx-toastr';\nimport {Router} from '@angular/router';\nimport {TranslateService} from '@ngx-translate/core';\n\n@Component({\n selector: 'valtimo-dossier-management-remove-modal',\n templateUrl: './dossier-management-remove-modal.component.html',\n styleUrls: ['./dossier-management-remove-modal.component.scss'],\n})\nexport class DossierManagementRemoveModalComponent {\n public documentDefinition: DocumentDefinition | null = null;\n public errors: string[] = [];\n @ViewChild('documentDefinitionRemoveModal') modal: ModalComponent;\n\n constructor(\n private documentService: DocumentService,\n private toasterService: ToastrService,\n private router: Router,\n private translateService: TranslateService,\n private menuService: MenuService\n ) {}\n\n openModal(documentDefinition: DocumentDefinition) {\n this.documentDefinition = documentDefinition;\n this.modal.show();\n }\n\n removeDocumentDefinition() {\n this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(\n () => {\n this.menuService.reload();\n this.router.navigate(['/dossier-management']);\n this.toasterService.success(\n this.translateService.instant('remove-document-definition-success')\n );\n },\n (result: UndeployDocumentDefinitionResult) => {\n this.errors = result.errors;\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {DropzoneModule, ListModule, ModalModule, WidgetModule} from '@valtimo/components';\nimport {ConfigModule, ExtensionComponent} from '@valtimo/config';\nimport {DossierManagementConnectModalComponent} from './dossier-management-connect-modal/dossier-management-connect-modal.component';\nimport {DossierManagementDetailComponent} from './dossier-management-detail/dossier-management-detail.component';\nimport {DossierManagementListComponent} from './dossier-management-list/dossier-management-list.component';\nimport {DossierManagementRoutingModule} from './dossier-management-routing.module';\nimport {DossierManagementUploadComponent} from './dossier-management-upload/dossier-management-upload.component';\nimport {DossierManagementRemoveModalComponent} from './dossier-management-remove-modal/dossier-management-remove-modal.component';\nimport {NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';\n\n@NgModule({\n declarations: [\n DossierManagementListComponent,\n DossierManagementDetailComponent,\n DossierManagementConnectModalComponent,\n DossierManagementRemoveModalComponent,\n DossierManagementUploadComponent,\n ],\n imports: [\n CommonModule,\n WidgetModule,\n DropzoneModule,\n ListModule,\n DossierManagementRoutingModule,\n FormsModule,\n TranslateModule,\n ModalModule,\n ConfigModule,\n NgbTooltipModule,\n ],\n exports: [],\n entryComponents: [ExtensionComponent],\n})\nexport class DossierManagementModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of dossier-management\n */\n\nexport * from './lib/dossier-management.module';\nexport * from './lib/dossier-management-list/dossier-management-list.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {DossierManagementConnectModalComponent as ɵb} from './lib/dossier-management-connect-modal/dossier-management-connect-modal.component';\nexport {DossierManagementDetailComponent as ɵa} from './lib/dossier-management-detail/dossier-management-detail.component';\nexport {DossierManagementRemoveModalComponent as ɵc} from './lib/dossier-management-remove-modal/dossier-management-remove-modal.component';\nexport {DossierManagementRoutingModule as ɵe} from './lib/dossier-management-routing.module';\nexport {DossierManagementUploadComponent as ɵd} from './lib/dossier-management-upload/dossier-management-upload.component';"],"names":["EventEmitter","Component","ProcessService","DocumentService","ToastrService","Output","ViewChild","ActivatedRoute","AlertService","BehaviorSubject","Router","ROLE_ADMIN","AuthGuardService","NgModule","RouterModule","Subject","switchMap","DocumentDefinitionCreateRequest","tap","take","TranslateService","MenuService","Input","CommonModule","WidgetModule","DropzoneModule","ListModule","FormsModule","TranslateModule","ModalModule","ConfigModule","NgbTooltipModule","ExtensionComponent"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QA0CE,gDACU,cAA8B,EAC9B,eAAgC,EAChC,cAA6B;YAF7B,mBAAc,GAAd,cAAc,CAAgB;YAC9B,oBAAe,GAAf,eAAe,CAAiB;YAChC,mBAAc,GAAd,cAAc,CAAe;YAZhC,uBAAkB,GAA8B,IAAI,CAAC;YAErD,iCAA4B,GAA6B,IAAI,CAAC;YAC9D,qCAAgC,GAAG,IAAI,CAAC;YACxC,gDAA2C,GAAG,KAAK,CAAC;YACpD,oCAA+B,GAAQ,EAAE,CAAC;YAChC,qCAAgC,GAAG,IAAIA,iBAAY,EAAO,CAAC;SAOxE;QAEJ,+EAA8B,GAA9B;YAAA,iBAaC;YAZC,IAAI,CAAC,+BAA+B,GAAG,EAAE,CAAC;YAC1C,IAAI,CAAC,eAAe;iBACjB,8BAA8B,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC;iBAC/D,SAAS,CAAC,UAAC,0BAAuD;gBACjE,0BAA0B,CAAC,OAAO,CAChC,UAAC,yBAAoD;oBACnD,KAAI,CAAC,+BAA+B,CAClC,yBAAyB,CAAC,EAAE,CAAC,oBAAoB,CAClD,GAAG,IAAI,CAAC;iBACV,CACF,CAAC;aACH,CAAC,CAAC;SACN;QAED,uEAAsB,GAAtB;YAAA,iBAMC;YALC,IAAI,C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,sBAAW;;;wBAahBf,cAAS,SAAC,+BAA+B;;;ICnC5C;;;;;;;;;;;;;;;;QAqDA;;;;;gBAvBCO,aAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,8BAA8B;wBAC9B,gCAAgC;wBAChC,sCAAsC;wBACtC,qCAAqC;wBACrC,gCAAgC;qBACjC;oBACD,OAAO,EAAE;wBACPU,mBAAY;wBACZC,uBAAY;wBACZC,yBAAc;wBACdC,qBAAU;wBACV,8BAA8B;wBAC9BC,iBAAW;wBACXC,sBAAe;wBACfC,sBAAW;wBACXC,mBAAY;wBACZC,4BAAgB;qBACjB;oBACD,OAAO,EAAE,EAAE;oBACX,eAAe,EAAE,CAACC,yBAAkB,CAAC;iBACtC;;;ICpDD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-dossier-management.umd.js","sources":["../../../../projects/valtimo/dossier-management/src/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-detail/dossier-management-detail.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-list/dossier-management-list.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-routing.module.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-upload/dossier-management-upload.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management-roles/dossier-management-roles.component.ts","../../../../projects/valtimo/dossier-management/src/lib/dossier-management.module.ts","../../../../projects/valtimo/dossier-management/src/public-api.ts","../../../../projects/valtimo/dossier-management/src/valtimo-dossier-management.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, EventEmitter, OnInit, Output, ViewChild} from '@angular/core';\nimport {\n DocumentService,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentDefinition,\n DocumentDefinition,\n} from '@valtimo/document';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\nimport {ToastrService} from 'ngx-toastr';\nimport {ModalComponent} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-dossier-management-connect-modal',\n templateUrl: './dossier-management-connect-modal.component.html',\n styleUrls: ['./dossier-management-connect-modal.component.scss'],\n})\nexport class DossierManagementConnectModalComponent implements OnInit {\n public documentDefinition: DocumentDefinition | null = null;\n public processDefinitions: ProcessDefinition[];\n public newDocumentProcessDefinition: ProcessDefinition | null = null;\n public newDocumentProcessDefinitionInit = true;\n public newDocumentProcessDefinitionStartableByUser = false;\n public processDocumentDefinitionExists: any = {};\n @Output() public reloadProcessDocumentDefinitions = new EventEmitter<any>();\n @ViewChild('dossierConnectModal') modal: ModalComponent;\n\n constructor(\n private processService: ProcessService,\n private documentService: DocumentService,\n private toasterService: ToastrService\n ) {}\n\n loadProcessDocumentDefinitions() {\n this.processDocumentDefinitionExists = {};\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinition.id.name)\n .subscribe((processDocumentDefinitions: ProcessDocumentDefinition[]) => {\n processDocumentDefinitions.forEach(\n (processDocumentDefinition: ProcessDocumentDefinition) => {\n this.processDocumentDefinitionExists[\n processDocumentDefinition.id.processDefinitionKey\n ] = true;\n }\n );\n });\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n openModal(dossier: DocumentDefinition) {\n this.documentDefinition = dossier;\n this.newDocumentProcessDefinition = null;\n this.newDocumentProcessDefinitionInit = true;\n this.newDocumentProcessDefinitionStartableByUser = false;\n this.loadProcessDocumentDefinitions();\n this.modal.show();\n }\n\n submit() {\n const request: ProcessDocumentDefinitionRequest = {\n canInitializeDocument: this.newDocumentProcessDefinitionInit,\n startableByUser: this.newDocumentProcessDefinitionStartableByUser,\n documentDefinitionName: this.documentDefinition.id.name,\n processDefinitionKey: this.newDocumentProcessDefinition.key,\n };\n this.documentService.createProcessDocumentDefinition(request).subscribe(\n () => {\n this.toasterService.success('Successfully added new process document definition');\n this.reloadProcessDocumentDefinitions.emit();\n },\n err => {\n this.toasterService.error('Failed to add new process document definition');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit, ViewChild} from '@angular/core';\nimport {DocumentDefinition, DocumentService, ProcessDocumentDefinition} from '@valtimo/document';\nimport {ActivatedRoute} from '@angular/router';\nimport {DossierManagementConnectModalComponent} from '../dossier-management-connect-modal/dossier-management-connect-modal.component';\nimport {AlertService} from '@valtimo/components';\nimport {DossierManagementRemoveModalComponent} from '../dossier-management-remove-modal/dossier-management-remove-modal.component';\nimport {DossierManagementRolesComponent} from '../dossier-management-roles/dossier-management-roles.component';\n\n@Component({\n selector: 'valtimo-dossier-management-detail',\n templateUrl: './dossier-management-detail.component.html',\n styleUrls: ['./dossier-management-detail.component.scss'],\n})\nexport class DossierManagementDetailComponent implements OnInit {\n public documentDefinitionName: string | null = null;\n public documentDefinition: DocumentDefinition | null = null;\n public processDocumentDefinitions: ProcessDocumentDefinition[] = [];\n\n @ViewChild('dossierConnectModal') dossierConnectModal: DossierManagementConnectModalComponent;\n @ViewChild('dossierRemoveModal') dossierRemoveModal: DossierManagementRemoveModalComponent;\n @ViewChild('documentRoles') documentRoles: DossierManagementRolesComponent;\n\n constructor(\n private documentService: DocumentService,\n private route: ActivatedRoute,\n private alertService: AlertService\n ) {\n this.documentDefinitionName = this.route.snapshot.paramMap.get('name');\n }\n\n ngOnInit() {\n this.loadDocumentDefinition();\n this.loadProcessDocumentDefinitions();\n }\n\n loadProcessDocumentDefinitions() {\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinitionName)\n .subscribe((processDocumentDefinitions: ProcessDocumentDefinition[]) => {\n this.processDocumentDefinitions = processDocumentDefinitions;\n });\n }\n\n loadDocumentDefinition() {\n this.documentService\n .getDocumentDefinition(this.documentDefinitionName)\n .subscribe((documentDefinition: DocumentDefinition) => {\n this.documentDefinition = documentDefinition;\n });\n }\n\n openDossierConnectModal() {\n this.dossierConnectModal.openModal(this.documentDefinition);\n }\n\n openDossierRemoveModal() {\n this.dossierRemoveModal.openModal(this.documentDefinition);\n }\n\n deleteProcessDocumentDefinition(processDocumentDefinition: ProcessDocumentDefinition) {\n this.documentService\n .deleteProcessDocumentDefinition({\n documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,\n processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,\n canInitializeDocument: processDocumentDefinition.canInitializeDocument,\n startableByUser: processDocumentDefinition.startableByUser,\n })\n .subscribe(\n () => {\n this.alertService.success('Successfully deleted process document definition');\n this.loadProcessDocumentDefinitions();\n },\n () => {\n this.alertService.error('Failed to delete process document definition');\n }\n );\n }\n\n downloadDefinition(): void {\n const definition = this.documentDefinition;\n const dataString =\n 'data:text/json;charset=utf-8,' +\n encodeURIComponent(JSON.stringify(definition.schema, null, 2));\n const downloadAnchorElement = document.getElementById('downloadAnchorElement');\n downloadAnchorElement.setAttribute('href', dataString);\n downloadAnchorElement.setAttribute(\n 'download',\n `${definition.id.name}-v${definition.id.version}.json`\n );\n downloadAnchorElement.click();\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component} from '@angular/core';\nimport {DocumentService, DocumentDefinition, Page} from '@valtimo/document';\nimport {Router} from '@angular/router';\nimport * as moment_ from 'moment';\nimport {BehaviorSubject} from 'rxjs';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-management-list',\n templateUrl: './dossier-management-list.component.html',\n styleUrls: ['./dossier-management-list.component.scss'],\n})\nexport class DossierManagementListComponent {\n public dossiers: DocumentDefinition[] = [];\n public pagination = {\n collectionSize: 0,\n page: 1,\n size: 10,\n maxPaginationItemSize: 5,\n };\n public pageParam = 0;\n public dossierFields = [\n {key: 'schema.title', label: 'Title'},\n {key: 'createdOn', label: 'Created On'},\n {key: 'readOnly', label: 'Read-only'},\n ];\n\n readonly showModal$ = new BehaviorSubject<boolean>(false);\n\n constructor(private documentService: DocumentService, private router: Router) {}\n\n public paginationClicked(page) {\n this.pageParam = page - 1;\n this.getDocumentDefinitions();\n }\n\n paginationSet() {\n this.getDocumentDefinitions();\n }\n\n redirectToDetails(documentDefinition: DocumentDefinition) {\n this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);\n }\n\n private getDocumentDefinitions() {\n this.documentService\n .queryDefinitions({filteredOnRole: false, page: this.pageParam, size: this.pagination.size})\n .subscribe((documentDefinitionPage: Page<DocumentDefinition>) => {\n this.pagination.collectionSize = documentDefinitionPage.totalElements;\n this.dossiers = documentDefinitionPage.content;\n this.dossiers.map((dossier: DocumentDefinition) => {\n dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');\n });\n });\n }\n\n showModal() {\n this.showModal$.next(true);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {AuthGuardService} from '@valtimo/security';\nimport {DossierManagementDetailComponent} from './dossier-management-detail/dossier-management-detail.component';\nimport {DossierManagementListComponent} from './dossier-management-list/dossier-management-list.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'dossier-management',\n component: DossierManagementListComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossiers', roles: [ROLE_ADMIN]},\n },\n {\n path: 'dossier-management/dossier/:name',\n component: DossierManagementDetailComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossier details', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes)],\n exports: [RouterModule],\n declarations: [],\n})\nexport class DossierManagementRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {MenuService, ModalComponent} from '@valtimo/components';\nimport {DocumentService, DocumentDefinitionCreateRequest} from '@valtimo/document';\nimport {BehaviorSubject, Observable, Subject, Subscription} from 'rxjs';\nimport {switchMap, take, tap} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-dossier-management-upload',\n templateUrl: './dossier-management-upload.component.html',\n styleUrls: ['./dossier-management-upload.component.scss'],\n})\nexport class DossierManagementUploadComponent implements AfterViewInit, OnDestroy {\n @Input() show$: Observable<boolean>;\n @Output() definitionUploaded: EventEmitter<any> = new EventEmitter();\n\n @ViewChild('uploadDefinitionModal') modal: ModalComponent;\n\n readonly clear$ = new Subject();\n\n readonly jsonString$ = new BehaviorSubject<string>('');\n\n readonly error$ = new BehaviorSubject<string>('');\n\n readonly disabled$ = new BehaviorSubject<boolean>(false);\n\n private showSubscription: Subscription;\n\n private fileSubscription: Subscription;\n\n private errorSubscription: Subscription;\n\n private readonly file$ = new BehaviorSubject<File>(undefined);\n\n constructor(\n private readonly documentService: DocumentService,\n private readonly translateService: TranslateService,\n private readonly menuService: MenuService\n ) {}\n\n ngAfterViewInit(): void {\n this.openShowSubscription();\n this.openFileSubscription();\n }\n\n ngOnDestroy(): void {\n this.showSubscription.unsubscribe();\n this.fileSubscription.unsubscribe();\n this.closeErrorSubscription();\n }\n\n setFile(file: File): void {\n this.clearError();\n this.file$.next(file);\n }\n\n uploadDefinition(): void {\n this.disable();\n\n this.jsonString$\n .pipe(\n switchMap(jsonString =>\n this.documentService\n .createDocumentDefinition(new DocumentDefinitionCreateRequest(jsonString))\n .pipe(\n tap(\n // success\n () => {\n this.closeErrorSubscription();\n this.clearError();\n this.enable();\n this.hideModal();\n this.menuService.reload();\n this.definitionUploaded.emit();\n },\n // error\n () => {\n this.openErrorSubscription('dropzone.error.invalidDocDef');\n this.enable();\n }\n )\n )\n ),\n take(1)\n )\n .subscribe();\n }\n\n private openErrorSubscription(errorCode: string): void {\n this.closeErrorSubscription();\n this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {\n this.error$.next(error);\n });\n }\n\n private closeErrorSubscription(): void {\n if (this.errorSubscription) {\n this.errorSubscription.unsubscribe();\n }\n }\n\n private clearError(): void {\n this.error$.next('');\n }\n\n private openFileSubscription(): void {\n this.fileSubscription = this.file$.subscribe(file => {\n if (file) {\n const reader = new FileReader();\n\n reader.onloadend = () => {\n const result = reader.result.toString();\n if (this.stringIsValidJson(result)) {\n this.jsonString$.next(result);\n }\n };\n\n reader.readAsText(file);\n } else {\n this.clearJsonString();\n }\n });\n }\n\n private openShowSubscription(): void {\n this.showSubscription = this.show$.subscribe(show => {\n if (show) {\n this.showModal();\n } else {\n this.hideModal();\n }\n\n this.clearJsonString();\n this.clearError();\n this.clearDropzone();\n });\n }\n\n private clearJsonString(): void {\n this.jsonString$.next('');\n }\n\n private clearDropzone(): void {\n this.clear$.next();\n }\n\n private showModal(): void {\n this.modal.show();\n }\n\n private hideModal(): void {\n this.modal.hide();\n }\n\n private stringIsValidJson(string: string) {\n try {\n JSON.parse(string);\n } catch (e) {\n return false;\n }\n return true;\n }\n\n private disable(): void {\n this.disabled$.next(true);\n }\n\n private enable(): void {\n this.disabled$.next(false);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, ViewChild} from '@angular/core';\nimport {\n DocumentService,\n DocumentDefinition,\n UndeployDocumentDefinitionResult,\n} from '@valtimo/document';\nimport {MenuService, ModalComponent} from '@valtimo/components';\nimport {ToastrService} from 'ngx-toastr';\nimport {Router} from '@angular/router';\nimport {TranslateService} from '@ngx-translate/core';\n\n@Component({\n selector: 'valtimo-dossier-management-remove-modal',\n templateUrl: './dossier-management-remove-modal.component.html',\n styleUrls: ['./dossier-management-remove-modal.component.scss'],\n})\nexport class DossierManagementRemoveModalComponent {\n public documentDefinition: DocumentDefinition | null = null;\n public errors: string[] = [];\n @ViewChild('documentDefinitionRemoveModal') modal: ModalComponent;\n\n constructor(\n private documentService: DocumentService,\n private toasterService: ToastrService,\n private router: Router,\n private translateService: TranslateService,\n private menuService: MenuService\n ) {}\n\n openModal(documentDefinition: DocumentDefinition) {\n this.documentDefinition = documentDefinition;\n this.modal.show();\n }\n\n removeDocumentDefinition() {\n this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(\n () => {\n this.menuService.reload();\n this.router.navigate(['/dossier-management']);\n this.toasterService.success(\n this.translateService.instant('remove-document-definition-success')\n );\n },\n (result: UndeployDocumentDefinitionResult) => {\n this.errors = result.errors;\n }\n );\n }\n}\n","/*\n * Copyright 2015-2022 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Component, Input, OnInit} from '@angular/core';\nimport {IDropdownSettings} from 'ng-multiselect-dropdown';\nimport {BehaviorSubject} from 'rxjs';\nimport {Authority, AuthorityService} from '@valtimo/authority';\nimport {DocumentService} from '@valtimo/document';\nimport {AlertService} from '@valtimo/components';\nimport {TranslateService} from '@ngx-translate/core';\nimport {isEqual} from 'lodash';\n\n@Component({\n selector: 'valtimo-dossier-management-roles',\n templateUrl: './dossier-management-roles.component.html',\n styleUrls: ['./dossier-management-roles.component.scss'],\n})\nexport class DossierManagementRolesComponent implements OnInit {\n @Input() public documentDefinitionName: string;\n public dropdownSettings: IDropdownSettings = {\n singleSelection: false,\n idField: 'name',\n textField: 'name',\n selectAllText: 'Select All',\n unSelectAllText: 'UnSelect All',\n itemsShowLimit: 3,\n enableCheckAll: true,\n allowSearchFilter: true,\n };\n public roles = new BehaviorSubject<Array<Authority>>(undefined);\n public preSelectedItems = new BehaviorSubject<Array<String>>(undefined);\n\n constructor(\n private readonly authorityService: AuthorityService,\n private readonly documentService: DocumentService,\n private readonly alertService: AlertService,\n private readonly translateService: TranslateService\n ) {}\n\n ngOnInit(): void {\n this.loadAllRoles();\n }\n\n loadAllRoles(): void {\n this.authorityService.query().subscribe(result => {\n this.roles.next(result.body);\n this.loadDocumentRoles();\n });\n }\n\n loadDocumentRoles(): void {\n if (this.documentDefinitionName) {\n this.documentService.getDocumentRoles(this.documentDefinitionName).subscribe(\n result => {\n this.preSelectedItems.next(result);\n },\n err => {\n this.alertService.warning(\n this.translateService.instant(\n 'dossierManagement.roles.messages.unsuccessfullyRetrievedRoles'\n )\n );\n }\n );\n }\n }\n\n onSelectedItems(data: any): void {\n const roles = this.returnArrayOfString(data);\n\n if (isEqual(roles, this.preSelectedItems.value)) {\n return;\n }\n this.documentService.modifyDocumentRoles(this.documentDefinitionName, roles).subscribe(\n () => {\n this.alertService.success(\n this.translateService.instant('dossierManagement.roles.messages.successfullyStored')\n );\n this.preSelectedItems.next(roles);\n },\n err => {\n this.alertService.error(\n this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyStored')\n );\n }\n );\n }\n\n /**\n * The data could be either an array of string (i.e. [\"ROLE_ADMIN\", \"ROLE_DEVELOPER\"]\n * or an array of object with name parameters (i.e. [{\"name\": \"ROLE_ADMIN\"},{\"name\":\"ROLE_DEVELOPER}]\n *\n * This method will always make sure an array of strings is returned\n */\n private returnArrayOfString(data): Array<String> {\n return data.map(el => {\n if (typeof el === 'string') {\n return el;\n }\n\n return el.name;\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {\n DropzoneModule,\n ListModule,\n ModalModule,\n MultiselectDropdownModule,\n WidgetModule,\n} from '@valtimo/components';\nimport {ConfigModule, ExtensionComponent} from '@valtimo/config';\nimport {DossierManagementConnectModalComponent} from './dossier-management-connect-modal/dossier-management-connect-modal.component';\nimport {DossierManagementDetailComponent} from './dossier-management-detail/dossier-management-detail.component';\nimport {DossierManagementListComponent} from './dossier-management-list/dossier-management-list.component';\nimport {DossierManagementRoutingModule} from './dossier-management-routing.module';\nimport {DossierManagementUploadComponent} from './dossier-management-upload/dossier-management-upload.component';\nimport {DossierManagementRemoveModalComponent} from './dossier-management-remove-modal/dossier-management-remove-modal.component';\nimport {NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';\nimport {DossierManagementRolesComponent} from './dossier-management-roles/dossier-management-roles.component';\n\n@NgModule({\n declarations: [\n DossierManagementListComponent,\n DossierManagementDetailComponent,\n DossierManagementConnectModalComponent,\n DossierManagementRemoveModalComponent,\n DossierManagementUploadComponent,\n DossierManagementRolesComponent,\n ],\n imports: [\n CommonModule,\n WidgetModule,\n DropzoneModule,\n ListModule,\n DossierManagementRoutingModule,\n FormsModule,\n TranslateModule,\n ModalModule,\n ConfigModule,\n NgbTooltipModule,\n MultiselectDropdownModule,\n ],\n exports: [],\n entryComponents: [ExtensionComponent],\n})\nexport class DossierManagementModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of dossier-management\n */\n\nexport * from './lib/dossier-management.module';\nexport * from './lib/dossier-management-list/dossier-management-list.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {DossierManagementConnectModalComponent as ɵb} from './lib/dossier-management-connect-modal/dossier-management-connect-modal.component';\nexport {DossierManagementDetailComponent as ɵa} from './lib/dossier-management-detail/dossier-management-detail.component';\nexport {DossierManagementRemoveModalComponent as ɵc} from './lib/dossier-management-remove-modal/dossier-management-remove-modal.component';\nexport {DossierManagementRolesComponent as ɵe} from './lib/dossier-management-roles/dossier-management-roles.component';\nexport {DossierManagementRoutingModule as ɵf} from './lib/dossier-management-routing.module';\nexport {DossierManagementUploadComponent as ɵd} from './lib/dossier-management-upload/dossier-management-upload.component';"],"names":["EventEmitter","Component","ProcessService","DocumentService","ToastrService","Output","ViewChild","ActivatedRoute","AlertService","BehaviorSubject","Router","ROLE_ADMIN","AuthGuardService","NgModule","RouterModule","Subject","switchMap","DocumentDefinitionCreateRequest","tap","take","TranslateService","MenuService","Input","isEqual","AuthorityService","CommonModule","WidgetModule","DropzoneModule","ListModule","FormsModule","TranslateModule","ModalModule","Conf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