@valtimo/components 5.9.1 → 5.11.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 (47) hide show
  1. package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.mjs +213 -0
  2. package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.mjs +69 -0
  3. package/esm2020/lib/components/dropzone/dropzone.component.mjs +5 -2
  4. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.mjs +295 -0
  5. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.mjs +147 -0
  6. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.mjs +43 -0
  7. package/esm2020/lib/components/form-io/form-io-uploader/form-io-uploader.component.mjs +1 -1
  8. package/esm2020/lib/components/form-io/form-io.module.mjs +26 -5
  9. package/esm2020/lib/components/view-content/type-converters/dateTypeConverter.mjs +2 -2
  10. package/esm2020/lib/components/view-content/view-content.service.mjs +11 -1
  11. package/esm2020/lib/models/documenten-api-metadata.model.mjs +17 -0
  12. package/esm2020/lib/models/form-io.model.mjs +1 -1
  13. package/esm2020/lib/models/index.mjs +2 -1
  14. package/esm2020/lib/services/valtimo-modal.service.mjs +9 -2
  15. package/esm2020/public_api.mjs +5 -1
  16. package/fesm2015/valtimo-components.mjs +788 -24
  17. package/fesm2015/valtimo-components.mjs.map +1 -1
  18. package/fesm2020/valtimo-components.mjs +800 -13
  19. package/fesm2020/valtimo-components.mjs.map +1 -1
  20. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +74 -0
  21. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -0
  22. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts +11 -0
  23. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts.map +1 -0
  24. package/lib/components/dropzone/dropzone.component.d.ts +4 -3
  25. package/lib/components/dropzone/dropzone.component.d.ts.map +1 -1
  26. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts +105 -0
  27. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts.map +1 -0
  28. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts +61 -0
  29. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts.map +1 -0
  30. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts +4 -0
  31. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts.map +1 -0
  32. package/lib/components/form-io/form-io.module.d.ts +11 -9
  33. package/lib/components/form-io/form-io.module.d.ts.map +1 -1
  34. package/lib/components/view-content/type-converters/dateTypeConverter.d.ts.map +1 -1
  35. package/lib/components/view-content/view-content.service.d.ts +1 -0
  36. package/lib/components/view-content/view-content.service.d.ts.map +1 -1
  37. package/lib/models/documenten-api-metadata.model.d.ts +19 -0
  38. package/lib/models/documenten-api-metadata.model.d.ts.map +1 -0
  39. package/lib/models/form-io.model.d.ts +3 -0
  40. package/lib/models/form-io.model.d.ts.map +1 -1
  41. package/lib/models/index.d.ts +1 -0
  42. package/lib/models/index.d.ts.map +1 -1
  43. package/lib/services/valtimo-modal.service.d.ts +3 -0
  44. package/lib/services/valtimo-modal.service.d.ts.map +1 -1
  45. package/package.json +1 -1
  46. package/public_api.d.ts +4 -0
  47. 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 } 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 } 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';
@@ -224,16 +224,39 @@ class TimelineItemImpl {
224
224
  * limitations under the License.
225
225
  */
226
226
 
227
+ /*
228
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
229
+ *
230
+ * Licensed under EUPL, Version 1.2 (the "License");
231
+ * you may not use this file except in compliance with the License.
232
+ * You may obtain a copy of the License at
233
+ *
234
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
235
+ *
236
+ * Unless required by applicable law or agreed to in writing, software
237
+ * distributed under the License is distributed on an "AS IS" basis,
238
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239
+ * See the License for the specific language governing permissions and
240
+ * limitations under the License.
241
+ */
242
+
227
243
  class ValtimoModalService {
228
244
  constructor() {
229
245
  this._scrollToTop$ = new Subject();
246
+ this._documentDefinitionName$ = new BehaviorSubject('');
230
247
  }
231
248
  get scrollToTop$() {
232
249
  return this._scrollToTop$.asObservable();
233
250
  }
251
+ get documentDefinitionName$() {
252
+ return this._documentDefinitionName$.asObservable();
253
+ }
234
254
  scrollToTop() {
235
255
  this._scrollToTop$.next(null);
236
256
  }
257
+ setDocumentDefinitionName(documentDefinitionName) {
258
+ this._documentDefinitionName$.next(documentDefinitionName);
259
+ }
237
260
  }
238
261
  ValtimoModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
239
262
  ValtimoModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, providedIn: 'root' });
@@ -1880,7 +1903,7 @@ class DateTypeConverter {
1880
1903
  if (!value) {
1881
1904
  return '-';
1882
1905
  }
1883
- return moment(value).format('DD-MM-YYYY, hh:mm A');
1906
+ return moment(value).format(definition?.format || 'DD-MM-YYYY, hh:mm A');
1884
1907
  }
1885
1908
  }
1886
1909
 
@@ -2012,9 +2035,16 @@ class ViewContentService {
2012
2035
  TYPE_CONVERTERS.forEach(converter => this.addConverter(converter));
2013
2036
  }
2014
2037
  get(value, definition) {
2038
+ const separator = ':';
2015
2039
  if (!definition.viewType) {
2016
2040
  definition.viewType = typeof value;
2017
2041
  }
2042
+ if (definition.viewType.includes(separator)) {
2043
+ // Get the substring of the string after the separator (:) and assign it to a new key
2044
+ definition.format = definition.viewType.slice(this.getSeparatorIndex(definition, separator) + 1);
2045
+ // Remove the substring after the separator and the separator from the string and assign it back to the viewType
2046
+ definition.viewType = definition.viewType.slice(0, this.getSeparatorIndex(definition, separator));
2047
+ }
2018
2048
  if (typeof this.converters[definition.viewType] !== 'undefined') {
2019
2049
  return this.converters[definition.viewType].convert(value, definition);
2020
2050
  }
@@ -2028,6 +2058,9 @@ class ViewContentService {
2028
2058
  }
2029
2059
  this.converters[converter.getTypeString()] = converter;
2030
2060
  }
2061
+ getSeparatorIndex(definition, separator) {
2062
+ return definition.viewType.indexOf(separator);
2063
+ }
2031
2064
  }
2032
2065
  ViewContentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2033
2066
  ViewContentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, providedIn: 'root' });
