@alauda/ui 6.5.10-beta.43 → 6.5.10-beta.44

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.
@@ -20,6 +20,7 @@ import { OverlayConfig, OverlayModule, CdkScrollable } from '@angular/cdk/overla
20
20
  import * as i2$2 from '@angular/forms';
21
21
  import { ControlContainer, NgControl, NG_VALUE_ACCESSOR, FormsModule, Validators, ReactiveFormsModule, NG_VALIDATORS } from '@angular/forms';
22
22
  import dayjs from 'dayjs';
23
+ import { HOUR_ITEMS as HOUR_ITEMS$1, MINUTE_ITEMS as MINUTE_ITEMS$1, SECOND_ITEMS as SECOND_ITEMS$1 } from 'src/time-picker';
23
24
  import customParseFormat from 'dayjs/plugin/customParseFormat';
24
25
  import isBetween from 'dayjs/plugin/isBetween';
25
26
  import * as i2$4 from '@angular/cdk/bidi';
@@ -3419,6 +3420,47 @@ function isTimePickerModel(item) {
3419
3420
  isNumberValue(item?.hour));
3420
3421
  }
3421
3422
 
3423
+ const HOUR_ITEMS = Array.from({ length: 24 }).map((_, index) => index);
3424
+ const MINUTE_ITEMS = Array.from({ length: 60 }).map((_, index) => index);
3425
+ const SECOND_ITEMS = Array.from({ length: 60 }).map((_, index) => index);
3426
+ const CONTROL_ITEM_HEIGHT = 28;
3427
+
3428
+ function compose(...fns) {
3429
+ return (x) => fns.reduceRight((acc, fn) => fn(acc), x);
3430
+ }
3431
+ function closestTo(num) {
3432
+ return (prev, curr) => Math.abs(curr - num) < Math.abs(prev - num) ? curr : prev;
3433
+ }
3434
+ function validHoursFn(disableHours) {
3435
+ const disabledHours = disableHours?.() || [];
3436
+ const validHours = HOUR_ITEMS.filter(hour => !disabledHours.includes(hour));
3437
+ return (result) => result.set('hour', validHours.includes(result.hour())
3438
+ ? result.hour()
3439
+ : validHours.reduce(closestTo(result.hour()), validHours[0]));
3440
+ }
3441
+ function validMinutesFn(disableMinutes) {
3442
+ return (result) => {
3443
+ const disabledMinutes = disableMinutes?.(result.hour()) || [];
3444
+ const validMinutes = MINUTE_ITEMS.filter(minute => !disabledMinutes.includes(minute));
3445
+ return result.set('minute', validMinutes.includes(result.minute())
3446
+ ? result.minute()
3447
+ : validMinutes.reduce(closestTo(result.minute()), validMinutes[0]));
3448
+ };
3449
+ }
3450
+ function validSecondsFn(disableSeconds) {
3451
+ return (result) => {
3452
+ const disabledSeconds = disableSeconds?.(result.hour(), result.minute()) || [];
3453
+ const validSeconds = SECOND_ITEMS.filter(second => !disabledSeconds.includes(second));
3454
+ return result.set('second', validSeconds.includes(result.second())
3455
+ ? result.second()
3456
+ : validSeconds.reduce(closestTo(result.second()), validSeconds[0]));
3457
+ };
3458
+ }
3459
+ function validResult(disabledTimeFn) {
3460
+ const validResultFn = compose(validSecondsFn(disabledTimeFn?.seconds), validMinutesFn(disabledTimeFn?.minutes), validHoursFn(disabledTimeFn?.hours));
3461
+ return (result) => validResultFn(result);
3462
+ }
3463
+
3422
3464
  class InputComponent {
3423
3465
  elementRef;
3424
3466
  renderer;
@@ -3554,11 +3596,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
3554
3596
  args: [InputComponent, { static: false }]
3555
3597
  }] } });
3556
3598
 
