@valtimo/dossier 4.15.2-next-main.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/bundles/valtimo-dossier.umd.js +1592 -0
  2. package/bundles/valtimo-dossier.umd.js.map +1 -0
  3. package/bundles/valtimo-dossier.umd.min.js +16 -0
  4. package/bundles/valtimo-dossier.umd.min.js.map +1 -0
  5. package/esm2015/lib/dossier-detail/dossier-detail.component.js +87 -0
  6. package/esm2015/lib/dossier-detail/tab/audit/audit.component.js +64 -0
  7. package/esm2015/lib/dossier-detail/tab/documents/documents.component.js +101 -0
  8. package/esm2015/lib/dossier-detail/tab/progress/progress.component.js +47 -0
  9. package/esm2015/lib/dossier-detail/tab/summary/summary.component.js +124 -0
  10. package/esm2015/lib/dossier-detail-tab-enum.js +23 -0
  11. package/esm2015/lib/dossier-list/dossier-list.component.js +212 -0
  12. package/esm2015/lib/dossier-process-start-modal/dossier-process-start-modal.component.js +122 -0
  13. package/esm2015/lib/dossier-routing.module.js +57 -0
  14. package/esm2015/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.js +117 -0
  15. package/esm2015/lib/dossier-update/dossier-update.component.js +121 -0
  16. package/esm2015/lib/dossier.config.js +29 -0
  17. package/esm2015/lib/dossier.module.js +117 -0
  18. package/esm2015/lib/dossier.service.js +50 -0
  19. package/esm2015/lib/tab.service.js +44 -0
  20. package/esm2015/public_api.js +30 -0
  21. package/esm2015/valtimo-dossier.js +9 -0
  22. package/fesm2015/valtimo-dossier.js +1243 -0
  23. package/fesm2015/valtimo-dossier.js.map +1 -0
  24. package/lib/dossier-detail/dossier-detail.component.d.ts +34 -0
  25. package/lib/dossier-detail/tab/audit/audit.component.d.ts +15 -0
  26. package/lib/dossier-detail/tab/documents/documents.component.d.ts +38 -0
  27. package/lib/dossier-detail/tab/progress/progress.component.d.ts +14 -0
  28. package/lib/dossier-detail/tab/summary/summary.component.d.ts +37 -0
  29. package/lib/dossier-detail-tab-enum.d.ts +6 -0
  30. package/lib/dossier-list/dossier-list.component.d.ts +65 -0
  31. package/lib/dossier-process-start-modal/dossier-process-start-modal.component.d.ts +37 -0
  32. package/lib/dossier-routing.module.d.ts +2 -0
  33. package/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.d.ts +35 -0
  34. package/lib/dossier-update/dossier-update.component.d.ts +33 -0
  35. package/lib/dossier.config.d.ts +3 -0
  36. package/lib/dossier.module.d.ts +5 -0
  37. package/lib/dossier.service.d.ts +10 -0
  38. package/lib/tab.service.d.ts +7 -0
  39. package/package.json +27 -0
  40. package/public_api.d.ts +11 -0
  41. package/valtimo-dossier.d.ts +8 -0
  42. package/valtimo-dossier.metadata.json +1 -0