@@ -4066,6 +4099,7 @@ class DropzoneComponent {
4066
4099
  createImageThumbnails: false,
4067
4100
  acceptedFiles: this.acceptedFiles,
4068
4101
  previewTemplate: `<p style='display:none'></p>`,
4102
+ ...(this.maxFiles && { maxFiles: this.maxFiles }),
4069
4103
  accept: file => {
4070
4104
  this.dropzone.removeAllFiles();
4071
4105
  this.setFile(file);
@@ -4092,7 +4126,7 @@ class DropzoneComponent {
4092
4126
  }
4093
4127
  }
4094
4128
  DropzoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropzoneComponent, deps: [{ token: i1$8.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
4095
- DropzoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DropzoneComponent, selector: "valtimo-dropzone", inputs: { title: "title", hideTitle: "hideTitle", subtitle: "subtitle", externalError$: "externalError$", maxFileSize: "maxFileSize", showMaxFileSize: "showMaxFileSize", acceptedFiles: "acceptedFiles", clear$: "clear$", disabled: "disabled", hideFilePreview: "hideFilePreview", uploading: "uploading", camera: "camera" }, outputs: { fileSelected: "fileSelected" }, viewQueries: [{ propertyName: "dropzoneRef", first: true, predicate: ["dropzone"], 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<form #dropzone [ngClass]=\"{disabled: disabled || uploading}\" class=\"dropzone dz-clickable\">\n <div class=\"dz-message\">\n <div class=\"icon large-icon\"><span class=\"mdi mdi-cloud-upload\"></span></div>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n <ng-container *ngIf=\"uploading\">\n <ng-container *ngTemplateOutlet=\"progressBar\"></ng-container>\n </ng-container>\n <div class=\"dropzone-mobile-trigger needsclick\"></div>\n </div>\n <button\n (click)=\"showCamera()\"\n *ngIf=\"camera\"\n type=\"button\"\n class=\"btn btn-primary px-3 webcam-button\"\n >\n <i class=\"icon mdi mdi-camera\" aria-hidden=\"true\"></i>\n </button>\n <ng-container *ngIf=\"showingCamera$ | async\">\n <ng-container *ngTemplateOutlet=\"webcam\"></ng-container>\n </ng-container>\n</form>\n\n<ng-template #body>\n <h2 *ngIf=\"!hideTitle\" class=\"mb-4 mt-2\">{{ title || ('dropzone.drop' | translate) }}</h2>\n <span *ngIf=\"subtitle\" class=\"note mb-3\">{{ subtitle }}</span>\n <span *ngIf=\"showMaxFileSize\" class=\"note mb-3 small-font\"\n >{{ 'dropzone.maxFileSize' | translate }}<b>{{ maxFileSize }}mb</b></span\n >\n <ng-container *ngTemplateOutlet=\"preview\"></ng-container>\n</ng-template>\n\n<ng-template #preview>\n <ng-container\n *ngIf=\"{\n errorMessage: errorMessage$ | async,\n externalError: externalError$ | async,\n file: file$ | async\n } as obs\"\n >\n <ng-container *ngIf=\"obs.externalError || obs.errorMessage\">\n <div class=\"alert alert-danger mt-2 mb-0\">\n <div class=\"message\">\n {{ obs.externalError || obs.errorMessage }}\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!hideFilePreview && obs.file && !obs.externalError && !obs.errorMessage\">\n <div class=\"file\">\n <i class=\"icon mdi mdi-file-text mr-2\"></i>\n <span class=\"note\">{{ obs.file.name }}</span>\n <span class=\"note file-size\">- {{ obs.file.size | filesize: 2 }}</span>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #progressBar>\n <div class=\"progress-bar-container\">\n <valtimo-progress-bar></valtimo-progress-bar>\n </div>\n</ng-template>\n\n<ng-template #webcam>\n <valtimo-webcam (imageSaved)=\"webcamImageSaved($event)\"></valtimo-webcam>\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 */form.dropzone{padding:30px 20px}form.dropzone h2{text-align:center;font-size:2rem}form.dropzone.disabled{opacity:.7;pointer-events:none;cursor:default}form.dropzone.preview{padding:15px 20px;border:none}.dz-message{display:flex;flex-direction:column;align-items:center}.dropzone-mobile-trigger{cursor:pointer}.alert-light{display:flex;align-items:center}form.dropzone .mdi{background-color:transparent;border-radius:0;display:inline-block;height:auto;width:auto;margin-bottom:0;padding:0}form.dropzone .message{padding:1.385rem 2.1542rem}.file{font-size:1.5rem;display:flex;flex-direction:row;align-items:center}.small-font{font-size:1rem;color:#959595}.file-size{margin-left:5px}.progress-bar-container{height:auto;width:100%;position:absolute;bottom:0}.webcam-button{position:absolute;top:10px;right:10px}.large-icon{line-height:4.615rem}\n"], components: [{ type: ProgressBarComponent, selector: "valtimo-progress-bar" }, { type: WebcamComponent, selector: "valtimo-webcam", outputs: ["imageSaved"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe, "filesize": FileSizePipe } });
4129
+ DropzoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DropzoneComponent, selector: "valtimo-dropzone", inputs: { title: "title", hideTitle: "hideTitle", subtitle: "subtitle", externalError$: "externalError$", maxFileSize: "maxFileSize", showMaxFileSize: "showMaxFileSize", acceptedFiles: "acceptedFiles", clear$: "clear$", disabled: "disabled", hideFilePreview: "hideFilePreview", uploading: "uploading", camera: "camera", maxFiles: "maxFiles" }, outputs: { fileSelected: "fileSelected" }, viewQueries: [{ propertyName: "dropzoneRef", first: true, predicate: ["dropzone"], 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<form #dropzone [ngClass]=\"{disabled: disabled || uploading}\" class=\"dropzone dz-clickable\">\n <div class=\"dz-message\">\n <div class=\"icon large-icon\"><span class=\"mdi mdi-cloud-upload\"></span></div>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n <ng-container *ngIf=\"uploading\">\n <ng-container *ngTemplateOutlet=\"progressBar\"></ng-container>\n </ng-container>\n <div class=\"dropzone-mobile-trigger needsclick\"></div>\n </div>\n <button\n (click)=\"showCamera()\"\n *ngIf=\"camera\"\n type=\"button\"\n class=\"btn btn-primary px-3 webcam-button\"\n >\n <i class=\"icon mdi mdi-camera\" aria-hidden=\"true\"></i>\n </button>\n <ng-container *ngIf=\"showingCamera$ | async\">\n <ng-container *ngTemplateOutlet=\"webcam\"></ng-container>\n </ng-container>\n</form>\n\n<ng-template #body>\n <h2 *ngIf=\"!hideTitle\" class=\"mb-4 mt-2\">{{ title || ('dropzone.drop' | translate) }}</h2>\n <span *ngIf=\"subtitle\" class=\"note mb-3\">{{ subtitle }}</span>\n <span *ngIf=\"showMaxFileSize\" class=\"note mb-3 small-font\"\n >{{ 'dropzone.maxFileSize' | translate }}<b>{{ maxFileSize }}mb</b></span\n >\n <ng-container *ngTemplateOutlet=\"preview\"></ng-container>\n</ng-template>\n\n<ng-template #preview>\n <ng-container\n *ngIf=\"{\n errorMessage: errorMessage$ | async,\n externalError: externalError$ | async,\n file: file$ | async\n } as obs\"\n >\n <ng-container *ngIf=\"obs.externalError || obs.errorMessage\">\n <div class=\"alert alert-danger mt-2 mb-0\">\n <div class=\"message\">\n {{ obs.externalError || obs.errorMessage }}\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!hideFilePreview && obs.file && !obs.externalError && !obs.errorMessage\">\n <div class=\"file\">\n <i class=\"icon mdi mdi-file-text mr-2\"></i>\n <span class=\"note\">{{ obs.file.name }}</span>\n <span class=\"note file-size\">- {{ obs.file.size | filesize: 2 }}</span>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #progressBar>\n <div class=\"progress-bar-container\">\n <valtimo-progress-bar></valtimo-progress-bar>\n </div>\n</ng-template>\n\n<ng-template #webcam>\n <valtimo-webcam (imageSaved)=\"webcamImageSaved($event)\"></valtimo-webcam>\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 */form.dropzone{padding:30px 20px}form.dropzone h2{text-align:center;font-size:2rem}form.dropzone.disabled{opacity:.7;pointer-events:none;cursor:default}form.dropzone.preview{padding:15px 20px;border:none}.dz-message{display:flex;flex-direction:column;align-items:center}.dropzone-mobile-trigger{cursor:pointer}.alert-light{display:flex;align-items:center}form.dropzone .mdi{background-color:transparent;border-radius:0;display:inline-block;height:auto;width:auto;margin-bottom:0;padding:0}form.dropzone .message{padding:1.385rem 2.1542rem}.file{font-size:1.5rem;display:flex;flex-direction:row;align-items:center}.small-font{font-size:1rem;color:#959595}.file-size{margin-left:5px}.progress-bar-container{height:auto;width:100%;position:absolute;bottom:0}.webcam-button{position:absolute;top:10px;right:10px}.large-icon{line-height:4.615rem}\n"], components: [{ type: ProgressBarComponent, selector: "valtimo-progress-bar" }, { type: WebcamComponent, selector: "valtimo-webcam", outputs: ["imageSaved"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe, "filesize": FileSizePipe } });
4096
4130
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropzoneComponent, decorators: [{
4097
4131
  type: Component,
4098
4132
  args: [{ selector: 'valtimo-dropzone', 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<form #dropzone [ngClass]=\"{disabled: disabled || uploading}\" class=\"dropzone dz-clickable\">\n <div class=\"dz-message\">\n <div class=\"icon large-icon\"><span class=\"mdi mdi-cloud-upload\"></span></div>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n <ng-container *ngIf=\"uploading\">\n <ng-container *ngTemplateOutlet=\"progressBar\"></ng-container>\n </ng-container>\n <div class=\"dropzone-mobile-trigger needsclick\"></div>\n </div>\n <button\n (click)=\"showCamera()\"\n *ngIf=\"camera\"\n type=\"button\"\n class=\"btn btn-primary px-3 webcam-button\"\n >\n <i class=\"icon mdi mdi-camera\" aria-hidden=\"true\"></i>\n </button>\n <ng-container *ngIf=\"showingCamera$ | async\">\n <ng-container *ngTemplateOutlet=\"webcam\"></ng-container>\n </ng-container>\n</form>\n\n<ng-template #body>\n <h2 *ngIf=\"!hideTitle\" class=\"mb-4 mt-2\">{{ title || ('dropzone.drop' | translate) }}</h2>\n <span *ngIf=\"subtitle\" class=\"note mb-3\">{{ subtitle }}</span>\n <span *ngIf=\"showMaxFileSize\" class=\"note mb-3 small-font\"\n >{{ 'dropzone.maxFileSize' | translate }}<b>{{ maxFileSize }}mb</b></span\n >\n <ng-container *ngTemplateOutlet=\"preview\"></ng-container>\n</ng-template>\n\n<ng-template #preview>\n <ng-container\n *ngIf=\"{\n errorMessage: errorMessage$ | async,\n externalError: externalError$ | async,\n file: file$ | async\n } as obs\"\n >\n <ng-container *ngIf=\"obs.externalError || obs.errorMessage\">\n <div class=\"alert alert-danger mt-2 mb-0\">\n <div class=\"message\">\n {{ obs.externalError || obs.errorMessage }}\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!hideFilePreview && obs.file && !obs.externalError && !obs.errorMessage\">\n <div class=\"file\">\n <i class=\"icon mdi mdi-file-text mr-2\"></i>\n <span class=\"note\">{{ obs.file.name }}</span>\n <span class=\"note file-size\">- {{ obs.file.size | filesize: 2 }}</span>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #progressBar>\n <div class=\"progress-bar-container\">\n <valtimo-progress-bar></valtimo-progress-bar>\n </div>\n</ng-template>\n\n<ng-template #webcam>\n <valtimo-webcam (imageSaved)=\"webcamImageSaved($event)\"></valtimo-webcam>\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 */form.dropzone{padding:30px 20px}form.dropzone h2{text-align:center;font-size:2rem}form.dropzone.disabled{opacity:.7;pointer-events:none;cursor:default}form.dropzone.preview{padding:15px 20px;border:none}.dz-message{display:flex;flex-direction:column;align-items:center}.dropzone-mobile-trigger{cursor:pointer}.alert-light{display:flex;align-items:center}form.dropzone .mdi{background-color:transparent;border-radius:0;display:inline-block;height:auto;width:auto;margin-bottom:0;padding:0}form.dropzone .message{padding:1.385rem 2.1542rem}.file{font-size:1.5rem;display:flex;flex-direction:row;align-items:center}.small-font{font-size:1rem;color:#959595}.file-size{margin-left:5px}.progress-bar-container{height:auto;width:100%;position:absolute;bottom:0}.webcam-button{position:absolute;top:10px;right:10px}.large-icon{line-height:4.615rem}\n"] }]
@@ -4123,6 +4157,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4123
4157
  type: Input
4124
4158
  }], camera: [{
4125
4159
  type: Input
4160
+ }], maxFiles: [{
4161
+ type: Input
4126
4162
  }], fileSelected: [{
4127
4163
  type: Output
4128
4164
  }] } });
@@ -4186,7 +4222,7 @@ class FormIoUploaderComponent {
4186
4222
  }
4187
4223
  }
4188
4224
  FormIoUploaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoUploaderComponent, deps: [{ token: i1$a.UploadProviderService }, { token: FormIoStateService }, { token: FormIoDomService }, { token: i1$a.DownloadService }], target: i0.ɵɵFactoryTarget.Component });
4189
- FormIoUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormIoUploaderComponent, selector: "valtimo-formio-uploader", inputs: { disabled: "disabled", title: "title", hideTitle: "hideTitle", subtitle: "subtitle", maxFileSize: "maxFileSize", hideMaxFileSize: "hideMaxFileSize", camera: "camera", 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<valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [disabled]=\"disabled\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [camera]=\"camera\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<div class=\"file-preview\" *ngFor=\"let resource of _value\">\n <div class=\"file-preview-name\">\n <a href=\"#\" (click)=\"downloadFile(resource)\">\n {{ resource.originalName }}\n </a>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.size | filesize }}\n </span>\n </div>\n <div class=\"file-preview-delete\" *ngIf=\"!disabled\">\n <a (click)=\"deleteFile(resource.data.resourceId)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\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 */.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"], outputs: ["fileSelected"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe, "filesize": FileSizePipe } });
4225
+ FormIoUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormIoUploaderComponent, selector: "valtimo-formio-uploader", inputs: { disabled: "disabled", title: "title", hideTitle: "hideTitle", subtitle: "subtitle", maxFileSize: "maxFileSize", hideMaxFileSize: "hideMaxFileSize", camera: "camera", 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<valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [disabled]=\"disabled\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [camera]=\"camera\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<div class=\"file-preview\" *ngFor=\"let resource of _value\">\n <div class=\"file-preview-name\">\n <a href=\"#\" (click)=\"downloadFile(resource)\">\n {{ resource.originalName }}\n </a>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.size | filesize }}\n </span>\n </div>\n <div class=\"file-preview-delete\" *ngIf=\"!disabled\">\n <a (click)=\"deleteFile(resource.data.resourceId)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\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 */.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"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe, "filesize": FileSizePipe } });
4190
4226
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoUploaderComponent, decorators: [{
4191
4227
  type: Component,
4192
4228
  args: [{ selector: 'valtimo-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<valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [disabled]=\"disabled\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [camera]=\"camera\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<div class=\"file-preview\" *ngFor=\"let resource of _value\">\n <div class=\"file-preview-name\">\n <a href=\"#\" (click)=\"downloadFile(resource)\">\n {{ resource.originalName }}\n </a>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.size | filesize }}\n </span>\n </div>\n <div class=\"file-preview-delete\" *ngIf=\"!disabled\">\n <a (click)=\"deleteFile(resource.data.resourceId)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\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 */.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"] }]
@@ -4297,6 +4333,403 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4297
4333
  }]
4298
4334
  }] });
