@valtimo/form-management 13.27.0 → 13.28.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.
@@ -1,23 +1,23 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Output, Input, Component, Inject, ChangeDetectionStrategy, HostBinding, ViewEncapsulation, NgModule } from '@angular/core';
3
- import { of, combineLatest, map as map$1, switchMap as switchMap$1, tap, BehaviorSubject, startWith, Subscription, filter as filter$1, take as take$1 } from 'rxjs';
2
+ import { Injectable, EventEmitter, Output, Input, Component, ChangeDetectionStrategy, Inject, HostBinding, ViewEncapsulation, NgModule } from '@angular/core';
3
+ import { of, combineLatest, map as map$1, switchMap as switchMap$1, tap, BehaviorSubject, filter as filter$1, startWith, take as take$1, Subscription } from 'rxjs';
4
4
  import * as i4 from '@valtimo/shared';
5
5
  import { BaseApiService, getCaseManagementRouteParams, getBuildingBlockManagementRouteParams, getCaseManagementRouteParamsAndContext, ROLE_ADMIN, RouterUtils } from '@valtimo/shared';
6
6
  import * as i1 from '@angular/common/http';
7
- import * as i7 from '@angular/common';
7
+ import * as i4$1 from '@angular/common';
8
8
  import { CommonModule } from '@angular/common';
9
- import * as i3 from '@angular/router';
10
- import { RouterOutlet, RouterModule } from '@angular/router';
11
9
  import * as i2$1 from 'carbon-components-angular';
12
- import { ButtonModule, InputModule, TilesModule, LayerModule, ModalModule, BaseModal, FileUploaderModule, TabsModule, TagModule, IconModule, LoadingModule } from 'carbon-components-angular';
10
+ import { ButtonModule, InputModule, TilesModule, LayerModule, ModalModule, IconModule, BaseModal, FileUploaderModule, TabsModule, TagModule, LoadingModule } from 'carbon-components-angular';
13
11
  import * as i2 from '@angular/forms';
14
- import { FormControl, Validators, ReactiveFormsModule, FormGroup, FormsModule } from '@angular/forms';
12
+ import { FormControl, Validators, ReactiveFormsModule, FormsModule, FormGroup } from '@angular/forms';
15
13
  import * as i5 from '@ngx-translate/core';
16
14
  import { TranslateModule } from '@ngx-translate/core';
17
15
  import * as i3$1 from '@valtimo/components';
18
- import { WidgetModule, ValtimoCdsModalDirective, CARBON_CONSTANTS, CarbonListModule, EditorModule, FormIoModule, RenderInPageHeaderDirective, OverflowMenuComponent, OverflowMenuOptionComponent, OverflowMenuTriggerComponent, ConfirmationModalModule, SpinnerModule, ViewType } from '@valtimo/components';
16
+ import { WidgetModule, ValtimoCdsModalDirective, ViewType, CarbonListModule, ConfirmationModalModule, CARBON_CONSTANTS, EditorModule, FormIoModule, RenderInPageHeaderDirective, OverflowMenuComponent, OverflowMenuOptionComponent, OverflowMenuTriggerComponent, SpinnerModule } from '@valtimo/components';
19
17
  import { map, distinctUntilChanged, switchMap, filter, take, tap as tap$1 } from 'rxjs/operators';
20
- import { ArrowLeft16, Upload16 } from '@carbon/icons';
18
+ import * as i3 from '@angular/router';
19
+ import { RouterModule } from '@angular/router';
20
+ import { Upload16, ArrowLeft16 } from '@carbon/icons';
21
21
  import { AuthGuardService } from '@valtimo/security';
22
22
 
23
23
  /*
@@ -344,7 +344,7 @@ class FormManagementCreateComponent {
344
344
  this.createFormDefinition();
345
345
  }
346
346
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementCreateComponent, deps: [{ token: FormManagementService }, { token: i2.FormBuilder }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
347
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementCreateComponent, isStandalone: true, selector: "valtimo-form-management-create", inputs: { upload: "upload" }, outputs: { goBackEvent: "goBackEvent", afterCreateEvent: "afterCreateEvent", afterUploadEvent: "afterUploadEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<cds-modal\n valtimoCdsModal\n class=\"form-management-create\"\n size=\"sm\"\n [cdsLayer]=\"0\"\n [open]=\"true\"\n (close)=\"onCloseEvent()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCloseEvent()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formManagement.add' | translate }}\n </h3>\n </cds-modal-header>\n\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <section cdsModalContent [cdsLayer]=\"1\">\n <cds-label\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n [invalidText]=\"\n (formControls?.name?.errors?.required && ('formManagement.nameIsRequired' | translate)) ||\n (formControls?.name?.errors?.duplicate && ('formManagement.nameIsInUse' | translate))\n \"\n >\n {{ 'formManagement.name' | translate }}\n\n <input\n cdsText\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n required\n [attr.data-test-id]=\"testIds.nameInput\"\n />\n </cds-label>\n </section>\n\n <cds-modal-footer [cdsLayer]=\"1\">\n <button cdsButton=\"secondary\" (click)=\"$event.preventDefault(); onBackButtonClick()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n type=\"submit\"\n [disabled]=\"form?.invalid\"\n [attr.data-test-id]=\"testIds.submitButton\"\n >\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n </form>\n</cds-modal>\n", styles: [".form-management-create{max-width:512px;margin:0 auto}cds-modal-footer{width:100%}\n/*!\n * Copyright 2015-2025 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i2$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i2$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: WidgetModule }, { kind: "ngmodule", type: TilesModule }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }] }); }
347
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementCreateComponent, isStandalone: true, selector: "valtimo-form-management-create", inputs: { upload: "upload" }, outputs: { goBackEvent: "goBackEvent", afterCreateEvent: "afterCreateEvent", afterUploadEvent: "afterUploadEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<cds-modal\n valtimoCdsModal\n class=\"form-management-create\"\n size=\"sm\"\n [cdsLayer]=\"0\"\n [open]=\"true\"\n (close)=\"onCloseEvent()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCloseEvent()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formManagement.add' | translate }}\n </h3>\n </cds-modal-header>\n\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <section cdsModalContent [cdsLayer]=\"1\">\n <cds-label\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n [invalidText]=\"\n (formControls?.name?.errors?.required && ('formManagement.nameIsRequired' | translate)) ||\n (formControls?.name?.errors?.duplicate && ('formManagement.nameIsInUse' | translate))\n \"\n >\n {{ 'formManagement.name' | translate }}\n\n <input\n cdsText\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n required\n [attr.data-test-id]=\"testIds.nameInput\"\n />\n </cds-label>\n </section>\n\n <cds-modal-footer [cdsLayer]=\"1\">\n <button cdsButton=\"secondary\" (click)=\"$event.preventDefault(); onBackButtonClick()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n type=\"submit\"\n [disabled]=\"form?.invalid\"\n [attr.data-test-id]=\"testIds.submitButton\"\n >\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n </form>\n</cds-modal>\n", styles: [".form-management-create{max-width:512px;margin:0 auto}cds-modal-footer{width:100%}\n/*!\n * Copyright 2015-2025 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i2$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i2$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: WidgetModule }, { kind: "ngmodule", type: TilesModule }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }] }); }
348
348
  }
349
349
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementCreateComponent, decorators: [{
350
350
  type: Component,
@@ -388,6 +388,260 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
388
388
  * limitations under the License.
389
389
  */
390
390
 