3557
- const HOUR_ITEMS = Array.from({ length: 24 }).map((_, index) => index);
3558
- const MINUTE_ITEMS = Array.from({ length: 60 }).map((_, index) => index);
3559
- const SECOND_ITEMS = Array.from({ length: 60 }).map((_, index) => index);
3560
- const CONTROL_ITEM_HEIGHT = 28;
3561
-
3562
3599
  const en = {
3563
3600
  locale: 'en',
3564
3601
  translation: {
@@ -3701,6 +3738,11 @@ class TimePickerPanelComponent extends CommonFormControl {
3701
3738
  secondRef;
3702
3739
  enabledColumns = 0;
3703
3740
  firstScrolled = false;
3741
+ validResult = validResult({
3742
+ hours: this.disableHours,
3743
+ minutes: this.disableMinutes,
3744
+ seconds: this.disableSeconds,
3745
+ });
3704
3746
  constructor(cdr) {
3705
3747
  super(cdr);
3706
3748
  this.cdr = cdr;
@@ -3725,7 +3767,14 @@ class TimePickerPanelComponent extends CommonFormControl {
3725
3767
  : []).includes(value);
3726
3768
  }
3727
3769
  }
3728
- ngOnChanges({ hourStep, minuteStep, secondStep }) {
3770
+ ngOnChanges({ hourStep, minuteStep, secondStep, disableHours, disableMinutes, disableSeconds, }) {
3771
+ if (disableHours || disableMinutes || disableSeconds) {
3772
+ this.validResult = validResult({
3773
+ hours: disableHours?.currentValue,
3774
+ minutes: disableMinutes?.currentValue,
3775
+ seconds: disableSeconds?.currentValue,
3776
+ });
3777
+ }
3729
3778
  if (hourStep?.currentValue > 0) {
3730
3779
  this.HOUR_ITEM_CONFIG = HOUR_ITEMS.filter(i => i % hourStep.currentValue === 0);
3731
3780
  }
@@ -3753,8 +3802,8 @@ class TimePickerPanelComponent extends CommonFormControl {
3753
3802
  if (!type) {
3754
3803
  return;
3755
3804
  }
3756
- const result = (currentValue ||
3757
- updateDateByTimeModel(dayjs(), { hour: 0, minute: 0, second: 0 })).set(type, value);
3805
+ const result = this.validResult((currentValue ||
3806
+ updateDateByTimeModel(dayjs(), { hour: 0, minute: 0, second: 0 })).set(type, value));
3758
3807
  this.emitModel(result);
3759
3808
  return result;
3760
3809
  }
@@ -3789,6 +3838,23 @@ class TimePickerPanelComponent extends CommonFormControl {
3789
3838
  this.firstScrolled = true;
3790
3839
  }
3791
3840
  }
3841
+ matchValue(value, type, currDate) {
3842
+ return currDate?.get(type) === value;
3843
+ }
3844
+ getControlTypeConfig(type) {
3845
+ return {
3846
+ [TimePickerControlType.Hour]: this.HOUR_ITEM_CONFIG,
3847
+ [TimePickerControlType.Minute]: this.MINUTE_ITEM_CONFIG,
3848
+ [TimePickerControlType.Second]: this.SECOND_ITEM_CONFIG,
3849
+ }[type];
3850
+ }
3851
+ selectNow() {
3852
+ this.firstScrolled = true;
3853
+ this.emitModel(this.validResult(dayjs()));
3854
+ }
3855
+ trackBy(_index, content) {
3856
+ return content;
3857
+ }
3792
3858
  scrollByValue(element, value, divideBy, duration) {
3793
3859
  const targetOffset = (value * CONTROL_ITEM_HEIGHT) / divideBy;
3794
3860
  const currentTop = element.scrollTop;
@@ -3810,23 +3876,6 @@ class TimePickerPanelComponent extends CommonFormControl {
3810
3876
  element.scrollTop = targetOffset;
3811
3877
  }
3812
3878
  }
3813
- matchValue(value, type, currDate) {
3814
- return currDate?.get(type) === value;
3815
- }
3816
- getControlTypeConfig(type) {
3817
- return {
3818
- [TimePickerControlType.Hour]: this.HOUR_ITEM_CONFIG,
3819
- [TimePickerControlType.Minute]: this.MINUTE_ITEM_CONFIG,
3820
- [TimePickerControlType.Second]: this.SECOND_ITEM_CONFIG,
3821
- }[type];
3822
- }
3823
- selectNow() {
3824
- this.firstScrolled = true;
3825
- this.emitModel(dayjs());
3826
- }
3827
- trackBy(_index, content) {
3828
- return content;
3829
- }
3830
3879
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: TimePickerPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3831
3880
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: TimePickerPanelComponent, selector: "aui-time-picker-panel", inputs: { format: "format", hourStep: "hourStep", minuteStep: "minuteStep", secondStep: "secondStep", footerTemplate: "footerTemplate", disableHours: "disableHours", disableMinutes: "disableMinutes", disableSeconds: "disableSeconds" }, outputs: { confirm: "confirm" }, host: { listeners: { "mousedown": "onMousedown()" } }, providers: [
3832
3881
  {
@@ -3896,8 +3945,12 @@ class TimePickerComponent extends CommonFormControl {
3896
3945
  tooltipRef;
3897
3946
  timeValue = null;
3898
3947
  timeFormatValue = '';
3948
+ validResult = validResult({
3949
+ hours: this.disableHours,
3950
+ minutes: this.disableMinutes,
3951
+ seconds: this.disableSeconds,
3952
+ });
3899
3953
  writeValue(value) {
3900
- super.writeValue(value);
3901
3954
  if (!value) {
3902
3955
  return this.setValue(null);
3903
3956
  }
@@ -3909,7 +3962,20 @@ class TimePickerComponent extends CommonFormControl {
3909
3962
  result = dayjs(value);
3910
3963
  this.submit(false, result);
3911
3964
  }
3912
- this.setValue(result);
3965
+ const validResult = this.validResult(result);
3966
+ this.setValue(validResult);
3967
+ super.writeValue(validResult);
3968
+ }
3969
+ ngOnChanges({ disableHours, disableMinutes, disableSeconds }) {
3970
+ if (this.disableHours !== disableHours?.currentValue ||
3971
+ this.disableMinutes !== disableMinutes?.currentValue ||
3972
+ this.disableSeconds !== disableSeconds?.currentValue) {
3973
+ this.validResult = validResult({
3974
+ hours: disableHours?.currentValue,
3975
+ minutes: disableMinutes?.currentValue,
3976
+ seconds: disableSeconds?.currentValue,
3977
+ });
3978
+ }
3913
3979
  }
3914
3980
  setValue(value) {
3915
3981
  this.timeValue = value;
@@ -3999,7 +4065,7 @@ class TimePickerComponent extends CommonFormControl {
3999
4065
  useExisting: forwardRef(() => TimePickerComponent),
4000
4066
  multi: true,
4001
4067
  },
4002
- ], viewQueries: [{ propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"aui-time-picker\"\n [class.isDisabled]=\"disabled\"\n [class.isClearable]=\"clearable && timeFormatValue\"\n #tooltipRef=\"auiTooltip\"\n [auiTooltip]=\"template\"\n [auiDisableAnimation]=\"true\"\n auiTooltipType=\"plain\"\n auiTooltipTrigger=\"click\"\n auiTooltipPosition=\"bottom start\"\n [auiTooltipDisabled]=\"disabled\"\n (auiTooltipVisibleChange)=\"handleTooltipVisible($event)\"\n>\n <aui-input-group>\n <input\n aui-input\n autocomplete=\"off\"\n [size]=\"size\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"timeFormatValue\"\n (ngModelChange)=\"changeFromInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n />\n <span\n *ngIf=\"showIcon\"\n auiInputSuffix\n class=\"aui-time-picker__icon-container\"\n >\n <aui-icon\n class=\"aui-time-picker__indicator\"\n icon=\"clock\"\n ></aui-icon>\n <aui-icon\n class=\"aui-time-picker__clear\"\n icon=\"xmark_small\"\n (click)=\"clearValue($event)\"\n ></aui-icon>\n </span>\n </aui-input-group>\n</div>\n\n<ng-template #template>\n <aui-time-picker-panel\n [disabled]=\"disabled\"\n [disableHours]=\"disableHours\"\n [disableMinutes]=\"disableMinutes\"\n [disableSeconds]=\"disableSeconds\"\n [hourStep]=\"hourStep\"\n [minuteStep]=\"minuteStep\"\n [secondStep]=\"secondStep\"\n [format]=\"format\"\n [footerTemplate]=\"footerTemplate\"\n [(ngModel)]=\"timeValue\"\n (ngModelChange)=\"changeFromPanel($event)\"\n (confirm)=\"submit()\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.preventDefault()\"\n ></aui-time-picker-panel>\n</ng-template>\n", styles: [".aui-time-picker{display:inline-block;position:relative;width:var(--aui-form-item-width-s)}.aui-time-picker__icon-container{display:block;position:relative;pointer-events:none!important}.aui-time-picker__icon-container .aui-icon{margin:0!important}.aui-time-picker.isDisabled .aui-time-picker__icon-container{color:rgb(var(--aui-color-n-4))}.aui-time-picker__indicator{display:flex}.aui-time-picker__clear{display:none}.aui-time-picker__clear .aui-icon{border-radius:50%;color:rgb(var(--aui-color-help-text));cursor:pointer;transition:all .3s ease}.aui-time-picker__clear .aui-icon:hover{color:rgb(var(--aui-color-main-bg));background-color:rgb(var(--aui-color-help-text))}.aui-time-picker.isClearable:not(.isDisabled):hover .aui-time-picker__indicator{display:none}.aui-time-picker.isClearable:not(.isDisabled):hover .aui-time-picker__clear{display:flex;pointer-events:auto}aui-time-picker.ng-invalid.ng-dirty .aui-input,.ng-submitted aui-time-picker.ng-invalid .aui-input{border-color:rgb(var(--aui-color-red))!important}:root aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,:root aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,:root .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,:root .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.16)}html[aui-theme-mode=light] aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,html[aui-theme-mode=light] aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,html[aui-theme-mode=light] .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,html[aui-theme-mode=light] .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.16)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,html[aui-theme-mode=system] aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,html[aui-theme-mode=system] .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,html[aui-theme-mode=system] .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.3)}}html[aui-theme-mode=dark] aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,html[aui-theme-mode=dark] aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,html[aui-theme-mode=dark] .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,html[aui-theme-mode=dark] .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.3)}\n"], dependencies: [{ kind: "directive", type: i2$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "input[aui-input],textarea[aui-input]", inputs: ["size", "disabled"] }, { kind: "component", type: InputGroupComponent, selector: "aui-input-group" }, { kind: "directive", type: InputSuffixDirective, selector: "[auiInputSuffix]" }, { kind: "directive", type: TooltipDirective, selector: "[auiTooltip]", inputs: ["auiTooltip", "auiTooltipContext", "auiTooltipClass", "auiTooltipType", "auiTooltipPosition", "auiTooltipTrigger", "auiTooltipDisabled", "auiTooltipHideOnClick", "auiDisableAnimation"], outputs: ["auiTooltipVisibleChange"], exportAs: ["auiTooltip"] }, { kind: "component", type: IconComponent, selector: "aui-icon", inputs: ["icon", "light", "dark", "link", "margin", "size", "color", "background", "backgroundColor"] }, { kind: "component", type: TimePickerPanelComponent, selector: "aui-time-picker-panel", inputs: ["format", "hourStep", "minuteStep", "secondStep", "footerTemplate", "disableHours", "disableMinutes", "disableSeconds"], outputs: ["confirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4068
+ ], viewQueries: [{ propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"aui-time-picker\"\n [class.isDisabled]=\"disabled\"\n [class.isClearable]=\"clearable && timeFormatValue\"\n #tooltipRef=\"auiTooltip\"\n [auiTooltip]=\"template\"\n [auiDisableAnimation]=\"true\"\n auiTooltipType=\"plain\"\n auiTooltipTrigger=\"click\"\n auiTooltipPosition=\"bottom start\"\n [auiTooltipDisabled]=\"disabled\"\n (auiTooltipVisibleChange)=\"handleTooltipVisible($event)\"\n>\n <aui-input-group>\n <input\n aui-input\n autocomplete=\"off\"\n [size]=\"size\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"timeFormatValue\"\n (ngModelChange)=\"changeFromInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n />\n <span\n *ngIf=\"showIcon\"\n auiInputSuffix\n class=\"aui-time-picker__icon-container\"\n >\n <aui-icon\n class=\"aui-time-picker__indicator\"\n icon=\"clock\"\n ></aui-icon>\n <aui-icon\n class=\"aui-time-picker__clear\"\n icon=\"xmark_small\"\n (click)=\"clearValue($event)\"\n ></aui-icon>\n </span>\n </aui-input-group>\n</div>\n\n<ng-template #template>\n <aui-time-picker-panel\n [disabled]=\"disabled\"\n [disableHours]=\"disableHours\"\n [disableMinutes]=\"disableMinutes\"\n [disableSeconds]=\"disableSeconds\"\n [hourStep]=\"hourStep\"\n [minuteStep]=\"minuteStep\"\n [secondStep]=\"secondStep\"\n [format]=\"format\"\n [footerTemplate]=\"footerTemplate\"\n [(ngModel)]=\"timeValue\"\n (ngModelChange)=\"changeFromPanel($event)\"\n (confirm)=\"submit()\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.preventDefault()\"\n ></aui-time-picker-panel>\n</ng-template>\n", styles: [".aui-time-picker{display:inline-block;position:relative;width:var(--aui-form-item-width-s)}.aui-time-picker__icon-container{display:block;position:relative;pointer-events:none!important}.aui-time-picker__icon-container .aui-icon{margin:0!important}.aui-time-picker.isDisabled .aui-time-picker__icon-container{color:rgb(var(--aui-color-n-4))}.aui-time-picker__indicator{display:flex}.aui-time-picker__clear{display:none}.aui-time-picker__clear .aui-icon{border-radius:50%;color:rgb(var(--aui-color-help-text));cursor:pointer;transition:all .3s ease}.aui-time-picker__clear .aui-icon:hover{color:rgb(var(--aui-color-main-bg));background-color:rgb(var(--aui-color-help-text))}.aui-time-picker.isClearable:not(.isDisabled):hover .aui-time-picker__indicator{display:none}.aui-time-picker.isClearable:not(.isDisabled):hover .aui-time-picker__clear{display:flex;pointer-events:auto}aui-time-picker.ng-invalid.ng-dirty .aui-input,.ng-submitted aui-time-picker.ng-invalid .aui-input{border-color:rgb(var(--aui-color-red))!important}:root aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,:root aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,:root .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,:root .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.16)}html[aui-theme-mode=light] aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,html[aui-theme-mode=light] aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,html[aui-theme-mode=light] .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,html[aui-theme-mode=light] .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.16)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,html[aui-theme-mode=system] aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,html[aui-theme-mode=system] .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,html[aui-theme-mode=system] .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.3)}}html[aui-theme-mode=dark] aui-time-picker.ng-invalid.ng-dirty .aui-input:focus,html[aui-theme-mode=dark] aui-time-picker.ng-invalid.ng-dirty .aui-input.isFocused,html[aui-theme-mode=dark] .ng-submitted aui-time-picker.ng-invalid .aui-input:focus,html[aui-theme-mode=dark] .ng-submitted aui-time-picker.ng-invalid .aui-input.isFocused{box-shadow:0 0 0 2px rgba(var(--aui-color-red),.3)}\n"], dependencies: [{ kind: "directive", type: i2$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "input[aui-input],textarea[aui-input]", inputs: ["size", "disabled"] }, { kind: "component", type: InputGroupComponent, selector: "aui-input-group" }, { kind: "directive", type: InputSuffixDirective, selector: "[auiInputSuffix]" }, { kind: "directive", type: TooltipDirective, selector: "[auiTooltip]", inputs: ["auiTooltip", "auiTooltipContext", "auiTooltipClass", "auiTooltipType", "auiTooltipPosition", "auiTooltipTrigger", "auiTooltipDisabled", "auiTooltipHideOnClick", "auiDisableAnimation"], outputs: ["auiTooltipVisibleChange"], exportAs: ["auiTooltip"] }, { kind: "component", type: IconComponent, selector: "aui-icon", inputs: ["icon", "light", "dark", "link", "margin", "size", "color", "background", "backgroundColor"] }, { kind: "component", type: TimePickerPanelComponent, selector: "aui-time-picker-panel", inputs: ["format", "hourStep", "minuteStep", "secondStep", "footerTemplate", "disableHours", "disableMinutes", "disableSeconds"], outputs: ["confirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4003
4069
  }
4004
4070
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: TimePickerComponent, decorators: [{
4005
4071
  type: Component,
@@ -4163,6 +4229,7 @@ class PickerPanelComponent {
4163
4229
  navRange;
4164
4230
  type;
4165
4231
  anchor = dayjs();
4232
+ selectedTime;
4166
4233
  matchDates;
4167
4234
  disabledDate = () => false;
4168
4235
  set weekStartDay(day) {
@@ -4179,7 +4246,17 @@ class PickerPanelComponent {
4179
4246
  minDate;
4180
4247
  maxDate;
4181
4248
  get disabledDateFn() {
4182
- return composeDisabledDateFn(date => this.minDate && date.isBefore(this.minDate), date => this.maxDate && date.isAfter(this.maxDate), this.disabledDate);
4249
+ return composeDisabledDateFn(date => this.minDate &&
4250
+ date
4251
+ .set('hour', this.selectedTime?.hour || 23)
4252
+ .set('minute', this.selectedTime?.minute || 59)
4253
+ .set('second', this.selectedTime?.second || 59)
4254
+ .isBefore(this.minDate), date => this.maxDate &&
4255
+ date
4256
+ .set('hour', this.selectedTime?.hour || 0)
4257
+ .set('minute', this.selectedTime?.minute || 0)
4258
+ .set('second', this.selectedTime?.second || 0)
4259
+ .isAfter(this.maxDate), this.disabledDate);
4183
4260
  }
4184
4261
  _weekStartDay = 0;
4185
4262
  panelData;
@@ -4276,7 +4353,7 @@ class PickerPanelComponent {
4276
4353
  return this.navRange;
4277
4354
  }
4278
4355
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: PickerPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4279
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: PickerPanelComponent, selector: "aui-picker-panel", inputs: { navRange: "navRange", type: "type", anchor: "anchor", matchDates: "matchDates", disabledDate: "disabledDate", weekStartDay: "weekStartDay", minDate: "minDate", maxDate: "maxDate" }, outputs: { select: "select", hovered: "hovered" }, usesOnChanges: true, ngImport: i0, template: "<div\n [class]=\"bem.element('container')\"\n [ngClass]=\"{\n 'day-panel-container': navRange === DateNavRange.Month,\n 'month-panel-container': navRange === DateNavRange.Year,\n 'year-panel-container': navRange === DateNavRange.Decade\n }\"\n>\n <div\n [class]=\"[bem.element('row'), 'week-header'].join(' ')\"\n *ngIf=\"navRange === DateNavRange.Month\"\n >\n <span\n *ngFor=\"let item of weekDefs\"\n [class]=\"bem.element('cell')\"\n >\n {{ item | auiI18n }}\n </span>\n </div>\n <div\n [class]=\"bem.element('row')\"\n *ngFor=\"let row of panelData; trackBy: trackByFn\"\n >\n <span\n *ngFor=\"let item of row; trackBy: trackByFn\"\n [class]=\"bem.element('cell')\"\n [ngClass]=\"{\n inRange: item.inRange && !item.isDisabled,\n isActive: match(item.value),\n isBackground: item.isBackground && !item.isDisabled,\n isRangeStart: item.isRangeStart,\n isRangeEnd: item.isRangeEnd,\n isToday: matchToday(item.value) && !item.isBackground,\n isDisabled: item.isDisabled\n }\"\n ><button\n aui-button=\"text\"\n [plain]=\"true\"\n [size]=\"navRange === DateNavRange.Month ? 'mini' : 'small'\"\n [disabled]=\"item.isDisabled\"\n (click)=\"selectValue(item.value)\"\n (mouseenter)=\"hovered.next(item.value)\"\n >\n {{ item.label\n }}<ng-container *ngIf=\"navRange === DateNavRange.Year\">{{\n 'month_suffix' | auiI18n\n }}</ng-container>\n </button>\n </span>\n </div>\n</div>\n", styles: [".aui-picker-panel__container{height:min-content;box-sizing:border-box;justify-content:stretch;display:flex;flex-direction:column;margin:12px 9px;align-items:center}.aui-picker-panel__container .aui-button{box-sizing:border-box}.aui-picker-panel__container .aui-button__content{padding:0!important}.aui-picker-panel__container.month-panel-container button,.aui-picker-panel__container.year-panel-container button{width:56px;height:28px!important}.aui-picker-panel__container.day-panel-container{height:min-content;padding:0;margin:0}.aui-picker-panel__container.day-panel-container button{height:24px!important;width:24px!important}.aui-picker-panel__container.day-panel-container .aui-picker-panel__row+.aui-picker-panel__row{margin-top:8px}.aui-picker-panel__row+.aui-picker-panel__row{margin-top:20px}.aui-picker-panel__row{flex:1;display:flex;align-items:center;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal);width:100%}.aui-picker-panel__row.week-header{color:rgb(var(--aui-color-help-text));margin-bottom:8px}.aui-picker-panel__row.week-header span{display:inline-block;margin:0;width:36px;text-align:center}.aui-picker-panel__cell{display:inline-flex;position:relative;align-items:center;justify-content:center;margin-inline:6px}.aui-picker-panel__cell button{box-sizing:content-box;transition:color .3s ease,background-color .3s ease}.aui-picker-panel__cell.inRange{background-color:rgb(var(--aui-color-p-6));box-shadow:-6px 0 0 0 rgb(var(--aui-color-p-6)),6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell.isRangeEnd{box-shadow:-6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell.isRangeStart{box-shadow:6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell.isDisabled{background-color:rgb(var(--aui-color-n-8));box-shadow:-6px 0 0 0 rgb(var(--aui-color-n-8)),6px 0 0 0 rgb(var(--aui-color-n-8))}.aui-picker-panel__cell.isDisabled button{color:rgb(var(--aui-color-disabled-text))!important;border-color:rgb(var(--aui-color-disabled-text))!important}.aui-picker-panel__cell.isDisabled.isActive button,.aui-picker-panel__cell.isDisabled.isToday button{color:#fff!important;border-color:rgb(var(--aui-color-p-4))!important;background-color:rgb(var(--aui-color-p-4))!important}.aui-picker-panel__cell.isDisabled+.aui-picker-panel__cell:not(.isDisabled,.isRangeStart){box-shadow:-12px 0 0 0 rgb(var(--aui-color-popper-bg))}.aui-picker-panel__cell.isDisabled+.aui-picker-panel__cell:not(.isDisabled).isRangeStart{box-shadow:-12px 0 0 0 rgb(var(--aui-color-popper-bg)),6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell:not(.isDisabled)+.aui-picker-panel__cell.isDisabled{box-shadow:6px 0 0 0 rgb(var(--aui-color-n-8))}.aui-picker-panel__cell.isToday button{border:rgb(var(--aui-color-primary)) 1px solid;color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-p-7))}.aui-picker-panel__cell.isActive button{color:#fff;background-color:rgb(var(--aui-color-primary))}.aui-picker-panel__cell.isBackground button{background-color:initial!important;color:rgb(var(--aui-color-disabled-text))}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[aui-button]", inputs: ["aui-button", "size", "plain", "loading", "round", "square"] }, { kind: "pipe", type: I18nPipe, name: "auiI18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4356
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: PickerPanelComponent, selector: "aui-picker-panel", inputs: { navRange: "navRange", type: "type", anchor: "anchor", selectedTime: "selectedTime", matchDates: "matchDates", disabledDate: "disabledDate", weekStartDay: "weekStartDay", minDate: "minDate", maxDate: "maxDate" }, outputs: { select: "select", hovered: "hovered" }, usesOnChanges: true, ngImport: i0, template: "<div\n [class]=\"bem.element('container')\"\n [ngClass]=\"{\n 'day-panel-container': navRange === DateNavRange.Month,\n 'month-panel-container': navRange === DateNavRange.Year,\n 'year-panel-container': navRange === DateNavRange.Decade\n }\"\n>\n <div\n [class]=\"[bem.element('row'), 'week-header'].join(' ')\"\n *ngIf=\"navRange === DateNavRange.Month\"\n >\n <span\n *ngFor=\"let item of weekDefs\"\n [class]=\"bem.element('cell')\"\n >\n {{ item | auiI18n }}\n </span>\n </div>\n <div\n [class]=\"bem.element('row')\"\n *ngFor=\"let row of panelData; trackBy: trackByFn\"\n >\n <span\n *ngFor=\"let item of row; trackBy: trackByFn\"\n [class]=\"bem.element('cell')\"\n [ngClass]=\"{\n inRange: item.inRange && !item.isDisabled,\n isActive: match(item.value),\n isBackground: item.isBackground && !item.isDisabled,\n isRangeStart: item.isRangeStart,\n isRangeEnd: item.isRangeEnd,\n isToday: matchToday(item.value) && !item.isBackground,\n isDisabled: item.isDisabled\n }\"\n ><button\n aui-button=\"text\"\n [plain]=\"true\"\n [size]=\"navRange === DateNavRange.Month ? 'mini' : 'small'\"\n [disabled]=\"item.isDisabled\"\n (click)=\"selectValue(item.value)\"\n (mouseenter)=\"hovered.next(item.value)\"\n >\n {{ item.label\n }}<ng-container *ngIf=\"navRange === DateNavRange.Year\">{{\n 'month_suffix' | auiI18n\n }}</ng-container>\n </button>\n </span>\n </div>\n</div>\n", styles: [".aui-picker-panel__container{height:min-content;box-sizing:border-box;justify-content:stretch;display:flex;flex-direction:column;margin:12px 9px;align-items:center}.aui-picker-panel__container .aui-button{box-sizing:border-box}.aui-picker-panel__container .aui-button__content{padding:0!important}.aui-picker-panel__container.month-panel-container button,.aui-picker-panel__container.year-panel-container button{width:56px;height:28px!important}.aui-picker-panel__container.day-panel-container{height:min-content;padding:0;margin:0}.aui-picker-panel__container.day-panel-container button{height:24px!important;width:24px!important}.aui-picker-panel__container.day-panel-container .aui-picker-panel__row+.aui-picker-panel__row{margin-top:8px}.aui-picker-panel__row+.aui-picker-panel__row{margin-top:20px}.aui-picker-panel__row{flex:1;display:flex;align-items:center;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal);width:100%}.aui-picker-panel__row.week-header{color:rgb(var(--aui-color-help-text));margin-bottom:8px}.aui-picker-panel__row.week-header span{display:inline-block;margin:0;width:36px;text-align:center}.aui-picker-panel__cell{display:inline-flex;position:relative;align-items:center;justify-content:center;margin-inline:6px}.aui-picker-panel__cell button{box-sizing:content-box;transition:color .3s ease,background-color .3s ease}.aui-picker-panel__cell.inRange{background-color:rgb(var(--aui-color-p-6));box-shadow:-6px 0 0 0 rgb(var(--aui-color-p-6)),6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell.isRangeEnd{box-shadow:-6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell.isRangeStart{box-shadow:6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell.isDisabled{background-color:rgb(var(--aui-color-n-8));box-shadow:-6px 0 0 0 rgb(var(--aui-color-n-8)),6px 0 0 0 rgb(var(--aui-color-n-8))}.aui-picker-panel__cell.isDisabled button{color:rgb(var(--aui-color-disabled-text))!important;border-color:rgb(var(--aui-color-disabled-text))!important}.aui-picker-panel__cell.isDisabled.isActive button,.aui-picker-panel__cell.isDisabled.isToday button{color:#fff!important;border-color:rgb(var(--aui-color-p-4))!important;background-color:rgb(var(--aui-color-p-4))!important}.aui-picker-panel__cell.isDisabled+.aui-picker-panel__cell:not(.isDisabled,.isRangeStart){box-shadow:-12px 0 0 0 rgb(var(--aui-color-popper-bg))}.aui-picker-panel__cell.isDisabled+.aui-picker-panel__cell:not(.isDisabled).isRangeStart{box-shadow:-12px 0 0 0 rgb(var(--aui-color-popper-bg)),6px 0 0 0 rgb(var(--aui-color-p-6))}.aui-picker-panel__cell:not(.isDisabled)+.aui-picker-panel__cell.isDisabled{box-shadow:6px 0 0 0 rgb(var(--aui-color-n-8))}.aui-picker-panel__cell.isToday button{border:rgb(var(--aui-color-primary)) 1px solid;color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-p-7))}.aui-picker-panel__cell.isActive button{color:#fff;background-color:rgb(var(--aui-color-primary))}.aui-picker-panel__cell.isBackground button{background-color:initial!important;color:rgb(var(--aui-color-disabled-text))}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[aui-button]", inputs: ["aui-button", "size", "plain", "loading", "round", "square"] }, { kind: "pipe", type: I18nPipe, name: "auiI18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4280
4357
  }
4281
4358
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: PickerPanelComponent, decorators: [{
4282
4359
  type: Component,
@@ -4287,6 +4364,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
4287
4364
  type: Input
4288
4365
  }], anchor: [{
4289
4366
  type: Input
4367
+ }], selectedTime: [{
4368
+ type: Input
4290
4369
  }], matchDates: [{
4291
4370
  type: Input
4292
4371
  }], disabledDate: [{
@@ -4314,6 +4393,13 @@ class DatePickerPanelComponent extends CommonFormControl {
4314
4393
  return this._type;
4315
4394
  }
4316
4395
  _type;
4396
+ set selectedTime(time) {
4397
+ this._selectedTime = time;
4398
+ }
4399
+ get selectedTime() {
4400
+ return this._selectedTime;
4401
+ }
4402
+ _selectedTime;
4317
4403
  showTime = false;
4318
4404
  disabledDate = () => false;
4319
4405
  disabledTime = () => null;
@@ -4329,7 +4415,7 @@ class DatePickerPanelComponent extends CommonFormControl {
4329
4415
  _cacheDisabledTimeFn;
4330
4416
  getDisabledTimeFn(selectedDate, type) {
4331
4417
  if (selectedDate !== this._cacheSelectedDate) {
4332
- this._cacheDisabledTimeFn = this.disabledTime(selectedDate);
4418
+ this._cacheDisabledTimeFn = combineDisabledTimeFn(this._disabledTimeFn.bind(this), this.disabledTime)(selectedDate);
4333
4419
  this._cacheSelectedDate = selectedDate;
4334
4420
  }
4335
4421
  return this._cacheDisabledTimeFn?.[type];
@@ -4340,7 +4426,6 @@ class DatePickerPanelComponent extends CommonFormControl {
4340
4426
  }
4341
4427
  anchor;
4342
4428
  selectedDate;
4343
- selectedTime;
4344
4429
  DateNavRange = DateNavRange;
4345
4430
  DatePickerType = DatePickerType;
4346
4431
  writeValue(obj) {
@@ -4373,17 +4458,63 @@ class DatePickerPanelComponent extends CommonFormControl {
4373
4458
  this.selectedDate = updateDateByTimeModel(this.selectedDate, time);
4374
4459
  this.emitValue(this.selectedDate);
4375
4460
  }
4461
+ clearValue() {
4462
+ this.selectedTime = null;
4463
+ this.clear.next();
4464
+ }
4376
4465
  setToday() {
4377
4466
  this.confirmValue(dayjs(), true);
4378
4467
  }
4468
+ _disabledTimeFn(selectedDate) {
4469
+ const returnFnMap = {
4470
+ hours: () => [],
4471
+ minutes: () => [],
4472
+ seconds: () => [],
4473
+ };
4474
+ if (selectedDate &&
4475
+ this.minDate &&
4476
+ selectedDate?.isSame(this.minDate, 'day')) {
4477
+ returnFnMap.hours = () => HOUR_ITEMS$1.filter(item => item < this.minDate.hour());
4478
+ returnFnMap.minutes = (hour) => {
4479
+ if (hour === this.minDate.hour()) {
4480
+ return MINUTE_ITEMS$1.filter(item => item < this.minDate.minute());
4481
+ }
4482
+ return [];
4483
+ };
4484
+ returnFnMap.seconds = (hour, minute) => {
4485
+ if (hour === this.minDate.hour() && minute === this.minDate.minute()) {
4486
+ return SECOND_ITEMS$1.filter(item => item < this.minDate.second());
4487
+ }
4488
+ return [];
4489
+ };
4490
+ }
4491
+ if (selectedDate &&
4492
+ this.maxDate &&
4493
+ selectedDate?.isSame(this.maxDate, 'day')) {
4494
+ returnFnMap.hours = () => HOUR_ITEMS$1.filter(item => item > this.maxDate.hour());
4495
+ returnFnMap.minutes = (hour) => {
4496
+ if (hour === this.maxDate.hour()) {
4497
+ return MINUTE_ITEMS$1.filter(item => item > this.maxDate.minute());
4498
+ }
4499
+ return [];
4500
+ };
4501
+ returnFnMap.seconds = (hour, minute) => {
4502
+ if (hour === this.maxDate.hour() && minute === this.maxDate.minute()) {
4503
+ return SECOND_ITEMS$1.filter(item => item > this.maxDate.second());
4504
+ }
4505
+ return [];
4506
+ };
4507
+ }
4508
+ return returnFnMap;
4509
+ }
4379
4510
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DatePickerPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4380
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: DatePickerPanelComponent, selector: "aui-date-picker-panel", inputs: { clearable: "clearable", clearText: "clearText", type: "type", showTime: "showTime", disabledDate: "disabledDate", disabledTime: "disabledTime", weekStartDay: "weekStartDay", showFooter: "showFooter", footerTemplate: "footerTemplate", extraFooter: "extraFooter", minDate: "minDate", maxDate: "maxDate" }, outputs: { confirm: "confirm", clear: "clear" }, providers: [
4511
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: DatePickerPanelComponent, selector: "aui-date-picker-panel", inputs: { clearable: "clearable", clearText: "clearText", type: "type", selectedTime: "selectedTime", showTime: "showTime", disabledDate: "disabledDate", disabledTime: "disabledTime", weekStartDay: "weekStartDay", showFooter: "showFooter", footerTemplate: "footerTemplate", extraFooter: "extraFooter", minDate: "minDate", maxDate: "maxDate" }, outputs: { confirm: "confirm", clear: "clear" }, providers: [
4381
4512
  {
4382
4513
  provide: NG_VALUE_ACCESSOR,
4383
4514
  useExisting: forwardRef(() => DatePickerPanelComponent),
4384
4515
  multi: true,
4385
4516
  },
4386
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"aui-date-picker-panel__wrapper\">\n <aui-calendar-header\n [dateNavRange]=\"navRange\"\n [anchor]=\"anchor\"\n [minAvail]=\"minDate\"\n [maxAvail]=\"maxDate\"\n [style.margin-inline.px]=\"4\"\n (navRangeChange)=\"navRange = $event\"\n (anchorChange)=\"anchor = $event\"\n ></aui-calendar-header>\n\n <aui-picker-panel\n [style.margin]=\"'16px 0'\"\n [anchor]=\"anchor\"\n [navRange]=\"navRange\"\n [disabledDate]=\"disabledDate\"\n [weekStartDay]=\"weekStartDay\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [type]=\"type\"\n [matchDates]=\"[selectedDate]\"\n (select)=\"panelValueChange($event)\"\n ></aui-picker-panel>\n\n <ng-container\n *ngIf=\"extraFooter\"\n [ngTemplateOutlet]=\"extraFooter\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-container *ngIf=\"showFooter\">\n <aui-calendar-footer\n (clear)=\"clear.next()\"\n (confirm)=\"confirmValue()\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n *ngIf=\"showTime; else today\"\n >\n <ng-container\n *ngIf=\"footerTemplate; else default\"\n [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-template #default>\n <aui-time-picker\n *ngIf=\"currentNavType === DatePickerType.Day && showTime\"\n [showIcon]=\"false\"\n size=\"small\"\n [(ngModel)]=\"selectedTime\"\n [disableHours]=\"getDisabledTimeFn(selectedDate, 'hours')\"\n [disableMinutes]=\"getDisabledTimeFn(selectedDate, 'minutes')\"\n [disableSeconds]=\"getDisabledTimeFn(selectedDate, 'seconds')\"\n tooltipPosition=\"top start\"\n (ngModelChange)=\"timeDateChange($event)\"\n [placeholder]=\"'select_time' | auiI18n\"\n ></aui-time-picker>\n </ng-template>\n </aui-calendar-footer>\n\n <ng-template #today>\n <aui-calendar-footer\n *ngIf=\"type === DatePickerType.Day\"\n [clearable]=\"false\"\n [customAction]=\"todayBtn\"\n >\n </aui-calendar-footer>\n <ng-template #todayBtn>\n <button\n aui-button=\"inline\"\n (click)=\"setToday()\"\n >\n {{ 'today' | auiI18n }}\n </button>\n </ng-template>\n </ng-template>\n </ng-container>\n</div>\n", styles: [".aui-date-picker-panel__wrapper{display:flex;flex-direction:column;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}.aui-date-picker-panel__wrapper .aui-time-picker{width:88px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[aui-button]", inputs: ["aui-button", "size", "plain", "loading", "round", "square"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TimePickerComponent, selector: "aui-time-picker", inputs: ["format", "size", "placeholder", "clearable", "showIcon", "disableHours", "disableMinutes", "disableSeconds", "hourStep", "minuteStep", "secondStep", "footerTemplate"], outputs: ["open", "close"] }, { kind: "component", type: CalendarHeaderComponent, selector: "aui-calendar-header", inputs: ["dateNavRange", "anchor", "maxAvail", "minAvail"], outputs: ["navRangeChange", "anchorChange"] }, { kind: "component", type: CalendarFooterComponent, selector: "aui-calendar-footer", inputs: ["clearable", "clearText", "customAction"], outputs: ["confirm", "clear"] }, { kind: "component", type: PickerPanelComponent, selector: "aui-picker-panel", inputs: ["navRange", "type", "anchor", "matchDates", "disabledDate", "weekStartDay", "minDate", "maxDate"], outputs: ["select", "hovered"] }, { kind: "pipe", type: I18nPipe, name: "auiI18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4517
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"aui-date-picker-panel__wrapper\">\n <aui-calendar-header\n [dateNavRange]=\"navRange\"\n [anchor]=\"anchor\"\n [minAvail]=\"minDate\"\n [maxAvail]=\"maxDate\"\n [style.margin-inline.px]=\"4\"\n (navRangeChange)=\"navRange = $event\"\n (anchorChange)=\"anchor = $event\"\n ></aui-calendar-header>\n\n <aui-picker-panel\n [style.margin]=\"'16px 0'\"\n [anchor]=\"anchor\"\n [navRange]=\"navRange\"\n [disabledDate]=\"disabledDate\"\n [weekStartDay]=\"weekStartDay\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selectedTime]=\"selectedTime\"\n [type]=\"type\"\n [matchDates]=\"[selectedDate]\"\n (select)=\"panelValueChange($event)\"\n ></aui-picker-panel>\n\n <ng-container\n *ngIf=\"extraFooter\"\n [ngTemplateOutlet]=\"extraFooter\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-container *ngIf=\"showFooter\">\n <aui-calendar-footer\n (clear)=\"clearValue()\"\n (confirm)=\"confirmValue()\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n *ngIf=\"showTime; else today\"\n >\n <ng-container\n *ngIf=\"footerTemplate; else default\"\n [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-template #default>\n <aui-time-picker\n *ngIf=\"currentNavType === DatePickerType.Day && showTime\"\n [showIcon]=\"false\"\n size=\"small\"\n [(ngModel)]=\"selectedTime\"\n [disableHours]=\"getDisabledTimeFn(selectedDate, 'hours')\"\n [disableMinutes]=\"getDisabledTimeFn(selectedDate, 'minutes')\"\n [disableSeconds]=\"getDisabledTimeFn(selectedDate, 'seconds')\"\n tooltipPosition=\"top start\"\n (ngModelChange)=\"timeDateChange($event)\"\n [placeholder]=\"'select_time' | auiI18n\"\n ></aui-time-picker>\n </ng-template>\n </aui-calendar-footer>\n\n <ng-template #today>\n <aui-calendar-footer\n *ngIf=\"type === DatePickerType.Day\"\n [clearable]=\"false\"\n [customAction]=\"todayBtn\"\n >\n </aui-calendar-footer>\n <ng-template #todayBtn>\n <button\n aui-button=\"inline\"\n (click)=\"setToday()\"\n >\n {{ 'today' | auiI18n }}\n </button>\n </ng-template>\n </ng-template>\n </ng-container>\n</div>\n", styles: [".aui-date-picker-panel__wrapper{display:flex;flex-direction:column;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}.aui-date-picker-panel__wrapper .aui-time-picker{width:88px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[aui-button]", inputs: ["aui-button", "size", "plain", "loading", "round", "square"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TimePickerComponent, selector: "aui-time-picker", inputs: ["format", "size", "placeholder", "clearable", "showIcon", "disableHours", "disableMinutes", "disableSeconds", "hourStep", "minuteStep", "secondStep", "footerTemplate"], outputs: ["open", "close"] }, { kind: "component", type: CalendarHeaderComponent, selector: "aui-calendar-header", inputs: ["dateNavRange", "anchor", "maxAvail", "minAvail"], outputs: ["navRangeChange", "anchorChange"] }, { kind: "component", type: CalendarFooterComponent, selector: "aui-calendar-footer", inputs: ["clearable", "clearText", "customAction"], outputs: ["confirm", "clear"] }, { kind: "component", type: PickerPanelComponent, selector: "aui-picker-panel", inputs: ["navRange", "type", "anchor", "selectedTime", "matchDates", "disabledDate", "weekStartDay", "minDate", "maxDate"], outputs: ["select", "hovered"] }, { kind: "pipe", type: I18nPipe, name: "auiI18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4387
4518
  }
4388
4519
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DatePickerPanelComponent, decorators: [{
4389
4520
  type: Component,
@@ -4393,13 +4524,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
4393
4524
  useExisting: forwardRef(() => DatePickerPanelComponent),
4394
4525
  multi: true,
4395
4526
  },
4396
- ], template: "<div class=\"aui-date-picker-panel__wrapper\">\n <aui-calendar-header\n [dateNavRange]=\"navRange\"\n [anchor]=\"anchor\"\n [minAvail]=\"minDate\"\n [maxAvail]=\"maxDate\"\n [style.margin-inline.px]=\"4\"\n (navRangeChange)=\"navRange = $event\"\n (anchorChange)=\"anchor = $event\"\n ></aui-calendar-header>\n\n <aui-picker-panel\n [style.margin]=\"'16px 0'\"\n [anchor]=\"anchor\"\n [navRange]=\"navRange\"\n [disabledDate]=\"disabledDate\"\n [weekStartDay]=\"weekStartDay\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [type]=\"type\"\n [matchDates]=\"[selectedDate]\"\n (select)=\"panelValueChange($event)\"\n ></aui-picker-panel>\n\n <ng-container\n *ngIf=\"extraFooter\"\n [ngTemplateOutlet]=\"extraFooter\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-container *ngIf=\"showFooter\">\n <aui-calendar-footer\n (clear)=\"clear.next()\"\n (confirm)=\"confirmValue()\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n *ngIf=\"showTime; else today\"\n >\n <ng-container\n *ngIf=\"footerTemplate; else default\"\n [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-template #default>\n <aui-time-picker\n *ngIf=\"currentNavType === DatePickerType.Day && showTime\"\n [showIcon]=\"false\"\n size=\"small\"\n [(ngModel)]=\"selectedTime\"\n [disableHours]=\"getDisabledTimeFn(selectedDate, 'hours')\"\n [disableMinutes]=\"getDisabledTimeFn(selectedDate, 'minutes')\"\n [disableSeconds]=\"getDisabledTimeFn(selectedDate, 'seconds')\"\n tooltipPosition=\"top start\"\n (ngModelChange)=\"timeDateChange($event)\"\n [placeholder]=\"'select_time' | auiI18n\"\n ></aui-time-picker>\n </ng-template>\n </aui-calendar-footer>\n\n <ng-template #today>\n <aui-calendar-footer\n *ngIf=\"type === DatePickerType.Day\"\n [clearable]=\"false\"\n [customAction]=\"todayBtn\"\n >\n </aui-calendar-footer>\n <ng-template #todayBtn>\n <button\n aui-button=\"inline\"\n (click)=\"setToday()\"\n >\n {{ 'today' | auiI18n }}\n </button>\n </ng-template>\n </ng-template>\n </ng-container>\n</div>\n", styles: [".aui-date-picker-panel__wrapper{display:flex;flex-direction:column;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}.aui-date-picker-panel__wrapper .aui-time-picker{width:88px}\n"] }]
4527
+ ], template: "<div class=\"aui-date-picker-panel__wrapper\">\n <aui-calendar-header\n [dateNavRange]=\"navRange\"\n [anchor]=\"anchor\"\n [minAvail]=\"minDate\"\n [maxAvail]=\"maxDate\"\n [style.margin-inline.px]=\"4\"\n (navRangeChange)=\"navRange = $event\"\n (anchorChange)=\"anchor = $event\"\n ></aui-calendar-header>\n\n <aui-picker-panel\n [style.margin]=\"'16px 0'\"\n [anchor]=\"anchor\"\n [navRange]=\"navRange\"\n [disabledDate]=\"disabledDate\"\n [weekStartDay]=\"weekStartDay\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selectedTime]=\"selectedTime\"\n [type]=\"type\"\n [matchDates]=\"[selectedDate]\"\n (select)=\"panelValueChange($event)\"\n ></aui-picker-panel>\n\n <ng-container\n *ngIf=\"extraFooter\"\n [ngTemplateOutlet]=\"extraFooter\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-container *ngIf=\"showFooter\">\n <aui-calendar-footer\n (clear)=\"clearValue()\"\n (confirm)=\"confirmValue()\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n *ngIf=\"showTime; else today\"\n >\n <ng-container\n *ngIf=\"footerTemplate; else default\"\n [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{ context: this }\"\n ></ng-container>\n\n <ng-template #default>\n <aui-time-picker\n *ngIf=\"currentNavType === DatePickerType.Day && showTime\"\n [showIcon]=\"false\"\n size=\"small\"\n [(ngModel)]=\"selectedTime\"\n [disableHours]=\"getDisabledTimeFn(selectedDate, 'hours')\"\n [disableMinutes]=\"getDisabledTimeFn(selectedDate, 'minutes')\"\n [disableSeconds]=\"getDisabledTimeFn(selectedDate, 'seconds')\"\n tooltipPosition=\"top start\"\n (ngModelChange)=\"timeDateChange($event)\"\n [placeholder]=\"'select_time' | auiI18n\"\n ></aui-time-picker>\n </ng-template>\n </aui-calendar-footer>\n\n <ng-template #today>\n <aui-calendar-footer\n *ngIf=\"type === DatePickerType.Day\"\n [clearable]=\"false\"\n [customAction]=\"todayBtn\"\n >\n </aui-calendar-footer>\n <ng-template #todayBtn>\n <button\n aui-button=\"inline\"\n (click)=\"setToday()\"\n >\n {{ 'today' | auiI18n }}\n </button>\n </ng-template>\n </ng-template>\n </ng-container>\n</div>\n", styles: [".aui-date-picker-panel__wrapper{display:flex;flex-direction:column;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}.aui-date-picker-panel__wrapper .aui-time-picker{width:88px}\n"] }]
4397
4528
  }], propDecorators: { clearable: [{
4398
4529
  type: Input
4399
4530
  }], clearText: [{
4400
4531
  type: Input
4401
4532
  }], type: [{
4402
4533
  type: Input
4534
+ }], selectedTime: [{
4535
+ type: Input
4403
4536
  }], showTime: [{
4404
4537
  type: Input
4405
4538
  }], disabledDate: [{
@@ -4423,6 +4556,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
4423
4556
  }], clear: [{
4424
4557
  type: Output
4425
4558
  }] } });
4559
+ function combineDisabledTimeFn(...disabledFnList) {
4560
+ return (date) => ({
4561
+ hours: () => Array.from(new Set(disabledFnList
4562
+ .map(fn => fn(date)?.hours?.() || [])
4563
+ .reduce((prev, cur) => [...prev, ...cur], []))),
4564
+ minutes: (hour) => Array.from(new Set(disabledFnList
4565
+ .map(fn => fn(date)?.minutes?.(hour) || [])
4566
+ .reduce((prev, cur) => [...prev, ...cur], []))),
4567
+ seconds: (hour, minute) => Array.from(new Set(disabledFnList
4568
+ .map(fn => fn(date)?.seconds?.(hour, minute) || [])
4569
+ .reduce((prev, cur) => [...prev, ...cur], []))),
4570
+ });
4571
+ }
4426
4572
 
4427
4573
  const bem$3 = buildBem('aui-date-range-picker-panel');
4428
4574
  class DateRangePickerPanelComponent extends CommonFormControl {
@@ -4583,7 +4729,7 @@ class DateRangePickerPanelComponent extends CommonFormControl {
4583
4729
  useExisting: forwardRef(() => DateRangePickerPanelComponent),
4584
4730
  multi: true,
4585
4731
  },
4586
- ], usesInheritance: true, ngImport: i0, template: "<div [class]=\"bem.element('container')\">\n <div [class]=\"bem.element('header')\">\n <aui-calendar-header\n [dateNavRange]=\"leftDateRange\"\n [anchor]=\"leftAnchor\"\n (navRangeChange)=\"calendarRangeChange($event, Side.Left)\"\n (anchorChange)=\"leftAnchor = $event\"\n [maxAvail]=\"maxHeaderAvail\"\n [minAvail]=\"minDate\"\n ></aui-calendar-header>\n <aui-calendar-header\n [dateNavRange]=\"rightDateRange\"\n [anchor]=\"rightAnchor\"\n (navRangeChange)=\"calendarRangeChange($event, Side.Right)\"\n (anchorChange)=\"rightAnchor = $event\"\n [minAvail]=\"minHeaderAvail\"\n [maxAvail]=\"maxDate\"\n ></aui-calendar-header>\n </div>\n <div [class]=\"bem.element('body')\">\n <aui-picker-panel\n class=\"panel__wrapper\"\n [navRange]=\"leftDateRange\"\n [type]=\"DatePickerType.Day\"\n [anchor]=\"leftAnchor\"\n [matchDates]=\"matchValues\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [disabledDate]=\"getDateDisabledFn(Side.Left, rightAnchor)\"\n [weekStartDay]=\"weekStartDay\"\n (hovered)=\"hoverItem($event)\"\n (select)=\"selectPickerPanel($event, Side.Left)\"\n ></aui-picker-panel>\n <aui-picker-panel\n class=\"panel__wrapper\"\n [navRange]=\"rightDateRange\"\n [type]=\"DatePickerType.Day\"\n [anchor]=\"rightAnchor\"\n [weekStartDay]=\"weekStartDay\"\n [matchDates]=\"matchValues\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [disabledDate]=\"getDateDisabledFn(Side.Right, leftAnchor)\"\n (hovered)=\"hoverItem($event)\"\n (select)=\"selectPickerPanel($event, Side.Right)\"\n ></aui-picker-panel>\n </div>\n\n <aui-calendar-footer\n [class]=\"bem.element('footer')\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n (clear)=\"clear.next()\"\n (confirm)=\"confirmValue(rangeValue)\"\n *ngIf=\"showFooter && showTime\"\n >\n <div\n [class]=\"bem.element('footer-content')\"\n *ngIf=\"showTime\"\n >\n <ng-container\n [ngTemplateOutlet]=\"datePlaceholder\"\n [ngTemplateOutletContext]=\"{\n placeholder: 'start_date' | auiI18n,\n value: rangeValue[0]\n }\"\n ></ng-container>\n <aui-time-picker\n [showIcon]=\"false\"\n [(ngModel)]=\"startTime\"\n size=\"small\"\n (ngModelChange)=\"timeChange($event)\"\n [disableHours]=\"leftDisabledTimeFn(rangeValue[0], 'hours')\"\n [disableMinutes]=\"leftDisabledTimeFn(rangeValue[0], 'minutes')\"\n [disableSeconds]=\"leftDisabledTimeFn(rangeValue[0], 'seconds')\"\n [placeholder]=\"'select_time' | auiI18n\"\n tooltipPosition=\"top start\"\n ></aui-time-picker>\n\n <span class=\"placeholder separator\">{{ 'to' | auiI18n }}</span>\n <ng-container\n [ngTemplateOutlet]=\"datePlaceholder\"\n [ngTemplateOutletContext]=\"{\n placeholder: 'end_date' | auiI18n,\n value: rangeValue[1]\n }\"\n ></ng-container>\n <aui-time-picker\n [showIcon]=\"false\"\n size=\"small\"\n [(ngModel)]=\"endTime\"\n [disableHours]=\"rightDisabledTimeFn(rangeValue[1], 'hours')\"\n [disableMinutes]=\"rightDisabledTimeFn(rangeValue[1], 'minutes')\"\n [disableSeconds]=\"rightDisabledTimeFn(rangeValue[1], 'seconds')\"\n (ngModelChange)=\"timeChange($event)\"\n [placeholder]=\"'select_time' | auiI18n\"\n tooltipPosition=\"top start\"\n ></aui-time-picker>\n </div>\n </aui-calendar-footer>\n</div>\n\n<ng-template\n #datePlaceholder\n let-placeholder=\"placeholder\"\n let-value=\"value\"\n>\n <span\n *ngIf=\"!value\"\n class=\"placeholder date-holder\"\n >{{ placeholder }}</span\n >\n <span\n *ngIf=\"value\"\n class=\"date-value date-holder\"\n >{{ value | date: FOOTER_DATE_FORMAT }}</span\n >\n</ng-template>\n", styles: [".aui-date-range-picker-panel__container{display:flex;flex-direction:column;width:524px;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}.aui-date-range-picker-panel__container .placeholder{color:rgb(var(--aui-color-placeholder-text))}.aui-date-range-picker-panel__container .placeholder.separator{margin-inline:12px}.aui-date-range-picker-panel__container .date-value{color:rgb(var(--aui-color-main-text))}.aui-date-range-picker-panel__container .date-holder{display:inline-block;margin-right:8px;width:82px}.aui-date-range-picker-panel__container .panel__wrapper{width:246px;display:flex;justify-content:center}.aui-date-range-picker-panel__header{display:flex;justify-content:space-between}.aui-date-range-picker-panel__header aui-calendar-header{flex:0 0 246px}.aui-date-range-picker-panel__body{display:flex;justify-content:space-between;margin:16px 0}.aui-date-range-picker-panel__footer .aui-time-picker{width:88px}.aui-date-range-picker-panel__footer-content{display:flex;align-items:center;height:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TimePickerComponent, selector: "aui-time-picker", inputs: ["format", "size", "placeholder", "clearable", "showIcon", "disableHours", "disableMinutes", "disableSeconds", "hourStep", "minuteStep", "secondStep", "footerTemplate"], outputs: ["open", "close"] }, { kind: "component", type: CalendarHeaderComponent, selector: "aui-calendar-header", inputs: ["dateNavRange", "anchor", "maxAvail", "minAvail"], outputs: ["navRangeChange", "anchorChange"] }, { kind: "component", type: CalendarFooterComponent, selector: "aui-calendar-footer", inputs: ["clearable", "clearText", "customAction"], outputs: ["confirm", "clear"] }, { kind: "component", type: PickerPanelComponent, selector: "aui-picker-panel", inputs: ["navRange", "type", "anchor", "matchDates", "disabledDate", "weekStartDay", "minDate", "maxDate"], outputs: ["select", "hovered"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: I18nPipe, name: "auiI18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4732
+ ], usesInheritance: true, ngImport: i0, template: "<div [class]=\"bem.element('container')\">\n <div [class]=\"bem.element('header')\">\n <aui-calendar-header\n [dateNavRange]=\"leftDateRange\"\n [anchor]=\"leftAnchor\"\n (navRangeChange)=\"calendarRangeChange($event, Side.Left)\"\n (anchorChange)=\"leftAnchor = $event\"\n [maxAvail]=\"maxHeaderAvail\"\n [minAvail]=\"minDate\"\n ></aui-calendar-header>\n <aui-calendar-header\n [dateNavRange]=\"rightDateRange\"\n [anchor]=\"rightAnchor\"\n (navRangeChange)=\"calendarRangeChange($event, Side.Right)\"\n (anchorChange)=\"rightAnchor = $event\"\n [minAvail]=\"minHeaderAvail\"\n [maxAvail]=\"maxDate\"\n ></aui-calendar-header>\n </div>\n <div [class]=\"bem.element('body')\">\n <aui-picker-panel\n class=\"panel__wrapper\"\n [navRange]=\"leftDateRange\"\n [type]=\"DatePickerType.Day\"\n [anchor]=\"leftAnchor\"\n [matchDates]=\"matchValues\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [disabledDate]=\"getDateDisabledFn(Side.Left, rightAnchor)\"\n [weekStartDay]=\"weekStartDay\"\n (hovered)=\"hoverItem($event)\"\n (select)=\"selectPickerPanel($event, Side.Left)\"\n ></aui-picker-panel>\n <aui-picker-panel\n class=\"panel__wrapper\"\n [navRange]=\"rightDateRange\"\n [type]=\"DatePickerType.Day\"\n [anchor]=\"rightAnchor\"\n [weekStartDay]=\"weekStartDay\"\n [matchDates]=\"matchValues\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [disabledDate]=\"getDateDisabledFn(Side.Right, leftAnchor)\"\n (hovered)=\"hoverItem($event)\"\n (select)=\"selectPickerPanel($event, Side.Right)\"\n ></aui-picker-panel>\n </div>\n\n <aui-calendar-footer\n [class]=\"bem.element('footer')\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n (clear)=\"clear.next()\"\n (confirm)=\"confirmValue(rangeValue)\"\n *ngIf=\"showFooter && showTime\"\n >\n <div\n [class]=\"bem.element('footer-content')\"\n *ngIf=\"showTime\"\n >\n <ng-container\n [ngTemplateOutlet]=\"datePlaceholder\"\n [ngTemplateOutletContext]=\"{\n placeholder: 'start_date' | auiI18n,\n value: rangeValue[0]\n }\"\n ></ng-container>\n <aui-time-picker\n [showIcon]=\"false\"\n [(ngModel)]=\"startTime\"\n size=\"small\"\n (ngModelChange)=\"timeChange($event)\"\n [disableHours]=\"leftDisabledTimeFn(rangeValue[0], 'hours')\"\n [disableMinutes]=\"leftDisabledTimeFn(rangeValue[0], 'minutes')\"\n [disableSeconds]=\"leftDisabledTimeFn(rangeValue[0], 'seconds')\"\n [placeholder]=\"'select_time' | auiI18n\"\n tooltipPosition=\"top start\"\n ></aui-time-picker>\n\n <span class=\"placeholder separator\">{{ 'to' | auiI18n }}</span>\n <ng-container\n [ngTemplateOutlet]=\"datePlaceholder\"\n [ngTemplateOutletContext]=\"{\n placeholder: 'end_date' | auiI18n,\n value: rangeValue[1]\n }\"\n ></ng-container>\n <aui-time-picker\n [showIcon]=\"false\"\n size=\"small\"\n [(ngModel)]=\"endTime\"\n [disableHours]=\"rightDisabledTimeFn(rangeValue[1], 'hours')\"\n [disableMinutes]=\"rightDisabledTimeFn(rangeValue[1], 'minutes')\"\n [disableSeconds]=\"rightDisabledTimeFn(rangeValue[1], 'seconds')\"\n (ngModelChange)=\"timeChange($event)\"\n [placeholder]=\"'select_time' | auiI18n\"\n tooltipPosition=\"top start\"\n ></aui-time-picker>\n </div>\n </aui-calendar-footer>\n</div>\n\n<ng-template\n #datePlaceholder\n let-placeholder=\"placeholder\"\n let-value=\"value\"\n>\n <span\n *ngIf=\"!value\"\n class=\"placeholder date-holder\"\n >{{ placeholder }}</span\n >\n <span\n *ngIf=\"value\"\n class=\"date-value date-holder\"\n >{{ value | date: FOOTER_DATE_FORMAT }}</span\n >\n</ng-template>\n", styles: [".aui-date-range-picker-panel__container{display:flex;flex-direction:column;width:524px;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}.aui-date-range-picker-panel__container .placeholder{color:rgb(var(--aui-color-placeholder-text))}.aui-date-range-picker-panel__container .placeholder.separator{margin-inline:12px}.aui-date-range-picker-panel__container .date-value{color:rgb(var(--aui-color-main-text))}.aui-date-range-picker-panel__container .date-holder{display:inline-block;margin-right:8px;width:82px}.aui-date-range-picker-panel__container .panel__wrapper{width:246px;display:flex;justify-content:center}.aui-date-range-picker-panel__header{display:flex;justify-content:space-between}.aui-date-range-picker-panel__header aui-calendar-header{flex:0 0 246px}.aui-date-range-picker-panel__body{display:flex;justify-content:space-between;margin:16px 0}.aui-date-range-picker-panel__footer .aui-time-picker{width:88px}.aui-date-range-picker-panel__footer-content{display:flex;align-items:center;height:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TimePickerComponent, selector: "aui-time-picker", inputs: ["format", "size", "placeholder", "clearable", "showIcon", "disableHours", "disableMinutes", "disableSeconds", "hourStep", "minuteStep", "secondStep", "footerTemplate"], outputs: ["open", "close"] }, { kind: "component", type: CalendarHeaderComponent, selector: "aui-calendar-header", inputs: ["dateNavRange", "anchor", "maxAvail", "minAvail"], outputs: ["navRangeChange", "anchorChange"] }, { kind: "component", type: CalendarFooterComponent, selector: "aui-calendar-footer", inputs: ["clearable", "clearText", "customAction"], outputs: ["confirm", "clear"] }, { kind: "component", type: PickerPanelComponent, selector: "aui-picker-panel", inputs: ["navRange", "type", "anchor", "selectedTime", "matchDates", "disabledDate", "weekStartDay", "minDate", "maxDate"], outputs: ["select", "hovered"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: I18nPipe, name: "auiI18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4587
4733
  }
4588
4734
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DateRangePickerPanelComponent, decorators: [{
4589
4735
  type: Component,
@@ -5652,7 +5798,7 @@ class DatePickerComponent extends CommonFormControl {
5652
5798
  useExisting: forwardRef(() => DatePickerComponent),
5653
5799
  multi: true,
5654
5800
  },
5655
- ], usesInheritance: true, ngImport: i0, template: "<aui-date-picker-trigger\n [size]=\"size\"\n [value]=\"value\"\n [format]=\"format\"\n style=\"display: flex\"\n [auiTooltip]=\"template\"\n [auiDisableAnimation]=\"true\"\n auiTooltipType=\"info\"\n auiTooltipClass=\"date-picker-wrapper\"\n [disabled]=\"!!disabled\"\n auiTooltipPosition=\"bottom start\"\n auiTooltipTrigger=\"click\"\n [auiTooltipDisabled]=\"!!disabled\"\n [auiTooltipHideOnClick]=\"true\"\n [placeholder]=\"placeholder\"\n (auiTooltipVisibleChange)=\"tooltipVisibleChange($event)\"\n (clear)=\"clearValue()\"\n #tooltip=\"auiTooltip\"\n></aui-date-picker-trigger>\n\n<ng-template #template>\n <aui-date-picker-panel\n [type]=\"type\"\n style=\"padding-top: 9px; display: inline-block\"\n [(ngModel)]=\"value\"\n [showTime]=\"showTime\"\n [showFooter]=\"showFooter\"\n [disabledDate]=\"disabledDate\"\n [disabledTime]=\"disabledTime\"\n [weekStartDay]=\"weekStartDay\"\n [extraFooter]=\"extraFooter\"\n [footerTemplate]=\"footerTemplate\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (click)=\"$event.stopImmediatePropagation()\"\n (clear)=\"clearValue()\"\n (confirm)=\"tooltip.hide(); emitValue(value)\"\n ></aui-date-picker-panel>\n</ng-template>\n", styles: ["aui-date-picker{display:inline-block;width:200px}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[auiTooltip]", inputs: ["auiTooltip", "auiTooltipContext", "auiTooltipClass", "auiTooltipType", "auiTooltipPosition", "auiTooltipTrigger", "auiTooltipDisabled", "auiTooltipHideOnClick", "auiDisableAnimation"], outputs: ["auiTooltipVisibleChange"], exportAs: ["auiTooltip"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DatePickerPanelComponent, selector: "aui-date-picker-panel", inputs: ["clearable", "clearText", "type", "showTime", "disabledDate", "disabledTime", "weekStartDay", "showFooter", "footerTemplate", "extraFooter", "minDate", "maxDate"], outputs: ["confirm", "clear"] }, { kind: "component", type: DatePickerTriggerComponent, selector: "aui-date-picker-trigger", inputs: ["format", "size", "isRange", "value", "clearable", "placeholder", "startPlaceholder", "endPlaceholder", "disabled"], outputs: ["blur", "clear"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5801
+ ], usesInheritance: true, ngImport: i0, template: "<aui-date-picker-trigger\n [size]=\"size\"\n [value]=\"value\"\n [format]=\"format\"\n style=\"display: flex\"\n [auiTooltip]=\"template\"\n [auiDisableAnimation]=\"true\"\n auiTooltipType=\"info\"\n auiTooltipClass=\"date-picker-wrapper\"\n [disabled]=\"!!disabled\"\n auiTooltipPosition=\"bottom start\"\n auiTooltipTrigger=\"click\"\n [auiTooltipDisabled]=\"!!disabled\"\n [auiTooltipHideOnClick]=\"true\"\n [placeholder]=\"placeholder\"\n (auiTooltipVisibleChange)=\"tooltipVisibleChange($event)\"\n (clear)=\"clearValue()\"\n #tooltip=\"auiTooltip\"\n></aui-date-picker-trigger>\n\n<ng-template #template>\n <aui-date-picker-panel\n [type]=\"type\"\n style=\"padding-top: 9px; display: inline-block\"\n [(ngModel)]=\"value\"\n [showTime]=\"showTime\"\n [showFooter]=\"showFooter\"\n [disabledDate]=\"disabledDate\"\n [disabledTime]=\"disabledTime\"\n [weekStartDay]=\"weekStartDay\"\n [extraFooter]=\"extraFooter\"\n [footerTemplate]=\"footerTemplate\"\n [clearable]=\"clearable\"\n [clearText]=\"clearText\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (click)=\"$event.stopImmediatePropagation()\"\n (clear)=\"clearValue()\"\n (confirm)=\"tooltip.hide(); emitValue(value)\"\n ></aui-date-picker-panel>\n</ng-template>\n", styles: ["aui-date-picker{display:inline-block;width:200px}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[auiTooltip]", inputs: ["auiTooltip", "auiTooltipContext", "auiTooltipClass", "auiTooltipType", "auiTooltipPosition", "auiTooltipTrigger", "auiTooltipDisabled", "auiTooltipHideOnClick", "auiDisableAnimation"], outputs: ["auiTooltipVisibleChange"], exportAs: ["auiTooltip"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DatePickerPanelComponent, selector: "aui-date-picker-panel", inputs: ["clearable", "clearText", "type", "selectedTime", "showTime", "disabledDate", "disabledTime", "weekStartDay", "showFooter", "footerTemplate", "extraFooter", "minDate", "maxDate"], outputs: ["confirm", "clear"] }, { kind: "component", type: DatePickerTriggerComponent, selector: "aui-date-picker-trigger", inputs: ["format", "size", "isRange", "value", "clearable", "placeholder", "startPlaceholder", "endPlaceholder", "disabled"], outputs: ["blur", "clear"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5656
5802
  }
5657
5803
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DatePickerComponent, decorators: [{
5658
5804
  type: Component,