4299
4335
 
4336
+ /*
4337
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4338
+ *
4339
+ * Licensed under EUPL, Version 1.2 (the "License");
4340
+ * you may not use this file except in compliance with the License.
4341
+ * You may obtain a copy of the License at
4342
+ *
4343
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4344
+ *
4345
+ * Unless required by applicable law or agreed to in writing, software
4346
+ * distributed under the License is distributed on an "AS IS" basis,
4347
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4348
+ * See the License for the specific language governing permissions and
4349
+ * limitations under the License.
4350
+ */
4351
+ class DocumentenApiMetadataModalComponent {
4352
+ constructor(modalService, translateService, route, documentService, keycloakService, valtimoModalService) {
4353
+ this.modalService = modalService;
4354
+ this.translateService = translateService;
4355
+ this.route = route;
4356
+ this.documentService = documentService;
4357
+ this.keycloakService = keycloakService;
4358
+ this.valtimoModalService = valtimoModalService;
4359
+ this.documentTitle = '';
4360
+ this.metadata = new EventEmitter();
4361
+ this.CONFIDENTIALITY_LEVELS = [
4362
+ 'openbaar',
4363
+ 'beperkt_openbaar',
4364
+ 'intern',
4365
+ 'zaakvertrouwelijk',
4366
+ 'vertrouwelijk',
4367
+ 'confidentieel',
4368
+ 'geheim',
4369
+ 'zeer_geheim',
4370
+ ];
4371
+ this.confidentialityLevelItems$ = this.translateService
4372
+ .stream('key')
4373
+ .pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
4374
+ id: confidentialityLevel,
4375
+ text: this.translateService.instant(`document.${confidentialityLevel}`),
4376
+ }))));
4377
+ this.ADDITONAL_DOCUMENT_DATE_OPTIONS = [
4378
+ {
4379
+ value: 'neither',
4380
+ translationKey: 'document.noAdditionalDate',
4381
+ },
4382
+ {
4383
+ value: 'sent',
4384
+ translationKey: 'document.sendDate',
4385
+ },
4386
+ {
4387
+ value: 'received',
4388
+ translationKey: 'document.receiptDate',
4389
+ },
4390
+ ];
4391
+ this.clearStatusSelection$ = new Subject();
4392
+ this.additionalDocumentDate$ = new BehaviorSubject('neither');
4393
+ this.STATUSES = [
4394
+ 'in_bewerking',
4395
+ 'ter_vaststelling',
4396
+ 'definitief',
4397
+ 'gearchiveerd',
4398
+ ];
4399
+ this.RECEIPT_STATUSES = ['definitief', 'gearchiveerd'];
4400
+ this.formData$ = new BehaviorSubject(null);
4401
+ this.statusItems$ = combineLatest([
4402
+ this.additionalDocumentDate$,
4403
+ this.translateService.stream('key'),
4404
+ ]).pipe(tap(([additionalDocumentDate]) => {
4405
+ this.formData$.pipe(take$1(1)).subscribe(formData => {
4406
+ if (additionalDocumentDate === 'received' &&
4407
+ (formData.status === 'in_bewerking' || formData.status === 'ter_vaststelling')) {
4408
+ this.clearStatusSelection$.next(null);
4409
+ }
4410
+ });
4411
+ }), map(([additionalDocumentDate]) => (additionalDocumentDate === 'received' ? this.RECEIPT_STATUSES : this.STATUSES).map(status => ({
4412
+ id: status,
4413
+ text: this.translateService.instant(`document.${status}`),
4414
+ }))));
4415
+ this.LANGUAGES = ['nld', 'eng', 'deu'];
4416
+ this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
4417
+ id: language,
4418
+ text: this.translateService.instant(`document.${language}`),
4419
+ }))));
4420
+ this.documentTypeItems$ = combineLatest([
4421
+ this.route?.params || of(null),
4422
+ this.route?.firstChild?.params || of(null),
4423
+ this.valtimoModalService.documentDefinitionName$,
4424
+ ]).pipe(filter$1(([params, firstChildParams, documentDefinitionName]) => !!(params?.documentDefinitionName ||
4425
+ firstChildParams?.documentDefinitionName ||
4426
+ documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.documentService.getDocumentTypes(params?.documentDefinitionName ||
4427
+ firstChildParams?.documentDefinitionName ||
4428
+ documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
4429
+ this.showForm$ = this.modalService.modalVisible$;
4430
+ this.valid$ = new BehaviorSubject(false);
4431
+ this.userEmail$ = from(this.keycloakService.loadUserProfile()).pipe(map(userProfile => userProfile?.email || ''));
4432
+ }
4433
+ ngOnInit() {
4434
+ this.openShowSubscription();
4435
+ this.openHideSubscription();
4436
+ }
4437
+ ngOnDestroy() {
4438
+ this.showSubscription?.unsubscribe();
4439
+ this.hideSubscription?.unsubscribe();
4440
+ }
4441
+ hide() {
4442
+ this.formData$.next(null);
4443
+ this.valid$.next(false);
4444
+ this.additionalDocumentDate$.next('neither');
4445
+ this.modalService.closeModal();
4446
+ }
4447
+ cancel() {
4448
+ this.hide();
4449
+ }
4450
+ save() {
4451
+ combineLatest([this.valid$, this.formData$])
4452
+ .pipe(take$1(1))
4453
+ .subscribe(([valid, formData]) => {
4454
+ if (valid) {
4455
+ this.metadata.emit(formData);
4456
+ }
4457
+ });
4458
+ }
4459
+ formValueChange(data) {
4460
+ this.formData$.next(data);
4461
+ this.setValid(data);
4462
+ }
4463
+ setAdditionalDate(value) {
4464
+ this.additionalDocumentDate$.next(value);
4465
+ }
4466
+ setValid(data) {
4467
+ this.valid$.next(!!(data.filename &&
4468
+ data.title &&
4469
+ data.author &&
4470
+ data.creationDate &&
4471
+ data.status &&
4472
+ data.language &&
4473
+ data.informatieobjecttype));
4474
+ }
4475
+ openShowSubscription() {
4476
+ this.showSubscription = this.show$.subscribe(() => {
4477
+ this.modalService.openModal(this.documentenApiMetadataModal);
4478
+ });
4479
+ }
4480
+ openHideSubscription() {
4481
+ this.hideSubscription = this.hide$.subscribe(() => {
4482
+ this.hide();
4483
+ });
4484
+ }
4485
+ }
4486
+ 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 });
4487
+ 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", 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"] }, { type: i1$4.InputLabelComponent, selector: "v-input-label", inputs: ["name", "title", "titleTranslationKey", "tooltip", "required", "largeMargin"] }], 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 } });
4488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
4489
+ type: Component,
4490
+ 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"] }]
4491
+ }], 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: [{
4492
+ type: ViewChild,
4493
+ args: ['documentenApiMetadataModal']
4494
+ }], show$: [{
4495
+ type: Input
4496
+ }], hide$: [{
4497
+ type: Input
4498
+ }], disabled$: [{
4499
+ type: Input
4500
+ }], file$: [{
4501
+ type: Input
4502
+ }], documentTitle: [{
4503
+ type: Input
4504
+ }], disableDocumentTitle: [{
4505
+ type: Input
4506
+ }], filename: [{
4507
+ type: Input
4508
+ }], disableFilename: [{
4509
+ type: Input
4510
+ }], author: [{
4511
+ type: Input
4512
+ }], disableAuthor: [{
4513
+ type: Input
4514
+ }], status: [{
4515
+ type: Input
4516
+ }], disableStatus: [{
4517
+ type: Input
4518
+ }], language: [{
4519
+ type: Input
4520
+ }], disableLanguage: [{
4521
+ type: Input
4522
+ }], documentType: [{
4523
+ type: Input
4524
+ }], disableDocumentType: [{
4525
+ type: Input
4526
+ }], description: [{
4527
+ type: Input
4528
+ }], disableDescription: [{
4529
+ type: Input
4530
+ }], confidentialityLevel: [{
4531
+ type: Input
4532
+ }], disableConfidentialityLevel: [{
4533
+ type: Input
4534
+ }], metadata: [{
4535
+ type: Output
4536
+ }] } });
4537
+
4538
+ /*
4539
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4540
+ *
4541
+ * Licensed under EUPL, Version 1.2 (the "License");
4542
+ * you may not use this file except in compliance with the License.
4543
+ * You may obtain a copy of the License at
4544
+ *
4545
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4546
+ *
4547
+ * Unless required by applicable law or agreed to in writing, software
4548
+ * distributed under the License is distributed on an "AS IS" basis,
4549
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4550
+ * See the License for the specific language governing permissions and
4551
+ * limitations under the License.
4552
+ */
4553
+ class DocumentenApiUploaderComponent {
4554
+ constructor(uploadProviderService, stateService, domService, downloadService, modalService, userProviderService, route) {
4555
+ this.uploadProviderService = uploadProviderService;
4556
+ this.stateService = stateService;
4557
+ this.domService = domService;
4558
+ this.downloadService = downloadService;
4559
+ this.modalService = modalService;
4560
+ this.userProviderService = userProviderService;
4561
+ this.route = route;
4562
+ this.valueChange = new EventEmitter();
4563
+ this.uploading$ = new BehaviorSubject(false);
4564
+ this.fileToBeUploaded$ = new BehaviorSubject(null);
4565
+ this.modalDisabled$ = new BehaviorSubject(false);
4566
+ this.showModal$ = new Subject();
4567
+ this.hideModal$ = new Subject();
4568
+ this.uploadProcessLinked$ = combineLatest([
4569
+ this.route?.params || of(null),
4570
+ this.route?.firstChild?.params || of(null),
4571
+ this.modalService.documentDefinitionName$,
4572
+ ]).pipe(filter(([params, firstChildParams, documentDefinitionName]) => !!(params?.documentDefinitionName ||
4573
+ firstChildParams?.documentDefinitionName ||
4574
+ documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.uploadProviderService.checkUploadProcessLink(params?.documentDefinitionName ||
4575
+ firstChildParams?.documentDefinitionName ||
4576
+ documentDefinitionName)), startWith('loading'));
4577
+ this.isAdmin$ = this.userProviderService
4578
+ .getUserSubject()
4579
+ .pipe(map$1(userIdentity => userIdentity?.roles.includes('ROLE_ADMIN')));
4580
+ this._value = [];
4581
+ }
4582
+ get value() {
4583
+ return this._value;
4584
+ }
4585
+ set value(value) {
4586
+ if (Array.isArray(value)) {
4587
+ this._value = value;
4588
+ }
4589
+ }
4590
+ fileSelected(file) {
4591
+ this.fileToBeUploaded$.next(file);
4592
+ this.showModal$.next(null);
4593
+ }
4594
+ deleteFile(id) {
4595
+ this.domService.toggleSubmitButton(true);
4596
+ this._value = this._value.filter((file) => file?.id ? file?.id !== id : true);
4597
+ this.valueChange.emit(this._value);
4598
+ }
4599
+ metadataSet(metadata) {
4600
+ this.uploading$.next(true);
4601
+ this.hideModal$.next(null);
4602
+ this.domService.toggleSubmitButton(true);
4603
+ this.fileToBeUploaded$
4604
+ .pipe(take(1), switchMap(file => this.uploadProviderService.uploadTempFileWithMetadata(file, metadata)), tap(result => {
4605
+ this.domService.toggleSubmitButton(false);
4606
+ this.uploading$.next(false);
4607
+ this._value.push(result);
4608
+ this.valueChange.emit(this._value);
4609
+ }))
4610
+ .subscribe();
4611
+ }
4612
+ }
4613
+ 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 });
4614
+ 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 } });
4615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiUploaderComponent, decorators: [{
4616
+ type: Component,
4617
+ 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"] }]
4618
+ }], 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: [{
4619
+ type: Input
4620
+ }], title: [{
4621
+ type: Input
4622
+ }], hideTitle: [{
4623
+ type: Input
4624
+ }], subtitle: [{
4625
+ type: Input
4626
+ }], maxFileSize: [{
4627
+ type: Input
4628
+ }], hideMaxFileSize: [{
4629
+ type: Input
4630
+ }], camera: [{
4631
+ type: Input
4632
+ }], documentTitle: [{
4633
+ type: Input
4634
+ }], disableDocumentTitle: [{
4635
+ type: Input
4636
+ }], filename: [{
4637
+ type: Input
4638
+ }], disableFilename: [{
4639
+ type: Input
4640
+ }], author: [{
4641
+ type: Input
4642
+ }], disableAuthor: [{
4643
+ type: Input
4644
+ }], status: [{
4645
+ type: Input
4646
+ }], disableStatus: [{
4647
+ type: Input
4648
+ }], language: [{
4649
+ type: Input
4650
+ }], disableLanguage: [{
4651
+ type: Input
4652
+ }], documentType: [{
4653
+ type: Input
4654
+ }], disableDocumentType: [{
4655
+ type: Input
4656
+ }], description: [{
4657
+ type: Input
4658
+ }], disableDescription: [{
4659
+ type: Input
4660
+ }], confidentialityLevel: [{
4661
+ type: Input
4662
+ }], disableConfidentialityLevel: [{
4663
+ type: Input
4664
+ }], valueChange: [{
4665
+ type: Output
4666
+ }], value: [{
4667
+ type: Input
4668
+ }] } });
4669
+
4670
+ /*
4671
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4672
+ *
4673
+ * Licensed under EUPL, Version 1.2 (the "License");
4674
+ * you may not use this file except in compliance with the License.
4675
+ * You may obtain a copy of the License at
4676
+ *
4677
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4678
+ *
4679
+ * Unless required by applicable law or agreed to in writing, software
4680
+ * distributed under the License is distributed on an "AS IS" basis,
4681
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4682
+ * See the License for the specific language governing permissions and
4683
+ * limitations under the License.
4684
+ */
4685
+ class DocumentenApiMetadataModalModule {
4686
+ }
4687
+ DocumentenApiMetadataModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4688
+ DocumentenApiMetadataModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, declarations: [DocumentenApiMetadataModalComponent], imports: [CommonModule,
4689
+ TranslateModule,
4690
+ ModalModule$1,
4691
+ TitleModule,
4692
+ ButtonModule,
4693
+ TranslateModule,
4694
+ FormModule,
4695
+ InputModule,
4696
+ SelectModule,
4697
+ DatePickerModule,
4698
+ InputLabelModule], exports: [DocumentenApiMetadataModalComponent] });
4699
+ DocumentenApiMetadataModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, imports: [[
4700
+ CommonModule,
4701
+ TranslateModule,
4702
+ ModalModule$1,
4703
+ TitleModule,
4704
+ ButtonModule,
4705
+ TranslateModule,
4706
+ FormModule,
4707
+ InputModule,
4708
+ SelectModule,
4709
+ DatePickerModule,
4710
+ InputLabelModule,
4711
+ ]] });
4712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, decorators: [{
4713
+ type: NgModule,
4714
+ args: [{
4715
+ declarations: [DocumentenApiMetadataModalComponent],
4716
+ exports: [DocumentenApiMetadataModalComponent],
4717
+ imports: [
4718
+ CommonModule,
4719
+ TranslateModule,
4720
+ ModalModule$1,
4721
+ TitleModule,
4722
+ ButtonModule,
4723
+ TranslateModule,
4724
+ FormModule,
4725
+ InputModule,
4726
+ SelectModule,
4727
+ DatePickerModule,
4728
+ InputLabelModule,
4729
+ ],
4730
+ }]
4731
+ }] });
4732
+
4300
4733
  /*
4301
4734
  * Copyright 2015-2020 Ritense BV, the Netherlands.
4302
4735
  *
@@ -4315,14 +4748,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4315
4748
  class FormIoModule {
4316
4749
  }
4317
4750
  FormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4318
- FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent], imports: [CommonModule,
4751
+ FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent,
4752
+ FormioBuilderComponent,
4753
+ FormIoUploaderComponent,
4754
+ DocumentenApiUploaderComponent], imports: [CommonModule,
4319
4755
  FormioModule,
4320
4756
  DropzoneModule,
4321
4757
  TranslateModule,
4322
4758
  DocumentModule,
4323
4759
  FileSizeModule,
4324
4760
  ResourceModule,
4325
- RouterModule], exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent] });
4761
+ RouterModule,
4762
+ DocumentenApiMetadataModalModule], exports: [FormioComponent,
4763
+ FormioBuilderComponent,
4764
+ FormIoUploaderComponent,
4765
+ DocumentenApiUploaderComponent] });
4326
4766
  FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }], imports: [[
4327
4767
  CommonModule,
4328
4768
  FormioModule,
@@ -4332,6 +4772,7 @@ FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
4332
4772
  FileSizeModule,
4333
4773
  ResourceModule,
4334
4774
  RouterModule,
4775
+ DocumentenApiMetadataModalModule,
4335
4776
  ]] });
4336
4777
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, decorators: [{
4337
4778
  type: NgModule,
@@ -4345,9 +4786,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4345
4786
  FileSizeModule,
4346
4787
  ResourceModule,
4347
4788
  RouterModule,
4789
+ DocumentenApiMetadataModalModule,
4790
+ ],
4791
+ declarations: [
4792
+ FormioComponent,
4793
+ FormioBuilderComponent,
4794
+ FormIoUploaderComponent,
4795
+ DocumentenApiUploaderComponent,
4796
+ ],
4797
+ exports: [
4798
+ FormioComponent,
4799
+ FormioBuilderComponent,
4800
+ FormIoUploaderComponent,
4801
+ DocumentenApiUploaderComponent,
4348
4802
  ],
4349
- declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
4350
- exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
4351
4803
  providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }],
4352
4804
  }]
4353
4805
  }] });
@@ -4868,7 +5320,7 @@ const formIoUploaderEditForm = () => ({
4868
5320
  * limitations under the License.
4869
5321
  */
