@xiriframework/xiri-ng 0.4.15 → 0.5.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,6 +1,6 @@
1
1
  import { DomSanitizer } from '@angular/platform-browser';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Pipe, input, computed, Directive, Injectable, ElementRef, ChangeDetectorRef, Input, Component, PLATFORM_ID, signal, effect, Service, output, numberAttribute, afterRenderEffect, untracked, booleanAttribute, viewChild, DestroyRef, forwardRef, InjectionToken, Injector, afterNextRender, ViewEncapsulation, linkedSignal, ChangeDetectionStrategy, NgZone, makeEnvironmentProviders } from '@angular/core';
3
+ import { inject, SecurityContext, Pipe, input, computed, Directive, Injectable, ElementRef, ChangeDetectorRef, Input, Component, PLATFORM_ID, signal, effect, Service, output, numberAttribute, afterRenderEffect, untracked, booleanAttribute, viewChild, DestroyRef, forwardRef, InjectionToken, Injector, afterNextRender, ViewEncapsulation, linkedSignal, ChangeDetectionStrategy, NgZone, makeEnvironmentProviders } from '@angular/core';
4
4
  import { DefaultUrlSerializer, RouterLink, Router, NavigationEnd } from '@angular/router';
5
5
  import { takeUntilDestroyed, toSignal, rxResource } from '@angular/core/rxjs-interop';
6
6
  import * as i1 from '@angular/forms';
@@ -16,11 +16,11 @@ import { MatIcon } from '@angular/material/icon';
16
16
  import { MatIconButton, MatButton, MatFabButton, MatMiniFabButton } from '@angular/material/button';
17
17
  import { MatInput } from '@angular/material/input';
18
18
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
19
- import { KeyValuePipe, isPlatformBrowser, AsyncPipe, NgTemplateOutlet, NgComponentOutlet, Location, DatePipe, SlicePipe } from '@angular/common';
20
19
  import { MatOption, DateAdapter, ErrorStateMatcher, _ErrorStateTracker, MAT_DATE_FORMATS, MatRipple } from '@angular/material/core';
21
20
  import { MatSelect, MatOption as MatOption$1 } from '@angular/material/select';
22
21
  import { MatCheckbox } from '@angular/material/checkbox';
23
22
  import { MatRadioButton, MatRadioGroup } from '@angular/material/radio';
23
+ import { isPlatformBrowser, AsyncPipe, NgTemplateOutlet, NgComponentOutlet, Location, DatePipe, SlicePipe } from '@angular/common';
24
24
  import { fromUnixTime, format, transpose } from 'date-fns';
25
25
  import { tz } from '@date-fns/tz';
26
26
  import { de } from 'date-fns/locale/de';
@@ -51,12 +51,14 @@ import { Overlay } from '@angular/cdk/overlay';
51
51
  import { ComponentPortal } from '@angular/cdk/portal';
52
52
  import { CdkScrollable } from '@angular/cdk/scrolling';
53
53
 
54
+ // HTML aus dem Backend enthält oft Record-Daten (Status, Adressen, Notizen). Angulars Sanitizer
55
+ // behält Formatierung und class, entfernt aber Scripts, Event-Handler und javascript:-URLs.
54
56
  class SafehtmlPipe {
55
57
  constructor() {
56
58
  this.sanitizer = inject(DomSanitizer);
57
59
  }
58
- transform(style) {
59
- return this.sanitizer.bypassSecurityTrustHtml(style);
60
+ transform(value) {
61
+ return this.sanitizer.sanitize(SecurityContext.HTML, value ?? '') ?? '';
60
62
  }
61
63
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SafehtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
62
64
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.5", ngImport: i0, type: SafehtmlPipe, isStandalone: true, name: "safeHtml" }); }
@@ -507,20 +509,7 @@ class XiriTimelimitComponent {
507
509
  this.hours = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09',
508
510
  '10', '11', '12', '13', '14', '15', '16', '17', '18', '19',
509
511
  '20', '21', '22', '23', '24'];
510
- this.minutes = {
511
- 0: '00',
512
- 5: '05',
513
- 10: '10',
514
- 15: '15',
515
- 20: '20',
516
- 25: '25',
517
- 30: '30',
518
- 35: '35',
519
- 40: '40',
520
- 45: '45',
521
- 50: '50',
522
- 55: '55'
523
- };
512
+ this.minutes = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55];
524
513
  this.onChange = () => { };
525
514
  this.onTouched = () => { };
526
515
  this._texts = {};
@@ -586,7 +575,7 @@ class XiriTimelimitComponent {
586
575
  !limit.wd[4] &&
587
576
  !limit.wd[5] &&
588
577
  !limit.wd[6])) &&
