@kms-ngx-ui/presentational 20.1.3 → 20.1.5

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.
@@ -14,7 +14,7 @@ import * as i1$1 from '@angular/platform-browser';
14
14
  import * as i1$6 from '@angular-slider/ngx-slider';
15
15
  import { NgxSliderModule } from '@angular-slider/ngx-slider';
16
16
  export { ChangeContext as KmsSliderChange, Options as KmsSliderOptions } from '@angular-slider/ngx-slider';
17
- import * as i1$8 from '@angular/cdk/drag-drop';
17
+ import * as i1$9 from '@angular/cdk/drag-drop';
18
18
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
19
19
  import * as i1$4 from '@angular/google-maps';
20
20
  import { GoogleMapsModule } from '@angular/google-maps';
@@ -22,7 +22,7 @@ import * as i5$1 from '@angular/material/autocomplete';
22
22
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
23
23
  import * as i2$2 from '@angular/material/button';
24
24
  import { MatButtonModule } from '@angular/material/button';
25
- import * as i4$2 from '@angular/material/card';
25
+ import * as i4$1 from '@angular/material/card';
26
26
  import { MatCardModule } from '@angular/material/card';
27
27
  import { MatNativeDateModule } from '@angular/material/core';
28
28
  import * as i4 from '@angular/material/datepicker';
@@ -46,7 +46,7 @@ import { MatSelectModule } from '@angular/material/select';
46
46
  import * as i5 from 'ngx-mat-select-search';
47
47
  import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
48
48
  import { MatTooltipModule } from '@angular/material/tooltip';
49
- import * as i4$1 from '@ngx-translate/core';
49
+ import * as i1$8 from '@ngx-translate/core';
50
50
  import { TranslateModule } from '@ngx-translate/core';
51
51
  import { autoUpdate, computePosition, shift, offset, arrow, flip } from '@floating-ui/dom';
52
52
  import { Subject, takeUntil as takeUntil$1, isObservable, merge } from 'rxjs';
@@ -2250,7 +2250,7 @@ class EnumRadiogroupComponent extends FormControlParentComponent {
2250
2250
  useExisting: forwardRef(() => EnumRadiogroupComponent),
2251
2251
  multi: true,
2252
2252
  },
2253
- ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div>{{ header }}</div>\n <mat-radio-group formControlName=\"enumData\" [disabled]=\"disabled\" #child>\n @for (choice of optionValues; track choice) {\n <mat-radio-button\n [value]=\"choice\"\n [checked]=\"value === choice\"\n >{{ translationPrefix + '.' + choice | translate }}</mat-radio-button\n >\n }\n </mat-radio-group>\n </form>\n", dependencies: [{ kind: "directive", type: i1$5.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$5.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
2253
+ ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div>{{ header }}</div>\n <mat-radio-group formControlName=\"enumData\" [disabled]=\"disabled\" #child>\n @for (choice of optionValues; track choice) {\n <mat-radio-button\n [value]=\"choice\"\n [checked]=\"value === choice\"\n >{{ translationPrefix + '.' + choice | translate }}</mat-radio-button\n >\n }\n </mat-radio-group>\n </form>\n", dependencies: [{ kind: "directive", type: i1$5.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$5.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "pipe", type: i1$8.TranslatePipe, name: "translate" }] }); }
2254
2254
  }
