@valtimo/components 5.10.0 → 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 (40) hide show
  1. package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.mjs +89 -11
  2. package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.mjs +6 -3
  3. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.mjs +295 -0
  4. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.mjs +147 -0
  5. package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.mjs +43 -0
  6. package/esm2020/lib/components/form-io/form-io.module.mjs +26 -5
  7. package/esm2020/lib/components/view-content/type-converters/dateTypeConverter.mjs +2 -2
  8. package/esm2020/lib/components/view-content/view-content.service.mjs +11 -1
  9. package/esm2020/lib/models/documenten-api-metadata.model.mjs +1 -1
  10. package/esm2020/lib/models/form-io.model.mjs +1 -1
  11. package/esm2020/lib/services/valtimo-modal.service.mjs +9 -2
  12. package/esm2020/public_api.mjs +3 -1
  13. package/fesm2015/valtimo-components.mjs +915 -332
  14. package/fesm2015/valtimo-components.mjs.map +1 -1
  15. package/fesm2020/valtimo-components.mjs +923 -342
  16. package/fesm2020/valtimo-components.mjs.map +1 -1
  17. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +34 -5
  18. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -1
  19. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts +1 -1
  20. package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts.map +1 -1
  21. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts +105 -0
  22. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts.map +1 -0
  23. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts +61 -0
  24. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts.map +1 -0
  25. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts +4 -0
  26. package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts.map +1 -0
  27. package/lib/components/form-io/form-io.module.d.ts +11 -9
  28. package/lib/components/form-io/form-io.module.d.ts.map +1 -1
  29. package/lib/components/view-content/type-converters/dateTypeConverter.d.ts.map +1 -1
  30. package/lib/components/view-content/view-content.service.d.ts +1 -0
  31. package/lib/components/view-content/view-content.service.d.ts.map +1 -1
  32. package/lib/models/documenten-api-metadata.model.d.ts +2 -1
  33. package/lib/models/documenten-api-metadata.model.d.ts.map +1 -1
  34. package/lib/models/form-io.model.d.ts +3 -0
  35. package/lib/models/form-io.model.d.ts.map +1 -1
  36. package/lib/services/valtimo-modal.service.d.ts +3 -0
  37. package/lib/services/valtimo-modal.service.d.ts.map +1 -1
  38. package/package.json +1 -1
  39. package/public_api.d.ts +2 -0
  40. package/public_api.d.ts.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, Input, Directive, EventEmitter, Output, ViewContainerRef, ViewChild, NgModule, Pipe, HostListener, ViewChildren } from '@angular/core';
3
- import { Subject, from, switchMap, map, BehaviorSubject, Observable, combineLatest, fromEvent, Subscription, timer, take as take$1 } from 'rxjs';
3
+ import { Subject, BehaviorSubject, from, switchMap, map, Observable, combineLatest, fromEvent, Subscription, timer, take as take$1, of, filter as filter$1, startWith } from 'rxjs';
4
4
  import * as i3 from '@angular/forms';
5
5
  import { Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
6
6
  import moment from 'moment';
@@ -11,7 +11,7 @@ import * as i1$2 from 'keycloak-angular';
11
11
  import * as i1$3 from '@valtimo/config';
12
12
  import { HttpLoaderFactory } from '@valtimo/config';
13
13
  import * as i1$4 from '@valtimo/user-interface';
14
- import { ParagraphModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, DatePickerModule } from '@valtimo/user-interface';
14
+ import { ParagraphModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, DatePickerModule, InputLabelModule } from '@valtimo/user-interface';
15
15
  import * as i1$5 from '@angular/router';
16
16
  import { RouterModule, NavigationEnd, PRIMARY_OUTLET, NavigationStart } from '@angular/router';
17
17
  import * as i2 from '@valtimo/document';
@@ -25,7 +25,7 @@ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
25
25
  import * as i1$9 from '@angular/common/http';
26
26
  import { HttpClient } from '@angular/common/http';
27
27
  import * as i5 from '@valtimo/context';
28
- import { map as map$1, debounceTime, take, filter, switchMap as switchMap$1 } from 'rxjs/operators';
28
+ import { map as map$1, debounceTime, take, filter, switchMap as switchMap$1, tap } from 'rxjs/operators';
29
29
  import * as i2$1 from '@angular/platform-browser';
30
30
  import BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
31
31
  import heatmap from 'heatmap.js-fixed/build/heatmap.js';
@@ -243,13 +243,20 @@ class TimelineItemImpl {
243
243
  class ValtimoModalService {
244
244
  constructor() {
245
245
  this._scrollToTop$ = new Subject();
246
+ this._documentDefinitionName$ = new BehaviorSubject('');
246
247
  }
247
248
  get scrollToTop$() {
248
249
  return this._scrollToTop$.asObservable();
249
250
  }
251
+ get documentDefinitionName$() {
252
+ return this._documentDefinitionName$.asObservable();
253
+ }
250
254
  scrollToTop() {
251
255
  this._scrollToTop$.next(null);
252
256
  }
257
+ setDocumentDefinitionName(documentDefinitionName) {
258
+ this._documentDefinitionName$.next(documentDefinitionName);
259
+ }
253
260
  }
254
261
  ValtimoModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
255
262
  ValtimoModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, providedIn: 'root' });