589
- limit.fromhour == 0 && limit.frommin == 0 && limit.tohour == 24 && limit.frommin == 0) {
578
+ limit.fromhour == 0 && limit.frommin == 0 && limit.tohour == 24 && limit.tomin == 0) {
590
579
  isNotValid = true;
591
580
  }
592
581
  }
@@ -684,14 +673,11 @@ class XiriTimelimitComponent {
684
673
  return;
685
674
  this._texts = input;
686
675
  }
687
- onCompare() {
688
- return -1;
689
- }
690
676
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: XiriTimelimitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
691
677
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: XiriTimelimitComponent, isStandalone: true, selector: "xiri-timelimit", inputs: { placeholder: "placeholder", required: "required", disabled: "disabled", value: "value", texts: "texts" }, host: { properties: { "id": "id", "attr.aria-describedby": "describedBy" } }, providers: [{
692
678
  provide: MatFormFieldControl,
693
679
  useExisting: XiriTimelimitComponent
694
- }], ngImport: i0, template: "<div class=\"timelimit\" [formGroup]=\"parts\">\n\n\t<mat-checkbox id=\"check\" formControlName=\"check\" (change)=\"changed()\">{{ _texts.check }}</mat-checkbox>\n\n\t<div [hidden]=\"!parts.value.check\" class=\"space\">\n\t\t<div class=\"xrow xsmall\">\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-label>{{ _texts.weekdays }}</mat-label>\n\t\t\t\t<div class=\"form-group timelimit-weekdays\">\n\t\t\t\t\t<mat-checkbox id=\"wd0\" formControlName=\"wd0\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd0 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd1\" formControlName=\"wd1\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd1 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd2\" formControlName=\"wd2\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd2 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd3\" formControlName=\"wd3\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd3 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd4\" formControlName=\"wd4\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd4 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd5\" formControlName=\"wd5\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd5 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd6\" formControlName=\"wd6\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd6 }}</mat-checkbox>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.from }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"fromhour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"frommin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes | keyvalue:onCompare; track m; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ m.value }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.to }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tohour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tomin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes | keyvalue; track m; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ m.value }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-checkbox id=\"inout\" formControlName=\"inout\" (change)=\"changed()\">{{ _texts.inout }}</mat-checkbox>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>", styles: [".time{width:5.5rem;margin-left:.5rem;margin-right:.5rem}.timelimit-weekdays .wd+.wd{margin-left:1.2rem}mat-label{color:var(--on-surface-variant, rgba(0, 0, 0, .54))}.space{margin-top:1rem;padding-left:1rem;padding-bottom:1rem;border-left:1px solid var(--outline-variant, #C2C7CF)}.form-group{padding-bottom:7px}[hidden]{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: 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: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }] }); }
680
+ }], ngImport: i0, template: "<div class=\"timelimit\" [formGroup]=\"parts\">\n\n\t<mat-checkbox id=\"check\" formControlName=\"check\" (change)=\"changed()\">{{ _texts.check }}</mat-checkbox>\n\n\t<div [hidden]=\"!parts.value.check\" class=\"space\">\n\t\t<div class=\"xrow xsmall\">\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-label>{{ _texts.weekdays }}</mat-label>\n\t\t\t\t<div class=\"form-group timelimit-weekdays\">\n\t\t\t\t\t<mat-checkbox id=\"wd0\" formControlName=\"wd0\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd0 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd1\" formControlName=\"wd1\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd1 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd2\" formControlName=\"wd2\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd2 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd3\" formControlName=\"wd3\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd3 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd4\" formControlName=\"wd4\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd4 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd5\" formControlName=\"wd5\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd5 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd6\" formControlName=\"wd6\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd6 }}</mat-checkbox>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.from }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"fromhour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"frommin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes; track m) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"m\">{{ m < 10 ? '0' + m : m }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.to }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tohour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tomin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes; track m) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"m\">{{ m < 10 ? '0' + m : m }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-checkbox id=\"inout\" formControlName=\"inout\" (change)=\"changed()\">{{ _texts.inout }}</mat-checkbox>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>", styles: [".time{width:5.5rem;margin-left:.5rem;margin-right:.5rem}.timelimit-weekdays .wd+.wd{margin-left:1.2rem}mat-label{color:var(--on-surface-variant, rgba(0, 0, 0, .54))}.space{margin-top:1rem;padding-left:1rem;padding-bottom:1rem;border-left:1px solid var(--outline-variant, #C2C7CF)}.form-group{padding-bottom:7px}[hidden]{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: 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: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] }); }
695
681
  }
