@valtimo/dossier 4.17.0 → 4.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/bundles/valtimo-dossier.umd.js +39 -6
  2. package/bundles/valtimo-dossier.umd.js.map +1 -1
  3. package/bundles/valtimo-dossier.umd.min.js +1 -1
  4. package/bundles/valtimo-dossier.umd.min.js.map +1 -1
  5. package/esm2015/lib/dossier-detail/dossier-detail.component.js +37 -4
  6. package/esm2015/lib/dossier-detail/tab/audit/audit.component.js +1 -1
  7. package/esm2015/lib/dossier-detail/tab/contact-moments/contact-moments.component.js +1 -1
  8. package/esm2015/lib/dossier-detail/tab/documents/documents.component.js +3 -3
  9. package/esm2015/lib/dossier-detail/tab/progress/progress.component.js +1 -1
  10. package/esm2015/lib/dossier-detail/tab/summary/summary.component.js +1 -1
  11. package/esm2015/lib/dossier-detail-tab-enum.js +1 -1
  12. package/esm2015/lib/dossier-list/dossier-list.component.js +2 -2
  13. package/esm2015/lib/dossier-process-start-modal/dossier-process-start-modal.component.js +1 -1
  14. package/esm2015/lib/dossier-routing.module.js +1 -1
  15. package/esm2015/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.js +1 -1
  16. package/esm2015/lib/dossier-update/dossier-update.component.js +1 -1
  17. package/esm2015/lib/dossier.config.js +1 -1
  18. package/esm2015/lib/dossier.module.js +1 -1
  19. package/esm2015/lib/dossier.service.js +1 -1
  20. package/esm2015/lib/models/index.js +1 -1
  21. package/esm2015/lib/models/tabs.model.js +1 -1
  22. package/esm2015/lib/tab.service.js +1 -1
  23. package/esm2015/public_api.js +1 -1
  24. package/esm2015/valtimo-dossier.js +1 -1
  25. package/fesm2015/valtimo-dossier.js +37 -6
  26. package/fesm2015/valtimo-dossier.js.map +1 -1
  27. package/lib/dossier-detail/dossier-detail.component.d.ts +7 -1
  28. package/package.json +1 -1
  29. package/valtimo-dossier.metadata.json +1 -1
@@ -732,7 +732,7 @@
732
732
  DossierListComponent.decorators = [
733
733
  { type: i0.Component, args: [{
734
734
  selector: 'valtimo-dossier-list',
735
- 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\">\n {{ 'dashboard.startProcess.title' | translate }}\n </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\">{{\n documents?.content.length || 0\n }}</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",
735
+ 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 <i class=\"icon mdi mdi-plus mr-1\"></i>\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\">\n {{ 'dashboard.startProcess.title' | translate }}\n </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\">{{\n documents?.content.length || 0\n }}</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",
736
736
  styles: [""]
737
737
  },] }
738
738
  ];
@@ -1020,12 +1020,12 @@
1020
1020
  this.actions = [
1021
1021
  {
1022
1022
  columnName: '',
1023
- iconClass: 'fas fa-external-link-alt',
1023
+ iconClass: 'mdi mdi-open-in-new',
1024
1024
  callback: this.downloadDocument.bind(this),
1025
1025
  },
1026
1026
  {
1027
1027
  columnName: '',
1028
- iconClass: 'fas fa-trash-alt',
1028
+ iconClass: 'mdi mdi-delete',
1029
1029
  callback: this.removeRelatedFile.bind(this),
1030
1030
  },
1031
1031
  ];
@@ -1172,7 +1172,7 @@
1172
1172
  * limitations under the License.
1173
1173
  */
