@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.
- package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.mjs +89 -11
- package/esm2020/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.mjs +6 -3
- package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.mjs +295 -0
- package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.mjs +147 -0
- package/esm2020/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.mjs +43 -0
- package/esm2020/lib/components/form-io/form-io.module.mjs +26 -5
- package/esm2020/lib/components/view-content/type-converters/dateTypeConverter.mjs +2 -2
- package/esm2020/lib/components/view-content/view-content.service.mjs +11 -1
- package/esm2020/lib/models/documenten-api-metadata.model.mjs +1 -1
- package/esm2020/lib/models/form-io.model.mjs +1 -1
- package/esm2020/lib/services/valtimo-modal.service.mjs +9 -2
- package/esm2020/public_api.mjs +3 -1
- package/fesm2015/valtimo-components.mjs +915 -332
- package/fesm2015/valtimo-components.mjs.map +1 -1
- package/fesm2020/valtimo-components.mjs +923 -342
- package/fesm2020/valtimo-components.mjs.map +1 -1
- package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +34 -5
- package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -1
- package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts +1 -1
- package/lib/components/documenten-api-metadata-modal/documenten-api-metadata-modal.module.d.ts.map +1 -1
- package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts +105 -0
- package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts.map +1 -0
- package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts +61 -0
- package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.component.d.ts.map +1 -0
- package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts +4 -0
- package/lib/components/form-io/documenten-api-uploader/documenten-api-uploader.formio.d.ts.map +1 -0
- package/lib/components/form-io/form-io.module.d.ts +11 -9
- package/lib/components/form-io/form-io.module.d.ts.map +1 -1
- package/lib/components/view-content/type-converters/dateTypeConverter.d.ts.map +1 -1
- package/lib/components/view-content/view-content.service.d.ts +1 -0
- package/lib/components/view-content/view-content.service.d.ts.map +1 -1
- package/lib/models/documenten-api-metadata.model.d.ts +2 -1
- package/lib/models/documenten-api-metadata.model.d.ts.map +1 -1
- package/lib/models/form-io.model.d.ts +3 -0
- package/lib/models/form-io.model.d.ts.map +1 -1
- package/lib/services/valtimo-modal.service.d.ts +3 -0
- package/lib/services/valtimo-modal.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -0
- 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,
|
|
3
|
+
import { Subject, BehaviorSubject, from, switchMap, map, Observable, combineLatest, fromEvent, Subscription, timer, take as take$1, of, filter as filter$1, startWith } from 'rxjs';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
6
6
|
import moment from 'moment';
|
|
@@ -11,7 +11,7 @@ import * as i1$2 from 'keycloak-angular';
|
|
|
11
11
|
import * as i1$3 from '@valtimo/config';
|
|
12
12
|
import { HttpLoaderFactory } from '@valtimo/config';
|
|
13
13
|
import * as i1$4 from '@valtimo/user-interface';
|
|
14
|
-
import { ParagraphModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, DatePickerModule } from '@valtimo/user-interface';
|
|
14
|
+
import { ParagraphModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, FormModule, InputModule, SelectModule, DatePickerModule, InputLabelModule } from '@valtimo/user-interface';
|
|
15
15
|
import * as i1$5 from '@angular/router';
|
|
16
16
|
import { RouterModule, NavigationEnd, PRIMARY_OUTLET, NavigationStart } from '@angular/router';
|
|
17
17
|
import * as i2 from '@valtimo/document';
|
|
@@ -25,7 +25,7 @@ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
|
25
25
|
import * as i1$9 from '@angular/common/http';
|
|
26
26
|
import { HttpClient } from '@angular/common/http';
|
|
27
27
|
import * as i5 from '@valtimo/context';
|
|
28
|
-
import { map as map$1, debounceTime, take, filter, switchMap as switchMap$1 } from 'rxjs/operators';
|
|
28
|
+
import { map as map$1, debounceTime, take, filter, switchMap as switchMap$1, tap } from 'rxjs/operators';
|
|
29
29
|
import * as i2$1 from '@angular/platform-browser';
|
|
30
30
|
import BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
|
|
31
31
|
import heatmap from 'heatmap.js-fixed/build/heatmap.js';
|
|
@@ -163,13 +163,20 @@ class TimelineItemImpl {
|
|
|
163
163
|
class ValtimoModalService {
|
|
164
164
|
constructor() {
|
|
165
165
|
this._scrollToTop$ = new Subject();
|
|
166
|
+
this._documentDefinitionName$ = new BehaviorSubject('');
|
|
166
167
|
}
|
|
167
168
|
get scrollToTop$() {
|
|
168
169
|
return this._scrollToTop$.asObservable();
|
|
169
170
|
}
|
|
171
|
+
get documentDefinitionName$() {
|
|
172
|
+
return this._documentDefinitionName$.asObservable();
|
|
173
|
+
}
|
|
170
174
|
scrollToTop() {
|
|
171
175
|
this._scrollToTop$.next(null);
|
|
172
176
|
}
|
|
177
|
+
setDocumentDefinitionName(documentDefinitionName) {
|
|
178
|
+
this._documentDefinitionName$.next(documentDefinitionName);
|
|
179
|
+
}
|
|
173
180
|
}
|
|
174
181
|
ValtimoModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
175
182
|
ValtimoModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ValtimoModalService, providedIn: 'root' });
|
|
@@ -1819,7 +1826,7 @@ class DateTypeConverter {
|
|
|
1819
1826
|
if (!value) {
|
|
1820
1827
|
return '-';
|
|
1821
1828
|
}
|
|
1822
|
-
return moment(value).format('DD-MM-YYYY, hh:mm A');
|
|
1829
|
+
return moment(value).format((definition === null || definition === void 0 ? void 0 : definition.format) || 'DD-MM-YYYY, hh:mm A');
|
|
1823
1830
|
}
|
|
1824
1831
|
}
|
|
1825
1832
|
|
|
@@ -1951,9 +1958,16 @@ class ViewContentService {
|
|
|
1951
1958
|
TYPE_CONVERTERS.forEach(converter => this.addConverter(converter));
|
|
1952
1959
|
}
|
|
1953
1960
|
get(value, definition) {
|
|
1961
|
+
const separator = ':';
|
|
1954
1962
|
if (!definition.viewType) {
|
|
1955
1963
|
definition.viewType = typeof value;
|
|
1956
1964
|
}
|
|
1965
|
+
if (definition.viewType.includes(separator)) {
|
|
1966
|
+
// Get the substring of the string after the separator (:) and assign it to a new key
|
|
1967
|
+
definition.format = definition.viewType.slice(this.getSeparatorIndex(definition, separator) + 1);
|
|
1968
|
+
// Remove the substring after the separator and the separator from the string and assign it back to the viewType
|
|
1969
|
+
definition.viewType = definition.viewType.slice(0, this.getSeparatorIndex(definition, separator));
|
|
1970
|
+
}
|
|
1957
1971
|
if (typeof this.converters[definition.viewType] !== 'undefined') {
|
|
1958
1972
|
return this.converters[definition.viewType].convert(value, definition);
|
|
1959
1973
|
}
|
|
@@ -1967,6 +1981,9 @@ class ViewContentService {
|
|
|
1967
1981
|
}
|
|
1968
1982
|
this.converters[converter.getTypeString()] = converter;
|
|
1969
1983
|
}
|
|
1984
|
+
getSeparatorIndex(definition, separator) {
|
|
1985
|
+
return definition.viewType.indexOf(separator);
|
|
1986
|
+
}
|
|
1970
1987
|
}
|
|
1971
1988
|
ViewContentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1972
1989
|
ViewContentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ViewContentService, providedIn: 'root' });
|
|
@@ -4247,45 +4264,194 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
4247
4264
|
* See the License for the specific language governing permissions and
|
|
4248
4265
|
* limitations under the License.
|
|
4249
4266
|
*/
|
|
4250
|
-
class
|
|
4267
|
+
class DocumentenApiMetadataModalComponent {
|
|
4268
|
+
constructor(modalService, translateService, route, documentService, keycloakService, valtimoModalService) {
|
|
4269
|
+
var _a, _b, _c;
|
|
4270
|
+
this.modalService = modalService;
|
|
4271
|
+
this.translateService = translateService;
|
|
4272
|
+
this.route = route;
|
|
4273
|
+
this.documentService = documentService;
|
|
4274
|
+
this.keycloakService = keycloakService;
|
|
4275
|
+
this.valtimoModalService = valtimoModalService;
|
|
4276
|
+
this.documentTitle = '';
|
|
4277
|
+
this.metadata = new EventEmitter();
|
|
4278
|
+
this.CONFIDENTIALITY_LEVELS = [
|
|
4279
|
+
'openbaar',
|
|
4280
|
+
'beperkt_openbaar',
|
|
4281
|
+
'intern',
|
|
4282
|
+
'zaakvertrouwelijk',
|
|
4283
|
+
'vertrouwelijk',
|
|
4284
|
+
'confidentieel',
|
|
4285
|
+
'geheim',
|
|
4286
|
+
'zeer_geheim',
|
|
4287
|
+
];
|
|
4288
|
+
this.confidentialityLevelItems$ = this.translateService
|
|
4289
|
+
.stream('key')
|
|
4290
|
+
.pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
|
|
4291
|
+
id: confidentialityLevel,
|
|
4292
|
+
text: this.translateService.instant(`document.${confidentialityLevel}`),
|
|
4293
|
+
}))));
|
|
4294
|
+
this.ADDITONAL_DOCUMENT_DATE_OPTIONS = [
|
|
4295
|
+
{
|
|
4296
|
+
value: 'neither',
|
|
4297
|
+
translationKey: 'document.noAdditionalDate',
|
|
4298
|
+
},
|
|
4299
|
+
{
|
|
4300
|
+
value: 'sent',
|
|
4301
|
+
translationKey: 'document.sendDate',
|
|
4302
|
+
},
|
|
4303
|
+
{
|
|
4304
|
+
value: 'received',
|
|
4305
|
+
translationKey: 'document.receiptDate',
|
|
4306
|
+
},
|
|
4307
|
+
];
|
|
4308
|
+
this.clearStatusSelection$ = new Subject();
|
|
4309
|
+
this.additionalDocumentDate$ = new BehaviorSubject('neither');
|
|
4310
|
+
this.STATUSES = [
|
|
4311
|
+
'in_bewerking',
|
|
4312
|
+
'ter_vaststelling',
|
|
4313
|
+
'definitief',
|
|
4314
|
+
'gearchiveerd',
|
|
4315
|
+
];
|
|
4316
|
+
this.RECEIPT_STATUSES = ['definitief', 'gearchiveerd'];
|
|
4317
|
+
this.formData$ = new BehaviorSubject(null);
|
|
4318
|
+
this.statusItems$ = combineLatest([
|
|
4319
|
+
this.additionalDocumentDate$,
|
|
4320
|
+
this.translateService.stream('key'),
|
|
4321
|
+
]).pipe(tap(([additionalDocumentDate]) => {
|
|
4322
|
+
this.formData$.pipe(take$1(1)).subscribe(formData => {
|
|
4323
|
+
if (additionalDocumentDate === 'received' &&
|
|
4324
|
+
(formData.status === 'in_bewerking' || formData.status === 'ter_vaststelling')) {
|
|
4325
|
+
this.clearStatusSelection$.next(null);
|
|
4326
|
+
}
|
|
4327
|
+
});
|
|
4328
|
+
}), map(([additionalDocumentDate]) => (additionalDocumentDate === 'received' ? this.RECEIPT_STATUSES : this.STATUSES).map(status => ({
|
|
4329
|
+
id: status,
|
|
4330
|
+
text: this.translateService.instant(`document.${status}`),
|
|
4331
|
+
}))));
|
|
4332
|
+
this.LANGUAGES = ['nld', 'eng', 'deu'];
|
|
4333
|
+
this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
|
|
4334
|
+
id: language,
|
|
4335
|
+
text: this.translateService.instant(`document.${language}`),
|
|
4336
|
+
}))));
|
|
4337
|
+
this.documentTypeItems$ = combineLatest([
|
|
4338
|
+
((_a = this.route) === null || _a === void 0 ? void 0 : _a.params) || of(null),
|
|
4339
|
+
((_c = (_b = this.route) === null || _b === void 0 ? void 0 : _b.firstChild) === null || _c === void 0 ? void 0 : _c.params) || of(null),
|
|
4340
|
+
this.valtimoModalService.documentDefinitionName$,
|
|
4341
|
+
]).pipe(filter$1(([params, firstChildParams, documentDefinitionName]) => !!((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
|
|
4342
|
+
(firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
|
|
4343
|
+
documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.documentService.getDocumentTypes((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
|
|
4344
|
+
(firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
|
|
4345
|
+
documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
|
|
4346
|
+
this.showForm$ = this.modalService.modalVisible$;
|
|
4347
|
+
this.valid$ = new BehaviorSubject(false);
|
|
4348
|
+
this.userEmail$ = from(this.keycloakService.loadUserProfile()).pipe(map(userProfile => (userProfile === null || userProfile === void 0 ? void 0 : userProfile.email) || ''));
|
|
4349
|
+
}
|
|
4350
|
+
ngOnInit() {
|
|
4351
|
+
this.openShowSubscription();
|
|
4352
|
+
this.openHideSubscription();
|
|
4353
|
+
}
|
|
4354
|
+
ngOnDestroy() {
|
|
4355
|
+
var _a, _b;
|
|
4356
|
+
(_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
4357
|
+
(_b = this.hideSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
4358
|
+
}
|
|
4359
|
+
hide() {
|
|
4360
|
+
this.formData$.next(null);
|
|
4361
|
+
this.valid$.next(false);
|
|
4362
|
+
this.additionalDocumentDate$.next('neither');
|
|
4363
|
+
this.modalService.closeModal();
|
|
4364
|
+
}
|
|
4365
|
+
cancel() {
|
|
4366
|
+
this.hide();
|
|
4367
|
+
}
|
|
4368
|
+
save() {
|
|
4369
|
+
combineLatest([this.valid$, this.formData$])
|
|
4370
|
+
.pipe(take$1(1))
|
|
4371
|
+
.subscribe(([valid, formData]) => {
|
|
4372
|
+
if (valid) {
|
|
4373
|
+
this.metadata.emit(formData);
|
|
4374
|
+
}
|
|
4375
|
+
});
|
|
4376
|
+
}
|
|
4377
|
+
formValueChange(data) {
|
|
4378
|
+
this.formData$.next(data);
|
|
4379
|
+
this.setValid(data);
|
|
4380
|
+
}
|
|
4381
|
+
setAdditionalDate(value) {
|
|
4382
|
+
this.additionalDocumentDate$.next(value);
|
|
4383
|
+
}
|
|
4384
|
+
setValid(data) {
|
|
4385
|
+
this.valid$.next(!!(data.filename &&
|
|
4386
|
+
data.title &&
|
|
4387
|
+
data.author &&
|
|
4388
|
+
data.creationDate &&
|
|
4389
|
+
data.status &&
|
|
4390
|
+
data.language &&
|
|
4391
|
+
data.informatieobjecttype));
|
|
4392
|
+
}
|
|
4393
|
+
openShowSubscription() {
|
|
4394
|
+
this.showSubscription = this.show$.subscribe(() => {
|
|
4395
|
+
this.modalService.openModal(this.documentenApiMetadataModal);
|
|
4396
|
+
});
|
|
4397
|
+
}
|
|
4398
|
+
openHideSubscription() {
|
|
4399
|
+
this.hideSubscription = this.hide$.subscribe(() => {
|
|
4400
|
+
this.hide();
|
|
4401
|
+
});
|
|
4402
|
+
}
|
|
4251
4403
|
}
|
|
4252
|
-
|
|
4253
|
-
FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent], imports: [CommonModule,
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4404
|
+
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 });
|
|
4405
|
+
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 } });
|
|
4406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
|
|
4407
|
+
type: Component,
|
|
4408
|
+
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"] }]
|
|
4409
|
+
}], 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: [{
|
|
4410
|
+
type: ViewChild,
|
|
4411
|
+
args: ['documentenApiMetadataModal']
|
|
4412
|
+
}], show$: [{
|
|
4413
|
+
type: Input
|
|
4414
|
+
}], hide$: [{
|
|
4415
|
+
type: Input
|
|
4416
|
+
}], disabled$: [{
|
|
4417
|
+
type: Input
|
|
4418
|
+
}], file$: [{
|
|
4419
|
+
type: Input
|
|
4420
|
+
}], documentTitle: [{
|
|
4421
|
+
type: Input
|
|
4422
|
+
}], disableDocumentTitle: [{
|
|
4423
|
+
type: Input
|
|
4424
|
+
}], filename: [{
|
|
4425
|
+
type: Input
|
|
4426
|
+
}], disableFilename: [{
|
|
4427
|
+
type: Input
|
|
4428
|
+
}], author: [{
|
|
4429
|
+
type: Input
|
|
4430
|
+
}], disableAuthor: [{
|
|
4431
|
+
type: Input
|
|
4432
|
+
}], status: [{
|
|
4433
|
+
type: Input
|
|
4434
|
+
}], disableStatus: [{
|
|
4435
|
+
type: Input
|
|
4436
|
+
}], language: [{
|
|
4437
|
+
type: Input
|
|
4438
|
+
}], disableLanguage: [{
|
|
4439
|
+
type: Input
|
|
4440
|
+
}], documentType: [{
|
|
4441
|
+
type: Input
|
|
4442
|
+
}], disableDocumentType: [{
|
|
4443
|
+
type: Input
|
|
4444
|
+
}], description: [{
|
|
4445
|
+
type: Input
|
|
4446
|
+
}], disableDescription: [{
|
|
4447
|
+
type: Input
|
|
4448
|
+
}], confidentialityLevel: [{
|
|
4449
|
+
type: Input
|
|
4450
|
+
}], disableConfidentialityLevel: [{
|
|
4451
|
+
type: Input
|
|
4452
|
+
}], metadata: [{
|
|
4453
|
+
type: Output
|
|
4454
|
+
}] } });
|
|
4289
4455
|
|
|
4290
4456
|
/*
|
|
4291
4457
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -4302,54 +4468,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
4302
4468
|
* See the License for the specific language governing permissions and
|
|
4303
4469
|
* limitations under the License.
|
|
4304
4470
|
*/
|
|
4305
|
-
class
|
|
4306
|
-
constructor(modalService) {
|
|
4471
|
+
class DocumentenApiUploaderComponent {
|
|
4472
|
+
constructor(uploadProviderService, stateService, domService, downloadService, modalService, userProviderService, route) {
|
|
4473
|
+
var _a, _b, _c;
|
|
4474
|
+
this.uploadProviderService = uploadProviderService;
|
|
4475
|
+
this.stateService = stateService;
|
|
4476
|
+
this.domService = domService;
|
|
4477
|
+
this.downloadService = downloadService;
|
|
4307
4478
|
this.modalService = modalService;
|
|
4308
|
-
this.
|
|
4309
|
-
this.
|
|
4310
|
-
this.
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
this.
|
|
4479
|
+
this.userProviderService = userProviderService;
|
|
4480
|
+
this.route = route;
|
|
4481
|
+
this.valueChange = new EventEmitter();
|
|
4482
|
+
this.uploading$ = new BehaviorSubject(false);
|
|
4483
|
+
this.fileToBeUploaded$ = new BehaviorSubject(null);
|
|
4484
|
+
this.modalDisabled$ = new BehaviorSubject(false);
|
|
4485
|
+
this.showModal$ = new Subject();
|
|
4486
|
+
this.hideModal$ = new Subject();
|
|
4487
|
+
this.uploadProcessLinked$ = combineLatest([
|
|
4488
|
+
((_a = this.route) === null || _a === void 0 ? void 0 : _a.params) || of(null),
|
|
4489
|
+
((_c = (_b = this.route) === null || _b === void 0 ? void 0 : _b.firstChild) === null || _c === void 0 ? void 0 : _c.params) || of(null),
|
|
4490
|
+
this.modalService.documentDefinitionName$,
|
|
4491
|
+
]).pipe(filter(([params, firstChildParams, documentDefinitionName]) => !!((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
|
|
4492
|
+
(firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
|
|
4493
|
+
documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.uploadProviderService.checkUploadProcessLink((params === null || params === void 0 ? void 0 : params.documentDefinitionName) ||
|
|
4494
|
+
(firstChildParams === null || firstChildParams === void 0 ? void 0 : firstChildParams.documentDefinitionName) ||
|
|
4495
|
+
documentDefinitionName)), startWith('loading'));
|
|
4496
|
+
this.isAdmin$ = this.userProviderService
|
|
4497
|
+
.getUserSubject()
|
|
4498
|
+
.pipe(map$1(userIdentity => userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.roles.includes('ROLE_ADMIN')));
|
|
4499
|
+
this._value = [];
|
|
4314
4500
|
}
|
|
4315
|
-
|
|
4316
|
-
|
|
4501
|
+
get value() {
|
|
4502
|
+
return this._value;
|
|
4317
4503
|
}
|
|
4318
|
-
|
|
4319
|
-
|
|
4504
|
+
set value(value) {
|
|
4505
|
+
if (Array.isArray(value)) {
|
|
4506
|
+
this._value = value;
|
|
4507
|
+
}
|
|
4320
4508
|
}
|
|
4321
|
-
|
|
4322
|
-
|
|
4509
|
+
fileSelected(file) {
|
|
4510
|
+
this.fileToBeUploaded$.next(file);
|
|
4511
|
+
this.showModal$.next(null);
|
|
4323
4512
|
}
|
|
4324
|
-
|
|
4325
|
-
this.
|
|
4513
|
+
deleteFile(id) {
|
|
4514
|
+
this.domService.toggleSubmitButton(true);
|
|
4515
|
+
this._value = this._value.filter((file) => (file === null || file === void 0 ? void 0 : file.id) ? (file === null || file === void 0 ? void 0 : file.id) !== id : true);
|
|
4516
|
+
this.valueChange.emit(this._value);
|
|
4326
4517
|
}
|
|
4327
|
-
|
|
4328
|
-
this.
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4518
|
+
metadataSet(metadata) {
|
|
4519
|
+
this.uploading$.next(true);
|
|
4520
|
+
this.hideModal$.next(null);
|
|
4521
|
+
this.domService.toggleSubmitButton(true);
|
|
4522
|
+
this.fileToBeUploaded$
|
|
4523
|
+
.pipe(take(1), switchMap(file => this.uploadProviderService.uploadTempFileWithMetadata(file, metadata)), tap(result => {
|
|
4524
|
+
this.domService.toggleSubmitButton(false);
|
|
4525
|
+
this.uploading$.next(false);
|
|
4526
|
+
this._value.push(result);
|
|
4527
|
+
this.valueChange.emit(this._value);
|
|
4528
|
+
}))
|
|
4529
|
+
.subscribe();
|
|
4333
4530
|
}
|
|
4334
4531
|
}
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type:
|
|
4532
|
+
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 });
|
|
4533
|
+
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 } });
|
|
4534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiUploaderComponent, decorators: [{
|
|
4338
4535
|
type: Component,
|
|
4339
|
-
args: [{ selector: 'valtimo-
|
|
4340
|
-
}], ctorParameters: function () { return [{ type: ValtimoModalService }]; }, propDecorators: {
|
|
4536
|
+
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"] }]
|
|
4537
|
+
}], ctorParameters: function () { return [{ type: i1$a.UploadProviderService }, { type: FormIoStateService }, { type: FormIoDomService }, { type: i1$a.DownloadService }, { type: ValtimoModalService }, { type: i1$6.UserProviderService }, { type: i1$5.ActivatedRoute }]; }, propDecorators: { disabled: [{
|
|
4341
4538
|
type: Input
|
|
4342
4539
|
}], title: [{
|
|
4343
4540
|
type: Input
|
|
4541
|
+
}], hideTitle: [{
|
|
4542
|
+
type: Input
|
|
4344
4543
|
}], subtitle: [{
|
|
4345
4544
|
type: Input
|
|
4346
|
-
}],
|
|
4545
|
+
}], maxFileSize: [{
|
|
4347
4546
|
type: Input
|
|
4348
|
-
}],
|
|
4547
|
+
}], hideMaxFileSize: [{
|
|
4548
|
+
type: Input
|
|
4549
|
+
}], camera: [{
|
|
4550
|
+
type: Input
|
|
4551
|
+
}], documentTitle: [{
|
|
4552
|
+
type: Input
|
|
4553
|
+
}], disableDocumentTitle: [{
|
|
4554
|
+
type: Input
|
|
4555
|
+
}], filename: [{
|
|
4556
|
+
type: Input
|
|
4557
|
+
}], disableFilename: [{
|
|
4558
|
+
type: Input
|
|
4559
|
+
}], author: [{
|
|
4560
|
+
type: Input
|
|
4561
|
+
}], disableAuthor: [{
|
|
4562
|
+
type: Input
|
|
4563
|
+
}], status: [{
|
|
4564
|
+
type: Input
|
|
4565
|
+
}], disableStatus: [{
|
|
4566
|
+
type: Input
|
|
4567
|
+
}], language: [{
|
|
4568
|
+
type: Input
|
|
4569
|
+
}], disableLanguage: [{
|
|
4570
|
+
type: Input
|
|
4571
|
+
}], documentType: [{
|
|
4572
|
+
type: Input
|
|
4573
|
+
}], disableDocumentType: [{
|
|
4574
|
+
type: Input
|
|
4575
|
+
}], description: [{
|
|
4576
|
+
type: Input
|
|
4577
|
+
}], disableDescription: [{
|
|
4578
|
+
type: Input
|
|
4579
|
+
}], confidentialityLevel: [{
|
|
4580
|
+
type: Input
|
|
4581
|
+
}], disableConfidentialityLevel: [{
|
|
4582
|
+
type: Input
|
|
4583
|
+
}], valueChange: [{
|
|
4584
|
+
type: Output
|
|
4585
|
+
}], value: [{
|
|
4349
4586
|
type: Input
|
|
4350
|
-
}], scrollModal: [{
|
|
4351
|
-
type: ViewChild,
|
|
4352
|
-
args: ['scrollModal']
|
|
4353
4587
|
}] } });
|
|
4354
4588
|
|
|
4355
4589
|
/*
|
|
@@ -4367,13 +4601,215 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
4367
4601
|
* See the License for the specific language governing permissions and
|
|
4368
4602
|
* limitations under the License.
|
|
4369
4603
|
*/
|
|
4370
|
-
class
|
|
4604
|
+
class DocumentenApiMetadataModalModule {
|
|
4371
4605
|
}
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4606
|
+
DocumentenApiMetadataModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4607
|
+
DocumentenApiMetadataModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, declarations: [DocumentenApiMetadataModalComponent], imports: [CommonModule,
|
|
4608
|
+
TranslateModule,
|
|
4609
|
+
ModalModule$1,
|
|
4610
|
+
TitleModule,
|
|
4611
|
+
ButtonModule,
|
|
4612
|
+
TranslateModule,
|
|
4613
|
+
FormModule,
|
|
4614
|
+
InputModule,
|
|
4615
|
+
SelectModule,
|
|
4616
|
+
DatePickerModule,
|
|
4617
|
+
InputLabelModule], exports: [DocumentenApiMetadataModalComponent] });
|
|
4618
|
+
DocumentenApiMetadataModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, imports: [[
|
|
4619
|
+
CommonModule,
|
|
4620
|
+
TranslateModule,
|
|
4621
|
+
ModalModule$1,
|
|
4622
|
+
TitleModule,
|
|
4623
|
+
ButtonModule,
|
|
4624
|
+
TranslateModule,
|
|
4625
|
+
FormModule,
|
|
4626
|
+
InputModule,
|
|
4627
|
+
SelectModule,
|
|
4628
|
+
DatePickerModule,
|
|
4629
|
+
InputLabelModule,
|
|
4630
|
+
]] });
|
|
4631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, decorators: [{
|
|
4632
|
+
type: NgModule,
|
|
4633
|
+
args: [{
|
|
4634
|
+
declarations: [DocumentenApiMetadataModalComponent],
|
|
4635
|
+
exports: [DocumentenApiMetadataModalComponent],
|
|
4636
|
+
imports: [
|
|
4637
|
+
CommonModule,
|
|
4638
|
+
TranslateModule,
|
|
4639
|
+
ModalModule$1,
|
|
4640
|
+
TitleModule,
|
|
4641
|
+
ButtonModule,
|
|
4642
|
+
TranslateModule,
|
|
4643
|
+
FormModule,
|
|
4644
|
+
InputModule,
|
|
4645
|
+
SelectModule,
|
|
4646
|
+
DatePickerModule,
|
|
4647
|
+
InputLabelModule,
|
|
4648
|
+
],
|
|
4649
|
+
}]
|
|
4650
|
+
}] });
|
|
4651
|
+
|
|
4652
|
+
/*
|
|
4653
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
4654
|
+
*
|
|
4655
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4656
|
+
* you may not use this file except in compliance with the License.
|
|
4657
|
+
* You may obtain a copy of the License at
|
|
4658
|
+
*
|
|
4659
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4660
|
+
*
|
|
4661
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4662
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4663
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4664
|
+
* See the License for the specific language governing permissions and
|
|
4665
|
+
* limitations under the License.
|
|
4666
|
+
*/
|
|
4667
|
+
class FormIoModule {
|
|
4668
|
+
}
|
|
4669
|
+
FormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4670
|
+
FormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, declarations: [FormioComponent,
|
|
4671
|
+
FormioBuilderComponent,
|
|
4672
|
+
FormIoUploaderComponent,
|
|
4673
|
+
DocumentenApiUploaderComponent], imports: [CommonModule,
|
|
4674
|
+
FormioModule,
|
|
4675
|
+
DropzoneModule,
|
|
4676
|
+
TranslateModule,
|
|
4677
|
+
DocumentModule,
|
|
4678
|
+
FileSizeModule,
|
|
4679
|
+
ResourceModule,
|
|
4680
|
+
RouterModule,
|
|
4681
|
+
DocumentenApiMetadataModalModule], exports: [FormioComponent,
|
|
4682
|
+
FormioBuilderComponent,
|
|
4683
|
+
FormIoUploaderComponent,
|
|
4684
|
+
DocumentenApiUploaderComponent] });
|
|
4685
|
+
FormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }], imports: [[
|
|
4686
|
+
CommonModule,
|
|
4687
|
+
FormioModule,
|
|
4688
|
+
DropzoneModule,
|
|
4689
|
+
TranslateModule,
|
|
4690
|
+
DocumentModule,
|
|
4691
|
+
FileSizeModule,
|
|
4692
|
+
ResourceModule,
|
|
4693
|
+
RouterModule,
|
|
4694
|
+
DocumentenApiMetadataModalModule,
|
|
4695
|
+
]] });
|
|
4696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormIoModule, decorators: [{
|
|
4697
|
+
type: NgModule,
|
|
4698
|
+
args: [{
|
|
4699
|
+
imports: [
|
|
4700
|
+
CommonModule,
|
|
4701
|
+
FormioModule,
|
|
4702
|
+
DropzoneModule,
|
|
4703
|
+
TranslateModule,
|
|
4704
|
+
DocumentModule,
|
|
4705
|
+
FileSizeModule,
|
|
4706
|
+
ResourceModule,
|
|
4707
|
+
RouterModule,
|
|
4708
|
+
DocumentenApiMetadataModalModule,
|
|
4709
|
+
],
|
|
4710
|
+
declarations: [
|
|
4711
|
+
FormioComponent,
|
|
4712
|
+
FormioBuilderComponent,
|
|
4713
|
+
FormIoUploaderComponent,
|
|
4714
|
+
DocumentenApiUploaderComponent,
|
|
4715
|
+
],
|
|
4716
|
+
exports: [
|
|
4717
|
+
FormioComponent,
|
|
4718
|
+
FormioBuilderComponent,
|
|
4719
|
+
FormIoUploaderComponent,
|
|
4720
|
+
DocumentenApiUploaderComponent,
|
|
4721
|
+
],
|
|
4722
|
+
providers: [FormIoDomService, { provide: FormioAppConfig, useValue: AppConfig }],
|
|
4723
|
+
}]
|
|
4724
|
+
}] });
|
|
4725
|
+
|
|
4726
|
+
/*
|
|
4727
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
4728
|
+
*
|
|
4729
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4730
|
+
* you may not use this file except in compliance with the License.
|
|
4731
|
+
* You may obtain a copy of the License at
|
|
4732
|
+
*
|
|
4733
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4734
|
+
*
|
|
4735
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4736
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4737
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4738
|
+
* See the License for the specific language governing permissions and
|
|
4739
|
+
* limitations under the License.
|
|
4740
|
+
*/
|
|
4741
|
+
class ModalComponent {
|
|
4742
|
+
constructor(modalService) {
|
|
4743
|
+
this.modalService = modalService;
|
|
4744
|
+
this.title = '';
|
|
4745
|
+
this.subtitle = '';
|
|
4746
|
+
this.showFooter = false;
|
|
4747
|
+
}
|
|
4748
|
+
ngOnInit() {
|
|
4749
|
+
this.openScrollSubscription();
|
|
4750
|
+
}
|
|
4751
|
+
ngAfterViewInit() {
|
|
4752
|
+
$(`#${this.elementId}`).modal({ show: false });
|
|
4753
|
+
}
|
|
4754
|
+
show() {
|
|
4755
|
+
$(`#${this.elementId}`).modal('show');
|
|
4756
|
+
}
|
|
4757
|
+
hide() {
|
|
4758
|
+
$(`#${this.elementId}`).modal('hide');
|
|
4759
|
+
}
|
|
4760
|
+
ngOnDestroy() {
|
|
4761
|
+
this.scrollSubscription.unsubscribe();
|
|
4762
|
+
}
|
|
4763
|
+
openScrollSubscription() {
|
|
4764
|
+
this.scrollSubscription = this.modalService.scrollToTop$.subscribe(() => {
|
|
4765
|
+
const element = this.scrollModal.nativeElement;
|
|
4766
|
+
if (element)
|
|
4767
|
+
element.scrollTo(0, 0);
|
|
4768
|
+
});
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, deps: [{ token: ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4772
|
+
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\">×</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"] }] });
|
|
4773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalComponent, decorators: [{
|
|
4774
|
+
type: Component,
|
|
4775
|
+
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\">×</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"] }]
|
|
4776
|
+
}], ctorParameters: function () { return [{ type: ValtimoModalService }]; }, propDecorators: { elementId: [{
|
|
4777
|
+
type: Input
|
|
4778
|
+
}], title: [{
|
|
4779
|
+
type: Input
|
|
4780
|
+
}], subtitle: [{
|
|
4781
|
+
type: Input
|
|
4782
|
+
}], templateBelowSubtitle: [{
|
|
4783
|
+
type: Input
|
|
4784
|
+
}], showFooter: [{
|
|
4785
|
+
type: Input
|
|
4786
|
+
}], scrollModal: [{
|
|
4787
|
+
type: ViewChild,
|
|
4788
|
+
args: ['scrollModal']
|
|
4789
|
+
}] } });
|
|
4790
|
+
|
|
4791
|
+
/*
|
|
4792
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
4793
|
+
*
|
|
4794
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4795
|
+
* you may not use this file except in compliance with the License.
|
|
4796
|
+
* You may obtain a copy of the License at
|
|
4797
|
+
*
|
|
4798
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4799
|
+
*
|
|
4800
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4801
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4802
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4803
|
+
* See the License for the specific language governing permissions and
|
|
4804
|
+
* limitations under the License.
|
|
4805
|
+
*/
|
|
4806
|
+
class ModalModule {
|
|
4807
|
+
}
|
|
4808
|
+
ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4809
|
+
ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, declarations: [ModalComponent], imports: [CommonModule], exports: [ModalComponent] });
|
|
4810
|
+
ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, imports: [[CommonModule]] });
|
|
4811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ModalModule, decorators: [{
|
|
4812
|
+
type: NgModule,
|
|
4377
4813
|
args: [{
|
|
4378
4814
|
declarations: [ModalComponent],
|
|
4379
4815
|
imports: [CommonModule],
|
|
@@ -4803,7 +5239,7 @@ const formIoUploaderEditForm = () => ({
|
|
|
4803
5239
|
* limitations under the License.
|
|
4804
5240
|
*/
|
|
4805
5241
|
const customUploaderType = 'valtimo-file';
|
|
4806
|
-
const COMPONENT_OPTIONS = {
|
|
5242
|
+
const COMPONENT_OPTIONS$1 = {
|
|
4807
5243
|
type: customUploaderType,
|
|
4808
5244
|
selector: 'valtimo-form-io-uploader',
|
|
4809
5245
|
title: 'Valtimo File Upload',
|
|
@@ -4814,7 +5250,7 @@ const COMPONENT_OPTIONS = {
|
|
|
4814
5250
|
editForm: formIoUploaderEditForm,
|
|
4815
5251
|
};
|
|
4816
5252
|
function registerFormioUploadComponent(injector) {
|
|
4817
|
-
const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
|
|
5253
|
+
const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS$1);
|
|
4818
5254
|
// override setValue function to allow for setting an array value
|
|
4819
5255
|
class UploaderComponent extends originalUploadComponent {
|
|
4820
5256
|
setValue(value) {
|
|
@@ -4822,8 +5258,8 @@ function registerFormioUploadComponent(injector) {
|
|
|
4822
5258
|
return true;
|
|
4823
5259
|
}
|
|
4824
5260
|
}
|
|
4825
|
-
if (!customElements.get(COMPONENT_OPTIONS.selector)) {
|
|
4826
|
-
registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, FormIoUploaderComponent, UploaderComponent, injector);
|
|
5261
|
+
if (!customElements.get(COMPONENT_OPTIONS$1.selector)) {
|
|
5262
|
+
registerCustomFormioComponentWithClass(COMPONENT_OPTIONS$1, FormIoUploaderComponent, UploaderComponent, injector);
|
|
4827
5263
|
}
|
|
4828
5264
|
}
|
|
4829
5265
|
|
|
@@ -4842,66 +5278,401 @@ function registerFormioUploadComponent(injector) {
|
|
|
4842
5278
|
* See the License for the specific language governing permissions and
|
|
4843
5279
|
* limitations under the License.
|
|
4844
5280
|
*/
|
|
4845
|
-
const
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
});
|
|
4858
|
-
}
|
|
4859
|
-
return documentService
|
|
4860
|
-
.getDocument(documentId)
|
|
4861
|
-
.toPromise()
|
|
4862
|
-
.then(document => document.relatedFiles.map(relatedFile => ({
|
|
4863
|
-
label: relatedFile.fileName,
|
|
4864
|
-
value: relatedFile.fileId,
|
|
4865
|
-
})))
|
|
4866
|
-
.catch(() => new Promise(resolve => {
|
|
4867
|
-
resolve([unavailableMessage]);
|
|
4868
|
-
}));
|
|
4869
|
-
}
|
|
4870
|
-
class ResourceSelectorComponent extends SelectComponent {
|
|
4871
|
-
static schema(...extend) {
|
|
4872
|
-
return SelectComponent.schema(Object.assign({ type: 'resource-selector', label: 'Resource selector', key: 'resource-selector', dataSrc: 'custom', dataType: 'string', valueProperty: 'value', asyncValues: true, data: {
|
|
4873
|
-
custom: 'values = instance.getResources()',
|
|
4874
|
-
} }, extend));
|
|
4875
|
-
}
|
|
4876
|
-
getResources() {
|
|
4877
|
-
return stateService.documentId$
|
|
4878
|
-
.pipe(take(1))
|
|
4879
|
-
.toPromise()
|
|
4880
|
-
.then(documentId => getDocumentResources(documentId));
|
|
4881
|
-
}
|
|
4882
|
-
static get builderInfo() {
|
|
4883
|
-
return {
|
|
4884
|
-
title: 'Document picker',
|
|
4885
|
-
icon: 'th-list',
|
|
4886
|
-
group: 'basic',
|
|
4887
|
-
documentation: '/userguide/#textfield',
|
|
4888
|
-
weight: 0,
|
|
4889
|
-
schema: ResourceSelectorComponent.schema(),
|
|
4890
|
-
};
|
|
4891
|
-
}
|
|
4892
|
-
}
|
|
4893
|
-
Formio.use({
|
|
4894
|
-
components: {
|
|
4895
|
-
'resource-selector': ResourceSelectorComponent,
|
|
5281
|
+
const documentenApiUploaderEditForm = () => ({
|
|
5282
|
+
components: [
|
|
5283
|
+
{ key: 'type', type: 'hidden' },
|
|
5284
|
+
{
|
|
5285
|
+
type: 'textfield',
|
|
5286
|
+
input: true,
|
|
5287
|
+
key: 'label',
|
|
5288
|
+
label: 'Label',
|
|
5289
|
+
placeholder: 'Label',
|
|
5290
|
+
validate: {
|
|
5291
|
+
required: true,
|
|
5292
|
+
},
|
|
4896
5293
|
},
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
5294
|
+
{
|
|
5295
|
+
type: 'textfield',
|
|
5296
|
+
input: true,
|
|
5297
|
+
key: 'key',
|
|
5298
|
+
label: 'Property Name',
|
|
5299
|
+
placeholder: 'Property Name',
|
|
5300
|
+
tooltip: 'The name of this field in the API endpoint.',
|
|
5301
|
+
validate: {
|
|
5302
|
+
required: true,
|
|
5303
|
+
},
|
|
5304
|
+
},
|
|
5305
|
+
{
|
|
5306
|
+
type: 'textfield',
|
|
5307
|
+
input: true,
|
|
5308
|
+
key: 'customOptions.title',
|
|
5309
|
+
label: 'Title',
|
|
5310
|
+
placeholder: 'Title',
|
|
5311
|
+
tooltip: 'Leave empty to use the default title',
|
|
5312
|
+
validate: {
|
|
5313
|
+
required: false,
|
|
5314
|
+
},
|
|
5315
|
+
},
|
|
5316
|
+
{
|
|
5317
|
+
type: 'checkbox',
|
|
5318
|
+
input: true,
|
|
5319
|
+
inputType: 'checkbox',
|
|
5320
|
+
key: 'customOptions.hideTitle',
|
|
5321
|
+
label: 'Hide title',
|
|
5322
|
+
validate: {
|
|
5323
|
+
required: false,
|
|
5324
|
+
},
|
|
5325
|
+
},
|
|
5326
|
+
{
|
|
5327
|
+
type: 'textfield',
|
|
5328
|
+
input: true,
|
|
5329
|
+
key: 'customOptions.subtitle',
|
|
5330
|
+
label: 'Subtitle',
|
|
5331
|
+
placeholder: 'Title',
|
|
5332
|
+
tooltip: 'Leave empty to hide subtitle',
|
|
5333
|
+
validate: {
|
|
5334
|
+
required: false,
|
|
5335
|
+
},
|
|
5336
|
+
},
|
|
5337
|
+
{
|
|
5338
|
+
type: 'number',
|
|
5339
|
+
input: true,
|
|
5340
|
+
key: 'customOptions.maxFileSize',
|
|
5341
|
+
label: 'Maximum file size',
|
|
5342
|
+
placeholder: 'Maximum file size',
|
|
5343
|
+
defaultValue: 5,
|
|
5344
|
+
validate: {
|
|
5345
|
+
required: true,
|
|
5346
|
+
},
|
|
5347
|
+
},
|
|
5348
|
+
{
|
|
5349
|
+
type: 'checkbox',
|
|
5350
|
+
input: true,
|
|
5351
|
+
inputType: 'checkbox',
|
|
5352
|
+
key: 'customOptions.hideMaxFileSize',
|
|
5353
|
+
label: 'Hide maximum file size',
|
|
5354
|
+
validate: {
|
|
5355
|
+
required: false,
|
|
5356
|
+
},
|
|
5357
|
+
},
|
|
5358
|
+
{
|
|
5359
|
+
type: 'checkbox',
|
|
5360
|
+
input: true,
|
|
5361
|
+
inputType: 'checkbox',
|
|
5362
|
+
key: 'customOptions.camera',
|
|
5363
|
+
label: 'Allow camera uploads',
|
|
5364
|
+
validate: {
|
|
5365
|
+
required: false,
|
|
5366
|
+
},
|
|
5367
|
+
},
|
|
5368
|
+
{
|
|
5369
|
+
type: 'textfield',
|
|
5370
|
+
input: true,
|
|
5371
|
+
key: 'customOptions.documentTitle',
|
|
5372
|
+
label: 'Default document title',
|
|
5373
|
+
tooltip: 'Leave empty to let the user input their own title',
|
|
5374
|
+
validate: {
|
|
5375
|
+
required: false,
|
|
5376
|
+
},
|
|
5377
|
+
},
|
|
5378
|
+
{
|
|
5379
|
+
type: 'checkbox',
|
|
5380
|
+
input: true,
|
|
5381
|
+
inputType: 'checkbox',
|
|
5382
|
+
key: 'customOptions.disableDocumentTitle',
|
|
5383
|
+
label: 'Disable document title input',
|
|
5384
|
+
validate: {
|
|
5385
|
+
required: false,
|
|
5386
|
+
},
|
|
5387
|
+
},
|
|
5388
|
+
{
|
|
5389
|
+
type: 'textfield',
|
|
5390
|
+
input: true,
|
|
5391
|
+
key: 'customOptions.filename',
|
|
5392
|
+
label: 'Default filename',
|
|
5393
|
+
tooltip: 'Leave empty to let the user input their own filename',
|
|
5394
|
+
validate: {
|
|
5395
|
+
required: false,
|
|
5396
|
+
},
|
|
5397
|
+
},
|
|
5398
|
+
{
|
|
5399
|
+
type: 'checkbox',
|
|
5400
|
+
input: true,
|
|
5401
|
+
inputType: 'checkbox',
|
|
5402
|
+
key: 'customOptions.disableFilename',
|
|
5403
|
+
label: 'Disable filename input',
|
|
5404
|
+
validate: {
|
|
5405
|
+
required: false,
|
|
5406
|
+
},
|
|
5407
|
+
},
|
|
5408
|
+
{
|
|
5409
|
+
type: 'textfield',
|
|
5410
|
+
input: true,
|
|
5411
|
+
key: 'customOptions.author',
|
|
5412
|
+
label: 'Default author',
|
|
5413
|
+
tooltip: 'Leave empty to let the user input their own author',
|
|
5414
|
+
validate: {
|
|
5415
|
+
required: false,
|
|
5416
|
+
},
|
|
5417
|
+
},
|
|
5418
|
+
{
|
|
5419
|
+
type: 'checkbox',
|
|
5420
|
+
input: true,
|
|
5421
|
+
inputType: 'checkbox',
|
|
5422
|
+
key: 'customOptions.disableAuthor',
|
|
5423
|
+
label: 'Disable author input',
|
|
5424
|
+
validate: {
|
|
5425
|
+
required: false,
|
|
5426
|
+
},
|
|
5427
|
+
},
|
|
5428
|
+
{
|
|
5429
|
+
type: 'select',
|
|
5430
|
+
label: 'Default status',
|
|
5431
|
+
key: 'customOptions.status',
|
|
5432
|
+
placeholder: 'Select a default status',
|
|
5433
|
+
data: {
|
|
5434
|
+
values: [
|
|
5435
|
+
{ value: 'in_bewerking', label: 'In editing' },
|
|
5436
|
+
{ value: 'ter_vaststelling', label: 'To be confirmed' },
|
|
5437
|
+
{ value: 'definitief', label: 'Definitive' },
|
|
5438
|
+
{ value: 'gearchiveerd', label: 'Archived' },
|
|
5439
|
+
],
|
|
5440
|
+
},
|
|
5441
|
+
dataSrc: 'values',
|
|
5442
|
+
input: true,
|
|
5443
|
+
validate: {
|
|
5444
|
+
required: false,
|
|
5445
|
+
},
|
|
5446
|
+
},
|
|
5447
|
+
{
|
|
5448
|
+
type: 'checkbox',
|
|
5449
|
+
input: true,
|
|
5450
|
+
inputType: 'checkbox',
|
|
5451
|
+
key: 'customOptions.disableStatus',
|
|
5452
|
+
label: 'Disable status input',
|
|
5453
|
+
validate: {
|
|
5454
|
+
required: false,
|
|
5455
|
+
},
|
|
5456
|
+
},
|
|
5457
|
+
{
|
|
5458
|
+
type: 'select',
|
|
5459
|
+
label: 'Default language',
|
|
5460
|
+
key: 'customOptions.language',
|
|
5461
|
+
placeholder: 'Select a default language',
|
|
5462
|
+
data: {
|
|
5463
|
+
values: [
|
|
5464
|
+
{ value: 'nld', label: 'Dutch' },
|
|
5465
|
+
{ value: 'eng', label: 'English' },
|
|
5466
|
+
{ value: 'deu', label: 'German' },
|
|
5467
|
+
],
|
|
5468
|
+
},
|
|
5469
|
+
dataSrc: 'values',
|
|
5470
|
+
input: true,
|
|
5471
|
+
validate: {
|
|
5472
|
+
required: false,
|
|
5473
|
+
},
|
|
5474
|
+
},
|
|
5475
|
+
{
|
|
5476
|
+
type: 'checkbox',
|
|
5477
|
+
input: true,
|
|
5478
|
+
inputType: 'checkbox',
|
|
5479
|
+
key: 'customOptions.disableLanguage',
|
|
5480
|
+
label: 'Disable language input',
|
|
5481
|
+
validate: {
|
|
5482
|
+
required: false,
|
|
5483
|
+
},
|
|
5484
|
+
},
|
|
5485
|
+
{
|
|
5486
|
+
type: 'textfield',
|
|
5487
|
+
input: true,
|
|
5488
|
+
key: 'customOptions.documentType',
|
|
5489
|
+
label: 'Default document type url',
|
|
5490
|
+
tooltip: 'Must match the document type url exactly. Leave empty to let the user input their own document type',
|
|
5491
|
+
validate: {
|
|
5492
|
+
required: false,
|
|
5493
|
+
},
|
|
5494
|
+
},
|
|
5495
|
+
{
|
|
5496
|
+
type: 'checkbox',
|
|
5497
|
+
input: true,
|
|
5498
|
+
inputType: 'checkbox',
|
|
5499
|
+
key: 'customOptions.disableDocumentType',
|
|
5500
|
+
label: 'Disable document type input',
|
|
5501
|
+
validate: {
|
|
5502
|
+
required: false,
|
|
5503
|
+
},
|
|
5504
|
+
},
|
|
5505
|
+
{
|
|
5506
|
+
type: 'textfield',
|
|
5507
|
+
input: true,
|
|
5508
|
+
key: 'customOptions.description',
|
|
5509
|
+
label: 'Default description',
|
|
5510
|
+
tooltip: 'Leave empty to let the user input their own description',
|
|
5511
|
+
validate: {
|
|
5512
|
+
required: false,
|
|
5513
|
+
},
|
|
5514
|
+
},
|
|
5515
|
+
{
|
|
5516
|
+
type: 'checkbox',
|
|
5517
|
+
input: true,
|
|
5518
|
+
inputType: 'checkbox',
|
|
5519
|
+
key: 'customOptions.disableDescription',
|
|
5520
|
+
label: 'Disable description input',
|
|
5521
|
+
validate: {
|
|
5522
|
+
required: false,
|
|
5523
|
+
},
|
|
5524
|
+
},
|
|
5525
|
+
{
|
|
5526
|
+
type: 'select',
|
|
5527
|
+
label: 'Default confidentiality level',
|
|
5528
|
+
key: 'customOptions.confidentialityLevel',
|
|
5529
|
+
placeholder: 'Select a default confidentiality level',
|
|
5530
|
+
data: {
|
|
5531
|
+
values: [
|
|
5532
|
+
{ value: 'openbaar', label: 'Public' },
|
|
5533
|
+
{ value: 'beperkt_openbaar', label: 'Restricted public' },
|
|
5534
|
+
{ value: 'intern', label: 'Internal' },
|
|
5535
|
+
{ value: 'zaakvertrouwelijk', label: 'Case confidential' },
|
|
5536
|
+
{ value: 'vertrouwelijk', label: 'Private' },
|
|
5537
|
+
{ value: 'confidentieel', label: 'Confidential' },
|
|
5538
|
+
{ value: 'geheim', label: 'Secret' },
|
|
5539
|
+
{ value: 'zeer_geheim', label: 'Very secret' },
|
|
5540
|
+
],
|
|
5541
|
+
},
|
|
5542
|
+
dataSrc: 'values',
|
|
5543
|
+
input: true,
|
|
5544
|
+
validate: {
|
|
5545
|
+
required: false,
|
|
5546
|
+
},
|
|
5547
|
+
},
|
|
5548
|
+
{
|
|
5549
|
+
type: 'checkbox',
|
|
5550
|
+
input: true,
|
|
5551
|
+
inputType: 'checkbox',
|
|
5552
|
+
key: 'customOptions.disableConfidentialityLevel',
|
|
5553
|
+
label: 'Disable confidentiality level input',
|
|
5554
|
+
validate: {
|
|
5555
|
+
required: false,
|
|
5556
|
+
},
|
|
5557
|
+
},
|
|
5558
|
+
],
|
|
5559
|
+
});
|
|
5560
|
+
|
|
5561
|
+
/*
|
|
5562
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
5563
|
+
*
|
|
5564
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5565
|
+
* you may not use this file except in compliance with the License.
|
|
5566
|
+
* You may obtain a copy of the License at
|
|
5567
|
+
*
|
|
5568
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
5569
|
+
*
|
|
5570
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5571
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
5572
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5573
|
+
* See the License for the specific language governing permissions and
|
|
5574
|
+
* limitations under the License.
|
|
5575
|
+
*/
|
|
5576
|
+
const customDocumentApiUploaderType = 'documenten-api-file';
|
|
5577
|
+
const COMPONENT_OPTIONS = {
|
|
5578
|
+
type: customDocumentApiUploaderType,
|
|
5579
|
+
selector: 'documenten-api-form-io-uploader',
|
|
5580
|
+
title: 'Documenten API File Upload',
|
|
5581
|
+
group: 'advanced',
|
|
5582
|
+
icon: 'upload',
|
|
5583
|
+
// set empty value to force formio to accept arrays as valid input value for this field type
|
|
5584
|
+
emptyValue: [],
|
|
5585
|
+
editForm: documentenApiUploaderEditForm,
|
|
5586
|
+
};
|
|
5587
|
+
function registerDocumentenApiFormioUploadComponent(injector) {
|
|
5588
|
+
const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
|
|
5589
|
+
// override setValue function to allow for setting an array value
|
|
5590
|
+
class UploaderComponent extends originalUploadComponent {
|
|
5591
|
+
setValue(value) {
|
|
5592
|
+
this._customAngularElement.value = value;
|
|
5593
|
+
return true;
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
if (!customElements.get(COMPONENT_OPTIONS.selector)) {
|
|
5597
|
+
registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, DocumentenApiUploaderComponent, UploaderComponent, injector);
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5600
|
+
|
|
5601
|
+
/*
|
|
5602
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
5603
|
+
*
|
|
5604
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5605
|
+
* you may not use this file except in compliance with the License.
|
|
5606
|
+
* You may obtain a copy of the License at
|
|
5607
|
+
*
|
|
5608
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
5609
|
+
*
|
|
5610
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5611
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
5612
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5613
|
+
* See the License for the specific language governing permissions and
|
|
5614
|
+
* limitations under the License.
|
|
5615
|
+
*/
|
|
5616
|
+
const SelectComponent = Components.components.select;
|
|
5617
|
+
function registerFormioFileSelectorComponent(injector) {
|
|
5618
|
+
const documentService = injector.get(DocumentService);
|
|
5619
|
+
const stateService = injector.get(FormIoStateService);
|
|
5620
|
+
const unavailableMessage = {
|
|
5621
|
+
label: 'could not retrieve documents',
|
|
5622
|
+
value: null,
|
|
5623
|
+
};
|
|
5624
|
+
function getDocumentResources(documentId) {
|
|
5625
|
+
if (!documentId) {
|
|
5626
|
+
return new Promise(resolve => {
|
|
5627
|
+
resolve([unavailableMessage]);
|
|
5628
|
+
});
|
|
5629
|
+
}
|
|
5630
|
+
return documentService
|
|
5631
|
+
.getDocument(documentId)
|
|
5632
|
+
.toPromise()
|
|
5633
|
+
.then(document => document.relatedFiles.map(relatedFile => ({
|
|
5634
|
+
label: relatedFile.fileName,
|
|
5635
|
+
value: relatedFile.fileId,
|
|
5636
|
+
})))
|
|
5637
|
+
.catch(() => new Promise(resolve => {
|
|
5638
|
+
resolve([unavailableMessage]);
|
|
5639
|
+
}));
|
|
5640
|
+
}
|
|
5641
|
+
class ResourceSelectorComponent extends SelectComponent {
|
|
5642
|
+
static schema(...extend) {
|
|
5643
|
+
return SelectComponent.schema(Object.assign({ type: 'resource-selector', label: 'Resource selector', key: 'resource-selector', dataSrc: 'custom', dataType: 'string', valueProperty: 'value', asyncValues: true, data: {
|
|
5644
|
+
custom: 'values = instance.getResources()',
|
|
5645
|
+
} }, extend));
|
|
5646
|
+
}
|
|
5647
|
+
getResources() {
|
|
5648
|
+
return stateService.documentId$
|
|
5649
|
+
.pipe(take(1))
|
|
5650
|
+
.toPromise()
|
|
5651
|
+
.then(documentId => getDocumentResources(documentId));
|
|
5652
|
+
}
|
|
5653
|
+
static get builderInfo() {
|
|
5654
|
+
return {
|
|
5655
|
+
title: 'Document picker',
|
|
5656
|
+
icon: 'th-list',
|
|
5657
|
+
group: 'basic',
|
|
5658
|
+
documentation: '/userguide/#textfield',
|
|
5659
|
+
weight: 0,
|
|
5660
|
+
schema: ResourceSelectorComponent.schema(),
|
|
5661
|
+
};
|
|
5662
|
+
}
|
|
5663
|
+
}
|
|
5664
|
+
Formio.use({
|
|
5665
|
+
components: {
|
|
5666
|
+
'resource-selector': ResourceSelectorComponent,
|
|
5667
|
+
},
|
|
5668
|
+
});
|
|
5669
|
+
}
|
|
5670
|
+
|
|
5671
|
+
/*
|
|
5672
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
5673
|
+
*
|
|
5674
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5675
|
+
* you may not use this file except in compliance with the License.
|
|
4905
5676
|
* You may obtain a copy of the License at
|
|
4906
5677
|
*
|
|
4907
5678
|
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
@@ -5064,194 +5835,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
5064
5835
|
}]
|
|
5065
5836
|
}] });
|
|
5066
5837
|
|
|
5067
|
-
/*
|
|
5068
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
5069
|
-
*
|
|
5070
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5071
|
-
* you may not use this file except in compliance with the License.
|
|
5072
|
-
* You may obtain a copy of the License at
|
|
5073
|
-
*
|
|
5074
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
5075
|
-
*
|
|
5076
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5077
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
5078
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5079
|
-
* See the License for the specific language governing permissions and
|
|
5080
|
-
* limitations under the License.
|
|
5081
|
-
*/
|
|
5082
|
-
class DocumentenApiMetadataModalComponent {
|
|
5083
|
-
constructor(modalService, translateService, route, documentService) {
|
|
5084
|
-
this.modalService = modalService;
|
|
5085
|
-
this.translateService = translateService;
|
|
5086
|
-
this.route = route;
|
|
5087
|
-
this.documentService = documentService;
|
|
5088
|
-
this.metadata = new EventEmitter();
|
|
5089
|
-
this.CONFIDENTIALITY_LEVELS = [
|
|
5090
|
-
'openbaar',
|
|
5091
|
-
'beperkt_openbaar',
|
|
5092
|
-
'intern',
|
|
5093
|
-
'zaakvertrouwelijk',
|
|
5094
|
-
'vertrouwelijk',
|
|
5095
|
-
'confidentieel',
|
|
5096
|
-
'geheim',
|
|
5097
|
-
'zeer_geheim',
|
|
5098
|
-
];
|
|
5099
|
-
this.confidentialityLevelItems$ = this.translateService
|
|
5100
|
-
.stream('key')
|
|
5101
|
-
.pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
|
|
5102
|
-
id: confidentialityLevel,
|
|
5103
|
-
text: this.translateService.instant(`document.${confidentialityLevel}`),
|
|
5104
|
-
}))));
|
|
5105
|
-
this.STATUSES = [
|
|
5106
|
-
'in_bewerking',
|
|
5107
|
-
'ter_vaststelling',
|
|
5108
|
-
'definitief',
|
|
5109
|
-
'gearchiveerd',
|
|
5110
|
-
];
|
|
5111
|
-
this.statusItems$ = this.translateService.stream('key').pipe(map(() => this.STATUSES.map(status => ({
|
|
5112
|
-
id: status,
|
|
5113
|
-
text: this.translateService.instant(`document.${status}`),
|
|
5114
|
-
}))));
|
|
5115
|
-
this.LANGUAGES = ['nld', 'eng', 'deu'];
|
|
5116
|
-
this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
|
|
5117
|
-
id: language,
|
|
5118
|
-
text: this.translateService.instant(`document.${language}`),
|
|
5119
|
-
}))));
|
|
5120
|
-
this.documentTypeItems$ = this.route.params.pipe(switchMap(params => this.documentService.getDocumentTypes(params.documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
|
|
5121
|
-
this.showForm$ = this.modalService.modalVisible$;
|
|
5122
|
-
this.valid$ = new BehaviorSubject(false);
|
|
5123
|
-
this.formData$ = new BehaviorSubject(null);
|
|
5124
|
-
}
|
|
5125
|
-
ngOnInit() {
|
|
5126
|
-
this.openShowSubscription();
|
|
5127
|
-
this.openHideSubscription();
|
|
5128
|
-
}
|
|
5129
|
-
ngOnDestroy() {
|
|
5130
|
-
var _a, _b;
|
|
5131
|
-
(_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
5132
|
-
(_b = this.hideSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
5133
|
-
}
|
|
5134
|
-
hide() {
|
|
5135
|
-
this.formData$.next(null);
|
|
5136
|
-
this.valid$.next(false);
|
|
5137
|
-
this.modalService.closeModal();
|
|
5138
|
-
}
|
|
5139
|
-
cancel() {
|
|
5140
|
-
this.hide();
|
|
5141
|
-
}
|
|
5142
|
-
save() {
|
|
5143
|
-
combineLatest([this.valid$, this.formData$])
|
|
5144
|
-
.pipe(take$1(1))
|
|
5145
|
-
.subscribe(([valid, formData]) => {
|
|
5146
|
-
if (valid) {
|
|
5147
|
-
this.metadata.emit(formData);
|
|
5148
|
-
}
|
|
5149
|
-
});
|
|
5150
|
-
}
|
|
5151
|
-
formValueChange(data) {
|
|
5152
|
-
this.formData$.next(data);
|
|
5153
|
-
this.setValid(data);
|
|
5154
|
-
}
|
|
5155
|
-
setValid(data) {
|
|
5156
|
-
this.valid$.next(!!(data.filename &&
|
|
5157
|
-
data.title &&
|
|
5158
|
-
data.author &&
|
|
5159
|
-
data.creationDate &&
|
|
5160
|
-
data.status &&
|
|
5161
|
-
data.language &&
|
|
5162
|
-
data.informatieobjecttype));
|
|
5163
|
-
}
|
|
5164
|
-
openShowSubscription() {
|
|
5165
|
-
this.showSubscription = this.show$.subscribe(() => {
|
|
5166
|
-
this.modalService.openModal(this.documentenApiMetadataModal);
|
|
5167
|
-
});
|
|
5168
|
-
}
|
|
5169
|
-
openHideSubscription() {
|
|
5170
|
-
this.hideSubscription = this.hide$.subscribe(() => {
|
|
5171
|
-
this.hide();
|
|
5172
|
-
});
|
|
5173
|
-
}
|
|
5174
|
-
}
|
|
5175
|
-
DocumentenApiMetadataModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, deps: [{ token: i1$4.ModalService }, { token: i1$8.TranslateService }, { token: i1$5.ActivatedRoute }, { token: i2.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5176
|
-
DocumentenApiMetadataModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: { show$: "show$", hide$: "hide$", disabled$: "disabled$", file$: "file$" }, outputs: { metadata: "metadata" }, viewQueries: [{ propertyName: "documentenApiMetadataModal", first: true, predicate: ["documentenApiMetadataModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n [defaultValue]=\"obs.file?.name\"\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"status\"\n ></v-select>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelection]=\"languageItems[0]\"\n [disabled]=\"obs.disabled\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-input\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}\n"], components: [{ type: i1$4.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { type: i1$4.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { type: i1$4.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { type: i1$4.FormComponent, selector: "v-form", outputs: ["valueChange"] }, { type: i1$4.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox"], outputs: ["valueChange"] }, { type: i1$4.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder"], outputs: ["selectedChange", "clear"] }, { type: i1$4.DatePickerComponent, selector: "v-date-picker", inputs: ["name", "title", "titleTranslationKey", "widthPx", "fullWidth", "margin", "disabled", "tooltip", "required", "defaultDate", "defaultDateIsToday"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe, "translate": i1$8.TranslatePipe } });
|
|
5177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
|
|
5178
|
-
type: Component,
|
|
5179
|
-
args: [{ selector: 'valtimo-documenten-api-metadata-modal', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n [defaultValue]=\"obs.file?.name\"\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"status\"\n ></v-select>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelection]=\"languageItems[0]\"\n [disabled]=\"obs.disabled\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-input\n [disabled]=\"obs.disabled\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [disabled]=\"obs.disabled\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}\n"] }]
|
|
5180
|
-
}], ctorParameters: function () { return [{ type: i1$4.ModalService }, { type: i1$8.TranslateService }, { type: i1$5.ActivatedRoute }, { type: i2.DocumentService }]; }, propDecorators: { documentenApiMetadataModal: [{
|
|
5181
|
-
type: ViewChild,
|
|
5182
|
-
args: ['documentenApiMetadataModal']
|
|
5183
|
-
}], show$: [{
|
|
5184
|
-
type: Input
|
|
5185
|
-
}], hide$: [{
|
|
5186
|
-
type: Input
|
|
5187
|
-
}], disabled$: [{
|
|
5188
|
-
type: Input
|
|
5189
|
-
}], file$: [{
|
|
5190
|
-
type: Input
|
|
5191
|
-
}], metadata: [{
|
|
5192
|
-
type: Output
|
|
5193
|
-
}] } });
|
|
5194
|
-
|
|
5195
|
-
/*
|
|
5196
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
5197
|
-
*
|
|
5198
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5199
|
-
* you may not use this file except in compliance with the License.
|
|
5200
|
-
* You may obtain a copy of the License at
|
|
5201
|
-
*
|
|
5202
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
5203
|
-
*
|
|
5204
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5205
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
5206
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5207
|
-
* See the License for the specific language governing permissions and
|
|
5208
|
-
* limitations under the License.
|
|
5209
|
-
*/
|
|
5210
|
-
class DocumentenApiMetadataModalModule {
|
|
5211
|
-
}
|
|
5212
|
-
DocumentenApiMetadataModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5213
|
-
DocumentenApiMetadataModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, declarations: [DocumentenApiMetadataModalComponent], imports: [CommonModule,
|
|
5214
|
-
TranslateModule,
|
|
5215
|
-
ModalModule$1,
|
|
5216
|
-
TitleModule,
|
|
5217
|
-
ButtonModule,
|
|
5218
|
-
TranslateModule,
|
|
5219
|
-
FormModule,
|
|
5220
|
-
InputModule,
|
|
5221
|
-
SelectModule,
|
|
5222
|
-
DatePickerModule], exports: [DocumentenApiMetadataModalComponent] });
|
|
5223
|
-
DocumentenApiMetadataModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, imports: [[
|
|
5224
|
-
CommonModule,
|
|
5225
|
-
TranslateModule,
|
|
5226
|
-
ModalModule$1,
|
|
5227
|
-
TitleModule,
|
|
5228
|
-
ButtonModule,
|
|
5229
|
-
TranslateModule,
|
|
5230
|
-
FormModule,
|
|
5231
|
-
InputModule,
|
|
5232
|
-
SelectModule,
|
|
5233
|
-
DatePickerModule,
|
|
5234
|
-
]] });
|
|
5235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DocumentenApiMetadataModalModule, decorators: [{
|
|
5236
|
-
type: NgModule,
|
|
5237
|
-
args: [{
|
|
5238
|
-
declarations: [DocumentenApiMetadataModalComponent],
|
|
5239
|
-
exports: [DocumentenApiMetadataModalComponent],
|
|
5240
|
-
imports: [
|
|
5241
|
-
CommonModule,
|
|
5242
|
-
TranslateModule,
|
|
5243
|
-
ModalModule$1,
|
|
5244
|
-
TitleModule,
|
|
5245
|
-
ButtonModule,
|
|
5246
|
-
TranslateModule,
|
|
5247
|
-
FormModule,
|
|
5248
|
-
InputModule,
|
|
5249
|
-
SelectModule,
|
|
5250
|
-
DatePickerModule,
|
|
5251
|
-
],
|
|
5252
|
-
}]
|
|
5253
|
-
}] });
|
|
5254
|
-
|
|
5255
5838
|
/*
|
|
5256
5839
|
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
5257
5840
|
*
|
|
@@ -5272,5 +5855,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
5272
5855
|
* Generated bundle index. Do not edit.
|
|
5273
5856
|
*/
|
|
5274
5857
|
|
|
5275
|
-
export { Alert, AlertComponent, AlertModule, AlertService, AlertType, AlertsOptionsImpl, BpmnJsDiagramComponent, BpmnJsDiagramModule, BreadcrumbNavigationComponent, BreadcrumbNavigationModule, CamundaFormComponent, CamundaFormModule, CardComponent, CardModule, ComponentsModule, DataListComponent, DataListModule, DocumentenApiMetadataModalComponent, DocumentenApiMetadataModalModule, DropzoneComponent, DropzoneModule, FieldAutoFocusDirective, FieldAutoFocusModule, FileSizeModule, FileSizePipe, FilterSidebarComponent, FilterSidebarModule, FormIoModule, FormIoStateService, FormIoUploaderComponent, FormioBuilderComponent, FormioComponent, FormioOptionsImpl, LeftSidebarComponent, LeftSidebarModule, ListComponent, ListFilterPipe, ListModule, MenuComponent, MenuModule, MenuRoutingModule, MenuService, ModalComponent, ModalModule, MultiselectDropdownComponent, MultiselectDropdownModule, PageHeaderComponent, PageHeaderModule, PageTitleComponent, PageTitleModule, ProgressBarComponent, ProgressBarModule, RightSidebarComponent, RightSidebarModule, SearchableDropdownComponent, SearchableDropdownModule, SearchableDropdownSelectComponent, SearchableDropdownSelectModule, SpinnerComponent, SpinnerModule, TimelineComponent, TimelineItemImpl, TimelineModule, TopbarComponent, TopbarModule, UploaderComponent, UploaderDragDropDirective, UploaderModule, ValtimoModalService, ViewContentService, WebcamComponent, WebcamModule, WidgetComponent, WidgetModule, customUploaderType, menuInitializer, registerFormioFileSelectorComponent, registerFormioUploadComponent };
|
|
5858
|
+
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 };
|
|
5276
5859
|
//# sourceMappingURL=valtimo-components.mjs.map
|