696
682
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: XiriTimelimitComponent, decorators: [{
697
683
  type: Component,
@@ -709,8 +695,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
709
695
  MatFormField,
710
696
  MatSelect,
711
697
  MatOption,
712
- KeyValuePipe,
713
- ], template: "<div class=\"timelimit\" [formGroup]=\"parts\">\n\n\t<mat-checkbox id=\"check\" formControlName=\"check\" (change)=\"changed()\">{{ _texts.check }}</mat-checkbox>\n\n\t<div [hidden]=\"!parts.value.check\" class=\"space\">\n\t\t<div class=\"xrow xsmall\">\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-label>{{ _texts.weekdays }}</mat-label>\n\t\t\t\t<div class=\"form-group timelimit-weekdays\">\n\t\t\t\t\t<mat-checkbox id=\"wd0\" formControlName=\"wd0\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd0 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd1\" formControlName=\"wd1\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd1 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd2\" formControlName=\"wd2\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd2 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd3\" formControlName=\"wd3\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd3 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd4\" formControlName=\"wd4\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd4 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd5\" formControlName=\"wd5\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd5 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd6\" formControlName=\"wd6\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd6 }}</mat-checkbox>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.from }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"fromhour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"frommin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes | keyvalue:onCompare; track m; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ m.value }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.to }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tohour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tomin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes | keyvalue; track m; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ m.value }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-checkbox id=\"inout\" formControlName=\"inout\" (change)=\"changed()\">{{ _texts.inout }}</mat-checkbox>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>", styles: [".time{width:5.5rem;margin-left:.5rem;margin-right:.5rem}.timelimit-weekdays .wd+.wd{margin-left:1.2rem}mat-label{color:var(--on-surface-variant, rgba(0, 0, 0, .54))}.space{margin-top:1rem;padding-left:1rem;padding-bottom:1rem;border-left:1px solid var(--outline-variant, #C2C7CF)}.form-group{padding-bottom:7px}[hidden]{display:none!important}\n"] }]
698
+ ], template: "<div class=\"timelimit\" [formGroup]=\"parts\">\n\n\t<mat-checkbox id=\"check\" formControlName=\"check\" (change)=\"changed()\">{{ _texts.check }}</mat-checkbox>\n\n\t<div [hidden]=\"!parts.value.check\" class=\"space\">\n\t\t<div class=\"xrow xsmall\">\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-label>{{ _texts.weekdays }}</mat-label>\n\t\t\t\t<div class=\"form-group timelimit-weekdays\">\n\t\t\t\t\t<mat-checkbox id=\"wd0\" formControlName=\"wd0\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd0 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd1\" formControlName=\"wd1\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd1 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd2\" formControlName=\"wd2\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd2 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd3\" formControlName=\"wd3\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd3 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd4\" formControlName=\"wd4\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd4 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd5\" formControlName=\"wd5\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd5 }}</mat-checkbox>\n\t\t\t\t\t<mat-checkbox id=\"wd6\" formControlName=\"wd6\" class=\"wd\" (change)=\"changed()\">{{ _texts.wd6 }}</mat-checkbox>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.from }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"fromhour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"frommin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes; track m) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"m\">{{ m < 10 ? '0' + m : m }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-md-6\">\n\t\t\t\t<mat-label>{{ _texts.to }}</mat-label>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tohour\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (h of hours; track h; let i = $index) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"i\">{{ h }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t\t<mat-form-field class=\"time\">\n\t\t\t\t\t\t<mat-select formControlName=\"tomin\" panelWidth=\"auto\">\n\t\t\t\t\t\t\t@for (m of minutes; track m) {\n\t\t\t\t\t\t\t\t<mat-option [value]=\"m\">{{ m < 10 ? '0' + m : m }}</mat-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</mat-select>\n\t\t\t\t\t</mat-form-field>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"xcol-12\">\n\t\t\t\t<mat-checkbox id=\"inout\" formControlName=\"inout\" (change)=\"changed()\">{{ _texts.inout }}</mat-checkbox>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>", styles: [".time{width:5.5rem;margin-left:.5rem;margin-right:.5rem}.timelimit-weekdays .wd+.wd{margin-left:1.2rem}mat-label{color:var(--on-surface-variant, rgba(0, 0, 0, .54))}.space{margin-top:1rem;padding-left:1rem;padding-bottom:1rem;border-left:1px solid var(--outline-variant, #C2C7CF)}.form-group{padding-bottom:7px}[hidden]{display:none!important}\n"] }]
714
699
  }], ctorParameters: () => [], propDecorators: { placeholder: [{
715
700
  type: Input
716
701
  }], required: [{
@@ -3777,6 +3762,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
3777
3762
  }]
3778
3763
  }] });