2255
2255
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EnumRadiogroupComponent, decorators: [{
2256
2256
  type: Component,
@@ -2465,7 +2465,7 @@ class FileInputComponent {
2465
2465
  useExisting: forwardRef(() => FileInputComponent),
2466
2466
  multi: true,
2467
2467
  },
2468
- ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (change)=\"newImageLoading = true\" class=\"fileInput\">\n @if (form.value.Filename && previewImage) {\n <div>\n @if (newImageLoading) {\n <div>\n {{ 'file-input.loading' | translate }}\n </div>\n }\n @if (!newImageLoading) {\n <div>\n <div class=\"\">\n <div class=\"\">\n @if (\n form.value.ImageLink &&\n form.value.ImageLink !== '' &&\n !(form.value.ImageAsDataURL && form.value.ImageAsDataURL !== '')\n ) {\n <img\n [src]=\"form.value.ImageAsDataURL\"\n [src]=\"form.value.ImageLink\"\n style=\"height: 40px; width: fit-content\"\n />\n }\n @if (\n form.value.ImageAsDataURL && form.value.ImageAsDataURL !== ''\n ) {\n <img\n [src]=\"form.value.ImageAsDataURL\"\n style=\"height: 40px; width: fit-content\"\n />\n }\n </div>\n <div class=\"\">{{ form.value.Filename }}</div>\n <div class=\"\">\n @if (allowRemove) {\n <div (click)=\"removeFromList()\">\n <kms-icon\n icon=\"trash\"\n [size]=\"IconSizePx.XS\"\n iconClass=\"color-black\"\n ></kms-icon>\n {{ 'file-input.remove' }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!previewImage) {\n <div>\n <div class=\"\">{{ form.value.Filename }}</div>\n </div>\n }\n\n <button\n (click)=\"selectImageOverlay()\"\n class=\"button-primary-font-color\"\n mat-stroked-button\n >\n <span>{{ label }}</span>\n </button>\n <input\n type=\"file\"\n [accept]=\"acceptedFileMimetypes\"\n style=\"display: none\"\n #fileInput\n (click)=\"clearInputValue($event)\"\n (change)=\"selectImage($event)\"\n />\n\n <input type=\"hidden\" formControlName=\"ImageIdent\" />\n <input type=\"hidden\" formControlName=\"ImageLink\" />\n <input type=\"hidden\" formControlName=\"Filename\" />\n <input type=\"hidden\" formControlName=\"ImageAsDataURL\" />\n <input type=\"hidden\" formControlName=\"Text\" />\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
2468
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (change)=\"newImageLoading = true\" class=\"fileInput\">\n @if (form.value.Filename && previewImage) {\n <div>\n @if (newImageLoading) {\n <div>\n {{ 'file-input.loading' | translate }}\n </div>\n }\n @if (!newImageLoading) {\n <div>\n <div class=\"\">\n <div class=\"\">\n @if (\n form.value.ImageLink &&\n form.value.ImageLink !== '' &&\n !(form.value.ImageAsDataURL && form.value.ImageAsDataURL !== '')\n ) {\n <img\n [src]=\"form.value.ImageAsDataURL\"\n [src]=\"form.value.ImageLink\"\n style=\"height: 40px; width: fit-content\"\n />\n }\n @if (\n form.value.ImageAsDataURL && form.value.ImageAsDataURL !== ''\n ) {\n <img\n [src]=\"form.value.ImageAsDataURL\"\n style=\"height: 40px; width: fit-content\"\n />\n }\n </div>\n <div class=\"\">{{ form.value.Filename }}</div>\n <div class=\"\">\n @if (allowRemove) {\n <div (click)=\"removeFromList()\">\n <kms-icon\n icon=\"trash\"\n [size]=\"IconSizePx.XS\"\n iconClass=\"color-black\"\n ></kms-icon>\n {{ 'file-input.remove' }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!previewImage) {\n <div>\n <div class=\"\">{{ form.value.Filename }}</div>\n </div>\n }\n\n <button\n (click)=\"selectImageOverlay()\"\n class=\"button-primary-font-color\"\n mat-stroked-button\n >\n <span>{{ label }}</span>\n </button>\n <input\n type=\"file\"\n [accept]=\"acceptedFileMimetypes\"\n style=\"display: none\"\n #fileInput\n (click)=\"clearInputValue($event)\"\n (change)=\"selectImage($event)\"\n />\n\n <input type=\"hidden\" formControlName=\"ImageIdent\" />\n <input type=\"hidden\" formControlName=\"ImageLink\" />\n <input type=\"hidden\" formControlName=\"Filename\" />\n <input type=\"hidden\" formControlName=\"ImageAsDataURL\" />\n <input type=\"hidden\" formControlName=\"Text\" />\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }, { kind: "pipe", type: i1$8.TranslatePipe, name: "translate" }] }); }
2469
2469
  }
2470
2470
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FileInputComponent, decorators: [{
2471
2471
  type: Component,
@@ -2679,7 +2679,7 @@ class ImageSliderComponent {
2679
2679
  }
2680
2680
  }
2681
2681
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageSliderComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2682
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ImageSliderComponent, isStandalone: false, selector: "kms-image-slider", inputs: { slides: "slides", editMode: "editMode", imagesToSave: "imagesToSave" }, outputs: { deleteImageEvent: "deleteImageEvent", orderChanged: "orderChanged" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"image-slider-container\">\n <swiper-container\n class=\"swiper-main-view-container\"\n thumbs-swiper=\".swiper-carousel-container\"\n >\n @for (slide of slides; track slide) {\n <swiper-slide>\n <img [src]=\"slide\" loading=\"lazy\" />\n </swiper-slide>\n }\n </swiper-container>\n\n <swiper-container\n class=\"swiper-carousel-container\"\n thumbsSlider=\"\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"onOrderChanged($event)\"\n >\n @for (slide of slides; track slide; let index = $index) {\n <swiper-slide\n [class.swiper-slide-default]=\"index === 0 && editMode\"\n >\n @if (editMode) {\n <div>\n <button cdkDrag class=\"drag-button\" mat-menu-item></button>\n <button\n class=\"delete-button\"\n mat-menu-item\n (click)=\"deleteImage(index)\"\n >\n <kms-icon icon=\"trash\" [size]=\"15\"></kms-icon>\n </button>\n </div>\n }\n <img [src]=\"slide\" loading=\"lazy\" />\n @if (index === 0 && editMode) {\n <div class=\"swiper-slide-default-text\">\n {{ 'common.defaultImage' | translate }}\n </div>\n }\n </swiper-slide>\n }\n </swiper-container>\n</div>\n", dependencies: [{ kind: "directive", type: i1$8.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$8.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i2$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
2682
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ImageSliderComponent, isStandalone: false, selector: "kms-image-slider", inputs: { slides: "slides", editMode: "editMode", imagesToSave: "imagesToSave" }, outputs: { deleteImageEvent: "deleteImageEvent", orderChanged: "orderChanged" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"image-slider-container\">\n <swiper-container\n class=\"swiper-main-view-container\"\n thumbs-swiper=\".swiper-carousel-container\"\n >\n @for (slide of slides; track slide) {\n <swiper-slide>\n <img [src]=\"slide\" loading=\"lazy\" />\n </swiper-slide>\n }\n </swiper-container>\n\n <swiper-container\n class=\"swiper-carousel-container\"\n thumbsSlider=\"\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"onOrderChanged($event)\"\n >\n @for (slide of slides; track slide; let index = $index) {\n <swiper-slide\n [class.swiper-slide-default]=\"index === 0 && editMode\"\n >\n @if (editMode) {\n <div>\n <button cdkDrag class=\"drag-button\" mat-menu-item></button>\n <button\n class=\"delete-button\"\n mat-menu-item\n (click)=\"deleteImage(index)\"\n >\n <kms-icon icon=\"trash\" [size]=\"15\"></kms-icon>\n </button>\n </div>\n }\n <img [src]=\"slide\" loading=\"lazy\" />\n @if (index === 0 && editMode) {\n <div class=\"swiper-slide-default-text\">\n {{ 'common.defaultImage' | translate }}\n </div>\n }\n </swiper-slide>\n }\n </swiper-container>\n</div>\n", dependencies: [{ kind: "directive", type: i1$9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i2$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }, { kind: "pipe", type: i1$8.TranslatePipe, name: "translate" }] }); }
2683
2683
  }
2684
2684
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageSliderComponent, decorators: [{
2685
2685
  type: Component,
@@ -2922,7 +2922,7 @@ class PasswordComponent {
2922
2922
  useExisting: forwardRef(() => PasswordComponent),
2923
2923
  multi: true,
2924
2924
  },
2925
- ], ngImport: i0, template: "<mat-form-field class=\"kms-password__form-field\">\n <mat-label>{{ label() }}</mat-label>\n <input\n [type]=\"showPassword() ? 'text' : 'password'\"\n matInput\n (input)=\"valueChanged($event)\"\n [disabled]=\"disabled()\"\n (keypress)=\"keypress($event)\"\n #password=\"matInput\"\n />\n @if (showPassword()) {\n <kms-icon\n class=\"kms-time-input__suffix\"\n matSuffix\n icon=\"ic_eye\"\n [size]=\"IconSizePx.XS\"\n (click)=\"showPassword.set(false)\"\n (mousedown)=\"eyeIconIsBeingPressed.set(true)\"\n (mouseup)=\"eyeIconIsBeingPressed.set(false)\"\n ></kms-icon>\n } @else {\n <kms-icon\n class=\"kms-time-input__suffix\"\n matSuffix\n icon=\"ic_eye_active\"\n [size]=\"IconSizePx.XS\"\n (click)=\"showPassword.set(true)\"\n (mousedown)=\"eyeIconIsBeingPressed.set(true)\"\n (mouseup)=\"eyeIconIsBeingPressed.set(false)\"\n ></kms-icon>\n }\n</mat-form-field>\n\n@if ((eyeIconIsBeingPressed() || password.focused) && withStrength()) {\n<mat-card appearance=\"outlined\">\n <mat-card-content class=\"kms-password__card\">\n <mat-list role=\"list\">\n @for (validation of validations(); track validation) {\n <mat-list-item role=\"listitem\">\n <div class=\"kms-password__strength-item\">\n @if(validation.isValid()) {\n <kms-icon\n [size]=\"IconSizePx.XS\"\n icon=\"ic_check\"\n iconClass=\"color-success\"\n ></kms-icon>\n }@else {\n <kms-icon\n [size]=\"IconSizePx.XS\"\n icon=\"ic_abbrechen\"\n iconClass=\"color-warn\"\n ></kms-icon>\n } {{ validation.text() }}\n </div></mat-list-item\n >\n }\n </mat-list>\n </mat-card-content>\n</mat-card>\n}\n", dependencies: [{ kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3$4.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3$4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: i4$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }] }); }
2925
+ ], ngImport: i0, template: "<mat-form-field class=\"kms-password__form-field\">\n <mat-label>{{ label() }}</mat-label>\n <input\n [type]=\"showPassword() ? 'text' : 'password'\"\n matInput\n (input)=\"valueChanged($event)\"\n [disabled]=\"disabled()\"\n (keypress)=\"keypress($event)\"\n #password=\"matInput\"\n />\n @if (showPassword()) {\n <kms-icon\n class=\"kms-time-input__suffix\"\n matSuffix\n icon=\"ic_eye\"\n [size]=\"IconSizePx.XS\"\n (click)=\"showPassword.set(false)\"\n (mousedown)=\"eyeIconIsBeingPressed.set(true)\"\n (mouseup)=\"eyeIconIsBeingPressed.set(false)\"\n ></kms-icon>\n } @else {\n <kms-icon\n class=\"kms-time-input__suffix\"\n matSuffix\n icon=\"ic_eye_active\"\n [size]=\"IconSizePx.XS\"\n (click)=\"showPassword.set(true)\"\n (mousedown)=\"eyeIconIsBeingPressed.set(true)\"\n (mouseup)=\"eyeIconIsBeingPressed.set(false)\"\n ></kms-icon>\n }\n</mat-form-field>\n\n@if ((eyeIconIsBeingPressed() || password.focused) && withStrength()) {\n<mat-card appearance=\"outlined\">\n <mat-card-content class=\"kms-password__card\">\n <mat-list role=\"list\">\n @for (validation of validations(); track validation) {\n <mat-list-item role=\"listitem\">\n <div class=\"kms-password__strength-item\">\n @if(validation.isValid()) {\n <kms-icon\n [size]=\"IconSizePx.XS\"\n icon=\"ic_check\"\n iconClass=\"color-success\"\n ></kms-icon>\n }@else {\n <kms-icon\n [size]=\"IconSizePx.XS\"\n icon=\"ic_abbrechen\"\n iconClass=\"color-warn\"\n ></kms-icon>\n } {{ validation.text() }}\n </div></mat-list-item\n >\n }\n </mat-list>\n </mat-card-content>\n</mat-card>\n}\n", dependencies: [{ kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3$4.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3$4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }] }); }
2926
2926
  }