1174
1174
  var DossierDetailComponent = /** @class */ (function () {
1175
- function DossierDetailComponent(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService) {
1175
+ function DossierDetailComponent(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService, configService) {
1176
1176
  this.componentFactoryResolver = componentFactoryResolver;
1177
1177
  this.translateService = translateService;
1178
1178
  this.documentService = documentService;
@@ -1181,10 +1181,12 @@
1181
1181
  this.router = router;
1182
1182
  this.location = location;
1183
1183
  this.tabService = tabService;
1184
+ this.configService = configService;
1184
1185
  this.document = null;
1185
1186
  this.tabLoader = null;
1186
1187
  this.processDefinitionListFields = [];
1187
1188
  this.processDocumentDefinitions = [];
1189
+ this.customDossierHeaderItems = [];
1188
1190
  this.snapshot = this.route.snapshot.paramMap;
1189
1191
  this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
1190
1192
  this.documentId = this.snapshot.get('documentId') || '';
@@ -1197,6 +1199,7 @@
1197
1199
  .subscribe(function (definition) {
1198
1200
  _this.documentDefinitionNameTitle = definition.schema.title;
1199
1201
  });
1202
+ this.getCustomDossierHeader();
1200
1203
  this.initialTabName = this.snapshot.get('tab');
1201
1204
  this.tabLoader.initial(this.initialTabName);
1202
1205
  this.getAllAssociatedProcessDefinitions();
@@ -1218,12 +1221,41 @@
1218
1221
  DossierDetailComponent.prototype.startProcess = function (processDocumentDefinition) {
1219
1222
  this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);
1220
1223
  };
1224
+ DossierDetailComponent.prototype.getCustomDossierHeader = function () {
1225
+ var _this = this;
1226
+ var _a;
1227
+ if ((_a = this.configService.config.customDossierHeader) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(this.documentDefinitionName.toLowerCase())) {
1228
+ this.documentService.getDocument(this.documentId).subscribe(function (document) {
1229
+ var _a;
1230
+ _this.document = document;
1231
+ (_a = _this.configService.config.customDossierHeader[_this.documentDefinitionName.toLowerCase()]) === null || _a === void 0 ? void 0 : _a.forEach(function (item) { return _this.getCustomDossierHeaderItem(item); });
1232
+ });
1233
+ }
1234
+ };
1235
+ DossierDetailComponent.prototype.getCustomDossierHeaderItem = function (item) {
1236
+ var _this = this;
1237
+ var _a;
1238
+ this.customDossierHeaderItems.push({
1239
+ label: item['labelTranslationKey'] || '',
1240
+ columnSize: item['columnSize'] || 3,
1241
+ textSize: item['textSize'] || 'md',
1242
+ customClass: item['customClass'] || '',
1243
+ value: (_a = item['propertyPaths']) === null || _a === void 0 ? void 0 : _a.reduce(function (prev, curr) { return prev + _this.getStringFromDocumentPath(item, curr); }, ''),
1244
+ });
1245
+ };
1246
+ DossierDetailComponent.prototype.getStringFromDocumentPath = function (item, path) {
1247
+ var prefix = item['propertyPaths'].indexOf(path) > 0 ? ' ' : '';
1248
+ var string = path.split('.').reduce(function (o, i) { return o[i]; }, this.document.content) || item['noValueText'] || '';
1249
+ var regex = new RegExp('(T\\d\\d:\\d\\d:\\d\\d[+-])');
1250
+ var formattedString = regex.test(string) ? moment_(string).format('DD-MM-YYYY') : string;
1251
+ return prefix + formattedString;
1252
+ };
1221
1253
  return DossierDetailComponent;
1222
1254
  }());
1223
1255
  DossierDetailComponent.decorators = [
1224
1256
  { type: i0.Component, args: [{
1225
1257
  selector: 'valtimo-dossier-detail',
1226
- 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=\"btn-group mt-m3px mb-3 float-right\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <div class=\"dropdown\">\n <button\n class=\"btn btn-primary dropdown-toggle\"\n type=\"button\"\n id=\"startProcessDropdown\"\n placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\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\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\"\n >\n {{ processDocumentDefinition.processName }}\n </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\n id=\"{{ tab.name }}-tab\"\n class=\"nav-link clickable\"\n [ngClass]=\"{active: tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\"\n >\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\n (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal\n ></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
1258
+ 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-2\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"row\" *ngIf=\"customDossierHeaderItems.length > 0; else defaultTitle\">\n <span\n class=\"mb-0 mt-0 pb-2 align-self-end col-xl-{{ item.columnSize }} col-lg-{{\n item.columnSize * 2\n }} {{ item.customClass }}\"\n [ngClass]=\"{\n h1: item.textSize === 'xl',\n h2: item.textSize === 'lg',\n h3: item.textSize === 'md',\n h4: item.textSize === 'sm',\n h5: item.textSize === 'xs'\n }\"\n *ngFor=\"let item of customDossierHeaderItems\"\n >\n <span *ngIf=\"item.label != ''\">{{ item.label | translate }}</span>\n <span *ngIf=\"item.label != '' && item.value != '' && item.value != null\">: </span>\n <strong>{{ item.value }}</strong>\n </span>\n </div>\n <ng-template #defaultTitle>\n {{ documentDefinitionNameTitle }}\n </ng-template>\n </div>\n <div class=\"btn-group mt-m3px mb-3 col-auto\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <div class=\"dropdown\">\n <button\n class=\"btn btn-primary dropdown-toggle\"\n type=\"button\"\n id=\"startProcessDropdown\"\n placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <span>Start</span>\n <i class=\"ml-1 mdi mdi-chevron-down\"></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right\"\n aria-labelledby=\"startProcessDropdown\"\n >\n <button\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\"\n >\n {{ processDocumentDefinition.processName }}\n </button>\n </div>\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\n id=\"{{ tab.name }}-tab\"\n class=\"nav-link clickable\"\n [ngClass]=\"{active: tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\"\n >\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\n (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal\n ></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
1227
1259
  styles: [".tab-container{min-height:300px}"]
1228
1260
  },] }
1229
1261
  ];
@@ -1235,7 +1267,8 @@
1235
1267
  { type: router.ActivatedRoute },
1236
1268
  { type: router.Router },
1237
1269
  { type: common.Location },
1238
- { type: TabService }
1270
+ { type: TabService },
1271
+ { type: i1.ConfigService }
1239
1272
  ]; };
1240
1273
  DossierDetailComponent.propDecorators = {
1241
1274
  viewContainerRef: [{ type: i0.ViewChild, args: ['tabContainer', { read: i0.ViewContainerRef, static: true },] }],