4870
5322
  const customUploaderType = 'valtimo-file';
4871
- const COMPONENT_OPTIONS = {
5323
+ const COMPONENT_OPTIONS$1 = {
4872
5324
  type: customUploaderType,
4873
5325
  selector: 'valtimo-form-io-uploader',
4874
5326
  title: 'Valtimo File Upload',
@@ -4879,6 +5331,341 @@ const COMPONENT_OPTIONS = {
4879
5331
  editForm: formIoUploaderEditForm,
4880
5332
  };
4881
5333
  function registerFormioUploadComponent(injector) {
5334
+ const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS$1);
5335
+ // override setValue function to allow for setting an array value
5336
+ class UploaderComponent extends originalUploadComponent {
5337
+ setValue(value) {
5338
+ this._customAngularElement.value = value;
5339
+ return true;
5340
+ }
5341
+ }
5342
+ if (!customElements.get(COMPONENT_OPTIONS$1.selector)) {
5343
+ registerCustomFormioComponentWithClass(COMPONENT_OPTIONS$1, FormIoUploaderComponent, UploaderComponent, injector);
5344
+ }
5345
+ }
5346
+
5347
+ /*
5348
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5349
+ *
5350
+ * Licensed under EUPL, Version 1.2 (the "License");
5351
+ * you may not use this file except in compliance with the License.
5352
+ * You may obtain a copy of the License at
5353
+ *
5354
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5355
+ *
5356
+ * Unless required by applicable law or agreed to in writing, software
5357
+ * distributed under the License is distributed on an "AS IS" basis,
5358
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5359
+ * See the License for the specific language governing permissions and
5360
+ * limitations under the License.
5361
+ */
5362
+ const documentenApiUploaderEditForm = () => ({
5363
+ components: [
5364
+ { key: 'type', type: 'hidden' },
5365
+ {
5366
+ type: 'textfield',
5367
+ input: true,
5368
+ key: 'label',
5369
+ label: 'Label',
5370
+ placeholder: 'Label',
5371
+ validate: {
5372
+ required: true,
5373
+ },
5374
+ },
5375
+ {
5376
+ type: 'textfield',
5377
+ input: true,
5378
+ key: 'key',
5379
+ label: 'Property Name',
5380
+ placeholder: 'Property Name',
5381
+ tooltip: 'The name of this field in the API endpoint.',
5382
+ validate: {
5383
+ required: true,
5384
+ },
5385
+ },
5386
+ {
5387
+ type: 'textfield',
5388
+ input: true,
5389
+ key: 'customOptions.title',
5390
+ label: 'Title',
5391
+ placeholder: 'Title',
5392
+ tooltip: 'Leave empty to use the default title',
5393
+ validate: {
5394
+ required: false,
5395
+ },
5396
+ },
5397
+ {
5398
+ type: 'checkbox',
5399
+ input: true,
5400
+ inputType: 'checkbox',
5401
+ key: 'customOptions.hideTitle',
5402
+ label: 'Hide title',
5403
+ validate: {
5404
+ required: false,
5405
+ },
5406
+ },
5407
+ {
5408
+ type: 'textfield',
5409
+ input: true,
5410
+ key: 'customOptions.subtitle',
5411
+ label: 'Subtitle',
5412
+ placeholder: 'Title',
5413
+ tooltip: 'Leave empty to hide subtitle',
5414
+ validate: {
5415
+ required: false,
5416
+ },
5417
+ },
5418
+ {
5419
+ type: 'number',
5420
+ input: true,
5421
+ key: 'customOptions.maxFileSize',
5422
+ label: 'Maximum file size',
5423
+ placeholder: 'Maximum file size',
5424
+ defaultValue: 5,
5425
+ validate: {
5426
+ required: true,
5427
+ },
5428
+ },
5429
+ {
5430
+ type: 'checkbox',
5431
+ input: true,
5432
+ inputType: 'checkbox',
5433
+ key: 'customOptions.hideMaxFileSize',
5434
+ label: 'Hide maximum file size',
5435
+ validate: {
5436
+ required: false,
5437
+ },
5438
+ },
5439
+ {
5440
+ type: 'checkbox',
5441
+ input: true,
5442
+ inputType: 'checkbox',
5443
+ key: 'customOptions.camera',
5444
+ label: 'Allow camera uploads',
5445
+ validate: {
5446
+ required: false,
5447
+ },
5448
+ },
5449
+ {
5450
+ type: 'textfield',
5451
+ input: true,
5452
+ key: 'customOptions.documentTitle',
5453
+ label: 'Default document title',
5454
+ tooltip: 'Leave empty to let the user input their own title',
5455
+ validate: {
5456
+ required: false,
5457
+ },
5458
+ },
5459
+ {
5460
+ type: 'checkbox',
5461
+ input: true,
5462
+ inputType: 'checkbox',
5463
+ key: 'customOptions.disableDocumentTitle',
5464
+ label: 'Disable document title input',
5465
+ validate: {
5466
+ required: false,
5467
+ },
5468
+ },
5469
+ {
5470
+ type: 'textfield',
5471
+ input: true,
5472
+ key: 'customOptions.filename',
5473
+ label: 'Default filename',
5474
+ tooltip: 'Leave empty to let the user input their own filename',
5475
+ validate: {
5476
+ required: false,
5477
+ },
5478
+ },
5479
+ {
5480
+ type: 'checkbox',
5481
+ input: true,
5482
+ inputType: 'checkbox',
5483
+ key: 'customOptions.disableFilename',
5484
+ label: 'Disable filename input',
5485
+ validate: {
5486
+ required: false,
5487
+ },
5488
+ },
5489
+ {
5490
+ type: 'textfield',
5491
+ input: true,
5492
+ key: 'customOptions.author',
5493
+ label: 'Default author',
5494
+ tooltip: 'Leave empty to let the user input their own author',
5495
+ validate: {
5496
+ required: false,
5497
+ },
5498
+ },
5499
+ {
5500
+ type: 'checkbox',
5501
+ input: true,
5502
+ inputType: 'checkbox',
5503
+ key: 'customOptions.disableAuthor',
5504
+ label: 'Disable author input',
5505
+ validate: {
5506
+ required: false,
5507
+ },
5508
+ },
5509
+ {
5510
+ type: 'select',
5511
+ label: 'Default status',
5512
+ key: 'customOptions.status',
5513
+ placeholder: 'Select a default status',
5514
+ data: {
5515
+ values: [
5516
+ { value: 'in_bewerking', label: 'In editing' },
5517
+ { value: 'ter_vaststelling', label: 'To be confirmed' },
5518
+ { value: 'definitief', label: 'Definitive' },
5519
+ { value: 'gearchiveerd', label: 'Archived' },
5520
+ ],
5521
+ },
5522
+ dataSrc: 'values',
5523
+ input: true,
5524
+ validate: {
5525
+ required: false,
5526
+ },
5527
+ },
5528
+ {
5529
+ type: 'checkbox',
5530
+ input: true,
5531
+ inputType: 'checkbox',
5532
+ key: 'customOptions.disableStatus',
5533
+ label: 'Disable status input',
5534
+ validate: {
5535
+ required: false,
5536
+ },
5537
+ },
5538
+ {
5539
+ type: 'select',
5540
+ label: 'Default language',
5541
+ key: 'customOptions.language',
5542
+ placeholder: 'Select a default language',
5543
+ data: {
5544
+ values: [
5545
+ { value: 'nld', label: 'Dutch' },
5546
+ { value: 'eng', label: 'English' },
5547
+ { value: 'deu', label: 'German' },
5548
+ ],
5549
+ },
5550
+ dataSrc: 'values',
5551
+ input: true,
5552
+ validate: {
5553
+ required: false,
5554
+ },
5555
+ },
5556
+ {
5557
+ type: 'checkbox',
5558
+ input: true,
5559
+ inputType: 'checkbox',
5560
+ key: 'customOptions.disableLanguage',
5561
+ label: 'Disable language input',
5562
+ validate: {
5563
+ required: false,
5564
+ },
5565
+ },
5566
+ {
5567
+ type: 'textfield',
5568
+ input: true,
5569
+ key: 'customOptions.documentType',
5570
+ label: 'Default document type url',
5571
+ tooltip: 'Must match the document type url exactly. Leave empty to let the user input their own document type',
5572
+ validate: {
5573
+ required: false,
5574
+ },
5575
+ },
5576
+ {
5577
+ type: 'checkbox',
5578
+ input: true,
5579
+ inputType: 'checkbox',
5580
+ key: 'customOptions.disableDocumentType',
5581
+ label: 'Disable document type input',
5582
+ validate: {
5583
+ required: false,
5584
+ },
5585
+ },
5586
+ {
5587
+ type: 'textfield',
5588
+ input: true,
5589
+ key: 'customOptions.description',
5590
+ label: 'Default description',
5591
+ tooltip: 'Leave empty to let the user input their own description',
5592
+ validate: {
5593
+ required: false,
5594
+ },
5595
+ },
5596
+ {
5597
+ type: 'checkbox',
5598
+ input: true,
5599
+ inputType: 'checkbox',
5600
+ key: 'customOptions.disableDescription',
5601
+ label: 'Disable description input',
5602
+ validate: {
5603
+ required: false,
5604
+ },
5605
+ },
5606
+ {
5607
+ type: 'select',
5608
+ label: 'Default confidentiality level',
5609
+ key: 'customOptions.confidentialityLevel',
5610
+ placeholder: 'Select a default confidentiality level',
5611
+ data: {
5612
+ values: [
5613
+ { value: 'openbaar', label: 'Public' },
5614
+ { value: 'beperkt_openbaar', label: 'Restricted public' },
5615
+ { value: 'intern', label: 'Internal' },
5616
+ { value: 'zaakvertrouwelijk', label: 'Case confidential' },
5617
+ { value: 'vertrouwelijk', label: 'Private' },
5618
+ { value: 'confidentieel', label: 'Confidential' },
5619
+ { value: 'geheim', label: 'Secret' },
5620
+ { value: 'zeer_geheim', label: 'Very secret' },
5621
+ ],
5622
+ },
5623
+ dataSrc: 'values',
5624
+ input: true,
5625
+ validate: {
5626
+ required: false,
5627
+ },
5628
+ },
5629
+ {
5630
+ type: 'checkbox',
5631
+ input: true,
5632
+ inputType: 'checkbox',
5633
+ key: 'customOptions.disableConfidentialityLevel',
5634
+ label: 'Disable confidentiality level input',
5635
+ validate: {
5636
+ required: false,
5637
+ },
5638
+ },
5639
+ ],
5640
+ });
5641
+
5642
+ /*
5643
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5644
+ *
5645
+ * Licensed under EUPL, Version 1.2 (the "License");
5646
+ * you may not use this file except in compliance with the License.
5647
+ * You may obtain a copy of the License at
5648
+ *
5649
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5650
+ *
5651
+ * Unless required by applicable law or agreed to in writing, software
5652
+ * distributed under the License is distributed on an "AS IS" basis,
5653
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5654
+ * See the License for the specific language governing permissions and
5655
+ * limitations under the License.
5656
+ */
5657
+ const customDocumentApiUploaderType = 'documenten-api-file';
5658
+ const COMPONENT_OPTIONS = {
5659
+ type: customDocumentApiUploaderType,
5660
+ selector: 'documenten-api-form-io-uploader',
5661
+ title: 'Documenten API File Upload',
5662
+ group: 'advanced',
5663
+ icon: 'upload',
5664
+ // set empty value to force formio to accept arrays as valid input value for this field type
5665
+ emptyValue: [],
5666
+ editForm: documentenApiUploaderEditForm,
5667
+ };
5668
+ function registerDocumentenApiFormioUploadComponent(injector) {
4882
5669
  const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
4883
5670
  // override setValue function to allow for setting an array value
4884
5671
  class UploaderComponent extends originalUploadComponent {
@@ -4888,7 +5675,7 @@ function registerFormioUploadComponent(injector) {
4888
5675
  }
4889
5676
  }
4890
5677
  if (!customElements.get(COMPONENT_OPTIONS.selector)) {
4891
- registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, FormIoUploaderComponent, UploaderComponent, injector);
5678
+ registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, DocumentenApiUploaderComponent, UploaderComponent, injector);
4892
5679
  }
4893
5680
  }
4894
5681
 
@@ -5159,5 +5946,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5159
5946
  * Generated bundle index. Do not edit.
5160
5947
  */
5161
5948
 
5162
- export { Alert, AlertComponent, AlertModule, AlertService, AlertType, AlertsOptionsImpl, BpmnJsDiagramComponent, BpmnJsDiagramModule, BreadcrumbNavigationComponent, BreadcrumbNavigationModule, CamundaFormComponent, CamundaFormModule, CardComponent, CardModule, ComponentsModule, DataListComponent, DataListModule, 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 };
5949
+ 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, 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 };
5163
5950
  //# sourceMappingURL=valtimo-components.mjs.map