2927
2927
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PasswordComponent, decorators: [{
2928
2928
  type: Component,
@@ -3041,7 +3041,7 @@ class SalutationDropdownComponent extends FormControlParentComponent {
3041
3041
  useExisting: forwardRef(() => SalutationDropdownComponent),
3042
3042
  multi: true,
3043
3043
  },
3044
- ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" class=\"row\">\n <mat-form-field class=\"col\">\n <mat-select\n disableOptionCentering\n formControlName=\"salut\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n #child\n >\n <mat-option [value]=\"SalutationEnum.NOT_SPECIFIED\">{{\n 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase()\n | translate\n }}</mat-option>\n <mat-option [value]=\"SalutationEnum.MALE\">{{\n 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase()\n | translate\n }}</mat-option>\n <mat-option [value]=\"SalutationEnum.FEMALE\">{{\n 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase()\n | translate\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
3044
+ ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" class=\"row\">\n <mat-form-field class=\"col\">\n <mat-select\n disableOptionCentering\n formControlName=\"salut\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n #child\n >\n <mat-option [value]=\"SalutationEnum.NOT_SPECIFIED\">{{\n 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase()\n | translate\n }}</mat-option>\n <mat-option [value]=\"SalutationEnum.MALE\">{{\n 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase()\n | translate\n }}</mat-option>\n <mat-option [value]=\"SalutationEnum.FEMALE\">{{\n 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase()\n | translate\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: i1$8.TranslatePipe, name: "translate" }] }); }
3045
3045
  }
3046
3046
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SalutationDropdownComponent, decorators: [{
3047
3047
  type: Component,
@@ -3131,7 +3131,7 @@ class SalutationRadiogroupComponent extends FormControlParentComponent {
3131
3131
  useExisting: forwardRef(() => SalutationRadiogroupComponent),
3132
3132
  multi: true,
3133
3133
  },
3134
- ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-radio-group formControlName=\"salut\" [disabled]=\"disabled\" #radioGroup>\n <mat-radio-button\n color=\"primary\"\n [value]=\"SalutationEnum.NOT_SPECIFIED\"\n [checked]=\"value === SalutationEnum.NOT_SPECIFIED\"\n >\n {{\n 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase()\n | translate\n }}\n </mat-radio-button>\n <mat-radio-button\n color=\"primary\"\n [value]=\"SalutationEnum.MALE\"\n [checked]=\"value === SalutationEnum.MALE\"\n >\n {{\n 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase()\n | translate\n }}\n </mat-radio-button>\n <mat-radio-button\n color=\"primary\"\n [value]=\"SalutationEnum.FEMALE\"\n [checked]=\"value === SalutationEnum.FEMALE\"\n >\n {{\n 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase()\n | translate\n }}\n </mat-radio-button>\n </mat-radio-group>\n</form>\n", dependencies: [{ kind: "directive", type: i1$5.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$5.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
3134
+ ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-radio-group formControlName=\"salut\" [disabled]=\"disabled\" #radioGroup>\n <mat-radio-button\n color=\"primary\"\n [value]=\"SalutationEnum.NOT_SPECIFIED\"\n [checked]=\"value === SalutationEnum.NOT_SPECIFIED\"\n >\n {{\n 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase()\n | translate\n }}\n </mat-radio-button>\n <mat-radio-button\n color=\"primary\"\n [value]=\"SalutationEnum.MALE\"\n [checked]=\"value === SalutationEnum.MALE\"\n >\n {{\n 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase()\n | translate\n }}\n </mat-radio-button>\n <mat-radio-button\n color=\"primary\"\n [value]=\"SalutationEnum.FEMALE\"\n [checked]=\"value === SalutationEnum.FEMALE\"\n >\n {{\n 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase()\n | translate\n }}\n </mat-radio-button>\n </mat-radio-group>\n</form>\n", dependencies: [{ kind: "directive", type: i1$5.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$5.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "pipe", type: i1$8.TranslatePipe, name: "translate" }] }); }
3135
3135
  }
3136
3136
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SalutationRadiogroupComponent, decorators: [{
3137
3137
  type: Component,
@@ -3449,6 +3449,7 @@ class GenericFormService {
3449
3449
  this.translate = translate;
3450
3450
  this.fieldConfigs = new Map(); // key → FieldConfig
3451
3451
  this.asyncValidatorMap = new Map(); // key → async validators
3452
+ this.validatorMap = new Map(); // key → sync validators with error messages
3452
3453
  this.destroy$ = new Subject();
3453
3454
  this._submitted = false;
3454
3455
  }
@@ -3458,6 +3459,7 @@ class GenericFormService {
3458
3459
  this.config = config;
3459
3460
  this.fieldConfigs.clear();
3460
3461
  this.asyncValidatorMap.clear();
3462
+ this.validatorMap.clear();
3461
3463
  this._submitted = false;
3462
3464
  const controls = {};
3463
3465
  for (const section of config.sections) {
@@ -3468,32 +3470,60 @@ class GenericFormService {
3468
3470
  this.form = new FormGroup(controls);
3469
3471
  return this.form;
3470
3472
  }
3473
+ isValidatorConfig(v) {
3474
+ return typeof v === 'object' && 'validator' in v;
3475
+ }
3471
3476
  buildFieldControl(field, controls) {
3472
3477
  if (field.type === FieldType.OFFSET || !field.key)
3473
3478
  return;
3474
3479
  this.fieldConfigs.set(field.key, field);
3475
- const asyncFns = (field.asyncValidators ?? []).map((a) => a.validator);
3476
- if (field.asyncValidators?.length) {
3477
- this.asyncValidatorMap.set(field.key, field.asyncValidators);
3478
- }
3480
+ const syncFns = this.registerSyncValidators(field);
3481
+ const asyncFns = this.registerAsyncValidators(field);
3479
3482
  const initial = this.resolveInitialValue(field.type);
3480
3483
  const control = new FormControl(initial, {
3481
- validators: field.validators ?? [],
3484
+ validators: syncFns.length ? syncFns : undefined,
3482
3485
  asyncValidators: asyncFns.length ? asyncFns : undefined,
3483
3486
  });
3484
3487
  if (field.hidden || field.disabled) {
3485
3488
  control.disable();
3486
3489
  }
3487
3490
  controls[field.key] = control;
3488
- if (field.type === FieldType.DATE_RANGE && field.options) {
3489
- const opts = field.options;
3490
- if (opts.startKey && !controls[opts.startKey]) {
3491
- controls[opts.startKey] = new FormControl(null);
3491
+ this.buildDateRangeSubControls(field, controls);
3492
+ }
3493
+ registerSyncValidators(field) {
3494
+ const syncFns = [];
3495
+ const syncConfigs = [];
3496
+ for (const v of field.validators ?? []) {
3497
+ if (this.isValidatorConfig(v)) {
3498
+ syncFns.push(v.validator);
3499
+ syncConfigs.push(v);
3492
3500
  }
3493
- if (opts.endKey && !controls[opts.endKey]) {
3494
- controls[opts.endKey] = new FormControl(null);
3501
+ else {
3502
+ syncFns.push(v);
3495
3503
  }
3496
3504
  }
3505
+ if (syncConfigs.length) {
3506
+ this.validatorMap.set(field.key, syncConfigs);
3507
+ }
3508
+ return syncFns;
3509
+ }
3510
+ registerAsyncValidators(field) {
3511
+ const asyncFns = (field.asyncValidators ?? []).map((a) => a.validator);
3512
+ if (field.asyncValidators?.length) {
3513
+ this.asyncValidatorMap.set(field.key, field.asyncValidators);
3514
+ }
3515
+ return asyncFns;
3516
+ }
3517
+ buildDateRangeSubControls(field, controls) {
3518
+ if (field.type !== FieldType.DATE_RANGE || !field.options)
3519
+ return;
3520
+ const opts = field.options;
3521
+ if (opts.startKey && !controls[opts.startKey]) {
3522
+ controls[opts.startKey] = new FormControl(null);
3523
+ }
3524
+ if (opts.endKey && !controls[opts.endKey]) {
3525
+ controls[opts.endKey] = new FormControl(null);
3526
+ }
3497
3527
  }
3498
3528
  resolveInitialValue(type) {
3499
3529
  switch (type) {
@@ -3509,7 +3539,7 @@ class GenericFormService {
3509
3539
  patchValue(value, options) {
3510
3540
  if (!this.form)
3511
3541
  return;
3512
- const emitEvent = !(options?.silent);
3542
+ const emitEvent = !options?.silent;
3513
3543
  this.form.patchValue(value, { emitEvent });
3514
3544
  }
3515
3545
  // --- Validate ---
@@ -3582,7 +3612,10 @@ class GenericFormService {
3582
3612
  const fieldConfig = this.fieldConfigs.get(key);
3583
3613
  if (!fieldConfig)
3584
3614
  return;
3585
- fieldConfig.options = { ...fieldConfig.options, ...options };
3615
+ fieldConfig.options = {
3616
+ ...fieldConfig.options,
3617
+ ...options,
3618
+ };
3586
3619
  }
3587
3620
  getFieldConfig(key) {
3588
3621
  return this.fieldConfigs.get(key);
@@ -3614,26 +3647,32 @@ class GenericFormService {
3614
3647
  if (validatorMeta?.message) {
3615
3648
  return validatorMeta.message;
3616
3649
  }
3617
- // 2. Async validator with pre-translated errorMessage
3650
+ // 2. Sync validator with pre-translated errorMessage (ValidatorConfig)
3651
+ const syncConfigs = this.validatorMap.get(key);
3652
+ if (syncConfigs) {
3653
+ for (const sc of syncConfigs) {
3654
+ const testResult = sc.validator({ value: null });
3655
+ if (testResult && validatorName in testResult) {
3656
+ return sc.errorMessage;
3657
+ }
3658
+ }
3659
+ }
3660
+ // 3. Async validator with pre-translated errorMessage
3618
3661
  const asyncConfigs = this.asyncValidatorMap.get(key);
3619
3662
  if (asyncConfigs) {
3620
3663
  for (const ac of asyncConfigs) {
3621
- // Match async validator by checking if the validator name is in the error keys
3622
- // Async validators typically set the error key matching their name
3623
3664
  if (ac.errorMessage) {
3624
- // If there's only one async validator, use its message
3625
- // Otherwise, we can't disambiguate — return the first
3626
3665
  return ac.errorMessage;
3627
3666
  }
3628
3667
  }
3629
3668
  }
3630
- // 3. Translate via @ngx-translate
3669
+ // 4. Translate via @ngx-translate
3631
3670
  const translationKey = `uiPresentational.validatorMessages.${validatorName}`;
3632
3671
  const translated = this.translate.instant(translationKey, validatorMeta);
3633
3672
  if (translated !== translationKey) {
3634
3673
  return translated;
3635
3674
  }
3636
- // 4. Fallback — validator key
3675
+ // 5. Fallback — validator key
3637
3676
  return validatorName;
3638
3677
  }
3639
3678
  // --- Cleanup ---
@@ -3646,12 +3685,12 @@ class GenericFormService {
3646
3685
  this.destroy$.next();
3647
3686
  this.destroy$.complete();
3648
3687
  }
3649
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormService, deps: [{ token: i4$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3688
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormService, deps: [{ token: i1$8.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3650
3689
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormService }); }
3651
3690
  }
3652
3691
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormService, decorators: [{
3653
3692
  type: Injectable
3654
- }], ctorParameters: () => [{ type: i4$1.TranslateService }] });
3693
+ }], ctorParameters: () => [{ type: i1$8.TranslateService }] });
3655
3694
 
3656
3695
  const DEFAULT_REGISTRY = new Map([
3657
3696
  [FieldType.PASSWORD, PasswordComponent],
@@ -4762,6 +4801,72 @@ function noSpecialCharsOnly() {
4762
4801
  };
4763
4802
  }
4764
4803
 
4804
+ /**
4805
+ * Pre-translated validation error messages for all supported locales.
4806
+ * Merged into @ngx-translate via `GenericFormModule` constructor under
4807
+ * the key path `uiPresentational.validatorMessages.<validatorName>`.
4808
+ *
4809
+ * Interpolation placeholders (e.g. `{{requiredLength}}`) match the metadata
4810
+ * objects Angular validators attach to `ValidationErrors`.
4811
+ */
4812
+ const KMS_ERROR_MESSAGES = {
4813
+ en: {
4814
+ required: 'This field is required.',
4815
+ minlength: 'Minimum {{requiredLength}} characters required.',
4816
+ maxlength: 'Maximum {{requiredLength}} characters allowed.',
4817
+ min: 'Value must be at least {{min}}.',
4818
+ max: 'Value must be at most {{max}}.',
4819
+ email: 'Please enter a valid email address.',
4820
+ pattern: 'The value does not match the required format.',
4821
+ whitespaceOnly: 'Must not contain only whitespace.',
4822
+ specialCharsOnly: 'Must contain at least one letter or number.',
4823
+ },
4824
+ 'en-uk': {
4825
+ required: 'This field is required.',
4826
+ minlength: 'Minimum {{requiredLength}} characters required.',
4827
+ maxlength: 'Maximum {{requiredLength}} characters allowed.',
4828
+ min: 'Value must be at least {{min}}.',
4829
+ max: 'Value must be at most {{max}}.',
4830
+ email: 'Please enter a valid email address.',
4831
+ pattern: 'The value does not match the required format.',
4832
+ whitespaceOnly: 'Must not contain only whitespace.',
4833
+ specialCharsOnly: 'Must contain at least one letter or number.',
4834
+ },
4835
+ de: {
4836
+ required: 'Dieses Feld ist erforderlich.',
4837
+ minlength: 'Mindestens {{requiredLength}} Zeichen erforderlich.',
4838
+ maxlength: 'Maximal {{requiredLength}} Zeichen erlaubt.',
4839
+ min: 'Der Wert muss mindestens {{min}} betragen.',
4840
+ max: 'Der Wert darf h\u00f6chstens {{max}} betragen.',
4841
+ email: 'Bitte geben Sie eine g\u00fcltige E-Mail-Adresse ein.',
4842
+ pattern: 'Der Wert entspricht nicht dem erforderlichen Format.',
4843
+ whitespaceOnly: 'Darf nicht nur aus Leerzeichen bestehen.',
4844
+ specialCharsOnly: 'Muss mindestens einen Buchstaben oder eine Zahl enthalten.',
4845
+ },
4846
+ 'de-de': {
4847
+ required: 'Dieses Feld ist erforderlich.',
4848
+ minlength: 'Mindestens {{requiredLength}} Zeichen erforderlich.',
4849
+ maxlength: 'Maximal {{requiredLength}} Zeichen erlaubt.',
4850
+ min: 'Der Wert muss mindestens {{min}} betragen.',
4851
+ max: 'Der Wert darf h\u00f6chstens {{max}} betragen.',
4852
+ email: 'Bitte geben Sie eine g\u00fcltige E-Mail-Adresse ein.',
4853
+ pattern: 'Der Wert entspricht nicht dem erforderlichen Format.',
4854
+ whitespaceOnly: 'Darf nicht nur aus Leerzeichen bestehen.',
4855
+ specialCharsOnly: 'Muss mindestens einen Buchstaben oder eine Zahl enthalten.',
4856
+ },
4857
+ 'de-ch': {
4858
+ required: 'Dieses Feld ist erforderlich.',
4859
+ minlength: 'Mindestens {{requiredLength}} Zeichen erforderlich.',
4860
+ maxlength: 'Maximal {{requiredLength}} Zeichen erlaubt.',
4861
+ min: 'Der Wert muss mindestens {{min}} betragen.',
4862
+ max: 'Der Wert darf h\u00f6chstens {{max}} betragen.',
4863
+ email: 'Bitte geben Sie eine g\u00fcltige E-Mail-Adresse ein.',
4864
+ pattern: 'Der Wert entspricht nicht dem erforderlichen Format.',
4865
+ whitespaceOnly: 'Darf nicht nur aus Leerzeichen bestehen.',
4866
+ specialCharsOnly: 'Muss mindestens einen Buchstaben oder eine Zahl enthalten.',
4867
+ },
4868
+ };
4869
+
4765
4870
  /**
4766
4871
  * Lightweight facade module for the generic-form feature.
4767
4872
  *
@@ -4778,7 +4883,34 @@ function noSpecialCharsOnly() {
4778
4883
  * ```
4779
4884
  */
4780
4885
  class GenericFormModule {
4781
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4886
+ constructor(translate) {
4887
+ // Re-merge library error messages whenever the app loads/changes language.
4888
+ // The app's HTTP loader calls setTranslation() without merge, which
4889
+ // overwrites the store — this subscriber re-merges library messages on top.
4890
+ //
4891
+ // NOTE: We intentionally do NOT merge upfront for all languages, because
4892
+ // that would make ngx-translate skip the HTTP loader (it thinks translations
4893
+ // are already cached), breaking the app's own translations.
4894
+ // Merge immediately if a language is already active (e.g. APP_INITIALIZER
4895
+ // called translate.use() before this module was instantiated).
4896
+ const currentLang = translate.currentLang || translate.defaultLang;
4897
+ if (currentLang) {
4898
+ this.mergeMessages(translate, currentLang);
4899
+ }
4900
+ translate.onLangChange.subscribe((event) => {
4901
+ this.mergeMessages(translate, event.lang);
4902
+ });
4903
+ }
4904
+ mergeMessages(translate, lang) {
4905
+ const key = lang.toLowerCase();
4906
+ const messages = KMS_ERROR_MESSAGES[key] ??
4907
+ KMS_ERROR_MESSAGES[key.split('-')[0]] ??
4908
+ KMS_ERROR_MESSAGES['en'];
4909
+ if (messages) {
4910
+ translate.setTranslation(lang, { uiPresentational: { validatorMessages: messages } }, true);
4911
+ }
4912
+ }
4913
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormModule, deps: [{ token: i1$8.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule }); }
4782
4914
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: GenericFormModule, imports: [TranslateModule] }); }
4783
4915
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenericFormModule, providers: [FieldRegistryService], imports: [TranslateModule] }); }
4784
4916
  }
@@ -4788,7 +4920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
4788
4920
  imports: [TranslateModule],
4789
4921
  providers: [FieldRegistryService],
4790
4922
  }]
4791
- }] });
4923
+ }], ctorParameters: () => [{ type: i1$8.TranslateService }] });
4792
4924
 
4793
4925
  /** Form layout mode. Currently only GRID is implemented. */
4794
4926
  var FormLayout;