@valtimo/components 5.10.0 → 5.12.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 (50) hide show
  1. package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.mjs +89 -11
  2. package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.mjs +6 -3
  3. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.mjs +295 -0
  4. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.mjs +147 -0
  5. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.mjs +43 -0
  6. package/esm2020/lib/components/form-io/form-io.component.mjs +8 -13
  7. package/esm2020/lib/components/form-io/form-io.module.mjs +26 -5
  8. package/esm2020/lib/components/list/list.component.mjs +5 -5
  9. package/esm2020/lib/components/search-fields/search-fields.component.mjs +88 -0
  10. package/esm2020/lib/components/search-fields/search-fields.module.mjs +68 -0
  11. package/esm2020/lib/components/view-content/type-converters/dateTypeConverter.mjs +2 -2
  12. package/esm2020/lib/components/view-content/view-content.service.mjs +11 -1
  13. package/esm2020/lib/models/documenten-api-metadata.model.mjs +1 -1
  14. package/esm2020/lib/models/form-io.model.mjs +1 -1
  15. package/esm2020/lib/services/valtimo-modal.service.mjs +9 -2
  16. package/esm2020/public_api.mjs +5 -1
  17. package/fesm2015/valtimo-components.mjs +996 -277
  18. package/fesm2015/valtimo-components.mjs.map +1 -1
  19. package/fesm2020/valtimo-components.mjs +991 -275
  20. package/fesm2020/valtimo-components.mjs.map +1 -1
  21. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +34 -5
  22. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -1
  23. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts +1 -1
  24. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts.map +1 -1
  25. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts +105 -0
  26. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts.map +1 -0
  27. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts +61 -0
  28. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts.map +1 -0
  29. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts +4 -0
  30. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts.map +1 -0
  31. package/lib/components/form-io/form-io.component.d.ts +2 -4
  32. package/lib/components/form-io/form-io.component.d.ts.map +1 -1
  33. package/lib/components/form-io/form-io.module.d.ts +11 -9
  34. package/lib/components/form-io/form-io.module.d.ts.map +1 -1
  35. package/lib/components/search-fields/search-fields.component.d.ts +26 -0
  36. package/lib/components/search-fields/search-fields.component.d.ts.map +1 -0
  37. package/lib/components/search-fields/search-fields.module.d.ts +13 -0
  38. package/lib/components/search-fields/search-fields.module.d.ts.map +1 -0
  39. package/lib/components/view-content/type-converters/dateTypeConverter.d.ts.map +1 -1
  40. package/lib/components/view-content/view-content.service.d.ts +1 -0
  41. package/lib/components/view-content/view-content.service.d.ts.map +1 -1
  42. package/lib/models/documenten-api-metadata.model.d.ts +2 -1
  43. package/lib/models/documenten-api-metadata.model.d.ts.map +1 -1
  44. package/lib/models/form-io.model.d.ts +3 -0
  45. package/lib/models/form-io.model.d.ts.map +1 -1
  46. package/lib/services/valtimo-modal.service.d.ts +3 -0
  47. package/lib/services/valtimo-modal.service.d.ts.map +1 -1
  48. package/package.json +2 -2
  49. package/public_api.d.ts +4 -0
  50. package/public_api.d.ts.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, Input, Directive, EventEmitter, Output, ViewContainerRef, ViewChild, NgModule, Pipe, HostListener, ViewChildren } from '@angular/core';
3
- import { Subject, from, switchMap, map, BehaviorSubject, Observable, combineLatest, fromEvent, Subscription, timer, take as take$1 } from 'rxjs';
3
+ import { Subject, BehaviorSubject, from, switchMap, map, Observable, combineLatest, fromEvent, Subscription, timer, take as take$1, of, filter as filter$1, startWith } from 'rxjs';
4
4
  import * as i3 from '@angular/forms';
5
5
  import { Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
6
6
  import moment from 'moment';
@@ -11,7 +11,7 @@ import * as i1$2 from 'keycloak-angular';
11
11
  import * as i1$3 from '@valtimo/config';
12
12
  import { HttpLoaderFactory } from '@valtimo/config';
13
13
  import * as i1$4 from '@valtimo/user-interface';
14
- import { ParagraphModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, DatePickerModule } from '@valtimo/user-interface';
14
+ import { ParagraphModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, DatePickerModule, InputLabelModule } from '@valtimo/user-interface';
15
15
  import * as i1$5 from '@angular/router';
16
16
  import { RouterModule, NavigationEnd, PRIMARY_OUTLET, NavigationStart } from '@angular/router';
17
17
  import * as i2 from '@valtimo/document';
@@ -25,7 +25,7 @@ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
25
25
  import * as i1$9 from '@angular/common/http';
26
26
  import { HttpClient } from '@angular/common/http';
27
27
  import * as i5 from '@valtimo/context';
28
- import { map as map$1, debounceTime, take, filter, switchMap as switchMap$1 } from 'rxjs/operators';
28
+ import { map as map$1, debounceTime, take, filter, switchMap as switchMap$1, tap } from 'rxjs/operators';
29
29
  import * as i2$1 from '@angular/platform-browser';
30
30
  import BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
31
31
  import heatmap from 'heatmap.js-fixed/build/heatmap.js';
@@ -163,13 +163,20 @@ class TimelineItemImpl {
163
163
  class ValtimoModalService {
164
164
  constructor() {
165
165
  this._scrollToTop$ = new Subject();
166
+ this._documentDefinitionName$ = new BehaviorSubject('');
166
167
  }
167
168
  get scrollToTop$() {
168
169
  return this._scrollToTop$.asObservable();
169
170
  }
171
+ get documentDefinitionName$() {
172
+ return this._documentDefinitionName$.asObservable();
173
+ }
170
174
  scrollToTop() {
171
175
  this._scrollToTop$.next(null);
172
176
  }
177
+ setDocumentDefinitionName(documentDefinitionName) {
178
+ this._documentDefinitionName$.next(documentDefinitionName);
179
+ }
173
180
  }
174
181
  ValtimoModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
175
182
  ValtimoModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, providedIn: 'root' });
@@ -1819,7 +1826,7 @@ class DateTypeConverter {
1819
1826
  if (!value) {
1820
1827
  return '-';
1821
1828
  }
1822
- return moment(value).format('DD-MM-YYYY, hh:mm A');
1829
+ return moment(value).format((definition === null || definition === void 0 ? void 0 : definition.format) || 'DD-MM-YYYY, hh:mm A');
1823
1830
  }
1824
1831
  }
1825
1832
 
@@ -1951,9 +1958,16 @@ class ViewContentService {
1951
1958
  TYPE_CONVERTERS.forEach(converter => this.addConverter(converter));
1952
1959
  }
1953
1960
  get(value, definition) {
1961
+ const separator = ':';
1954
1962
  if (!definition.viewType) {
1955
1963
  definition.viewType = typeof value;
1956
1964
  }
1965
+ if (definition.viewType.includes(separator)) {
1966
+ // Get the substring of the string after the separator (:) and assign it to a new key
1967
+ definition.format = definition.viewType.slice(this.getSeparatorIndex(definition, separator) + 1);
1968
+ // Remove the substring after the separator and the separator from the string and assign it back to the viewType
1969
+ definition.viewType = definition.viewType.slice(0, this.getSeparatorIndex(definition, separator));
1970
+ }
1957
1971
  if (typeof this.converters[definition.viewType] !== 'undefined') {
1958
1972
  return this.converters[definition.viewType].convert(value, definition);
1959
1973
  }
@@ -1967,6 +1981,9 @@ class ViewContentService {
1967
1981
  }
1968
1982
  this.converters[converter.getTypeString()] = converter;
1969
1983
  }
1984
+ getSeparatorIndex(definition, separator) {
1985
+ return definition.viewType.indexOf(separator);
1986
+ }
1970
1987
  }
1971
1988
  ViewContentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1972
1989
  ViewContentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, providedIn: 'root' });
@@ -2161,10 +2178,10 @@ class ListComponent {
2161
2178
  }
2162
2179
  ListComponent.PAGINATION_SIZE = 'PaginationSize';
2163
2180
  ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ListComponent, deps: [{ token: ViewContentService }, { token: i4.NGXLogger }], target: i0.ɵɵFactoryTarget.Component });