391
+ /*
392
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
393
+ *
394
+ * Licensed under EUPL, Version 1.2 (the "License");
395
+ * you may not use this file except in compliance with the License.
396
+ * You may obtain a copy of the License at
397
+ *
398
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
399
+ *
400
+ * Unless required by applicable law or agreed to in writing, software
401
+ * distributed under the License is distributed on an "AS IS" basis,
402
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
403
+ * See the License for the specific language governing permissions and
404
+ * limitations under the License.
405
+ */
406
+ class FormManagementListComponent {
407
+ get _partialPagination() {
408
+ return this._partialPagination$.getValue();
409
+ }
410
+ constructor(formManagementService, iconService, route, environmentService, draftVersionService, notificationService, translateService, editPermissionsService) {
411
+ this.formManagementService = formManagementService;
412
+ this.iconService = iconService;
413
+ this.route = route;
414
+ this.environmentService = environmentService;
415
+ this.draftVersionService = draftVersionService;
416
+ this.notificationService = notificationService;
417
+ this.translateService = translateService;
418
+ this.editPermissionsService = editPermissionsService;
419
+ this.navigateToCreateEvent = new EventEmitter();
420
+ this.navigateToUploadEvent = new EventEmitter();
421
+ this.navigateToEditEvent = new EventEmitter();
422
+ this.ACTION_ITEMS = [
423
+ {
424
+ callback: this.editFormDefinition.bind(this),
425
+ label: 'interface.edit',
426
+ },
427
+ { callback: this.showDeleteModal.bind(this), label: 'interface.delete', type: 'danger' },
428
+ ];
429
+ this.showDeleteModal$ = new BehaviorSubject(false);
430
+ this.formDefinitionToDelete$ = new BehaviorSubject(null);
431
+ this.loading$ = new BehaviorSubject(true);
432
+ this.searchTerm$ = new BehaviorSubject('');
433
+ this.testIds = FORM_MANAGEMENT_LIST_TEST_IDS;
434
+ this.context$ = getContextObservable(this.route);
435
+ this.caseManagementRouteParams$ = this.context$.pipe(filter$1(context => context === 'case'), switchMap$1(() => getCaseManagementRouteParams(this.route)));
436
+ this.hasEditPermissions$ = combineLatest([
437
+ getCaseManagementRouteParams(this.route),
438
+ this.context$,
439
+ ]).pipe(switchMap$1(([params, context]) => this.editPermissionsService.hasPermissionsToEditBasedOnContext(params, context)));
440
+ this._collectionSize$ = new BehaviorSubject(0);
441
+ this._partialPagination$ = new BehaviorSubject({
442
+ page: 1,
443
+ size: 10,
444
+ });
445
+ this.pagination$ = combineLatest([
446
+ this._collectionSize$,
447
+ this._partialPagination$,
448
+ ]).pipe(map$1(([collectionSize, partialPagination]) => ({ ...partialPagination, collectionSize })));
449
+ this.formDefinitions$ = combineLatest([
450
+ this.context$,
451
+ this.caseManagementRouteParams$.pipe(startWith(null)),
452
+ this._partialPagination$,
453
+ this.searchTerm$,
454
+ ]).pipe(filter$1(([context, params]) => context === 'case' ? !!(params?.caseDefinitionVersionTag && params?.caseDefinitionKey) : true), switchMap$1(([context, routeParams, pagination, searchTerm]) => {
455
+ const params = {
456
+ ...pagination,
457
+ page: (pagination?.page ?? 1) - 1,
458
+ ...(searchTerm && { searchTerm }),
459
+ };
460
+ switch (context) {
461
+ case 'case':
462
+ return this.formManagementService.queryFormDefinitionsCase(routeParams?.caseDefinitionKey ?? '', routeParams?.caseDefinitionVersionTag ?? '', params);
463
+ default:
464
+ case 'independent':
465
+ return this.formManagementService.queryFormDefinitions(params);
466
+ }
467
+ }), map$1((res) => {
468
+ this._collectionSize$.next(res?.totalElements);
469
+ return res?.content
470
+ ? [...res.content].sort((firstForm, secondForm) => (firstForm.name ?? '').localeCompare(secondForm.name ?? ''))
471
+ : [];
472
+ }), tap(() => this.loading$.next(false)));
473
+ this.FIELDS = [
474
+ { key: 'name', label: 'Form name' },
475
+ { key: 'readOnly', label: 'Read-only', viewType: ViewType.BOOLEAN },
476
+ ];
477
+ this.iconService.registerAll([Upload16]);
478
+ }
479
+ navigateToCreateRoute() {
480
+ this.navigateToCreateEvent.emit();
481
+ }
482
+ navigateToUploadRoute() {
483
+ this.navigateToUploadEvent.emit();
484
+ }
485
+ paginationClicked(page) {
486
+ this.updatePagination({ page });
487
+ }
488
+ paginationSet(size) {
489
+ this.updatePagination({ size, page: 1 });
490
+ }
491
+ editFormDefinition(formDefinition) {
492
+ this.navigateToEditEvent.emit(formDefinition.id);
493
+ }
494
+ searchTermEntered(searchTerm) {
495
+ this.searchTerm$.next(searchTerm);
496
+ }
497
+ showDeleteModal(definition) {
498
+ this.formDefinitionToDelete$.next(definition);
499
+ this.showDeleteModal$.next(true);
500
+ }
501
+ deleteFormDefinition(definition) {
502
+ getCaseManagementRouteParamsAndContext(this.route)
503
+ .pipe(take$1(1), switchMap$1(([context, caseManagementRouteParams]) => {
504
+ switch (context) {
505
+ case 'case':
506
+ return this.formManagementService.deleteFormDefinitionCase(caseManagementRouteParams?.caseDefinitionKey, caseManagementRouteParams?.caseDefinitionVersionTag, definition.id);
507
+ case 'independent':
508
+ default:
509
+ return this.formManagementService.deleteFormDefinition(definition.id);
510
+ }
511
+ }))
512
+ .subscribe({
513
+ next: () => {
514
+ this.notificationService.showToast({
515
+ type: 'success',
516
+ title: this.translateService.instant('formManagement.notifications.deleted'),
517
+ });
518
+ this._partialPagination$.next({ ...this._partialPagination });
519
+ },
520
+ error: () => {
521
+ this.notificationService.showToast({
522
+ type: 'error',
523
+ title: this.translateService.instant('formManagement.notifications.deletionError'),
524
+ });
525
+ },
526
+ });
527
+ }
528
+ updatePagination(update) {
529
+ this._partialPagination$.next({ ...this._partialPagination, ...update });
530
+ }
531
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementListComponent, deps: [{ token: FormManagementService }, { token: i2$1.IconService }, { token: i3.ActivatedRoute }, { token: i4.EnvironmentService }, { token: i4.DraftVersionService }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }, { token: i4.EditPermissionsService }], target: i0.ɵɵFactoryTarget.Component }); }
532
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementListComponent, isStandalone: true, selector: "valtimo-form-management-list", outputs: { navigateToCreateEvent: "navigateToCreateEvent", navigateToUploadEvent: "navigateToUploadEvent", navigateToEditEvent: "navigateToEditEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<valtimo-carbon-list\n *ngIf=\"{\n formDefinitions: formDefinitions$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n context: context$ | async,\n hasEditPermissions: hasEditPermissions$ | async,\n } as obs\"\n [showActionItems]=\"obs.hasEditPermissions\"\n [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [isSearchable]=\"true\"\n [items]=\"obs?.formDefinitions || []\"\n [pagination]=\"obs.pagination\"\n [loading]=\"obs.loading\"\n paginationIdentifier=\"formManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"editFormDefinition($event)\"\n (search)=\"searchTermEntered($event)\"\n>\n <ng-container *ngIf=\"obs.hasEditPermissions\" carbonToolbarContent>\n <button cdsButton=\"ghost\" [iconOnly]=\"true\" (click)=\"navigateToUploadRoute()\">\n <svg cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n\n <ng-container [ngTemplateOutlet]=\"createFormButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"createFormButton\"\n [description]=\"'formManagement.noResults.' + obs.context + 'Description' | translate\"\n [title]=\"'formManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"formDefinitionToDelete$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #createFormButton>\n <button\n *ngIf=\"hasEditPermissions$ | async\"\n cdsButton=\"primary\"\n (click)=\"navigateToCreateRoute()\"\n [attr.data-test-id]=\"testIds.createFormButton\"\n >\n {{ 'Create Form' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2025 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "skeletonRowCount", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i3$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }] }); }
533
+ }
534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementListComponent, decorators: [{
535
+ type: Component,
536
+ args: [{ selector: 'valtimo-form-management-list', standalone: true, imports: [
537
+ CommonModule,
538
+ FormsModule,
539
+ ReactiveFormsModule,
540
+ TranslateModule,
541
+ CarbonListModule,
542
+ IconModule,
543
+ ButtonModule,
544
+ ConfirmationModalModule,
545
+ ], template: "<!--\n ~ Copyright 2015-2025 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<valtimo-carbon-list\n *ngIf=\"{\n formDefinitions: formDefinitions$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n context: context$ | async,\n hasEditPermissions: hasEditPermissions$ | async,\n } as obs\"\n [showActionItems]=\"obs.hasEditPermissions\"\n [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [isSearchable]=\"true\"\n [items]=\"obs?.formDefinitions || []\"\n [pagination]=\"obs.pagination\"\n [loading]=\"obs.loading\"\n paginationIdentifier=\"formManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"editFormDefinition($event)\"\n (search)=\"searchTermEntered($event)\"\n>\n <ng-container *ngIf=\"obs.hasEditPermissions\" carbonToolbarContent>\n <button cdsButton=\"ghost\" [iconOnly]=\"true\" (click)=\"navigateToUploadRoute()\">\n <svg cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n\n <ng-container [ngTemplateOutlet]=\"createFormButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"createFormButton\"\n [description]=\"'formManagement.noResults.' + obs.context + 'Description' | translate\"\n [title]=\"'formManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"formDefinitionToDelete$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #createFormButton>\n <button\n *ngIf=\"hasEditPermissions$ | async\"\n cdsButton=\"primary\"\n (click)=\"navigateToCreateRoute()\"\n [attr.data-test-id]=\"testIds.createFormButton\"\n >\n {{ 'Create Form' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2025 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"] }]
546
+ }], ctorParameters: () => [{ type: FormManagementService }, { type: i2$1.IconService }, { type: i3.ActivatedRoute }, { type: i4.EnvironmentService }, { type: i4.DraftVersionService }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }, { type: i4.EditPermissionsService }], propDecorators: { navigateToCreateEvent: [{
547
+ type: Output
548
+ }], navigateToUploadEvent: [{
549
+ type: Output
550
+ }], navigateToEditEvent: [{
551
+ type: Output
552
+ }] } });
553
+
554
+ /*
555
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
556
+ *
557
+ * Licensed under EUPL, Version 1.2 (the "License");
558
+ * you may not use this file except in compliance with the License.
559
+ * You may obtain a copy of the License at
560
+ *
561
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
562
+ *
563
+ * Unless required by applicable law or agreed to in writing, software
564
+ * distributed under the License is distributed on an "AS IS" basis,
565
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
566
+ * See the License for the specific language governing permissions and
567
+ * limitations under the License.
568
+ */
569
+
570
+ /*
571
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
572
+ *
573
+ * Licensed under EUPL, Version 1.2 (the "License");
574
+ * you may not use this file except in compliance with the License.
575
+ * You may obtain a copy of the License at
576
+ *
577
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
578
+ *
579
+ * Unless required by applicable law or agreed to in writing, software
580
+ * distributed under the License is distributed on an "AS IS" basis,
581
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
582
+ * See the License for the specific language governing permissions and
583
+ * limitations under the License.
584
+ */
585
+ class FormManagementComponent {
586
+ constructor(route, router, notificationService, translateService) {
587
+ this.route = route;
588
+ this.router = router;
589
+ this.notificationService = notificationService;
590
+ this.translateService = translateService;
591
+ this.create$ = new BehaviorSubject(false);
592
+ this.upload$ = new BehaviorSubject(false);
593
+ }
594
+ onNavigateToCreateEvent() {
595
+ this.create$.next(true);
596
+ }
597
+ onGoBackFromCreateEvent() {
598
+ this.create$.next(false);
599
+ this.upload$.next(false);
600
+ }
601
+ onFormDefinitionEditEvent(formDefinitionId, upload = false) {
602
+ this.router.navigate([formDefinitionId], {
603
+ relativeTo: this.route,
604
+ queryParams: { ...(upload && { upload: true }) },
605
+ });
606
+ }
607
+ onFormDefinitionCreateEvent(formDefinitionId) {
608
+ this.resetNotifications();
609
+ this.notificationService.showToast({
610
+ type: 'success',
611
+ title: this.translateService.instant('formManagement.notifications.created'),
612
+ });
613
+ this.onFormDefinitionEditEvent(formDefinitionId);
614
+ }
615
+ onFormDefinitionUploadEvent(formDefinitionId) {
616
+ this.resetNotifications();
617
+ this.notificationService.showToast({
618
+ type: 'success',
619
+ title: this.translateService.instant('formManagement.notifications.created'),
620
+ });
621
+ this.onFormDefinitionEditEvent(formDefinitionId, true);
622
+ }
623
+ onNavigateToUploadEvent() {
624
+ this.create$.next(true);
625
+ this.upload$.next(true);
626
+ }
627
+ resetNotifications() {
628
+ this.notificationService
629
+ ?.getNotificationRefs()
630
+ .forEach(ref => this.notificationService.close(ref));
631
+ }
632
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementComponent, deps: [{ token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
633
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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\n *ngIf=\"{\n create: create$ | async,\n upload: upload$ | async,\n } as obs\"\n>\n <valtimo-form-management-list\n (navigateToCreateEvent)=\"onNavigateToCreateEvent()\"\n (navigateToUploadEvent)=\"onNavigateToUploadEvent()\"\n (navigateToEditEvent)=\"onFormDefinitionEditEvent($event)\"\n ></valtimo-form-management-list>\n\n <valtimo-form-management-create\n *ngIf=\"obs.create\"\n [upload]=\"obs.upload\"\n (goBackEvent)=\"onGoBackFromCreateEvent()\"\n (afterCreateEvent)=\"onFormDefinitionCreateEvent($event)\"\n (afterUploadEvent)=\"onFormDefinitionUploadEvent($event)\"\n ></valtimo-form-management-create>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: FormManagementListComponent, selector: "valtimo-form-management-list", outputs: ["navigateToCreateEvent", "navigateToUploadEvent", "navigateToEditEvent"] }, { kind: "component", type: FormManagementCreateComponent, selector: "valtimo-form-management-create", inputs: ["upload"], outputs: ["goBackEvent", "afterCreateEvent", "afterUploadEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
634
+ }
635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementComponent, decorators: [{
636
+ type: Component,
637
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
638
+ CommonModule,
639
+ ButtonModule,
640
+ FormManagementListComponent,
641
+ FormManagementCreateComponent,
642
+ ], template: "<!--\n ~ Copyright 2015-2025 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\n *ngIf=\"{\n create: create$ | async,\n upload: upload$ | async,\n } as obs\"\n>\n <valtimo-form-management-list\n (navigateToCreateEvent)=\"onNavigateToCreateEvent()\"\n (navigateToUploadEvent)=\"onNavigateToUploadEvent()\"\n (navigateToEditEvent)=\"onFormDefinitionEditEvent($event)\"\n ></valtimo-form-management-list>\n\n <valtimo-form-management-create\n *ngIf=\"obs.create\"\n [upload]=\"obs.upload\"\n (goBackEvent)=\"onGoBackFromCreateEvent()\"\n (afterCreateEvent)=\"onFormDefinitionCreateEvent($event)\"\n (afterUploadEvent)=\"onFormDefinitionUploadEvent($event)\"\n ></valtimo-form-management-create>\n</ng-container>\n" }]
643
+ }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }] });
644
+
391
645
  /*
392
646
  * Copyright 2015-2025 Ritense BV, the Netherlands.
393
647
  *
@@ -664,7 +918,7 @@ class FormManagementUploadComponent {
664
918
  this.modalOpen$.next(false);
665
919
  }
666
920
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementUploadComponent, deps: [{ token: i2.FormBuilder }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
667
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementUploadComponent, isStandalone: true, selector: "valtimo-form-management-upload", inputs: { show$: "show$" }, outputs: { definitionUploaded: "definitionUploaded" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<cds-modal valtimoCdsModal [open]=\"modalOpen$ | async\" size=\"sm\" (close)=\"closeModal()\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>{{ 'formManagement.upload.modalTitle' | translate }}</h3>\n </cds-modal-header>\n\n <section cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\">\n <cds-file-uploader\n [accept]=\"ACCEPTED_FILES\"\n [buttonText]=\"'formManagement.upload.buttonText' | translate\"\n [description]=\"'formManagement.upload.description' | translate\"\n [multiple]=\"false\"\n [title]=\"'formManagement.upload.title' | translate\"\n buttonType=\"primary\"\n formControlName=\"file\"\n >\n </cds-file-uploader>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n [disabled]=\"(fileSelected$ | async) === false\"\n (click)=\"uploadFormDefinition()\"\n >\n {{ 'interface.upload' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2025 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FileUploaderModule }, { kind: "component", type: i2$1.FileUploader, selector: "cds-file-uploader, ibm-file-uploader", inputs: ["buttonText", "buttonType", "title", "description", "accept", "multiple", "skeleton", "size", "fileItemSize", "drop", "dropText", "fileUploaderId", "files", "disabled"], outputs: ["filesChange"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
921
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementUploadComponent, isStandalone: true, selector: "valtimo-form-management-upload", inputs: { show$: "show$" }, outputs: { definitionUploaded: "definitionUploaded" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<cds-modal valtimoCdsModal [open]=\"modalOpen$ | async\" size=\"sm\" (close)=\"closeModal()\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>{{ 'formManagement.upload.modalTitle' | translate }}</h3>\n </cds-modal-header>\n\n <section cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\">\n <cds-file-uploader\n [accept]=\"ACCEPTED_FILES\"\n [buttonText]=\"'formManagement.upload.buttonText' | translate\"\n [description]=\"'formManagement.upload.description' | translate\"\n [multiple]=\"false\"\n [title]=\"'formManagement.upload.title' | translate\"\n buttonType=\"primary\"\n formControlName=\"file\"\n >\n </cds-file-uploader>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n [disabled]=\"(fileSelected$ | async) === false\"\n (click)=\"uploadFormDefinition()\"\n >\n {{ 'interface.upload' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2025 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FileUploaderModule }, { kind: "component", type: i2$1.FileUploader, selector: "cds-file-uploader, ibm-file-uploader", inputs: ["buttonText", "buttonType", "title", "description", "accept", "multiple", "skeleton", "size", "fileItemSize", "drop", "dropText", "fileUploaderId", "files", "disabled"], outputs: ["filesChange"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
668
922
  }
669
923
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementUploadComponent, decorators: [{
670
924
  type: Component,
@@ -1043,7 +1297,7 @@ class FormManagementEditComponent {
1043
1297
  });
1044
1298
  }
1045
1299
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementEditComponent, deps: [{ token: FormManagementService }, { token: i2$1.ModalService }, { token: i3$1.PageTitleService }, { token: i3.ActivatedRoute }, { token: i3$1.ShellService }, { token: i3$1.PageHeaderService }, { token: i2$1.IconService }, { token: i3.Router }, { token: i5.TranslateService }, { token: i4.GlobalNotificationService }, { token: i3$1.BreadcrumbService }, { token: i4.EnvironmentService }, { token: i4.DraftVersionService }, { token: i3$1.FormIoTagsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1046
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: FormManagementEditComponent, isStandalone: true, selector: "valtimo-form-management-edit", outputs: { deleteEvent: "deleteEvent", goBackEvent: "goBackEvent", formModifiedEvent: "formModifiedEvent", formDeletedEvent: "formDeletedEvent", deleteErrorEvent: "deleteErrorEvent", deployErrorEvent: "deployErrorEvent" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<ng-container\n *ngIf=\"{\n formDefinition: formDefinition$ | async,\n jsonFormDefinition: jsonFormDefinition$ | async,\n jsonOutput: jsonOutput$ | async,\n compactMode: compactMode$ | async,\n context: context$ | async,\n canUpdateGlobalConfiguration: canUpdateGlobalConfiguration$ | async,\n isDraftVersion: isDraftVersion$ | async,\n } as obs\"\n>\n @if (obs.formDefinition) {\n <ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <ng-container *ngTemplateOutlet=\"actions; context: {obs: obs}\"></ng-container>\n </ng-template>\n </ng-container>\n\n <cds-tabs type=\"contained\">\n <cds-tab [heading]=\"TABS.BUILDER | translate\" (selected)=\"onSelectedTab(TABS.BUILDER)\">\n <valtimo-form-io-builder\n *ngIf=\"(reloading$ | async) === false && activeTab === TABS.BUILDER\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"formBuilderChanged($event, obs.jsonFormDefinition)\"\n ></valtimo-form-io-builder>\n </cds-tab>\n\n <cds-tab [heading]=\"TABS.EDITOR | translate\" (selected)=\"onSelectedTab(TABS.EDITOR)\">\n @if (activeTab === TABS.EDITOR && obs.jsonFormDefinition) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {\n disabled: obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration,\n formDefinition: obs.formDefinition,\n model: obs.jsonFormDefinition,\n },\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n\n <cds-tab\n [heading]=\"TABS.OUTPUT | translate\"\n (selected)=\"onSelectedTab(TABS.OUTPUT)\"\n class=\"valtimo-form-management-edit__output\"\n >\n <valtimo-form-io\n *ngIf=\"activeTab === TABS.OUTPUT\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"onOutputChange($event)\"\n ></valtimo-form-io>\n\n @if (activeTab === TABS.OUTPUT && obs.jsonOutput) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {disabled: true, formDefinition: obs.formDefinition, model: obs.jsonOutput},\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n </cds-tabs>\n } @else {\n <cds-loading></cds-loading>\n }\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"obs.formDefinition\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n ></valtimo-confirmation-modal>\n\n <valtimo-form-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"setFormDefinition($event)\"\n ></valtimo-form-management-upload>\n\n <ng-template #jsonEditor let-data=\"data\">\n <valtimo-editor\n [model]=\"data.model\"\n [disabled]=\"data.disabled\"\n (validEvent)=\"onValidEvent($event, data.disabled)\"\n (valueChangeEvent)=\"onValueChangeEvent($event, data.formDefinition, data.disabled)\"\n [fitPage]=\"true\"\n [fitPageSpaceAdjustment]=\"80\"\n ></valtimo-editor>\n </ng-template>\n</ng-container>\n\n<ng-template #actions let-obs=\"obs\">\n <div\n class=\"valtimo-form-management-edit__header-container\"\n [ngClass]=\"{\n '--compact': obs.compactMode,\n }\"\n >\n @if (obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion) {\n <cds-tag size=\"sm\" type=\"blue\">{{ 'formManagement.readOnly' | translate }}</cds-tag>\n }\n\n <div class=\"valtimo-form-management-edit__header\">\n <v-overflow-menu placement=\"bottom-end\">\n <v-overflow-menu-trigger overflowTrigger></v-overflow-menu-trigger>\n <v-overflow-menu-option (selected)=\"downloadFormDefinition(obs.formDefinition)\">\n {{ 'Download' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n (selected)=\"showUploadModal()\"\n >\n {{ 'Upload' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n *ngIf=\"(obs.context === 'case' && obs.isDraftVersion) || obs.context === 'independent'\"\n (selected)=\"showDuplicateModal(obs.formDefinition)\"\n >\n {{ 'formManagement.duplicate' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n type=\"danger\"\n (selected)=\"delete()\"\n >\n {{ 'interface.delete' | translate }}\n </v-overflow-menu-option>\n </v-overflow-menu>\n\n @if (obs.context === 'case') {\n <button\n cdsButton=\"secondary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"onGoBackButtonClick()\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"arrow--left\" size=\"16\"></svg>\n\n <span>{{ 'interface.back' | translate }}</span>\n </button>\n }\n\n <button\n *ngIf=\"obs?.canUpdateGlobalConfiguration || obs.context === 'independent'\"\n cdsButton=\"primary\"\n [disabled]=\"obs.formDefinition.readOnly || !obs.isDraftVersion\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"modifyFormDefinition(obs.formDefinition)\"\n [attr.data-test-id]=\"testIds.saveButton\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".valtimo-form-management-edit__header{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-left:auto}.valtimo-form-management-edit__case-header{display:flex;width:100%;justify-content:flex-end}.valtimo-form-management-edit__header-container{width:100%;display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:4px}.valtimo-form-management-edit__header-container .cds--tag{margin:0;height:var(--cds-layout-size-height-md)}.valtimo-form-management-edit__header-container.--compact{align-items:flex-start;padding-bottom:0}.valtimo-form-management-edit__output .cds--tab-content{display:grid;grid-template-columns:1fr 1fr}.valtimo-form-management-edit__output .cds--tab-content>*{min-width:100%!important}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy,.valtimo-form-management-edit .btn.formcomponent.gu-mirror{font-weight:400;background-color:silver;border-color:silver;color:#fff}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:hover,.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:hover,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{box-shadow:none}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{background-color:silver;border-color:silver}.valtimo-form-management-edit .formbuilder-header{padding-left:18px;padding-right:18px;font-size:18px;height:80px;border:1px solid #dee2e6;border-bottom:0}.valtimo-form-management-edit .formbuilder-header .formbuilder-title{margin-top:21px;margin-bottom:7px}.valtimo-form-management-edit .formbuilder-header .formbuilder-subtitle{margin-top:0;margin-bottom:12px}.valtimo-form-management-edit .formbuilder{background:#fff;padding:1rem;border:1px solid #dee2e6;margin-right:0!important;margin-left:0!important}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=false],.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=\"\"]{color:#a9a9a9}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.valtimo-form-management-edit .formbuilder .drag-and-drop-alert{display:none}.valtimo-form-management-edit .formbuilder .formarea{padding:10px;border:solid 1px silver;background-color:#fff}.valtimo-form-management-edit .increase-size{font-size:1rem}.valtimo-form-management-edit .cds--tab-content{background:#fff!important}\n/*!\n * Copyright 2015-2026 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: WidgetModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i2$1.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i2$1.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i3$1.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageSpaceAdjustment"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i3$1.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change", "event"] }, { kind: "component", type: i3$1.FormioBuilderComponent, selector: "valtimo-form-io-builder", inputs: ["form"], outputs: ["change"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "component", type: OverflowMenuComponent, selector: "v-overflow-menu", inputs: ["open", "placement", "menuWidth", "offsetX", "offsetY", "closeOnSelect", "useHostAsReference", "portalToBody"], outputs: ["openChange"] }, { kind: "component", type: OverflowMenuOptionComponent, selector: "v-overflow-menu-option", inputs: ["disabled", "type", "testId", "optionId"], outputs: ["selected"] }, { kind: "component", type: OverflowMenuTriggerComponent, selector: "v-overflow-menu-trigger", inputs: ["compact"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i2$1.Tag, selector: "cds-tag, ibm-tag", inputs: ["type", "size", "class", "skeleton"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "ngmodule", type: SpinnerModule }, { kind: "component", type: FormManagementUploadComponent, selector: "valtimo-form-management-upload", inputs: ["show$"], outputs: ["definitionUploaded"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i2$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }], encapsulation: i0.ViewEncapsulation.None }); }
1300
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: FormManagementEditComponent, isStandalone: true, selector: "valtimo-form-management-edit", outputs: { deleteEvent: "deleteEvent", goBackEvent: "goBackEvent", formModifiedEvent: "formModifiedEvent", formDeletedEvent: "formDeletedEvent", deleteErrorEvent: "deleteErrorEvent", deployErrorEvent: "deployErrorEvent" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<ng-container\n *ngIf=\"{\n formDefinition: formDefinition$ | async,\n jsonFormDefinition: jsonFormDefinition$ | async,\n jsonOutput: jsonOutput$ | async,\n compactMode: compactMode$ | async,\n context: context$ | async,\n canUpdateGlobalConfiguration: canUpdateGlobalConfiguration$ | async,\n isDraftVersion: isDraftVersion$ | async,\n } as obs\"\n>\n @if (obs.formDefinition) {\n <ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <ng-container *ngTemplateOutlet=\"actions; context: {obs: obs}\"></ng-container>\n </ng-template>\n </ng-container>\n\n <cds-tabs type=\"contained\">\n <cds-tab [heading]=\"TABS.BUILDER | translate\" (selected)=\"onSelectedTab(TABS.BUILDER)\">\n <valtimo-form-io-builder\n *ngIf=\"(reloading$ | async) === false && activeTab === TABS.BUILDER\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"formBuilderChanged($event, obs.jsonFormDefinition)\"\n ></valtimo-form-io-builder>\n </cds-tab>\n\n <cds-tab [heading]=\"TABS.EDITOR | translate\" (selected)=\"onSelectedTab(TABS.EDITOR)\">\n @if (activeTab === TABS.EDITOR && obs.jsonFormDefinition) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {\n disabled: obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration,\n formDefinition: obs.formDefinition,\n model: obs.jsonFormDefinition,\n },\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n\n <cds-tab\n [heading]=\"TABS.OUTPUT | translate\"\n (selected)=\"onSelectedTab(TABS.OUTPUT)\"\n class=\"valtimo-form-management-edit__output\"\n >\n <valtimo-form-io\n *ngIf=\"activeTab === TABS.OUTPUT\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"onOutputChange($event)\"\n ></valtimo-form-io>\n\n @if (activeTab === TABS.OUTPUT && obs.jsonOutput) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {disabled: true, formDefinition: obs.formDefinition, model: obs.jsonOutput},\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n </cds-tabs>\n } @else {\n <cds-loading></cds-loading>\n }\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"obs.formDefinition\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n ></valtimo-confirmation-modal>\n\n <valtimo-form-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"setFormDefinition($event)\"\n ></valtimo-form-management-upload>\n\n <ng-template #jsonEditor let-data=\"data\">\n <valtimo-editor\n [model]=\"data.model\"\n [disabled]=\"data.disabled\"\n (validEvent)=\"onValidEvent($event, data.disabled)\"\n (valueChangeEvent)=\"onValueChangeEvent($event, data.formDefinition, data.disabled)\"\n [fitPage]=\"true\"\n [fitPageSpaceAdjustment]=\"80\"\n ></valtimo-editor>\n </ng-template>\n</ng-container>\n\n<ng-template #actions let-obs=\"obs\">\n <div\n class=\"valtimo-form-management-edit__header-container\"\n [ngClass]=\"{\n '--compact': obs.compactMode,\n }\"\n >\n @if (obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion) {\n <cds-tag size=\"sm\" type=\"blue\">{{ 'formManagement.readOnly' | translate }}</cds-tag>\n }\n\n <div class=\"valtimo-form-management-edit__header\">\n <v-overflow-menu placement=\"bottom-end\">\n <v-overflow-menu-trigger overflowTrigger></v-overflow-menu-trigger>\n <v-overflow-menu-option (selected)=\"downloadFormDefinition(obs.formDefinition)\">\n {{ 'Download' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n (selected)=\"showUploadModal()\"\n >\n {{ 'Upload' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n *ngIf=\"(obs.context === 'case' && obs.isDraftVersion) || obs.context === 'independent'\"\n (selected)=\"showDuplicateModal(obs.formDefinition)\"\n >\n {{ 'formManagement.duplicate' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n type=\"danger\"\n (selected)=\"delete()\"\n >\n {{ 'interface.delete' | translate }}\n </v-overflow-menu-option>\n </v-overflow-menu>\n\n @if (obs.context === 'case') {\n <button\n cdsButton=\"secondary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"onGoBackButtonClick()\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"arrow--left\" size=\"16\"></svg>\n\n <span>{{ 'interface.back' | translate }}</span>\n </button>\n }\n\n <button\n *ngIf=\"obs?.canUpdateGlobalConfiguration || obs.context === 'independent'\"\n cdsButton=\"primary\"\n [disabled]=\"obs.formDefinition.readOnly || !obs.isDraftVersion\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"modifyFormDefinition(obs.formDefinition)\"\n [attr.data-test-id]=\"testIds.saveButton\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".valtimo-form-management-edit__header{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-left:auto}.valtimo-form-management-edit__case-header{display:flex;width:100%;justify-content:flex-end}.valtimo-form-management-edit__header-container{width:100%;display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:4px}.valtimo-form-management-edit__header-container .cds--tag{margin:0;height:var(--cds-layout-size-height-md)}.valtimo-form-management-edit__header-container.--compact{align-items:flex-start;padding-bottom:0}.valtimo-form-management-edit__output .cds--tab-content{display:grid;grid-template-columns:1fr 1fr}.valtimo-form-management-edit__output .cds--tab-content>*{min-width:100%!important}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy,.valtimo-form-management-edit .btn.formcomponent.gu-mirror{font-weight:400;background-color:silver;border-color:silver;color:#fff}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:hover,.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:hover,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{box-shadow:none}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{background-color:silver;border-color:silver}.valtimo-form-management-edit .formbuilder-header{padding-left:18px;padding-right:18px;font-size:18px;height:80px;border:1px solid #dee2e6;border-bottom:0}.valtimo-form-management-edit .formbuilder-header .formbuilder-title{margin-top:21px;margin-bottom:7px}.valtimo-form-management-edit .formbuilder-header .formbuilder-subtitle{margin-top:0;margin-bottom:12px}.valtimo-form-management-edit .formbuilder{background:#fff;padding:1rem;border:1px solid #dee2e6;margin-right:0!important;margin-left:0!important}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=false],.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=\"\"]{color:#a9a9a9}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.valtimo-form-management-edit .formbuilder .drag-and-drop-alert{display:none}.valtimo-form-management-edit .formbuilder .formarea{padding:10px;border:solid 1px silver;background-color:#fff}.valtimo-form-management-edit .increase-size{font-size:1rem}.valtimo-form-management-edit .cds--tab-content{background:#fff!important}\n/*!\n * Copyright 2015-2026 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: WidgetModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i2$1.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i2$1.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i3$1.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageSpaceAdjustment"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i3$1.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change", "event"] }, { kind: "component", type: i3$1.FormioBuilderComponent, selector: "valtimo-form-io-builder", inputs: ["form"], outputs: ["change"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "component", type: OverflowMenuComponent, selector: "v-overflow-menu", inputs: ["open", "placement", "menuWidth", "offsetX", "offsetY", "closeOnSelect", "useHostAsReference", "portalToBody"], outputs: ["openChange"] }, { kind: "component", type: OverflowMenuOptionComponent, selector: "v-overflow-menu-option", inputs: ["disabled", "type", "testId", "optionId"], outputs: ["selected"] }, { kind: "component", type: OverflowMenuTriggerComponent, selector: "v-overflow-menu-trigger", inputs: ["compact"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i2$1.Tag, selector: "cds-tag, ibm-tag", inputs: ["type", "size", "class", "skeleton"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "ngmodule", type: SpinnerModule }, { kind: "component", type: FormManagementUploadComponent, selector: "valtimo-form-management-upload", inputs: ["show$"], outputs: ["definitionUploaded"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i2$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }], encapsulation: i0.ViewEncapsulation.None }); }
1047
1301
  }
1048
1302
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementEditComponent, decorators: [{
1049
1303
  type: Component,
@@ -1057,7 +1311,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1057
1311
  FormsModule,
1058
1312
  WidgetModule,
1059
1313
  CarbonListModule,
1060
- ValtimoCdsModalDirective,
1061
1314
  TabsModule,
1062
1315
  EditorModule,
1063
1316
  FormIoModule,
@@ -1106,262 +1359,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1106
1359
  * limitations under the License.
1107
1360
  */
