ecabs-components 1.1.65 → 1.1.67

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.
@@ -8688,6 +8688,7 @@ class EcabsTimeRangeInputV2Component extends EcabsElementBaseComponent {
8688
8688
  separatorLabel = 'to';
8689
8689
  startTimePlaceholder;
8690
8690
  endTimePlaceholder;
8691
+ allowCrossMidnight = false;
8691
8692
  val;
8692
8693
  _timeFrom;
8693
8694
  _timeTo;
@@ -8736,6 +8737,9 @@ class EcabsTimeRangeInputV2Component extends EcabsElementBaseComponent {
8736
8737
  this.control.valueChanges
8737
8738
  .pipe(takeUntilDestroyed(this.destroyRef))
8738
8739
  .subscribe(() => this.timeRangeValidator(this.control));
8740
+ setTimeout(() => {
8741
+ this.timeRangeValidator(this.control);
8742
+ });
8739
8743
  }
8740
8744
  }
8741
8745
  onChange = () => { };
@@ -8763,31 +8767,35 @@ class EcabsTimeRangeInputV2Component extends EcabsElementBaseComponent {
8763
8767
  }
8764
8768
  timeRangeValidator(control) {
8765
8769
  const required = control.hasValidator(Validators.required);
8766
- if (control.value) {
8767
- const { timeFrom, timeTo } = control.value;
8768
- control.setErrors(null);
8769
- if (required &&
8770
- (!timeFrom || timeFrom?.length === 0) &&
8771
- (!timeTo || timeTo?.length === 0)) {
8772
- control.setErrors({ required: true });
8773
- return;
8774
- }
8775
- if (!timeFrom && timeTo) {
8776
- control.setErrors({ timeFromRangeRequired: true });
8777
- return;
8778
- }
8779
- if (timeFrom && !timeTo) {
8780
- control.setErrors({ timeToRangeRequired: true });
8781
- return;
8782
- }
8783
- if (timeFrom > timeTo) {
8784
- control.setErrors({ timeFromMoreThanTimeTo: true });
8785
- return;
8786
- }
8770
+ if (!control.value && !required) {
8771
+ return;
8772
+ }
8773
+ if (!control.value) {
8774
+ control.setErrors({ required: true });
8775
+ return;
8776
+ }
8777
+ const { timeFrom, timeTo } = control.value;
8778
+ control.setErrors(null);
8779
+ if (required &&
8780
+ (!timeFrom || timeFrom?.length === 0) &&
8781
+ (!timeTo || timeTo?.length === 0)) {
8782
+ control.setErrors({ required: true });
8783
+ }
8784
+ else if (!timeFrom && timeTo) {
8785
+ control.setErrors({ rangeFrom: true });
8786
+ }
8787
+ else if (timeFrom && !timeTo) {
8788
+ control.setErrors({ rangeTo: true });
8789
+ }
8790
+ else if (timeFrom &&
8791
+ timeTo &&
8792
+ timeFrom > timeTo &&
8793
+ !this.allowCrossMidnight) {
8794
+ control.setErrors({ rangeOrder: true });
8787
8795
  }
8788
8796
  }
8789
8797
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Component, deps: [{ token: i0.Injector }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
8790
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsTimeRangeInputV2Component, selector: "ecabs-time-range-input-v2", inputs: { showCloseIcon: "showCloseIcon", listPlacement: "listPlacement", appendTo: "appendTo", min: "min", max: "max", showDayStart: "showDayStart", showDayEnd: "showDayEnd", addSecond: "addSecond", dayStartLabel: "dayStartLabel", dayEndLabel: "dayEndLabel", separatorLabel: "separatorLabel", startTimePlaceholder: "startTimePlaceholder", endTimePlaceholder: "endTimePlaceholder" }, providers: [
8798
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsTimeRangeInputV2Component, selector: "ecabs-time-range-input-v2", inputs: { showCloseIcon: "showCloseIcon", listPlacement: "listPlacement", appendTo: "appendTo", min: "min", max: "max", showDayStart: "showDayStart", showDayEnd: "showDayEnd", addSecond: "addSecond", dayStartLabel: "dayStartLabel", dayEndLabel: "dayEndLabel", separatorLabel: "separatorLabel", startTimePlaceholder: "startTimePlaceholder", endTimePlaceholder: "endTimePlaceholder", allowCrossMidnight: "allowCrossMidnight" }, providers: [
8791
8799
  {
8792
8800
  provide: NG_VALUE_ACCESSOR,
8793
8801
  useExisting: forwardRef(() => EcabsTimeRangeInputV2Component),
@@ -8830,6 +8838,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
8830
8838
  type: Input
8831
8839
  }], endTimePlaceholder: [{
8832
8840
  type: Input
8841
+ }], allowCrossMidnight: [{
8842
+ type: Input
8833
8843
  }] } });