@@ -1896,7 +1903,7 @@ class DateTypeConverter {
1896
1903
  if (!value) {
1897
1904
  return '-';
1898
1905
  }
1899
- return moment(value).format('DD-MM-YYYY, hh:mm A');
1906
+ return moment(value).format(definition?.format || 'DD-MM-YYYY, hh:mm A');
1900
1907
  }
1901
1908
  }
1902
1909
 
@@ -2028,9 +2035,16 @@ class ViewContentService {
2028
2035
  TYPE_CONVERTERS.forEach(converter => this.addConverter(converter));
2029
2036
  }
2030
2037
  get(value, definition) {
2038
+ const separator = ':';
2031
2039
  if (!definition.viewType) {
2032
2040
  definition.viewType = typeof value;
2033
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
+ }
2034
2048
  if (typeof this.converters[definition.viewType] !== 'undefined') {
2035
2049
  return this.converters[definition.viewType].convert(value, definition);
2036
2050
  }
@@ -2044,6 +2058,9 @@ class ViewContentService {
2044
2058
  }
2045
2059
  this.converters[converter.getTypeString()] = converter;
2046
2060
  }
2061
+ getSeparatorIndex(definition, separator) {
2062
+ return definition.viewType.indexOf(separator);
2063
+ }
2047
2064
  }
2048
2065
  ViewContentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2049
2066
  ViewContentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, providedIn: 'root' });
@@ -4331,45 +4348,192 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4331
4348
  * See the License for the specific language governing permissions and
4332
4349
  * limitations under the License.
4333
4350
  */
4334
- class FormIoModule {
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
+ }
4335
4485
  }
4336
- FormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4337
- FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent], imports: [CommonModule,
4338
- FormioModule,
4339
- DropzoneModule,
4340
- TranslateModule,
4341
- DocumentModule,
4342
- FileSizeModule,
4343
- ResourceModule,
4344
- RouterModule], exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent] });
4345
- FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }], imports: [[
4346
- CommonModule,
4347
- FormioModule,
4348
- DropzoneModule,
4349
- TranslateModule,
4350
- DocumentModule,
4351
- FileSizeModule,
4352
- ResourceModule,
4353
- RouterModule,
4354
- ]] });
4355
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, decorators: [{
4356
- type: NgModule,
4357
- args: [{
4358
- imports: [
4359
- CommonModule,
4360
- FormioModule,
4361
- DropzoneModule,
4362
- TranslateModule,
4363
- DocumentModule,
4364
- FileSizeModule,
4365
- ResourceModule,
4366
- RouterModule,
4367
- ],
4368
- declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
4369
- exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
4370
- providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }],
4371
- }]
4372
- }] });
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
+ }] } });
4373
4537
 
4374
4538
  /*
4375
4539
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -4386,54 +4550,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4386
4550
  * See the License for the specific language governing permissions and
4387
4551
  * limitations under the License.
4388
4552
  */