1108
1361
 
1109
- /*
1110
- * Copyright 2015-2025 Ritense BV, the Netherlands.
1111
- *
1112
- * Licensed under EUPL, Version 1.2 (the "License");
1113
- * you may not use this file except in compliance with the License.
1114
- * You may obtain a copy of the License at
1115
- *
1116
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1117
- *
1118
- * Unless required by applicable law or agreed to in writing, software
1119
- * distributed under the License is distributed on an "AS IS" basis,
1120
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1121
- * See the License for the specific language governing permissions and
1122
- * limitations under the License.
1123
- */
1124
- class FormManagementListComponent {
1125
- get _partialPagination() {
1126
- return this._partialPagination$.getValue();
1127
- }
1128
- constructor(formManagementService, iconService, route, environmentService, draftVersionService, notificationService, translateService, editPermissionsService) {
1129
- this.formManagementService = formManagementService;
1130
- this.iconService = iconService;
1131
- this.route = route;
1132
- this.environmentService = environmentService;
1133
- this.draftVersionService = draftVersionService;
1134
- this.notificationService = notificationService;
1135
- this.translateService = translateService;
1136
- this.editPermissionsService = editPermissionsService;
1137
- this.navigateToCreateEvent = new EventEmitter();
1138
- this.navigateToUploadEvent = new EventEmitter();
1139
- this.navigateToEditEvent = new EventEmitter();
1140
- this.ACTION_ITEMS = [
1141
- {
1142
- callback: this.editFormDefinition.bind(this),
1143
- label: 'interface.edit',
1144
- },
1145
- { callback: this.showDeleteModal.bind(this), label: 'interface.delete', type: 'danger' },
1146
- ];
1147
- this.showDeleteModal$ = new BehaviorSubject(false);
1148
- this.formDefinitionToDelete$ = new BehaviorSubject(null);
1149
- this.loading$ = new BehaviorSubject(true);
1150
- this.searchTerm$ = new BehaviorSubject('');
1151
- this.testIds = FORM_MANAGEMENT_LIST_TEST_IDS;
1152
- this.context$ = getContextObservable(this.route);
1153
- this.caseManagementRouteParams$ = this.context$.pipe(filter$1(context => context === 'case'), switchMap$1(() => getCaseManagementRouteParams(this.route)));
1154
- this.hasEditPermissions$ = combineLatest([
1155
- getCaseManagementRouteParams(this.route),
1156
- this.context$,
1157
- ]).pipe(switchMap$1(([params, context]) => this.editPermissionsService.hasPermissionsToEditBasedOnContext(params, context)));
1158
- this._collectionSize$ = new BehaviorSubject(0);
1159
- this._partialPagination$ = new BehaviorSubject({
1160
- page: 1,
1161
- size: 10,
1162
- });
1163
- this.pagination$ = combineLatest([
1164
- this._collectionSize$,
1165
- this._partialPagination$,
1166
- ]).pipe(map$1(([collectionSize, partialPagination]) => ({ ...partialPagination, collectionSize })));
1167
- this.formDefinitions$ = combineLatest([
1168
- this.context$,
1169
- this.caseManagementRouteParams$.pipe(startWith(null)),
1170
- this._partialPagination$,
1171
- this.searchTerm$,
1172
- ]).pipe(filter$1(([context, params]) => context === 'case' ? !!(params?.caseDefinitionVersionTag && params?.caseDefinitionKey) : true), switchMap$1(([context, routeParams, pagination, searchTerm]) => {
1173
- const params = {
1174
- ...pagination,
1175
- page: (pagination?.page ?? 1) - 1,
1176
- ...(searchTerm && { searchTerm }),
1177
- };
1178
- switch (context) {
1179
- case 'case':
1180
- return this.formManagementService.queryFormDefinitionsCase(routeParams?.caseDefinitionKey ?? '', routeParams?.caseDefinitionVersionTag ?? '', params);
1181
- default:
1182
- case 'independent':
1183
- return this.formManagementService.queryFormDefinitions(params);
1184
- }
1185
- }), map$1((res) => {
1186
- this._collectionSize$.next(res?.totalElements);
1187
- return res?.content
1188
- ? [...res.content].sort((firstForm, secondForm) => (firstForm.name ?? '').localeCompare(secondForm.name ?? ''))
1189
- : [];
1190
- }), tap(() => this.loading$.next(false)));
1191
- this.FIELDS = [
1192
- { key: 'name', label: 'Form name' },
1193
- { key: 'readOnly', label: 'Read-only', viewType: ViewType.BOOLEAN },
1194
- ];
1195
- this.iconService.registerAll([Upload16]);
1196
- }
1197
- navigateToCreateRoute() {
1198
- this.navigateToCreateEvent.emit();
1199
- }
1200
- navigateToUploadRoute() {
1201
- this.navigateToUploadEvent.emit();
1202
- }
1203
- paginationClicked(page) {
1204
- this.updatePagination({ page });
1205
- }
1206
- paginationSet(size) {
1207
- this.updatePagination({ size, page: 1 });
1208
- }
1209
- editFormDefinition(formDefinition) {
1210
- this.navigateToEditEvent.emit(formDefinition.id);
1211
- }
1212
- searchTermEntered(searchTerm) {
1213
- this.searchTerm$.next(searchTerm);
1214
- }
1215
- showDeleteModal(definition) {
1216
- this.formDefinitionToDelete$.next(definition);
1217
- this.showDeleteModal$.next(true);
1218
- }
1219
- deleteFormDefinition(definition) {
1220
- getCaseManagementRouteParamsAndContext(this.route)
1221
- .pipe(take$1(1), switchMap$1(([context, caseManagementRouteParams]) => {
1222
- switch (context) {
1223
- case 'case':
1224
- return this.formManagementService.deleteFormDefinitionCase(caseManagementRouteParams?.caseDefinitionKey, caseManagementRouteParams?.caseDefinitionVersionTag, definition.id);
1225
- case 'independent':
1226
- default:
1227
- return this.formManagementService.deleteFormDefinition(definition.id);
1228
- }
1229
- }))
1230
- .subscribe({
1231
- next: () => {
1232
- this.notificationService.showToast({
1233
- type: 'success',
1234
- title: this.translateService.instant('formManagement.notifications.deleted'),
1235
- });
1236
- this._partialPagination$.next({ ...this._partialPagination });
1237
- },
1238
- error: () => {
1239
- this.notificationService.showToast({
1240
- type: 'error',
1241
- title: this.translateService.instant('formManagement.notifications.deletionError'),
1242
- });
1243
- },
1244
- });
1245
- }
1246
- updatePagination(update) {
1247
- this._partialPagination$.next({ ...this._partialPagination, ...update });
1248
- }
1249
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementListComponent, deps: [{ token: FormManagementService }, { token: i2$1.IconService }, { token: i3.ActivatedRoute }, { token: i4.EnvironmentService }, { token: i4.DraftVersionService }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }, { token: i4.EditPermissionsService }], target: i0.ɵɵFactoryTarget.Component }); }
1250
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementListComponent, isStandalone: true, selector: "valtimo-form-management-list", outputs: { navigateToCreateEvent: "navigateToCreateEvent", navigateToUploadEvent: "navigateToUploadEvent", navigateToEditEvent: "navigateToEditEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<valtimo-carbon-list\n *ngIf=\"{\n formDefinitions: formDefinitions$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n context: context$ | async,\n hasEditPermissions: hasEditPermissions$ | async,\n } as obs\"\n [showActionItems]=\"obs.hasEditPermissions\"\n [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [isSearchable]=\"true\"\n [items]=\"obs?.formDefinitions || []\"\n [pagination]=\"obs.pagination\"\n [loading]=\"obs.loading\"\n paginationIdentifier=\"formManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"editFormDefinition($event)\"\n (search)=\"searchTermEntered($event)\"\n>\n <ng-container *ngIf=\"obs.hasEditPermissions\" carbonToolbarContent>\n <button cdsButton=\"ghost\" [iconOnly]=\"true\" (click)=\"navigateToUploadRoute()\">\n <svg cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n\n <ng-container [ngTemplateOutlet]=\"createFormButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"createFormButton\"\n [description]=\"'formManagement.noResults.' + obs.context + 'Description' | translate\"\n [title]=\"'formManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"formDefinitionToDelete$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #createFormButton>\n <button\n *ngIf=\"hasEditPermissions$ | async\"\n cdsButton=\"primary\"\n (click)=\"navigateToCreateRoute()\"\n [attr.data-test-id]=\"testIds.createFormButton\"\n >\n {{ 'Create Form' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2025 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "skeletonRowCount", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i3$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }] }); }
1251
- }
1252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementListComponent, decorators: [{
1253
- type: Component,
1254
- args: [{ selector: 'valtimo-form-management-list', standalone: true, imports: [
1255
- CommonModule,
1256
- FormsModule,
1257
- ReactiveFormsModule,
1258
- TranslateModule,
1259
- CarbonListModule,
1260
- IconModule,
1261
- ButtonModule,
1262
- ConfirmationModalModule,
1263
- ], template: "<!--\n ~ Copyright 2015-2025 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<valtimo-carbon-list\n *ngIf=\"{\n formDefinitions: formDefinitions$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n context: context$ | async,\n hasEditPermissions: hasEditPermissions$ | async,\n } as obs\"\n [showActionItems]=\"obs.hasEditPermissions\"\n [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [isSearchable]=\"true\"\n [items]=\"obs?.formDefinitions || []\"\n [pagination]=\"obs.pagination\"\n [loading]=\"obs.loading\"\n paginationIdentifier=\"formManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"editFormDefinition($event)\"\n (search)=\"searchTermEntered($event)\"\n>\n <ng-container *ngIf=\"obs.hasEditPermissions\" carbonToolbarContent>\n <button cdsButton=\"ghost\" [iconOnly]=\"true\" (click)=\"navigateToUploadRoute()\">\n <svg cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n\n <ng-container [ngTemplateOutlet]=\"createFormButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"createFormButton\"\n [description]=\"'formManagement.noResults.' + obs.context + 'Description' | translate\"\n [title]=\"'formManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"formDefinitionToDelete$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #createFormButton>\n <button\n *ngIf=\"hasEditPermissions$ | async\"\n cdsButton=\"primary\"\n (click)=\"navigateToCreateRoute()\"\n [attr.data-test-id]=\"testIds.createFormButton\"\n >\n {{ 'Create Form' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2025 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"] }]
1264
- }], ctorParameters: () => [{ type: FormManagementService }, { type: i2$1.IconService }, { type: i3.ActivatedRoute }, { type: i4.EnvironmentService }, { type: i4.DraftVersionService }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }, { type: i4.EditPermissionsService }], propDecorators: { navigateToCreateEvent: [{
1265
- type: Output
1266
- }], navigateToUploadEvent: [{
1267
- type: Output
1268
- }], navigateToEditEvent: [{
1269
- type: Output
1270
- }] } });
1271
-
1272
- /*
1273
- * Copyright 2015-2025 Ritense BV, the Netherlands.
1274
- *
1275
- * Licensed under EUPL, Version 1.2 (the "License");
1276
- * you may not use this file except in compliance with the License.
1277
- * You may obtain a copy of the License at
1278
- *
1279
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1280
- *
1281
- * Unless required by applicable law or agreed to in writing, software
1282
- * distributed under the License is distributed on an "AS IS" basis,
1283
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1284
- * See the License for the specific language governing permissions and
1285
- * limitations under the License.
1286
- */
1287
-
1288
- /*
1289
- * Copyright 2015-2025 Ritense BV, the Netherlands.
1290
- *
1291
- * Licensed under EUPL, Version 1.2 (the "License");
1292
- * you may not use this file except in compliance with the License.
1293
- * You may obtain a copy of the License at
1294
- *
1295
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1296
- *
1297
- * Unless required by applicable law or agreed to in writing, software
1298
- * distributed under the License is distributed on an "AS IS" basis,
1299
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1300
- * See the License for the specific language governing permissions and
1301
- * limitations under the License.
1302
- */
1303
- class FormManagementComponent {
1304
- constructor(route, router, notificationService, translateService) {
1305
- this.route = route;
1306
- this.router = router;
1307
- this.notificationService = notificationService;
1308
- this.translateService = translateService;
1309
- this.create$ = new BehaviorSubject(false);
1310
- this.upload$ = new BehaviorSubject(false);
1311
- }
1312
- onNavigateToCreateEvent() {
1313
- this.create$.next(true);
1314
- }
1315
- onGoBackFromCreateEvent() {
1316
- this.create$.next(false);
1317
- this.upload$.next(false);
1318
- }
1319
- onFormDefinitionEditEvent(formDefinitionId, upload = false) {
1320
- this.router.navigate([formDefinitionId], {
1321
- relativeTo: this.route,
1322
- queryParams: { ...(upload && { upload: true }) },
1323
- });
1324
- }
1325
- onFormDefinitionCreateEvent(formDefinitionId) {
1326
- this.resetNotifications();
1327
- this.notificationService.showToast({
1328
- type: 'success',
1329
- title: this.translateService.instant('formManagement.notifications.created'),
1330
- });
1331
- this.onFormDefinitionEditEvent(formDefinitionId);
1332
- }
1333
- onFormDefinitionUploadEvent(formDefinitionId) {
1334
- this.resetNotifications();
1335
- this.notificationService.showToast({
1336
- type: 'success',
1337
- title: this.translateService.instant('formManagement.notifications.created'),
1338
- });
1339
- this.onFormDefinitionEditEvent(formDefinitionId, true);
1340
- }
1341
- onNavigateToUploadEvent() {
1342
- this.create$.next(true);
1343
- this.upload$.next(true);
1344
- }
1345
- resetNotifications() {
1346
- this.notificationService
1347
- ?.getNotificationRefs()
1348
- .forEach(ref => this.notificationService.close(ref));
1349
- }
1350
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementComponent, deps: [{ token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1351
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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\n *ngIf=\"{\n create: create$ | async,\n upload: upload$ | async,\n } as obs\"\n>\n <valtimo-form-management-list\n (navigateToCreateEvent)=\"onNavigateToCreateEvent()\"\n (navigateToUploadEvent)=\"onNavigateToUploadEvent()\"\n (navigateToEditEvent)=\"onFormDefinitionEditEvent($event)\"\n ></valtimo-form-management-list>\n\n <valtimo-form-management-create\n *ngIf=\"obs.create\"\n [upload]=\"obs.upload\"\n (goBackEvent)=\"onGoBackFromCreateEvent()\"\n (afterCreateEvent)=\"onFormDefinitionCreateEvent($event)\"\n (afterUploadEvent)=\"onFormDefinitionUploadEvent($event)\"\n ></valtimo-form-management-create>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: FormManagementListComponent, selector: "valtimo-form-management-list", outputs: ["navigateToCreateEvent", "navigateToUploadEvent", "navigateToEditEvent"] }, { kind: "component", type: FormManagementCreateComponent, selector: "valtimo-form-management-create", inputs: ["upload"], outputs: ["goBackEvent", "afterCreateEvent", "afterUploadEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1352
- }
1353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementComponent, decorators: [{
1354
- type: Component,
1355
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
1356
- CommonModule,
1357
- ButtonModule,
1358
- FormManagementListComponent,
1359
- FormManagementCreateComponent,
1360
- FormManagementEditComponent,
1361
- RouterOutlet,
1362
- ], template: "<!--\n ~ Copyright 2015-2025 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\n *ngIf=\"{\n create: create$ | async,\n upload: upload$ | async,\n } as obs\"\n>\n <valtimo-form-management-list\n (navigateToCreateEvent)=\"onNavigateToCreateEvent()\"\n (navigateToUploadEvent)=\"onNavigateToUploadEvent()\"\n (navigateToEditEvent)=\"onFormDefinitionEditEvent($event)\"\n ></valtimo-form-management-list>\n\n <valtimo-form-management-create\n *ngIf=\"obs.create\"\n [upload]=\"obs.upload\"\n (goBackEvent)=\"onGoBackFromCreateEvent()\"\n (afterCreateEvent)=\"onFormDefinitionCreateEvent($event)\"\n (afterUploadEvent)=\"onFormDefinitionUploadEvent($event)\"\n ></valtimo-form-management-create>\n</ng-container>\n" }]
1363
- }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }] });
1364
-
1365
1362
  /*
1366
1363
  * Copyright 2015-2025 Ritense BV, the Netherlands.
1367
1364
  *