2164
- ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ListComponent, selector: "valtimo-list", inputs: { items: "items", fields: "fields", pagination: "pagination", viewMode: "viewMode", isSearchable: "isSearchable", header: "header", actions: "actions", paginationIdentifier: "paginationIdentifier", initialSortState: "initialSortState" }, outputs: { rowClicked: "rowClicked", paginationClicked: "paginationClicked", paginationSet: "paginationSet", search: "search", sortChanged: "sortChanged" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], usesOnChanges: true, ngImport: i0, 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>\n <div *ngIf=\"(items?.length > 0 && fields?.length > 0) || header\">\n <div\n class=\"d-flex align-items-center search-holder bg-light\"\n [ngClass]=\"{'pb-4 pt-4': !header}\"\n *ngIf=\"isSearchable || viewMode || header\"\n >\n <div class=\"align-self-start\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"ml-auto row\">\n <input\n *ngIf=\"isSearchable\"\n class=\"form-control col-sm-8\"\n type=\"text\"\n placeholder=\"Search...\"\n #searchBox\n />\n\n <div\n class=\"switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0\"\n role=\"group\"\n *ngIf=\"viewMode\"\n >\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'table' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('table')\"\n >\n <i class=\"icon mdi mdi-view-headline view-icon\"></i>\n </button>\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'tile' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('tile')\"\n >\n <i class=\"icon mdi mdi-view-module view-icon\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select=\"[tabs]\"></ng-content>\n\n <div *ngIf=\"items?.length > 0 && fields?.length > 0\">\n <div class=\"table-responsive noSwipe\" *ngIf=\"!viewMode || viewListAs === 'table'\">\n <table class=\"table table-striped table-hover m-0\" *ngIf=\"sort$ | async as sort\">\n <thead>\n <tr>\n <th\n *ngFor=\"let field of fields\"\n (click)=\"handleFieldClick(field.key, field.sortable)\"\n [ngClass]=\"{\n sortable: field.sortable,\n 'is-being-sorted': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === 'ASC'\n }\"\n >\n {{ field.label }}\n </th>\n <th *ngFor=\"let action of actions\">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]=\"{'click-able': this.rowClicked.observers.length > 0}\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <td class=\"align-top\" *ngFor=\"let listItemField of item.listItemFields\">\n <ng-container *ngIf=\"listItemField.type === ''\">\n {{ listItemField.value || '-' }}\n </ng-container>\n\n <ng-container\n *ngIf=\"listItemField.type === 'dropdownActions'\"\n [ngTemplateOutlet]=\"dropdownActions\"\n [ngTemplateOutletContext]=\"{listItemField: listItemField, item: item}\"\n ></ng-container>\n </td>\n <td class=\"align-top\" *ngFor=\"let action of actions\">\n <i\n class=\"action-icon\"\n style=\"cursor: pointer\"\n [ngClass]=\"action.iconClass\"\n (click)=\"action.callback(item)\"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf=\"(items | listFilter: searchModel).length === 0\" [colSpan]=\"fields.length\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"viewMode && viewListAs === 'tile'\">\n <div class=\"row p-2\">\n <div\n class=\"col-12 col-sm-6 col-xl-4 p-2\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <div class=\"click-able tile-holder p-4\">\n <dl class=\"row mb-0\" *ngFor=\"let listItemField of item.listItemFields\">\n <dt class=\"col-12 col-md-5 text-xl-right\">{{ listItemField.label }}</dt>\n <dd class=\"col-12 col-md-7\">{{ listItemField.value || '-' }}</dd>\n </dl>\n </div>\n </div>\n <div class=\"col-12\" *ngIf=\"(items | listFilter: searchModel).length === 0\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && items?.length > 0 && fields?.length > 0\"\n >\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? ('list.showingResult' | translate: {number: (items | listFilter: searchModel).length})\n : ('list.showingResults'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class=\"col-4 text-center\">\n {{ 'list.show' | translate }}\n <select [(ngModel)]=\"pagination.size\" (ngModelChange)=\"setPaginationSize($event)\">\n <option [ngValue]=\"10\">10</option>\n <option [ngValue]=\"25\">25</option>\n <option [ngValue]=\"50\">50</option>\n <option [ngValue]=\"100\">100</option>\n </select>\n {{ 'list.entries' | translate }}\n </div>\n <div class=\"col-4\">\n <ngb-pagination\n *ngIf=\"pagination.collectionSize > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.collectionSize\"\n [(page)]=\"pagination.page\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.maxPaginationItemSize\"\n [rotate]=\"true\"\n (pageChange)=\"onClickPagination(pagination.page)\"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\">\n {{ 'list.noResults' | translate }}\n </div>\n\n <div id=\"no-field-definitions\" class=\"p-5\" *ngIf=\"items?.length > 0 && fields?.length === 0\">\n {{ 'list.noFieldDefinitions' | translate }}\n </div>\n</div>\n\n<ng-template #dropdownActions let-listItemField=\"listItemField\" let-item=\"item\">\n <div class=\"dropdown\" *ngIf=\"listItemField?.value.length > 0\">\n <a\n style=\"cursor: pointer\"\n class=\"dropdown-toggle d-block\"\n id=\"dropdownMenu\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <i class=\"action-icon icon mdi mdi-dots-vertical\"></i>\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenu\">\n <a\n (click)=\"action.callback(item)\"\n class=\"dropdown-item p-2\"\n *ngFor=\"let action of listItemField.value\"\n >\n <ng-container *ngIf=\"action.iconClass !== null\">\n <i [ngClass]=\"action.iconClass\"></i>\n </ng-container>\n {{ action?.label || '-' }}\n </a>\n </div>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.table{table-layout:fixed}.table-responsive{overflow-x:visible}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;padding-left:18px;padding-right:18px;height:80px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}th:first-child,td:first-child{padding-left:25px}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:after{font-family:\"Font Awesome 5 Free\";content:\" \\f0dd\";position:absolute;margin:auto 0 auto 5px;opacity:0;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}.action-icon,.view-icon{font-size:16px!important}\n"], components: [{ type: i1$7.NgbPagination, selector: "ngb-pagination", inputs: ["disabled", "boundaryLinks", "directionLinks", "ellipses", "rotate", "collectionSize", "maxSize", "page", "pageSize", "size"], outputs: ["pageChange"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "async": i1.AsyncPipe, "listFilter": ListFilterPipe, "translate": i1$8.TranslatePipe } });
2181
+ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ListComponent, selector: "valtimo-list", inputs: { items: "items", fields: "fields", pagination: "pagination", viewMode: "viewMode", isSearchable: "isSearchable", header: "header", actions: "actions", paginationIdentifier: "paginationIdentifier", initialSortState: "initialSortState" }, outputs: { rowClicked: "rowClicked", paginationClicked: "paginationClicked", paginationSet: "paginationSet", search: "search", sortChanged: "sortChanged" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], usesOnChanges: true, ngImport: i0, 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>\n <div *ngIf=\"(items?.length > 0 && fields?.length > 0) || header\">\n <div\n class=\"d-flex align-items-center search-holder bg-light\"\n [ngClass]=\"{'pb-4 pt-4': !header}\"\n *ngIf=\"isSearchable || viewMode || header\"\n >\n <div class=\"align-self-start\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"ml-auto row\">\n <input\n *ngIf=\"isSearchable\"\n class=\"form-control col-sm-8\"\n type=\"text\"\n placeholder=\"{{ 'list.search' | translate }}\"\n #searchBox\n />\n\n <div\n class=\"switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0\"\n role=\"group\"\n *ngIf=\"viewMode\"\n >\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'table' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('table')\"\n >\n <i class=\"icon mdi mdi-view-headline view-icon\"></i>\n </button>\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'tile' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('tile')\"\n >\n <i class=\"icon mdi mdi-view-module view-icon\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select=\"[tabs]\"></ng-content>\n\n <div *ngIf=\"items?.length > 0 && fields?.length > 0\">\n <div class=\"table-responsive noSwipe\" *ngIf=\"!viewMode || viewListAs === 'table'\">\n <table class=\"table table-striped table-hover m-0\" *ngIf=\"sort$ | async as sort\">\n <thead>\n <tr>\n <th\n *ngFor=\"let field of fields\"\n (click)=\"handleFieldClick(field.key, field.sortable)\"\n [ngClass]=\"{\n sortable: field.sortable,\n 'is-being-sorted': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === 'ASC'\n }\"\n >\n {{ field.label }}\n </th>\n <th *ngFor=\"let action of actions\">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]=\"{'click-able': this.rowClicked.observers.length > 0}\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <td class=\"align-top\" *ngFor=\"let listItemField of item.listItemFields\">\n <ng-container *ngIf=\"listItemField.type === ''\">\n {{ listItemField.value || '-' }}\n </ng-container>\n\n <ng-container\n *ngIf=\"listItemField.type === 'dropdownActions'\"\n [ngTemplateOutlet]=\"dropdownActions\"\n [ngTemplateOutletContext]=\"{listItemField: listItemField, item: item}\"\n ></ng-container>\n </td>\n <td class=\"align-top\" *ngFor=\"let action of actions\">\n <i\n class=\"action-icon\"\n style=\"cursor: pointer\"\n [ngClass]=\"action.iconClass\"\n (click)=\"action.callback(item)\"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf=\"(items | listFilter: searchModel).length === 0\" [colSpan]=\"fields.length\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"viewMode && viewListAs === 'tile'\">\n <div class=\"row p-2\">\n <div\n class=\"col-12 col-sm-6 col-xl-4 p-2\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <div class=\"click-able tile-holder p-4\">\n <dl class=\"row mb-0\" *ngFor=\"let listItemField of item.listItemFields\">\n <dt class=\"col-12 col-md-5 text-xl-right\">{{ listItemField.label }}</dt>\n <dd class=\"col-12 col-md-7\">{{ listItemField.value || '-' }}</dd>\n </dl>\n </div>\n </div>\n <div class=\"col-12\" *ngIf=\"(items | listFilter: searchModel).length === 0\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && items?.length > 0 && fields?.length > 0\"\n >\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? ('list.showingResult' | translate: {number: (items | listFilter: searchModel).length})\n : ('list.showingResults'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class=\"col-4 text-center\">\n {{ 'list.show' | translate }}\n <select [(ngModel)]=\"pagination.size\" (ngModelChange)=\"setPaginationSize($event)\">\n <option [ngValue]=\"10\">10</option>\n <option [ngValue]=\"25\">25</option>\n <option [ngValue]=\"50\">50</option>\n <option [ngValue]=\"100\">100</option>\n </select>\n {{ 'list.entries' | translate }}\n </div>\n <div class=\"col-4\">\n <ngb-pagination\n *ngIf=\"pagination.collectionSize > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.collectionSize\"\n [(page)]=\"pagination.page\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.maxPaginationItemSize\"\n [rotate]=\"true\"\n (pageChange)=\"onClickPagination(pagination.page)\"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\">\n {{ 'list.noResults' | translate }}\n </div>\n\n <div id=\"no-field-definitions\" class=\"p-5\" *ngIf=\"items?.length > 0 && fields?.length === 0\">\n {{ 'list.noFieldDefinitions' | translate }}\n </div>\n</div>\n\n<ng-template #dropdownActions let-listItemField=\"listItemField\" let-item=\"item\">\n <div class=\"dropdown\" *ngIf=\"listItemField?.value.length > 0\">\n <a\n style=\"cursor: pointer\"\n class=\"dropdown-toggle d-block\"\n id=\"dropdownMenu\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <i class=\"action-icon icon mdi mdi-dots-vertical\"></i>\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenu\">\n <a\n (click)=\"action.callback(item)\"\n class=\"dropdown-item p-2\"\n *ngFor=\"let action of listItemField.value\"\n >\n <ng-container *ngIf=\"action.iconClass !== null\">\n <i [ngClass]=\"action.iconClass\"></i>\n </ng-container>\n {{ action?.label || '-' }}\n </a>\n </div>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.table{table-layout:fixed}.table-responsive{overflow-x:visible}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;padding-left:18px;padding-right:18px;height:80px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}th:first-child,td:first-child{padding-left:25px}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:after{font-family:\"Font Awesome 5 Free\";content:\" \\f0dd\";position:absolute;margin:auto 0 auto 5px;opacity:0;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}.action-icon,.view-icon{font-size:16px!important}\n"], components: [{ type: i1$7.NgbPagination, selector: "ngb-pagination", inputs: ["disabled", "boundaryLinks", "directionLinks", "ellipses", "rotate", "collectionSize", "maxSize", "page", "pageSize", "size"], outputs: ["pageChange"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "translate": i1$8.TranslatePipe, "async": i1.AsyncPipe, "listFilter": ListFilterPipe } });
2165
2182
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ListComponent, decorators: [{
2166
2183
  type: Component,
2167
- args: [{ selector: 'valtimo-list', 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>\n <div *ngIf=\"(items?.length > 0 && fields?.length > 0) || header\">\n <div\n class=\"d-flex align-items-center search-holder bg-light\"\n [ngClass]=\"{'pb-4 pt-4': !header}\"\n *ngIf=\"isSearchable || viewMode || header\"\n >\n <div class=\"align-self-start\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"ml-auto row\">\n <input\n *ngIf=\"isSearchable\"\n class=\"form-control col-sm-8\"\n type=\"text\"\n placeholder=\"Search...\"\n #searchBox\n />\n\n <div\n class=\"switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0\"\n role=\"group\"\n *ngIf=\"viewMode\"\n >\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'table' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('table')\"\n >\n <i class=\"icon mdi mdi-view-headline view-icon\"></i>\n </button>\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'tile' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('tile')\"\n >\n <i class=\"icon mdi mdi-view-module view-icon\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select=\"[tabs]\"></ng-content>\n\n <div *ngIf=\"items?.length > 0 && fields?.length > 0\">\n <div class=\"table-responsive noSwipe\" *ngIf=\"!viewMode || viewListAs === 'table'\">\n <table class=\"table table-striped table-hover m-0\" *ngIf=\"sort$ | async as sort\">\n <thead>\n <tr>\n <th\n *ngFor=\"let field of fields\"\n (click)=\"handleFieldClick(field.key, field.sortable)\"\n [ngClass]=\"{\n sortable: field.sortable,\n 'is-being-sorted': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === 'ASC'\n }\"\n >\n {{ field.label }}\n </th>\n <th *ngFor=\"let action of actions\">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]=\"{'click-able': this.rowClicked.observers.length > 0}\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <td class=\"align-top\" *ngFor=\"let listItemField of item.listItemFields\">\n <ng-container *ngIf=\"listItemField.type === ''\">\n {{ listItemField.value || '-' }}\n </ng-container>\n\n <ng-container\n *ngIf=\"listItemField.type === 'dropdownActions'\"\n [ngTemplateOutlet]=\"dropdownActions\"\n [ngTemplateOutletContext]=\"{listItemField: listItemField, item: item}\"\n ></ng-container>\n </td>\n <td class=\"align-top\" *ngFor=\"let action of actions\">\n <i\n class=\"action-icon\"\n style=\"cursor: pointer\"\n [ngClass]=\"action.iconClass\"\n (click)=\"action.callback(item)\"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf=\"(items | listFilter: searchModel).length === 0\" [colSpan]=\"fields.length\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"viewMode && viewListAs === 'tile'\">\n <div class=\"row p-2\">\n <div\n class=\"col-12 col-sm-6 col-xl-4 p-2\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <div class=\"click-able tile-holder p-4\">\n <dl class=\"row mb-0\" *ngFor=\"let listItemField of item.listItemFields\">\n <dt class=\"col-12 col-md-5 text-xl-right\">{{ listItemField.label }}</dt>\n <dd class=\"col-12 col-md-7\">{{ listItemField.value || '-' }}</dd>\n </dl>\n </div>\n </div>\n <div class=\"col-12\" *ngIf=\"(items | listFilter: searchModel).length === 0\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && items?.length > 0 && fields?.length > 0\"\n >\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? ('list.showingResult' | translate: {number: (items | listFilter: searchModel).length})\n : ('list.showingResults'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class=\"col-4 text-center\">\n {{ 'list.show' | translate }}\n <select [(ngModel)]=\"pagination.size\" (ngModelChange)=\"setPaginationSize($event)\">\n <option [ngValue]=\"10\">10</option>\n <option [ngValue]=\"25\">25</option>\n <option [ngValue]=\"50\">50</option>\n <option [ngValue]=\"100\">100</option>\n </select>\n {{ 'list.entries' | translate }}\n </div>\n <div class=\"col-4\">\n <ngb-pagination\n *ngIf=\"pagination.collectionSize > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.collectionSize\"\n [(page)]=\"pagination.page\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.maxPaginationItemSize\"\n [rotate]=\"true\"\n (pageChange)=\"onClickPagination(pagination.page)\"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\">\n {{ 'list.noResults' | translate }}\n </div>\n\n <div id=\"no-field-definitions\" class=\"p-5\" *ngIf=\"items?.length > 0 && fields?.length === 0\">\n {{ 'list.noFieldDefinitions' | translate }}\n </div>\n</div>\n\n<ng-template #dropdownActions let-listItemField=\"listItemField\" let-item=\"item\">\n <div class=\"dropdown\" *ngIf=\"listItemField?.value.length > 0\">\n <a\n style=\"cursor: pointer\"\n class=\"dropdown-toggle d-block\"\n id=\"dropdownMenu\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <i class=\"action-icon icon mdi mdi-dots-vertical\"></i>\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenu\">\n <a\n (click)=\"action.callback(item)\"\n class=\"dropdown-item p-2\"\n *ngFor=\"let action of listItemField.value\"\n >\n <ng-container *ngIf=\"action.iconClass !== null\">\n <i [ngClass]=\"action.iconClass\"></i>\n </ng-container>\n {{ action?.label || '-' }}\n </a>\n </div>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.table{table-layout:fixed}.table-responsive{overflow-x:visible}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;padding-left:18px;padding-right:18px;height:80px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}th:first-child,td:first-child{padding-left:25px}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:after{font-family:\"Font Awesome 5 Free\";content:\" \\f0dd\";position:absolute;margin:auto 0 auto 5px;opacity:0;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}.action-icon,.view-icon{font-size:16px!important}\n"] }]
2184
+ args: [{ selector: 'valtimo-list', 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>\n <div *ngIf=\"(items?.length > 0 && fields?.length > 0) || header\">\n <div\n class=\"d-flex align-items-center search-holder bg-light\"\n [ngClass]=\"{'pb-4 pt-4': !header}\"\n *ngIf=\"isSearchable || viewMode || header\"\n >\n <div class=\"align-self-start\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"ml-auto row\">\n <input\n *ngIf=\"isSearchable\"\n class=\"form-control col-sm-8\"\n type=\"text\"\n placeholder=\"{{ 'list.search' | translate }}\"\n #searchBox\n />\n\n <div\n class=\"switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0\"\n role=\"group\"\n *ngIf=\"viewMode\"\n >\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'table' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('table')\"\n >\n <i class=\"icon mdi mdi-view-headline view-icon\"></i>\n </button>\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'tile' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('tile')\"\n >\n <i class=\"icon mdi mdi-view-module view-icon\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select=\"[tabs]\"></ng-content>\n\n <div *ngIf=\"items?.length > 0 && fields?.length > 0\">\n <div class=\"table-responsive noSwipe\" *ngIf=\"!viewMode || viewListAs === 'table'\">\n <table class=\"table table-striped table-hover m-0\" *ngIf=\"sort$ | async as sort\">\n <thead>\n <tr>\n <th\n *ngFor=\"let field of fields\"\n (click)=\"handleFieldClick(field.key, field.sortable)\"\n [ngClass]=\"{\n sortable: field.sortable,\n 'is-being-sorted': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === 'ASC'\n }\"\n >\n {{ field.label }}\n </th>\n <th *ngFor=\"let action of actions\">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]=\"{'click-able': this.rowClicked.observers.length > 0}\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <td class=\"align-top\" *ngFor=\"let listItemField of item.listItemFields\">\n <ng-container *ngIf=\"listItemField.type === ''\">\n {{ listItemField.value || '-' }}\n </ng-container>\n\n <ng-container\n *ngIf=\"listItemField.type === 'dropdownActions'\"\n [ngTemplateOutlet]=\"dropdownActions\"\n [ngTemplateOutletContext]=\"{listItemField: listItemField, item: item}\"\n ></ng-container>\n </td>\n <td class=\"align-top\" *ngFor=\"let action of actions\">\n <i\n class=\"action-icon\"\n style=\"cursor: pointer\"\n [ngClass]=\"action.iconClass\"\n (click)=\"action.callback(item)\"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf=\"(items | listFilter: searchModel).length === 0\" [colSpan]=\"fields.length\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"viewMode && viewListAs === 'tile'\">\n <div class=\"row p-2\">\n <div\n class=\"col-12 col-sm-6 col-xl-4 p-2\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <div class=\"click-able tile-holder p-4\">\n <dl class=\"row mb-0\" *ngFor=\"let listItemField of item.listItemFields\">\n <dt class=\"col-12 col-md-5 text-xl-right\">{{ listItemField.label }}</dt>\n <dd class=\"col-12 col-md-7\">{{ listItemField.value || '-' }}</dd>\n </dl>\n </div>\n </div>\n <div class=\"col-12\" *ngIf=\"(items | listFilter: searchModel).length === 0\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && items?.length > 0 && fields?.length > 0\"\n >\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? ('list.showingResult' | translate: {number: (items | listFilter: searchModel).length})\n : ('list.showingResults'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class=\"col-4 text-center\">\n {{ 'list.show' | translate }}\n <select [(ngModel)]=\"pagination.size\" (ngModelChange)=\"setPaginationSize($event)\">\n <option [ngValue]=\"10\">10</option>\n <option [ngValue]=\"25\">25</option>\n <option [ngValue]=\"50\">50</option>\n <option [ngValue]=\"100\">100</option>\n </select>\n {{ 'list.entries' | translate }}\n </div>\n <div class=\"col-4\">\n <ngb-pagination\n *ngIf=\"pagination.collectionSize > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.collectionSize\"\n [(page)]=\"pagination.page\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.maxPaginationItemSize\"\n [rotate]=\"true\"\n (pageChange)=\"onClickPagination(pagination.page)\"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\">\n {{ 'list.noResults' | translate }}\n </div>\n\n <div id=\"no-field-definitions\" class=\"p-5\" *ngIf=\"items?.length > 0 && fields?.length === 0\">\n {{ 'list.noFieldDefinitions' | translate }}\n </div>\n</div>\n\n<ng-template #dropdownActions let-listItemField=\"listItemField\" let-item=\"item\">\n <div class=\"dropdown\" *ngIf=\"listItemField?.value.length > 0\">\n <a\n style=\"cursor: pointer\"\n class=\"dropdown-toggle d-block\"\n id=\"dropdownMenu\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <i class=\"action-icon icon mdi mdi-dots-vertical\"></i>\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenu\">\n <a\n (click)=\"action.callback(item)\"\n class=\"dropdown-item p-2\"\n *ngFor=\"let action of listItemField.value\"\n >\n <ng-container *ngIf=\"action.iconClass !== null\">\n <i [ngClass]=\"action.iconClass\"></i>\n </ng-container>\n {{ action?.label || '-' }}\n </a>\n </div>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.table{table-layout:fixed}.table-responsive{overflow-x:visible}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;padding-left:18px;padding-right:18px;height:80px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}th:first-child,td:first-child{padding-left:25px}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:after{font-family:\"Font Awesome 5 Free\";content:\" \\f0dd\";position:absolute;margin:auto 0 auto 5px;opacity:0;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}.action-icon,.view-icon{font-size:16px!important}\n"] }]
2168
2185
  }], ctorParameters: function () { return [{ type: ViewContentService }, { type: i4.NGXLogger }]; }, propDecorators: { items: [{
2169
2186
  type: Input
2170
2187
  }], fields: [{
@@ -3572,7 +3589,9 @@ class FormioComponent {
3572
3589
  this.change = new EventEmitter();
3573
3590
  this.refreshForm = new EventEmitter();
3574
3591
  this.errors = [];
3575
- this.currentLanguage$ = new BehaviorSubject(this.translateService.currentLang);
3592
+ this.currentLanguage$ = this.translateService
3593
+ .stream('key')
3594
+ .pipe(map$1(() => this.translateService.currentLang));
3576
3595
  }
3577
3596
  ngOnInit() {
3578
3597
  const documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName');
@@ -3587,7 +3606,6 @@ class FormioComponent {
3587
3606
  this.stateService.setDocumentId(documentId);
3588
3607
  }
3589
3608
  this.subscribeFormRefresh();
3590
- this.openLanguageSubscription();
3591
3609
  }
3592
3610
  ngOnChanges(changes) {
3593
3611
  this.formDefinition = changes.form.currentValue;
@@ -3599,10 +3617,9 @@ class FormioComponent {
3599
3617
  }
3600
3618
  }
3601
3619
  ngOnDestroy() {
3602
- var _a, _b;
3620
+ var _a;
3603
3621
  this.unsubscribeFormRefresh();
3604
3622
  (_a = this.tokenRefreshTimerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
3605
- (_b = this.languageSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
3606
3623
  }
3607
3624
  reloadForm() {
3608
3625
  this.refreshForm.emit({
@@ -3674,17 +3691,12 @@ class FormioComponent {
3674
3691
  this.formRefreshSubscription.unsubscribe();
3675
3692
  }
3676
3693
  }
3677
- openLanguageSubscription() {
3678
- this.languageSubscription = this.translateService.stream('key').subscribe(() => {
3679
- this.currentLanguage$.next(this.translateService.currentLang);
3680
- });
3681
- }
3682
3694
  }
3683
3695
  FormioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormioComponent, deps: [{ token: i1$6.UserProviderService }, { token: i4.NGXLogger }, { token: FormIoStateService }, { token: i1$5.ActivatedRoute }, { token: i1$8.TranslateService }, { token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
3684
- FormioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormioComponent, selector: "valtimo-form-io", inputs: { form: "form", options: "options", submission: "submission", formRefresh$: "formRefresh$" }, outputs: { submit: "submit", change: "change" }, usesOnChanges: true, ngImport: i0, 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>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [refresh]=\"refreshForm\"\n [options]=\"options\"\n [language]=\"currentLanguage$ | async\"\n (submit)=\"onSubmit($event)\"\n (ready)=\"formReady($event)\"\n (change)=\"onChange($event)\"\n (nextPage)=\"nextPage()\"\n (prevPage)=\"prevPage()\"\n ></formio>\n</div>\n", styles: [""], components: [{ type: i7.FormioComponent, selector: "formio" }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe } });
3696
+ FormioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormioComponent, selector: "valtimo-form-io", inputs: { form: "form", options: "options", submission: "submission", formRefresh$: "formRefresh$" }, outputs: { submit: "submit", change: "change" }, usesOnChanges: true, ngImport: i0, 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>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n *ngIf=\"currentLanguage$ | async as currentLanguage\"\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [refresh]=\"refreshForm\"\n [options]=\"options\"\n [language]=\"currentLanguage\"\n (submit)=\"onSubmit($event)\"\n (ready)=\"formReady($event)\"\n (change)=\"onChange($event)\"\n (nextPage)=\"nextPage()\"\n (prevPage)=\"prevPage()\"\n ></formio>\n</div>\n", styles: [""], components: [{ type: i7.FormioComponent, selector: "formio" }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe } });
3685
3697
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormioComponent, decorators: [{
3686
3698
  type: Component,
3687
- args: [{ selector: 'valtimo-form-io', 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>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [refresh]=\"refreshForm\"\n [options]=\"options\"\n [language]=\"currentLanguage$ | async\"\n (submit)=\"onSubmit($event)\"\n (ready)=\"formReady($event)\"\n (change)=\"onChange($event)\"\n (nextPage)=\"nextPage()\"\n (prevPage)=\"prevPage()\"\n ></formio>\n</div>\n", styles: [""] }]
3699
+ args: [{ selector: 'valtimo-form-io', 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>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n *ngIf=\"currentLanguage$ | async as currentLanguage\"\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [refresh]=\"refreshForm\"\n [options]=\"options\"\n [language]=\"currentLanguage\"\n (submit)=\"onSubmit($event)\"\n (ready)=\"formReady($event)\"\n (change)=\"onChange($event)\"\n (nextPage)=\"nextPage()\"\n (prevPage)=\"prevPage()\"\n ></formio>\n</div>\n", styles: [""] }]
3688
3700
  }], ctorParameters: function () { return [{ type: i1$6.UserProviderService }, { type: i4.NGXLogger }, { type: FormIoStateService }, { type: i1$5.ActivatedRoute }, { type: i1$8.TranslateService }, { type: ValtimoModalService }]; }, propDecorators: { form: [{
3689
3701
  type: Input
3690
3702
  }], options: [{
@@ -4247,45 +4259,194 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4247
4259
  * See the License for the specific language governing permissions and
4248
4260
  * limitations under the License.
4249
4261
  */
4250
- class FormIoModule {
4262
+ class DocumentenApiMetadataModalComponent {
4263
+ constructor(modalService, translateService, route, documentService, keycloakService, valtimoModalService) {
4264
+ var _a, _b, _c;
4265
+ this.modalService = modalService;
4266
+ this.translateService = translateService;
4267
+ this.route = route;
4268
+ this.documentService = documentService;
4269
+ this.keycloakService = keycloakService;
4270
+ this.valtimoModalService = valtimoModalService;
4271
+ this.documentTitle = '';
4272
+ this.metadata = new EventEmitter();
4273
+ this.CONFIDENTIALITY_LEVELS = [
4274
+ 'openbaar',
4275
+ 'beperkt_openbaar',
4276
+ 'intern',
4277
+ 'zaakvertrouwelijk',
4278
+ 'vertrouwelijk',
4279
+ 'confidentieel',
4280
+ 'geheim',
4281
+ 'zeer_geheim',
4282
+ ];
4283
+ this.confidentialityLevelItems$ = this.translateService
4284
+ .stream('key')
4285
+ .pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
4286
+ id: confidentialityLevel,
4287
+ text: this.translateService.instant(`document.${confidentialityLevel}`),
4288
+ }))));
4289
+ this.ADDITONAL_DOCUMENT_DATE_OPTIONS = [
4290
+ {
4291
+ value: 'neither',
4292
+ translationKey: 'document.noAdditionalDate',
4293
+ },
4294
+ {
4295
+ value: 'sent',
4296
+ translationKey: 'document.sendDate',
4297
+ },
4298
+ {
4299
+ value: 'received',
4300
+ translationKey: 'document.receiptDate',
4301
+ },
4302
+ ];
4303
+ this.clearStatusSelection$ = new Subject();
4304
+ this.additionalDocumentDate$ = new BehaviorSubject('neither');
4305
+ this.STATUSES = [
4306
+ 'in_bewerking',
4307
+ 'ter_vaststelling',
4308
+ 'definitief',
4309
+ 'gearchiveerd',
4310
+ ];
4311
+ this.RECEIPT_STATUSES = ['definitief', 'gearchiveerd'];
4312
+ this.formData$ = new BehaviorSubject(null);
4313
+ this.statusItems$ = combineLatest([
4314
+ this.additionalDocumentDate$,
4315
+ this.translateService.stream('key'),
4316
+ ]).pipe(tap(([additionalDocumentDate]) => {
4317
+ this.formData$.pipe(take$1(1)).subscribe(formData => {
4318
+ if (additionalDocumentDate === 'received' &&
4319
+ (formData.status === 'in_bewerking' || formData.status === 'ter_vaststelling')) {
4320
+ this.clearStatusSelection$.next(null);
4321
+ }
4322
+ });
4323
+ }), map(([additionalDocumentDate]) => (additionalDocumentDate === 'received' ? this.RECEIPT_STATUSES : this.STATUSES).map(status => ({
4324
+ id: status,
4325
+ text: this.translateService.instant(`document.${status}`),
4326
+ }))));
4327
+ this.LANGUAGES = ['nld', 'eng', 'deu'];
4328
+ this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
4329
+ id: language,
4330
+ text: this.translateService.instant(`document.${language}`),
4331
+ }))));
4332
+ this.documentTypeItems$ = combineLatest([
4333
+ ((_a = this.route) === null || _a === void 0 ? void 0 : _a.params) || of(null),
4334
+ ((_c = (_b = this.route) === null || _b === void 0 ? void 0 : _b.firstChild) === null || _c === void 0 ? void 0 : _c.params) || of(null),
4335
+ this.valtimoModalService.documentDefinitionName$,
4336
+ ]).pipe(filter$1(([params, firstChildParams, documentDefinitionName]) => !!((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
4337
+ (firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
4338
+ documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.documentService.getDocumentTypes((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
4339
+ (firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
4340
+ documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
4341
+ this.showForm$ = this.modalService.modalVisible$;
4342
+ this.valid$ = new BehaviorSubject(false);
4343
+ this.userEmail$ = from(this.keycloakService.loadUserProfile()).pipe(map(userProfile => (userProfile === null || userProfile === void 0 ? void 0 : userProfile.email) || ''));
4344
+ }
4345
+ ngOnInit() {
4346
+ this.openShowSubscription();
4347
+ this.openHideSubscription();
4348
+ }
4349
+ ngOnDestroy() {
4350
+ var _a, _b;
4351
+ (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
4352
+ (_b = this.hideSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
4353
+ }
4354
+ hide() {
4355
+ this.formData$.next(null);
4356
+ this.valid$.next(false);
4357
+ this.additionalDocumentDate$.next('neither');
4358
+ this.modalService.closeModal();
4359
+ }
4360
+ cancel() {
4361
+ this.hide();
4362
+ }
4363
+ save() {
4364
+ combineLatest([this.valid$, this.formData$])
4365
+ .pipe(take$1(1))
4366
+ .subscribe(([valid, formData]) => {
4367
+ if (valid) {
4368
+ this.metadata.emit(formData);
4369
+ }
4370
+ });
4371
+ }
4372
+ formValueChange(data) {
4373
+ this.formData$.next(data);
4374
+ this.setValid(data);
4375
+ }
4376
+ setAdditionalDate(value) {
4377
+ this.additionalDocumentDate$.next(value);
4378
+ }
4379
+ setValid(data) {
4380
+ this.valid$.next(!!(data.filename &&
4381
+ data.title &&
4382
+ data.author &&
4383
+ data.creationDate &&
4384
+ data.status &&
4385
+ data.language &&
4386
+ data.informatieobjecttype));
4387
+ }
4388
+ openShowSubscription() {
4389
+ this.showSubscription = this.show$.subscribe(() => {
4390
+ this.modalService.openModal(this.documentenApiMetadataModal);
4391
+ });
4392
+ }
4393
+ openHideSubscription() {
4394
+ this.hideSubscription = this.hide$.subscribe(() => {
4395
+ this.hide();
4396
+ });
4397
+ }
4251
4398
  }
4252
- FormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4253
- FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent], imports: [CommonModule,
4254
- FormioModule,
4255
- DropzoneModule,
4256
- TranslateModule,
4257
- DocumentModule,
4258
- FileSizeModule,
4259
- ResourceModule,
4260
- RouterModule], exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent] });
4261
- FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }], imports: [[
4262
- CommonModule,
4263
- FormioModule,
4264
- DropzoneModule,
4265
- TranslateModule,
4266
- DocumentModule,
4267
- FileSizeModule,
4268
- ResourceModule,
4269
- RouterModule,
4270
- ]] });
4271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, decorators: [{
4272
- type: NgModule,
4273
- args: [{
4274
- imports: [
4275
- CommonModule,
4276
- FormioModule,
4277
- DropzoneModule,
4278
- TranslateModule,
4279
- DocumentModule,
4280
- FileSizeModule,
4281
- ResourceModule,
4282
- RouterModule,
4283
- ],
4284
- declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
4285
- exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
4286
- providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }],
4287
- }]
4288
- }] });
4399
+ DocumentenApiMetadataModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, deps: [{ token: i1$4.ModalService }, { token: i1$8.TranslateService }, { token: i1$5.ActivatedRoute }, { token: i2.DocumentService }, { token: i1$2.KeycloakService }, { token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
4400
+ DocumentenApiMetadataModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: { show$: "show$", hide$: "hide$", disabled$: "disabled$", file$: "file$", documentTitle: "documentTitle", disableDocumentTitle: "disableDocumentTitle", filename: "filename", disableFilename: "disableFilename", author: "author", disableAuthor: "disableAuthor", status: "status", disableStatus: "disableStatus", language: "language", disableLanguage: "disableLanguage", documentType: "documentType", disableDocumentType: "disableDocumentType", description: "description", disableDescription: "disableDescription", confidentialityLevel: "confidentialityLevel", disableConfidentialityLevel: "disableConfidentialityLevel" }, outputs: { metadata: "metadata" }, viewQueries: [{ propertyName: "documentenApiMetadataModal", first: true, predicate: ["documentenApiMetadataModal"], descendants: true }], ngImport: i0, 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<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"additionalDocumentDate$ | async as additionalDate\"\n >\n <v-input\n [defaultValue]=\"filename || obs.file?.name\"\n [disabled]=\"obs.disabled || disableFilename\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"documentTitle\"\n [disabled]=\"obs.disabled || disableDocumentTitle\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"author || (userEmail$ | async)\"\n [disabled]=\"obs.disabled || disableAuthor\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelectionId]=\"language || languageItems[0].id\"\n [disabled]=\"obs.disabled || disableLanguage\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [defaultSelectionId]=\"documentType\"\n [disabled]=\"obs.disabled || disableDocumentType\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <ng-container\n *ngTemplateOutlet=\"additionalDatePicker; context: {additionalDate: additionalDate}\"\n ></ng-container>\n <v-date-picker\n *ngIf=\"additionalDate === 'received'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n *ngIf=\"additionalDate === 'sent'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-select\n [defaultSelectionId]=\"status\"\n [disabled]=\"obs.disabled || disableStatus\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n [clearSelectionSubject$]=\"clearStatusSelection$\"\n name=\"status\"\n ></v-select>\n <v-input\n [defaultValue]=\"description\"\n [disabled]=\"obs.disabled || disableDescription\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [defaultSelectionId]=\"confidentialityLevel\"\n [disabled]=\"obs.disabled || disableConfidentialityLevel\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template #additionalDatePicker let-additionalDate=\"additionalDate\">\n <v-input-label\n [title]=\"'document.additionalDate' | translate\"\n [name]=\"'additionalDate'\"\n [tooltip]=\"'document.additionalDateTooltip' | translate\"\n [required]=\"true\"\n >\n </v-input-label>\n <div class=\"col-12 col-sm-8 col-lg-6 form-check mt-1 additional-date\">\n <label\n class=\"custom-control custom-radio custom-control-inline\"\n *ngFor=\"let option of ADDITONAL_DOCUMENT_DATE_OPTIONS\"\n (click)=\"setAdditionalDate(option.value)\"\n >\n <input\n class=\"custom-control-input\"\n type=\"radio\"\n name=\"radio-inline\"\n [checked]=\"additionalDate === option.value\"\n /><span class=\"custom-control-label\">{{ option.translationKey | translate }}</span>\n </label>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}.additional-date{padding:0;width:100%;max-width:100%;margin:0;margin-block-end:var(--v-input-margin)}.additional-date .custom-control{margin-bottom:0}\n"], components: [{ type: i1$4.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { type: i1$4.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { type: i1$4.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { type: i1$4.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { type: i1$4.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel"], outputs: ["valueChange"] }, { type: i1$4.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { type: i1$4.DatePickerComponent, selector: "v-date-picker", inputs: ["name", "title", "titleTranslationKey", "widthPx", "fullWidth", "margin", "disabled", "tooltip", "required", "defaultDate", "defaultDateIsToday", "smallLabel"], outputs: ["valueChange"] }, { type: i1$4.InputLabelComponent, selector: "v-input-label", inputs: ["name", "title", "titleTranslationKey", "tooltip", "required", "largeMargin", "small"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe } });
4401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
4402
+ type: Component,
4403
+ args: [{ selector: 'valtimo-documenten-api-metadata-modal', 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<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"additionalDocumentDate$ | async as additionalDate\"\n >\n <v-input\n [defaultValue]=\"filename || obs.file?.name\"\n [disabled]=\"obs.disabled || disableFilename\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"documentTitle\"\n [disabled]=\"obs.disabled || disableDocumentTitle\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"author || (userEmail$ | async)\"\n [disabled]=\"obs.disabled || disableAuthor\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelectionId]=\"language || languageItems[0].id\"\n [disabled]=\"obs.disabled || disableLanguage\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [defaultSelectionId]=\"documentType\"\n [disabled]=\"obs.disabled || disableDocumentType\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <ng-container\n *ngTemplateOutlet=\"additionalDatePicker; context: {additionalDate: additionalDate}\"\n ></ng-container>\n <v-date-picker\n *ngIf=\"additionalDate === 'received'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n *ngIf=\"additionalDate === 'sent'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-select\n [defaultSelectionId]=\"status\"\n [disabled]=\"obs.disabled || disableStatus\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n [clearSelectionSubject$]=\"clearStatusSelection$\"\n name=\"status\"\n ></v-select>\n <v-input\n [defaultValue]=\"description\"\n [disabled]=\"obs.disabled || disableDescription\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [defaultSelectionId]=\"confidentialityLevel\"\n [disabled]=\"obs.disabled || disableConfidentialityLevel\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template #additionalDatePicker let-additionalDate=\"additionalDate\">\n <v-input-label\n [title]=\"'document.additionalDate' | translate\"\n [name]=\"'additionalDate'\"\n [tooltip]=\"'document.additionalDateTooltip' | translate\"\n [required]=\"true\"\n >\n </v-input-label>\n <div class=\"col-12 col-sm-8 col-lg-6 form-check mt-1 additional-date\">\n <label\n class=\"custom-control custom-radio custom-control-inline\"\n *ngFor=\"let option of ADDITONAL_DOCUMENT_DATE_OPTIONS\"\n (click)=\"setAdditionalDate(option.value)\"\n >\n <input\n class=\"custom-control-input\"\n type=\"radio\"\n name=\"radio-inline\"\n [checked]=\"additionalDate === option.value\"\n /><span class=\"custom-control-label\">{{ option.translationKey | translate }}</span>\n </label>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}.additional-date{padding:0;width:100%;max-width:100%;margin:0;margin-block-end:var(--v-input-margin)}.additional-date .custom-control{margin-bottom:0}\n"] }]
4404
+ }], ctorParameters: function () { return [{ type: i1$4.ModalService }, { type: i1$8.TranslateService }, { type: i1$5.ActivatedRoute }, { type: i2.DocumentService }, { type: i1$2.KeycloakService }, { type: ValtimoModalService }]; }, propDecorators: { documentenApiMetadataModal: [{
4405
+ type: ViewChild,
4406
+ args: ['documentenApiMetadataModal']
4407
+ }], show$: [{
4408
+ type: Input
4409
+ }], hide$: [{
4410
+ type: Input
4411
+ }], disabled$: [{
4412
+ type: Input
4413
+ }], file$: [{
4414
+ type: Input
4415
+ }], documentTitle: [{
4416
+ type: Input
4417
+ }], disableDocumentTitle: [{
4418
+ type: Input
4419
+ }], filename: [{
4420
+ type: Input
4421
+ }], disableFilename: [{
4422
+ type: Input
4423
+ }], author: [{
4424
+ type: Input
4425
+ }], disableAuthor: [{
4426
+ type: Input
4427
+ }], status: [{
4428
+ type: Input
4429
+ }], disableStatus: [{
4430
+ type: Input
4431
+ }], language: [{
4432
+ type: Input
4433
+ }], disableLanguage: [{
4434
+ type: Input
4435
+ }], documentType: [{
4436
+ type: Input
4437
+ }], disableDocumentType: [{
4438
+ type: Input
4439
+ }], description: [{
4440
+ type: Input
4441
+ }], disableDescription: [{
4442
+ type: Input
4443
+ }], confidentialityLevel: [{
4444
+ type: Input
4445
+ }], disableConfidentialityLevel: [{
4446
+ type: Input
4447
+ }], metadata: [{
4448
+ type: Output
4449
+ }] } });
4289
4450
 
4290
4451
  /*
4291
4452
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -4302,54 +4463,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4302
4463
  * See the License for the specific language governing permissions and
4303
4464
  * limitations under the License.
4304
4465
  */
4305
- class ModalComponent {
4306
- constructor(modalService) {
4466
+ class DocumentenApiUploaderComponent {
4467
+ constructor(uploadProviderService, stateService, domService, downloadService, modalService, userProviderService, route) {
4468
+ var _a, _b, _c;
4469
+ this.uploadProviderService = uploadProviderService;
4470
+ this.stateService = stateService;
4471
+ this.domService = domService;
4472
+ this.downloadService = downloadService;
4307
4473
  this.modalService = modalService;
4308
- this.title = '';
4309
- this.subtitle = '';
4310
- this.showFooter = false;
4311
- }
4312
- ngOnInit() {
4313
- this.openScrollSubscription();
4474
+ this.userProviderService = userProviderService;
4475
+ this.route = route;
4476
+ this.valueChange = new EventEmitter();
4477
+ this.uploading$ = new BehaviorSubject(false);
4478
+ this.fileToBeUploaded$ = new BehaviorSubject(null);
4479
+ this.modalDisabled$ = new BehaviorSubject(false);
4480
+ this.showModal$ = new Subject();
4481
+ this.hideModal$ = new Subject();
4482
+ this.uploadProcessLinked$ = combineLatest([
4483
+ ((_a = this.route) === null || _a === void 0 ? void 0 : _a.params) || of(null),
4484
+ ((_c = (_b = this.route) === null || _b === void 0 ? void 0 : _b.firstChild) === null || _c === void 0 ? void 0 : _c.params) || of(null),
4485
+ this.modalService.documentDefinitionName$,
4486
+ ]).pipe(filter(([params, firstChildParams, documentDefinitionName]) => !!((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
4487
+ (firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
4488
+ documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.uploadProviderService.checkUploadProcessLink((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
4489
+ (firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
4490
+ documentDefinitionName)), startWith('loading'));
4491
+ this.isAdmin$ = this.userProviderService
4492
+ .getUserSubject()
4493
+ .pipe(map$1(userIdentity => userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.roles.includes('ROLE_ADMIN')));
4494
+ this._value = [];
4314
4495
  }
4315
- ngAfterViewInit() {
4316
- $(`#${this.elementId}`).modal({ show: false });
4496
+ get value() {
4497
+ return this._value;
4317
4498
  }
4318
- show() {
4319
- $(`#${this.elementId}`).modal('show');
4499
+ set value(value) {
4500
+ if (Array.isArray(value)) {
4501
+ this._value = value;
4502
+ }
4320
4503
  }
4321
- hide() {
4322
- $(`#${this.elementId}`).modal('hide');
4504
+ fileSelected(file) {
4505
+ this.fileToBeUploaded$.next(file);
4506
+ this.showModal$.next(null);
4323
4507
  }
4324
- ngOnDestroy() {
4325
- this.scrollSubscription.unsubscribe();
4508
+ deleteFile(id) {
4509
+ this.domService.toggleSubmitButton(true);
4510
+ this._value = this._value.filter((file) => (file === null || file === void 0 ? void 0 : file.id) ? (file === null || file === void 0 ? void 0 : file.id) !== id : true);
4511
+ this.valueChange.emit(this._value);
4326
4512
  }
4327
- openScrollSubscription() {
4328
- this.scrollSubscription = this.modalService.scrollToTop$.subscribe(() => {
4329
- const element = this.scrollModal.nativeElement;
4330
- if (element)
4331
- element.scrollTo(0, 0);
4332
- });
4513
+ metadataSet(metadata) {
4514
+ this.uploading$.next(true);
4515
+ this.hideModal$.next(null);
4516
+ this.domService.toggleSubmitButton(true);
4517
+ this.fileToBeUploaded$
4518
+ .pipe(take(1), switchMap(file => this.uploadProviderService.uploadTempFileWithMetadata(file, metadata)), tap(result => {
4519
+ this.domService.toggleSubmitButton(false);
4520
+ this.uploading$.next(false);
4521
+ this._value.push(result);
4522
+ this.valueChange.emit(this._value);
4523
+ }))
4524
+ .subscribe();
4333
4525
  }
4334
4526
  }
4335
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, deps: [{ token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
4336
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ModalComponent, selector: "valtimo-modal", inputs: { elementId: "elementId", title: "title", subtitle: "subtitle", templateBelowSubtitle: "templateBelowSubtitle", showFooter: "showFooter" }, viewQueries: [{ propertyName: "scrollModal", first: true, predicate: ["scrollModal"], descendants: true }], ngImport: i0, 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=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\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>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
4337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, decorators: [{
4527
+ DocumentenApiUploaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiUploaderComponent, deps: [{ token: i1$a.UploadProviderService }, { token: FormIoStateService }, { token: FormIoDomService }, { token: i1$a.DownloadService }, { token: ValtimoModalService }, { token: i1$6.UserProviderService }, { token: i1$5.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
4528
+ DocumentenApiUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DocumentenApiUploaderComponent, selector: "valtimo-documenten-api-formio-uploader", inputs: { disabled: "disabled", title: "title", hideTitle: "hideTitle", subtitle: "subtitle", maxFileSize: "maxFileSize", hideMaxFileSize: "hideMaxFileSize", camera: "camera", documentTitle: "documentTitle", disableDocumentTitle: "disableDocumentTitle", filename: "filename", disableFilename: "disableFilename", author: "author", disableAuthor: "disableAuthor", status: "status", disableStatus: "disableStatus", language: "language", disableLanguage: "disableLanguage", documentType: "documentType", disableDocumentType: "disableDocumentType", description: "description", disableDescription: "disableDescription", confidentialityLevel: "confidentialityLevel", disableConfidentialityLevel: "disableConfidentialityLevel", value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, 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 *ngIf=\"{linked: uploadProcessLinked$ | async, isAdmin: isAdmin$ | async} as obs\">\n <div *ngIf=\"obs.linked === false\">\n <div\n *ngIf=\"obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.adminRole'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n <div\n *ngIf=\"!obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.regularUser'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n <valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [camera]=\"camera\"\n [disabled]=\"disabled || obs.linked === false || obs.linked === 'loading'\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [maxFiles]=\"1\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [uploading]=\"uploading$ | async\"\n ></valtimo-dropzone>\n</ng-container>\n\n<div *ngFor=\"let resource of _value\" class=\"file-preview\">\n <div class=\"file-preview-name\">\n <span>\n {{ resource.filename }}\n </span>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.sizeInBytes | filesize }}\n </span>\n </div>\n <div *ngIf=\"!disabled\" class=\"file-preview-delete\">\n <a (click)=\"deleteFile(resource.id)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\n </div>\n</div>\n\n<valtimo-documenten-api-metadata-modal\n (metadata)=\"metadataSet($event)\"\n [author]=\"author\"\n [confidentialityLevel]=\"confidentialityLevel\"\n [description]=\"description\"\n [disableAuthor]=\"disableAuthor\"\n [disableConfidentialityLevel]=\"disableConfidentialityLevel\"\n [disableDescription]=\"disableDescription\"\n [disableDocumentTitle]=\"disableDocumentTitle\"\n [disableDocumentType]=\"disableDocumentType\"\n [disableFilename]=\"disableFilename\"\n [disableLanguage]=\"disableLanguage\"\n [disableStatus]=\"disableStatus\"\n [disabled$]=\"modalDisabled$\"\n [documentTitle]=\"documentTitle\"\n [documentType]=\"documentType\"\n [file$]=\"fileToBeUploaded$\"\n [filename]=\"filename\"\n [hide$]=\"hideModal$\"\n [language]=\"language\"\n [show$]=\"showModal$\"\n [status]=\"status\"\n></valtimo-documenten-api-metadata-modal>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .formio-button-add-another,::ng-deep .formio-component-valtimo-file .btn-secondary{display:none}::ng-deep .formio-component-valtimo-file td{padding:0!important;border:none}::ng-deep .formio-component-valtimo-file .table{border-collapse:collapse;border:none;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{margin-top:-1px;display:flex;border:1px solid #dee2e6}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;font-size:1.3846rem;line-height:18px;cursor:pointer}.file-preview .icon:hover{color:gray}\n"], components: [{ type: DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: ["show$", "hide$", "disabled$", "file$", "documentTitle", "disableDocumentTitle", "filename", "disableFilename", "author", "disableAuthor", "status", "disableStatus", "language", "disableLanguage", "documentType", "disableDocumentType", "description", "disableDescription", "confidentialityLevel", "disableConfidentialityLevel"], outputs: ["metadata"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$8.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe, "filesize": FileSizePipe } });
4529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiUploaderComponent, decorators: [{
4338
4530
  type: Component,
4339
- args: [{ selector: 'valtimo-modal', 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=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\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>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"] }]
4340
- }], ctorParameters: function () { return [{ type: ValtimoModalService }]; }, propDecorators: { elementId: [{
4531
+ args: [{ selector: 'valtimo-documenten-api-formio-uploader', 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 *ngIf=\"{linked: uploadProcessLinked$ | async, isAdmin: isAdmin$ | async} as obs\">\n <div *ngIf=\"obs.linked === false\">\n <div\n *ngIf=\"obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.adminRole'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n <div\n *ngIf=\"!obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.regularUser'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n <valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [camera]=\"camera\"\n [disabled]=\"disabled || obs.linked === false || obs.linked === 'loading'\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [maxFiles]=\"1\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [uploading]=\"uploading$ | async\"\n ></valtimo-dropzone>\n</ng-container>\n\n<div *ngFor=\"let resource of _value\" class=\"file-preview\">\n <div class=\"file-preview-name\">\n <span>\n {{ resource.filename }}\n </span>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.sizeInBytes | filesize }}\n </span>\n </div>\n <div *ngIf=\"!disabled\" class=\"file-preview-delete\">\n <a (click)=\"deleteFile(resource.id)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\n </div>\n</div>\n\n<valtimo-documenten-api-metadata-modal\n (metadata)=\"metadataSet($event)\"\n [author]=\"author\"\n [confidentialityLevel]=\"confidentialityLevel\"\n [description]=\"description\"\n [disableAuthor]=\"disableAuthor\"\n [disableConfidentialityLevel]=\"disableConfidentialityLevel\"\n [disableDescription]=\"disableDescription\"\n [disableDocumentTitle]=\"disableDocumentTitle\"\n [disableDocumentType]=\"disableDocumentType\"\n [disableFilename]=\"disableFilename\"\n [disableLanguage]=\"disableLanguage\"\n [disableStatus]=\"disableStatus\"\n [disabled$]=\"modalDisabled$\"\n [documentTitle]=\"documentTitle\"\n [documentType]=\"documentType\"\n [file$]=\"fileToBeUploaded$\"\n [filename]=\"filename\"\n [hide$]=\"hideModal$\"\n [language]=\"language\"\n [show$]=\"showModal$\"\n [status]=\"status\"\n></valtimo-documenten-api-metadata-modal>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .formio-button-add-another,::ng-deep .formio-component-valtimo-file .btn-secondary{display:none}::ng-deep .formio-component-valtimo-file td{padding:0!important;border:none}::ng-deep .formio-component-valtimo-file .table{border-collapse:collapse;border:none;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{margin-top:-1px;display:flex;border:1px solid #dee2e6}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;font-size:1.3846rem;line-height:18px;cursor:pointer}.file-preview .icon:hover{color:gray}\n"] }]
4532
+ }], ctorParameters: function () { return [{ type: i1$a.UploadProviderService }, { type: FormIoStateService }, { type: FormIoDomService }, { type: i1$a.DownloadService }, { type: ValtimoModalService }, { type: i1$6.UserProviderService }, { type: i1$5.ActivatedRoute }]; }, propDecorators: { disabled: [{
4341
4533
  type: Input
4342
4534
  }], title: [{
4343
4535
  type: Input
4536
+ }], hideTitle: [{
4537
+ type: Input
4344
4538
  }], subtitle: [{
4345
4539
  type: Input
4346
- }], templateBelowSubtitle: [{
4540
+ }], maxFileSize: [{
4347
4541
  type: Input
4348
- }], showFooter: [{
4542
+ }], hideMaxFileSize: [{
4543
+ type: Input
4544
+ }], camera: [{
4545
+ type: Input
4546
+ }], documentTitle: [{
4547
+ type: Input
4548
+ }], disableDocumentTitle: [{
4549
+ type: Input
4550
+ }], filename: [{
4551
+ type: Input
4552
+ }], disableFilename: [{
4553
+ type: Input
4554
+ }], author: [{
4555
+ type: Input
4556
+ }], disableAuthor: [{
4557
+ type: Input
4558
+ }], status: [{
4559
+ type: Input
4560
+ }], disableStatus: [{
4561
+ type: Input
4562
+ }], language: [{
4563
+ type: Input
4564
+ }], disableLanguage: [{
4565
+ type: Input
4566
+ }], documentType: [{
4567
+ type: Input
4568
+ }], disableDocumentType: [{
4569
+ type: Input
4570
+ }], description: [{
4571
+ type: Input
4572
+ }], disableDescription: [{
4573
+ type: Input
4574
+ }], confidentialityLevel: [{
4575
+ type: Input
4576
+ }], disableConfidentialityLevel: [{
4577
+ type: Input
4578
+ }], valueChange: [{
4579
+ type: Output
4580
+ }], value: [{
4349
4581
  type: Input
4350
- }], scrollModal: [{
4351
- type: ViewChild,
4352
- args: ['scrollModal']
4353
4582
  }] } });
4354
4583
 
4355
4584
  /*
@@ -4367,7 +4596,209 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4367
4596
  * See the License for the specific language governing permissions and
4368
4597
  * limitations under the License.
4369
4598
  */
4370
- class ModalModule {
4599
+ class DocumentenApiMetadataModalModule {
4600
+ }
4601
+ DocumentenApiMetadataModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4602
+ DocumentenApiMetadataModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, declarations: [DocumentenApiMetadataModalComponent], imports: [CommonModule,
4603
+ TranslateModule,
4604
+ ModalModule$1,
4605
+ TitleModule,
4606
+ ButtonModule,
4607
+ TranslateModule,
4608
+ FormModule,
4609
+ InputModule,
4610
+ SelectModule,
4611
+ DatePickerModule,
4612
+ InputLabelModule], exports: [DocumentenApiMetadataModalComponent] });
4613
+ DocumentenApiMetadataModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, imports: [[
4614
+ CommonModule,
4615
+ TranslateModule,
4616
+ ModalModule$1,
4617
+ TitleModule,
4618
+ ButtonModule,
4619
+ TranslateModule,
4620
+ FormModule,
4621
+ InputModule,
4622
+ SelectModule,
4623
+ DatePickerModule,
4624
+ InputLabelModule,
4625
+ ]] });
4626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, decorators: [{
4627
+ type: NgModule,
4628
+ args: [{
4629
+ declarations: [DocumentenApiMetadataModalComponent],
4630
+ exports: [DocumentenApiMetadataModalComponent],
4631
+ imports: [
4632
+ CommonModule,
4633
+ TranslateModule,
4634
+ ModalModule$1,
4635
+ TitleModule,
4636
+ ButtonModule,
4637
+ TranslateModule,
4638
+ FormModule,
4639
+ InputModule,
4640
+ SelectModule,
4641
+ DatePickerModule,
4642
+ InputLabelModule,
4643
+ ],
4644
+ }]
4645
+ }] });
4646
+
4647
+ /*
4648
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4649
+ *
4650
+ * Licensed under EUPL, Version 1.2 (the "License");
4651
+ * you may not use this file except in compliance with the License.
4652
+ * You may obtain a copy of the License at
4653
+ *
4654
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4655
+ *
4656
+ * Unless required by applicable law or agreed to in writing, software
4657
+ * distributed under the License is distributed on an "AS IS" basis,
4658
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4659
+ * See the License for the specific language governing permissions and
4660
+ * limitations under the License.
4661
+ */
4662
+ class FormIoModule {
4663
+ }
4664
+ FormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4665
+ FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent,
4666
+ FormioBuilderComponent,
4667
+ FormIoUploaderComponent,
4668
+ DocumentenApiUploaderComponent], imports: [CommonModule,
4669
+ FormioModule,
4670
+ DropzoneModule,
4671
+ TranslateModule,
4672
+ DocumentModule,
4673
+ FileSizeModule,
4674
+ ResourceModule,
4675
+ RouterModule,
4676
+ DocumentenApiMetadataModalModule], exports: [FormioComponent,
4677
+ FormioBuilderComponent,
4678
+ FormIoUploaderComponent,
4679
+ DocumentenApiUploaderComponent] });
4680
+ FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }], imports: [[
4681
+ CommonModule,
4682
+ FormioModule,
4683
+ DropzoneModule,
4684
+ TranslateModule,
4685
+ DocumentModule,
4686
+ FileSizeModule,
4687
+ ResourceModule,
4688
+ RouterModule,
4689
+ DocumentenApiMetadataModalModule,
4690
+ ]] });
4691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, decorators: [{
4692
+ type: NgModule,
4693
+ args: [{
4694
+ imports: [
4695
+ CommonModule,
4696
+ FormioModule,
4697
+ DropzoneModule,
4698
+ TranslateModule,
4699
+ DocumentModule,
4700
+ FileSizeModule,
4701
+ ResourceModule,
4702
+ RouterModule,
4703
+ DocumentenApiMetadataModalModule,
4704
+ ],
4705
+ declarations: [
4706
+ FormioComponent,
4707
+ FormioBuilderComponent,
4708
+ FormIoUploaderComponent,
4709
+ DocumentenApiUploaderComponent,
4710
+ ],
4711
+ exports: [
4712
+ FormioComponent,
4713
+ FormioBuilderComponent,
4714
+ FormIoUploaderComponent,
4715
+ DocumentenApiUploaderComponent,
4716
+ ],
4717
+ providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }],
4718
+ }]
4719
+ }] });
4720
+
4721
+ /*
4722
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4723
+ *
4724
+ * Licensed under EUPL, Version 1.2 (the "License");
4725
+ * you may not use this file except in compliance with the License.
4726
+ * You may obtain a copy of the License at
4727
+ *
4728
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4729
+ *
4730
+ * Unless required by applicable law or agreed to in writing, software
4731
+ * distributed under the License is distributed on an "AS IS" basis,
4732
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4733
+ * See the License for the specific language governing permissions and
4734
+ * limitations under the License.
4735
+ */
4736
+ class ModalComponent {
4737
+ constructor(modalService) {
4738
+ this.modalService = modalService;
4739
+ this.title = '';
4740
+ this.subtitle = '';
4741
+ this.showFooter = false;
4742
+ }
4743
+ ngOnInit() {
4744
+ this.openScrollSubscription();
4745
+ }
4746
+ ngAfterViewInit() {
4747
+ $(`#${this.elementId}`).modal({ show: false });
4748
+ }
4749
+ show() {
4750
+ $(`#${this.elementId}`).modal('show');
4751
+ }
4752
+ hide() {
4753
+ $(`#${this.elementId}`).modal('hide');
4754
+ }
4755
+ ngOnDestroy() {
4756
+ this.scrollSubscription.unsubscribe();
4757
+ }
4758
+ openScrollSubscription() {
4759
+ this.scrollSubscription = this.modalService.scrollToTop$.subscribe(() => {
4760
+ const element = this.scrollModal.nativeElement;
4761
+ if (element)
4762
+ element.scrollTo(0, 0);
4763
+ });
4764
+ }
4765
+ }
4766
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, deps: [{ token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
4767
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ModalComponent, selector: "valtimo-modal", inputs: { elementId: "elementId", title: "title", subtitle: "subtitle", templateBelowSubtitle: "templateBelowSubtitle", showFooter: "showFooter" }, viewQueries: [{ propertyName: "scrollModal", first: true, predicate: ["scrollModal"], descendants: true }], ngImport: i0, 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=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\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>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
4768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, decorators: [{
4769
+ type: Component,
4770
+ args: [{ selector: 'valtimo-modal', 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=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\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>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"] }]
4771
+ }], ctorParameters: function () { return [{ type: ValtimoModalService }]; }, propDecorators: { elementId: [{
4772
+ type: Input
4773
+ }], title: [{
4774
+ type: Input
4775
+ }], subtitle: [{
4776
+ type: Input
4777
+ }], templateBelowSubtitle: [{
4778
+ type: Input
4779
+ }], showFooter: [{
4780
+ type: Input
4781
+ }], scrollModal: [{
4782
+ type: ViewChild,
4783
+ args: ['scrollModal']
4784
+ }] } });
4785
+
4786
+ /*
4787
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4788
+ *
4789
+ * Licensed under EUPL, Version 1.2 (the "License");
4790
+ * you may not use this file except in compliance with the License.
4791
+ * You may obtain a copy of the License at
4792
+ *
4793
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4794
+ *
4795
+ * Unless required by applicable law or agreed to in writing, software
4796
+ * distributed under the License is distributed on an "AS IS" basis,
4797
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4798
+ * See the License for the specific language governing permissions and
4799
+ * limitations under the License.
4800
+ */
4801
+ class ModalModule {
4371
4802
  }
4372
4803
  ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4373
4804
  ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, declarations: [ModalComponent], imports: [CommonModule], exports: [ModalComponent] });
@@ -4803,7 +5234,7 @@ const formIoUploaderEditForm = () => ({
4803
5234
  * limitations under the License.
4804
5235
  */
4805
5236
  const customUploaderType = 'valtimo-file';
4806
- const COMPONENT_OPTIONS = {
5237
+ const COMPONENT_OPTIONS$1 = {
4807
5238
  type: customUploaderType,
4808
5239
  selector: 'valtimo-form-io-uploader',
4809
5240
  title: 'Valtimo File Upload',
@@ -4814,7 +5245,7 @@ const COMPONENT_OPTIONS = {
4814
5245
  editForm: formIoUploaderEditForm,
4815
5246
  };
4816
5247
  function registerFormioUploadComponent(injector) {
4817
- const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
5248
+ const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS$1);
4818
5249
  // override setValue function to allow for setting an array value
4819
5250
  class UploaderComponent extends originalUploadComponent {
4820
5251
  setValue(value) {
@@ -4822,8 +5253,8 @@ function registerFormioUploadComponent(injector) {
4822
5253
  return true;
4823
5254
  }
4824
5255
  }
4825
- if (!customElements.get(COMPONENT_OPTIONS.selector)) {
4826
- registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, FormIoUploaderComponent, UploaderComponent, injector);
5256
+ if (!customElements.get(COMPONENT_OPTIONS$1.selector)) {
5257
+ registerCustomFormioComponentWithClass(COMPONENT_OPTIONS$1, FormIoUploaderComponent, UploaderComponent, injector);
4827
5258
  }
4828
5259
  }
4829
5260
 
@@ -4842,71 +5273,406 @@ function registerFormioUploadComponent(injector) {
4842
5273
  * See the License for the specific language governing permissions and
4843
5274
  * limitations under the License.
4844
5275
  */
4845
- const SelectComponent = Components.components.select;
4846
- function registerFormioFileSelectorComponent(injector) {
4847
- const documentService = injector.get(DocumentService);
4848
- const stateService = injector.get(FormIoStateService);
4849
- const unavailableMessage = {
4850
- label: 'could not retrieve documents',
4851
- value: null,
4852
- };
4853
- function getDocumentResources(documentId) {
4854
- if (!documentId) {
4855
- return new Promise(resolve => {
4856
- resolve([unavailableMessage]);
4857
- });
4858
- }
4859
- return documentService
4860
- .getDocument(documentId)
4861
- .toPromise()
4862
- .then(document => document.relatedFiles.map(relatedFile => ({
4863
- label: relatedFile.fileName,
4864
- value: relatedFile.fileId,
4865
- })))
4866
- .catch(() => new Promise(resolve => {
4867
- resolve([unavailableMessage]);
4868
- }));
4869
- }
4870
- class ResourceSelectorComponent extends SelectComponent {
4871
- static schema(...extend) {
4872
- return SelectComponent.schema(Object.assign({ type: 'resource-selector', label: 'Resource selector', key: 'resource-selector', dataSrc: 'custom', dataType: 'string', valueProperty: 'value', asyncValues: true, data: {
4873
- custom: 'values = instance.getResources()',
4874
- } }, extend));
4875
- }
4876
- getResources() {
4877
- return stateService.documentId$
4878
- .pipe(take(1))
4879
- .toPromise()
4880
- .then(documentId => getDocumentResources(documentId));
4881
- }
4882
- static get builderInfo() {
4883
- return {
4884
- title: 'Document picker',
4885
- icon: 'th-list',
4886
- group: 'basic',
4887
- documentation: '/userguide/#textfield',
4888
- weight: 0,
4889
- schema: ResourceSelectorComponent.schema(),
4890
- };
4891
- }
4892
- }
4893
- Formio.use({
4894
- components: {
4895
- 'resource-selector': ResourceSelectorComponent,
5276
+ const documentenApiUploaderEditForm = () => ({
5277
+ components: [
5278
+ { key: 'type', type: 'hidden' },
5279
+ {
5280
+ type: 'textfield',
5281
+ input: true,
5282
+ key: 'label',
5283
+ label: 'Label',
5284
+ placeholder: 'Label',
5285
+ validate: {
5286
+ required: true,
5287
+ },
4896
5288
  },
4897
- });
4898
- }
4899
-
4900
- /*
4901
- * Copyright 2015-2020 Ritense BV, the Netherlands.
4902
- *
4903
- * Licensed under EUPL, Version 1.2 (the "License");
4904
- * you may not use this file except in compliance with the License.
4905
- * You may obtain a copy of the License at
4906
- *
4907
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4908
- *
4909
- * Unless required by applicable law or agreed to in writing, software
5289
+ {
5290
+ type: 'textfield',
5291
+ input: true,
5292
+ key: 'key',
5293
+ label: 'Property Name',
5294
+ placeholder: 'Property Name',
5295
+ tooltip: 'The name of this field in the API endpoint.',
5296
+ validate: {
5297
+ required: true,
5298
+ },
5299
+ },
5300
+ {
5301
+ type: 'textfield',
5302
+ input: true,
5303
+ key: 'customOptions.title',
5304
+ label: 'Title',
5305
+ placeholder: 'Title',
5306
+ tooltip: 'Leave empty to use the default title',
5307
+ validate: {
5308
+ required: false,
5309
+ },
5310
+ },
5311
+ {
5312
+ type: 'checkbox',
5313
+ input: true,
5314
+ inputType: 'checkbox',
5315
+ key: 'customOptions.hideTitle',
5316
+ label: 'Hide title',
5317
+ validate: {
5318
+ required: false,
5319
+ },
5320
+ },
5321
+ {
5322
+ type: 'textfield',
5323
+ input: true,
5324
+ key: 'customOptions.subtitle',
5325
+ label: 'Subtitle',
5326
+ placeholder: 'Title',
5327
+ tooltip: 'Leave empty to hide subtitle',
5328
+ validate: {
5329
+ required: false,
5330
+ },
5331
+ },
5332
+ {
5333
+ type: 'number',
5334
+ input: true,
5335
+ key: 'customOptions.maxFileSize',
5336
+ label: 'Maximum file size',
5337
+ placeholder: 'Maximum file size',
5338
+ defaultValue: 5,
5339
+ validate: {
5340
+ required: true,
5341
+ },
5342
+ },
5343
+ {
5344
+ type: 'checkbox',
5345
+ input: true,
5346
+ inputType: 'checkbox',
5347
+ key: 'customOptions.hideMaxFileSize',
5348
+ label: 'Hide maximum file size',
5349
+ validate: {
5350
+ required: false,
5351
+ },
5352
+ },
5353
+ {
5354
+ type: 'checkbox',
5355
+ input: true,
5356
+ inputType: 'checkbox',
5357
+ key: 'customOptions.camera',
5358
+ label: 'Allow camera uploads',
5359
+ validate: {
5360
+ required: false,
5361
+ },
5362
+ },
5363
+ {
5364
+ type: 'textfield',
5365
+ input: true,
5366
+ key: 'customOptions.documentTitle',
5367
+ label: 'Default document title',
5368
+ tooltip: 'Leave empty to let the user input their own title',
5369
+ validate: {
5370
+ required: false,
5371
+ },
5372
+ },
5373
+ {
5374
+ type: 'checkbox',
5375
+ input: true,
5376
+ inputType: 'checkbox',
5377
+ key: 'customOptions.disableDocumentTitle',
5378
+ label: 'Disable document title input',
5379
+ validate: {
5380
+ required: false,
5381
+ },
5382
+ },
5383
+ {
5384
+ type: 'textfield',
5385
+ input: true,
5386
+ key: 'customOptions.filename',
5387
+ label: 'Default filename',
5388
+ tooltip: 'Leave empty to let the user input their own filename',
5389
+ validate: {
5390
+ required: false,
5391
+ },
5392
+ },
5393
+ {
5394
+ type: 'checkbox',
5395
+ input: true,
5396
+ inputType: 'checkbox',
5397
+ key: 'customOptions.disableFilename',
5398
+ label: 'Disable filename input',
5399
+ validate: {
5400
+ required: false,
5401
+ },
5402
+ },
5403
+ {
5404
+ type: 'textfield',
5405
+ input: true,
5406
+ key: 'customOptions.author',
5407
+ label: 'Default author',
5408
+ tooltip: 'Leave empty to let the user input their own author',
5409
+ validate: {
5410
+ required: false,
5411
+ },
5412
+ },
5413
+ {
5414
+ type: 'checkbox',
5415
+ input: true,
5416
+ inputType: 'checkbox',
5417
+ key: 'customOptions.disableAuthor',
5418
+ label: 'Disable author input',
5419
+ validate: {
5420
+ required: false,
5421
+ },
5422
+ },
5423
+ {
5424
+ type: 'select',
5425
+ label: 'Default status',
5426
+ key: 'customOptions.status',
5427
+ placeholder: 'Select a default status',
5428
+ data: {
5429
+ values: [
5430
+ { value: 'in_bewerking', label: 'In editing' },
5431
+ { value: 'ter_vaststelling', label: 'To be confirmed' },
5432
+ { value: 'definitief', label: 'Definitive' },
5433
+ { value: 'gearchiveerd', label: 'Archived' },
5434
+ ],
5435
+ },
5436
+ dataSrc: 'values',
5437
+ input: true,
5438
+ validate: {
5439
+ required: false,
5440
+ },
5441
+ },
5442
+ {
5443
+ type: 'checkbox',
5444
+ input: true,
5445
+ inputType: 'checkbox',
5446
+ key: 'customOptions.disableStatus',
5447
+ label: 'Disable status input',
5448
+ validate: {
5449
+ required: false,
5450
+ },
5451
+ },
5452
+ {
5453
+ type: 'select',
5454
+ label: 'Default language',
5455
+ key: 'customOptions.language',
5456
+ placeholder: 'Select a default language',
5457
+ data: {
5458
+ values: [
5459
+ { value: 'nld', label: 'Dutch' },
5460
+ { value: 'eng', label: 'English' },
5461
+ { value: 'deu', label: 'German' },
5462
+ ],
5463
+ },
5464
+ dataSrc: 'values',
5465
+ input: true,
5466
+ validate: {
5467
+ required: false,
5468
+ },
5469
+ },
5470
+ {
5471
+ type: 'checkbox',
5472
+ input: true,
5473
+ inputType: 'checkbox',
5474
+ key: 'customOptions.disableLanguage',
5475
+ label: 'Disable language input',
5476
+ validate: {
5477
+ required: false,
5478
+ },
5479
+ },
5480
+ {
5481
+ type: 'textfield',
5482
+ input: true,
5483
+ key: 'customOptions.documentType',
5484
+ label: 'Default document type url',
5485
+ tooltip: 'Must match the document type url exactly. Leave empty to let the user input their own document type',
5486
+ validate: {
5487
+ required: false,
5488
+ },
5489
+ },
5490
+ {
5491
+ type: 'checkbox',
5492
+ input: true,
5493
+ inputType: 'checkbox',
5494
+ key: 'customOptions.disableDocumentType',
5495
+ label: 'Disable document type input',
5496
+ validate: {
5497
+ required: false,
5498
+ },
5499
+ },
5500
+ {
5501
+ type: 'textfield',
5502
+ input: true,
5503
+ key: 'customOptions.description',
5504
+ label: 'Default description',
5505
+ tooltip: 'Leave empty to let the user input their own description',
5506
+ validate: {
5507
+ required: false,
5508
+ },
5509
+ },
5510
+ {
5511
+ type: 'checkbox',
5512
+ input: true,
5513
+ inputType: 'checkbox',
5514
+ key: 'customOptions.disableDescription',
5515
+ label: 'Disable description input',
5516
+ validate: {
5517
+ required: false,
5518
+ },
5519
+ },
5520
+ {
5521
+ type: 'select',
5522
+ label: 'Default confidentiality level',
5523
+ key: 'customOptions.confidentialityLevel',
5524
+ placeholder: 'Select a default confidentiality level',
5525
+ data: {
5526
+ values: [
5527
+ { value: 'openbaar', label: 'Public' },
5528
+ { value: 'beperkt_openbaar', label: 'Restricted public' },
5529
+ { value: 'intern', label: 'Internal' },
5530
+ { value: 'zaakvertrouwelijk', label: 'Case confidential' },
5531
+ { value: 'vertrouwelijk', label: 'Private' },
5532
+ { value: 'confidentieel', label: 'Confidential' },
5533
+ { value: 'geheim', label: 'Secret' },
5534
+ { value: 'zeer_geheim', label: 'Very secret' },
5535
+ ],
5536
+ },
5537
+ dataSrc: 'values',
5538
+ input: true,
5539
+ validate: {
5540
+ required: false,
5541
+ },
5542
+ },
5543
+ {
5544
+ type: 'checkbox',
5545
+ input: true,
5546
+ inputType: 'checkbox',
5547
+ key: 'customOptions.disableConfidentialityLevel',
5548
+ label: 'Disable confidentiality level input',
5549
+ validate: {
5550
+ required: false,
5551
+ },
5552
+ },
5553
+ ],
5554
+ });
5555
+
5556
+ /*
5557
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5558
+ *
5559
+ * Licensed under EUPL, Version 1.2 (the "License");
5560
+ * you may not use this file except in compliance with the License.
5561
+ * You may obtain a copy of the License at
5562
+ *
5563
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5564
+ *
5565
+ * Unless required by applicable law or agreed to in writing, software
5566
+ * distributed under the License is distributed on an "AS IS" basis,
5567
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5568
+ * See the License for the specific language governing permissions and
5569
+ * limitations under the License.
5570
+ */
5571
+ const customDocumentApiUploaderType = 'documenten-api-file';
5572
+ const COMPONENT_OPTIONS = {
5573
+ type: customDocumentApiUploaderType,
5574
+ selector: 'documenten-api-form-io-uploader',
5575
+ title: 'Documenten API File Upload',
5576
+ group: 'advanced',
5577
+ icon: 'upload',
5578
+ // set empty value to force formio to accept arrays as valid input value for this field type
5579
+ emptyValue: [],
5580
+ editForm: documentenApiUploaderEditForm,
5581
+ };
5582
+ function registerDocumentenApiFormioUploadComponent(injector) {
5583
+ const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
5584
+ // override setValue function to allow for setting an array value
5585
+ class UploaderComponent extends originalUploadComponent {
5586
+ setValue(value) {
5587
+ this._customAngularElement.value = value;
5588
+ return true;
5589
+ }
5590
+ }
5591
+ if (!customElements.get(COMPONENT_OPTIONS.selector)) {
5592
+ registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, DocumentenApiUploaderComponent, UploaderComponent, injector);
5593
+ }
5594
+ }
5595
+
5596
+ /*
5597
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5598
+ *
5599
+ * Licensed under EUPL, Version 1.2 (the "License");
5600
+ * you may not use this file except in compliance with the License.
5601
+ * You may obtain a copy of the License at
5602
+ *
5603
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5604
+ *
5605
+ * Unless required by applicable law or agreed to in writing, software
5606
+ * distributed under the License is distributed on an "AS IS" basis,
5607
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5608
+ * See the License for the specific language governing permissions and
5609
+ * limitations under the License.
5610
+ */
5611
+ const SelectComponent = Components.components.select;
5612
+ function registerFormioFileSelectorComponent(injector) {
5613
+ const documentService = injector.get(DocumentService);
5614
+ const stateService = injector.get(FormIoStateService);
5615
+ const unavailableMessage = {
5616
+ label: 'could not retrieve documents',
5617
+ value: null,
5618
+ };
5619
+ function getDocumentResources(documentId) {
5620
+ if (!documentId) {
5621
+ return new Promise(resolve => {
5622
+ resolve([unavailableMessage]);
5623
+ });
5624
+ }
5625
+ return documentService
5626
+ .getDocument(documentId)
5627
+ .toPromise()
5628
+ .then(document => document.relatedFiles.map(relatedFile => ({
5629
+ label: relatedFile.fileName,
5630
+ value: relatedFile.fileId,
5631
+ })))
5632
+ .catch(() => new Promise(resolve => {
5633
+ resolve([unavailableMessage]);
5634
+ }));
5635
+ }
5636
+ class ResourceSelectorComponent extends SelectComponent {
5637
+ static schema(...extend) {
5638
+ return SelectComponent.schema(Object.assign({ type: 'resource-selector', label: 'Resource selector', key: 'resource-selector', dataSrc: 'custom', dataType: 'string', valueProperty: 'value', asyncValues: true, data: {
5639
+ custom: 'values = instance.getResources()',
5640
+ } }, extend));
5641
+ }
5642
+ getResources() {
5643
+ return stateService.documentId$
5644
+ .pipe(take(1))
5645
+ .toPromise()
5646
+ .then(documentId => getDocumentResources(documentId));
5647
+ }
5648
+ static get builderInfo() {
5649
+ return {
5650
+ title: 'Document picker',
5651
+ icon: 'th-list',
5652
+ group: 'basic',
5653
+ documentation: '/userguide/#textfield',
5654
+ weight: 0,
5655
+ schema: ResourceSelectorComponent.schema(),
5656
+ };
5657
+ }
5658
+ }
5659
+ Formio.use({
5660
+ components: {
5661
+ 'resource-selector': ResourceSelectorComponent,
5662
+ },
5663
+ });
5664
+ }
5665
+
5666
+ /*
5667
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5668
+ *
5669
+ * Licensed under EUPL, Version 1.2 (the "License");
5670
+ * you may not use this file except in compliance with the License.
5671
+ * You may obtain a copy of the License at
5672
+ *
5673
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5674
+ *
5675
+ * Unless required by applicable law or agreed to in writing, software
4910
5676
  * distributed under the License is distributed on an "AS IS" basis,
4911
5677
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4912
5678
  * See the License for the specific language governing permissions and
@@ -5079,116 +5845,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5079
5845
  * See the License for the specific language governing permissions and
5080
5846
  * limitations under the License.
5081
5847
  */
5082
- class DocumentenApiMetadataModalComponent {
5083
- constructor(modalService, translateService, route, documentService) {
5084
- this.modalService = modalService;
5085
- this.translateService = translateService;
5086
- this.route = route;
5087
- this.documentService = documentService;
5088
- this.metadata = new EventEmitter();
5089
- this.CONFIDENTIALITY_LEVELS = [
5090
- 'openbaar',
5091
- 'beperkt_openbaar',
5092
- 'intern',
5093
- 'zaakvertrouwelijk',
5094
- 'vertrouwelijk',
5095
- 'confidentieel',
5096
- 'geheim',
5097
- 'zeer_geheim',
5098
- ];
5099
- this.confidentialityLevelItems$ = this.translateService
5100
- .stream('key')
5101
- .pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
5102
- id: confidentialityLevel,
5103
- text: this.translateService.instant(`document.${confidentialityLevel}`),
5104
- }))));
5105
- this.STATUSES = [
5106
- 'in_bewerking',
5107
- 'ter_vaststelling',
5108
- 'definitief',
5109
- 'gearchiveerd',
5110
- ];
5111
- this.statusItems$ = this.translateService.stream('key').pipe(map(() => this.STATUSES.map(status => ({
5112
- id: status,
5113
- text: this.translateService.instant(`document.${status}`),
5114
- }))));
5115
- this.LANGUAGES = ['nld', 'eng', 'deu'];
5116
- this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
5117
- id: language,
5118
- text: this.translateService.instant(`document.${language}`),
5119
- }))));
5120
- this.documentTypeItems$ = this.route.params.pipe(switchMap(params => this.documentService.getDocumentTypes(params.documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
5121
- this.showForm$ = this.modalService.modalVisible$;
5122
- this.valid$ = new BehaviorSubject(false);
5123
- this.formData$ = new BehaviorSubject(null);
5848
+ class SearchFieldsComponent {
5849
+ constructor() {
5850
+ this.searchFields$ = new BehaviorSubject([]);
5851
+ this.values$ = new BehaviorSubject({});
5852
+ this.valueChange = new EventEmitter();
5853
+ this.doSearch = new EventEmitter();
5854
+ this.expanded$ = new BehaviorSubject(false);
5855
+ }
5856
+ set searchFields(fields) {
5857
+ this.searchFields$.next(fields);
5124
5858
  }
5125
5859
  ngOnInit() {
5126
- this.openShowSubscription();
5127
- this.openHideSubscription();
5860
+ this.openValuesSubscription();
5128
5861
  }
5129
5862
  ngOnDestroy() {
5130
- var _a, _b;
5131
- (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
5132
- (_b = this.hideSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
5133
- }
5134
- hide() {
5135
- this.formData$.next(null);
5136
- this.valid$.next(false);
5137
- this.modalService.closeModal();
5138
- }
5139
- cancel() {
5140
- this.hide();
5863
+ var _a;
5864
+ (_a = this.valuesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
5141
5865
  }
5142
- save() {
5143
- combineLatest([this.valid$, this.formData$])
5144
- .pipe(take$1(1))
5145
- .subscribe(([valid, formData]) => {
5146
- if (valid) {
5147
- this.metadata.emit(formData);
5148
- }
5866
+ singleValueChange(searchFieldKey, value) {
5867
+ this.values$.pipe(take$1(1)).subscribe(values => {
5868
+ this.values$.next(Object.assign(Object.assign({}, values), { [searchFieldKey]: value }));
5149
5869
  });
5150
5870
  }
5151
- formValueChange(data) {
5152
- this.formData$.next(data);
5153
- this.setValid(data);
5154
- }
5155
- setValid(data) {
5156
- this.valid$.next(!!(data.filename &&
5157
- data.title &&
5158
- data.author &&
5159
- data.creationDate &&
5160
- data.status &&
5161
- data.language &&
5162
- data.informatieobjecttype));
5871
+ multipleValueChange(searchFieldKey, value) {
5872
+ this.values$.pipe(take$1(1)).subscribe(values => {
5873
+ this.values$.next(Object.assign(Object.assign({}, values), { [searchFieldKey]: { start: value.start, end: value.end } }));
5874
+ });
5163
5875
  }
5164
- openShowSubscription() {
5165
- this.showSubscription = this.show$.subscribe(() => {
5166
- this.modalService.openModal(this.documentenApiMetadataModal);
5876
+ toggleExpanded() {
5877
+ this.expanded$.pipe(take$1(1)).subscribe(expanded => {
5878
+ this.expanded$.next(!expanded);
5167
5879
  });
5168
5880
  }
5169
- openHideSubscription() {
5170
- this.hideSubscription = this.hide$.subscribe(() => {
5171
- this.hide();
5881
+ search() {
5882
+ this.doSearch.emit();
5883
+ }
5884
+ openValuesSubscription() {
5885
+ this.valuesSubscription = combineLatest([this.searchFields$, this.values$]).subscribe(([searchFields, values]) => {
5886
+ const valuesKeys = Object.keys(values);
5887
+ const searchFieldsCopy = [...(searchFields || [])];
5888
+ valuesKeys.forEach(valueKey => {
5889
+ const correspondingSearchFieldIndex = searchFieldsCopy.findIndex(searchField => searchField.key === valueKey);
5890
+ if (correspondingSearchFieldIndex !== -1) {
5891
+ searchFieldsCopy[correspondingSearchFieldIndex].value = values[valueKey];
5892
+ }
5893
+ });
5894
+ console.log(searchFieldsCopy);
5895
+ this.valueChange.emit(searchFieldsCopy);
5172
5896
  });
5173
5897
  }
5174
5898
  }
5175
- DocumentenApiMetadataModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, deps: [{ token: i1$4.ModalService }, { token: i1$8.TranslateService }, { token: i1$5.ActivatedRoute }, { token: i2.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
5176
- DocumentenApiMetadataModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: { show$: "show$", hide$: "hide$", disabled$: "disabled$", file$: "file$" }, outputs: { metadata: "metadata" }, viewQueries: [{ propertyName: "documentenApiMetadataModal", first: true, predicate: ["documentenApiMetadataModal"], descendants: true }], ngImport: i0, 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<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n [defaultValue]=\"obs.file?.name\"\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"status\"\n ></v-select>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelection]=\"languageItems[0]\"\n [disabled]=\"obs.disabled\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-input\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}\n"], components: [{ type: i1$4.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { type: i1$4.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { type: i1$4.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { type: i1$4.FormComponent, selector: "v-form", outputs: ["valueChange"] }, { type: i1$4.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox"], outputs: ["valueChange"] }, { type: i1$4.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { type: i1$4.DatePickerComponent, selector: "v-date-picker", inputs: ["name", "title", "titleTranslationKey", "widthPx", "fullWidth", "margin", "disabled", "tooltip", "required", "defaultDate", "defaultDateIsToday"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe } });
5177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
5899
+ SearchFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SearchFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5900
+ SearchFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SearchFieldsComponent, selector: "valtimo-search-fields", inputs: { loading: "loading", searchFields: "searchFields" }, outputs: { valueChange: "valueChange", doSearch: "doSearch" }, ngImport: i0, 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=\"search fields\">\n <ng-container *ngIf=\"loading\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!loading\">\n <ng-container *ngTemplateOutlet=\"searchFieldsTemplate\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #loadingTemplate>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #searchFieldsTemplate>\n <valtimo-widget>\n <div class=\"row p-3\" [ngClass]=\"{'row--hidden': (expanded$ | async) === false}\">\n <ng-container *ngFor=\"let searchField of searchFields$ | async; let i = index\">\n <div class=\"col-4\">\n <ng-container\n *ngTemplateOutlet=\"searchFieldTemplate; context: {searchField: searchField}\"\n ></ng-container>\n </div>\n <div class=\"w-100\" *ngIf=\"(i + 1) % 3 === 0\"></div>\n </ng-container>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #searchFieldTemplate let-searchField=\"searchField\">\n <ng-container\n *ngIf=\"{\n tooltipKey: 'searchFieldsTooltips.' + searchField.key,\n tooltip: 'searchFieldsTooltips.' + searchField.key | translate\n } as vars\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateText;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateNumber;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateDate;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateNumberRange;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateDateRange;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateText\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <v-input\n *ngIf=\"searchField.datatype === 'text' && searchField.fieldtype === 'single'\"\n [name]=\"searchField.key\"\n [title]=\"'searchFields.' + searchField.key | translate\"\n [fullWidth]=\"true\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n (valueChange)=\"singleValueChange(searchField.key, $event)\"\n [smallLabel]=\"true\"\n >\n </v-input>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateNumber\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <v-input\n *ngIf=\"searchField.datatype === 'number' && searchField.fieldtype === 'single'\"\n [name]=\"searchField.key\"\n [title]=\"'searchFields.' + searchField.key | translate\"\n [fullWidth]=\"true\"\n (valueChange)=\"singleValueChange(searchField.key, $event)\"\n type=\"number\"\n [hideNumberSpinBox]=\"true\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [smallLabel]=\"true\"\n >\n </v-input>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateDate\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <v-date-picker\n *ngIf=\"searchField.datatype === 'date' && searchField.fieldtype === 'single'\"\n [title]=\"'searchFields.' + searchField.key | translate\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [name]=\"searchField.key\"\n fullWidth=\"true\"\n (valueChange)=\"singleValueChange(searchField.key, $event)\"\n [smallLabel]=\"true\"\n ></v-date-picker>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateNumberRange\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <ng-container *ngIf=\"searchField.datatype === 'number' && searchField.fieldtype === 'range'\">\n <v-input-label\n [title]=\"'searchFields.' + searchField.key | translate\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [small]=\"true\"\n ></v-input-label>\n <v-form\n (valueChange)=\"multipleValueChange(searchField.key, $event)\"\n className=\"multiple-search-fields\"\n >\n <v-input name=\"start\" [fullWidth]=\"true\" type=\"number\" [hideNumberSpinBox]=\"true\"> </v-input>\n <ng-container *ngTemplateOutlet=\"toText\"></ng-container>\n <v-input name=\"end\" [fullWidth]=\"true\" type=\"number\" [hideNumberSpinBox]=\"true\"> </v-input>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateDateRange\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <ng-container *ngIf=\"searchField.datatype === 'date' && searchField.fieldtype === 'range'\">\n <v-input-label\n [title]=\"'searchFields.' + searchField.key | translate\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [small]=\"true\"\n ></v-input-label>\n <v-form\n (valueChange)=\"multipleValueChange(searchField.key, $event)\"\n className=\"multiple-search-fields\"\n >\n <v-date-picker name=\"start\" fullWidth=\"true\"></v-date-picker>\n <ng-container *ngTemplateOutlet=\"toText\"></ng-container>\n <v-date-picker name=\"end\" fullWidth=\"true\"></v-date-picker>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template #toText>\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <div class=\"buttons-container p-3\" *ngIf=\"{expanded: expanded$ | async} as obs\">\n <v-button\n (clickEvent)=\"toggleExpanded()\"\n [disabled]=\"loading\"\n type=\"secondary\"\n [mdiIcon]=\"obs.expanded ? 'chevron-up' : 'chevron-down'\"\n >{{\n obs.expanded\n ? ('searchFields.collapseButtonText' | translate)\n : ('searchFields.expandButtonText' | translate)\n }}</v-button\n >\n <div class=\"right-buttons\">\n <v-button\n (clickEvent)=\"search()\"\n [disabled]=\"loading\"\n type=\"danger\"\n *ngIf=\"obs.expanded\"\n mdiIcon=\"close\"\n >{{ 'searchFields.clearButtonText' | translate }}</v-button\n >\n <v-button\n (clickEvent)=\"search()\"\n [disabled]=\"loading\"\n type=\"primary\"\n *ngIf=\"obs.expanded\"\n mdiIcon=\"magnify\"\n >{{ 'searchFields.searchButtonText' | translate }}</v-button\n >\n </div>\n </div>\n</ng-template>\n", styles: [".w-100{height:15px}.w-100:last-child{display:none}::ng-deep .multiple-search-fields{display:flex!important;flex-direction:row!important;align-items:center}.to-text{margin-inline-start:8px;margin-inline-end:8px}.buttons-container{width:100%;display:flex;flex-direction:row;justify-content:space-between}.right-buttons{display:flex;flex-direction:row}.right-buttons v-button:last-child{margin-left:8px}.row--hidden{display:none}\n"], components: [{ type: SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { type: WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i1$4.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel"], outputs: ["valueChange"] }, { type: i1$4.DatePickerComponent, selector: "v-date-picker", inputs: ["name", "title", "titleTranslationKey", "widthPx", "fullWidth", "margin", "disabled", "tooltip", "required", "defaultDate", "defaultDateIsToday", "smallLabel"], outputs: ["valueChange"] }, { type: i1$4.InputLabelComponent, selector: "v-input-label", inputs: ["name", "title", "titleTranslationKey", "tooltip", "required", "largeMargin", "small"] }, { type: i1$4.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { type: i1$4.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { type: i1$4.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe } });
5901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SearchFieldsComponent, decorators: [{
5178
5902
  type: Component,
5179
- args: [{ selector: 'valtimo-documenten-api-metadata-modal', 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<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n [defaultValue]=\"obs.file?.name\"\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"status\"\n ></v-select>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelection]=\"languageItems[0]\"\n [disabled]=\"obs.disabled\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-input\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}\n"] }]
5180
- }], ctorParameters: function () { return [{ type: i1$4.ModalService }, { type: i1$8.TranslateService }, { type: i1$5.ActivatedRoute }, { type: i2.DocumentService }]; }, propDecorators: { documentenApiMetadataModal: [{
5181
- type: ViewChild,
5182
- args: ['documentenApiMetadataModal']
5183
- }], show$: [{
5184
- type: Input
5185
- }], hide$: [{
5903
+ args: [{ selector: 'valtimo-search-fields', 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=\"search fields\">\n <ng-container *ngIf=\"loading\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!loading\">\n <ng-container *ngTemplateOutlet=\"searchFieldsTemplate\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #loadingTemplate>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #searchFieldsTemplate>\n <valtimo-widget>\n <div class=\"row p-3\" [ngClass]=\"{'row--hidden': (expanded$ | async) === false}\">\n <ng-container *ngFor=\"let searchField of searchFields$ | async; let i = index\">\n <div class=\"col-4\">\n <ng-container\n *ngTemplateOutlet=\"searchFieldTemplate; context: {searchField: searchField}\"\n ></ng-container>\n </div>\n <div class=\"w-100\" *ngIf=\"(i + 1) % 3 === 0\"></div>\n </ng-container>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n </div>\n </div>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #searchFieldTemplate let-searchField=\"searchField\">\n <ng-container\n *ngIf=\"{\n tooltipKey: 'searchFieldsTooltips.' + searchField.key,\n tooltip: 'searchFieldsTooltips.' + searchField.key | translate\n } as vars\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateText;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateNumber;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateDate;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateNumberRange;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n searchFieldTemplateDateRange;\n context: {searchField: searchField, tooltipKey: vars.tooltipKey, tooltip: vars.tooltip}\n \"\n ></ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateText\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <v-input\n *ngIf=\"searchField.datatype === 'text' && searchField.fieldtype === 'single'\"\n [name]=\"searchField.key\"\n [title]=\"'searchFields.' + searchField.key | translate\"\n [fullWidth]=\"true\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n (valueChange)=\"singleValueChange(searchField.key, $event)\"\n [smallLabel]=\"true\"\n >\n </v-input>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateNumber\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <v-input\n *ngIf=\"searchField.datatype === 'number' && searchField.fieldtype === 'single'\"\n [name]=\"searchField.key\"\n [title]=\"'searchFields.' + searchField.key | translate\"\n [fullWidth]=\"true\"\n (valueChange)=\"singleValueChange(searchField.key, $event)\"\n type=\"number\"\n [hideNumberSpinBox]=\"true\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [smallLabel]=\"true\"\n >\n </v-input>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateDate\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <v-date-picker\n *ngIf=\"searchField.datatype === 'date' && searchField.fieldtype === 'single'\"\n [title]=\"'searchFields.' + searchField.key | translate\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [name]=\"searchField.key\"\n fullWidth=\"true\"\n (valueChange)=\"singleValueChange(searchField.key, $event)\"\n [smallLabel]=\"true\"\n ></v-date-picker>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateNumberRange\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <ng-container *ngIf=\"searchField.datatype === 'number' && searchField.fieldtype === 'range'\">\n <v-input-label\n [title]=\"'searchFields.' + searchField.key | translate\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [small]=\"true\"\n ></v-input-label>\n <v-form\n (valueChange)=\"multipleValueChange(searchField.key, $event)\"\n className=\"multiple-search-fields\"\n >\n <v-input name=\"start\" [fullWidth]=\"true\" type=\"number\" [hideNumberSpinBox]=\"true\"> </v-input>\n <ng-container *ngTemplateOutlet=\"toText\"></ng-container>\n <v-input name=\"end\" [fullWidth]=\"true\" type=\"number\" [hideNumberSpinBox]=\"true\"> </v-input>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template\n #searchFieldTemplateDateRange\n let-searchField=\"searchField\"\n let-tooltip=\"tooltip\"\n let-tooltipKey=\"tooltipKey\"\n>\n <ng-container *ngIf=\"searchField.datatype === 'date' && searchField.fieldtype === 'range'\">\n <v-input-label\n [title]=\"'searchFields.' + searchField.key | translate\"\n [tooltip]=\"tooltip !== tooltipKey && tooltip\"\n [small]=\"true\"\n ></v-input-label>\n <v-form\n (valueChange)=\"multipleValueChange(searchField.key, $event)\"\n className=\"multiple-search-fields\"\n >\n <v-date-picker name=\"start\" fullWidth=\"true\"></v-date-picker>\n <ng-container *ngTemplateOutlet=\"toText\"></ng-container>\n <v-date-picker name=\"end\" fullWidth=\"true\"></v-date-picker>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template #toText>\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <div class=\"buttons-container p-3\" *ngIf=\"{expanded: expanded$ | async} as obs\">\n <v-button\n (clickEvent)=\"toggleExpanded()\"\n [disabled]=\"loading\"\n type=\"secondary\"\n [mdiIcon]=\"obs.expanded ? 'chevron-up' : 'chevron-down'\"\n >{{\n obs.expanded\n ? ('searchFields.collapseButtonText' | translate)\n : ('searchFields.expandButtonText' | translate)\n }}</v-button\n >\n <div class=\"right-buttons\">\n <v-button\n (clickEvent)=\"search()\"\n [disabled]=\"loading\"\n type=\"danger\"\n *ngIf=\"obs.expanded\"\n mdiIcon=\"close\"\n >{{ 'searchFields.clearButtonText' | translate }}</v-button\n >\n <v-button\n (clickEvent)=\"search()\"\n [disabled]=\"loading\"\n type=\"primary\"\n *ngIf=\"obs.expanded\"\n mdiIcon=\"magnify\"\n >{{ 'searchFields.searchButtonText' | translate }}</v-button\n >\n </div>\n </div>\n</ng-template>\n", styles: [".w-100{height:15px}.w-100:last-child{display:none}::ng-deep .multiple-search-fields{display:flex!important;flex-direction:row!important;align-items:center}.to-text{margin-inline-start:8px;margin-inline-end:8px}.buttons-container{width:100%;display:flex;flex-direction:row;justify-content:space-between}.right-buttons{display:flex;flex-direction:row}.right-buttons v-button:last-child{margin-left:8px}.row--hidden{display:none}\n"] }]
5904
+ }], propDecorators: { loading: [{
5186
5905
  type: Input
5187
- }], disabled$: [{
5188
- type: Input
5189
- }], file$: [{
5906
+ }], searchFields: [{
5190
5907
  type: Input
5191
- }], metadata: [{
5908
+ }], valueChange: [{
5909
+ type: Output
5910
+ }], doSearch: [{
5192
5911
  type: Output
5193
5912
  }] } });
5194
5913
 
@@ -5207,48 +5926,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5207
5926
  * See the License for the specific language governing permissions and
5208
5927
  * limitations under the License.
5209
5928
  */
5210
- class DocumentenApiMetadataModalModule {
5929
+ class SearchFieldsModule {
5211
5930
  }
5212
- DocumentenApiMetadataModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5213
- DocumentenApiMetadataModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, declarations: [DocumentenApiMetadataModalComponent], imports: [CommonModule,
5931
+ SearchFieldsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SearchFieldsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5932
+ SearchFieldsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SearchFieldsModule, declarations: [SearchFieldsComponent], imports: [CommonModule,
5933
+ SpinnerModule,
5934
+ WidgetModule,
5214
5935
  TranslateModule,
5215
- ModalModule$1,
5216
- TitleModule,
5217
- ButtonModule,
5218
- TranslateModule,
5219
- FormModule,
5220
5936
  InputModule,
5221
- SelectModule,
5222
- DatePickerModule], exports: [DocumentenApiMetadataModalComponent] });
5223
- DocumentenApiMetadataModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, imports: [[
5937
+ FormModule,
5938
+ DatePickerModule,
5939
+ InputLabelModule,
5940
+ ParagraphModule,
5941
+ ButtonModule], exports: [SearchFieldsComponent] });
5942
+ SearchFieldsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SearchFieldsModule, imports: [[
5224
5943
  CommonModule,
5944
+ SpinnerModule,
5945
+ WidgetModule,
5225
5946
  TranslateModule,
5226
- ModalModule$1,
5227
- TitleModule,
5228
- ButtonModule,
5229
- TranslateModule,
5230
- FormModule,
5231
5947
  InputModule,
5232
- SelectModule,
5948
+ FormModule,
5233
5949
  DatePickerModule,
5950
+ InputLabelModule,
5951
+ ParagraphModule,
5952
+ ButtonModule,
5234
5953
  ]] });
5235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, decorators: [{
5954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SearchFieldsModule, decorators: [{
5236
5955
  type: NgModule,
5237
5956
  args: [{
5238
- declarations: [DocumentenApiMetadataModalComponent],
5239
- exports: [DocumentenApiMetadataModalComponent],
5957
+ declarations: [SearchFieldsComponent],
5240
5958
  imports: [
5241
5959
  CommonModule,
5960
+ SpinnerModule,
5961
+ WidgetModule,
5242
5962
  TranslateModule,
5243
- ModalModule$1,
5244
- TitleModule,
5245
- ButtonModule,
5246
- TranslateModule,
5247
- FormModule,
5248
5963
  InputModule,
5249
- SelectModule,
5964
+ FormModule,
5250
5965
  DatePickerModule,
5966
+ InputLabelModule,
5967
+ ParagraphModule,
5968
+ ButtonModule,
5251
5969
  ],
5970
+ exports: [SearchFieldsComponent],
5252
5971
  }]
5253
5972
  }] });
5254
5973
 
@@ -5272,5 +5991,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5272
5991
  * Generated bundle index. Do not edit.
5273
5992
  */
5274
5993
 
5275
- export { Alert, AlertComponent, AlertModule, AlertService, AlertType, AlertsOptionsImpl, BpmnJsDiagramComponent, BpmnJsDiagramModule, BreadcrumbNavigationComponent, BreadcrumbNavigationModule, CamundaFormComponent, CamundaFormModule, CardComponent, CardModule, ComponentsModule, DataListComponent, DataListModule, DocumentenApiMetadataModalComponent, DocumentenApiMetadataModalModule, DropzoneComponent, DropzoneModule, FieldAutoFocusDirective, FieldAutoFocusModule, FileSizeModule, FileSizePipe, FilterSidebarComponent, FilterSidebarModule, FormIoModule, FormIoStateService, FormIoUploaderComponent, FormioBuilderComponent, FormioComponent, FormioOptionsImpl, LeftSidebarComponent, LeftSidebarModule, ListComponent, ListFilterPipe, ListModule, MenuComponent, MenuModule, MenuRoutingModule, MenuService, ModalComponent, ModalModule, MultiselectDropdownComponent, MultiselectDropdownModule, PageHeaderComponent, PageHeaderModule, PageTitleComponent, PageTitleModule, ProgressBarComponent, ProgressBarModule, RightSidebarComponent, RightSidebarModule, SearchableDropdownComponent, SearchableDropdownModule, SearchableDropdownSelectComponent, SearchableDropdownSelectModule, SpinnerComponent, SpinnerModule, TimelineComponent, TimelineItemImpl, TimelineModule, TopbarComponent, TopbarModule, UploaderComponent, UploaderDragDropDirective, UploaderModule, ValtimoModalService, ViewContentService, WebcamComponent, WebcamModule, WidgetComponent, WidgetModule, customUploaderType, menuInitializer, registerFormioFileSelectorComponent, registerFormioUploadComponent };
5994
+ export { Alert, AlertComponent, AlertModule, AlertService, AlertType, AlertsOptionsImpl, BpmnJsDiagramComponent, BpmnJsDiagramModule, BreadcrumbNavigationComponent, BreadcrumbNavigationModule, CamundaFormComponent, CamundaFormModule, CardComponent, CardModule, ComponentsModule, DataListComponent, DataListModule, DocumentenApiMetadataModalComponent, DocumentenApiMetadataModalModule, DocumentenApiUploaderComponent, DropzoneComponent, DropzoneModule, FieldAutoFocusDirective, FieldAutoFocusModule, FileSizeModule, FileSizePipe, FilterSidebarComponent, FilterSidebarModule, FormIoModule, FormIoStateService, FormIoUploaderComponent, FormioBuilderComponent, FormioComponent, FormioOptionsImpl, LeftSidebarComponent, LeftSidebarModule, ListComponent, ListFilterPipe, ListModule, MenuComponent, MenuModule, MenuRoutingModule, MenuService, ModalComponent, ModalModule, MultiselectDropdownComponent, MultiselectDropdownModule, PageHeaderComponent, PageHeaderModule, PageTitleComponent, PageTitleModule, ProgressBarComponent, ProgressBarModule, RightSidebarComponent, RightSidebarModule, SearchFieldsComponent, SearchFieldsModule, SearchableDropdownComponent, SearchableDropdownModule, SearchableDropdownSelectComponent, SearchableDropdownSelectModule, SpinnerComponent, SpinnerModule, TimelineComponent, TimelineItemImpl, TimelineModule, TopbarComponent, TopbarModule, UploaderComponent, UploaderDragDropDirective, UploaderModule, ValtimoModalService, ViewContentService, WebcamComponent, WebcamModule, WidgetComponent, WidgetModule, customDocumentApiUploaderType, customUploaderType, menuInitializer, registerDocumentenApiFormioUploadComponent, registerFormioFileSelectorComponent, registerFormioUploadComponent };
5276
5995
  //# sourceMappingURL=valtimo-components.mjs.map