@valtimo/dossier-management 4.15.2 → 4.16.0-next-main.19
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 +33 -30
- 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 +10 -6
- package/esm2015/lib/dossier-management-detail/dossier-management-detail.component.js +5 -4
- 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 +3 -3
- package/esm2015/lib/dossier-management-routing.module.js +8 -12
- package/esm2015/lib/dossier-management-upload/dossier-management-upload.component.js +7 -6
- package/esm2015/lib/dossier-management.module.js +4 -4
- package/esm2015/public-api.js +1 -1
- package/esm2015/valtimo-dossier-management.js +1 -1
- package/fesm2015/valtimo-dossier-management.js +30 -28
- package/fesm2015/valtimo-dossier-management.js.map +1 -1
- package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts +2 -3
- package/lib/dossier-management-detail/dossier-management-detail.component.d.ts +1 -2
- package/lib/dossier-management-list/dossier-management-list.component.d.ts +1 -2
- package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts +1 -2
- package/package.json +1 -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('
|
|
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', '
|
|
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.
|
|
5
|
-
}(this, (function (exports, common, core, forms, core$1, components, config, document$1, process, ngxToastr, router, moment_, rxjs, security,
|
|
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';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
DossierManagementConnectModalComponent.prototype.loadProcessDocumentDefinitions = function () {
|
|
35
35
|
var _this = this;
|
|
36
36
|
this.processDocumentDefinitionExists = {};
|
|
37
|
-
this.documentService
|
|
37
|
+
this.documentService
|
|
38
|
+
.findProcessDocumentDefinitions(this.documentDefinition.id.name)
|
|
39
|
+
.subscribe(function (processDocumentDefinitions) {
|
|
38
40
|
processDocumentDefinitions.forEach(function (processDocumentDefinition) {
|
|
39
41
|
_this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
|
|
40
42
|
});
|
|
@@ -42,7 +44,9 @@
|
|
|
42
44
|
};
|
|
43
45
|
DossierManagementConnectModalComponent.prototype.loadProcessDefinitions = function () {
|
|
44
46
|
var _this = this;
|
|
45
|
-
this.processService
|
|
47
|
+
this.processService
|
|
48
|
+
.getProcessDefinitions()
|
|
49
|
+
.subscribe(function (processDefinitions) {
|
|
46
50
|
_this.processDefinitions = processDefinitions;
|
|
47
51
|
});
|
|
48
52
|
};
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
canInitializeDocument: this.newDocumentProcessDefinitionInit,
|
|
64
68
|
startableByUser: this.newDocumentProcessDefinitionStartableByUser,
|
|
65
69
|
documentDefinitionName: this.documentDefinition.id.name,
|
|
66
|
-
processDefinitionKey: this.newDocumentProcessDefinition.key
|
|
70
|
+
processDefinitionKey: this.newDocumentProcessDefinition.key,
|
|
67
71
|
};
|
|
68
72
|
this.documentService.createProcessDocumentDefinition(request).subscribe(function () {
|
|
69
73
|
_this.toasterService.success('Successfully added new process document definition');
|
|
@@ -77,7 +81,7 @@
|
|
|
77
81
|
DossierManagementConnectModalComponent.decorators = [
|
|
78
82
|
{ type: core.Component, args: [{
|
|
79
83
|
selector: 'valtimo-dossier-management-connect-modal',
|
|
80
|
-
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
|
|
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\">Select process definition</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 class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\">\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">Init document?</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"right\"\n ngbTooltip=\"{{ 'Startable by user tooltip' | 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 >{{ 'Startable by user' | translate }}?</span\n >\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",
|
|
81
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 */"]
|
|
82
86
|
},] }
|
|
83
87
|
];
|
|
@@ -149,7 +153,7 @@
|
|
|
149
153
|
documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
|
|
150
154
|
processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
|
|
151
155
|
canInitializeDocument: processDocumentDefinition.canInitializeDocument,
|
|
152
|
-
startableByUser: processDocumentDefinition.startableByUser
|
|
156
|
+
startableByUser: processDocumentDefinition.startableByUser,
|
|
153
157
|
})
|
|
154
158
|
.subscribe(function () {
|
|
155
159
|
_this.alertService.success('Successfully deleted process document definition');
|
|
@@ -160,7 +164,8 @@
|
|
|
160
164
|
};
|
|
161
165
|
DossierManagementDetailComponent.prototype.downloadDefinition = function () {
|
|
162
166
|
var definition = this.documentDefinition;
|
|
163
|
-
var dataString = 'data:text/json;charset=utf-8,' +
|
|
167
|
+
var dataString = 'data:text/json;charset=utf-8,' +
|
|
168
|
+
encodeURIComponent(JSON.stringify(definition.schema, null, 2));
|
|
164
169
|
var downloadAnchorElement = document.getElementById('downloadAnchorElement');
|
|
165
170
|
downloadAnchorElement.setAttribute('href', dataString);
|
|
166
171
|
downloadAnchorElement.setAttribute('download', definition.id.name + "-v" + definition.id.version + ".json");
|
|
@@ -171,7 +176,7 @@
|
|
|
171
176
|
DossierManagementDetailComponent.decorators = [
|
|
172
177
|
{ type: core.Component, args: [{
|
|
173
178
|
selector: 'valtimo-dossier-management-detail',
|
|
174
|
-
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> \n {{ 'Download document definition' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n <button
|
|
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> \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\"></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\">Read-only</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>Connected processes</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=\"fa fa-trash\"></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 class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\">\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\">Init document?</span>\n </label>\n <label class=\"custom-control custom-checkbox custom-control-inline pl-6\">\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 >{{ 'Startable by user' | translate }}?</span\n >\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\"></i> Connect process\n </button>\n </div>\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",
|
|
175
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}"]
|
|
176
181
|
},] }
|
|
177
182
|
];
|
|
@@ -211,13 +216,13 @@
|
|
|
211
216
|
collectionSize: 0,
|
|
212
217
|
page: 1,
|
|
213
218
|
size: 10,
|
|
214
|
-
maxPaginationItemSize: 5
|
|
219
|
+
maxPaginationItemSize: 5,
|
|
215
220
|
};
|
|
216
221
|
this.pageParam = 0;
|
|
217
222
|
this.dossierFields = [
|
|
218
223
|
{ key: 'schema.title', label: 'Title' },
|
|
219
224
|
{ key: 'createdOn', label: 'Created On' },
|
|
220
|
-
{ key: 'readOnly', label: 'Read-only' }
|
|
225
|
+
{ key: 'readOnly', label: 'Read-only' },
|
|
221
226
|
];
|
|
222
227
|
this.showModal$ = new rxjs.BehaviorSubject(false);
|
|
223
228
|
}
|
|
@@ -275,20 +280,20 @@
|
|
|
275
280
|
* See the License for the specific language governing permissions and
|
|
276
281
|
* limitations under the License.
|
|
277
282
|
*/
|
|
278
|
-
var ɵ0 = { title: 'Dossiers', roles: [
|
|
283
|
+
var ɵ0 = { title: 'Dossiers', roles: [config.ROLE_ADMIN] }, ɵ1 = { title: 'Dossier details', roles: [config.ROLE_ADMIN] };
|
|
279
284
|
var routes = [
|
|
280
285
|
{
|
|
281
286
|
path: 'dossier-management',
|
|
282
287
|
component: DossierManagementListComponent,
|
|
283
288
|
canActivate: [security.AuthGuardService],
|
|
284
|
-
data: ɵ0
|
|
289
|
+
data: ɵ0,
|
|
285
290
|
},
|
|
286
291
|
{
|
|
287
292
|
path: 'dossier-management/dossier/:name',
|
|
288
293
|
component: DossierManagementDetailComponent,
|
|
289
294
|
canActivate: [security.AuthGuardService],
|
|
290
|
-
data: ɵ1
|
|
291
|
-
}
|
|
295
|
+
data: ɵ1,
|
|
296
|
+
},
|
|
292
297
|
];
|
|
293
298
|
var DossierManagementRoutingModule = /** @class */ (function () {
|
|
294
299
|
function DossierManagementRoutingModule() {
|
|
@@ -297,13 +302,9 @@
|
|
|
297
302
|
}());
|
|
298
303
|
DossierManagementRoutingModule.decorators = [
|
|
299
304
|
{ type: core.NgModule, args: [{
|
|
300
|
-
imports: [
|
|
301
|
-
|
|
302
|
-
],
|
|
303
|
-
exports: [
|
|
304
|
-
router.RouterModule
|
|
305
|
-
],
|
|
306
|
-
declarations: []
|
|
305
|
+
imports: [router.RouterModule.forRoot(routes)],
|
|
306
|
+
exports: [router.RouterModule],
|
|
307
|
+
declarations: [],
|
|
307
308
|
},] }
|
|
308
309
|
];
|
|
309
310
|
|
|
@@ -351,7 +352,9 @@
|
|
|
351
352
|
var _this = this;
|
|
352
353
|
this.disable();
|
|
353
354
|
this.jsonString$
|
|
354
|
-
.pipe(operators.switchMap(function (jsonString) { return _this.documentService
|
|
355
|
+
.pipe(operators.switchMap(function (jsonString) { return _this.documentService
|
|
356
|
+
.createDocumentDefinition(new document$1.DocumentDefinitionCreateRequest(jsonString))
|
|
357
|
+
.pipe(operators.tap(
|
|
355
358
|
// success
|
|
356
359
|
function () {
|
|
357
360
|
_this.closeErrorSubscription();
|
|
@@ -447,7 +450,7 @@
|
|
|
447
450
|
DossierManagementUploadComponent.decorators = [
|
|
448
451
|
{ type: core.Component, args: [{
|
|
449
452
|
selector: 'valtimo-dossier-management-upload',
|
|
450
|
-
template: "<valtimo-modal
|
|
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",
|
|
451
454
|
styles: [""]
|
|
452
455
|
},] }
|
|
453
456
|
];
|
|
@@ -506,7 +509,7 @@
|
|
|
506
509
|
DossierManagementRemoveModalComponent.decorators = [
|
|
507
510
|
{ type: core.Component, args: [{
|
|
508
511
|
selector: 'valtimo-dossier-management-remove-modal',
|
|
509
|
-
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
|
|
512
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\n",
|
|
510
513
|
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 */"]
|
|
511
514
|
},] }
|
|
512
515
|
];
|
|
@@ -548,7 +551,7 @@
|
|
|
548
551
|
DossierManagementDetailComponent,
|
|
549
552
|
DossierManagementConnectModalComponent,
|
|
550
553
|
DossierManagementRemoveModalComponent,
|
|
551
|
-
DossierManagementUploadComponent
|
|
554
|
+
DossierManagementUploadComponent,
|
|
552
555
|
],
|
|
553
556
|
imports: [
|
|
554
557
|
common.CommonModule,
|
|
@@ -560,10 +563,10 @@
|
|
|
560
563
|
core$1.TranslateModule,
|
|
561
564
|
components.ModalModule,
|
|
562
565
|
config.ConfigModule,
|
|
563
|
-
ngBootstrap.NgbTooltipModule
|
|
566
|
+
ngBootstrap.NgbTooltipModule,
|
|
564
567
|
],
|
|
565
568
|
exports: [],
|
|
566
|
-
entryComponents: [config.ExtensionComponent]
|
|
569
|
+
entryComponents: [config.ExtensionComponent],
|
|
567
570
|
},] }
|
|
568
571
|
];
|
|
569
572
|
|
|
@@ -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 {DocumentService} from '@valtimo/document';\nimport {ProcessDocumentDefinitionRequest, ProcessDocumentDefinition, DocumentDefinition, ProcessDefinition} from '@valtimo/contract';\nimport {ProcessService} 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\n loadProcessDocumentDefinitions() {\n this.processDocumentDefinitionExists = {};\n this.documentService.findProcessDocumentDefinitions(this.documentDefinition.id.name).subscribe(\n (processDocumentDefinitions: ProcessDocumentDefinition[]) => {\n processDocumentDefinitions.forEach((processDocumentDefinition: ProcessDocumentDefinition) => {\n this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;\n });\n });\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().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 this.toasterService.success('Successfully added new process document definition');\n this.reloadProcessDocumentDefinitions.emit();\n }, err => {\n this.toasterService.error('Failed to add new process document definition');\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} from '@valtimo/document';\nimport {DocumentDefinition, ProcessDocumentDefinition} from '@valtimo/contract';\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 = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(definition.schema, null, 2));\n const downloadAnchorElement = document.getElementById('downloadAnchorElement');\n downloadAnchorElement.setAttribute('href', dataString);\n downloadAnchorElement.setAttribute('download', `${definition.id.name}-v${definition.id.version}.json`);\n downloadAnchorElement.click();\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} from '@angular/core';\nimport {DocumentService} from '@valtimo/document';\nimport {DocumentDefinition, Page} from '@valtimo/contract';\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(\n private documentService: DocumentService,\n private router: Router\n ) {\n\n }\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","/*\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/contract';\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: [\n RouterModule.forRoot(routes)\n ],\n exports: [\n RouterModule\n ],\n declarations: []\n})\nexport class DossierManagementRoutingModule {\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 {AfterViewInit, Component, EventEmitter, Input, OnDestroy, Output, ViewChild} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {MenuService, ModalComponent} from '@valtimo/components';\nimport {DocumentDefinitionCreateRequest} from '@valtimo/contract';\nimport {DocumentService} 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.createDocumentDefinition(new DocumentDefinitionCreateRequest(jsonString)).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 {DocumentService} from '@valtimo/document';\nimport {DocumentDefinition, UndeployDocumentDefinitionResult} from '@valtimo/contract';\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\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(this.translateService.instant('remove-document-definition-success'));\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","/*\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","Config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mBAAY;wBACZC,4BAAgB;qBACnB;oBACH,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.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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iBACtC;;;ICpDD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(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("@valtimo/contract"),require("rxjs/operators"),require("@ng-bootstrap/ng-bootstrap")):"function"==typeof define&&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","@valtimo/contract","rxjs/operators","@ng-bootstrap/ng-bootstrap"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo["dossier-management"]={}),e.ng.common,e.ng.core,e.ng.forms,e.core$1,e.components,e.config,e.document,e.process,e.ngxToastr,e.ng.router,e.moment,e.rxjs,e.security,e.contract,e.rxjs.operators,e.ngBootstrap)}(this,(function(e,n,t,i,o,s,r,a,c,l,d,u,p,m,h,f,b){"use strict";var g=function(){function e(e,n,i){this.processService=e,this.documentService=n,this.toasterService=i,this.documentDefinition=null,this.newDocumentProcessDefinition=null,this.newDocumentProcessDefinitionInit=!0,this.newDocumentProcessDefinitionStartableByUser=!1,this.processDocumentDefinitionExists={},this.reloadProcessDocumentDefinitions=new t.EventEmitter}return e.prototype.loadProcessDocumentDefinitions=function(){var e=this;this.processDocumentDefinitionExists={},this.documentService.findProcessDocumentDefinitions(this.documentDefinition.id.name).subscribe((function(n){n.forEach((function(n){e.processDocumentDefinitionExists[n.id.processDefinitionKey]=!0}))}))},e.prototype.loadProcessDefinitions=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(n){e.processDefinitions=n}))},e.prototype.ngOnInit=function(){this.loadProcessDefinitions()},e.prototype.openModal=function(e){this.documentDefinition=e,this.newDocumentProcessDefinition=null,this.newDocumentProcessDefinitionInit=!0,this.newDocumentProcessDefinitionStartableByUser=!1,this.loadProcessDocumentDefinitions(),this.modal.show()},e.prototype.submit=function(){var e=this,n={canInitializeDocument:this.newDocumentProcessDefinitionInit,startableByUser:this.newDocumentProcessDefinitionStartableByUser,documentDefinitionName:this.documentDefinition.id.name,processDefinitionKey:this.newDocumentProcessDefinition.key};this.documentService.createProcessDocumentDefinition(n).subscribe((function(){e.toasterService.success("Successfully added new process document definition"),e.reloadProcessDocumentDefinitions.emit()}),(function(n){e.toasterService.error("Failed to add new process document definition")}))},e}();g.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-connect-modal",template:'\x3c!--\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 --\x3e\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 }} <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">Select process definition</option>\n <option *ngFor="let processDefinition of processDefinitions"\n [disabled]="processDocumentDefinitionExists[processDefinition.key]"\n [ngValue]="processDefinition">{{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 class="custom-control custom-checkbox custom-control-inline pl-6 mb-0">\n <input class="custom-control-input" type="checkbox" [(ngModel)]="newDocumentProcessDefinitionInit"><span\n class="custom-control-label custom-control-color">Init document?</span>\n </label>\n <label class="custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0" placement="right"\n ngbTooltip="{{ \'Startable by user tooltip\' | translate }}">\n <input class="custom-control-input" type="checkbox" [(ngModel)]="newDocumentProcessDefinitionStartableByUser"><span\n class="custom-control-label custom-control-color">{{ \'Startable by user\' | translate }}?</span>\n </label>\n </div>\n </div>\n <div footer>\n <button (click)="submit()" class="btn btn-primary" data-dismiss="modal"\n [disabled]="!newDocumentProcessDefinition"> {{ \'Save\' | translate }}\n </button>\n </div>\n</valtimo-modal>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],g.ctorParameters=function(){return[{type:c.ProcessService},{type:a.DocumentService},{type:l.ToastrService}]},g.propDecorators={reloadProcessDocumentDefinitions:[{type:t.Output}],modal:[{type:t.ViewChild,args:["dossierConnectModal"]}]};var v=function(){function e(e,n,t){this.documentService=e,this.route=n,this.alertService=t,this.documentDefinitionName=null,this.documentDefinition=null,this.processDocumentDefinitions=[],this.documentDefinitionName=this.route.snapshot.paramMap.get("name")}return e.prototype.ngOnInit=function(){this.loadDocumentDefinition(),this.loadProcessDocumentDefinitions()},e.prototype.loadProcessDocumentDefinitions=function(){var e=this;this.documentService.findProcessDocumentDefinitions(this.documentDefinitionName).subscribe((function(n){e.processDocumentDefinitions=n}))},e.prototype.loadDocumentDefinition=function(){var e=this;this.documentService.getDocumentDefinition(this.documentDefinitionName).subscribe((function(n){e.documentDefinition=n}))},e.prototype.openDossierConnectModal=function(){this.dossierConnectModal.openModal(this.documentDefinition)},e.prototype.openDossierRemoveModal=function(){this.dossierRemoveModal.openModal(this.documentDefinition)},e.prototype.deleteProcessDocumentDefinition=function(e){var n=this;this.documentService.deleteProcessDocumentDefinition({documentDefinitionName:e.id.documentDefinitionId.name,processDefinitionKey:e.id.processDefinitionKey,canInitializeDocument:e.canInitializeDocument,startableByUser:e.startableByUser}).subscribe((function(){n.alertService.success("Successfully deleted process document definition"),n.loadProcessDocumentDefinitions()}),(function(){n.alertService.error("Failed to delete process document definition")}))},e.prototype.downloadDefinition=function(){var e=this.documentDefinition,n="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e.schema,null,2)),t=document.getElementById("downloadAnchorElement");t.setAttribute("href",n),t.setAttribute("download",e.id.name+"-v"+e.id.version+".json"),t.click()},e}();v.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-detail",template:'\x3c!--\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 --\x3e\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> \n {{ \'Download document definition\' | translate }}\n </button>\n <a id="downloadAnchorElement" style="display: none"></a>\n <button *ngIf="!this.documentDefinition.readOnly" class="btn btn-secondary btn-space mr-0"\n (click)="openDossierRemoveModal()">\n <i class="icon mdi mdi-delete"></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">{{ documentDefinition.schema.title }}\n <div *ngIf="documentDefinition.readOnly" class="pull-right">\n <span class="badge badge-pill badge-info increase-size">Read-only</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>Connected processes</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>{{ documentDefinition | json }}\n </textarea>\n </div>\n <div class="col-5 offset-2 bg-blue">\n <div class="input-group mb-5"\n *ngFor="let processDocumentDefinition of processDocumentDefinitions">\n <div class="input-group-prepend w-75">\n <button class="btn btn-danger" (click)="deleteProcessDocumentDefinition(processDocumentDefinition)"\n data-toggle="tooltip" data-placement="left" title="Delete this connected process">\n <i class="fa fa-trash"></i>\n </button>\n <input class="form-control"\n [value]="processDocumentDefinition.processName ? processDocumentDefinition.processName\n : \'\' + \' (\' + processDocumentDefinition.id.processDefinitionKey + \')\'"\n type="text"\n disabled\n />\n </div>\n <div class="row mb-2 mt-2">\n <label class="custom-control custom-checkbox custom-control-inline pl-6 mr-5">\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">Init document?</span>\n </label>\n <label class="custom-control custom-checkbox custom-control-inline pl-6">\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">{{ \'Startable by user\' | translate }}?</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"></i> Connect process\n </button>\n </div>\n <valtimo-extension\n module="dossier-management"\n page="dossier"\n section="openzaak-zaaktype-link"\n ></valtimo-extension>\n <valtimo-extension\n module="dossier-management"\n page="dossier"\n section="connector-link"\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 #dossierRemoveModal></valtimo-dossier-management-remove-modal>\n </div>\n\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dossier-header{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}']}]}],v.ctorParameters=function(){return[{type:a.DocumentService},{type:d.ActivatedRoute},{type:s.AlertService}]},v.propDecorators={dossierConnectModal:[{type:t.ViewChild,args:["dossierConnectModal"]}],dossierRemoveModal:[{type:t.ViewChild,args:["dossierRemoveModal"]}]};var D=u;D.locale(localStorage.getItem("langKey")||"");var y=function(){function e(e,n){this.documentService=e,this.router=n,this.dossiers=[],this.pagination={collectionSize:0,page:1,size:10,maxPaginationItemSize:5},this.pageParam=0,this.dossierFields=[{key:"schema.title",label:"Title"},{key:"createdOn",label:"Created On"},{key:"readOnly",label:"Read-only"}],this.showModal$=new p.BehaviorSubject(!1)}return e.prototype.paginationClicked=function(e){this.pageParam=e-1,this.getDocumentDefinitions()},e.prototype.paginationSet=function(){this.getDocumentDefinitions()},e.prototype.redirectToDetails=function(e){this.router.navigate(["/dossier-management/dossier",e.id.name])},e.prototype.getDocumentDefinitions=function(){var e=this;this.documentService.queryDefinitions({page:this.pageParam,size:this.pagination.size}).subscribe((function(n){e.pagination.collectionSize=n.totalElements,e.dossiers=n.content,e.dossiers.map((function(e){e.createdOn=D(e.createdOn).format("DD MMM YYYY HH:mm")}))}))},e.prototype.showModal=function(){this.showModal$.next(!0)},e}();y.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-list",template:'\x3c!--\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 --\x3e\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> \n {{ \'Upload document definition\' | translate }}\n </button>\n </div>\n <div class="clearfix"></div>\n <valtimo-widget>\n <valtimo-list\n [items]="dossiers"\n [fields]="dossierFields"\n [header]="true"\n [viewMode]="true"\n [isSearchable]="true"\n [pagination]="pagination"\n paginationIdentifier="dossierManagementList"\n (paginationClicked)="paginationClicked($event)"\n (paginationSet)="paginationSet()"\n (rowClicked)="redirectToDetails($event)"\n >\n <div header>\n <h3 class="list-header-title">{{ \'Dossiers\' | translate }}</h3>\n <h5 class="list-header-description">{{ \'Overview of all Dossiers\' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]="showModal$"\n (definitionUploaded)="paginationSet()"\n></valtimo-dossier-management-upload>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],y.ctorParameters=function(){return[{type:a.DocumentService},{type:d.Router}]};var S={title:"Dossiers",roles:[h.ROLE_ADMIN]},w={title:"Dossier details",roles:[h.ROLE_ADMIN]},x=[{path:"dossier-management",component:y,canActivate:[m.AuthGuardService],data:S},{path:"dossier-management/dossier/:name",component:v,canActivate:[m.AuthGuardService],data:w}],I=function(){};I.decorators=[{type:t.NgModule,args:[{imports:[d.RouterModule.forRoot(x)],exports:[d.RouterModule],declarations:[]}]}];var L=function(){function e(e,n,i){this.documentService=e,this.translateService=n,this.menuService=i,this.definitionUploaded=new t.EventEmitter,this.clear$=new p.Subject,this.jsonString$=new p.BehaviorSubject(""),this.error$=new p.BehaviorSubject(""),this.disabled$=new p.BehaviorSubject(!1),this.file$=new p.BehaviorSubject(void 0)}return e.prototype.ngAfterViewInit=function(){this.openShowSubscription(),this.openFileSubscription()},e.prototype.ngOnDestroy=function(){this.showSubscription.unsubscribe(),this.fileSubscription.unsubscribe(),this.closeErrorSubscription()},e.prototype.setFile=function(e){this.clearError(),this.file$.next(e)},e.prototype.uploadDefinition=function(){var e=this;this.disable(),this.jsonString$.pipe(f.switchMap((function(n){return e.documentService.createDocumentDefinition(new h.DocumentDefinitionCreateRequest(n)).pipe(f.tap((function(){e.closeErrorSubscription(),e.clearError(),e.enable(),e.hideModal(),e.menuService.reload(),e.definitionUploaded.emit()}),(function(){e.openErrorSubscription("dropzone.error.invalidDocDef"),e.enable()})))})),f.take(1)).subscribe()},e.prototype.openErrorSubscription=function(e){var n=this;this.closeErrorSubscription(),this.errorSubscription=this.translateService.stream(e).subscribe((function(e){n.error$.next(e)}))},e.prototype.closeErrorSubscription=function(){this.errorSubscription&&this.errorSubscription.unsubscribe()},e.prototype.clearError=function(){this.error$.next("")},e.prototype.openFileSubscription=function(){var e=this;this.fileSubscription=this.file$.subscribe((function(n){if(n){var t=new FileReader;t.onloadend=function(){var n=t.result.toString();e.stringIsValidJson(n)&&e.jsonString$.next(n)},t.readAsText(n)}else e.clearJsonString()}))},e.prototype.openShowSubscription=function(){var e=this;this.showSubscription=this.show$.subscribe((function(n){n?e.showModal():e.hideModal(),e.clearJsonString(),e.clearError(),e.clearDropzone()}))},e.prototype.clearJsonString=function(){this.jsonString$.next("")},e.prototype.clearDropzone=function(){this.clear$.next()},e.prototype.showModal=function(){this.modal.show()},e.prototype.hideModal=function(){this.modal.hide()},e.prototype.stringIsValidJson=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},e.prototype.disable=function(){this.disabled$.next(!0)},e.prototype.enable=function(){this.disabled$.next(!1)},e}();L.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-upload",template:'<valtimo-modal #uploadDefinitionModal [title]="\'Upload document definition\' | translate" showFooter="true">\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',styles:[""]}]}],L.ctorParameters=function(){return[{type:a.DocumentService},{type:o.TranslateService},{type:s.MenuService}]},L.propDecorators={show$:[{type:t.Input}],definitionUploaded:[{type:t.Output}],modal:[{type:t.ViewChild,args:["uploadDefinitionModal"]}]};var M=function(){function e(e,n,t,i,o){this.documentService=e,this.toasterService=n,this.router=t,this.translateService=i,this.menuService=o,this.documentDefinition=null,this.errors=[]}return e.prototype.openModal=function(e){this.documentDefinition=e,this.modal.show()},e.prototype.removeDocumentDefinition=function(){var e=this;this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe((function(){e.menuService.reload(),e.router.navigate(["/dossier-management"]),e.toasterService.success(e.translateService.instant("remove-document-definition-success"))}),(function(n){e.errors=n.errors}))},e}();M.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-remove-modal",template:'\x3c!--\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 --\x3e\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\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 class="message" [innerHTML]="\'remove-document-definition-confirmation\' | translate">\n </div>\n </div>\n <div *ngIf="errors.length > 0" class="alert alert-danger pt-5 pb-5 mb-2">\n <ol>\n <li *ngFor="let error of errors">\n {{error}}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)="removeDocumentDefinition()" class="btn btn-primary" data-dismiss="modal">\n {{ \'remove-document-definition-confirmation-button\' | translate }}\n </button>\n </div>\n</valtimo-modal>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],M.ctorParameters=function(){return[{type:a.DocumentService},{type:l.ToastrService},{type:d.Router},{type:o.TranslateService},{type:s.MenuService}]},M.propDecorators={modal:[{type:t.ViewChild,args:["documentDefinitionRemoveModal"]}]};var N=function(){};N.decorators=[{type:t.NgModule,args:[{declarations:[y,v,g,M,L],imports:[n.CommonModule,s.WidgetModule,s.DropzoneModule,s.ListModule,I,i.FormsModule,o.TranslateModule,s.ModalModule,r.ConfigModule,b.NgbTooltipModule],exports:[],entryComponents:[r.ExtensionComponent]}]}],e.DossierManagementListComponent=y,e.DossierManagementModule=N,e.ɵa=v,e.ɵb=g,e.ɵc=M,e.ɵd=L,e.ɵe=I,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(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")):"function"==typeof define&&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"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo["dossier-management"]={}),e.ng.common,e.ng.core,e.ng.forms,e.core$1,e.components,e.config,e.document,e.process,e.ngxToastr,e.ng.router,e.moment,e.rxjs,e.security,e.rxjs.operators,e.ngBootstrap)}(this,(function(e,n,t,i,o,s,r,a,c,l,d,u,p,m,h,f){"use strict";var b=function(){function e(e,n,i){this.processService=e,this.documentService=n,this.toasterService=i,this.documentDefinition=null,this.newDocumentProcessDefinition=null,this.newDocumentProcessDefinitionInit=!0,this.newDocumentProcessDefinitionStartableByUser=!1,this.processDocumentDefinitionExists={},this.reloadProcessDocumentDefinitions=new t.EventEmitter}return e.prototype.loadProcessDocumentDefinitions=function(){var e=this;this.processDocumentDefinitionExists={},this.documentService.findProcessDocumentDefinitions(this.documentDefinition.id.name).subscribe((function(n){n.forEach((function(n){e.processDocumentDefinitionExists[n.id.processDefinitionKey]=!0}))}))},e.prototype.loadProcessDefinitions=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(n){e.processDefinitions=n}))},e.prototype.ngOnInit=function(){this.loadProcessDefinitions()},e.prototype.openModal=function(e){this.documentDefinition=e,this.newDocumentProcessDefinition=null,this.newDocumentProcessDefinitionInit=!0,this.newDocumentProcessDefinitionStartableByUser=!1,this.loadProcessDocumentDefinitions(),this.modal.show()},e.prototype.submit=function(){var e=this,n={canInitializeDocument:this.newDocumentProcessDefinitionInit,startableByUser:this.newDocumentProcessDefinitionStartableByUser,documentDefinitionName:this.documentDefinition.id.name,processDefinitionKey:this.newDocumentProcessDefinition.key};this.documentService.createProcessDocumentDefinition(n).subscribe((function(){e.toasterService.success("Successfully added new process document definition"),e.reloadProcessDocumentDefinitions.emit()}),(function(n){e.toasterService.error("Failed to add new process document definition")}))},e}();b.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-connect-modal",template:'\x3c!--\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 --\x3e\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">Select process definition</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 class="custom-control custom-checkbox custom-control-inline pl-6 mb-0">\n <input\n class="custom-control-input"\n type="checkbox"\n [(ngModel)]="newDocumentProcessDefinitionInit"\n /><span class="custom-control-label custom-control-color">Init document?</span>\n </label>\n <label\n class="custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0"\n placement="right"\n ngbTooltip="{{ \'Startable by user tooltip\' | 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 >{{ \'Startable by user\' | translate }}?</span\n >\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)="submit()"\n class="btn btn-primary"\n data-dismiss="modal"\n [disabled]="!newDocumentProcessDefinition"\n >\n {{ \'Save\' | translate }}\n </button>\n </div>\n</valtimo-modal>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],b.ctorParameters=function(){return[{type:c.ProcessService},{type:a.DocumentService},{type:l.ToastrService}]},b.propDecorators={reloadProcessDocumentDefinitions:[{type:t.Output}],modal:[{type:t.ViewChild,args:["dossierConnectModal"]}]};var g=function(){function e(e,n,t){this.documentService=e,this.route=n,this.alertService=t,this.documentDefinitionName=null,this.documentDefinition=null,this.processDocumentDefinitions=[],this.documentDefinitionName=this.route.snapshot.paramMap.get("name")}return e.prototype.ngOnInit=function(){this.loadDocumentDefinition(),this.loadProcessDocumentDefinitions()},e.prototype.loadProcessDocumentDefinitions=function(){var e=this;this.documentService.findProcessDocumentDefinitions(this.documentDefinitionName).subscribe((function(n){e.processDocumentDefinitions=n}))},e.prototype.loadDocumentDefinition=function(){var e=this;this.documentService.getDocumentDefinition(this.documentDefinitionName).subscribe((function(n){e.documentDefinition=n}))},e.prototype.openDossierConnectModal=function(){this.dossierConnectModal.openModal(this.documentDefinition)},e.prototype.openDossierRemoveModal=function(){this.dossierRemoveModal.openModal(this.documentDefinition)},e.prototype.deleteProcessDocumentDefinition=function(e){var n=this;this.documentService.deleteProcessDocumentDefinition({documentDefinitionName:e.id.documentDefinitionId.name,processDefinitionKey:e.id.processDefinitionKey,canInitializeDocument:e.canInitializeDocument,startableByUser:e.startableByUser}).subscribe((function(){n.alertService.success("Successfully deleted process document definition"),n.loadProcessDocumentDefinitions()}),(function(){n.alertService.error("Failed to delete process document definition")}))},e.prototype.downloadDefinition=function(){var e=this.documentDefinition,n="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e.schema,null,2)),t=document.getElementById("downloadAnchorElement");t.setAttribute("href",n),t.setAttribute("download",e.id.name+"-v"+e.id.version+".json"),t.click()},e}();g.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-detail",template:'\x3c!--\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 --\x3e\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> \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"></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">Read-only</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>Connected processes</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="fa fa-trash"></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 class="custom-control custom-checkbox custom-control-inline pl-6 mr-5">\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">Init document?</span>\n </label>\n <label class="custom-control custom-checkbox custom-control-inline pl-6">\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 >{{ \'Startable by user\' | translate }}?</span\n >\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"></i> Connect process\n </button>\n </div>\n <valtimo-extension\n module="dossier-management"\n page="dossier"\n section="right-panel"\n ></valtimo-extension>\n </div>\n </div>\n </valtimo-widget>\n\n <valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)="loadProcessDocumentDefinitions()"\n ></valtimo-dossier-management-connect-modal>\n <valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n ></valtimo-dossier-management-remove-modal>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dossier-header{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}']}]}],g.ctorParameters=function(){return[{type:a.DocumentService},{type:d.ActivatedRoute},{type:s.AlertService}]},g.propDecorators={dossierConnectModal:[{type:t.ViewChild,args:["dossierConnectModal"]}],dossierRemoveModal:[{type:t.ViewChild,args:["dossierRemoveModal"]}]};var v=u;v.locale(localStorage.getItem("langKey")||"");var D=function(){function e(e,n){this.documentService=e,this.router=n,this.dossiers=[],this.pagination={collectionSize:0,page:1,size:10,maxPaginationItemSize:5},this.pageParam=0,this.dossierFields=[{key:"schema.title",label:"Title"},{key:"createdOn",label:"Created On"},{key:"readOnly",label:"Read-only"}],this.showModal$=new p.BehaviorSubject(!1)}return e.prototype.paginationClicked=function(e){this.pageParam=e-1,this.getDocumentDefinitions()},e.prototype.paginationSet=function(){this.getDocumentDefinitions()},e.prototype.redirectToDetails=function(e){this.router.navigate(["/dossier-management/dossier",e.id.name])},e.prototype.getDocumentDefinitions=function(){var e=this;this.documentService.queryDefinitions({page:this.pageParam,size:this.pagination.size}).subscribe((function(n){e.pagination.collectionSize=n.totalElements,e.dossiers=n.content,e.dossiers.map((function(e){e.createdOn=v(e.createdOn).format("DD MMM YYYY HH:mm")}))}))},e.prototype.showModal=function(){this.showModal$.next(!0)},e}();D.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-list",template:'\x3c!--\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 --\x3e\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> \n {{ \'Upload document definition\' | translate }}\n </button>\n </div>\n <div class="clearfix"></div>\n <valtimo-widget>\n <valtimo-list\n [items]="dossiers"\n [fields]="dossierFields"\n [header]="true"\n [viewMode]="true"\n [isSearchable]="true"\n [pagination]="pagination"\n paginationIdentifier="dossierManagementList"\n (paginationClicked)="paginationClicked($event)"\n (paginationSet)="paginationSet()"\n (rowClicked)="redirectToDetails($event)"\n >\n <div header>\n <h3 class="list-header-title">{{ \'Dossiers\' | translate }}</h3>\n <h5 class="list-header-description">{{ \'Overview of all Dossiers\' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]="showModal$"\n (definitionUploaded)="paginationSet()"\n></valtimo-dossier-management-upload>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],D.ctorParameters=function(){return[{type:a.DocumentService},{type:d.Router}]};var y={title:"Dossiers",roles:[r.ROLE_ADMIN]},S={title:"Dossier details",roles:[r.ROLE_ADMIN]},w=[{path:"dossier-management",component:D,canActivate:[m.AuthGuardService],data:y},{path:"dossier-management/dossier/:name",component:g,canActivate:[m.AuthGuardService],data:S}],x=function(){};x.decorators=[{type:t.NgModule,args:[{imports:[d.RouterModule.forRoot(w)],exports:[d.RouterModule],declarations:[]}]}];var I=function(){function e(e,n,i){this.documentService=e,this.translateService=n,this.menuService=i,this.definitionUploaded=new t.EventEmitter,this.clear$=new p.Subject,this.jsonString$=new p.BehaviorSubject(""),this.error$=new p.BehaviorSubject(""),this.disabled$=new p.BehaviorSubject(!1),this.file$=new p.BehaviorSubject(void 0)}return e.prototype.ngAfterViewInit=function(){this.openShowSubscription(),this.openFileSubscription()},e.prototype.ngOnDestroy=function(){this.showSubscription.unsubscribe(),this.fileSubscription.unsubscribe(),this.closeErrorSubscription()},e.prototype.setFile=function(e){this.clearError(),this.file$.next(e)},e.prototype.uploadDefinition=function(){var e=this;this.disable(),this.jsonString$.pipe(h.switchMap((function(n){return e.documentService.createDocumentDefinition(new a.DocumentDefinitionCreateRequest(n)).pipe(h.tap((function(){e.closeErrorSubscription(),e.clearError(),e.enable(),e.hideModal(),e.menuService.reload(),e.definitionUploaded.emit()}),(function(){e.openErrorSubscription("dropzone.error.invalidDocDef"),e.enable()})))})),h.take(1)).subscribe()},e.prototype.openErrorSubscription=function(e){var n=this;this.closeErrorSubscription(),this.errorSubscription=this.translateService.stream(e).subscribe((function(e){n.error$.next(e)}))},e.prototype.closeErrorSubscription=function(){this.errorSubscription&&this.errorSubscription.unsubscribe()},e.prototype.clearError=function(){this.error$.next("")},e.prototype.openFileSubscription=function(){var e=this;this.fileSubscription=this.file$.subscribe((function(n){if(n){var t=new FileReader;t.onloadend=function(){var n=t.result.toString();e.stringIsValidJson(n)&&e.jsonString$.next(n)},t.readAsText(n)}else e.clearJsonString()}))},e.prototype.openShowSubscription=function(){var e=this;this.showSubscription=this.show$.subscribe((function(n){n?e.showModal():e.hideModal(),e.clearJsonString(),e.clearError(),e.clearDropzone()}))},e.prototype.clearJsonString=function(){this.jsonString$.next("")},e.prototype.clearDropzone=function(){this.clear$.next()},e.prototype.showModal=function(){this.modal.show()},e.prototype.hideModal=function(){this.modal.hide()},e.prototype.stringIsValidJson=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},e.prototype.disable=function(){this.disabled$.next(!0)},e.prototype.enable=function(){this.disabled$.next(!1)},e}();I.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-upload",template:'<valtimo-modal\n #uploadDefinitionModal\n [title]="\'Upload document definition\' | translate"\n showFooter="true"\n>\n <div class="mt-2" body>\n <valtimo-dropzone\n [clear$]="clear$"\n (fileSelected)="setFile($event)"\n [disabled]="disabled$ | async"\n [subtitle]="\'dropzone.jsonDocDef\' | translate"\n [externalError$]="error$"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf="(jsonString$ | async) && !(error$ | async); else pleaseSelect">\n <button [disabled]="disabled$ | async" class="btn btn-primary" (click)="uploadDefinition()">\n {{ \'Upload\' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class="btn btn-primary" [disabled]="true">\n {{ \'Select a document definition\' | translate }}\n </button>\n</ng-template>\n',styles:[""]}]}],I.ctorParameters=function(){return[{type:a.DocumentService},{type:o.TranslateService},{type:s.MenuService}]},I.propDecorators={show$:[{type:t.Input}],definitionUploaded:[{type:t.Output}],modal:[{type:t.ViewChild,args:["uploadDefinitionModal"]}]};var L=function(){function e(e,n,t,i,o){this.documentService=e,this.toasterService=n,this.router=t,this.translateService=i,this.menuService=o,this.documentDefinition=null,this.errors=[]}return e.prototype.openModal=function(e){this.documentDefinition=e,this.modal.show()},e.prototype.removeDocumentDefinition=function(){var e=this;this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe((function(){e.menuService.reload(),e.router.navigate(["/dossier-management"]),e.toasterService.success(e.translateService.instant("remove-document-definition-success"))}),(function(n){e.errors=n.errors}))},e}();L.decorators=[{type:t.Component,args:[{selector:"valtimo-dossier-management-remove-modal",template:'\x3c!--\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 --\x3e\n\n<valtimo-modal\n #documentDefinitionRemoveModal\n elementId="documentDefinitionRemoveModal"\n [title]="documentDefinition ? documentDefinition.schema.title : \'Document definition\'"\n subtitle="{{ \'Remove document definition\' | translate }}"\n showFooter="true"\n>\n <div body *ngIf="documentDefinition">\n <div class="alert alert-contrast alert-danger mt-2" role="alert">\n <div class="icon"><span class="mdi mdi-alert-triangle"></span></div>\n <div\n class="message"\n [innerHTML]="\'remove-document-definition-confirmation\' | translate"\n ></div>\n </div>\n <div *ngIf="errors.length > 0" class="alert alert-danger pt-5 pb-5 mb-2">\n <ol>\n <li *ngFor="let error of errors">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)="removeDocumentDefinition()" class="btn btn-primary" data-dismiss="modal">\n {{ \'remove-document-definition-confirmation-button\' | translate }}\n </button>\n </div>\n</valtimo-modal>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],L.ctorParameters=function(){return[{type:a.DocumentService},{type:l.ToastrService},{type:d.Router},{type:o.TranslateService},{type:s.MenuService}]},L.propDecorators={modal:[{type:t.ViewChild,args:["documentDefinitionRemoveModal"]}]};var M=function(){};M.decorators=[{type:t.NgModule,args:[{declarations:[D,g,b,L,I],imports:[n.CommonModule,s.WidgetModule,s.DropzoneModule,s.ListModule,x,i.FormsModule,o.TranslateModule,s.ModalModule,r.ConfigModule,f.NgbTooltipModule],exports:[],entryComponents:[r.ExtensionComponent]}]}],e.DossierManagementListComponent=D,e.DossierManagementModule=M,e.ɵa=g,e.ɵb=b,e.ɵc=L,e.ɵd=I,e.ɵe=x,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=valtimo-dossier-management.umd.min.js.map
|