3779
3764
 
3765
+ // window.location.href wird von Angular nicht sanitisiert: javascript:/data: würden im Seitenkontext laufen.
3766
+ function isSafeHref(url) {
3767
+ try {
3768
+ return ['http:', 'https:', 'mailto:', 'tel:'].includes(new URL(url, window.location.href).protocol);
3769
+ }
3770
+ catch {
3771
+ return false;
3772
+ }
3773
+ }
3774
+
3780
3775
  function formState(event) {
3781
3776
  if (event.disabled === true)
3782
3777
  return { valid: true, value: {} };
@@ -4065,7 +4060,9 @@ class XiriDialogComponent {
4065
4060
  this.router.navigate([button.url]).then();
4066
4061
  }
4067
4062
  else if (button.action == 'href') {
4068
- window.location.href = button.url ?? '';
4063
+ const url = button.url ?? '';
4064
+ if (isSafeHref(url))
4065
+ window.location.href = url;
4069
4066
  }
4070
4067
  else {
4071
4068
  if (this.loading())
@@ -6388,8 +6385,8 @@ class XiriFormComponent {
6388
6385
  this.loading.set(false);
6389
6386
  this.loadingButton.set(null);
6390
6387
  this.fieldErrors.set(err.fields ?? null);
6391
- // Mit Feldfehlern steht die Meldung am Feld; der Banner würde sie nur wiederholen.
6392
- this.error.set(err.fields ? '' : (err.error ?? 'Unknown Error'));
6388
+ // Banner immer zeigen: Fehler an unbekannten/unsichtbaren Feldern hätten sonst keine Anzeige.
6389
+ this.error.set(err.error ?? 'Unknown Error');
6393
6390
  if (this.buttons.length == 0) {
6394
6391
  this.buttons = [{
6395
6392
  text: 'Close',