8834
8844
 
8835
8845
  class EcabsTimeRangeInputV2Module {
@@ -8932,9 +8942,11 @@ class EcabsChipAutocompleteComponent extends EcabsElementBaseComponent {
8932
8942
  visibleOptions = 8.5;
8933
8943
  autoActiveFirstOption = true;
8934
8944
  noResultsText = 'No results found';
8945
+ loadingText = 'Loading...';
8935
8946
  compareFn = Object.is;
8936
8947
  avatarTemplate;
8937
8948
  truncateAt = 18;
8949
+ suppressNextTermOnRefocus = false;
8938
8950
  set options(value) {
8939
8951
  this._options.set(value);
8940
8952
  }
@@ -8942,14 +8954,16 @@ class EcabsChipAutocompleteComponent extends EcabsElementBaseComponent {
8942
8954
  termChange = new EventEmitter();
8943
8955
  inputControl = new FormControl('');
8944
8956
  normalizedTerm$ = this.inputControl.valueChanges.pipe(startWith(''), map((value) => value ?? ''), distinctUntilChanged());
8957
+ _loading = signal(false);
8945
8958
  _options = signal([]);
8946
8959
  _values = signal([]);
8960
+ _suppressNextTermOnRefocus = signal(false);
8947
8961
  _term = toSignal(this.normalizedTerm$, { initialValue: '' });
8948
8962
  destroyRef = inject(DestroyRef);
8949
8963
  overlayPanelClass = 'ecabs-chip-autocomplete-overlay-panel';
8950
8964
  selectedOptions = computed(() => this.setValidSelectedOptions(this._values(), this._options()));
8951
- filteredOptions = computed(() => this.setFilteredOptions(this._term(), this._values(), this._options()));
8952
- noMatchResult = computed(() => !!this._term().trim().length && !this.filteredOptions().length);
8965
+ filteredOptions = computed(() => this._loading() ? [] : this.setFilteredOptions(this._term(), this._values(), this._options()));
8966
+ noMatchResult = computed(() => !this._loading() && !!this._term().trim().length && !this.filteredOptions().length);
8953
8967
  get options() {
8954
8968
  return this._options();
8955
8969
  }
@@ -8959,9 +8973,20 @@ class EcabsChipAutocompleteComponent extends EcabsElementBaseComponent {
8959
8973
  this.normalizedTerm$
8960
8974
  .pipe(takeUntilDestroyed(this.destroyRef))
8961
8975
  .subscribe((value) => {
8976
+ if (this.suppressNextTermOnRefocus && this._suppressNextTermOnRefocus() && value === '') {
8977
+ this._suppressNextTermOnRefocus.set(false);
8978
+ return;
8979
+ }
8962
8980
  this.termChange.emit(value);
8981
+ this._suppressNextTermOnRefocus.set(false);
8963
8982
  });
8964
8983
  }
8984
+ ngOnChanges(changes) {
8985
+ const { loading } = changes ?? {};
8986
+ if (loading) {
8987
+ this._loading.set(this.loading);
8988
+ }
8989
+ }
8965
8990
  setOverlayHeight() {
8966
8991
  const panel = this.document.querySelector(`.${this.overlayPanelClass}`);
8967
8992
  if (!panel) {
@@ -9015,14 +9040,19 @@ class EcabsChipAutocompleteComponent extends EcabsElementBaseComponent {
9015
9040
  blur() {
9016
9041
  this.onTouched();
9017
9042
  }
9018
- onChange = () => { };
9019
- onTouched = () => { };
9043
+ onChange = () => {
9044
+ };
9045
+ onTouched = () => {
9046
+ };
9020
9047
  updateValues(values) {
9021
9048
  this._values.set(values);
9022
9049
  this.onChange(values);
9023
9050
  this.selectionChange.emit(values);
9024
9051
  }
9025
9052
  clearAndRefocusInput() {
9053
+ if (this.suppressNextTermOnRefocus) {
9054
+ this._suppressNextTermOnRefocus.set(true);
9055
+ }
9026
9056
  this.inputControl.setValue('');
9027
9057
  this.inputRef?.nativeElement?.focus();
9028
9058
  }
@@ -9047,13 +9077,13 @@ class EcabsChipAutocompleteComponent extends EcabsElementBaseComponent {
9047
9077
  });
9048
9078
  }
9049
9079
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsChipAutocompleteComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
9050
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsChipAutocompleteComponent, isStandalone: true, selector: "ecabs-chip-autocomplete", inputs: { visibleOptions: "visibleOptions", autoActiveFirstOption: "autoActiveFirstOption", noResultsText: "noResultsText", compareFn: "compareFn", avatarTemplate: "avatarTemplate", truncateAt: "truncateAt", options: "options" }, outputs: { selectionChange: "selectionChange", termChange: "termChange" }, providers: [
9080
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsChipAutocompleteComponent, isStandalone: true, selector: "ecabs-chip-autocomplete", inputs: { visibleOptions: "visibleOptions", autoActiveFirstOption: "autoActiveFirstOption", noResultsText: "noResultsText", loadingText: "loadingText", compareFn: "compareFn", avatarTemplate: "avatarTemplate", truncateAt: "truncateAt", suppressNextTermOnRefocus: "suppressNextTermOnRefocus", options: "options" }, outputs: { selectionChange: "selectionChange", termChange: "termChange" }, providers: [
9051
9081
  {
9052
9082
  provide: NG_VALUE_ACCESSOR,
9053
9083
  useExisting: forwardRef(() => EcabsChipAutocompleteComponent),
9054
9084
  multi: true,
9055
9085
  },
9056
- ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputElem"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper\">\r\n <input matInput\r\n [id]=\"label\"\r\n [name]=\"label\"\r\n class=\"form-field__input\"\r\n [ngClass]=\"disabled ? 'form-field__input--disabled' : null\"\r\n #inputElem\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [formControl]=\"inputControl\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n (blur)=\"blur()\"/>\r\n </div>\r\n</ecabs-element-wrapper>\r\n\r\n<mat-autocomplete #auto=\"matAutocomplete\"\r\n [autoActiveFirstOption]=\"autoActiveFirstOption\"\r\n (optionSelected)=\"setSelection($event)\"\r\n (opened)=\"setOverlayHeight()\"\r\n [class]=\"overlayPanelClass\">\r\n <mat-option *ngFor=\"let option of filteredOptions(); trackBy: trackByFn\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled ?? false\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n {{ option.label }}\r\n </mat-option>\r\n\r\n <mat-option disabled *ngIf=\"noMatchResult()\">\r\n {{ noResultsText }}\r\n </mat-option>\r\n</mat-autocomplete>\r\n\r\n<mat-chip-grid #chipGrid\r\n [disabled]=\"disabled\"\r\n [class.mt-4]=\"selectedOptions().length > 0\">\r\n <mat-chip-row *ngFor=\"let option of selectedOptions(); trackBy: trackByFn\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (removed)=\"removeSelection(option)\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"option?.label as label\">\r\n <span [matTooltip]=\"label\"\r\n [matTooltipDisabled]=\"label.length <= truncateAt\">\r\n {{ label | truncate: truncateAt }}\r\n </span>\r\n </ng-container>\r\n <mat-icon matChipRemove\r\n svgIcon=\"ph-light:x\">\r\n </mat-icon>\r\n </mat-chip-row>\r\n</mat-chip-grid>\r\n\r\n<ng-template #avatarContext let-option>\r\n <ng-container *ngIf=\"avatarTemplate\">\r\n <ng-container [ngTemplateOutlet]=\"avatarTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: EcabsInputModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i2$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4$6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ElementWrapperModule }, { kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "ngmodule", type: NgxPhosphorIconsLightFileModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: EcabsPipesModule }, { kind: "pipe", type: EcabsTruncatePipe, name: "truncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9086
+ ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputElem"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper\">\r\n <input matInput\r\n [id]=\"label\"\r\n [name]=\"label\"\r\n class=\"form-field__input\"\r\n [ngClass]=\"disabled ? 'form-field__input--disabled' : null\"\r\n #inputElem\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [formControl]=\"inputControl\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n (blur)=\"blur()\"/>\r\n </div>\r\n</ecabs-element-wrapper>\r\n\r\n<mat-autocomplete #auto=\"matAutocomplete\"\r\n [autoActiveFirstOption]=\"autoActiveFirstOption\"\r\n (optionSelected)=\"setSelection($event)\"\r\n (opened)=\"setOverlayHeight()\"\r\n [class]=\"overlayPanelClass\">\r\n <mat-option *ngFor=\"let option of filteredOptions(); trackBy: trackByFn\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled ?? false\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n {{ option.label }}\r\n </mat-option>\r\n\r\n <mat-option *ngIf=\"loading\" disabled>\r\n <div class=\"flex items-center\">\r\n <div class=\"mr-2\">{{ loadingText }}</div>\r\n <ecabs-loading-spinner size=\"tiny\"></ecabs-loading-spinner>\r\n </div>\r\n </mat-option>\r\n\r\n <mat-option disabled *ngIf=\"noMatchResult()\">\r\n {{ noResultsText }}\r\n </mat-option>\r\n</mat-autocomplete>\r\n\r\n<mat-chip-grid #chipGrid\r\n [disabled]=\"disabled\"\r\n [class.mt-4]=\"selectedOptions().length > 0\">\r\n <mat-chip-row *ngFor=\"let option of selectedOptions(); trackBy: trackByFn\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (removed)=\"removeSelection(option)\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"option?.label as label\">\r\n <span [matTooltip]=\"label\"\r\n [matTooltipDisabled]=\"label.length <= truncateAt\">\r\n {{ label | truncate: truncateAt }}\r\n </span>\r\n </ng-container>\r\n <mat-icon matChipRemove\r\n svgIcon=\"ph-light:x\">\r\n </mat-icon>\r\n </mat-chip-row>\r\n</mat-chip-grid>\r\n\r\n<ng-template #avatarContext let-option>\r\n <ng-container *ngIf=\"avatarTemplate\">\r\n <ng-container [ngTemplateOutlet]=\"avatarTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: EcabsInputModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i2$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4$6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ElementWrapperModule }, { kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "ngmodule", type: NgxPhosphorIconsLightFileModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: EcabsPipesModule }, { kind: "pipe", type: EcabsTruncatePipe, name: "truncate" }, { kind: "ngmodule", type: EcabsLoadingModule }, { kind: "component", type: EcabsSpinnerComponent, selector: "ecabs-loading-spinner", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9057
9087
  }
9058
9088
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsChipAutocompleteComponent, decorators: [{
9059
9089
  type: Component,
@@ -9069,13 +9099,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
9069
9099
  NgxPhosphorIconsLightFileModule,
9070
9100
  MatTooltipModule,
9071
9101
  EcabsPipesModule,
9102
+ EcabsLoadingModule,
9072
9103
  ], providers: [
9073
9104
  {
9074
9105
  provide: NG_VALUE_ACCESSOR,
9075
9106
  useExisting: forwardRef(() => EcabsChipAutocompleteComponent),
9076
9107
  multi: true,
9077
9108
  },
9078
- ], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper\">\r\n <input matInput\r\n [id]=\"label\"\r\n [name]=\"label\"\r\n class=\"form-field__input\"\r\n [ngClass]=\"disabled ? 'form-field__input--disabled' : null\"\r\n #inputElem\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [formControl]=\"inputControl\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n (blur)=\"blur()\"/>\r\n </div>\r\n</ecabs-element-wrapper>\r\n\r\n<mat-autocomplete #auto=\"matAutocomplete\"\r\n [autoActiveFirstOption]=\"autoActiveFirstOption\"\r\n (optionSelected)=\"setSelection($event)\"\r\n (opened)=\"setOverlayHeight()\"\r\n [class]=\"overlayPanelClass\">\r\n <mat-option *ngFor=\"let option of filteredOptions(); trackBy: trackByFn\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled ?? false\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n {{ option.label }}\r\n </mat-option>\r\n\r\n <mat-option disabled *ngIf=\"noMatchResult()\">\r\n {{ noResultsText }}\r\n </mat-option>\r\n</mat-autocomplete>\r\n\r\n<mat-chip-grid #chipGrid\r\n [disabled]=\"disabled\"\r\n [class.mt-4]=\"selectedOptions().length > 0\">\r\n <mat-chip-row *ngFor=\"let option of selectedOptions(); trackBy: trackByFn\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (removed)=\"removeSelection(option)\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"option?.label as label\">\r\n <span [matTooltip]=\"label\"\r\n [matTooltipDisabled]=\"label.length <= truncateAt\">\r\n {{ label | truncate: truncateAt }}\r\n </span>\r\n </ng-container>\r\n <mat-icon matChipRemove\r\n svgIcon=\"ph-light:x\">\r\n </mat-icon>\r\n </mat-chip-row>\r\n</mat-chip-grid>\r\n\r\n<ng-template #avatarContext let-option>\r\n <ng-container *ngIf=\"avatarTemplate\">\r\n <ng-container [ngTemplateOutlet]=\"avatarTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n" }]
9109
+ ], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper\">\r\n <input matInput\r\n [id]=\"label\"\r\n [name]=\"label\"\r\n class=\"form-field__input\"\r\n [ngClass]=\"disabled ? 'form-field__input--disabled' : null\"\r\n #inputElem\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [formControl]=\"inputControl\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n (blur)=\"blur()\"/>\r\n </div>\r\n</ecabs-element-wrapper>\r\n\r\n<mat-autocomplete #auto=\"matAutocomplete\"\r\n [autoActiveFirstOption]=\"autoActiveFirstOption\"\r\n (optionSelected)=\"setSelection($event)\"\r\n (opened)=\"setOverlayHeight()\"\r\n [class]=\"overlayPanelClass\">\r\n <mat-option *ngFor=\"let option of filteredOptions(); trackBy: trackByFn\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled ?? false\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n {{ option.label }}\r\n </mat-option>\r\n\r\n <mat-option *ngIf=\"loading\" disabled>\r\n <div class=\"flex items-center\">\r\n <div class=\"mr-2\">{{ loadingText }}</div>\r\n <ecabs-loading-spinner size=\"tiny\"></ecabs-loading-spinner>\r\n </div>\r\n </mat-option>\r\n\r\n <mat-option disabled *ngIf=\"noMatchResult()\">\r\n {{ noResultsText }}\r\n </mat-option>\r\n</mat-autocomplete>\r\n\r\n<mat-chip-grid #chipGrid\r\n [disabled]=\"disabled\"\r\n [class.mt-4]=\"selectedOptions().length > 0\">\r\n <mat-chip-row *ngFor=\"let option of selectedOptions(); trackBy: trackByFn\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (removed)=\"removeSelection(option)\">\r\n <ng-container [ngTemplateOutlet]=\"avatarContext\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"option?.label as label\">\r\n <span [matTooltip]=\"label\"\r\n [matTooltipDisabled]=\"label.length <= truncateAt\">\r\n {{ label | truncate: truncateAt }}\r\n </span>\r\n </ng-container>\r\n <mat-icon matChipRemove\r\n svgIcon=\"ph-light:x\">\r\n </mat-icon>\r\n </mat-chip-row>\r\n</mat-chip-grid>\r\n\r\n<ng-template #avatarContext let-option>\r\n <ng-container *ngIf=\"avatarTemplate\">\r\n <ng-container [ngTemplateOutlet]=\"avatarTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: option}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n" }]
9079
9110
  }], ctorParameters: function () { return [{ type: Document, decorators: [{
9080
9111
  type: Inject,
9081
9112
  args: [DOCUMENT]
@@ -9088,12 +9119,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
9088
9119
  type: Input
9089
9120
  }], noResultsText: [{
9090
9121
  type: Input
9122
+ }], loadingText: [{
9123
+ type: Input
9091
9124
  }], compareFn: [{
9092
9125
  type: Input
9093
9126
  }], avatarTemplate: [{
9094
9127
  type: Input
9095
9128
  }], truncateAt: [{
9096
9129
  type: Input
9130
+ }], suppressNextTermOnRefocus: [{
9131
+ type: Input
9097
9132
  }], options: [{
9098
9133
  type: Input,
9099
9134
  args: [{ required: true }]
@@ -9122,7 +9157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
9122
9157
  class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
9123
9158
  injector;
9124
9159
  ecabsDatePickerHeaderService;
9125
- unsubscribeService;
9160
+ destroyRef;
9126
9161
  minDate;
9127
9162
  maxDate;
9128
9163
  touchUi = false;
@@ -9135,6 +9170,7 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
9135
9170
  excludeWeekends;
9136
9171
  specificDates;
9137
9172
  holidayOptions;
9173
+ dateToOptional = false;
9138
9174
  onblur = new EventEmitter();
9139
9175
  val;
9140
9176
  pickerTo;
@@ -9169,28 +9205,42 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
9169
9205
  }
9170
9206
  //eslint-disable-next-line
9171
9207
  set dateFrom(val) {
9172
- if (this._dateFrom !== val && isValid(new Date(val))) {
9208
+ if (this._dateFrom === val) {
9209
+ return;
9210
+ }
9211
+ if (val && isValid(new Date(val))) {
9173
9212
  this._dateFrom = val;
9174
9213
  this.minDateTo = new Date(val);
9175
- if (!this.dateTo) {
9214
+ if (!this.dateTo && !this.dateToOptional) {
9176
9215
  this.pickerTo?.open();
9177
9216
  }
9178
- this.onApply();
9179
9217
  }
9218
+ else if (!val) {
9219
+ this._dateFrom = val;
9220
+ this.minDateTo = this.minDate;
9221
+ }
9222
+ this.onApply();
9180
9223
  }
9181
9224
  //eslint-disable-next-line
9182
9225
  set dateTo(val) {
9183
- if (this._dateTo !== val && isValid(new Date(val))) {
9226
+ if (this._dateTo === val) {
9227
+ return;
9228
+ }
9229
+ if (val && isValid(new Date(val))) {
9184
9230
  this._dateTo = val;
9185
9231
  this.maxDateFrom = new Date(val);
9186
- this.onApply();
9187
9232
  }
9233
+ else if (!val) {
9234
+ this._dateTo = val;
9235
+ this.maxDateFrom = this.maxDate;
9236
+ }
9237
+ this.onApply();
9188
9238
  }
9189
- constructor(injector, ecabsDatePickerHeaderService, unsubscribeService) {
9239
+ constructor(injector, ecabsDatePickerHeaderService, destroyRef) {
9190
9240
  super();
9191
9241
  this.injector = injector;
9192
9242
  this.ecabsDatePickerHeaderService = ecabsDatePickerHeaderService;
9193
- this.unsubscribeService = unsubscribeService;
9243
+ this.destroyRef = destroyRef;
9194
9244
  }
9195
9245
  ngOnChanges(changes) {
9196
9246
  const { minDate, maxDate } = changes;
@@ -9206,7 +9256,7 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
9206
9256
  ngOnInit() {
9207
9257
  this.ecabsDatePickerHeaderService
9208
9258
  .getConfig()
9209
- .pipe(takeUntil(this.unsubscribeService.subscription()))
9259
+ .pipe(takeUntilDestroyed(this.destroyRef))
9210
9260
  .subscribe((config) => (this.translationConfig = config));
9211
9261
  if (this.holidayOptions?.countryCode) {
9212
9262
  this.holidayInstance = new Holidays(this.holidayOptions.countryCode.toUpperCase());
@@ -9217,17 +9267,15 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
9217
9267
  if (ngControl) {
9218
9268
  this.control = ngControl.control;
9219
9269
  this.control.valueChanges
9220
- .pipe(takeUntil(this.unsubscribeService.subscription()))
9270
+ .pipe(takeUntilDestroyed(this.destroyRef))
9221
9271
  .subscribe(() => this.dateRangeValidator(this.control));
9222
9272
  setTimeout(() => {
9223
9273
  this.dateFrom = this.value.dateFrom;
9224
9274
  this.dateTo = this.value.dateTo;
9275
+ this.dateRangeValidator(this.control);
9225
9276
  });
9226
9277
  }
9227
9278
  }
9228
- ngOnDestroy() {
9229
- this.unsubscribeService.destroy();
9230
- }
9231
9279
  onChange = () => { };
9232
9280
  onTouch = () => { };
9233
9281
  writeValue(value) {
@@ -9286,37 +9334,36 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
9286
9334
  }
9287
9335
  dateRangeValidator(control) {
9288
9336
  const required = control?.hasValidator(Validators.required);
9289
- if (control.value) {
9290
- const { dateFrom, dateTo } = control.value;
9291
- control.setErrors(null);
9292
- if (required &&
9293
- (!dateFrom || dateFrom?.length === 0) &&
9294
- (!dateTo || dateTo?.length === 0)) {
9337
+ if (!control.value) {
9338
+ if (required) {
9295
9339
  control.setErrors({ required: true });
9296
- return;
9297
- }
9298
- if (!dateFrom && dateTo) {
9299
- control.setErrors({ dateFromRangeRequired: true });
9300
- return;
9301
- }
9302
- if (dateFrom && !dateTo) {
9303
- control.setErrors({ dateToRangeRequired: true });
9304
- return;
9305
- }
9306
- if (new Date(dateFrom) > new Date(dateTo)) {
9307
- control.setErrors({ dateFromMoreThanDateTo: true });
9308
- return;
9309
9340
  }
9341
+ return;
9342
+ }
9343
+ const { dateFrom, dateTo } = control.value;
9344
+ control.setErrors(null);
9345
+ if (required &&
9346
+ (!dateFrom || dateFrom?.length === 0) &&
9347
+ (!dateTo || dateTo?.length === 0)) {
9348
+ control.setErrors({ required: true });
9349
+ }
9350
+ else if (!dateFrom && dateTo) {
9351
+ control.setErrors({ rangeFrom: true });
9352
+ }
9353
+ else if (dateFrom && !dateTo && !this.dateToOptional) {
9354
+ control.setErrors({ rangeTo: true });
9355
+ }
9356
+ else if (dateFrom && dateTo && new Date(dateFrom) > new Date(dateTo)) {
9357
+ control.setErrors({ rangeOrder: true });
9310
9358
  }
9311
9359
  }
9312
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateRangePickerComponentV2, deps: [{ token: i0.Injector }, { token: EcabsDatePickerHeaderService }, { token: UnsubscribeService }], target: i0.ɵɵFactoryTarget.Component });
9313
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsDateRangePickerComponentV2, selector: "ecabs-date-range-picker-v2", inputs: { minDate: "minDate", maxDate: "maxDate", touchUi: "touchUi", cancelLabel: "cancelLabel", applyLabel: "applyLabel", startDatePlaceholder: "startDatePlaceholder", endDatePlaceholder: "endDatePlaceholder", separatorLabel: "separatorLabel", excludeHolidays: "excludeHolidays", excludeWeekends: "excludeWeekends", specificDates: "specificDates", holidayOptions: "holidayOptions" }, outputs: { onblur: "onblur" }, providers: [
9360
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateRangePickerComponentV2, deps: [{ token: i0.Injector }, { token: EcabsDatePickerHeaderService }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
9361
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsDateRangePickerComponentV2, selector: "ecabs-date-range-picker-v2", inputs: { minDate: "minDate", maxDate: "maxDate", touchUi: "touchUi", cancelLabel: "cancelLabel", applyLabel: "applyLabel", startDatePlaceholder: "startDatePlaceholder", endDatePlaceholder: "endDatePlaceholder", separatorLabel: "separatorLabel", excludeHolidays: "excludeHolidays", excludeWeekends: "excludeWeekends", specificDates: "specificDates", holidayOptions: "holidayOptions", dateToOptional: "dateToOptional" }, outputs: { onblur: "onblur" }, providers: [
9314
9362
  {
9315
9363
  provide: NG_VALUE_ACCESSOR,
9316
9364
  useExisting: EcabsDateRangePickerComponentV2,
9317
9365
  multi: true,
9318
9366
  },
9319
- UnsubscribeService,
9320
9367
  ], viewQueries: [{ propertyName: "pickerTo", first: true, predicate: ["pickerTo"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateFrom' }}\"\r\n [(ngModel)]=\"dateFrom\"\r\n [placeholder]=\"startDatePlaceholder ?? translationConfig?.startDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerFrom\"\r\n [min]=\"minDateFrom\"\r\n [max]=\"maxDateFrom\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerFrom.open()\"\r\n />\r\n <mat-datepicker #pickerFrom\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateTo' }}\"\r\n [(ngModel)]=\"dateTo\"\r\n [placeholder]=\"endDatePlaceholder ?? translationConfig?.endDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerTo\"\r\n [min]=\"minDateTo\"\r\n [max]=\"maxDateTo\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerTo.open()\"\r\n />\r\n <mat-datepicker #pickerTo\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [""], dependencies: [{ kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: EcabsMaskDateDirective, selector: "[ecabsMaskDate]", inputs: ["isDateTimeMask", "considerSeconds"] }] });
9321
9368
  }
9322
9369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateRangePickerComponentV2, decorators: [{
@@ -9327,9 +9374,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
9327
9374
  useExisting: EcabsDateRangePickerComponentV2,
9328
9375
  multi: true,
9329
9376
  },
9330
- UnsubscribeService,
9331
9377
  ], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateFrom' }}\"\r\n [(ngModel)]=\"dateFrom\"\r\n [placeholder]=\"startDatePlaceholder ?? translationConfig?.startDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerFrom\"\r\n [min]=\"minDateFrom\"\r\n [max]=\"maxDateFrom\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerFrom.open()\"\r\n />\r\n <mat-datepicker #pickerFrom\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateTo' }}\"\r\n [(ngModel)]=\"dateTo\"\r\n [placeholder]=\"endDatePlaceholder ?? translationConfig?.endDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerTo\"\r\n [min]=\"minDateTo\"\r\n [max]=\"maxDateTo\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerTo.open()\"\r\n />\r\n <mat-datepicker #pickerTo\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>\r\n" }]
9332
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: EcabsDatePickerHeaderService }, { type: UnsubscribeService }]; }, propDecorators: { minDate: [{
9378
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: EcabsDatePickerHeaderService }, { type: i0.DestroyRef }]; }, propDecorators: { minDate: [{
9333
9379
  type: Input
9334
9380
  }], maxDate: [{
9335
9381
  type: Input
@@ -9353,6 +9399,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
9353
9399
  type: Input
9354
9400
  }], holidayOptions: [{
9355
9401
  type: Input
9402
+ }], dateToOptional: [{
9403
+ type: Input
9356
9404
  }], onblur: [{
9357
9405
  type: Output
9358
9406
  }], pickerTo: [{