@@ -0,0 +1,1243 @@
1
+ import { __rest } from 'tslib';
2
+ import { Component, ViewEncapsulation, ViewChild, ɵɵdefineInjectable, ɵɵinject, Injectable, ElementRef, Renderer2, InjectionToken, Inject, EventEmitter, Output, ComponentFactoryResolver, ViewContainerRef, NgModule, ANALYZE_FOR_ENTRY_COMPONENTS } from '@angular/core';
3
+ import { ActivatedRoute, Router, NavigationEnd, RouterModule } from '@angular/router';
4
+ import { TranslateService, TranslateModule, TranslateLoader } from '@ngx-translate/core';
5
+ import { DocumentService, DocumentSearchRequestImpl } from '@valtimo/document';
6
+ import * as moment_ from 'moment';
7
+ import { combineLatest, BehaviorSubject, noop } from 'rxjs';
8
+ import { FormioOptionsImpl, TimelineItemImpl, TabImpl, TabLoaderImpl, ROLE_USER, HttpLoaderFactory } from '@valtimo/contract';
9
+ import { ProcessService, ProcessModule } from '@valtimo/process';
10
+ import { ListModule, WidgetModule, BpmnJsDiagramModule, TimelineModule, CamundaFormModule, FilterSidebarModule, DataListModule, FormIoModule, ModalModule, SpinnerModule, UploaderModule, DropzoneModule } from '@valtimo/components';
11
+ import { FormLinkService } from '@valtimo/form-link';
12
+ import { NGXLogger } from 'ngx-logger';
13
+ import { UserProviderService, AuthGuardService } from '@valtimo/security';
14
+ import { ConfigService } from '@valtimo/config';
15
+ import { Location, CommonModule } from '@angular/common';
16
+ import { TaskService, TaskModule } from '@valtimo/task';
17
+ import { FormService, FormModule } from '@valtimo/form';
18
+ import { NgxSpinnerService } from 'ngx-spinner';
19
+ import { ToastrService } from 'ngx-toastr';
20
+ import { UploadProviderService, DownloadService } from '@valtimo/resource';
21
+ import { switchMap } from 'rxjs/operators';
22
+ import { NgbButtonsModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
23
+ import { FormsModule } from '@angular/forms';
24
+ import { HttpClient } from '@angular/common/http';
25
+
26
+ /*
27
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
28
+ *
29
+ * Licensed under EUPL, Version 1.2 (the "License");
30
+ * you may not use this file except in compliance with the License.
31
+ * You may obtain a copy of the License at
32
+ *
33
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
34
+ *
35
+ * Unless required by applicable law or agreed to in writing, software
36
+ * distributed under the License is distributed on an "AS IS" basis,
37
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38
+ * See the License for the specific language governing permissions and
39
+ * limitations under the License.
40
+ */
41
+ var DefaultTabs;
42
+ (function (DefaultTabs) {
43
+ DefaultTabs["summary"] = "summary";
44
+ DefaultTabs["progress"] = "progress";
45
+ DefaultTabs["audit"] = "audit";
46
+ DefaultTabs["documents"] = "documents";
47
+ })(DefaultTabs || (DefaultTabs = {}));
48
+
49
+ /*
50
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
51
+ *
52
+ * Licensed under EUPL, Version 1.2 (the "License");
53
+ * you may not use this file except in compliance with the License.
54
+ * You may obtain a copy of the License at
55
+ *
56
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
57
+ *
58
+ * Unless required by applicable law or agreed to in writing, software
59
+ * distributed under the License is distributed on an "AS IS" basis,
60
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
61
+ * See the License for the specific language governing permissions and
62
+ * limitations under the License.
63
+ */
64
+ class DossierProcessStartModalComponent {
65
+ constructor(route, router, processService, documentService, formLinkService, userProviderService, logger) {
66
+ this.route = route;
67
+ this.router = router;
68
+ this.processService = processService;
69
+ this.documentService = documentService;
70
+ this.formLinkService = formLinkService;
71
+ this.userProviderService = userProviderService;
72
+ this.logger = logger;
73
+ }
74
+ ngOnInit() {
75
+ this.isUserAdmin();
76
+ }
77
+ loadFormDefinition() {
78
+ this.formDefinition = null;
79
+ this.formLinkService.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
80
+ .subscribe(formDefinition => {
81
+ this.formAssociation = formDefinition.formAssociation;
82
+ const className = this.formAssociation.formLink.className.split('.');
83
+ const linkType = className[className.length - 1];
84
+ switch (linkType) {
85
+ case 'BpmnElementFormIdLink':
86
+ this.formDefinition = formDefinition;
87
+ this.modal.show();
88
+ break;
89
+ case 'BpmnElementUrlLink':
90
+ const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
91
+ window.open(url, '_blank');
92
+ break;
93
+ case 'BpmnElementAngularStateUrlLink':
94
+ this.router.navigate([formDefinition.formAssociation.formLink.url]);
95
+ break;
96
+ default:
97
+ this.logger.fatal('Unsupported class name');
98
+ }
99
+ }, errors => {
100
+ this.modal.show();
101
+ });
102
+ }
103
+ gotoFormLinkScreen() {
104
+ this.modal.hide();
105
+ this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
106
+ }
107
+ get modalTitle() {
108
+ return `Start - ${this.processName}`;
109
+ }
110
+ openModal(processDocumentDefinition) {
111
+ this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
112
+ this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
113
+ this.processName = processDocumentDefinition.processName;
114
+ this.options = new FormioOptionsImpl();
115
+ this.options.disableAlerts = true;
116
+ const formioBeforeSubmit = function (submission, callback) {
117
+ callback(null, submission);
118
+ };
119
+ this.options.setHooks(formioBeforeSubmit);
120
+ this.loadFormDefinition();
121
+ }
122
+ onSubmit(submission) {
123
+ this.formioSubmission = submission;
124
+ this.formLinkService.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data).subscribe((formSubmissionResult) => {
125
+ this.modal.hide();
126
+ this.router.navigate(['dossiers', this.documentDefinitionName, 'document', formSubmissionResult.documentId, 'summary']);
127
+ }, errors => {
128
+ this.form.showErrors(errors);
129
+ });
130
+ }
131
+ isUserAdmin() {
132
+ this.userProviderService.getUserSubject().subscribe((userIdentity) => {
133
+ this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
134
+ }, error => {
135
+ this.logger.error('Failed to retrieve user identity', error);
136
+ this.isAdmin = false;
137
+ });
138
+ }
139
+ }
140
+ DossierProcessStartModalComponent.decorators = [
141
+ { type: Component, args: [{
142
+ selector: 'valtimo-dossier-process-start-modal',
143
+ 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 #processStartModal elementId=\"processStartModal\" [title]=\"modalTitle\">\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io #form [form]=\"formDefinition\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\">\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && isAdmin\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\" [translate]=\"'formManagement.noFormDefinitionFoundAdmin'\">\n </div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button class=\"btn btn-secondary btn-space\" type=\"button\"\n (click)=\"gotoFormLinkScreen();\"\n id=\"form-link-button\">{{'formManagement.gotoFormLinksButton' | translate}}\n </button>\n </div>\n </div>\n <div body *ngIf=\"!formDefinition && !isAdmin\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\" [translate]=\"'formManagement.noFormDefinitionFoundUser'\">\n </div>\n </div>\n</valtimo-modal>\n",
144
+ encapsulation: ViewEncapsulation.None,
145
+ 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 */#processStartModal .formio-component-submit{text-align:right}"]
146
+ },] }
147
+ ];
148
+ DossierProcessStartModalComponent.ctorParameters = () => [
149
+ { type: ActivatedRoute },
150
+ { type: Router },
151
+ { type: ProcessService },
152
+ { type: DocumentService },
153
+ { type: FormLinkService },
154
+ { type: UserProviderService },
155
+ { type: NGXLogger }
156
+ ];
157
+ DossierProcessStartModalComponent.propDecorators = {
158
+ form: [{ type: ViewChild, args: ['form', { static: false },] }],
159
+ modal: [{ type: ViewChild, args: ['processStartModal', { static: false },] }]
160
+ };
161
+
162
+ /*
163
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
164
+ *
165
+ * Licensed under EUPL, Version 1.2 (the "License");
166
+ * you may not use this file except in compliance with the License.
167
+ * You may obtain a copy of the License at
168
+ *
169
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
170
+ *
171
+ * Unless required by applicable law or agreed to in writing, software
172
+ * distributed under the License is distributed on an "AS IS" basis,
173
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
174
+ * See the License for the specific language governing permissions and
175
+ * limitations under the License.
176
+ */
177
+ class DossierService {
178
+ constructor(configService) {
179
+ this.configService = configService;
180
+ this.definitions = configService.config.definitions;
181
+ }
182
+ getImplementationEnvironmentDefinitions(name) {
183
+ return this.definitions.dossiers.find(definition => definition.name === name);
184
+ }
185
+ getDefinitionColumns(definitionNameId) {
186
+ const config = this.configService.config;
187
+ const customDefinitionTable = config.customDefinitionTables[definitionNameId];
188
+ return customDefinitionTable || config.defaultDefinitionTable;
189
+ }
190
+ getInitialSortState(columns) {
191
+ const defaultColumn = columns.find(column => column.default);
192
+ return {
193
+ isSorting: false,
194
+ state: { name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName, direction: 'DESC' }
195
+ };
196
+ }
197
+ }
198
+ DossierService.ɵprov = ɵɵdefineInjectable({ factory: function DossierService_Factory() { return new DossierService(ɵɵinject(ConfigService)); }, token: DossierService, providedIn: "root" });
199
+ DossierService.decorators = [
200
+ { type: Injectable, args: [{
201
+ providedIn: 'root'
202
+ },] }
203
+ ];
204
+ DossierService.ctorParameters = () => [
205
+ { type: ConfigService }
206
+ ];
207
+
208
+ /*
209
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
210
+ *
211
+ * Licensed under EUPL, Version 1.2 (the "License");
212
+ * you may not use this file except in compliance with the License.
213
+ * You may obtain a copy of the License at
214
+ *
215
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
216
+ *
217
+ * Unless required by applicable law or agreed to in writing, software
218
+ * distributed under the License is distributed on an "AS IS" basis,
219
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220
+ * See the License for the specific language governing permissions and
221
+ * limitations under the License.
222
+ */
223
+ const moment = moment_;
224
+ moment.locale(localStorage.getItem('langKey') || '');
225
+ class DossierListComponent {
226
+ constructor(route, router, documentService, translateService, dossierService) {
227
+ this.route = route;
228
+ this.router = router;
229
+ this.documentService = documentService;
230
+ this.translateService = translateService;
231
+ this.dossierService = dossierService;
232
+ this.documentDefinitionName = '';
233
+ this.showCreateDocument = false;
234
+ this.items = [];
235
+ this.fields = [];
236
+ this.processDefinitionListFields = [];
237
+ this.processDocumentDefinitions = [];
238
+ this.pagination = {
239
+ collectionSize: 0,
240
+ page: 1,
241
+ size: 10,
242
+ maxPaginationItemSize: 5,
243
+ sort: undefined
244
+ };
245
+ this.selectedProcessDocumentDefinition = null;
246
+ this.modalListenerAdded = false;
247
+ }
248
+ ngOnInit() {
249
+ this.doInit();
250
+ this.routeEvent(this.router);
251
+ this.modalListenerAdded = false;
252
+ }
253
+ ngOnDestroy() {
254
+ this.routerSubscription.unsubscribe();
255
+ this.translationSubscription.unsubscribe();
256
+ }
257
+ paginationSet() {
258
+ this.getData();
259
+ }
260
+ routeEvent(router) {
261
+ this.routerSubscription = router.events.subscribe(e => {
262
+ if (e instanceof NavigationEnd) {
263
+ this.doInit();
264
+ this.getData();
265
+ }
266
+ });
267
+ }
268
+ doInit() {
269
+ const documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName') || '';
270
+ const columns = this.dossierService.getDefinitionColumns(documentDefinitionName);
271
+ this.documentDefinitionName = documentDefinitionName;
272
+ this.initialSortState = this.dossierService.getInitialSortState(columns);
273
+ this.openTranslationSubscription(columns);
274
+ }
275
+ openTranslationSubscription(columns) {
276
+ this.translationSubscription = combineLatest(columns.map(column => this.translateService.stream(`fieldLabels.${column.translationKey}`))).subscribe(labels => {
277
+ this.fields = columns.map((column, index) => (Object.assign({ key: column.propertyName, label: labels[index], sortable: column.sortable }, (column.viewType && { viewType: column.viewType }))));
278
+ });
279
+ }
280
+ getData() {
281
+ this.findDocumentDefinition(this.documentDefinitionName);
282
+ if (this.hasCachedSearchRequest()) {
283
+ const documentSearchRequest = this.getCachedSearch();
284
+ this.globalSearchFilter = documentSearchRequest.globalSearchFilter;
285
+ this.sequence = documentSearchRequest.sequence;
286
+ this.createdBy = documentSearchRequest.createdBy;
287
+ this.findDocuments(documentSearchRequest);
288
+ }
289
+ else {
290
+ this.doSearch();
291
+ }
292
+ this.getAllAssociatedProcessDefinitions();
293
+ }
294
+ doSearch() {
295
+ const documentSearchRequest = this.buildDocumentSearchRequest();
296
+ this.findDocuments(documentSearchRequest);
297
+ }
298
+ findDocuments(documentSearchRequest) {
299
+ return this.documentService.getDocuments(documentSearchRequest).subscribe(documents => {
300
+ this.documents = documents;
301
+ this.transformDocuments(this.documents.content);
302
+ this.pagination.collectionSize = this.documents.totalElements;
303
+ this.storeSearch(documentSearchRequest);
304
+ });
305
+ }
306
+ getAllAssociatedProcessDefinitions() {
307
+ this.documentService
308
+ .findProcessDocumentDefinitions(this.documentDefinitionName)
309
+ .subscribe(processDocumentDefinitions => {
310
+ this.processDocumentDefinitions = processDocumentDefinitions.filter(processDocumentDefinition => processDocumentDefinition.canInitializeDocument);
311
+ this.processDefinitionListFields = [
312
+ {
313
+ key: 'processName',
314
+ label: 'Proces'
315
+ }
316
+ ];
317
+ });
318
+ }
319
+ getCachedSearch() {
320
+ const json = JSON.parse(this.getCachedDocumentSearchRequest());
321
+ return new DocumentSearchRequestImpl(json.definitionName, this.pagination.page - 1, this.pagination.size, json.sequence, json.createdBy, json.globalSearchFilter, json.sort);
322
+ }
323
+ buildDocumentSearchRequest() {
324
+ return new DocumentSearchRequestImpl(this.documentDefinitionName, this.pagination.page - 1, this.pagination.size, this.sequence, this.createdBy, this.globalSearchFilter, this.pagination.sort && this.pagination.sort.isSorting ? this.pagination.sort : this.initialSortState);
325
+ }
326
+ storeSearch(documentSearchRequest) {
327
+ localStorage.setItem(this.getCachedKey(), JSON.stringify(documentSearchRequest));
328
+ }
329
+ getCachedDocumentSearchRequest() {
330
+ return localStorage.getItem(this.getCachedKey()) || '';
331
+ }
332
+ hasCachedSearchRequest() {
333
+ return localStorage.getItem(this.getCachedKey()) !== null;
334
+ }
335
+ getCachedKey() {
336
+ return 'list-search-' + this.documentDefinitionName;
337
+ }
338
+ rowClick(document) {
339
+ this.router.navigate([`/dossiers/${this.documentDefinitionName}/document/${document.id}/${DefaultTabs.summary}`]);
340
+ }
341
+ startDossier() {
342
+ if (this.processDocumentDefinitions.length > 1) {
343
+ $('#startProcess').modal('show');
344
+ }
345
+ else {
346
+ this.selectedProcessDocumentDefinition = this.processDocumentDefinitions[0];
347
+ this.showStartProcessModal();
348
+ }
349
+ }
350
+ showStartProcessModal() {
351
+ if (this.selectedProcessDocumentDefinition !== null) {
352
+ this.processStart.openModal(this.selectedProcessDocumentDefinition);
353
+ this.selectedProcessDocumentDefinition = null;
354
+ }
355
+ }
356
+ selectProcess(processDocumentDefinition) {
357
+ const modal = $('#startProcess');
358
+ if (!this.modalListenerAdded) {
359
+ modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));
360
+ this.modalListenerAdded = true;
361
+ }
362
+ this.selectedProcessDocumentDefinition = processDocumentDefinition;
363
+ modal.modal('hide');
364
+ }
365
+ findDocumentDefinition(documentDefinitionName) {
366
+ this.documentService.getDocumentDefinition(documentDefinitionName).subscribe(definition => {
367
+ this.schema = definition.schema;
368
+ });
369
+ }
370
+ transformDocuments(documentsContent) {
371
+ this.items = documentsContent.map(document => {
372
+ const { content } = document, others = __rest(document, ["content"]);
373
+ return Object.assign(Object.assign({}, content), others);
374
+ });
375
+ }
376
+ paginationClicked(page) {
377
+ this.pagination.page = page;
378
+ this.doSearch();
379
+ }
380
+ sortChanged(sortState) {
381
+ this.pagination.sort = sortState;
382
+ this.doSearch();
383
+ }
384
+ getInitialSortState() {
385
+ if (this.hasCachedSearchRequest()) {
386
+ const cachedRequest = JSON.parse(this.getCachedDocumentSearchRequest());
387
+ return cachedRequest.sort ? cachedRequest.sort : this.initialSortState;
388
+ }
389
+ return this.initialSortState;
390
+ }
391
+ }
392
+ DossierListComponent.decorators = [
393
+ { type: Component, args: [{
394
+ selector: 'valtimo-dossier-list',
395
+ 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<ng-container *ngTemplateOutlet=\"sidebar\"></ng-container>\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div>\n <div class=\"text-right mt-m3px mb-3\">\n <button\n type=\"button\"\n class=\"btn btn-space btn-primary mr-0\"\n (click)=\"startDossier()\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n placement=\"bottom\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n >\n {{ 'Start Dossier' | translate }}\n </button>\n </div>\n\n <div\n class=\"modal fade\"\n id=\"startProcess\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"startProcessLabel\"\n aria-hidden=\"true\"\n >\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"startProcessLabel\">{{ 'dashboard.startProcess.title' | translate }}</h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"table-responsive\">\n <table class=\"table m-0\">\n <tr\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n (click)=\"selectProcess(processDocumentDefinition)\"\n style=\"cursor: pointer\"\n >\n <td>{{ processDocumentDefinition.processName }}</td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">\n {{ 'cta.close' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"items\"\n [fields]=\"fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"dossierList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n [initialSortState]=\"getInitialSortState()\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ schema?.title }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{ documents?.content.length || 0 }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n </div>\n <valtimo-dossier-process-start-modal #processStartModal></valtimo-dossier-process-start-modal>\n</div>\n\n<ng-template #sidebar>\n <valtimo-filter-sidebar>\n <h4 class=\"title\">Search</h4>\n <div class=\"mb-4\">\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'dossier.forms.globalSearchPlaceHolder' | translate }}\"\n [(ngModel)]=\"globalSearchFilter\"\n (blur)=\"doSearch()\"\n (keyup.enter)=\"doSearch()\"\n />\n </div>\n\n <div class=\"mb-4\">\n <input\n type=\"number\"\n class=\"form-control\"\n placeholder=\"{{ 'dossier.forms.referenceNumberPlaceHolder' | translate }}\"\n [(ngModel)]=\"sequence\"\n (blur)=\"doSearch()\"\n (keyup.enter)=\"doSearch()\"\n />\n </div>\n </valtimo-filter-sidebar>\n</ng-template>\n",
396
+ styles: [""]
397
+ },] }
398
+ ];
399
+ DossierListComponent.ctorParameters = () => [
400
+ { type: ActivatedRoute },
401
+ { type: Router },
402
+ { type: DocumentService },
403
+ { type: TranslateService },
404
+ { type: DossierService }
405
+ ];
406
+ DossierListComponent.propDecorators = {
407
+ processStart: [{ type: ViewChild, args: ['processStartModal',] }]
408
+ };
409
+
410
+ /*
411
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
412
+ *
413
+ * Licensed under EUPL, Version 1.2 (the "License");
414
+ * you may not use this file except in compliance with the License.
415
+ * You may obtain a copy of the License at
416
+ *
417
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
418
+ *
419
+ * Unless required by applicable law or agreed to in writing, software
420
+ * distributed under the License is distributed on an "AS IS" basis,
421
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
422
+ * See the License for the specific language governing permissions and
423
+ * limitations under the License.
424
+ */
425
+ const moment$1 = moment_;
426
+ moment$1.locale(localStorage.getItem('langKey') || '');
427
+ moment$1.defaultFormat = 'DD MMM YYYY HH:mm';
428
+ class DossierDetailTabSummaryComponent {
429
+ constructor(router, documentService, taskService, processService, el, renderer, route, formService, userProviderService) {
430
+ this.router = router;
431
+ this.documentService = documentService;
432
+ this.taskService = taskService;
433
+ this.processService = processService;
434
+ this.el = el;
435
+ this.renderer = renderer;
436
+ this.route = route;
437
+ this.formService = formService;
438
+ this.userProviderService = userProviderService;
439
+ this.processDocumentInstances = [];
440
+ this.tasks = [];
441
+ this.formDefinition = null;
442
+ this.roles = [];
443
+ this.snapshot = this.route.snapshot.paramMap;
444
+ this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
445
+ this.documentId = this.snapshot.get('documentId') || '';
446
+ this.options = new FormioOptionsImpl();
447
+ this.options.disableAlerts = true;
448
+ }
449
+ ngOnInit() {
450
+ this.moment = moment$1;
451
+ this.init();
452
+ }
453
+ init() {
454
+ this.documentService.getDocument(this.documentId).subscribe(document => {
455
+ this.document = document;
456
+ });
457
+ this.formService
458
+ .getFormDefinitionByNamePreFilled(`${this.documentDefinitionName}.summary`, this.documentId)
459
+ .subscribe(formDefinition => {
460
+ this.formDefinition = formDefinition;
461
+ });
462
+ this.userProviderService.getUserSubject().subscribe(user => {
463
+ this.roles = user.roles;
464
+ this.tasks = [];
465
+ this.loadProcessDocumentInstances(this.documentId);
466
+ });
467
+ }
468
+ loadProcessDocumentInstances(documentId) {
469
+ this.documentService.findProcessDocumentInstances(documentId).subscribe(processDocumentInstances => {
470
+ this.processDocumentInstances = processDocumentInstances;
471
+ this.processDocumentInstances.forEach(instance => {
472
+ this.loadProcessInstanceTasks(instance.id.processInstanceId);
473
+ });
474
+ });
475
+ }
476
+ loadProcessInstanceTasks(processInstanceId) {
477
+ this.processService.getProcessInstanceTasks(processInstanceId).subscribe(tasks => {
478
+ tasks.forEach(task => {
479
+ task.createdUnix = this.moment(task.created).unix();
480
+ task.created = this.moment(task.created).format('DD MMM YYYY HH:mm');
481
+ task.isLocked = () => {
482
+ let locked = true;
483
+ for (const link of task.identityLinks) {
484
+ if (link.type === 'candidate' && link.groupId) {
485
+ if (this.roles.includes(link.groupId)) {
486
+ locked = false;
487
+ break;
488
+ }
489
+ }
490
+ }
491
+ return locked;
492
+ };
493
+ });
494
+ this.tasks = this.tasks.concat(tasks);
495
+ this.tasks.sort((t1, t2) => t2.createdUnix - t1.createdUnix);
496
+ });
497
+ }
498
+ rowTaskClick(task) {
499
+ this.taskDetail.openTaskDetails(task);
500
+ }
501
+ }
502
+ DossierDetailTabSummaryComponent.decorators = [
503
+ { type: Component, args: [{
504
+ selector: 'valtimo-dossier-detail-tab-summary',
505
+ 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=\"container-fluid\">\n <div class=\"row py-4\">\n <div class=\"col-sm-12 col-md-8 col-xl-9\">\n <div *ngIf=\"document\">\n <div *ngIf=\"formDefinition\" class=\"summaryForm\">\n <div class=\"mb-4\">\n <valtimo-form-io [form]=\"formDefinition\" [options]=\"options\"></valtimo-form-io>\n </div>\n </div>\n </div>\n </div>\n\n <!--Current user tasks right side-->\n <div class=\"col-sm-12 col-md-4 col-xl-3\">\n <h4 class=\"user-tasks-title\">User tasks</h4>\n <ng-container *ngIf=\"!tasks.length\">\n <valtimo-widget>\n <div class=\"p-3\">\n <img class=\"float-left\" src=\"assets/audit-2.png\" height=\"25\" />\n <span class=\"float-right\">{{ 'summary.userTasksDoneState' | translate }}</span>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </ng-container>\n <ng-container *ngFor=\"let task of tasks\">\n <valtimo-widget>\n <div class=\"p-3 clickable hoverable\" (click)=\"rowTaskClick(task)\" *ngIf=\"!task.isLocked()\">\n <span class=\"float-right badge badge-pill badge-primary\">Open</span>\n <strong>{{ task.name }}</strong>\n <div>Created {{ task.created }}</div>\n </div>\n <div class=\"p-3 hoverable\" *ngIf=\"task.isLocked()\">\n <span class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'summary.taskLocked' | translate }}\">\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n <strong>{{ task.name }}</strong>\n <div>Created {{ task.created }}</div>\n </div>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"init()\"\n (assignmentOfTaskChanged)=\"init()\"\n ></valtimo-task-detail-modal>\n </div>\n </div>\n</div>\n",
506
+ encapsulation: ViewEncapsulation.None,
507
+ 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 */.hoverable:hover{background-color:#eee}.summaryForm .formio-component{margin-bottom:0!important}.summaryForm .formio-component div[ref=element] .form-control{background-color:#fff;border:0;font-size:13px;height:24px!important;margin:0;padding:0!important}.summaryForm .formio-field div[ref=element] .form-control{font-weight:400}.summaryForm .formio-value div[ref=element] .form-control{font-weight:700}.user-tasks-title{color:#000;font-weight:400;height:20px;margin-bottom:12px;margin-top:0}"]
508
+ },] }
509
+ ];
510
+ DossierDetailTabSummaryComponent.ctorParameters = () => [
511
+ { type: Router },
512
+ { type: DocumentService },
513
+ { type: TaskService },
514
+ { type: ProcessService },
515
+ { type: ElementRef },
516
+ { type: Renderer2 },
517
+ { type: ActivatedRoute },
518
+ { type: FormService },
519
+ { type: UserProviderService }
520
+ ];
521
+ DossierDetailTabSummaryComponent.propDecorators = {
522
+ taskDetail: [{ type: ViewChild, args: ['taskDetail',] }]
523
+ };
524
+
525
+ /*
526
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
527
+ *
528
+ * Licensed under EUPL, Version 1.2 (the "License");
529
+ * you may not use this file except in compliance with the License.
530
+ * You may obtain a copy of the License at
531
+ *
532
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
533
+ *
534
+ * Unless required by applicable law or agreed to in writing, software
535
+ * distributed under the License is distributed on an "AS IS" basis,
536
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
537
+ * See the License for the specific language governing permissions and
538
+ * limitations under the License.
539
+ */
540
+ class DossierDetailTabProgressComponent {
541
+ constructor(route, documentService) {
542
+ this.route = route;
543
+ this.documentService = documentService;
544
+ const snapshot = this.route.snapshot.paramMap;
545
+ this.documentId = snapshot.get('documentId') || '';
546
+ }
547
+ ngOnInit() {
548
+ this.documentService.findProcessDocumentInstances(this.documentId).subscribe(processDocumentInstances => {
549
+ this.processDocumentInstances = processDocumentInstances;
550
+ this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;
551
+ });
552
+ }
553
+ loadProcessInstance(processInstanceId) {
554
+ this.selectedProcessInstanceId = processInstanceId;
555
+ }
556
+ }
557
+ DossierDetailTabProgressComponent.decorators = [
558
+ { type: Component, args: [{
559
+ selector: 'valtimo-dossier-detail-tab-progress',
560
+ 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=\"full-height-tab-content\" *ngIf=\"processDocumentInstances\">\n <div class=\"col-3\">\n <label><strong>Process</strong></label><br/>\n <select class=\"form-control\" (change)=\"loadProcessInstance($event.target.value)\">\n <option *ngFor=\"let processDocumentInstance of processDocumentInstances\"\n [value]=\"processDocumentInstance.id.processInstanceId\"\n [selected]=\"selectedProcessInstanceId === processDocumentInstance.id.processInstanceId\">\n {{ processDocumentInstance.processName }}\n </option>\n </select>\n </div>\n <valtimo-process-diagram [processInstanceId]=\"selectedProcessInstanceId\"></valtimo-process-diagram>\n</div>\n",
561
+ styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}"]
562
+ },] }
563
+ ];
564
+ DossierDetailTabProgressComponent.ctorParameters = () => [
565
+ { type: ActivatedRoute },
566
+ { type: DocumentService }
567
+ ];
568
+
569
+ /*
570
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
571
+ *
572
+ * Licensed under EUPL, Version 1.2 (the "License");
573
+ * you may not use this file except in compliance with the License.
574
+ * You may obtain a copy of the License at
575
+ *
576
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
577
+ *
578
+ * Unless required by applicable law or agreed to in writing, software
579
+ * distributed under the License is distributed on an "AS IS" basis,
580
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
581
+ * See the License for the specific language governing permissions and
582
+ * limitations under the License.
583
+ */
584
+ const moment$2 = moment_;
585
+ moment$2.locale(localStorage.getItem('langKey') || '');
586
+ moment$2.defaultFormat = 'DD MMM YYYY HH:mm';
587
+ class DossierDetailTabAuditComponent {
588
+ constructor(route, documentService, spinnerService) {
589
+ this.route = route;
590
+ this.documentService = documentService;
591
+ this.spinnerService = spinnerService;
592
+ this.spinnerService.show('auditSpinner');
593
+ const snapshot = this.route.snapshot.paramMap;
594
+ this.documentId = snapshot.get('documentId') || '';
595
+ }
596
+ static getTranslationKey(auditEvent) {
597
+ const classNameArray = auditEvent.className.split('.');
598
+ const eventName = classNameArray[classNameArray.length - 1];
599
+ return 'events.' + eventName;
600
+ }
601
+ ngOnInit() {
602
+ this.documentService.getAuditLog(this.documentId).subscribe(page => {
603
+ const timelineItems = [];
604
+ page.content.forEach(auditRecord => {
605
+ const occurredOn = moment$2(auditRecord.metaData.occurredOn);
606
+ const fromNow = occurredOn.fromNow();
607
+ timelineItems.push(new TimelineItemImpl(occurredOn.format('DD MMM YYYY'), occurredOn.format('HH:mm'), auditRecord.metaData.user, fromNow, DossierDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent), auditRecord.auditEvent));
608
+ });
609
+ this.timelineItems = timelineItems;
610
+ this.spinnerService.hide('auditSpinner');
611
+ });
612
+ }
613
+ }
614
+ DossierDetailTabAuditComponent.decorators = [
615
+ { type: Component, args: [{
616
+ selector: 'valtimo-dossier-detail-tab-audit',
617
+ 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 *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n",
618
+ styles: [""]
619
+ },] }
620
+ ];
621
+ DossierDetailTabAuditComponent.ctorParameters = () => [
622
+ { type: ActivatedRoute },
623
+ { type: DocumentService },
624
+ { type: NgxSpinnerService }
625
+ ];
626
+
627
+ /*
628
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
629
+ *
630
+ * Licensed under EUPL, Version 1.2 (the "License");
631
+ * you may not use this file except in compliance with the License.
632
+ * You may obtain a copy of the License at
633
+ *
634
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
635
+ *
636
+ * Unless required by applicable law or agreed to in writing, software
637
+ * distributed under the License is distributed on an "AS IS" basis,
638
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
639
+ * See the License for the specific language governing permissions and
640
+ * limitations under the License.
641
+ */
642
+ class DossierDetailTabDocumentsComponent {
643
+ constructor(route, documentService, toastrService, uploadProviderService, downloadService) {
644
+ this.route = route;
645
+ this.documentService = documentService;
646
+ this.toastrService = toastrService;
647
+ this.uploadProviderService = uploadProviderService;
648
+ this.downloadService = downloadService;
649
+ this.relatedFiles = [];
650
+ this.fields = [
651
+ { key: 'fileName', label: 'File name' },
652
+ { key: 'sizeInBytes', label: 'Size in bytes' },
653
+ { key: 'createdOn', label: 'Created on', viewType: 'date' },
654
+ { key: 'createdBy', label: 'Created by' }
655
+ ];
656
+ this.actions = [
657
+ {
658
+ columnName: '',
659
+ iconClass: 'fas fa-external-link-alt',
660
+ callback: this.downloadDocument.bind(this)
661
+ },
662
+ {
663
+ columnName: '',
664
+ iconClass: 'fas fa-trash-alt',
665
+ callback: this.removeRelatedFile.bind(this)
666
+ }
667
+ ];
668
+ this.uploading$ = new BehaviorSubject(false);
669
+ const snapshot = this.route.snapshot.paramMap;
670
+ this.documentId = snapshot.get('documentId') || '';
671
+ this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
672
+ }
673
+ ngOnInit() {
674
+ this.loadDocuments();
675
+ }
676
+ fileSelected(file) {
677
+ this.uploading$.next(true);
678
+ this.uploadProviderService.uploadFile(file, this.documentDefinitionName).pipe(switchMap((resourceFile) => this.documentService.assignResource(this.documentId, resourceFile.data.resourceId))).subscribe(() => {
679
+ this.toastrService.success('Successfully uploaded document to dossier');
680
+ this.loadDocuments();
681
+ this.uploading$.next(false);
682
+ }, () => {
683
+ this.toastrService.error('Failed to upload document to dossier');
684
+ this.uploading$.next(false);
685
+ });
686
+ }
687
+ loadDocuments() {
688
+ this.documentService.getDocument(this.documentId).subscribe((document) => {
689
+ this.relatedFiles = document.relatedFiles;
690
+ });
691
+ }
692
+ downloadDocument(relatedFile) {
693
+ this.uploadProviderService.getResource(relatedFile.fileId).subscribe((resource) => {
694
+ this.downloadService.downloadFile(resource.url, resource.resource.name);
695
+ });
696
+ }
697
+ removeRelatedFile(relatedFile) {
698
+ this.documentService.removeResource(this.documentId, relatedFile.fileId).subscribe(() => {
699
+ this.toastrService.success('Successfully removed document from dossier');
700
+ this.loadDocuments();
701
+ }, () => {
702
+ this.toastrService.error('Failed to remove document from dossier');
703
+ });
704
+ }
705
+ }
706
+ DossierDetailTabDocumentsComponent.decorators = [
707
+ { type: Component, args: [{
708
+ selector: 'valtimo-dossier-detail-tab-documents',
709
+ 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-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"true\"\n [maxFileSize]=\"5\"\n [showMaxFileSize]=\"false\"\n [camera]=\"false\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<valtimo-widget>\n <valtimo-list\n [fields]=\"fields\"\n [items]=\"relatedFiles\"\n [header]=\"true\"\n [isSearchable]=\"true\"\n [viewMode]=\"true\"\n [actions]=\"actions\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{'Related documents' | translate}}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all documents in this dossier' | translate }}</h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\n",
710
+ styles: [""]
711
+ },] }
712
+ ];
713
+ DossierDetailTabDocumentsComponent.ctorParameters = () => [
714
+ { type: ActivatedRoute },
715
+ { type: DocumentService },
716
+ { type: ToastrService },
717
+ { type: UploadProviderService },
718
+ { type: DownloadService }
719
+ ];
720
+
721
+ /*
722
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
723
+ *
724
+ * Licensed under EUPL, Version 1.2 (the "License");
725
+ * you may not use this file except in compliance with the License.
726
+ * You may obtain a copy of the License at
727
+ *
728
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
729
+ *
730
+ * Unless required by applicable law or agreed to in writing, software
731
+ * distributed under the License is distributed on an "AS IS" basis,
732
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
733
+ * See the License for the specific language governing permissions and
734
+ * limitations under the License.
735
+ */
736
+ const TAB_MAP = new InjectionToken('TabMap');
737
+ const DEFAULT_TABS = new Map([
738
+ [DefaultTabs.summary, DossierDetailTabSummaryComponent],
739
+ [DefaultTabs.progress, DossierDetailTabProgressComponent],
740
+ [DefaultTabs.audit, DossierDetailTabAuditComponent],
741
+ [DefaultTabs.documents, DossierDetailTabDocumentsComponent]
742
+ ]);
743
+
744
+ /*
745
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
746
+ *
747
+ * Licensed under EUPL, Version 1.2 (the "License");
748
+ * you may not use this file except in compliance with the License.
749
+ * You may obtain a copy of the License at
750
+ *
751
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
752
+ *
753
+ * Unless required by applicable law or agreed to in writing, software
754
+ * distributed under the License is distributed on an "AS IS" basis,
755
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
756
+ * See the License for the specific language governing permissions and
757
+ * limitations under the License.
758
+ */
759
+ class TabService {
760
+ constructor(tabMap = DEFAULT_TABS) {
761
+ this.tabs = [];
762
+ this.tabMap = tabMap;
763
+ let i = 0;
764
+ this.tabMap.forEach((component, name, map) => {
765
+ this.tabs.push(new TabImpl(name, i, component));
766
+ i++;
767
+ });
768
+ }
769
+ getTabs() {
770
+ return this.tabs;
771
+ }
772
+ }
773
+ TabService.ɵprov = ɵɵdefineInjectable({ factory: function TabService_Factory() { return new TabService(ɵɵinject(TAB_MAP)); }, token: TabService, providedIn: "root" });
774
+ TabService.decorators = [
775
+ { type: Injectable, args: [{
776
+ providedIn: 'root'
777
+ },] }
778
+ ];
779
+ TabService.ctorParameters = () => [
780
+ { type: Map, decorators: [{ type: Inject, args: [TAB_MAP,] }] }
781
+ ];
782
+
783
+ /*
784
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
785
+ *
786
+ * Licensed under EUPL, Version 1.2 (the "License");
787
+ * you may not use this file except in compliance with the License.
788
+ * You may obtain a copy of the License at
789
+ *
790
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
791
+ *
792
+ * Unless required by applicable law or agreed to in writing, software
793
+ * distributed under the License is distributed on an "AS IS" basis,
794
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
795
+ * See the License for the specific language governing permissions and
796
+ * limitations under the License.
797
+ */
798
+ class DossierSupportingProcessStartModalComponent {
799
+ constructor(route, router, processService, documentService, formLinkService, logger) {
800
+ this.route = route;
801
+ this.router = router;
802
+ this.processService = processService;
803
+ this.documentService = documentService;
804
+ this.formLinkService = formLinkService;
805
+ this.logger = logger;
806
+ this.formSubmit = new EventEmitter();
807
+ }
808
+ loadFormDefinition() {
809
+ this.formDefinition = null;
810
+ this.formLinkService.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
811
+ .subscribe(formDefinition => {
812
+ this.formAssociation = formDefinition.formAssociation;
813
+ const className = this.formAssociation.formLink.className.split('.');
814
+ const linkType = className[className.length - 1];
815
+ switch (linkType) {
816
+ case 'BpmnElementFormIdLink':
817
+ this.formDefinition = formDefinition;
818
+ this.documentService.getDocument(this.documentId).subscribe(document => {
819
+ this.submission = {
820
+ data: document.content
821
+ };
822
+ }, () => noop());
823
+ this.modal.show();
824
+ break;
825
+ case 'BpmnElementUrlLink':
826
+ const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
827
+ window.open(url, '_blank');
828
+ break;
829
+ case 'BpmnElementAngularStateUrlLink':
830
+ this.router.navigate([formDefinition.formAssociation.formLink.url]);
831
+ break;
832
+ default:
833
+ this.logger.fatal('Unsupported class name');
834
+ }
835
+ }, errors => {
836
+ this.modal.show();
837
+ });
838
+ }
839
+ get modalTitle() {
840
+ return `Start - ${this.processName}`;
841
+ }
842
+ openModal(processDocumentDefinition, documentId) {
843
+ this.documentId = documentId;
844
+ this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
845
+ this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
846
+ this.processName = processDocumentDefinition.processName;
847
+ this.options = new FormioOptionsImpl();
848
+ this.options.disableAlerts = true;
849
+ const formioBeforeSubmit = function (submission, callback) {
850
+ callback(null, submission);
851
+ };
852
+ this.options.setHooks(formioBeforeSubmit);
853
+ this.loadFormDefinition();
854
+ }
855
+ onSubmit(submission) {
856
+ this.formioSubmission = submission;
857
+ this.formLinkService.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.documentId).subscribe((formSubmissionResult) => {
858
+ this.modal.hide();
859
+ this.formSubmit.emit();
860
+ }, errors => {
861
+ this.form.showErrors(errors);
862
+ });
863
+ }
864
+ gotoFormLinkScreen() {
865
+ this.modal.hide();
866
+ this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
867
+ }
868
+ }
869
+ DossierSupportingProcessStartModalComponent.decorators = [
870
+ { type: Component, args: [{
871
+ selector: 'valtimo-dossier-supporting-process-start-modal',
872
+ 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 #supportingProcessStartModal elementId=\"supportingProcessStartModal\" [title]=\"modalTitle\">\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io #form\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\">\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\" [translate]=\"'formManagement.noFormDefinitionFound'\">\n </div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button class=\"btn btn-secondary btn-space\" type=\"button\"\n (click)=\"gotoFormLinkScreen();\"\n id=\"form-link-button\">{{'formManagement.gotoFormLinksButton' | translate}}\n </button>\n </div>\n </div>\n</valtimo-modal>\n",
873
+ encapsulation: ViewEncapsulation.None,
874
+ 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 */#supportingProcessStartModal .formio-component-submit{text-align:right}"]
875
+ },] }
876
+ ];
877
+ DossierSupportingProcessStartModalComponent.ctorParameters = () => [
878
+ { type: ActivatedRoute },
879
+ { type: Router },
880
+ { type: ProcessService },
881
+ { type: DocumentService },
882
+ { type: FormLinkService },
883
+ { type: NGXLogger }
884
+ ];
885
+ DossierSupportingProcessStartModalComponent.propDecorators = {
886
+ form: [{ type: ViewChild, args: ['form', { static: false },] }],
887
+ modal: [{ type: ViewChild, args: ['supportingProcessStartModal', { static: false },] }],
888
+ formSubmit: [{ type: Output }]
889
+ };
890
+
891
+ /*
892
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
893
+ *
894
+ * Licensed under EUPL, Version 1.2 (the "License");
895
+ * you may not use this file except in compliance with the License.
896
+ * You may obtain a copy of the License at
897
+ *
898
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
899
+ *
900
+ * Unless required by applicable law or agreed to in writing, software
901
+ * distributed under the License is distributed on an "AS IS" basis,
902
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
903
+ * See the License for the specific language governing permissions and
904
+ * limitations under the License.
905
+ */
906
+ class DossierDetailComponent {
907
+ constructor(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService) {
908
+ this.componentFactoryResolver = componentFactoryResolver;
909
+ this.translateService = translateService;
910
+ this.documentService = documentService;
911
+ this.processService = processService;
912
+ this.route = route;
913
+ this.router = router;
914
+ this.location = location;
915
+ this.tabService = tabService;
916
+ this.document = null;
917
+ this.tabLoader = null;
918
+ this.processDefinitionListFields = [];
919
+ this.processDocumentDefinitions = [];
920
+ this.snapshot = this.route.snapshot.paramMap;
921
+ this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
922
+ this.documentId = this.snapshot.get('documentId') || '';
923
+ }
924
+ ngOnInit() {
925
+ this.tabLoader = new TabLoaderImpl(this.tabService.getTabs(), this.componentFactoryResolver, this.viewContainerRef, this.translateService, this.router, this.location);
926
+ this.documentService.getDocumentDefinition(this.documentDefinitionName).subscribe(definition => {
927
+ this.documentDefinitionNameTitle = definition.schema.title;
928
+ });
929
+ this.initialTabName = this.snapshot.get('tab');
930
+ this.tabLoader.initial(this.initialTabName);
931
+ this.getAllAssociatedProcessDefinitions();
932
+ }
933
+ getAllAssociatedProcessDefinitions() {
934
+ this.documentService.findProcessDocumentDefinitions(this.documentDefinitionName).subscribe(processDocumentDefinitions => {
935
+ this.processDocumentDefinitions = processDocumentDefinitions
936
+ .filter(processDocumentDefinition => processDocumentDefinition.startableByUser);
937
+ this.processDefinitionListFields = [{
938
+ key: 'processName',
939
+ label: 'Proces'
940
+ }];
941
+ });
942
+ }
943
+ startProcess(processDocumentDefinition) {
944
+ this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);
945
+ }
946
+ }
947
+ DossierDetailComponent.decorators = [
948
+ { type: Component, args: [{
949
+ selector: 'valtimo-dossier-detail',
950
+ 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\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-5\">\n {{ documentDefinitionNameTitle }}\n <div class=\"float-right\">\n <div class=\"dropdown\">\n <button class=\"btn btn-primary dropdown-toggle\" type=\"button\"\n id=\"startProcessDropdown\" placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <span>Start</span>\n <i class=\"pl-2 fas fa-caret-down\"></i>\n </button>\n <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"startProcessDropdown\">\n <button *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\" class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\">{{processDocumentDefinition.processName}}</button>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a id=\"{{ tab.name }}-tab\" class=\"nav-link clickable\"\n [ngClass]=\"{'active' : tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\">\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
951
+ styles: [".tab-container{min-height:300px}"]
952
+ },] }
953
+ ];
954
+ DossierDetailComponent.ctorParameters = () => [
955
+ { type: ComponentFactoryResolver },
956
+ { type: TranslateService },
957
+ { type: DocumentService },
958
+ { type: ProcessService },
959
+ { type: ActivatedRoute },
960
+ { type: Router },
961
+ { type: Location },
962
+ { type: TabService }
963
+ ];
964
+ DossierDetailComponent.propDecorators = {
965
+ viewContainerRef: [{ type: ViewChild, args: ['tabContainer', { read: ViewContainerRef, static: true },] }],
966
+ supportingProcessStart: [{ type: ViewChild, args: ['supportingProcessStartModal',] }]
967
+ };
968
+
969
+ /*
970
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
971
+ *
972
+ * Licensed under EUPL, Version 1.2 (the "License");
973
+ * you may not use this file except in compliance with the License.
974
+ * You may obtain a copy of the License at
975
+ *
976
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
977
+ *
978
+ * Unless required by applicable law or agreed to in writing, software
979
+ * distributed under the License is distributed on an "AS IS" basis,
980
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
981
+ * See the License for the specific language governing permissions and
982
+ * limitations under the License.
983
+ */
984
+ const moment$3 = moment_;
985
+ moment$3.locale(localStorage.getItem('langKey') || '');
986
+ class DossierUpdateComponent {
987
+ constructor(taskService, documentService, route, toastr, location, dossierService) {
988
+ this.taskService = taskService;
989
+ this.documentService = documentService;
990
+ this.route = route;
991
+ this.toastr = toastr;
992
+ this.location = location;
993
+ this.customDefinitions = {};
994
+ const snapshot = this.route.snapshot.paramMap;
995
+ this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
996
+ this.documentId = snapshot.get('documentId') || '';
997
+ this.taskId = snapshot.get('taskId') || '';
998
+ this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(this.documentDefinitionName);
999
+ this.loadDocumentDefinition(this.documentDefinitionName);
1000
+ this.loadDocument(this.documentId);
1001
+ }
1002
+ ngOnInit() {
1003
+ this.getTask(this.taskId);
1004
+ if (this.implementationDefinitions.definitions.detail.summary) {
1005
+ this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;
1006
+ }
1007
+ }
1008
+ loadDocumentDefinition(name) {
1009
+ this.documentService.getDocumentDefinition(name).subscribe(definition => {
1010
+ this.schema = definition.schema;
1011
+ });
1012
+ }
1013
+ loadDocument(id) {
1014
+ this.documentService.getDocument(id).subscribe(document => {
1015
+ this.document = document;
1016
+ });
1017
+ }
1018
+ getTask(id) {
1019
+ this.taskService.getTask(id).subscribe(task => {
1020
+ this.task = task;
1021
+ this.task.task.created = moment$3(this.task.task.created).format('DD MMM YYYY HH:mm');
1022
+ this.page = {
1023
+ title: this.task.task.name,
1024
+ subtitle: `Created ${moment$3(this.task.task.created).fromNow()}`
1025
+ };
1026
+ });
1027
+ }
1028
+ reset() {
1029
+ this.loadDocument(this.documentId);
1030
+ }
1031
+ back() {
1032
+ this.location.back();
1033
+ }
1034
+ save() {
1035
+ const document = {
1036
+ documentId: this.document.id,
1037
+ content: this.document.content,
1038
+ versionBasedOn: this.document.version
1039
+ };
1040
+ this.documentService.modifyDocument(document).subscribe(result => {
1041
+ this.document = result.document;
1042
+ this.toastr.success('Document aangepast');
1043
+ this.location.back();
1044
+ });
1045
+ }
1046
+ submit(data) {
1047
+ // merge document content with formdata
1048
+ const mergedData = Object.assign({}, this.document.content, data);
1049
+ const documentData = {
1050
+ request: {
1051
+ documentId: this.document.id,
1052
+ content: mergedData,
1053
+ versionBasedOn: this.document.version
1054
+ },
1055
+ taskId: this.task.task.id
1056
+ };
1057
+ this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(result => {
1058
+ this.toastr.success(this.task.task.name + ' has successfully been completed');
1059
+ this.location.back();
1060
+ });
1061
+ }
1062
+ returnZero() {
1063
+ return 0;
1064
+ }
1065
+ }
1066
+ DossierUpdateComponent.decorators = [
1067
+ { type: Component, args: [{
1068
+ selector: 'valtimo-dossier-update',
1069
+ 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\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget [title]=\"page?.title\" [subtitle]=\"page?.subtitle\" [divider]=\"true\">\n <div class=\"card-body\">\n\n <!--view with custom definitions-->\n <div *ngIf=\"this.customDefinitions\">\n <div class=\"mb-4\" *ngFor=\"let definition of this.customDefinitions | keyvalue: returnZero\">\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-sm-12\">\n <div class=\"text-right\">\n <button class=\"btn btn-space btn-default float-left\" type=\"button\" (click)=\"back()\" id=\"back-button\">Back</button>\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\" id=\"reset-button\">Reset</button>\n <button class=\"btn btn-space btn-primary\" type=\"button\" (click)=\"save()\" id=\"save-button\">Save</button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" (click)=\"submit({})\" id=\"submit-button\">Submit</button>\n </div>\n </div>\n </div>\n </div>\n\n <valtimo-camunda-form *ngIf=\"task?.formFields && !this.customDefinitions\"\n (submitted)=\"submit($event)\"\n [formFields]=\"task.formFields\"\n [componentName]=\"task.formLocation\"></valtimo-camunda-form>\n\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
1070
+ styles: [""]
1071
+ },] }
1072
+ ];
1073
+ DossierUpdateComponent.ctorParameters = () => [
1074
+ { type: TaskService },
1075
+ { type: DocumentService },
1076
+ { type: ActivatedRoute },
1077
+ { type: ToastrService },
1078
+ { type: Location },
1079
+ { type: DossierService }
1080
+ ];
1081
+
1082
+ /*
1083
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1084
+ *
1085
+ * Licensed under EUPL, Version 1.2 (the "License");
1086
+ * you may not use this file except in compliance with the License.
1087
+ * You may obtain a copy of the License at
1088
+ *
1089
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1090
+ *
1091
+ * Unless required by applicable law or agreed to in writing, software
1092
+ * distributed under the License is distributed on an "AS IS" basis,
1093
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1094
+ * See the License for the specific language governing permissions and
1095
+ * limitations under the License.
1096
+ */
1097
+ const ɵ0 = { title: 'Dossiers', roles: [ROLE_USER] }, ɵ1 = { title: 'Dossiers', parentPath: 'dossiers/:documentDefinitionName', roles: [ROLE_USER] }, ɵ2 = { title: 'Task details', parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab', roles: [ROLE_USER] };
1098
+ const routes = [
1099
+ {
1100
+ path: 'dossiers/:documentDefinitionName',
1101
+ component: DossierListComponent,
1102
+ canActivate: [AuthGuardService],
1103
+ data: ɵ0
1104
+ },
1105
+ {
1106
+ path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
1107
+ component: DossierDetailComponent,
1108
+ canActivate: [AuthGuardService],
1109
+ data: ɵ1
1110
+ },
1111
+ {
1112
+ path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',
1113
+ component: DossierUpdateComponent,
1114
+ canActivate: [AuthGuardService],
1115
+ data: ɵ2
1116
+ }
1117
+ ];
1118
+ class DossierRoutingModule {
1119
+ }
1120
+ DossierRoutingModule.decorators = [
1121
+ { type: NgModule, args: [{
1122
+ imports: [
1123
+ CommonModule,
1124
+ RouterModule.forChild(routes),
1125
+ ],
1126
+ exports: [RouterModule]
1127
+ },] }
1128
+ ];
1129
+
1130
+ /*
1131
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1132
+ *
1133
+ * Licensed under EUPL, Version 1.2 (the "License");
1134
+ * you may not use this file except in compliance with the License.
1135
+ * You may obtain a copy of the License at
1136
+ *
1137
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1138
+ *
1139
+ * Unless required by applicable law or agreed to in writing, software
1140
+ * distributed under the License is distributed on an "AS IS" basis,
1141
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1142
+ * See the License for the specific language governing permissions and
1143
+ * limitations under the License.
1144
+ */
1145
+ const ɵ0$1 = HttpLoaderFactory;
1146
+ class DossierModule {
1147
+ static forRoot(tabsFactory) {
1148
+ return {
1149
+ ngModule: DossierModule,
1150
+ providers: [
1151
+ DossierService,
1152
+ TabService,
1153
+ {
1154
+ provide: TAB_MAP,
1155
+ useFactory: tabsFactory
1156
+ },
1157
+ {
1158
+ provide: ANALYZE_FOR_ENTRY_COMPONENTS,
1159
+ useValue: Array.from(tabsFactory().values()),
1160
+ multi: true
1161
+ }
1162
+ ]
1163
+ };
1164
+ }
1165
+ }
1166
+ DossierModule.decorators = [
1167
+ { type: NgModule, args: [{
1168
+ declarations: [
1169
+ DossierListComponent,
1170
+ DossierDetailComponent,
1171
+ DossierDetailTabSummaryComponent,
1172
+ DossierDetailTabProgressComponent,
1173
+ DossierDetailTabAuditComponent,
1174
+ DossierDetailTabDocumentsComponent,
1175
+ DossierUpdateComponent,
1176
+ DossierProcessStartModalComponent,
1177
+ DossierSupportingProcessStartModalComponent
1178
+ ],
1179
+ imports: [
1180
+ CommonModule,
1181
+ DossierRoutingModule,
1182
+ ListModule,
1183
+ WidgetModule,
1184
+ BpmnJsDiagramModule,
1185
+ TimelineModule,
1186
+ CamundaFormModule,
1187
+ ProcessModule,
1188
+ FilterSidebarModule,
1189
+ NgbButtonsModule,
1190
+ DataListModule,
1191
+ FormsModule,
1192
+ FormModule,
1193
+ FormIoModule,
1194
+ ModalModule,
1195
+ SpinnerModule,
1196
+ TranslateModule.forRoot({
1197
+ loader: {
1198
+ provide: TranslateLoader,
1199
+ useFactory: ɵ0$1,
1200
+ deps: [HttpClient]
1201
+ }
1202
+ }),
1203
+ TaskModule,
1204
+ ModalModule,
1205
+ NgbTooltipModule,
1206
+ UploaderModule,
1207
+ DropzoneModule
1208
+ ],
1209
+ exports: [
1210
+ DossierListComponent,
1211
+ DossierDetailComponent
1212
+ ],
1213
+ entryComponents: [
1214
+ DossierDetailTabSummaryComponent,
1215
+ DossierDetailTabProgressComponent,
1216
+ DossierDetailTabAuditComponent,
1217
+ DossierDetailTabDocumentsComponent
1218
+ ]
1219
+ },] }
1220
+ ];
1221
+
1222
+ /*
1223
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1224
+ *
1225
+ * Licensed under EUPL, Version 1.2 (the "License");
1226
+ * you may not use this file except in compliance with the License.
1227
+ * You may obtain a copy of the License at
1228
+ *
1229
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1230
+ *
1231
+ * Unless required by applicable law or agreed to in writing, software
1232
+ * distributed under the License is distributed on an "AS IS" basis,
1233
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1234
+ * See the License for the specific language governing permissions and
1235
+ * limitations under the License.
1236
+ */
1237
+
1238
+ /**
1239
+ * Generated bundle index. Do not edit.
1240
+ */
1241
+
1242
+ export { DEFAULT_TABS, DefaultTabs, DossierDetailComponent, DossierDetailTabAuditComponent, DossierDetailTabDocumentsComponent, DossierDetailTabProgressComponent, DossierDetailTabSummaryComponent, DossierListComponent, DossierModule, DossierService, TAB_MAP, TabService, ɵ0$1 as ɵ0, DossierUpdateComponent as ɵa, DossierProcessStartModalComponent as ɵb, DossierSupportingProcessStartModalComponent as ɵc, DossierRoutingModule as ɵd };
1243
+ //# sourceMappingURL=valtimo-dossier.js.map