4389
- class ModalComponent {
4390
- constructor(modalService) {
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;
4391
4559
  this.modalService = modalService;
4392
- this.title = '';
4393
- this.subtitle = '';
4394
- this.showFooter = false;
4395
- }
4396
- ngOnInit() {
4397
- this.openScrollSubscription();
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 = [];
4398
4581
  }
4399
- ngAfterViewInit() {
4400
- $(`#${this.elementId}`).modal({ show: false });
4582
+ get value() {
4583
+ return this._value;
4401
4584
  }
4402
- show() {
4403
- $(`#${this.elementId}`).modal('show');
4585
+ set value(value) {
4586
+ if (Array.isArray(value)) {
4587
+ this._value = value;
4588
+ }
4404
4589
  }
4405
- hide() {
4406
- $(`#${this.elementId}`).modal('hide');
4590
+ fileSelected(file) {
4591
+ this.fileToBeUploaded$.next(file);
4592
+ this.showModal$.next(null);
4407
4593
  }
4408
- ngOnDestroy() {
4409
- this.scrollSubscription.unsubscribe();
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);
4410
4598
  }
4411
- openScrollSubscription() {
4412
- this.scrollSubscription = this.modalService.scrollToTop$.subscribe(() => {
4413
- const element = this.scrollModal.nativeElement;
4414
- if (element)
4415
- element.scrollTo(0, 0);
4416
- });
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();
4417
4611
  }
4418
4612
  }
4419
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, deps: [{ token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
4420
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ModalComponent, selector: "valtimo-modal", inputs: { elementId: "elementId", title: "title", subtitle: "subtitle", templateBelowSubtitle: "templateBelowSubtitle", showFooter: "showFooter" }, viewQueries: [{ propertyName: "scrollModal", first: true, predicate: ["scrollModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
4421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, decorators: [{
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: [{
4422
4616
  type: Component,
4423
- args: [{ selector: 'valtimo-modal', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"] }]
4424
- }], ctorParameters: function () { return [{ type: ValtimoModalService }]; }, propDecorators: { elementId: [{
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: [{
4425
4619
  type: Input
4426
4620
  }], title: [{
4427
4621
  type: Input
4622
+ }], hideTitle: [{
4623
+ type: Input
4428
4624
  }], subtitle: [{
4429
4625
  type: Input
4430
- }], templateBelowSubtitle: [{
4626
+ }], maxFileSize: [{
4431
4627
  type: Input
4432
- }], showFooter: [{
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: [{
4433
4667
  type: Input
4434
- }], scrollModal: [{
4435
- type: ViewChild,
4436
- args: ['scrollModal']
4437
4668
  }] } });
4438
4669
 
4439
4670
  /*
@@ -4451,14 +4682,216 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4451
4682
  * See the License for the specific language governing permissions and
4452
4683
  * limitations under the License.
4453
4684
  */
4454
- class ModalModule {
4685
+ class DocumentenApiMetadataModalModule {
4455
4686
  }
4456
- ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4457
- ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, declarations: [ModalComponent], imports: [CommonModule], exports: [ModalComponent] });
4458
- ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, imports: [[CommonModule]] });
4459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, decorators: [{
4460
- type: NgModule,
4461
- args: [{
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
+
4733
+ /*
4734
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4735
+ *
4736
+ * Licensed under EUPL, Version 1.2 (the "License");
4737
+ * you may not use this file except in compliance with the License.
4738
+ * You may obtain a copy of the License at
4739
+ *
4740
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4741
+ *
4742
+ * Unless required by applicable law or agreed to in writing, software
4743
+ * distributed under the License is distributed on an "AS IS" basis,
4744
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4745
+ * See the License for the specific language governing permissions and
4746
+ * limitations under the License.
4747
+ */
4748
+ class FormIoModule {
4749
+ }
4750
+ FormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
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,
4755
+ FormioModule,
4756
+ DropzoneModule,
4757
+ TranslateModule,
4758
+ DocumentModule,
4759
+ FileSizeModule,
4760
+ ResourceModule,
4761
+ RouterModule,
4762
+ DocumentenApiMetadataModalModule], exports: [FormioComponent,
4763
+ FormioBuilderComponent,
4764
+ FormIoUploaderComponent,
4765
+ DocumentenApiUploaderComponent] });
4766
+ FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }], imports: [[
4767
+ CommonModule,
4768
+ FormioModule,
4769
+ DropzoneModule,
4770
+ TranslateModule,
4771
+ DocumentModule,
4772
+ FileSizeModule,
4773
+ ResourceModule,
4774
+ RouterModule,
4775
+ DocumentenApiMetadataModalModule,
4776
+ ]] });
4777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, decorators: [{
4778
+ type: NgModule,
4779
+ args: [{
4780
+ imports: [
4781
+ CommonModule,
4782
+ FormioModule,
4783
+ DropzoneModule,
4784
+ TranslateModule,
4785
+ DocumentModule,
4786
+ FileSizeModule,
4787
+ ResourceModule,
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,
4802
+ ],
4803
+ providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }],
4804
+ }]
4805
+ }] });
4806
+
4807
+ /*
4808
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4809
+ *
4810
+ * Licensed under EUPL, Version 1.2 (the "License");
4811
+ * you may not use this file except in compliance with the License.
4812
+ * You may obtain a copy of the License at
4813
+ *
4814
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4815
+ *
4816
+ * Unless required by applicable law or agreed to in writing, software
4817
+ * distributed under the License is distributed on an "AS IS" basis,
4818
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4819
+ * See the License for the specific language governing permissions and
4820
+ * limitations under the License.
4821
+ */
4822
+ class ModalComponent {
4823
+ constructor(modalService) {
4824
+ this.modalService = modalService;
4825
+ this.title = '';
4826
+ this.subtitle = '';
4827
+ this.showFooter = false;
4828
+ }
4829
+ ngOnInit() {
4830
+ this.openScrollSubscription();
4831
+ }
4832
+ ngAfterViewInit() {
4833
+ $(`#${this.elementId}`).modal({ show: false });
4834
+ }
4835
+ show() {
4836
+ $(`#${this.elementId}`).modal('show');
4837
+ }
4838
+ hide() {
4839
+ $(`#${this.elementId}`).modal('hide');
4840
+ }
4841
+ ngOnDestroy() {
4842
+ this.scrollSubscription.unsubscribe();
4843
+ }
4844
+ openScrollSubscription() {
4845
+ this.scrollSubscription = this.modalService.scrollToTop$.subscribe(() => {
4846
+ const element = this.scrollModal.nativeElement;
4847
+ if (element)
4848
+ element.scrollTo(0, 0);
4849
+ });
4850
+ }
4851
+ }
4852
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, deps: [{ token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
4853
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ModalComponent, selector: "valtimo-modal", inputs: { elementId: "elementId", title: "title", subtitle: "subtitle", templateBelowSubtitle: "templateBelowSubtitle", showFooter: "showFooter" }, viewQueries: [{ propertyName: "scrollModal", first: true, predicate: ["scrollModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
4854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, decorators: [{
4855
+ type: Component,
4856
+ args: [{ selector: 'valtimo-modal', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"modal fade custom-width\" [id]=\"elementId\" role=\"dialog\" aria-modal=\"true\" #scrollModal>\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header modal-header-colored colored-header-grey\">\n <div class=\"modal-title\">\n <h4 class=\"title-text mb-2\">{{ title }}</h4>\n <h5 class=\"subtitle-text\">{{ subtitle }}</h5>\n <ng-container *ngIf=\"templateBelowSubtitle\">\n <ng-container *ngTemplateOutlet=\"templateBelowSubtitle\"></ng-container>\n </ng-container>\n </div>\n <div class=\"text-right\">\n <img src=\"assets/modal/header-image.png\" class=\"modal-header-image\" />\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"showFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{padding-bottom:.66rem;border-bottom:1px solid #c5c6c9}@media (min-width: 768px){.close{position:relative;left:25px;padding:0!important;margin-top:-20px!important}.close span{color:#fff}.modal-content{overflow:visible}}\n"] }]
4857
+ }], ctorParameters: function () { return [{ type: ValtimoModalService }]; }, propDecorators: { elementId: [{
4858
+ type: Input
4859
+ }], title: [{
4860
+ type: Input
4861
+ }], subtitle: [{
4862
+ type: Input
4863
+ }], templateBelowSubtitle: [{
4864
+ type: Input
4865
+ }], showFooter: [{
4866
+ type: Input
4867
+ }], scrollModal: [{
4868
+ type: ViewChild,
4869
+ args: ['scrollModal']
4870
+ }] } });
4871
+
4872
+ /*
4873
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
4874
+ *
4875
+ * Licensed under EUPL, Version 1.2 (the "License");
4876
+ * you may not use this file except in compliance with the License.
4877
+ * You may obtain a copy of the License at
4878
+ *
4879
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4880
+ *
4881
+ * Unless required by applicable law or agreed to in writing, software
4882
+ * distributed under the License is distributed on an "AS IS" basis,
4883
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4884
+ * See the License for the specific language governing permissions and
4885
+ * limitations under the License.
4886
+ */
4887
+ class ModalModule {
4888
+ }
4889
+ ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4890
+ ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, declarations: [ModalComponent], imports: [CommonModule], exports: [ModalComponent] });
4891
+ ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, imports: [[CommonModule]] });
4892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, decorators: [{
4893
+ type: NgModule,
4894
+ args: [{
4462
4895
  declarations: [ModalComponent],
4463
4896
  imports: [CommonModule],
4464
4897
  exports: [ModalComponent],
@@ -4887,7 +5320,7 @@ const formIoUploaderEditForm = () => ({
4887
5320
  * limitations under the License.
4888
5321
  */
4889
5322
  const customUploaderType = 'valtimo-file';
4890
- const COMPONENT_OPTIONS = {
5323
+ const COMPONENT_OPTIONS$1 = {
4891
5324
  type: customUploaderType,
4892
5325
  selector: 'valtimo-form-io-uploader',
4893
5326
  title: 'Valtimo File Upload',
@@ -4898,7 +5331,7 @@ const COMPONENT_OPTIONS = {
4898
5331
  editForm: formIoUploaderEditForm,
4899
5332
  };
4900
5333
  function registerFormioUploadComponent(injector) {
4901
- const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
5334
+ const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS$1);
4902
5335
  // override setValue function to allow for setting an array value
4903
5336
  class UploaderComponent extends originalUploadComponent {
4904
5337
  setValue(value) {
@@ -4906,8 +5339,8 @@ function registerFormioUploadComponent(injector) {
4906
5339
  return true;
4907
5340
  }
4908
5341
  }
4909
- if (!customElements.get(COMPONENT_OPTIONS.selector)) {
4910
- registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, FormIoUploaderComponent, UploaderComponent, injector);
5342
+ if (!customElements.get(COMPONENT_OPTIONS$1.selector)) {
5343
+ registerCustomFormioComponentWithClass(COMPONENT_OPTIONS$1, FormIoUploaderComponent, UploaderComponent, injector);
4911
5344
  }
4912
5345
  }
4913
5346
 
@@ -4926,75 +5359,410 @@ function registerFormioUploadComponent(injector) {
4926
5359
  * See the License for the specific language governing permissions and
4927
5360
  * limitations under the License.
4928
5361
  */
4929
- const SelectComponent = Components.components.select;
4930
- function registerFormioFileSelectorComponent(injector) {
4931
- const documentService = injector.get(DocumentService);
4932
- const stateService = injector.get(FormIoStateService);
4933
- const unavailableMessage = {
4934
- label: 'could not retrieve documents',
4935
- value: null,
4936
- };
4937
- function getDocumentResources(documentId) {
4938
- if (!documentId) {
4939
- return new Promise(resolve => {
4940
- resolve([unavailableMessage]);
4941
- });
4942
- }
4943
- return documentService
4944
- .getDocument(documentId)
4945
- .toPromise()
4946
- .then(document => document.relatedFiles.map(relatedFile => ({
4947
- label: relatedFile.fileName,
4948
- value: relatedFile.fileId,
4949
- })))
4950
- .catch(() => new Promise(resolve => {
4951
- resolve([unavailableMessage]);
4952
- }));
4953
- }
4954
- class ResourceSelectorComponent extends SelectComponent {
4955
- static schema(...extend) {
4956
- return SelectComponent.schema({
4957
- type: 'resource-selector',
4958
- label: 'Resource selector',
4959
- key: 'resource-selector',
4960
- dataSrc: 'custom',
4961
- dataType: 'string',
4962
- valueProperty: 'value',
4963
- asyncValues: true,
4964
- data: {
4965
- custom: 'values = instance.getResources()',
4966
- },
4967
- ...extend,
4968
- });
4969
- }
4970
- getResources() {
4971
- return stateService.documentId$
4972
- .pipe(take(1))
4973
- .toPromise()
4974
- .then(documentId => getDocumentResources(documentId));
4975
- }
4976
- static get builderInfo() {
4977
- return {
4978
- title: 'Document picker',
4979
- icon: 'th-list',
4980
- group: 'basic',
4981
- documentation: '/userguide/#textfield',
4982
- weight: 0,
4983
- schema: ResourceSelectorComponent.schema(),
4984
- };
4985
- }
4986
- }
4987
- Formio.use({
4988
- components: {
4989
- 'resource-selector': ResourceSelectorComponent,
4990
- },
4991
- });
4992
- }
4993
-
4994
- /*
4995
- * Copyright 2015-2020 Ritense BV, the Netherlands.
4996
- *
4997
- * Licensed under EUPL, Version 1.2 (the "License");
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) {
5669
+ const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
5670
+ // override setValue function to allow for setting an array value
5671
+ class UploaderComponent extends originalUploadComponent {
5672
+ setValue(value) {
5673
+ this._customAngularElement.value = value;
5674
+ return true;
5675
+ }
5676
+ }
5677
+ if (!customElements.get(COMPONENT_OPTIONS.selector)) {
5678
+ registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, DocumentenApiUploaderComponent, UploaderComponent, injector);
5679
+ }
5680
+ }
5681
+
5682
+ /*
5683
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5684
+ *
5685
+ * Licensed under EUPL, Version 1.2 (the "License");
5686
+ * you may not use this file except in compliance with the License.
5687
+ * You may obtain a copy of the License at
5688
+ *
5689
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5690
+ *
5691
+ * Unless required by applicable law or agreed to in writing, software
5692
+ * distributed under the License is distributed on an "AS IS" basis,
5693
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5694
+ * See the License for the specific language governing permissions and
5695
+ * limitations under the License.
5696
+ */
5697
+ const SelectComponent = Components.components.select;
5698
+ function registerFormioFileSelectorComponent(injector) {
5699
+ const documentService = injector.get(DocumentService);
5700
+ const stateService = injector.get(FormIoStateService);
5701
+ const unavailableMessage = {
5702
+ label: 'could not retrieve documents',
5703
+ value: null,
5704
+ };
5705
+ function getDocumentResources(documentId) {
5706
+ if (!documentId) {
5707
+ return new Promise(resolve => {
5708
+ resolve([unavailableMessage]);
5709
+ });
5710
+ }
5711
+ return documentService
5712
+ .getDocument(documentId)
5713
+ .toPromise()
5714
+ .then(document => document.relatedFiles.map(relatedFile => ({
5715
+ label: relatedFile.fileName,
5716
+ value: relatedFile.fileId,
5717
+ })))
5718
+ .catch(() => new Promise(resolve => {
5719
+ resolve([unavailableMessage]);
5720
+ }));
5721
+ }
5722
+ class ResourceSelectorComponent extends SelectComponent {
5723
+ static schema(...extend) {
5724
+ return SelectComponent.schema({
5725
+ type: 'resource-selector',
5726
+ label: 'Resource selector',
5727
+ key: 'resource-selector',
5728
+ dataSrc: 'custom',
5729
+ dataType: 'string',
5730
+ valueProperty: 'value',
5731
+ asyncValues: true,
5732
+ data: {
5733
+ custom: 'values = instance.getResources()',
5734
+ },
5735
+ ...extend,
5736
+ });
5737
+ }
5738
+ getResources() {
5739
+ return stateService.documentId$
5740
+ .pipe(take(1))
5741
+ .toPromise()
5742
+ .then(documentId => getDocumentResources(documentId));
5743
+ }
5744
+ static get builderInfo() {
5745
+ return {
5746
+ title: 'Document picker',
5747
+ icon: 'th-list',
5748
+ group: 'basic',
5749
+ documentation: '/userguide/#textfield',
5750
+ weight: 0,
5751
+ schema: ResourceSelectorComponent.schema(),
5752
+ };
5753
+ }
5754
+ }
5755
+ Formio.use({
5756
+ components: {
5757
+ 'resource-selector': ResourceSelectorComponent,
5758
+ },
5759
+ });
5760
+ }
5761
+
5762
+ /*
5763
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
5764
+ *
5765
+ * Licensed under EUPL, Version 1.2 (the "License");
4998
5766
  * you may not use this file except in compliance with the License.
4999
5767
  * You may obtain a copy of the License at
5000
5768
  *
@@ -5158,193 +5926,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5158
5926
  }]
5159
5927
  }] });
5160
5928
 
5161
- /*
5162
- * Copyright 2015-2020 Ritense BV, the Netherlands.
5163
- *
5164
- * Licensed under EUPL, Version 1.2 (the "License");
5165
- * you may not use this file except in compliance with the License.
5166
- * You may obtain a copy of the License at
5167
- *
5168
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5169
- *
5170
- * Unless required by applicable law or agreed to in writing, software
5171
- * distributed under the License is distributed on an "AS IS" basis,
5172
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5173
- * See the License for the specific language governing permissions and
5174
- * limitations under the License.
5175
- */
5176
- class DocumentenApiMetadataModalComponent {
5177
- constructor(modalService, translateService, route, documentService) {
5178
- this.modalService = modalService;
5179
- this.translateService = translateService;
5180
- this.route = route;
5181
- this.documentService = documentService;
5182
- this.metadata = new EventEmitter();
5183
- this.CONFIDENTIALITY_LEVELS = [
5184
- 'openbaar',
5185
- 'beperkt_openbaar',
5186
- 'intern',
5187
- 'zaakvertrouwelijk',
5188
- 'vertrouwelijk',
5189
- 'confidentieel',
5190
- 'geheim',
5191
- 'zeer_geheim',
5192
- ];
5193
- this.confidentialityLevelItems$ = this.translateService
5194
- .stream('key')
5195
- .pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
5196
- id: confidentialityLevel,
5197
- text: this.translateService.instant(`document.${confidentialityLevel}`),
5198
- }))));
5199
- this.STATUSES = [
5200
- 'in_bewerking',
5201
- 'ter_vaststelling',
5202
- 'definitief',
5203
- 'gearchiveerd',
5204
- ];
5205
- this.statusItems$ = this.translateService.stream('key').pipe(map(() => this.STATUSES.map(status => ({
5206
- id: status,
5207
- text: this.translateService.instant(`document.${status}`),
5208
- }))));
5209
- this.LANGUAGES = ['nld', 'eng', 'deu'];
5210
- this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
5211
- id: language,
5212
- text: this.translateService.instant(`document.${language}`),
5213
- }))));
5214
- this.documentTypeItems$ = this.route.params.pipe(switchMap(params => this.documentService.getDocumentTypes(params.documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
5215
- this.showForm$ = this.modalService.modalVisible$;
5216
- this.valid$ = new BehaviorSubject(false);
5217
- this.formData$ = new BehaviorSubject(null);
5218
- }
5219
- ngOnInit() {
5220
- this.openShowSubscription();
5221
- this.openHideSubscription();
5222
- }
5223
- ngOnDestroy() {
5224
- this.showSubscription?.unsubscribe();
5225
- this.hideSubscription?.unsubscribe();
5226
- }
5227
- hide() {
5228
- this.formData$.next(null);
5229
- this.valid$.next(false);
5230
- this.modalService.closeModal();
5231
- }
5232
- cancel() {
5233
- this.hide();
5234
- }
5235
- save() {
5236
- combineLatest([this.valid$, this.formData$])
5237
- .pipe(take$1(1))
5238
- .subscribe(([valid, formData]) => {
5239
- if (valid) {
5240
- this.metadata.emit(formData);
5241
- }
5242
- });
5243
- }
5244
- formValueChange(data) {
5245
- this.formData$.next(data);
5246
- this.setValid(data);
5247
- }
5248
- setValid(data) {
5249
- this.valid$.next(!!(data.filename &&
5250
- data.title &&
5251
- data.author &&
5252
- data.creationDate &&
5253
- data.status &&
5254
- data.language &&
5255
- data.informatieobjecttype));
5256
- }
5257
- openShowSubscription() {
5258
- this.showSubscription = this.show$.subscribe(() => {
5259
- this.modalService.openModal(this.documentenApiMetadataModal);
5260
- });
5261
- }
5262
- openHideSubscription() {
5263
- this.hideSubscription = this.hide$.subscribe(() => {
5264
- this.hide();
5265
- });
5266
- }
5267
- }
5268
- DocumentenApiMetadataModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, deps: [{ token: i1$4.ModalService }, { token: i1$8.TranslateService }, { token: i1$5.ActivatedRoute }, { token: i2.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
5269
- DocumentenApiMetadataModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: { show$: "show$", hide$: "hide$", disabled$: "disabled$", file$: "file$" }, outputs: { metadata: "metadata" }, viewQueries: [{ propertyName: "documentenApiMetadataModal", first: true, predicate: ["documentenApiMetadataModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n [defaultValue]=\"obs.file?.name\"\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"status\"\n ></v-select>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelection]=\"languageItems[0]\"\n [disabled]=\"obs.disabled\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-input\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}\n"], components: [{ type: i1$4.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { type: i1$4.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { type: i1$4.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { type: i1$4.FormComponent, selector: "v-form", outputs: ["valueChange"] }, { type: i1$4.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox"], outputs: ["valueChange"] }, { type: i1$4.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { type: i1$4.DatePickerComponent, selector: "v-date-picker", inputs: ["name", "title", "titleTranslationKey", "widthPx", "fullWidth", "margin", "disabled", "tooltip", "required", "defaultDate", "defaultDateIsToday"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe } });
5270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
5271
- type: Component,
5272
- args: [{ selector: 'valtimo-documenten-api-metadata-modal', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n [defaultValue]=\"obs.file?.name\"\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"status\"\n ></v-select>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelection]=\"languageItems[0]\"\n [disabled]=\"obs.disabled\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-input\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}\n"] }]
5273
- }], ctorParameters: function () { return [{ type: i1$4.ModalService }, { type: i1$8.TranslateService }, { type: i1$5.ActivatedRoute }, { type: i2.DocumentService }]; }, propDecorators: { documentenApiMetadataModal: [{
5274
- type: ViewChild,
5275
- args: ['documentenApiMetadataModal']
5276
- }], show$: [{
5277
- type: Input
5278
- }], hide$: [{
5279
- type: Input
5280
- }], disabled$: [{
5281
- type: Input
5282
- }], file$: [{
5283
- type: Input
5284
- }], metadata: [{
5285
- type: Output
5286
- }] } });
5287
-
5288
- /*
5289
- * Copyright 2015-2020 Ritense BV, the Netherlands.
5290
- *
5291
- * Licensed under EUPL, Version 1.2 (the "License");
5292
- * you may not use this file except in compliance with the License.
5293
- * You may obtain a copy of the License at
5294
- *
5295
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
5296
- *
5297
- * Unless required by applicable law or agreed to in writing, software
5298
- * distributed under the License is distributed on an "AS IS" basis,
5299
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5300
- * See the License for the specific language governing permissions and
5301
- * limitations under the License.
5302
- */
5303
- class DocumentenApiMetadataModalModule {
5304
- }
5305
- DocumentenApiMetadataModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5306
- DocumentenApiMetadataModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, declarations: [DocumentenApiMetadataModalComponent], imports: [CommonModule,
5307
- TranslateModule,
5308
- ModalModule$1,
5309
- TitleModule,
5310
- ButtonModule,
5311
- TranslateModule,
5312
- FormModule,
5313
- InputModule,
5314
- SelectModule,
5315
- DatePickerModule], exports: [DocumentenApiMetadataModalComponent] });
5316
- DocumentenApiMetadataModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, imports: [[
5317
- CommonModule,
5318
- TranslateModule,
5319
- ModalModule$1,
5320
- TitleModule,
5321
- ButtonModule,
5322
- TranslateModule,
5323
- FormModule,
5324
- InputModule,
5325
- SelectModule,
5326
- DatePickerModule,
5327
- ]] });
5328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, decorators: [{
5329
- type: NgModule,
5330
- args: [{
5331
- declarations: [DocumentenApiMetadataModalComponent],
5332
- exports: [DocumentenApiMetadataModalComponent],
5333
- imports: [
5334
- CommonModule,
5335
- TranslateModule,
5336
- ModalModule$1,
5337
- TitleModule,
5338
- ButtonModule,
5339
- TranslateModule,
5340
- FormModule,
5341
- InputModule,
5342
- SelectModule,
5343
- DatePickerModule,
5344
- ],
5345
- }]
5346
- }] });
5347
-
5348
5929
  /*
5349
5930
  * Copyright 2015-2022 Ritense BV, the Netherlands.
5350
5931
  *
@@ -5365,5 +5946,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5365
5946
  * Generated bundle index. Do not edit.
5366
5947
  */
5367
5948
 
5368
- export { Alert, AlertComponent, AlertModule, AlertService, AlertType, AlertsOptionsImpl, BpmnJsDiagramComponent, BpmnJsDiagramModule, BreadcrumbNavigationComponent, BreadcrumbNavigationModule, CamundaFormComponent, CamundaFormModule, CardComponent, CardModule, ComponentsModule, DataListComponent, DataListModule, DocumentenApiMetadataModalComponent, DocumentenApiMetadataModalModule, DropzoneComponent, DropzoneModule, FieldAutoFocusDirective, FieldAutoFocusModule, FileSizeModule, FileSizePipe, FilterSidebarComponent, FilterSidebarModule, FormIoModule, FormIoStateService, FormIoUploaderComponent, FormioBuilderComponent, FormioComponent, FormioOptionsImpl, LeftSidebarComponent, LeftSidebarModule, ListComponent, ListFilterPipe, ListModule, MenuComponent, MenuModule, MenuRoutingModule, MenuService, ModalComponent, ModalModule, MultiselectDropdownComponent, MultiselectDropdownModule, PageHeaderComponent, PageHeaderModule, PageTitleComponent, PageTitleModule, ProgressBarComponent, ProgressBarModule, RightSidebarComponent, RightSidebarModule, SearchableDropdownComponent, SearchableDropdownModule, SearchableDropdownSelectComponent, SearchableDropdownSelectModule, SpinnerComponent, SpinnerModule, TimelineComponent, TimelineItemImpl, TimelineModule, TopbarComponent, TopbarModule, UploaderComponent, UploaderDragDropDirective, UploaderModule, ValtimoModalService, ViewContentService, WebcamComponent, WebcamModule, WidgetComponent, WidgetModule, customUploaderType, menuInitializer, registerFormioFileSelectorComponent, registerFormioUploadComponent };
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 };
5369
5950
  //# sourceMappingURL=valtimo-components.mjs.map