ngx-tethys 19.1.0-next.5 → 19.1.0-next.7

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/color-picker/coordinates.directive.d.ts +1 -2
  3. package/date-picker/abstract-picker.component.d.ts +50 -52
  4. package/date-picker/abstract-picker.directive.d.ts +15 -40
  5. package/date-picker/base-picker.component.d.ts +12 -40
  6. package/date-picker/date-picker.config.d.ts +1 -0
  7. package/date-picker/lib/calendar/calendar-footer.component.d.ts +24 -19
  8. package/date-picker/lib/calendar/calendar-header.component.d.ts +15 -15
  9. package/date-picker/lib/calendar/calendar-table.component.d.ts +15 -16
  10. package/date-picker/lib/date/date-table-cell.component.d.ts +2 -3
  11. package/date-picker/lib/date/date-table.component.d.ts +2 -3
  12. package/date-picker/lib/date-carousel/date-carousel.component.d.ts +2 -3
  13. package/date-picker/lib/decade/decade-header.component.d.ts +2 -5
  14. package/date-picker/lib/decade/decade-table.component.d.ts +3 -5
  15. package/date-picker/lib/month/month-table.component.d.ts +1 -2
  16. package/date-picker/lib/popups/date-popup.component.d.ts +33 -34
  17. package/date-picker/lib/popups/inner-popup.component.d.ts +22 -29
  18. package/date-picker/lib/quarter/quarter-table.component.d.ts +1 -4
  19. package/date-picker/lib/year/year-header.component.d.ts +2 -4
  20. package/date-picker/lib/year/year-table.component.d.ts +2 -4
  21. package/date-picker/month-picker.component.d.ts +2 -2
  22. package/date-picker/picker.component.d.ts +31 -36
  23. package/date-picker/picker.pipes.d.ts +4 -5
  24. package/date-picker/picker.util.d.ts +5 -5
  25. package/date-picker/picker.validators.d.ts +4 -8
  26. package/date-picker/quarter-picker.component.d.ts +2 -3
  27. package/date-picker/week-picker.component.d.ts +0 -1
  28. package/date-picker/year-picker.component.d.ts +2 -3
  29. package/dropdown/dropdown-menu.component.d.ts +1 -1
  30. package/dropdown/dropdown.directive.d.ts +4 -3
  31. package/fesm2022/ngx-tethys-autocomplete.mjs +4 -4
  32. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-checkbox.mjs +2 -2
  34. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  35. package/fesm2022/ngx-tethys-color-picker.mjs +4 -6
  36. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  37. package/fesm2022/ngx-tethys-copy.mjs +2 -2
  38. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  39. package/fesm2022/ngx-tethys-date-picker.mjs +841 -1068
  40. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  41. package/fesm2022/ngx-tethys-dropdown.mjs +9 -11
  42. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  43. package/fesm2022/ngx-tethys-flexible-text.mjs +4 -5
  44. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-i18n.mjs +11 -6
  46. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-image.mjs +5 -7
  48. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-layout.mjs +291 -334
  50. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-list.mjs +147 -166
  52. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-message.mjs +1 -2
  54. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-radio.mjs +4 -4
  56. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-select.mjs +164 -228
  58. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  59. package/fesm2022/ngx-tethys-shared.mjs +386 -569
  60. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-skeleton.mjs +1 -2
  62. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-table.mjs +1 -2
  64. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-tooltip.mjs +109 -93
  66. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-tree-select.mjs +215 -281
  68. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys.mjs +1 -1
  70. package/fesm2022/ngx-tethys.mjs.map +1 -1
  71. package/i18n/i18n.d.ts +2 -1
  72. package/i18n/locales/de-de.d.ts +2 -1
  73. package/i18n/locales/en-us.d.ts +2 -1
  74. package/i18n/locales/ja-jp.d.ts +2 -1
  75. package/i18n/locales/zh-hans.d.ts +2 -1
  76. package/i18n/locales/zh-hant.d.ts +2 -1
  77. package/image/preview/image-preview.component.d.ts +2 -2
  78. package/layout/header.component.d.ts +15 -19
  79. package/layout/layout.component.d.ts +3 -2
  80. package/layout/sidebar-header.component.d.ts +7 -8
  81. package/layout/sidebar.component.d.ts +32 -62
  82. package/list/selection/selection-list.d.ts +33 -46
  83. package/package.json +1 -1
  84. package/schematics/version.d.ts +1 -1
  85. package/schematics/version.js +1 -1
  86. package/select/custom-select/custom-select.component.d.ts +33 -56
  87. package/select/native-select/native-select.component.d.ts +7 -13
  88. package/shared/base-form-check.component.d.ts +6 -8
  89. package/shared/directives/string-or-template-outlet.directive.d.ts +5 -6
  90. package/shared/directives/thy-autofocus.directive.d.ts +4 -6
  91. package/shared/directives/thy-contextmenu.directive.d.ts +2 -2
  92. package/shared/directives/thy-ctrl-enter.directive.d.ts +2 -2
  93. package/shared/directives/thy-enter.directive.d.ts +2 -2
  94. package/shared/directives/thy-scroll.directive.d.ts +5 -8
  95. package/shared/directives/thy-show.d.ts +5 -6
  96. package/shared/directives/thy-stop-propagation.directive.d.ts +4 -4
  97. package/shared/directives/view-outlet.directive.d.ts +6 -7
  98. package/shared/ng-transclude.directive.d.ts +2 -3
  99. package/shared/option/group/option-group.component.d.ts +5 -9
  100. package/shared/option/list-option/list-option.component.d.ts +9 -13
  101. package/shared/option/option.component.d.ts +10 -17
  102. package/shared/option/option.token.d.ts +4 -3
  103. package/shared/option/options-container.component.d.ts +1 -1
  104. package/shared/select/select-control/select-control.component.d.ts +27 -47
  105. package/table/table-column.component.d.ts +15 -5
  106. package/tooltip/tooltip.directive.d.ts +20 -22
  107. package/tree-select/tree-select.component.d.ts +53 -70
@@ -1,10 +1,10 @@
1
- import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
1
+ import { CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
2
2
  import { formatDate, NgClass, NgTemplateOutlet, CommonModule, isPlatformBrowser, registerLocaleData } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, inject, EventEmitter, Output, Input, Directive, ChangeDetectionStrategy, Component, InjectionToken, Pipe, ChangeDetectorRef, forwardRef, HostBinding, input, computed, NgModule, ViewChild, ElementRef, PLATFORM_ID, NgZone, numberAttribute } from '@angular/core';
4
+ import { Injectable, inject, input, model, output, effect, Directive, ChangeDetectionStrategy, Component, signal, InjectionToken, Pipe, ChangeDetectorRef, forwardRef, computed, NgModule, viewChild, DestroyRef, linkedSignal, Input, ElementRef, PLATFORM_ID, NgZone, numberAttribute } from '@angular/core';
5
5
  import localeZhHans from '@angular/common/locales/zh-Hans';
6
- import { TinyDate, coerceBooleanProperty, subDays, startOfDay, startOfWeek, addDays, addWeeks, helpers, coerceArray, isTemplateRef, isEmpty, isString, isFunction, isUndefinedOrNull, valueFunctionProp, endOfDay, sortRangeValue, elementMatchClosest, warnDeprecation } from 'ngx-tethys/util';
7
- import { injectLocale, ThyI18nService, ThyLocaleType } from 'ngx-tethys/i18n';
6
+ import { coerceBooleanProperty, TinyDate, subDays, startOfDay, startOfWeek, addDays, addWeeks, helpers, coerceArray, isTemplateRef, isEmpty, isString, isFunction, isUndefinedOrNull, valueFunctionProp, endOfDay, sortRangeValue, elementMatchClosest, warnDeprecation } from 'ngx-tethys/util';
7
+ import { injectLocale, ThyI18nService } from 'ngx-tethys/i18n';
8
8
  import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
9
9
  import * as i1 from '@angular/forms';
10
10
  import { FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
@@ -19,7 +19,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
19
19
  import { ThyEnterDirective } from 'ngx-tethys/shared';
20
20
  import { useHostRenderer } from '@tethys/cdk/dom';
21
21
  import { ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
22
- import { tap, mapTo, takeUntil, debounceTime } from 'rxjs/operators';
22
+ import { tap, mapTo, debounceTime } from 'rxjs/operators';
23
23
 
24
24
  function DATE_HELPER_SERVICE_FACTORY() {
25
25
  return new DateHelperByDatePipe();
@@ -61,23 +61,21 @@ class CalendarHeader {
61
61
  constructor() {
62
62
  this.dateHelper = inject(DateHelperService);
63
63
  this.locale = injectLocale('datePicker');
64
- this.showSuperPreBtn = true;
65
- this.showSuperNextBtn = true;
66
- this.showPreBtn = true;
67
- this.showNextBtn = true;
68
- this.valueChange = new EventEmitter();
69
- this.panelModeChange = new EventEmitter();
64
+ this.showSuperPreBtn = input(true, { transform: coerceBooleanProperty });
65
+ this.showSuperNextBtn = input(true, { transform: coerceBooleanProperty });
66
+ this.showPreBtn = input(true, { transform: coerceBooleanProperty });
67
+ this.showNextBtn = input(true, { transform: coerceBooleanProperty });
68
+ this.value = model();
69
+ this.valueChange = output();
70
+ this.panelModeChange = output();
70
71
  this.prefixCls = 'thy-calendar';
72
+ effect(() => {
73
+ this.render();
74
+ });
71
75
  }
72
76
  ngOnInit() {
73
- if (!this.value) {
74
- this.value = new TinyDate();
75
- }
76
- this.selectors = this.getSelectors();
77
- }
78
- ngOnChanges(changes) {
79
- if (changes.value) {
80
- this.render();
77
+ if (!this.value()) {
78
+ this.value.set(new TinyDate());
81
79
  }
82
80
  }
83
81
  superPrevious() {
@@ -100,46 +98,32 @@ class CalendarHeader {
100
98
  return selector ? selector.onClick() : null;
101
99
  }
102
100
  render() {
103
- if (this.value) {
101
+ if (this.value()) {
104
102
  this.selectors = this.getSelectors();
105
103
  }
106
104
  }
107
105
  gotoMonth(amount) {
108
- this.changeValue(this.value.addMonths(amount));
106
+ this.changeValue(this.value().addMonths(amount));
109
107
  }
110
108
  gotoYear(amount) {
111
- this.changeValue(this.value.addYears(amount));
109
+ this.changeValue(this.value().addYears(amount));
112
110
  }
113
111
  changeValue(value) {
114
- if (this.value !== value) {
115
- this.value = value;
116
- this.valueChange.emit(this.value);
117
- this.render();
112
+ if (this.value() !== value) {
113
+ this.value.set(value);
114
+ this.valueChange.emit(value);
118
115
  }
119
116
  }
120
117
  formatDateTime(format) {
121
- return this.dateHelper.format(this.value.nativeDate, format);
118
+ const date = this.value().nativeDate;
119
+ return this.dateHelper.format(date, format);
122
120
  }
123
121
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
124
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: CalendarHeader, isStandalone: true, inputs: { showSuperPreBtn: "showSuperPreBtn", showSuperNextBtn: "showSuperNextBtn", showPreBtn: "showPreBtn", showNextBtn: "showNextBtn", value: "value" }, outputs: { valueChange: "valueChange", panelModeChange: "panelModeChange" }, usesOnChanges: true, ngImport: i0 }); }
122
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: CalendarHeader, isStandalone: true, inputs: { showSuperPreBtn: { classPropertyName: "showSuperPreBtn", publicName: "showSuperPreBtn", isSignal: true, isRequired: false, transformFunction: null }, showSuperNextBtn: { classPropertyName: "showSuperNextBtn", publicName: "showSuperNextBtn", isSignal: true, isRequired: false, transformFunction: null }, showPreBtn: { classPropertyName: "showPreBtn", publicName: "showPreBtn", isSignal: true, isRequired: false, transformFunction: null }, showNextBtn: { classPropertyName: "showNextBtn", publicName: "showNextBtn", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange", panelModeChange: "panelModeChange" }, ngImport: i0 }); }
125
123
  }
126
124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarHeader, decorators: [{
127
125
  type: Directive
128
- }], propDecorators: { showSuperPreBtn: [{
129
- type: Input
130
- }], showSuperNextBtn: [{
131
- type: Input
132
- }], showPreBtn: [{
133
- type: Input
134
- }], showNextBtn: [{
135
- type: Input
136
- }], value: [{
137
- type: Input
138
- }], valueChange: [{
139
- type: Output
140
- }], panelModeChange: [{
141
- type: Output
142
- }] } });
126
+ }], ctorParameters: () => [] });
143
127
 
144
128
  /**
145
129
  * @private
@@ -156,11 +140,11 @@ class MonthHeader extends CalendarHeader {
156
140
  ];
157
141
  }
158
142
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MonthHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
159
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: MonthHeader, isStandalone: true, selector: "month-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
143
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: MonthHeader, isStandalone: true, selector: "month-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
160
144
  }
161
145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MonthHeader, decorators: [{
162
146
  type: Component,
163
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'month-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
147
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'month-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
164
148
  }] });
165
149
 
166
150
  /**
@@ -168,91 +152,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
168
152
  */
169
153
  class CalendarFooter {
170
154
  constructor() {
171
- this.showTime = false;
172
- this.mustShowTime = false;
173
- this.disableTimeConfirm = false;
174
- this.selectTime = new EventEmitter();
175
- this.clickOk = new EventEmitter();
176
- this.clickRemove = new EventEmitter();
177
- this.showTimePickerChange = new EventEmitter();
178
- this.isShowTime = false;
179
- this.isCanTime = false;
155
+ /**
156
+ * 是否支持设置时间 (时、分)
157
+ */
158
+ this.showTime = input(false, { transform: coerceBooleanProperty });
159
+ /**
160
+ * 是否展示时间 (时、分)
161
+ */
162
+ this.mustShowTime = input(false, { transform: coerceBooleanProperty });
163
+ this.value = model();
164
+ this.timeZone = input();
165
+ this.disableTimeConfirm = input(false, { transform: coerceBooleanProperty });
166
+ this.selectTime = output();
167
+ this.clickOk = output();
168
+ this.clickRemove = output();
169
+ this.showTimePickerChange = output();
170
+ this.isShowTime = signal(false);
171
+ this.isCanTime = signal(false);
180
172
  this.locale = injectLocale('datePicker');
173
+ effect(() => {
174
+ this.initTimeShowMode();
175
+ });
181
176
  }
182
177
  ngOnInit() {
183
- this._initTimeShowMode();
184
- if (!this.value) {
185
- this.value = new TinyDate(undefined, this.timeZone);
186
- }
178
+ this.initValue();
187
179
  }
188
- ngOnChanges(changes) {
189
- if (changes.mustShowTime) {
190
- this._initTimeShowMode();
180
+ initValue() {
181
+ if (!this.value()) {
182
+ const defaultDate = new TinyDate(undefined, this.timeZone());
183
+ this.value.set(defaultDate);
191
184
  }
192
185
  }
193
186
  onSelectTime(date) {
194
- this.selectTime.emit(new TinyDate(date, this.timeZone));
187
+ this.selectTime.emit(new TinyDate(date, this.timeZone()));
195
188
  }
196
189
  onTimeOk() {
197
- if (this.disableTimeConfirm) {
190
+ if (this.disableTimeConfirm()) {
198
191
  return;
199
192
  }
200
- this.selectTime.emit(this.value);
193
+ this.selectTime.emit(this.value());
201
194
  this.clickOk.emit();
202
195
  }
203
196
  onClear() {
204
- this.value = null;
197
+ this.value.set(null);
205
198
  this.clickRemove.emit();
206
199
  }
207
200
  changeTimeShowMode(type) {
208
- switch (type) {
209
- case 'can':
210
- this.isCanTime = true;
211
- this.isShowTime = false;
212
- break;
213
- case 'show':
214
- this.isCanTime = false;
215
- this.isShowTime = true;
216
- break;
217
- }
218
- this.showTimePickerChange.emit(this.isShowTime);
201
+ this.isCanTime.set(type === 'can');
202
+ this.isShowTime.set(type === 'show');
203
+ this.showTimePickerChange.emit(this.isShowTime());
219
204
  }
220
- _initTimeShowMode() {
221
- if (this.mustShowTime) {
205
+ initTimeShowMode() {
206
+ if (this.mustShowTime()) {
222
207
  this.changeTimeShowMode('show');
223
208
  }
224
209
  else {
225
- if (this.showTime) {
210
+ if (this.showTime()) {
226
211
  this.changeTimeShowMode('can');
227
212
  }
228
213
  }
229
214
  }
230
215
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
231
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: CalendarFooter, isStandalone: true, selector: "calendar-footer", inputs: { showTime: "showTime", mustShowTime: "mustShowTime", value: "value", timeZone: "timeZone", disableTimeConfirm: ["disableTimeConfirm", "disableTimeConfirm", coerceBooleanProperty] }, outputs: { selectTime: "selectTime", clickOk: "clickOk", clickRemove: "clickRemove", showTimePickerChange: "showTimePickerChange" }, exportAs: ["calendarFooter"], usesOnChanges: true, ngImport: i0, template: "@if (isShowTime || isCanTime) {\n <div class=\"time-picker-section\" (click)=\"$event.stopPropagation()\">\n @if (isCanTime) {\n <a href=\"javascript:;\" class=\"link-has-icon time-picker-set-btn\" (click)=\"changeTimeShowMode('show')\">\n <thy-icon thyIconName=\"clock-circle\"></thy-icon>{{ locale().setTime }}\n </a>\n }\n @if (isShowTime) {\n <thy-inner-time-picker\n class=\"time-picker-wrap\"\n [showMeridian]=\"false\"\n [timeZone]=\"timeZone\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onSelectTime($event)\"></thy-inner-time-picker>\n }\n <div class=\"time-picker-btn-wrap\">\n @if (!isCanTime) {\n <button [disabled]=\"disableTimeConfirm\" class=\"time-picker-ok-btn\" thyButton=\"primary\" thySize=\"sm\" (click)=\"onTimeOk()\">\n {{ locale().ok }}\n </button>\n }\n <button class=\"time-picker-clear-btn\" thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"onClear()\">{{ locale().clear }}</button>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyInnerTimePicker, selector: "thy-inner-time-picker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowKeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "timeZone"], outputs: ["disabledChange", "isValid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
216
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: CalendarFooter, isStandalone: true, selector: "calendar-footer", inputs: { showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, mustShowTime: { classPropertyName: "mustShowTime", publicName: "mustShowTime", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, disableTimeConfirm: { classPropertyName: "disableTimeConfirm", publicName: "disableTimeConfirm", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectTime: "selectTime", clickOk: "clickOk", clickRemove: "clickRemove", showTimePickerChange: "showTimePickerChange" }, exportAs: ["calendarFooter"], ngImport: i0, template: "@let showTime = isShowTime();\n@let canTime = isCanTime();\n\n@if (showTime || canTime) {\n <div class=\"time-picker-section\" (click)=\"$event.stopPropagation()\">\n @if (canTime) {\n <a href=\"javascript:;\" class=\"link-has-icon time-picker-set-btn\" (click)=\"changeTimeShowMode('show')\">\n <thy-icon thyIconName=\"clock-circle\"></thy-icon>{{ locale().setTime }}\n </a>\n }\n @if (showTime) {\n <thy-inner-time-picker\n class=\"time-picker-wrap\"\n [showMeridian]=\"false\"\n [timeZone]=\"timeZone()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onSelectTime($event)\"></thy-inner-time-picker>\n }\n <div class=\"time-picker-btn-wrap\">\n @if (!canTime) {\n <button [disabled]=\"disableTimeConfirm()\" class=\"time-picker-ok-btn\" thyButton=\"primary\" thySize=\"sm\" (click)=\"onTimeOk()\">\n {{ locale().ok }}\n </button>\n }\n <button class=\"time-picker-clear-btn\" thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"onClear()\">{{ locale().clear }}</button>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyInnerTimePicker, selector: "thy-inner-time-picker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowKeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "timeZone"], outputs: ["disabledChange", "isValid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
232
217
  }
233
218
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarFooter, decorators: [{
234
219
  type: Component,
235
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'calendar-footer', exportAs: 'calendarFooter', imports: [ThyIcon, ThyInnerTimePicker, FormsModule, ThyButton], template: "@if (isShowTime || isCanTime) {\n <div class=\"time-picker-section\" (click)=\"$event.stopPropagation()\">\n @if (isCanTime) {\n <a href=\"javascript:;\" class=\"link-has-icon time-picker-set-btn\" (click)=\"changeTimeShowMode('show')\">\n <thy-icon thyIconName=\"clock-circle\"></thy-icon>{{ locale().setTime }}\n </a>\n }\n @if (isShowTime) {\n <thy-inner-time-picker\n class=\"time-picker-wrap\"\n [showMeridian]=\"false\"\n [timeZone]=\"timeZone\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onSelectTime($event)\"></thy-inner-time-picker>\n }\n <div class=\"time-picker-btn-wrap\">\n @if (!isCanTime) {\n <button [disabled]=\"disableTimeConfirm\" class=\"time-picker-ok-btn\" thyButton=\"primary\" thySize=\"sm\" (click)=\"onTimeOk()\">\n {{ locale().ok }}\n </button>\n }\n <button class=\"time-picker-clear-btn\" thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"onClear()\">{{ locale().clear }}</button>\n </div>\n </div>\n}\n" }]
236
- }], propDecorators: { showTime: [{
237
- type: Input
238
- }], mustShowTime: [{
239
- type: Input
240
- }], value: [{
241
- type: Input
242
- }], timeZone: [{
243
- type: Input
244
- }], disableTimeConfirm: [{
245
- type: Input,
246
- args: [{ transform: coerceBooleanProperty }]
247
- }], selectTime: [{
248
- type: Output
249
- }], clickOk: [{
250
- type: Output
251
- }], clickRemove: [{
252
- type: Output
253
- }], showTimePickerChange: [{
254
- type: Output
255
- }] } });
220
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'calendar-footer', exportAs: 'calendarFooter', imports: [ThyIcon, ThyInnerTimePicker, FormsModule, ThyButton], template: "@let showTime = isShowTime();\n@let canTime = isCanTime();\n\n@if (showTime || canTime) {\n <div class=\"time-picker-section\" (click)=\"$event.stopPropagation()\">\n @if (canTime) {\n <a href=\"javascript:;\" class=\"link-has-icon time-picker-set-btn\" (click)=\"changeTimeShowMode('show')\">\n <thy-icon thyIconName=\"clock-circle\"></thy-icon>{{ locale().setTime }}\n </a>\n }\n @if (showTime) {\n <thy-inner-time-picker\n class=\"time-picker-wrap\"\n [showMeridian]=\"false\"\n [timeZone]=\"timeZone()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onSelectTime($event)\"></thy-inner-time-picker>\n }\n <div class=\"time-picker-btn-wrap\">\n @if (!canTime) {\n <button [disabled]=\"disableTimeConfirm()\" class=\"time-picker-ok-btn\" thyButton=\"primary\" thySize=\"sm\" (click)=\"onTimeOk()\">\n {{ locale().ok }}\n </button>\n }\n <button class=\"time-picker-clear-btn\" thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"onClear()\">{{ locale().clear }}</button>\n </div>\n </div>\n}\n" }]
221
+ }], ctorParameters: () => [] });
256
222
 
257
223
  /**
258
224
  * @deprecated
@@ -300,6 +266,7 @@ const DEFAULT_DATE_PICKER_CONFIG = {
300
266
  ];
301
267
  }
302
268
  };
269
+ const QUARTER_FORMAT = "'Q'q";
303
270
  const THY_DATE_PICKER_CONFIG = new InjectionToken('thy-date-picker-config');
304
271
  function useDatePickerDefaultConfig() {
305
272
  const locale = injectLocale('datePicker');
@@ -440,7 +407,7 @@ function getFlexibleAdvancedReadableValue(tinyDates, flexibleDateGranularity, se
440
407
  }
441
408
  switch (flexibleDateGranularity) {
442
409
  case 'year':
443
- const yearFormatStr = locale()?.id === ThyLocaleType.zhHans ? `yyyy年` : `yyyy`;
410
+ const yearFormatStr = locale().datePicker.yearFormat;
444
411
  if (tinyDates[0].isSameYear(tinyDates[1])) {
445
412
  value = `${tinyDates[0].format(yearFormatStr)}`;
446
413
  }
@@ -449,7 +416,7 @@ function getFlexibleAdvancedReadableValue(tinyDates, flexibleDateGranularity, se
449
416
  }
450
417
  break;
451
418
  case 'quarter':
452
- const quarterFormatStr = locale()?.id === ThyLocaleType.zhHans ? `yyyy年 qqq` : `yyyy-qqq`;
419
+ const quarterFormatStr = locale().datePicker.yearQuarterFormat;
453
420
  if (tinyDates[0].isSameQuarter(tinyDates[1])) {
454
421
  value = `${tinyDates[0].format(quarterFormatStr)}`;
455
422
  }
@@ -458,7 +425,7 @@ function getFlexibleAdvancedReadableValue(tinyDates, flexibleDateGranularity, se
458
425
  }
459
426
  break;
460
427
  case 'month':
461
- const monthFormatStr = locale()?.id === ThyLocaleType.zhHans ? `yyyy年 MM月` : `yyyy-MM`;
428
+ const monthFormatStr = locale().datePicker.yearMonthFormat;
462
429
  if (tinyDates[0].isSameMonth(tinyDates[1])) {
463
430
  value = `${tinyDates[0].format(monthFormatStr)}`;
464
431
  }
@@ -657,9 +624,9 @@ class ThyQuarterPickerFormatPipe {
657
624
  this.datePickerConfigService = datePickerConfigService;
658
625
  }
659
626
  transform(originalValue, formatStr, separator) {
660
- const { value, withTime } = transformDateValue(originalValue);
627
+ const { value } = transformDateValue(originalValue);
661
628
  if (!formatStr) {
662
- formatStr = 'yyyy-qqq';
629
+ formatStr = `yyyy-${QUARTER_FORMAT}`;
663
630
  }
664
631
  if (!value) {
665
632
  return;
@@ -690,9 +657,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
690
657
  * @private
691
658
  */
692
659
  class ThyDatePickerFormatStringPipe {
693
- constructor() {
694
- this.dateHelper = inject(DateHelperService);
695
- }
696
660
  transform(originalValue) {
697
661
  const { withTime } = transformDateValue(originalValue);
698
662
  return withTime ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd';
@@ -732,7 +696,7 @@ class DateCarousel {
732
696
  this.cdr = inject(ChangeDetectorRef);
733
697
  this.dateHelper = inject(DateHelperService);
734
698
  this.locale = injectLocale('datePicker');
735
- this.className = 'thy-date-picker-advanced-carousel';
699
+ this.activeDate = input();
736
700
  this.selectableData = {};
737
701
  this.selectedValue = [];
738
702
  this.initialized = false;
@@ -914,7 +878,7 @@ class DateCarousel {
914
878
  this.cdr.markForCheck();
915
879
  }
916
880
  getSelectableYear(currentDate, preOrNextcount = 0) {
917
- currentDate = currentDate || this.activeDate || new TinyDate().startOfYear();
881
+ currentDate = currentDate || this.activeDate() || new TinyDate().startOfYear();
918
882
  return {
919
883
  type: 'year',
920
884
  content: `${currentDate.addYears(preOrNextcount).getYear()}`,
@@ -924,17 +888,17 @@ class DateCarousel {
924
888
  };
925
889
  }
926
890
  getSelectableQuarter(currentDate, preOrNextcount = 0) {
927
- currentDate = currentDate || this.activeDate || new TinyDate().startOfQuarter();
891
+ currentDate = currentDate || this.activeDate() || new TinyDate().startOfQuarter();
928
892
  return {
929
893
  type: 'quarter',
930
- content: `${currentDate.addQuarters(preOrNextcount).format('qqq')}`,
894
+ content: `${currentDate.addQuarters(preOrNextcount).format(QUARTER_FORMAT)}`,
931
895
  startValue: currentDate.addQuarters(preOrNextcount).startOfQuarter(),
932
896
  endValue: currentDate.addQuarters(preOrNextcount).endOfQuarter(),
933
897
  classMap: {}
934
898
  };
935
899
  }
936
900
  getSelectableMonth(currentDate, preOrNextcount = 0) {
937
- currentDate = currentDate || this.activeDate || new TinyDate().startOfMonth();
901
+ currentDate = currentDate || this.activeDate() || new TinyDate().startOfMonth();
938
902
  // Selectable months for advanced range selector
939
903
  const cell = {
940
904
  type: 'month',
@@ -1077,7 +1041,7 @@ class DateCarousel {
1077
1041
  this.selectedValueChange$.complete();
1078
1042
  }
1079
1043
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateCarousel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1080
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateCarousel, isStandalone: true, selector: "date-carousel", inputs: { activeDate: "activeDate" }, host: { properties: { "class": "this.className" } }, providers: [
1044
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateCarousel, isStandalone: true, selector: "date-carousel", inputs: { activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-date-picker-advanced-carousel" }, providers: [
1081
1045
  {
1082
1046
  provide: NG_VALUE_ACCESSOR,
1083
1047
  multi: true,
@@ -1093,13 +1057,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
1093
1057
  multi: true,
1094
1058
  useExisting: forwardRef(() => DateCarousel)
1095
1059
  }
1096
- ], imports: [NgTemplateOutlet, ThyButton, ThyIcon, NgClass, DatePickerAdvancedShowYearTipPipe], template: "<ng-container\n *ngTemplateOutlet=\"carouselItem; context: { title: locale().yearText, type: 'year', selectableData: selectableData.year }\"></ng-container>\n\n<ng-container\n *ngTemplateOutlet=\"\n carouselItem;\n context: { title: locale().quarterText, type: 'quarter', selectableData: selectableData.quarter }\n \"></ng-container>\n\n<ng-container\n *ngTemplateOutlet=\"\n carouselItem;\n context: { title: locale().monthText, type: 'month', selectableData: selectableData.month }\n \"></ng-container>\n\n<ng-template #carouselItem let-title=\"title\" let-selectableData=\"selectableData\" let-type=\"type\">\n <div class=\"carousel-item carousel-item-{{ type }}\">\n <p class=\"carousel-item-title\">{{ title }}</p>\n <div class=\"carousel-item-content\">\n <button thyButton=\"outline-default\" thySize=\"sm\" class=\"right-space\" (click)=\"prevClick(type)\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </button>\n @for (item of selectableData; track $index) {\n <div\n class=\"selectable-button right-space\"\n (click)=\"selectDate(type, item)\"\n (mouseenter)=\"onMouseenter($event, type, item)\"\n (mouseleave)=\"onMouseleave($event, type, item)\"\n [ngClass]=\"item.classMap\">\n @if (item | showYearTip: type) {\n <span class=\"year-tip\">{{ item?.startValue?.getYear() }}</span>\n }\n @if (item.isInRange && isSelected(item)) {\n <thy-icon thyIconName=\"close\"></thy-icon>\n }\n @if (item.isInRange && !isSelected(item)) {\n <thy-icon thyIconName=\"plus\"></thy-icon>\n }\n @if (!item.isInRange) {\n <span>{{ item?.content }}</span>\n }\n </div>\n }\n <button thyButton=\"outline-default\" thySize=\"sm\" (click)=\"nextClick(type)\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </button>\n </div>\n </div>\n</ng-template>\n" }]
1097
- }], propDecorators: { className: [{
1098
- type: HostBinding,
1099
- args: ['class']
1100
- }], activeDate: [{
1101
- type: Input
1102
- }] } });
1060
+ ], host: {
1061
+ class: 'thy-date-picker-advanced-carousel'
1062
+ }, imports: [NgTemplateOutlet, ThyButton, ThyIcon, NgClass, DatePickerAdvancedShowYearTipPipe], template: "<ng-container\n *ngTemplateOutlet=\"carouselItem; context: { title: locale().yearText, type: 'year', selectableData: selectableData.year }\"></ng-container>\n\n<ng-container\n *ngTemplateOutlet=\"\n carouselItem;\n context: { title: locale().quarterText, type: 'quarter', selectableData: selectableData.quarter }\n \"></ng-container>\n\n<ng-container\n *ngTemplateOutlet=\"\n carouselItem;\n context: { title: locale().monthText, type: 'month', selectableData: selectableData.month }\n \"></ng-container>\n\n<ng-template #carouselItem let-title=\"title\" let-selectableData=\"selectableData\" let-type=\"type\">\n <div class=\"carousel-item carousel-item-{{ type }}\">\n <p class=\"carousel-item-title\">{{ title }}</p>\n <div class=\"carousel-item-content\">\n <button thyButton=\"outline-default\" thySize=\"sm\" class=\"right-space\" (click)=\"prevClick(type)\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </button>\n @for (item of selectableData; track $index) {\n <div\n class=\"selectable-button right-space\"\n (click)=\"selectDate(type, item)\"\n (mouseenter)=\"onMouseenter($event, type, item)\"\n (mouseleave)=\"onMouseleave($event, type, item)\"\n [ngClass]=\"item.classMap\">\n @if (item | showYearTip: type) {\n <span class=\"year-tip\">{{ item?.startValue?.getYear() }}</span>\n }\n @if (item.isInRange && isSelected(item)) {\n <thy-icon thyIconName=\"close\"></thy-icon>\n }\n @if (item.isInRange && !isSelected(item)) {\n <thy-icon thyIconName=\"plus\"></thy-icon>\n }\n @if (!item.isInRange) {\n <span>{{ item?.content }}</span>\n }\n </div>\n }\n <button thyButton=\"outline-default\" thySize=\"sm\" (click)=\"nextClick(type)\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </button>\n </div>\n </div>\n</ng-template>\n" }]
1063
+ }] });
1103
1064
 
1104
1065
  /**
1105
1066
  * @private
@@ -1124,11 +1085,11 @@ class DateHeader extends CalendarHeader {
1124
1085
  ];
1125
1086
  }
1126
1087
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1127
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateHeader, isStandalone: true, selector: "date-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1088
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateHeader, isStandalone: true, selector: "date-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1128
1089
  }
1129
1090
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateHeader, decorators: [{
1130
1091
  type: Component,
1131
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
1092
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
1132
1093
  }] });
1133
1094
 
1134
1095
  /**
@@ -1142,16 +1103,20 @@ class CalendarTable {
1142
1103
  this.bodyRows = [];
1143
1104
  this.MAX_ROW = 6;
1144
1105
  this.MAX_COL = 7;
1145
- this.prefixCls = 'thy-calendar';
1146
- this.activeDate = new TinyDate();
1147
- this.showWeek = false;
1148
- this.selectedValue = []; // Range ONLY
1149
- this.hoverValue = []; // Range ONLY
1150
- this.valueChange = new EventEmitter();
1151
- this.cellHover = new EventEmitter(); // Emitted when hover on a day by mouse enter
1106
+ this.prefixCls = input('thy-calendar');
1107
+ this.value = model();
1108
+ this.activeDate = model(new TinyDate());
1109
+ this.showWeek = input(false, { transform: coerceBooleanProperty });
1110
+ this.selectedValue = input([]);
1111
+ this.hoverValue = input([]);
1112
+ this.timeZone = input();
1113
+ this.disabledDate = input();
1114
+ this.cellRender = input();
1115
+ this.valueChange = output();
1116
+ this.cellHover = output(); // Emitted when hover on a day by mouse enter
1152
1117
  }
1153
1118
  render() {
1154
- if (this.activeDate) {
1119
+ if (this.activeDate()) {
1155
1120
  this.headRow = this.makeHeadRow();
1156
1121
  this.bodyRows = this.makeBodyRows();
1157
1122
  }
@@ -1163,14 +1128,14 @@ class CalendarTable {
1163
1128
  return item.trackByIndex;
1164
1129
  }
1165
1130
  hasRangeValue() {
1166
- return this.selectedValue?.length > 0 || this.hoverValue?.length > 0;
1131
+ return this.selectedValue()?.length > 0 || this.hoverValue()?.length > 0;
1167
1132
  }
1168
1133
  ngOnInit() {
1169
1134
  this.render();
1170
1135
  }
1171
1136
  ngOnChanges(changes) {
1172
1137
  if (changes.activeDate && !changes.activeDate.currentValue) {
1173
- this.activeDate = new TinyDate(undefined, this.timeZone);
1138
+ this.activeDate.set(new TinyDate(undefined, this.timeZone()));
1174
1139
  }
1175
1140
  if (changes.disabledDate ||
1176
1141
  changes.locale ||
@@ -1204,41 +1169,18 @@ class CalendarTable {
1204
1169
  return (!left && !right) || (left && right && right.isSameDay(left));
1205
1170
  }
1206
1171
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarTable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1207
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: CalendarTable, isStandalone: true, inputs: { prefixCls: "prefixCls", value: "value", activeDate: "activeDate", showWeek: "showWeek", selectedValue: "selectedValue", hoverValue: "hoverValue", timeZone: "timeZone", disabledDate: "disabledDate", cellRender: "cellRender", fullCellRender: "fullCellRender" }, outputs: { valueChange: "valueChange", cellHover: "cellHover" }, usesOnChanges: true, ngImport: i0 }); }
1172
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: CalendarTable, isStandalone: true, inputs: { prefixCls: { classPropertyName: "prefixCls", publicName: "prefixCls", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: false, transformFunction: null }, showWeek: { classPropertyName: "showWeek", publicName: "showWeek", isSignal: true, isRequired: false, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, hoverValue: { classPropertyName: "hoverValue", publicName: "hoverValue", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, cellRender: { classPropertyName: "cellRender", publicName: "cellRender", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", activeDate: "activeDateChange", valueChange: "valueChange", cellHover: "cellHover" }, usesOnChanges: true, ngImport: i0 }); }
1208
1173
  }
1209
1174
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarTable, decorators: [{
1210
1175
  type: Directive
1211
- }], ctorParameters: () => [], propDecorators: { prefixCls: [{
1212
- type: Input
1213
- }], value: [{
1214
- type: Input
1215
- }], activeDate: [{
1216
- type: Input
1217
- }], showWeek: [{
1218
- type: Input
1219
- }], selectedValue: [{
1220
- type: Input
1221
- }], hoverValue: [{
1222
- type: Input
1223
- }], timeZone: [{
1224
- type: Input
1225
- }], disabledDate: [{
1226
- type: Input
1227
- }], cellRender: [{
1228
- type: Input
1229
- }], fullCellRender: [{
1230
- type: Input
1231
- }], valueChange: [{
1232
- type: Output
1233
- }], cellHover: [{
1234
- type: Output
1235
- }] } });
1176
+ }] });
1236
1177
 
1237
1178
  /**
1238
1179
  * @private
1239
1180
  */
1240
1181
  class DateTableCell {
1241
1182
  constructor() {
1183
+ this.datePickerConfigService = inject(ThyDatePickerConfigService);
1242
1184
  this.isTemplateRef = isTemplateRef;
1243
1185
  this.prefixCls = input();
1244
1186
  this.cell = input();
@@ -1251,17 +1193,16 @@ class DateTableCell {
1251
1193
  const result = renderFn(this.cell().value);
1252
1194
  return !isUndefinedOrNull(result);
1253
1195
  });
1254
- this.datePickerConfigService = inject(ThyDatePickerConfigService);
1255
1196
  this.cellRender = computed(() => {
1256
1197
  return this.cell()?.dateCellRender || this.datePickerConfigService.config?.dateCellRender;
1257
1198
  });
1258
1199
  }
1259
1200
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1260
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateTableCell, isStandalone: true, selector: "[date-table-cell]", inputs: { prefixCls: { classPropertyName: "prefixCls", publicName: "prefixCls", isSignal: true, isRequired: false, transformFunction: null }, cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["dateTableCell"], ngImport: i0, template: "@switch (prefixCls()) {\n @case ('thy-calendar') {\n @switch (true) {\n @case (isTemplateRef(cellRender())) {\n <ng-container *ngTemplateOutlet=\"cellRender(); context: { $implicit: cell().value }\"></ng-container>\n }\n @case (isNonEmptyString(cellRender())) {\n <span [innerHTML]=\"cellRender()\"></span>\n }\n @case (functionRenderResult()) {\n <span [innerHTML]=\"$any(cellRender())(cell().value)\"></span>\n }\n @default {\n <div class=\"{{ prefixCls() }}-date\" [attr.aria-selected]=\"cell().isSelected\" [attr.aria-disabled]=\"cell().isDisabled\">\n {{ cell().content }}\n </div>\n }\n }\n }\n @case ('thy-calendar-full') {\n <div\n tabindex=\"0\"\n class=\"{{ prefixCls() }}-date thy-calendar-full-cell-inner\"\n [class.thy-calendar-full-calendar-date-today]=\"cell().isToday\">\n @if (cell().fullCellRender) {\n <ng-container *ngTemplateOutlet=\"$any(cell().fullCellRender); context: { $implicit: cell().value }\"> </ng-container>\n } @else {\n <div class=\"{{ prefixCls() }}-date-value\">\n <span class=\"{{ prefixCls() }}-date-value-today-text\">\n <span class=\"{{ prefixCls() }}-date-value-text\">{{ cell().content }}</span>\n </span>\n </div>\n <div class=\"{{ prefixCls() }}-date-content\">\n <ng-container *ngTemplateOutlet=\"$any(cellRender()); context: { $implicit: cell().value }\"> </ng-container>\n </div>\n }\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
1201
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateTableCell, isStandalone: true, selector: "[date-table-cell]", inputs: { prefixCls: { classPropertyName: "prefixCls", publicName: "prefixCls", isSignal: true, isRequired: false, transformFunction: null }, cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["dateTableCell"], ngImport: i0, template: "@let prefixClass = prefixCls();\n@let dateCell = cell();\n@let dateCellRender = cellRender();\n\n@switch (prefixClass) {\n @case ('thy-calendar') {\n @switch (true) {\n @case (isTemplateRef(dateCellRender)) {\n <ng-container *ngTemplateOutlet=\"dateCellRender; context: { $implicit: dateCell.value }\"></ng-container>\n }\n @case (isNonEmptyString(dateCellRender)) {\n <span [innerHTML]=\"dateCellRender\"></span>\n }\n @case (functionRenderResult()) {\n <span [innerHTML]=\"$any(dateCellRender)(dateCell.value)\"></span>\n }\n @default {\n <div class=\"{{ prefixClass }}-date\" [attr.aria-selected]=\"dateCell.isSelected\" [attr.aria-disabled]=\"dateCell.isDisabled\">\n {{ dateCell.content }}\n </div>\n }\n }\n }\n @case ('thy-calendar-full') {\n <div\n tabindex=\"0\"\n class=\"{{ prefixClass }}-date thy-calendar-full-cell-inner\"\n [class.thy-calendar-full-calendar-date-today]=\"dateCell.isToday\">\n @if (dateCell.fullCellRender) {\n <ng-container *ngTemplateOutlet=\"$any(dateCell.fullCellRender); context: { $implicit: dateCell.value }\"> </ng-container>\n } @else {\n <div class=\"{{ prefixClass }}-date-value\">\n <span class=\"{{ prefixClass }}-date-value-today-text\">\n <span class=\"{{ prefixClass }}-date-value-text\">{{ dateCell.content }}</span>\n </span>\n </div>\n <div class=\"{{ prefixClass }}-date-content\">\n <ng-container *ngTemplateOutlet=\"$any(dateCellRender); context: { $implicit: dateCell.value }\"> </ng-container>\n </div>\n }\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
1261
1202
  }
1262
1203
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateTableCell, decorators: [{
1263
1204
  type: Component,
1264
- args: [{ selector: '[date-table-cell]', exportAs: 'dateTableCell', imports: [NgTemplateOutlet], template: "@switch (prefixCls()) {\n @case ('thy-calendar') {\n @switch (true) {\n @case (isTemplateRef(cellRender())) {\n <ng-container *ngTemplateOutlet=\"cellRender(); context: { $implicit: cell().value }\"></ng-container>\n }\n @case (isNonEmptyString(cellRender())) {\n <span [innerHTML]=\"cellRender()\"></span>\n }\n @case (functionRenderResult()) {\n <span [innerHTML]=\"$any(cellRender())(cell().value)\"></span>\n }\n @default {\n <div class=\"{{ prefixCls() }}-date\" [attr.aria-selected]=\"cell().isSelected\" [attr.aria-disabled]=\"cell().isDisabled\">\n {{ cell().content }}\n </div>\n }\n }\n }\n @case ('thy-calendar-full') {\n <div\n tabindex=\"0\"\n class=\"{{ prefixCls() }}-date thy-calendar-full-cell-inner\"\n [class.thy-calendar-full-calendar-date-today]=\"cell().isToday\">\n @if (cell().fullCellRender) {\n <ng-container *ngTemplateOutlet=\"$any(cell().fullCellRender); context: { $implicit: cell().value }\"> </ng-container>\n } @else {\n <div class=\"{{ prefixCls() }}-date-value\">\n <span class=\"{{ prefixCls() }}-date-value-today-text\">\n <span class=\"{{ prefixCls() }}-date-value-text\">{{ cell().content }}</span>\n </span>\n </div>\n <div class=\"{{ prefixCls() }}-date-content\">\n <ng-container *ngTemplateOutlet=\"$any(cellRender()); context: { $implicit: cell().value }\"> </ng-container>\n </div>\n }\n </div>\n }\n}\n" }]
1205
+ args: [{ selector: '[date-table-cell]', exportAs: 'dateTableCell', imports: [NgTemplateOutlet], template: "@let prefixClass = prefixCls();\n@let dateCell = cell();\n@let dateCellRender = cellRender();\n\n@switch (prefixClass) {\n @case ('thy-calendar') {\n @switch (true) {\n @case (isTemplateRef(dateCellRender)) {\n <ng-container *ngTemplateOutlet=\"dateCellRender; context: { $implicit: dateCell.value }\"></ng-container>\n }\n @case (isNonEmptyString(dateCellRender)) {\n <span [innerHTML]=\"dateCellRender\"></span>\n }\n @case (functionRenderResult()) {\n <span [innerHTML]=\"$any(dateCellRender)(dateCell.value)\"></span>\n }\n @default {\n <div class=\"{{ prefixClass }}-date\" [attr.aria-selected]=\"dateCell.isSelected\" [attr.aria-disabled]=\"dateCell.isDisabled\">\n {{ dateCell.content }}\n </div>\n }\n }\n }\n @case ('thy-calendar-full') {\n <div\n tabindex=\"0\"\n class=\"{{ prefixClass }}-date thy-calendar-full-cell-inner\"\n [class.thy-calendar-full-calendar-date-today]=\"dateCell.isToday\">\n @if (dateCell.fullCellRender) {\n <ng-container *ngTemplateOutlet=\"$any(dateCell.fullCellRender); context: { $implicit: dateCell.value }\"> </ng-container>\n } @else {\n <div class=\"{{ prefixClass }}-date-value\">\n <span class=\"{{ prefixClass }}-date-value-today-text\">\n <span class=\"{{ prefixClass }}-date-value-text\">{{ dateCell.content }}</span>\n </span>\n </div>\n <div class=\"{{ prefixClass }}-date-content\">\n <ng-container *ngTemplateOutlet=\"$any(dateCellRender); context: { $implicit: dateCell.value }\"> </ng-container>\n </div>\n }\n </div>\n }\n}\n" }]
1265
1206
  }] });
1266
1207
 
1267
1208
  /**
@@ -1272,17 +1213,19 @@ class DateTable extends CalendarTable {
1272
1213
  super();
1273
1214
  this.dateHelper = inject(DateHelperService);
1274
1215
  this.datePickerConfigService = inject(ThyDatePickerConfigService);
1275
- this.dayHover = new EventEmitter(); // Emitted when hover on a day by mouse enter
1216
+ this.dayHover = output(); // Emitted when hover on a day by mouse enter
1276
1217
  }
1277
1218
  chooseDate(value) {
1278
1219
  // Only change date not change time
1279
- const date = new TinyDate(TinyDate.createDateInTimeZone(value.getFullYear(), value.getMonth(), value.getDate(), this.activeDate?.getHours(), this.activeDate?.getMinutes(), this.activeDate?.getSeconds(), this.timeZone), this.timeZone);
1280
- this.activeDate = date.clone();
1220
+ const activeDate = this.activeDate();
1221
+ const timeZone = this.timeZone();
1222
+ const date = new TinyDate(TinyDate.createDateInTimeZone(value.getFullYear(), value.getMonth(), value.getDate(), activeDate?.getHours(), activeDate?.getMinutes(), activeDate?.getSeconds(), timeZone), timeZone);
1223
+ this.activeDate.set(date.clone());
1281
1224
  this.valueChange.emit(date);
1282
1225
  }
1283
1226
  makeHeadRow() {
1284
1227
  const weekDays = [];
1285
- const start = this.activeDate.calendarStart({ weekStartsOn: this.datePickerConfigService.config.weekStartsOn });
1228
+ const start = this.activeDate().calendarStart({ weekStartsOn: this.datePickerConfigService.config.weekStartsOn });
1286
1229
  for (let colIndex = 0; colIndex < this.MAX_COL; colIndex++) {
1287
1230
  const day = start.addDays(colIndex);
1288
1231
  weekDays[colIndex] = {
@@ -1298,13 +1241,15 @@ class DateTable extends CalendarTable {
1298
1241
  }
1299
1242
  getVeryShortWeekFormat() {
1300
1243
  if (this.dateHelper.relyOnDatePipe) {
1301
- return this.prefixCls === 'thy-calendar-full' ? this.locale().fullWeekFormat : this.locale().weekFormat;
1244
+ const locale = this.locale();
1245
+ const prefixCls = this.prefixCls();
1246
+ return prefixCls === 'thy-calendar-full' ? locale.fullWeekFormat : locale.weekFormat;
1302
1247
  }
1303
1248
  return 'dd';
1304
1249
  }
1305
1250
  makeBodyRows() {
1306
1251
  const dateRows = [];
1307
- const firstDayOfMonth = this.activeDate.calendarStart({ weekStartsOn: this.datePickerConfigService.config.weekStartsOn });
1252
+ const firstDayOfMonth = this.activeDate().calendarStart({ weekStartsOn: this.datePickerConfigService.config.weekStartsOn });
1308
1253
  for (let week = 0; week < this.MAX_ROW; week++) {
1309
1254
  const weekStart = firstDayOfMonth.addDays(week * 7);
1310
1255
  const row = {
@@ -1325,21 +1270,22 @@ class DateTable extends CalendarTable {
1325
1270
  isDisabled: false,
1326
1271
  isToday: false,
1327
1272
  title: title,
1328
- dateCellRender: valueFunctionProp(this.cellRender, date),
1273
+ dateCellRender: valueFunctionProp(this.cellRender(), date),
1329
1274
  content: `${date.getDate()}`,
1330
1275
  onClick: () => this.chooseDate(date),
1331
1276
  onMouseEnter: () => this.dayHover.emit(date)
1332
1277
  };
1333
1278
  this.addCellProperty(cell, date);
1334
- if (this.showWeek && !row.weekNum) {
1279
+ if (this.showWeek() && !row.weekNum) {
1335
1280
  row.weekNum = this.dateHelper.getISOWeek(date.nativeDate);
1336
1281
  }
1337
1282
  if (date.isToday()) {
1338
1283
  cell.isToday = true;
1339
1284
  row.isCurrent = true;
1340
1285
  }
1341
- if (this.selectedValue?.length > 0) {
1342
- const [startSelected, endSelected] = this.selectedValue;
1286
+ const selectedValue = this.selectedValue();
1287
+ if (selectedValue?.length > 0) {
1288
+ const [startSelected, endSelected] = selectedValue;
1343
1289
  if (date.isSameDay(startSelected)) {
1344
1290
  row.isActive = true;
1345
1291
  }
@@ -1347,22 +1293,24 @@ class DateTable extends CalendarTable {
1347
1293
  row.isActive = true;
1348
1294
  }
1349
1295
  }
1350
- else if (date.isSameDay(this.value)) {
1296
+ else if (date.isSameDay(this.value())) {
1351
1297
  row.isActive = true;
1352
1298
  }
1353
1299
  row.dateCells.push(cell);
1354
1300
  }
1301
+ const prefixCls = this.prefixCls();
1355
1302
  row.classMap = {
1356
- [`${this.prefixCls}-current-week`]: row.isCurrent,
1357
- [`${this.prefixCls}-active-week`]: row.isActive
1303
+ [`${prefixCls}-current-week`]: row.isCurrent,
1304
+ [`${prefixCls}-active-week`]: row.isActive
1358
1305
  };
1359
1306
  dateRows.push(row);
1360
1307
  }
1361
1308
  return dateRows;
1362
1309
  }
1363
1310
  addCellProperty(cell, date) {
1364
- if (this.selectedValue?.length > 0) {
1365
- const [startSelected, endSelected] = this.selectedValue;
1311
+ const selectedValue = this.selectedValue();
1312
+ if (selectedValue?.length > 0) {
1313
+ const [startSelected, endSelected] = selectedValue;
1366
1314
  if (startSelected?.isSameDay(date)) {
1367
1315
  cell.isSelected = true;
1368
1316
  }
@@ -1374,55 +1322,53 @@ class DateTable extends CalendarTable {
1374
1322
  cell.isInRange = startSelected?.isBeforeDay(date) && date.isBeforeDay(endSelected);
1375
1323
  }
1376
1324
  else {
1377
- cell.isSelected = date.isSameDay(this.value);
1325
+ cell.isSelected = date.isSameDay(this.value());
1378
1326
  }
1379
- cell.isLastMonthCell = date.isBeforeMonth(this.activeDate);
1380
- cell.isNextMonthCell = date.isAfterMonth(this.activeDate);
1327
+ const activeDate = this.activeDate();
1328
+ cell.isLastMonthCell = date.isBeforeMonth(activeDate);
1329
+ cell.isNextMonthCell = date.isAfterMonth(activeDate);
1381
1330
  cell.isToday = date.isToday();
1382
- cell.isDisabled = !!this.disabledDate?.(date.nativeDate);
1331
+ cell.isDisabled = !!this.disabledDate()?.(date.nativeDate);
1383
1332
  cell.classMap = this.getClassMap(cell);
1384
1333
  }
1385
1334
  getClassMap(cell) {
1335
+ const prefixCls = this.prefixCls();
1386
1336
  return {
1387
- [`${this.prefixCls}-cell`]: true,
1388
- [`${this.prefixCls}-today`]: cell.isToday,
1389
- [`${this.prefixCls}-last-month-cell`]: cell.isLastMonthCell,
1390
- [`${this.prefixCls}-next-month-btn-day`]: cell.isNextMonthCell,
1391
- [`${this.prefixCls}-selected-day`]: cell.isSelected,
1392
- [`${this.prefixCls}-disabled-cell`]: cell.isDisabled,
1393
- [`${this.prefixCls}-selected-start-date`]: !!cell.isSelectedStartDate,
1394
- [`${this.prefixCls}-selected-end-date`]: !!cell.isSelectedEndDate,
1395
- [`${this.prefixCls}-in-range-cell`]: !!cell.isInRange
1337
+ [`${prefixCls}-cell`]: true,
1338
+ [`${prefixCls}-today`]: cell.isToday,
1339
+ [`${prefixCls}-last-month-cell`]: cell.isLastMonthCell,
1340
+ [`${prefixCls}-next-month-btn-day`]: cell.isNextMonthCell,
1341
+ [`${prefixCls}-selected-day`]: cell.isSelected,
1342
+ [`${prefixCls}-disabled-cell`]: cell.isDisabled,
1343
+ [`${prefixCls}-selected-start-date`]: !!cell.isSelectedStartDate,
1344
+ [`${prefixCls}-selected-end-date`]: !!cell.isSelectedEndDate,
1345
+ [`${prefixCls}-in-range-cell`]: !!cell.isInRange
1396
1346
  };
1397
1347
  }
1398
1348
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateTable, isStandalone: true, selector: "date-table", outputs: { dayHover: "dayHover" }, exportAs: ["dateTable"], usesInheritance: true, ngImport: i0, template: "<table class=\"{{ prefixCls }}-table\" cellSpacing=\"0\" role=\"grid\">\n <thead>\n <tr role=\"row\">\n @if (showWeek) {\n <th role=\"columnheader\" [title]=\"locale().week\" class=\"{{ prefixCls }}-column-header {{ prefixCls }}-week-number-header\">\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ locale().prefixWeek }}</span>\n </th>\n }\n @for (cell of headRow; track $index) {\n <th role=\"columnheader\" title=\"{{ cell.title }}\" class=\"{{ prefixCls }}-column-header\">\n @if (prefixCls === 'thy-calendar') {\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ cell.content }}</span>\n }\n @if (prefixCls === 'thy-calendar-full') {\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ cell.content }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"{{ prefixCls }}-tbody\">\n @for (row of bodyRows; track $index) {\n <tr [ngClass]=\"row.classMap\" role=\"row\">\n @if (row.weekNum) {\n <td role=\"gridcell\" class=\"{{ prefixCls }}-week-number-cell\">\n {{ row.weekNum }}\n </td>\n }\n @for (cell of row.dateCells; track $index) {\n <td\n role=\"gridcell\"\n [ngClass]=\"cell.classMap\"\n (click)=\"cell.isDisabled ? null : cell.onClick()\"\n date-table-cell\n [prefixCls]=\"prefixCls\"\n [cell]=\"cell\"></td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DateTableCell, selector: "[date-table-cell]", inputs: ["prefixCls", "cell"], exportAs: ["dateTableCell"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1349
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateTable, isStandalone: true, selector: "date-table", outputs: { dayHover: "dayHover" }, exportAs: ["dateTable"], usesInheritance: true, ngImport: i0, template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-table\" cellSpacing=\"0\" role=\"grid\">\n <thead>\n <tr role=\"row\">\n @if (showWeek()) {\n <th role=\"columnheader\" [title]=\"locale().week\" class=\"{{ prefixClass }}-column-header {{ prefixClass }}-week-number-header\">\n <span class=\"{{ prefixClass }}-column-header-inner\">{{ locale().prefixWeek }}</span>\n </th>\n }\n @for (cell of headRow; track $index) {\n <th role=\"columnheader\" title=\"{{ cell.title }}\" class=\"{{ prefixClass }}-column-header\">\n @if (prefixClass === 'thy-calendar') {\n <span class=\"{{ prefixClass }}-column-header-inner\">{{ cell.content }}</span>\n }\n @if (prefixClass === 'thy-calendar-full') {\n <span class=\"{{ prefixClass }}-column-header-inner\">{{ cell.content }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"{{ prefixClass }}-tbody\">\n @for (row of bodyRows; track $index) {\n <tr [ngClass]=\"row.classMap\" role=\"row\">\n @if (row.weekNum) {\n <td role=\"gridcell\" class=\"{{ prefixClass }}-week-number-cell\">\n {{ row.weekNum }}\n </td>\n }\n @for (cell of row.dateCells; track $index) {\n <td\n role=\"gridcell\"\n [ngClass]=\"cell.classMap\"\n (click)=\"cell.isDisabled ? null : cell.onClick()\"\n date-table-cell\n [prefixCls]=\"prefixClass\"\n [cell]=\"cell\"></td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DateTableCell, selector: "[date-table-cell]", inputs: ["prefixCls", "cell"], exportAs: ["dateTableCell"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1400
1350
  }
1401
1351
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateTable, decorators: [{
1402
1352
  type: Component,
1403
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-table', exportAs: 'dateTable', imports: [NgClass, DateTableCell], template: "<table class=\"{{ prefixCls }}-table\" cellSpacing=\"0\" role=\"grid\">\n <thead>\n <tr role=\"row\">\n @if (showWeek) {\n <th role=\"columnheader\" [title]=\"locale().week\" class=\"{{ prefixCls }}-column-header {{ prefixCls }}-week-number-header\">\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ locale().prefixWeek }}</span>\n </th>\n }\n @for (cell of headRow; track $index) {\n <th role=\"columnheader\" title=\"{{ cell.title }}\" class=\"{{ prefixCls }}-column-header\">\n @if (prefixCls === 'thy-calendar') {\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ cell.content }}</span>\n }\n @if (prefixCls === 'thy-calendar-full') {\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ cell.content }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"{{ prefixCls }}-tbody\">\n @for (row of bodyRows; track $index) {\n <tr [ngClass]=\"row.classMap\" role=\"row\">\n @if (row.weekNum) {\n <td role=\"gridcell\" class=\"{{ prefixCls }}-week-number-cell\">\n {{ row.weekNum }}\n </td>\n }\n @for (cell of row.dateCells; track $index) {\n <td\n role=\"gridcell\"\n [ngClass]=\"cell.classMap\"\n (click)=\"cell.isDisabled ? null : cell.onClick()\"\n date-table-cell\n [prefixCls]=\"prefixCls\"\n [cell]=\"cell\"></td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1404
- }], ctorParameters: () => [], propDecorators: { dayHover: [{
1405
- type: Output
1406
- }] } });
1353
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-table', exportAs: 'dateTable', imports: [NgClass, DateTableCell], template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-table\" cellSpacing=\"0\" role=\"grid\">\n <thead>\n <tr role=\"row\">\n @if (showWeek()) {\n <th role=\"columnheader\" [title]=\"locale().week\" class=\"{{ prefixClass }}-column-header {{ prefixClass }}-week-number-header\">\n <span class=\"{{ prefixClass }}-column-header-inner\">{{ locale().prefixWeek }}</span>\n </th>\n }\n @for (cell of headRow; track $index) {\n <th role=\"columnheader\" title=\"{{ cell.title }}\" class=\"{{ prefixClass }}-column-header\">\n @if (prefixClass === 'thy-calendar') {\n <span class=\"{{ prefixClass }}-column-header-inner\">{{ cell.content }}</span>\n }\n @if (prefixClass === 'thy-calendar-full') {\n <span class=\"{{ prefixClass }}-column-header-inner\">{{ cell.content }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"{{ prefixClass }}-tbody\">\n @for (row of bodyRows; track $index) {\n <tr [ngClass]=\"row.classMap\" role=\"row\">\n @if (row.weekNum) {\n <td role=\"gridcell\" class=\"{{ prefixClass }}-week-number-cell\">\n {{ row.weekNum }}\n </td>\n }\n @for (cell of row.dateCells; track $index) {\n <td\n role=\"gridcell\"\n [ngClass]=\"cell.classMap\"\n (click)=\"cell.isDisabled ? null : cell.onClick()\"\n date-table-cell\n [prefixCls]=\"prefixClass\"\n [cell]=\"cell\"></td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1354
+ }], ctorParameters: () => [] });
1407
1355
 
1408
1356
  /**
1409
1357
  * @private
1410
1358
  */
1411
1359
  class DecadeHeader extends CalendarHeader {
1412
1360
  constructor() {
1413
- super();
1414
- }
1415
- get startYear() {
1416
- return parseInt(`${this.value.getYear() / 100}`, 10) * 100;
1417
- }
1418
- get endYear() {
1419
- return this.startYear + 99;
1361
+ super(...arguments);
1362
+ this.startYear = computed(() => parseInt(`${this.value().getYear() / 100}`, 10) * 100);
1363
+ this.endYear = computed(() => this.startYear() + 99);
1420
1364
  }
1421
1365
  superPrevious() {
1422
- this.changeValue(this.value.addYears(-100));
1366
+ const newValue = this.value().addYears(-100);
1367
+ this.changeValue(newValue);
1423
1368
  }
1424
1369
  superNext() {
1425
- this.changeValue(this.value.addYears(100));
1370
+ const newValue = this.value().addYears(100);
1371
+ this.changeValue(newValue);
1426
1372
  }
1427
1373
  getSelectors() {
1428
1374
  return [
@@ -1430,45 +1376,42 @@ class DecadeHeader extends CalendarHeader {
1430
1376
  className: `${this.prefixCls}-decade-btn`,
1431
1377
  title: '',
1432
1378
  onClick: () => { },
1433
- label: `${this.startYear}-${this.endYear}`
1379
+ label: `${this.startYear()}-${this.endYear()}`
1434
1380
  }
1435
1381
  ];
1436
1382
  }
1437
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DecadeHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1438
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DecadeHeader, isStandalone: true, selector: "decade-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DecadeHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DecadeHeader, isStandalone: true, selector: "decade-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1439
1385
  }
1440
1386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DecadeHeader, decorators: [{
1441
1387
  type: Component,
1442
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'decade-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
1443
- }], ctorParameters: () => [] });
1388
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'decade-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
1389
+ }] });
1444
1390
 
1445
1391
  /**
1446
1392
  * @private
1447
1393
  */
1448
1394
  class DecadeTable extends CalendarTable {
1449
- get startYear() {
1450
- return parseInt(`${this.activeDate.getYear() / 100}`, 10) * 100;
1451
- }
1452
- get endYear() {
1453
- return this.startYear + 99;
1454
- }
1455
1395
  constructor() {
1456
- super();
1396
+ super(...arguments);
1457
1397
  this.MAX_ROW = 4;
1458
1398
  this.MAX_COL = 3;
1399
+ this.startYear = computed(() => parseInt(`${this.activeDate().getYear() / 100}`, 10) * 100);
1400
+ this.endYear = computed(() => this.startYear() + 99);
1459
1401
  }
1460
1402
  chooseDecade(startYear) {
1461
- this.value = (this.value || new TinyDate()).setYear(startYear);
1462
- this.valueChange.emit(this.value);
1403
+ const newValue = (this.value() || new TinyDate()).setYear(startYear);
1404
+ this.value.set(newValue);
1405
+ this.valueChange.emit(newValue);
1463
1406
  }
1464
1407
  makeHeadRow() {
1465
1408
  return [];
1466
1409
  }
1467
1410
  makeBodyRows() {
1468
1411
  const decades = [];
1469
- const currentYear = this.value && this.value.getYear();
1470
- const startYear = this.startYear;
1471
- const endYear = this.endYear;
1412
+ const currentYear = this.value() && this.value().getYear();
1413
+ const startYear = this.startYear();
1414
+ const endYear = this.endYear();
1472
1415
  const previousYear = startYear - 10;
1473
1416
  let index = 0;
1474
1417
  for (let rowIndex = 0; rowIndex < this.MAX_ROW; rowIndex++) {
@@ -1499,24 +1442,25 @@ class DecadeTable extends CalendarTable {
1499
1442
  return decades;
1500
1443
  }
1501
1444
  getClassMap(cell) {
1445
+ const prefixCls = this.prefixCls();
1502
1446
  return {
1503
- [`${this.prefixCls}-decade-panel-cell`]: true,
1504
- [`${this.prefixCls}-decade-panel-selected-cell`]: cell.isSelected,
1505
- [`${this.prefixCls}-decade-panel-last-century-cell`]: cell.isLowerThanStart,
1506
- [`${this.prefixCls}-decade-panel-next-century-cell`]: cell.isBiggerThanEnd
1447
+ [`${prefixCls}-decade-panel-cell`]: true,
1448
+ [`${prefixCls}-decade-panel-selected-cell`]: cell.isSelected,
1449
+ [`${prefixCls}-decade-panel-last-century-cell`]: cell.isLowerThanStart,
1450
+ [`${prefixCls}-decade-panel-next-century-cell`]: cell.isBiggerThanEnd
1507
1451
  };
1508
1452
  }
1509
1453
  cellClick(event, cell) {
1510
1454
  event.stopPropagation();
1511
1455
  cell.onClick();
1512
1456
  }
1513
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DecadeTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1514
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DecadeTable, isStandalone: true, selector: "decade-table", exportAs: ["decadeTable"], usesInheritance: true, ngImport: i0, template: "<table class=\"{{ prefixCls }}-decade-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-decade-panel-tbody\">\n @for (row of bodyRows; track $index) {\n <tr role=\"row\">\n @for (cell of row.dateCells; track $index) {\n <td role=\"gridcell\" title=\"{{ cell.title }}\" (click)=\"cellClick($event, cell)\" [ngClass]=\"cell.classMap\">\n <a class=\"{{ prefixCls }}-decade-panel-decade\">{{ cell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1457
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DecadeTable, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1458
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DecadeTable, isStandalone: true, selector: "decade-table", exportAs: ["decadeTable"], usesInheritance: true, ngImport: i0, template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-decade-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-decade-panel-tbody\">\n @for (row of bodyRows; track $index) {\n <tr role=\"row\">\n @for (cell of row.dateCells; track $index) {\n <td role=\"gridcell\" title=\"{{ cell.title }}\" (click)=\"cellClick($event, cell)\" [ngClass]=\"cell.classMap\">\n <a class=\"{{ prefixClass }}-decade-panel-decade\">{{ cell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1515
1459
  }
1516
1460
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DecadeTable, decorators: [{
1517
1461
  type: Component,
1518
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'decade-table', exportAs: 'decadeTable', imports: [NgClass], template: "<table class=\"{{ prefixCls }}-decade-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-decade-panel-tbody\">\n @for (row of bodyRows; track $index) {\n <tr role=\"row\">\n @for (cell of row.dateCells; track $index) {\n <td role=\"gridcell\" title=\"{{ cell.title }}\" (click)=\"cellClick($event, cell)\" [ngClass]=\"cell.classMap\">\n <a class=\"{{ prefixCls }}-decade-panel-decade\">{{ cell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1519
- }], ctorParameters: () => [] });
1462
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'decade-table', exportAs: 'decadeTable', imports: [NgClass], template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-decade-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-decade-panel-tbody\">\n @for (row of bodyRows; track $index) {\n <tr role=\"row\">\n @for (cell of row.dateCells; track $index) {\n <td role=\"gridcell\" title=\"{{ cell.title }}\" (click)=\"cellClick($event, cell)\" [ngClass]=\"cell.classMap\">\n <a class=\"{{ prefixClass }}-decade-panel-decade\">{{ cell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1463
+ }] });
1520
1464
 
1521
1465
  /**
1522
1466
  * @private
@@ -1529,8 +1473,9 @@ class MonthTable extends CalendarTable {
1529
1473
  this.MAX_COL = 3;
1530
1474
  }
1531
1475
  chooseMonth(month) {
1532
- this.value = this.activeDate.setMonth(month);
1533
- this.valueChange.emit(this.value);
1476
+ const newValue = this.activeDate().setMonth(month);
1477
+ this.value.set(newValue);
1478
+ this.valueChange.emit(newValue);
1534
1479
  this.render();
1535
1480
  }
1536
1481
  makeHeadRow() {
@@ -1545,9 +1490,9 @@ class MonthTable extends CalendarTable {
1545
1490
  trackByIndex: rowIndex
1546
1491
  };
1547
1492
  for (let colIndex = 0; colIndex < this.MAX_COL; colIndex++) {
1548
- const month = this.activeDate.setMonth(monthValue);
1549
- const monthFormat = this.locale().zhMonthFormat;
1550
- const isDisabled = this.disabledDate ? this.disabledDate(this.activeDate.setMonth(monthValue).nativeDate) : false;
1493
+ const month = this.activeDate().setMonth(monthValue);
1494
+ const monthFormat = this.locale().monthFormat;
1495
+ const isDisabled = this.disabledDate ? this.disabledDate()(this.activeDate().setMonth(monthValue).nativeDate) : false;
1551
1496
  const content = this.dateHelper.format(month.nativeDate, monthFormat);
1552
1497
  const cell = {
1553
1498
  trackByIndex: colIndex,
@@ -1556,7 +1501,7 @@ class MonthTable extends CalendarTable {
1556
1501
  content,
1557
1502
  title: content,
1558
1503
  classMap: null,
1559
- isSelected: month.isSameMonth(this.value),
1504
+ isSelected: month.isSameMonth(this.value()),
1560
1505
  onClick: () => this.chooseMonth(cell.value.getMonth()),
1561
1506
  onMouseEnter: () => { }
1562
1507
  };
@@ -1569,8 +1514,8 @@ class MonthTable extends CalendarTable {
1569
1514
  return months;
1570
1515
  }
1571
1516
  addCellProperty(cell, month) {
1572
- if (this.selectedValue?.length > 0) {
1573
- const [startSelected, endSelected] = this.selectedValue;
1517
+ if (this.selectedValue()?.length > 0) {
1518
+ const [startSelected, endSelected] = this.selectedValue();
1574
1519
  if (startSelected?.isSameMonth(month)) {
1575
1520
  cell.isSelectedStartDate = true;
1576
1521
  cell.isSelected = true;
@@ -1583,7 +1528,7 @@ class MonthTable extends CalendarTable {
1583
1528
  cell.isEndSingle = !startSelected && !!endSelected;
1584
1529
  cell.isInRange = startSelected?.isBeforeMonth(month) && month?.isBeforeMonth(endSelected);
1585
1530
  }
1586
- else if (month.isSameMonth(this.value)) {
1531
+ else if (month.isSameMonth(this.value())) {
1587
1532
  cell.isSelected = true;
1588
1533
  }
1589
1534
  cell.classMap = this.getClassMap(cell);
@@ -1593,20 +1538,21 @@ class MonthTable extends CalendarTable {
1593
1538
  return monthCell.isDisabled ? null : monthCell.onClick();
1594
1539
  }
1595
1540
  getClassMap(cell) {
1541
+ const prefixCls = this.prefixCls();
1596
1542
  return {
1597
- [`${this.prefixCls}-month-panel-cell`]: true,
1598
- [`${this.prefixCls}-month-panel-cell-disabled`]: cell.isDisabled,
1599
- [`${this.prefixCls}-month-panel-selected-cell`]: cell.isSelected,
1600
- [`${this.prefixCls}-in-range-cell`]: !!cell.isInRange,
1601
- [`${this.prefixCls}-month-panel-current-cell`]: new TinyDate().getYear() === this.activeDate.getYear() && cell.value.getMonth() === new TinyDate().getMonth()
1543
+ [`${prefixCls}-month-panel-cell`]: true,
1544
+ [`${prefixCls}-month-panel-cell-disabled`]: cell.isDisabled,
1545
+ [`${prefixCls}-month-panel-selected-cell`]: cell.isSelected,
1546
+ [`${prefixCls}-in-range-cell`]: !!cell.isInRange,
1547
+ [`${prefixCls}-month-panel-current-cell`]: new TinyDate().getYear() === this.activeDate().getYear() && cell.value.getMonth() === new TinyDate().getMonth()
1602
1548
  };
1603
1549
  }
1604
1550
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MonthTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1605
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: MonthTable, isStandalone: true, selector: "month-table", exportAs: ["monthTable"], usesInheritance: true, ngImport: i0, template: "<table class=\"{{ prefixCls }}-month-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-month-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (monthCell of row.dateCells; track trackByBodyColumn($index, monthCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ monthCell.title }}\"\n (click)=\"monthCellClick($event, monthCell)\"\n [ngClass]=\"monthCell.classMap\"\n >\n @switch (prefixCls) {\n @case ('thy-calendar') {\n <div class=\"{{ prefixCls }}-month-panel-month\">{{ monthCell.content }}</div>\n }\n }\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1551
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: MonthTable, isStandalone: true, selector: "month-table", exportAs: ["monthTable"], usesInheritance: true, ngImport: i0, template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-month-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-month-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (monthCell of row.dateCells; track trackByBodyColumn($index, monthCell)) {\n <td role=\"gridcell\" title=\"{{ monthCell.title }}\" (click)=\"monthCellClick($event, monthCell)\" [ngClass]=\"monthCell.classMap\">\n @switch (prefixClass) {\n @case ('thy-calendar') {\n <div class=\"{{ prefixClass }}-month-panel-month\">{{ monthCell.content }}</div>\n }\n }\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1606
1552
  }
1607
1553
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MonthTable, decorators: [{
1608
1554
  type: Component,
1609
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'month-table', exportAs: 'monthTable', imports: [NgClass], template: "<table class=\"{{ prefixCls }}-month-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-month-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (monthCell of row.dateCells; track trackByBodyColumn($index, monthCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ monthCell.title }}\"\n (click)=\"monthCellClick($event, monthCell)\"\n [ngClass]=\"monthCell.classMap\"\n >\n @switch (prefixCls) {\n @case ('thy-calendar') {\n <div class=\"{{ prefixCls }}-month-panel-month\">{{ monthCell.content }}</div>\n }\n }\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1555
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'month-table', exportAs: 'monthTable', imports: [NgClass], template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-month-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-month-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (monthCell of row.dateCells; track trackByBodyColumn($index, monthCell)) {\n <td role=\"gridcell\" title=\"{{ monthCell.title }}\" (click)=\"monthCellClick($event, monthCell)\" [ngClass]=\"monthCell.classMap\">\n @switch (prefixClass) {\n @case ('thy-calendar') {\n <div class=\"{{ prefixClass }}-month-panel-month\">{{ monthCell.content }}</div>\n }\n }\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1610
1556
  }], ctorParameters: () => [] });
1611
1557
 
1612
1558
  /**
@@ -1614,14 +1560,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
1614
1560
  */
1615
1561
  class QuarterTable extends CalendarTable {
1616
1562
  constructor() {
1617
- super();
1618
- this.dateHelper = inject(DateHelperService);
1563
+ super(...arguments);
1619
1564
  this.MAX_ROW = 1;
1620
1565
  this.MAX_COL = 4;
1621
1566
  }
1622
1567
  chooseQuarter(quarter) {
1623
- this.value = this.activeDate.setQuarter(quarter);
1624
- this.valueChange.emit(this.value);
1568
+ const newValue = this.activeDate().setQuarter(quarter);
1569
+ this.value.set(newValue);
1570
+ this.valueChange.emit(newValue);
1625
1571
  this.render();
1626
1572
  }
1627
1573
  makeHeadRow() {
@@ -1636,9 +1582,9 @@ class QuarterTable extends CalendarTable {
1636
1582
  trackByIndex: rowIndex
1637
1583
  };
1638
1584
  for (let colIndex = 0; colIndex < this.MAX_COL; colIndex++) {
1639
- const quarter = this.activeDate.setQuarter(quarterValue + 1);
1640
- const isDisabled = this.disabledDate ? this.disabledDate(quarter.nativeDate) : false;
1641
- const content = `${quarter.format('qqq')}`;
1585
+ const quarter = this.activeDate().setQuarter(quarterValue + 1);
1586
+ const isDisabled = this.disabledDate ? this.disabledDate()(quarter.nativeDate) : false;
1587
+ const content = `${quarter.format(QUARTER_FORMAT)}`;
1642
1588
  const cell = {
1643
1589
  trackByIndex: colIndex,
1644
1590
  value: quarter.nativeDate,
@@ -1646,7 +1592,7 @@ class QuarterTable extends CalendarTable {
1646
1592
  content,
1647
1593
  title: content,
1648
1594
  classMap: null,
1649
- isSelected: quarter.isSameQuarter(this.value),
1595
+ isSelected: quarter.isSameQuarter(this.value()),
1650
1596
  onClick: () => {
1651
1597
  this.chooseQuarter(quarter.getQuarter());
1652
1598
  },
@@ -1661,8 +1607,9 @@ class QuarterTable extends CalendarTable {
1661
1607
  return quarters;
1662
1608
  }
1663
1609
  addCellProperty(cell, quarter) {
1664
- if (this.selectedValue?.length > 0) {
1665
- const [startSelected, endSelected] = this.selectedValue;
1610
+ const selectedValue = this.selectedValue();
1611
+ if (selectedValue?.length > 0) {
1612
+ const [startSelected, endSelected] = selectedValue;
1666
1613
  if (startSelected?.isSameQuarter(quarter)) {
1667
1614
  cell.isSelectedStartDate = true;
1668
1615
  cell.isSelected = true;
@@ -1675,7 +1622,7 @@ class QuarterTable extends CalendarTable {
1675
1622
  cell.isEndSingle = !startSelected && !!endSelected;
1676
1623
  cell.isInRange = startSelected?.isBeforeQuarter(quarter) && quarter?.isBeforeQuarter(endSelected);
1677
1624
  }
1678
- else if (quarter.isSameQuarter(this.value)) {
1625
+ else if (quarter.isSameQuarter(this.value())) {
1679
1626
  cell.isSelected = true;
1680
1627
  }
1681
1628
  cell.classMap = this.getClassMap(cell, quarter);
@@ -1685,37 +1632,39 @@ class QuarterTable extends CalendarTable {
1685
1632
  return quarterCell.isDisabled ? null : quarterCell.onClick();
1686
1633
  }
1687
1634
  getClassMap(cell, quarter) {
1635
+ const prefixCls = this.prefixCls();
1688
1636
  return {
1689
- [`${this.prefixCls}-quarter-panel-cell`]: true,
1690
- [`${this.prefixCls}-quarter-panel-cell-disabled`]: cell.isDisabled,
1691
- [`${this.prefixCls}-quarter-panel-selected-cell`]: cell.isSelected,
1692
- [`${this.prefixCls}-in-range-cell`]: !!cell.isInRange,
1693
- [`${this.prefixCls}-quarter-panel-current-cell`]: new TinyDate().getYear() === this.activeDate.getYear() && quarter.getQuarter() === new TinyDate().getQuarter()
1637
+ [`${prefixCls}-quarter-panel-cell`]: true,
1638
+ [`${prefixCls}-quarter-panel-cell-disabled`]: cell.isDisabled,
1639
+ [`${prefixCls}-quarter-panel-selected-cell`]: cell.isSelected,
1640
+ [`${prefixCls}-in-range-cell`]: !!cell.isInRange,
1641
+ [`${prefixCls}-quarter-panel-current-cell`]: new TinyDate().getYear() === this.activeDate().getYear() && quarter.getQuarter() === new TinyDate().getQuarter()
1694
1642
  };
1695
1643
  }
1696
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: QuarterTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1697
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: QuarterTable, isStandalone: true, selector: "quarter-table", exportAs: ["quarterTable"], usesInheritance: true, ngImport: i0, template: "<table class=\"{{ prefixCls }}-quarter-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-quarter-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (quarterCell of row.dateCells; track trackByBodyColumn($index, quarterCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ quarterCell.title }}\"\n (click)=\"quarterCellClick($event, quarterCell)\"\n [ngClass]=\"quarterCell.classMap\">\n <a class=\"{{ prefixCls }}-quarter-panel-quarter\">{{ quarterCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1644
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: QuarterTable, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1645
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: QuarterTable, isStandalone: true, selector: "quarter-table", exportAs: ["quarterTable"], usesInheritance: true, ngImport: i0, template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-quarter-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-quarter-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (quarterCell of row.dateCells; track trackByBodyColumn($index, quarterCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ quarterCell.title }}\"\n (click)=\"quarterCellClick($event, quarterCell)\"\n [ngClass]=\"quarterCell.classMap\">\n <a class=\"{{ prefixClass }}-quarter-panel-quarter\">{{ quarterCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1698
1646
  }
1699
1647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: QuarterTable, decorators: [{
1700
1648
  type: Component,
1701
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'quarter-table', exportAs: 'quarterTable', imports: [NgClass], template: "<table class=\"{{ prefixCls }}-quarter-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-quarter-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (quarterCell of row.dateCells; track trackByBodyColumn($index, quarterCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ quarterCell.title }}\"\n (click)=\"quarterCellClick($event, quarterCell)\"\n [ngClass]=\"quarterCell.classMap\">\n <a class=\"{{ prefixCls }}-quarter-panel-quarter\">{{ quarterCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1702
- }], ctorParameters: () => [] });
1649
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'quarter-table', exportAs: 'quarterTable', imports: [NgClass], template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-quarter-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-quarter-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (quarterCell of row.dateCells; track trackByBodyColumn($index, quarterCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ quarterCell.title }}\"\n (click)=\"quarterCellClick($event, quarterCell)\"\n [ngClass]=\"quarterCell.classMap\">\n <a class=\"{{ prefixClass }}-quarter-panel-quarter\">{{ quarterCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1650
+ }] });
1703
1651
 
1704
1652
  /**
1705
1653
  * @private
1706
1654
  */
1707
1655
  class YearHeader extends CalendarHeader {
1708
- get startYear() {
1709
- return parseInt(`${this.value.getYear() / 10}`, 10) * 10;
1710
- }
1711
- get endYear() {
1712
- return this.startYear + 9;
1656
+ constructor() {
1657
+ super(...arguments);
1658
+ this.startYear = computed(() => parseInt(`${this.value().getYear() / 10}`, 10) * 10);
1659
+ this.endYear = computed(() => this.startYear() + 9);
1713
1660
  }
1714
1661
  superPrevious() {
1715
- this.changeValue(this.value.addYears(-10));
1662
+ const newValue = this.value().addYears(-10);
1663
+ this.changeValue(newValue);
1716
1664
  }
1717
1665
  superNext() {
1718
- this.changeValue(this.value.addYears(10));
1666
+ const newValue = this.value().addYears(10);
1667
+ this.changeValue(newValue);
1719
1668
  }
1720
1669
  getSelectors() {
1721
1670
  return [
@@ -1723,16 +1672,16 @@ class YearHeader extends CalendarHeader {
1723
1672
  className: `${this.prefixCls}-year-btn`,
1724
1673
  title: '',
1725
1674
  onClick: () => this.changePanel('decade'),
1726
- label: `${this.startYear}-${this.endYear}`
1675
+ label: `${this.startYear()}-${this.endYear()}`
1727
1676
  }
1728
1677
  ];
1729
1678
  }
1730
1679
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: YearHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1731
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: YearHeader, isStandalone: true, selector: "year-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1680
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: YearHeader, isStandalone: true, selector: "year-header", usesInheritance: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1732
1681
  }
1733
1682
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: YearHeader, decorators: [{
1734
1683
  type: Component,
1735
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'year-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
1684
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'year-header', imports: [NgClass, ThyIcon], template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n [ngClass]=\"showSuperPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superPrevious()\"\n [title]=\"locale().previousYear\">\n <thy-icon thyIconName=\"angle-double-left\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-prev-month-btn\"\n [ngClass]=\"showPreBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"previous()\"\n [title]=\"locale().previousMonth\">\n <thy-icon thyIconName=\"angle-left\"></thy-icon>\n </a>\n\n <span class=\"{{ prefixCls }}-my-select\">\n @for (selector of selectors; track $index) {\n <a class=\"{{ selector.className }}\" role=\"button\" (click)=\"selectorClick($event, selector)\" title=\"{{ selector.title || null }}\">\n {{ selector.label }}\n </a>\n }\n </span>\n\n <a\n class=\"{{ prefixCls }}-next-month-btn\"\n [ngClass]=\"showNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"next()\"\n [title]=\"locale().nextMonth\">\n <thy-icon thyIconName=\"angle-right\"></thy-icon>\n </a>\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n [ngClass]=\"showSuperNextBtn() ? 'd-block' : 'd-none'\"\n role=\"button\"\n (click)=\"superNext()\"\n [title]=\"locale().nextYear\">\n <thy-icon thyIconName=\"angle-double-right\"></thy-icon>\n </a>\n </div>\n</div>\n" }]
1736
1685
  }] });
1737
1686
 
1738
1687
  /**
@@ -1740,14 +1689,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
1740
1689
  */
1741
1690
  class YearTable extends CalendarTable {
1742
1691
  constructor() {
1743
- super();
1692
+ super(...arguments);
1744
1693
  this.MAX_ROW = 4;
1745
1694
  this.MAX_COL = 3;
1746
- this.decadePanelShow = new EventEmitter();
1695
+ this.decadePanelShow = output();
1747
1696
  }
1748
1697
  chooseYear(year) {
1749
- this.value = this.activeDate.setYear(year);
1750
- this.valueChange.emit(this.value);
1698
+ const newValue = this.activeDate().setYear(year);
1699
+ this.value.set(newValue);
1700
+ this.valueChange.emit(newValue);
1751
1701
  this.render();
1752
1702
  }
1753
1703
  makeHeadRow() {
@@ -1755,7 +1705,8 @@ class YearTable extends CalendarTable {
1755
1705
  }
1756
1706
  makeBodyRows() {
1757
1707
  const years = [];
1758
- const currentYear = this.activeDate && this.activeDate.getYear();
1708
+ const activeDate = this.activeDate();
1709
+ const currentYear = activeDate && activeDate.getYear();
1759
1710
  const startYear = parseInt(`${currentYear / 10}`, 10) * 10;
1760
1711
  const endYear = startYear + 9;
1761
1712
  const previousYear = startYear - 1;
@@ -1767,16 +1718,18 @@ class YearTable extends CalendarTable {
1767
1718
  };
1768
1719
  for (let colIndex = 0; colIndex < this.MAX_COL; colIndex++) {
1769
1720
  const yearNum = previousYear + yearValue;
1770
- const year = this.activeDate.setYear(yearNum);
1721
+ const year = activeDate.setYear(yearNum);
1771
1722
  const content = String(yearNum);
1772
- const isDisabled = this.disabledDate ? this.disabledDate(year.nativeDate) : false;
1723
+ const disabledDate = this.disabledDate();
1724
+ const isDisabled = disabledDate ? disabledDate(year.nativeDate) : false;
1725
+ const value = this.value();
1773
1726
  const cell = {
1774
1727
  trackByIndex: colIndex,
1775
1728
  isDisabled,
1776
1729
  content,
1777
1730
  value: year.nativeDate,
1778
1731
  title: content,
1779
- isSelected: yearNum === (this.value && this.value.getYear()),
1732
+ isSelected: yearNum === (value && value.getYear()),
1780
1733
  isSameDecade: yearNum >= startYear && yearNum <= endYear,
1781
1734
  classMap: {},
1782
1735
  onClick: () => this.chooseYear(cell.value?.getFullYear()),
@@ -1791,8 +1744,9 @@ class YearTable extends CalendarTable {
1791
1744
  return years;
1792
1745
  }
1793
1746
  addCellProperty(cell, year) {
1794
- if (this.selectedValue?.length > 0) {
1795
- const [startSelected, endSelected] = this.selectedValue;
1747
+ const selectedValue = this.selectedValue();
1748
+ if (selectedValue?.length > 0) {
1749
+ const [startSelected, endSelected] = selectedValue;
1796
1750
  if (startSelected?.isSameYear(year)) {
1797
1751
  cell.isSelected = true;
1798
1752
  }
@@ -1803,7 +1757,7 @@ class YearTable extends CalendarTable {
1803
1757
  cell.isEndSingle = !startSelected && !!endSelected;
1804
1758
  cell.isInRange = startSelected?.isBeforeYear(year) && year?.isBeforeYear(endSelected);
1805
1759
  }
1806
- else if (year.isSameYear(this.value)) {
1760
+ else if (year.isSameYear(this.value())) {
1807
1761
  cell.isSelected = true;
1808
1762
  }
1809
1763
  cell.classMap = this.getClassMap(cell);
@@ -1813,23 +1767,22 @@ class YearTable extends CalendarTable {
1813
1767
  return yearCell.isDisabled ? null : yearCell.onClick();
1814
1768
  }
1815
1769
  getClassMap(cell) {
1770
+ const prefixCls = this.prefixCls();
1816
1771
  return {
1817
- [`${this.prefixCls}-year-panel-cell`]: true,
1818
- [`${this.prefixCls}-year-panel-selected-cell`]: cell.isSelected,
1819
- [`${this.prefixCls}-year-panel-cell-disabled`]: cell.isDisabled,
1820
- [`${this.prefixCls}-year-panel-cell-in-view`]: cell.isSameDecade,
1821
- [`${this.prefixCls}-in-range-cell`]: !!cell.isInRange
1772
+ [`${prefixCls}-year-panel-cell`]: true,
1773
+ [`${prefixCls}-year-panel-selected-cell`]: cell.isSelected,
1774
+ [`${prefixCls}-year-panel-cell-disabled`]: cell.isDisabled,
1775
+ [`${prefixCls}-year-panel-cell-in-view`]: cell.isSameDecade,
1776
+ [`${prefixCls}-in-range-cell`]: !!cell.isInRange
1822
1777
  };
1823
1778
  }
1824
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: YearTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1825
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: YearTable, isStandalone: true, selector: "year-table", outputs: { decadePanelShow: "decadePanelShow" }, usesInheritance: true, ngImport: i0, template: "<table class=\"{{ prefixCls }}-year-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-year-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (yearCell of row.dateCells; track trackByBodyColumn($index, yearCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ yearCell.title }}\"\n (click)=\"yearCellClick($event, yearCell)\"\n [ngClass]=\"yearCell.classMap\"\n >\n <a class=\"{{ prefixCls }}-year-panel-year\">{{ yearCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1779
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: YearTable, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1780
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: YearTable, isStandalone: true, selector: "year-table", outputs: { decadePanelShow: "decadePanelShow" }, usesInheritance: true, ngImport: i0, template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-year-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-year-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (yearCell of row.dateCells; track trackByBodyColumn($index, yearCell)) {\n <td role=\"gridcell\" title=\"{{ yearCell.title }}\" (click)=\"yearCellClick($event, yearCell)\" [ngClass]=\"yearCell.classMap\">\n <a class=\"{{ prefixClass }}-year-panel-year\">{{ yearCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1826
1781
  }
1827
1782
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: YearTable, decorators: [{
1828
1783
  type: Component,
1829
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'year-table', imports: [NgClass], template: "<table class=\"{{ prefixCls }}-year-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-year-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (yearCell of row.dateCells; track trackByBodyColumn($index, yearCell)) {\n <td\n role=\"gridcell\"\n title=\"{{ yearCell.title }}\"\n (click)=\"yearCellClick($event, yearCell)\"\n [ngClass]=\"yearCell.classMap\"\n >\n <a class=\"{{ prefixCls }}-year-panel-year\">{{ yearCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1830
- }], ctorParameters: () => [], propDecorators: { decadePanelShow: [{
1831
- type: Output
1832
- }] } });
1784
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'year-table', imports: [NgClass], template: "@let prefixClass = prefixCls();\n<table class=\"{{ prefixClass }}-year-panel-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixClass }}-year-panel-tbody\">\n @for (row of bodyRows; track trackByBodyRow($index, row)) {\n <tr role=\"row\">\n @for (yearCell of row.dateCells; track trackByBodyColumn($index, yearCell)) {\n <td role=\"gridcell\" title=\"{{ yearCell.title }}\" (click)=\"yearCellClick($event, yearCell)\" [ngClass]=\"yearCell.classMap\">\n <a class=\"{{ prefixClass }}-year-panel-year\">{{ yearCell.content }}</a>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n" }]
1785
+ }] });
1833
1786
 
1834
1787
  /**
1835
1788
  * @private
@@ -1838,72 +1791,90 @@ class InnerPopup {
1838
1791
  constructor() {
1839
1792
  this.dateHelper = inject(DateHelperService);
1840
1793
  this.locale = injectLocale('datePicker');
1841
- this.className = true;
1842
- this._showDateRangeInput = false;
1843
- this.panelModeChange = new EventEmitter();
1844
- this.headerChange = new EventEmitter();
1845
- this.selectDate = new EventEmitter();
1846
- this.dayHover = new EventEmitter();
1794
+ this.showWeek = input(false, { transform: coerceBooleanProperty });
1795
+ this.isRange = input(false, { transform: coerceBooleanProperty });
1796
+ this.activeDate = model();
1797
+ this.rangeActiveDate = input(); // Range ONLY
1798
+ this.disabledDate = input();
1799
+ this.dateRender = input();
1800
+ this.selectedValue = input(); // Range ONLY
1801
+ this.hoverValue = input(); // Range ONLY
1802
+ this.panelMode = input(null, {
1803
+ transform: (value) => {
1804
+ if (value === 'time') {
1805
+ return 'date';
1806
+ }
1807
+ return value;
1808
+ }
1809
+ });
1810
+ this.timeZone = input();
1811
+ this.showDateRangeInput = input(false, { transform: coerceBooleanProperty });
1812
+ this.partType = input();
1813
+ this.endPanelMode = input();
1814
+ this.value = model();
1815
+ this.panelModeChange = output();
1816
+ this.headerChange = output();
1817
+ this.selectDate = output();
1818
+ this.dayHover = output();
1847
1819
  this.prefixCls = 'thy-calendar';
1848
- }
1849
- set showDateRangeInput(value) {
1850
- this._showDateRangeInput = value;
1851
- }
1852
- get showDateRangeInput() {
1853
- return this._showDateRangeInput;
1854
- }
1855
- ngOnChanges(changes) {
1856
- if (changes.activeDate && !changes.activeDate.currentValue) {
1857
- this.activeDate = new TinyDate(undefined, this.timeZone);
1858
- }
1859
- if (changes.panelMode && changes.panelMode.currentValue === 'time') {
1860
- this.panelMode = 'date';
1861
- }
1820
+ effect(() => {
1821
+ if (!this.activeDate()) {
1822
+ this.activeDate.set(new TinyDate(undefined, this.timeZone()));
1823
+ }
1824
+ });
1862
1825
  }
1863
1826
  getReadableValue(value) {
1864
1827
  return value ? this.dateHelper.format(value.nativeDate, 'yyyy-MM-dd') : '';
1865
1828
  }
1866
1829
  onSelectDate(date) {
1867
- const value = date instanceof TinyDate ? date : new TinyDate(date, this.timeZone);
1830
+ const value = date instanceof TinyDate ? date : new TinyDate(date, this.timeZone());
1868
1831
  this.selectDate.emit(value);
1869
1832
  }
1870
1833
  onChooseMonth(value) {
1871
- this.activeDate = this.activeDate.setMonth(value.getMonth());
1872
- if (this.endPanelMode === 'month') {
1873
- this.value = value;
1834
+ const activeDate = this.activeDate().setMonth(value.getMonth());
1835
+ const endPanelMode = this.endPanelMode();
1836
+ this.activeDate.set(activeDate);
1837
+ if (endPanelMode === 'month') {
1838
+ this.value.set(value);
1874
1839
  this.selectDate.emit(value);
1875
1840
  }
1876
1841
  else {
1877
1842
  this.headerChange.emit(value);
1878
- this.panelModeChange.emit(this.endPanelMode);
1843
+ this.panelModeChange.emit(endPanelMode);
1879
1844
  }
1880
1845
  }
1881
1846
  onChooseQuarter(value) {
1882
- this.activeDate = this.activeDate.setQuarter(value.getQuarter());
1883
- if (this.endPanelMode === 'quarter') {
1884
- this.value = value;
1847
+ const activeDate = this.activeDate().setQuarter(value.getQuarter());
1848
+ const endPanelMode = this.endPanelMode();
1849
+ this.activeDate.set(activeDate);
1850
+ if (endPanelMode === 'quarter') {
1851
+ this.value.set(value);
1885
1852
  this.selectDate.emit(value);
1886
1853
  }
1887
1854
  else {
1888
1855
  this.headerChange.emit(value);
1889
- this.panelModeChange.emit(this.endPanelMode);
1856
+ this.panelModeChange.emit(endPanelMode);
1890
1857
  }
1891
1858
  }
1892
1859
  onChooseYear(value) {
1893
- this.activeDate = this.activeDate.setYear(value.getYear());
1894
- if (this.endPanelMode === 'year') {
1895
- this.value = value;
1860
+ const activeDate = this.activeDate().setYear(value.getYear());
1861
+ const endPanelMode = this.endPanelMode();
1862
+ this.activeDate.set(activeDate);
1863
+ if (endPanelMode === 'year') {
1864
+ this.value.set(value);
1896
1865
  this.selectDate.emit(value);
1897
1866
  }
1898
1867
  else {
1899
1868
  this.headerChange.emit(value);
1900
- this.panelModeChange.emit(this.endPanelMode);
1869
+ this.panelModeChange.emit(endPanelMode);
1901
1870
  }
1902
1871
  }
1903
1872
  onChooseDecade(value) {
1904
- this.activeDate = this.activeDate.setYear(value.getYear());
1905
- if (this.endPanelMode === 'decade') {
1906
- this.value = value;
1873
+ const activeDate = this.activeDate().setYear(value.getYear());
1874
+ const endPanelMode = this.endPanelMode();
1875
+ this.activeDate.set(activeDate);
1876
+ if (endPanelMode === 'decade') {
1877
+ this.value.set(value);
1907
1878
  this.selectDate.emit(value);
1908
1879
  }
1909
1880
  else {
@@ -1912,9 +1883,10 @@ class InnerPopup {
1912
1883
  }
1913
1884
  }
1914
1885
  enablePrevNext(direction, mode) {
1915
- if (this.isRange) {
1916
- if ((this.partType === 'left' && direction === 'next') || (this.partType === 'right' && direction === 'prev')) {
1917
- const [headerLeftDate, headerRightDate] = this.rangeActiveDate;
1886
+ if (this.isRange()) {
1887
+ const partType = this.partType();
1888
+ if ((partType === 'left' && direction === 'next') || (partType === 'right' && direction === 'prev')) {
1889
+ const [headerLeftDate, headerRightDate] = this.rangeActiveDate();
1918
1890
  return isAfterMoreThanOneMonth(headerRightDate, headerLeftDate);
1919
1891
  }
1920
1892
  else {
@@ -1926,9 +1898,10 @@ class InnerPopup {
1926
1898
  }
1927
1899
  }
1928
1900
  enableSuperPrevNext(direction, panelMode) {
1929
- if (this.isRange) {
1930
- if ((this.partType === 'left' && direction === 'next') || (this.partType === 'right' && direction === 'prev')) {
1931
- const [headerLeftDate, headerRightDate] = this.rangeActiveDate;
1901
+ if (this.isRange()) {
1902
+ const partType = this.partType();
1903
+ if ((partType === 'left' && direction === 'next') || (partType === 'right' && direction === 'prev')) {
1904
+ const [headerLeftDate, headerRightDate] = this.rangeActiveDate();
1932
1905
  if (panelMode === 'date') {
1933
1906
  return isAfterMoreThanLessOneYear(headerRightDate, headerLeftDate);
1934
1907
  }
@@ -1948,7 +1921,7 @@ class InnerPopup {
1948
1921
  }
1949
1922
  }
1950
1923
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: InnerPopup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1951
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: InnerPopup, isStandalone: true, selector: "inner-popup", inputs: { showWeek: "showWeek", isRange: "isRange", activeDate: "activeDate", rangeActiveDate: "rangeActiveDate", enablePrev: "enablePrev", enableNext: "enableNext", disabledDate: "disabledDate", dateRender: "dateRender", selectedValue: "selectedValue", hoverValue: "hoverValue", panelMode: "panelMode", timeZone: "timeZone", showDateRangeInput: ["showDateRangeInput", "showDateRangeInput", coerceBooleanProperty], partType: "partType", endPanelMode: "endPanelMode", value: "value" }, outputs: { panelModeChange: "panelModeChange", headerChange: "headerChange", selectDate: "selectDate", dayHover: "dayHover" }, host: { properties: { "class.thy-calendar-picker-inner-popup": "this.className", "class.thy-calendar-picker-inner-popup-with-range-input": "this._showDateRangeInput" } }, exportAs: ["innerPopup"], usesOnChanges: true, ngImport: i0, template: "@if (showDateRangeInput) {\n <div class=\"{{ prefixCls }}-picker-inner-popup-range-input\">\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue[0])\" [placeholder]=\"locale().startDate\" />\n <span class=\"split\"></span>\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue[1])\" [placeholder]=\"locale().endDate\" />\n </div>\n}\n@switch (panelMode) {\n @case ('decade') {\n <div class=\"{{ prefixCls }}-decade\">\n <decade-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'decade')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'decade')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </decade-header>\n <div class=\"{{ prefixCls }}-body\">\n <decade-table [value]=\"value\" [activeDate]=\"activeDate\" (valueChange)=\"onChooseDecade($event)\"></decade-table>\n </div>\n </div>\n }\n @case ('year') {\n <div class=\"{{ prefixCls }}-year\">\n <year-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'year')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'year')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </year-header>\n <div class=\"{{ prefixCls }}-body\">\n <year-table\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n (valueChange)=\"onChooseYear($event)\"\n [selectedValue]=\"selectedValue\">\n </year-table>\n </div>\n </div>\n }\n @case ('month') {\n <div class=\"{{ prefixCls }}-month\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <month-table\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n (valueChange)=\"onChooseMonth($event)\"\n [selectedValue]=\"selectedValue\">\n </month-table>\n </div>\n </div>\n }\n @case ('quarter') {\n <div class=\"{{ prefixCls }}-quarter\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <quarter-table\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n (valueChange)=\"onChooseQuarter($event)\"\n [selectedValue]=\"selectedValue\">\n </quarter-table>\n </div>\n </div>\n }\n @default {\n <date-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'date')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'date')\"\n [showPreBtn]=\"enablePrevNext('prev', 'date')\"\n [showNextBtn]=\"enablePrevNext('next', 'date')\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\"></date-header>\n <div class=\"{{ prefixCls }}-body\">\n <date-table\n [showWeek]=\"showWeek\"\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n (valueChange)=\"onSelectDate($event)\"\n showWeekNumber=\"false\"\n [disabledDate]=\"disabledDate\"\n [cellRender]=\"dateRender\"\n [selectedValue]=\"selectedValue\"\n [hoverValue]=\"hoverValue\"\n [timeZone]=\"timeZone\"\n (dayHover)=\"dayHover.emit($event)\"></date-table>\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: DecadeHeader, selector: "decade-header" }, { kind: "component", type: DecadeTable, selector: "decade-table", exportAs: ["decadeTable"] }, { kind: "component", type: YearHeader, selector: "year-header" }, { kind: "component", type: YearTable, selector: "year-table", outputs: ["decadePanelShow"] }, { kind: "component", type: MonthHeader, selector: "month-header" }, { kind: "component", type: MonthTable, selector: "month-table", exportAs: ["monthTable"] }, { kind: "component", type: QuarterTable, selector: "quarter-table", exportAs: ["quarterTable"] }, { kind: "component", type: DateHeader, selector: "date-header" }, { kind: "component", type: DateTable, selector: "date-table", outputs: ["dayHover"], exportAs: ["dateTable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1924
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: InnerPopup, isStandalone: true, selector: "inner-popup", inputs: { showWeek: { classPropertyName: "showWeek", publicName: "showWeek", isSignal: true, isRequired: false, transformFunction: null }, isRange: { classPropertyName: "isRange", publicName: "isRange", isSignal: true, isRequired: false, transformFunction: null }, activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: false, transformFunction: null }, rangeActiveDate: { classPropertyName: "rangeActiveDate", publicName: "rangeActiveDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, dateRender: { classPropertyName: "dateRender", publicName: "dateRender", isSignal: true, isRequired: false, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, hoverValue: { classPropertyName: "hoverValue", publicName: "hoverValue", isSignal: true, isRequired: false, transformFunction: null }, panelMode: { classPropertyName: "panelMode", publicName: "panelMode", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, showDateRangeInput: { classPropertyName: "showDateRangeInput", publicName: "showDateRangeInput", isSignal: true, isRequired: false, transformFunction: null }, partType: { classPropertyName: "partType", publicName: "partType", isSignal: true, isRequired: false, transformFunction: null }, endPanelMode: { classPropertyName: "endPanelMode", publicName: "endPanelMode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeDate: "activeDateChange", value: "valueChange", panelModeChange: "panelModeChange", headerChange: "headerChange", selectDate: "selectDate", dayHover: "dayHover" }, host: { properties: { "class.thy-calendar-picker-inner-popup-with-range-input": "showDateRangeInput()" }, classAttribute: "thy-calendar-picker-inner-popup" }, exportAs: ["innerPopup"], ngImport: i0, template: "@if (showDateRangeInput()) {\n <div class=\"{{ prefixCls }}-picker-inner-popup-range-input\">\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue()[0])\" [placeholder]=\"locale().startDate\" />\n <span class=\"split\"></span>\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue()[1])\" [placeholder]=\"locale().endDate\" />\n </div>\n}\n@switch (panelMode()) {\n @case ('decade') {\n <div class=\"{{ prefixCls }}-decade\">\n <decade-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'decade')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'decade')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </decade-header>\n <div class=\"{{ prefixCls }}-body\">\n <decade-table [value]=\"value()\" [activeDate]=\"activeDate()\" (valueChange)=\"onChooseDecade($event)\"></decade-table>\n </div>\n </div>\n }\n @case ('year') {\n <div class=\"{{ prefixCls }}-year\">\n <year-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'year')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'year')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </year-header>\n <div class=\"{{ prefixCls }}-body\">\n <year-table\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n [disabledDate]=\"disabledDate()\"\n (valueChange)=\"onChooseYear($event)\"\n [selectedValue]=\"selectedValue()\">\n </year-table>\n </div>\n </div>\n }\n @case ('month') {\n <div class=\"{{ prefixCls }}-month\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <month-table\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n [disabledDate]=\"disabledDate()\"\n (valueChange)=\"onChooseMonth($event)\"\n [selectedValue]=\"selectedValue()\">\n </month-table>\n </div>\n </div>\n }\n @case ('quarter') {\n <div class=\"{{ prefixCls }}-quarter\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <quarter-table\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n [disabledDate]=\"disabledDate()\"\n (valueChange)=\"onChooseQuarter($event)\"\n [selectedValue]=\"selectedValue()\">\n </quarter-table>\n </div>\n </div>\n }\n @default {\n <date-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'date')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'date')\"\n [showPreBtn]=\"enablePrevNext('prev', 'date')\"\n [showNextBtn]=\"enablePrevNext('next', 'date')\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\"></date-header>\n <div class=\"{{ prefixCls }}-body\">\n <date-table\n [showWeek]=\"showWeek()\"\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n (valueChange)=\"onSelectDate($event)\"\n showWeekNumber=\"false\"\n [disabledDate]=\"disabledDate()\"\n [cellRender]=\"dateRender()\"\n [selectedValue]=\"selectedValue()\"\n [hoverValue]=\"hoverValue()\"\n [timeZone]=\"timeZone()\"\n (dayHover)=\"dayHover.emit($event)\"></date-table>\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: DecadeHeader, selector: "decade-header" }, { kind: "component", type: DecadeTable, selector: "decade-table", exportAs: ["decadeTable"] }, { kind: "component", type: YearHeader, selector: "year-header" }, { kind: "component", type: YearTable, selector: "year-table", outputs: ["decadePanelShow"] }, { kind: "component", type: MonthHeader, selector: "month-header" }, { kind: "component", type: MonthTable, selector: "month-table", exportAs: ["monthTable"] }, { kind: "component", type: QuarterTable, selector: "quarter-table", exportAs: ["quarterTable"] }, { kind: "component", type: DateHeader, selector: "date-header" }, { kind: "component", type: DateTable, selector: "date-table", outputs: ["dayHover"], exportAs: ["dateTable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1952
1925
  }
1953
1926
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: InnerPopup, decorators: [{
1954
1927
  type: Component,
@@ -1963,55 +1936,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
1963
1936
  QuarterTable,
1964
1937
  DateHeader,
1965
1938
  DateTable
1966
- ], template: "@if (showDateRangeInput) {\n <div class=\"{{ prefixCls }}-picker-inner-popup-range-input\">\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue[0])\" [placeholder]=\"locale().startDate\" />\n <span class=\"split\"></span>\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue[1])\" [placeholder]=\"locale().endDate\" />\n </div>\n}\n@switch (panelMode) {\n @case ('decade') {\n <div class=\"{{ prefixCls }}-decade\">\n <decade-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'decade')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'decade')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </decade-header>\n <div class=\"{{ prefixCls }}-body\">\n <decade-table [value]=\"value\" [activeDate]=\"activeDate\" (valueChange)=\"onChooseDecade($event)\"></decade-table>\n </div>\n </div>\n }\n @case ('year') {\n <div class=\"{{ prefixCls }}-year\">\n <year-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'year')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'year')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </year-header>\n <div class=\"{{ prefixCls }}-body\">\n <year-table\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n (valueChange)=\"onChooseYear($event)\"\n [selectedValue]=\"selectedValue\">\n </year-table>\n </div>\n </div>\n }\n @case ('month') {\n <div class=\"{{ prefixCls }}-month\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <month-table\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n (valueChange)=\"onChooseMonth($event)\"\n [selectedValue]=\"selectedValue\">\n </month-table>\n </div>\n </div>\n }\n @case ('quarter') {\n <div class=\"{{ prefixCls }}-quarter\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <quarter-table\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n (valueChange)=\"onChooseQuarter($event)\"\n [selectedValue]=\"selectedValue\">\n </quarter-table>\n </div>\n </div>\n }\n @default {\n <date-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'date')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'date')\"\n [showPreBtn]=\"enablePrevNext('prev', 'date')\"\n [showNextBtn]=\"enablePrevNext('next', 'date')\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\"></date-header>\n <div class=\"{{ prefixCls }}-body\">\n <date-table\n [showWeek]=\"showWeek\"\n [value]=\"value\"\n [activeDate]=\"activeDate\"\n (valueChange)=\"onSelectDate($event)\"\n showWeekNumber=\"false\"\n [disabledDate]=\"disabledDate\"\n [cellRender]=\"dateRender\"\n [selectedValue]=\"selectedValue\"\n [hoverValue]=\"hoverValue\"\n [timeZone]=\"timeZone\"\n (dayHover)=\"dayHover.emit($event)\"></date-table>\n </div>\n }\n}\n" }]
1967
- }], propDecorators: { className: [{
1968
- type: HostBinding,
1969
- args: ['class.thy-calendar-picker-inner-popup']
1970
- }], _showDateRangeInput: [{
1971
- type: HostBinding,
1972
- args: ['class.thy-calendar-picker-inner-popup-with-range-input']
1973
- }], showWeek: [{
1974
- type: Input
1975
- }], isRange: [{
1976
- type: Input
1977
- }], activeDate: [{
1978
- type: Input
1979
- }], rangeActiveDate: [{
1980
- type: Input
1981
- }], enablePrev: [{
1982
- type: Input
1983
- }], enableNext: [{
1984
- type: Input
1985
- }], disabledDate: [{
1986
- type: Input
1987
- }], dateRender: [{
1988
- type: Input
1989
- }], selectedValue: [{
1990
- type: Input
1991
- }], hoverValue: [{
1992
- type: Input
1993
- }], panelMode: [{
1994
- type: Input
1995
- }], timeZone: [{
1996
- type: Input
1997
- }], showDateRangeInput: [{
1998
- type: Input,
1999
- args: [{ transform: coerceBooleanProperty }]
2000
- }], partType: [{
2001
- type: Input
2002
- }], endPanelMode: [{
2003
- type: Input
2004
- }], panelModeChange: [{
2005
- type: Output
2006
- }], value: [{
2007
- type: Input
2008
- }], headerChange: [{
2009
- type: Output
2010
- }], selectDate: [{
2011
- type: Output
2012
- }], dayHover: [{
2013
- type: Output
2014
- }] } });
1939
+ ], host: {
1940
+ class: 'thy-calendar-picker-inner-popup',
1941
+ '[class.thy-calendar-picker-inner-popup-with-range-input]': 'showDateRangeInput()'
1942
+ }, template: "@if (showDateRangeInput()) {\n <div class=\"{{ prefixCls }}-picker-inner-popup-range-input\">\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue()[0])\" [placeholder]=\"locale().startDate\" />\n <span class=\"split\"></span>\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue()[1])\" [placeholder]=\"locale().endDate\" />\n </div>\n}\n@switch (panelMode()) {\n @case ('decade') {\n <div class=\"{{ prefixCls }}-decade\">\n <decade-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'decade')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'decade')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </decade-header>\n <div class=\"{{ prefixCls }}-body\">\n <decade-table [value]=\"value()\" [activeDate]=\"activeDate()\" (valueChange)=\"onChooseDecade($event)\"></decade-table>\n </div>\n </div>\n }\n @case ('year') {\n <div class=\"{{ prefixCls }}-year\">\n <year-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'year')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'year')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </year-header>\n <div class=\"{{ prefixCls }}-body\">\n <year-table\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n [disabledDate]=\"disabledDate()\"\n (valueChange)=\"onChooseYear($event)\"\n [selectedValue]=\"selectedValue()\">\n </year-table>\n </div>\n </div>\n }\n @case ('month') {\n <div class=\"{{ prefixCls }}-month\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <month-table\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n [disabledDate]=\"disabledDate()\"\n (valueChange)=\"onChooseMonth($event)\"\n [selectedValue]=\"selectedValue()\">\n </month-table>\n </div>\n </div>\n }\n @case ('quarter') {\n <div class=\"{{ prefixCls }}-quarter\">\n <month-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'month')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'month')\"\n [showNextBtn]=\"false\"\n [showPreBtn]=\"false\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\">\n </month-header>\n <div class=\"{{ prefixCls }}-body\">\n <quarter-table\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n [disabledDate]=\"disabledDate()\"\n (valueChange)=\"onChooseQuarter($event)\"\n [selectedValue]=\"selectedValue()\">\n </quarter-table>\n </div>\n </div>\n }\n @default {\n <date-header\n [(value)]=\"activeDate\"\n [showSuperPreBtn]=\"enableSuperPrevNext('prev', 'date')\"\n [showSuperNextBtn]=\"enableSuperPrevNext('next', 'date')\"\n [showPreBtn]=\"enablePrevNext('prev', 'date')\"\n [showNextBtn]=\"enablePrevNext('next', 'date')\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n (valueChange)=\"headerChange.emit($event)\"></date-header>\n <div class=\"{{ prefixCls }}-body\">\n <date-table\n [showWeek]=\"showWeek()\"\n [value]=\"value()\"\n [activeDate]=\"activeDate()\"\n (valueChange)=\"onSelectDate($event)\"\n showWeekNumber=\"false\"\n [disabledDate]=\"disabledDate()\"\n [cellRender]=\"dateRender()\"\n [selectedValue]=\"selectedValue()\"\n [hoverValue]=\"hoverValue()\"\n [timeZone]=\"timeZone()\"\n (dayHover)=\"dayHover.emit($event)\"></date-table>\n </div>\n }\n}\n" }]
1943
+ }], ctorParameters: () => [] });
2015
1944
 
2016
1945
  /**
2017
1946
  * @private
@@ -2021,22 +1950,47 @@ class DatePopup {
2021
1950
  this.cdr = inject(ChangeDetectorRef);
2022
1951
  this.datePickerConfigService = inject(ThyDatePickerConfigService);
2023
1952
  this.locale = injectLocale('datePicker');
2024
- this.panelModeChange = new EventEmitter();
2025
- this.calendarChange = new EventEmitter();
2026
- this.valueChange = new EventEmitter();
2027
- this.resultOk = new EventEmitter(); // Emitted when done with date selecting
2028
- this.showTimePickerChange = new EventEmitter();
2029
- this.dateValueChange = new EventEmitter();
1953
+ this.isRange = input(false, { transform: coerceBooleanProperty });
1954
+ this.showWeek = input(false, { transform: coerceBooleanProperty });
1955
+ this.format = input();
1956
+ this.disabledDate = model();
1957
+ this.minDate = input();
1958
+ this.maxDate = input();
1959
+ this.showToday = input(false, { transform: coerceBooleanProperty });
1960
+ /**
1961
+ * 是否支持设置时间(时、分)
1962
+ */
1963
+ this.showTime = input();
1964
+ /**
1965
+ * 是否展示时间(时、分)
1966
+ */
1967
+ this.mustShowTime = input(false, { transform: coerceBooleanProperty });
1968
+ this.dateRender = input();
1969
+ this.className = input();
1970
+ this.panelMode = model(undefined);
1971
+ this.value = model();
1972
+ this.defaultPickerValue = input();
1973
+ this.showShortcut = model();
1974
+ this.shortcutPresets = model();
1975
+ this.shortcutPosition = input();
1976
+ this.flexible = input(false, { transform: coerceBooleanProperty });
1977
+ this.flexibleDateGranularity = model();
1978
+ this.timestampPrecision = input();
1979
+ this.timeZone = input();
1980
+ this.panelModeChange = output();
1981
+ this.calendarChange = output();
1982
+ this.valueChange = output();
1983
+ this.resultOk = output(); // Emitted when done with date selecting
1984
+ this.showTimePickerChange = output();
1985
+ this.dateValueChange = output();
2030
1986
  this.prefixCls = 'thy-calendar';
2031
1987
  this.showTimePicker = false;
2032
1988
  this.selectedValue = []; // Range ONLY
2033
1989
  this.hoverValue = []; // Range ONLY
2034
1990
  this.flexibleActiveTab = 'advanced';
2035
1991
  this.partTypeMap = { left: 0, right: 1 };
2036
- this.disableTimeConfirm = false;
2037
- }
2038
- get hasTimePicker() {
2039
- return !!this.showTime;
1992
+ this.endPanelMode = signal(undefined);
1993
+ this.disableTimeConfirm = signal(false);
2040
1994
  }
2041
1995
  setProperty(key, value) {
2042
1996
  this[key] = value;
@@ -2045,26 +1999,30 @@ class DatePopup {
2045
1999
  ngOnInit() {
2046
2000
  this.initShortcutPresets();
2047
2001
  this.initPanelMode();
2048
- if (this.flexible && this.flexibleDateGranularity === 'day') {
2002
+ if (this.flexible() && this.flexibleDateGranularity() === 'day') {
2049
2003
  this.flexibleActiveTab = 'custom';
2050
2004
  }
2051
- if (this.defaultPickerValue && !hasValue(this.value)) {
2052
- const { value } = transformDateValue(this.defaultPickerValue);
2053
- this.value = makeValue(value, this.isRange, this.timeZone);
2005
+ if (this.defaultPickerValue() && !hasValue(this.value())) {
2006
+ const { value } = transformDateValue(this.defaultPickerValue());
2007
+ this.value.set(makeValue(value, this.isRange(), this.timeZone()));
2054
2008
  }
2055
2009
  this.updateActiveDate();
2056
2010
  this.initDisabledDate();
2057
- if (this.isRange && this.flexible && this.value) {
2058
- this.advancedSelectedValue = { begin: this.value[0], end: this.value[1], dateGranularity: this.flexibleDateGranularity };
2011
+ if (this.isRange() && this.flexible() && this.value()) {
2012
+ this.advancedSelectedValue = {
2013
+ begin: this.value()[0],
2014
+ end: this.value()[1],
2015
+ dateGranularity: this.flexibleDateGranularity()
2016
+ };
2059
2017
  }
2060
2018
  }
2061
2019
  ngOnChanges(changes) {
2062
2020
  if (changes.panelMode) {
2063
- if (helpers.isArray(this.panelMode)) {
2064
- this.endPanelMode = [...this.panelMode];
2021
+ if (helpers.isArray(this.panelMode())) {
2022
+ this.endPanelMode.set([...this.panelMode()]);
2065
2023
  }
2066
2024
  else {
2067
- this.endPanelMode = this.panelMode;
2025
+ this.endPanelMode.set(this.panelMode());
2068
2026
  }
2069
2027
  }
2070
2028
  if (changes.defaultPickerValue) {
@@ -2076,26 +2034,27 @@ class DatePopup {
2076
2034
  }
2077
2035
  initShortcutPresets() {
2078
2036
  const { shortcutRangesPresets, shortcutDatePresets, showShortcut } = this.datePickerConfigService;
2079
- this.showShortcut =
2080
- ['date', 'date,date'].includes(this.panelMode.toString()) && isUndefinedOrNull(this.showShortcut)
2081
- ? showShortcut
2082
- : this.showShortcut;
2083
- if (this.showShortcut) {
2084
- if (!this.shortcutPresets) {
2085
- this.shortcutPresets = this.isRange ? shortcutRangesPresets : shortcutDatePresets;
2086
- }
2087
- this.innerShortcutPresets = isFunction(this.shortcutPresets) ? this.shortcutPresets() : this.shortcutPresets;
2037
+ this.showShortcut.set(['date', 'date,date'].includes(this.panelMode().toString()) && isUndefinedOrNull(this.showShortcut())
2038
+ ? showShortcut
2039
+ : this.showShortcut());
2040
+ if (this.showShortcut()) {
2041
+ if (!this.shortcutPresets()) {
2042
+ this.shortcutPresets.set(this.isRange() ? shortcutRangesPresets : shortcutDatePresets);
2043
+ }
2044
+ this.innerShortcutPresets = isFunction(this.shortcutPresets())
2045
+ ? this.shortcutPresets()()
2046
+ : this.shortcutPresets();
2088
2047
  if (this.innerShortcutPresets.length) {
2089
2048
  const minDate = this.getMinTinyDate();
2090
2049
  const maxDate = this.getMaxTinyDate();
2091
2050
  const minTime = minDate ? minDate.getTime() : null;
2092
2051
  const maxTime = maxDate ? maxDate.getTime() : null;
2093
- if (this.isRange) {
2052
+ if (this.isRange()) {
2094
2053
  this.innerShortcutPresets.forEach((preset) => {
2095
2054
  const begin = getShortcutValue(preset.value[0]);
2096
- const beginTime = new TinyDate(startOfDay(begin), this.timeZone).getTime();
2055
+ const beginTime = new TinyDate(startOfDay(begin), this.timeZone()).getTime();
2097
2056
  const end = getShortcutValue(preset.value[1]);
2098
- const endTime = new TinyDate(endOfDay(end), this.timeZone).getTime();
2057
+ const endTime = new TinyDate(endOfDay(end), this.timeZone()).getTime();
2099
2058
  if ((minDate && endTime < minTime) || (maxDate && beginTime > maxTime)) {
2100
2059
  preset.disabled = true;
2101
2060
  }
@@ -2107,7 +2066,7 @@ class DatePopup {
2107
2066
  else {
2108
2067
  this.innerShortcutPresets.forEach((preset) => {
2109
2068
  const singleValue = getShortcutValue(preset.value);
2110
- const singleTime = new TinyDate(singleValue, this.timeZone).getTime();
2069
+ const singleTime = new TinyDate(singleValue, this.timeZone()).getTime();
2111
2070
  if ((minDate && singleTime < minTime) || (maxDate && singleTime > maxTime)) {
2112
2071
  preset.disabled = true;
2113
2072
  }
@@ -2121,36 +2080,36 @@ class DatePopup {
2121
2080
  }
2122
2081
  updateActiveDate() {
2123
2082
  this.clearHoverValue();
2124
- if (!this.value) {
2125
- const { value } = transformDateValue(this.defaultPickerValue);
2126
- this.value = makeValue(value, this.isRange, this.timeZone);
2083
+ if (!this.value()) {
2084
+ const { value } = transformDateValue(this.defaultPickerValue());
2085
+ this.value.set(makeValue(value, this.isRange(), this.timeZone()));
2127
2086
  }
2128
- if (this.isRange) {
2129
- if (!this.flexible || this.flexibleDateGranularity === 'day') {
2130
- this.selectedValue = this.value;
2087
+ if (this.isRange()) {
2088
+ if (!this.flexible() || this.flexibleDateGranularity() === 'day') {
2089
+ this.selectedValue = this.value();
2131
2090
  }
2132
- this.activeDate = this.normalizeRangeValue(this.value, this.getPanelMode(this.endPanelMode));
2091
+ this.activeDate = this.normalizeRangeValue(this.value(), this.getPanelMode(this.endPanelMode()));
2133
2092
  }
2134
2093
  else {
2135
- this.activeDate = this.value;
2094
+ this.activeDate = this.value();
2136
2095
  }
2137
2096
  this.isDisableTimeConfirm();
2138
2097
  }
2139
2098
  initPanelMode() {
2140
- if (!this.endPanelMode) {
2141
- if (helpers.isArray(this.panelMode)) {
2142
- this.endPanelMode = [...this.panelMode];
2099
+ if (!this.endPanelMode()) {
2100
+ if (helpers.isArray(this.panelMode())) {
2101
+ this.endPanelMode.set([...this.panelMode()]);
2143
2102
  }
2144
2103
  else {
2145
- this.endPanelMode = this.panelMode;
2104
+ this.endPanelMode.set(this.panelMode());
2146
2105
  }
2147
2106
  }
2148
2107
  else {
2149
- if (helpers.isArray(this.endPanelMode)) {
2150
- this.panelMode = [...this.endPanelMode];
2108
+ if (helpers.isArray(this.endPanelMode())) {
2109
+ this.panelMode.set([...this.endPanelMode()]);
2151
2110
  }
2152
2111
  else {
2153
- this.panelMode = this.endPanelMode;
2112
+ this.panelMode.set(this.endPanelMode());
2154
2113
  }
2155
2114
  }
2156
2115
  }
@@ -2158,18 +2117,18 @@ class DatePopup {
2158
2117
  let minDate;
2159
2118
  let maxDate;
2160
2119
  let disabledDateFn;
2161
- if (this.minDate) {
2162
- const { value } = transformDateValue(this.minDate);
2163
- minDate = new TinyDate(value, this.timeZone);
2120
+ if (this.minDate()) {
2121
+ const { value } = transformDateValue(this.minDate());
2122
+ minDate = new TinyDate(value, this.timeZone());
2164
2123
  }
2165
- if (this.maxDate) {
2166
- const { value } = transformDateValue(this.maxDate);
2167
- maxDate = new TinyDate(value, this.timeZone);
2124
+ if (this.maxDate()) {
2125
+ const { value } = transformDateValue(this.maxDate());
2126
+ maxDate = new TinyDate(value, this.timeZone());
2168
2127
  }
2169
- if (this.disabledDate) {
2170
- disabledDateFn = this.disabledDate;
2128
+ if (this.disabledDate()) {
2129
+ disabledDateFn = this.disabledDate();
2171
2130
  }
2172
- this.disabledDate = d => {
2131
+ this.disabledDate.set(d => {
2173
2132
  let expression = false;
2174
2133
  if (minDate) {
2175
2134
  expression = d < minDate.startOfDay().nativeDate;
@@ -2181,23 +2140,23 @@ class DatePopup {
2181
2140
  expression = disabledDateFn(d);
2182
2141
  }
2183
2142
  return expression;
2184
- };
2143
+ });
2185
2144
  }
2186
2145
  onShowTimePickerChange(show) {
2187
2146
  this.showTimePicker = show;
2188
2147
  this.showTimePickerChange.emit(show);
2189
2148
  }
2190
2149
  onClickOk() {
2191
- this.setValue(this.value);
2192
- this.valueChange.emit(this.value);
2150
+ this.setValue(this.value());
2151
+ this.valueChange.emit(this.value());
2193
2152
  this.resultOk.emit();
2194
2153
  }
2195
2154
  onClickRemove() {
2196
- this.value = this.isRange ? [] : null;
2197
- this.valueChange.emit(this.value);
2155
+ this.value.set(this.isRange() ? [] : null);
2156
+ this.valueChange.emit(this.value());
2198
2157
  }
2199
2158
  onDayHover(value) {
2200
- if (this.isRange && this.selectedValue[0] && !this.selectedValue[1]) {
2159
+ if (this.isRange() && this.selectedValue[0] && !this.selectedValue[1]) {
2201
2160
  // When right value is selected, don't do hover
2202
2161
  const base = this.selectedValue[0]; // Use the left of selected value as the base to decide later hoverValue
2203
2162
  if (base.isBeforeDay(value)) {
@@ -2209,43 +2168,43 @@ class DatePopup {
2209
2168
  }
2210
2169
  }
2211
2170
  onPanelModeChange(mode, partType) {
2212
- if (this.isRange) {
2213
- this.panelMode[this.getPartTypeIndex(partType)] = mode;
2171
+ if (this.isRange()) {
2172
+ this.panelMode()[this.getPartTypeIndex(partType)] = mode;
2214
2173
  }
2215
2174
  else {
2216
- this.panelMode = mode;
2175
+ this.panelMode.set(mode);
2217
2176
  }
2218
- this.panelModeChange.emit(this.panelMode);
2177
+ this.panelModeChange.emit(this.panelMode());
2219
2178
  }
2220
2179
  onHeaderChange(value, partType) {
2221
- if (this.isRange) {
2180
+ if (this.isRange()) {
2222
2181
  this.activeDate[this.getPartTypeIndex(partType)] = value;
2223
- this.activeDate = this.normalizeRangeValue(this.activeDate, this.getPanelMode(this.endPanelMode, partType));
2182
+ this.activeDate = this.normalizeRangeValue(this.activeDate, this.getPanelMode(this.endPanelMode(), partType));
2224
2183
  }
2225
2184
  else {
2226
2185
  this.activeDate = value;
2227
2186
  }
2228
2187
  }
2229
2188
  onSelectTime(value, partType) {
2230
- if (this.isRange) {
2189
+ if (this.isRange()) {
2231
2190
  // TODO:range picker set time
2232
2191
  }
2233
2192
  else {
2234
- this.setValue(new TinyDate(value.nativeDate, this.timeZone));
2193
+ this.setValue(new TinyDate(value.nativeDate, this.timeZone()));
2235
2194
  }
2236
2195
  }
2237
2196
  selectTab(active) {
2238
2197
  this.flexibleActiveTab = active;
2239
2198
  }
2240
2199
  clearFlexibleValue() {
2241
- this.flexibleDateGranularity = null;
2200
+ this.flexibleDateGranularity.set(null);
2242
2201
  if (this.flexibleActiveTab === 'advanced') {
2243
2202
  this.advancedSelectedValue = {};
2244
2203
  }
2245
2204
  else {
2246
2205
  this.selectedValue = [];
2247
2206
  }
2248
- this.valueChange.emit({ begin: null, end: null, dateGranularity: this.flexibleDateGranularity });
2207
+ this.valueChange.emit({ begin: null, end: null, dateGranularity: this.flexibleDateGranularity() });
2249
2208
  }
2250
2209
  changeValueFromAdvancedSelect(value) {
2251
2210
  this.valueChange.emit(value);
@@ -2254,7 +2213,7 @@ class DatePopup {
2254
2213
  this.dateValueChange.emit({ value: [value.begin, value.end] });
2255
2214
  }
2256
2215
  changeValueFromSelect(value, partType) {
2257
- if (this.isRange) {
2216
+ if (this.isRange()) {
2258
2217
  // clear advanced date when select a custom date
2259
2218
  this.advancedSelectedValue = {};
2260
2219
  const [left, right] = this.selectedValue;
@@ -2270,7 +2229,7 @@ class DatePopup {
2270
2229
  this.setRangeValue('right', value);
2271
2230
  this.selectedValue = sortRangeValue(this.selectedValue); // Sort
2272
2231
  this.selectedValue = this.getSelectedRangeValueByMode(this.selectedValue);
2273
- this.activeDate = this.normalizeRangeValue(this.selectedValue, this.getPanelMode(this.endPanelMode, partType));
2232
+ this.activeDate = this.normalizeRangeValue(this.selectedValue, this.getPanelMode(this.endPanelMode(), partType));
2274
2233
  this.setValue(this.cloneRangeDate(this.selectedValue));
2275
2234
  this.calendarChange.emit(this.cloneRangeDate(this.selectedValue));
2276
2235
  this.dateValueChange.emit({ value: this.cloneRangeDate(this.selectedValue) });
@@ -2283,7 +2242,7 @@ class DatePopup {
2283
2242
  }
2284
2243
  }
2285
2244
  getSelectedRangeValueByMode(value) {
2286
- const panelMode = this.getPanelMode(this.endPanelMode);
2245
+ const panelMode = this.getPanelMode(this.endPanelMode());
2287
2246
  if (panelMode === 'year') {
2288
2247
  return [value[0].startOfYear(), value[1].endOfYear()];
2289
2248
  }
@@ -2301,10 +2260,10 @@ class DatePopup {
2301
2260
  }
2302
2261
  }
2303
2262
  updateHourMinute(value) {
2304
- if (!this.value) {
2263
+ if (!this.value()) {
2305
2264
  return value;
2306
2265
  }
2307
- const originDate = this.value;
2266
+ const originDate = this.value();
2308
2267
  const dateTime = [value.getHours(), value.getMinutes(), value.getSeconds()];
2309
2268
  const originDateTime = [originDate.getHours(), originDate.getMinutes(), originDate.getSeconds()];
2310
2269
  const isEqualTime = dateTime.toString() === originDateTime.toString();
@@ -2316,7 +2275,7 @@ class DatePopup {
2316
2275
  }
2317
2276
  }
2318
2277
  enablePrevNext(direction, partType) {
2319
- if (this.isRange && this.panelMode === this.endPanelMode) {
2278
+ if (this.isRange() && this.panelMode() === this.endPanelMode()) {
2320
2279
  const [start, end] = this.activeDate;
2321
2280
  const showMiddle = !start.addMonths(1).isSame(end, 'month'); // One month diff then don't show middle prev/next
2322
2281
  if ((partType === 'left' && direction === 'next') || (partType === 'right' && direction === 'prev')) {
@@ -2329,7 +2288,7 @@ class DatePopup {
2329
2288
  }
2330
2289
  }
2331
2290
  getPanelMode(panelMode, partType) {
2332
- if (this.isRange) {
2291
+ if (this.isRange()) {
2333
2292
  return panelMode[this.getPartTypeIndex(partType)];
2334
2293
  }
2335
2294
  else {
@@ -2337,16 +2296,16 @@ class DatePopup {
2337
2296
  }
2338
2297
  }
2339
2298
  getValueBySelector(partType) {
2340
- if (this.isRange) {
2299
+ if (this.isRange()) {
2341
2300
  const valueShow = this.selectedValue; // Use the real time value that without decorations when timepicker is shown up
2342
2301
  return valueShow[this.getPartTypeIndex(partType)];
2343
2302
  }
2344
2303
  else {
2345
- return this.value;
2304
+ return this.value();
2346
2305
  }
2347
2306
  }
2348
2307
  getActiveDate(partType) {
2349
- if (this.isRange) {
2308
+ if (this.isRange()) {
2350
2309
  return this.activeDate[this.getPartTypeIndex(partType)];
2351
2310
  }
2352
2311
  else {
@@ -2357,23 +2316,27 @@ class DatePopup {
2357
2316
  return this.partTypeMap[partType];
2358
2317
  }
2359
2318
  getMinTinyDate() {
2360
- return this.minDate ? new TinyDate(transformDateValue(this.minDate).value, this.timeZone) : null;
2319
+ return this.minDate() ? new TinyDate(transformDateValue(this.minDate()).value, this.timeZone()) : null;
2361
2320
  }
2362
2321
  getMaxTinyDate() {
2363
- return this.maxDate ? new TinyDate(transformDateValue(this.maxDate).value, this.timeZone) : null;
2322
+ return this.maxDate() ? new TinyDate(transformDateValue(this.maxDate()).value, this.timeZone()) : null;
2364
2323
  }
2365
2324
  clearHoverValue() {
2366
2325
  this.hoverValue = [];
2367
2326
  }
2368
2327
  setValue(value) {
2369
- this.value = value;
2370
- if (this.isRange && this.flexible) {
2371
- this.flexibleDateGranularity = 'day';
2372
- this.valueChange.emit({ begin: value[0], end: value[1], dateGranularity: this.flexibleDateGranularity });
2328
+ this.value.set(value);
2329
+ if (this.isRange() && this.flexible()) {
2330
+ this.flexibleDateGranularity.set('day');
2331
+ this.valueChange.emit({
2332
+ begin: value[0],
2333
+ end: value[1],
2334
+ dateGranularity: this.flexibleDateGranularity()
2335
+ });
2373
2336
  }
2374
2337
  else {
2375
- if (!this.showTime || !this.showTimePicker) {
2376
- this.valueChange.emit(this.value);
2338
+ if (!this.showTime() || !this.showTimePicker) {
2339
+ this.valueChange.emit(this.value());
2377
2340
  }
2378
2341
  }
2379
2342
  this.isDisableTimeConfirm();
@@ -2388,7 +2351,7 @@ class DatePopup {
2388
2351
  };
2389
2352
  const headerMode = headerModes[mode];
2390
2353
  const [start, end] = value;
2391
- const newStart = start || new TinyDate(undefined, this.timeZone);
2354
+ const newStart = start || new TinyDate(undefined, this.timeZone());
2392
2355
  let newEnd = end;
2393
2356
  if (!newEnd || newStart.isSame(end, headerMode)) {
2394
2357
  newEnd = dateAddAmount(newStart, 1, headerMode);
@@ -2403,17 +2366,17 @@ class DatePopup {
2403
2366
  return [value[0] && value[0].clone(), value[1] && value[1].clone()];
2404
2367
  }
2405
2368
  isDisableTimeConfirm() {
2406
- if (this.isRange || !this.showTime) {
2369
+ if (this.isRange() || !this.showTime()) {
2407
2370
  return;
2408
2371
  }
2409
- const date = this.value ? this.value : new TinyDate(undefined, this.timeZone);
2372
+ const date = this.value() ? this.value() : new TinyDate(undefined, this.timeZone());
2410
2373
  const minDate = this.getMinTinyDate();
2411
2374
  const maxDate = this.getMaxTinyDate();
2412
2375
  if ((minDate && date.getTime() < minDate.getTime()) || (maxDate && date.getTime() > maxDate.getTime())) {
2413
- this.disableTimeConfirm = true;
2376
+ this.disableTimeConfirm.set(true);
2414
2377
  }
2415
2378
  else {
2416
- this.disableTimeConfirm = false;
2379
+ this.disableTimeConfirm.set(false);
2417
2380
  }
2418
2381
  }
2419
2382
  getSelectedShortcutPreset(date) {
@@ -2462,92 +2425,38 @@ class DatePopup {
2462
2425
  const end = getShortcutValue(value[1]);
2463
2426
  if (begin && end) {
2464
2427
  this.selectedValue = this.getSelectedShortcutPreset([
2465
- new TinyDate(begin, this.timeZone).startOfDay(),
2466
- new TinyDate(end, this.timeZone).endOfDay()
2428
+ new TinyDate(begin, this.timeZone()).startOfDay(),
2429
+ new TinyDate(end, this.timeZone()).endOfDay()
2467
2430
  ]);
2468
2431
  selectedPresetValue = this.cloneRangeDate(this.selectedValue);
2469
2432
  }
2470
2433
  }
2471
2434
  else {
2472
- const originDate = this.value;
2473
- const zonedTime = this.createInZoneTime(new TinyDate(getShortcutValue(value), this.timeZone), originDate?.getHours() ?? 0, originDate?.getMinutes() ?? 0, originDate?.getSeconds() ?? 0);
2474
- const singleTinyDate = this.updateHourMinute(new TinyDate(zonedTime, this.timeZone));
2435
+ const originDate = this.value();
2436
+ const zonedTime = this.createInZoneTime(new TinyDate(getShortcutValue(value), this.timeZone()), originDate?.getHours() ?? 0, originDate?.getMinutes() ?? 0, originDate?.getSeconds() ?? 0);
2437
+ const singleTinyDate = this.updateHourMinute(new TinyDate(zonedTime, this.timeZone()));
2475
2438
  selectedPresetValue = this.getSelectedShortcutPreset(singleTinyDate);
2476
2439
  }
2477
2440
  this.setValue(selectedPresetValue);
2478
- const shortcutPresetsValue = setValueByTimestampPrecision(shortcutPresets?.value, this.isRange, this.timestampPrecision, this.timeZone);
2441
+ const shortcutPresetsValue = setValueByTimestampPrecision(shortcutPresets?.value, this.isRange(), this.timestampPrecision(), this.timeZone());
2479
2442
  this.dateValueChange.emit({
2480
2443
  value: helpers.isArray(value) ? this.selectedValue : selectedPresetValue,
2481
2444
  triggerPreset: Object.assign({}, shortcutPresets, { value: shortcutPresetsValue })
2482
2445
  });
2483
- if (!helpers.isArray(value) && this.showTime && this.showTimePicker) {
2446
+ if (!helpers.isArray(value) && this.showTime() && this.showTimePicker) {
2484
2447
  this.updateActiveDate();
2485
2448
  }
2486
2449
  }
2487
2450
  createInZoneTime(date, hours, minutes, seconds) {
2488
- return TinyDate.createDateInTimeZone(date.getYear(), date.getMonth(), date.getDate(), hours, minutes, seconds, this.timeZone);
2451
+ return TinyDate.createDateInTimeZone(date.getYear(), date.getMonth(), date.getDate(), hours, minutes, seconds, this.timeZone());
2489
2452
  }
2490
2453
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DatePopup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2491
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DatePopup, isStandalone: true, selector: "date-popup", inputs: { isRange: "isRange", showWeek: "showWeek", format: "format", disabledDate: "disabledDate", minDate: "minDate", maxDate: "maxDate", showToday: "showToday", showTime: "showTime", mustShowTime: "mustShowTime", dateRender: "dateRender", className: "className", panelMode: "panelMode", value: "value", defaultPickerValue: "defaultPickerValue", showShortcut: "showShortcut", shortcutPresets: "shortcutPresets", shortcutPosition: "shortcutPosition", flexible: "flexible", flexibleDateGranularity: "flexibleDateGranularity", timestampPrecision: "timestampPrecision", timeZone: "timeZone" }, outputs: { panelModeChange: "panelModeChange", calendarChange: "calendarChange", valueChange: "valueChange", resultOk: "resultOk", showTimePickerChange: "showTimePickerChange", dateValueChange: "dateValueChange" }, exportAs: ["datePopup"], usesOnChanges: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-picker-container {{ className }}\">\n <div\n class=\"{{ prefixCls }} {{ showWeek ? prefixCls + '-week-number' : '' }}\n {{ isRange ? prefixCls + '-range' : '' }} {{ prefixCls }}-picker-shortcut-{{ shortcutPosition === 'left' ? 'left' : 'bottom' }}\">\n @if (showShortcut) {\n <div class=\"{{ prefixCls }}-picker-shortcut\">\n @for (item of innerShortcutPresets; track $index) {\n <div class=\"{{ prefixCls }}-picker-shortcut-item\" [class.disabled]=\"item.disabled\" (click)=\"shortcutSetValue(item)\">\n {{ item.title }}\n </div>\n }\n </div>\n }\n <div class=\"{{ prefixCls }}-panel\">\n <div class=\"{{ prefixCls }}-date-panel\">\n @if (flexible) {\n <div class=\"{{ prefixCls }}-date-panel-flexible\">\n <div class=\"{{ prefixCls }}-date-panel-flexible-tab\">\n <thy-nav thyType=\"pulled\" thySize=\"sm\">\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'advanced'\" (click)=\"selectTab('advanced')\">{{\n locale().advance\n }}</a>\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'custom'\" (click)=\"selectTab('custom')\">{{\n locale().custom\n }}</a>\n </thy-nav>\n <button thyButtonIcon=\"sweep\" thySize=\"sm\" class=\"clear-date-button\" (click)=\"clearFlexibleValue()\"></button>\n </div>\n <ng-container>\n <div class=\"{{ prefixCls }}-date-panel-advanced\" [hidden]=\"flexibleActiveTab !== 'advanced'\">\n <date-carousel\n name=\"dateCarousel\"\n (ngModelChange)=\"changeValueFromAdvancedSelect($event)\"\n [(ngModel)]=\"advancedSelectedValue\"\n [activeDate]=\"selectedValue[0]\"></date-carousel>\n </div>\n </ng-container>\n <div [hidden]=\"flexibleActiveTab !== 'custom'\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n </div>\n } @else {\n @if (isRange) {\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'left' }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'right' }\"></ng-container>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n }\n @if (!isRange) {\n <ng-container *ngTemplateOutlet=\"tplFooter\"></ng-container>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplInnerPopup let-partType=\"partType\">\n <inner-popup\n [showWeek]=\"showWeek\"\n [isRange]=\"isRange\"\n [panelMode]=\"getPanelMode(panelMode, partType)\"\n [endPanelMode]=\"getPanelMode(endPanelMode, partType)\"\n [partType]=\"partType\"\n [showDateRangeInput]=\"flexible && flexibleActiveTab === 'custom'\"\n (panelModeChange)=\"onPanelModeChange($event, partType)\"\n [value]=\"getValueBySelector(partType)\"\n [selectedValue]=\"selectedValue\"\n [activeDate]=\"getActiveDate(partType)\"\n [rangeActiveDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n [dateRender]=\"dateRender\"\n [hoverValue]=\"hoverValue\"\n [timeZone]=\"timeZone\"\n [enablePrev]=\"enablePrevNext('prev', partType)\"\n [enableNext]=\"enablePrevNext('next', partType)\"\n (dayHover)=\"onDayHover($event)\"\n (selectDate)=\"changeValueFromSelect($event, partType)\"\n (headerChange)=\"onHeaderChange($event, partType)\"></inner-popup>\n</ng-template>\n\n<ng-template #tplFooter>\n <calendar-footer\n [showTime]=\"showTime\"\n [mustShowTime]=\"mustShowTime\"\n [value]=\"value\"\n [timeZone]=\"timeZone\"\n [disableTimeConfirm]=\"disableTimeConfirm\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n (selectTime)=\"onSelectTime($event)\"\n (clickOk)=\"onClickOk()\"\n (clickRemove)=\"onClickRemove()\"></calendar-footer>\n</ng-template>\n\n<!-- Single ONLY -->\n\n<!-- Range ONLY -->\n<ng-template #tplRangePart let-partType=\"partType\">\n <div class=\"{{ prefixCls }}-range-part {{ prefixCls }}-range-{{ partType }}\">\n <div style=\"outline: none\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup; context: { partType: partType }\"></ng-container>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyPauseReCalculate", "thyInsideClosable", "thyPopoverOptions", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "component", type: ThyButtonIcon, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }, { kind: "component", type: DateCarousel, selector: "date-carousel", inputs: ["activeDate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InnerPopup, selector: "inner-popup", inputs: ["showWeek", "isRange", "activeDate", "rangeActiveDate", "enablePrev", "enableNext", "disabledDate", "dateRender", "selectedValue", "hoverValue", "panelMode", "timeZone", "showDateRangeInput", "partType", "endPanelMode", "value"], outputs: ["panelModeChange", "headerChange", "selectDate", "dayHover"], exportAs: ["innerPopup"] }, { kind: "component", type: CalendarFooter, selector: "calendar-footer", inputs: ["showTime", "mustShowTime", "value", "timeZone", "disableTimeConfirm"], outputs: ["selectTime", "clickOk", "clickRemove", "showTimePickerChange"], exportAs: ["calendarFooter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2454
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DatePopup, isStandalone: true, selector: "date-popup", inputs: { isRange: { classPropertyName: "isRange", publicName: "isRange", isSignal: true, isRequired: false, transformFunction: null }, showWeek: { classPropertyName: "showWeek", publicName: "showWeek", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, showToday: { classPropertyName: "showToday", publicName: "showToday", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, mustShowTime: { classPropertyName: "mustShowTime", publicName: "mustShowTime", isSignal: true, isRequired: false, transformFunction: null }, dateRender: { classPropertyName: "dateRender", publicName: "dateRender", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, panelMode: { classPropertyName: "panelMode", publicName: "panelMode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultPickerValue: { classPropertyName: "defaultPickerValue", publicName: "defaultPickerValue", isSignal: true, isRequired: false, transformFunction: null }, showShortcut: { classPropertyName: "showShortcut", publicName: "showShortcut", isSignal: true, isRequired: false, transformFunction: null }, shortcutPresets: { classPropertyName: "shortcutPresets", publicName: "shortcutPresets", isSignal: true, isRequired: false, transformFunction: null }, shortcutPosition: { classPropertyName: "shortcutPosition", publicName: "shortcutPosition", isSignal: true, isRequired: false, transformFunction: null }, flexible: { classPropertyName: "flexible", publicName: "flexible", isSignal: true, isRequired: false, transformFunction: null }, flexibleDateGranularity: { classPropertyName: "flexibleDateGranularity", publicName: "flexibleDateGranularity", isSignal: true, isRequired: false, transformFunction: null }, timestampPrecision: { classPropertyName: "timestampPrecision", publicName: "timestampPrecision", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabledDate: "disabledDateChange", panelMode: "panelModeChange", value: "valueChange", showShortcut: "showShortcutChange", shortcutPresets: "shortcutPresetsChange", flexibleDateGranularity: "flexibleDateGranularityChange", panelModeChange: "panelModeChange", calendarChange: "calendarChange", valueChange: "valueChange", resultOk: "resultOk", showTimePickerChange: "showTimePickerChange", dateValueChange: "dateValueChange" }, exportAs: ["datePopup"], usesOnChanges: true, ngImport: i0, template: "<div class=\"{{ prefixCls }}-picker-container {{ className() }}\">\n <div\n class=\"{{ prefixCls }} {{ showWeek() ? prefixCls + '-week-number' : '' }}\n {{ isRange() ? prefixCls + '-range' : '' }} {{ prefixCls }}-picker-shortcut-{{ shortcutPosition() === 'left' ? 'left' : 'bottom' }}\">\n @if (showShortcut()) {\n <div class=\"{{ prefixCls }}-picker-shortcut\">\n @for (item of innerShortcutPresets; track $index) {\n <div class=\"{{ prefixCls }}-picker-shortcut-item\" [class.disabled]=\"item.disabled\" (click)=\"shortcutSetValue(item)\">\n {{ item.title }}\n </div>\n }\n </div>\n }\n <div class=\"{{ prefixCls }}-panel\">\n <div class=\"{{ prefixCls }}-date-panel\">\n @if (flexible()) {\n <div class=\"{{ prefixCls }}-date-panel-flexible\">\n <div class=\"{{ prefixCls }}-date-panel-flexible-tab\">\n <thy-nav thyType=\"pulled\" thySize=\"sm\">\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'advanced'\" (click)=\"selectTab('advanced')\">{{\n locale().advance\n }}</a>\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'custom'\" (click)=\"selectTab('custom')\">{{\n locale().custom\n }}</a>\n </thy-nav>\n <button thyButtonIcon=\"sweep\" thySize=\"sm\" class=\"clear-date-button\" (click)=\"clearFlexibleValue()\"></button>\n </div>\n <ng-container>\n <div class=\"{{ prefixCls }}-date-panel-advanced\" [hidden]=\"flexibleActiveTab !== 'advanced'\">\n <date-carousel\n name=\"dateCarousel\"\n (ngModelChange)=\"changeValueFromAdvancedSelect($event)\"\n [(ngModel)]=\"advancedSelectedValue\"\n [activeDate]=\"selectedValue[0]\"></date-carousel>\n </div>\n </ng-container>\n <div [hidden]=\"flexibleActiveTab !== 'custom'\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n </div>\n } @else {\n @if (isRange()) {\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'left' }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'right' }\"></ng-container>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n }\n @if (!isRange()) {\n <ng-container *ngTemplateOutlet=\"tplFooter\"></ng-container>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplInnerPopup let-partType=\"partType\">\n <inner-popup\n [showWeek]=\"showWeek()\"\n [isRange]=\"isRange()\"\n [panelMode]=\"getPanelMode(panelMode(), partType)\"\n [endPanelMode]=\"getPanelMode(endPanelMode(), partType)\"\n [partType]=\"partType\"\n [showDateRangeInput]=\"flexible() && flexibleActiveTab === 'custom'\"\n (panelModeChange)=\"onPanelModeChange($event, partType)\"\n [value]=\"getValueBySelector(partType)\"\n [selectedValue]=\"selectedValue\"\n [activeDate]=\"getActiveDate(partType)\"\n [rangeActiveDate]=\"activeDate\"\n [disabledDate]=\"disabledDate()\"\n [dateRender]=\"dateRender()\"\n [hoverValue]=\"hoverValue\"\n [timeZone]=\"timeZone()\"\n (dayHover)=\"onDayHover($event)\"\n (selectDate)=\"changeValueFromSelect($event, partType)\"\n (headerChange)=\"onHeaderChange($event, partType)\"></inner-popup>\n</ng-template>\n\n<ng-template #tplFooter>\n <calendar-footer\n [showTime]=\"showTime()\"\n [mustShowTime]=\"mustShowTime()\"\n [value]=\"value()\"\n [timeZone]=\"timeZone()\"\n [disableTimeConfirm]=\"disableTimeConfirm()\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n (selectTime)=\"onSelectTime($event)\"\n (clickOk)=\"onClickOk()\"\n (clickRemove)=\"onClickRemove()\"></calendar-footer>\n</ng-template>\n\n<!-- Single ONLY -->\n\n<!-- Range ONLY -->\n<ng-template #tplRangePart let-partType=\"partType\">\n <div class=\"{{ prefixCls }}-range-part {{ prefixCls }}-range-{{ partType }}\">\n <div style=\"outline: none\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup; context: { partType: partType }\"></ng-container>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyPauseReCalculate", "thyInsideClosable", "thyPopoverOptions", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "component", type: ThyButtonIcon, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }, { kind: "component", type: DateCarousel, selector: "date-carousel", inputs: ["activeDate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InnerPopup, selector: "inner-popup", inputs: ["showWeek", "isRange", "activeDate", "rangeActiveDate", "disabledDate", "dateRender", "selectedValue", "hoverValue", "panelMode", "timeZone", "showDateRangeInput", "partType", "endPanelMode", "value"], outputs: ["activeDateChange", "valueChange", "panelModeChange", "headerChange", "selectDate", "dayHover"], exportAs: ["innerPopup"] }, { kind: "component", type: CalendarFooter, selector: "calendar-footer", inputs: ["showTime", "mustShowTime", "value", "timeZone", "disableTimeConfirm"], outputs: ["valueChange", "selectTime", "clickOk", "clickRemove", "showTimePickerChange"], exportAs: ["calendarFooter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2492
2455
  }
2493
2456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DatePopup, decorators: [{
2494
2457
  type: Component,
2495
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-popup', exportAs: 'datePopup', imports: [ThyNav, ThyNavItemDirective, ThyButtonIcon, DateCarousel, FormsModule, NgTemplateOutlet, InnerPopup, CalendarFooter], template: "<div class=\"{{ prefixCls }}-picker-container {{ className }}\">\n <div\n class=\"{{ prefixCls }} {{ showWeek ? prefixCls + '-week-number' : '' }}\n {{ isRange ? prefixCls + '-range' : '' }} {{ prefixCls }}-picker-shortcut-{{ shortcutPosition === 'left' ? 'left' : 'bottom' }}\">\n @if (showShortcut) {\n <div class=\"{{ prefixCls }}-picker-shortcut\">\n @for (item of innerShortcutPresets; track $index) {\n <div class=\"{{ prefixCls }}-picker-shortcut-item\" [class.disabled]=\"item.disabled\" (click)=\"shortcutSetValue(item)\">\n {{ item.title }}\n </div>\n }\n </div>\n }\n <div class=\"{{ prefixCls }}-panel\">\n <div class=\"{{ prefixCls }}-date-panel\">\n @if (flexible) {\n <div class=\"{{ prefixCls }}-date-panel-flexible\">\n <div class=\"{{ prefixCls }}-date-panel-flexible-tab\">\n <thy-nav thyType=\"pulled\" thySize=\"sm\">\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'advanced'\" (click)=\"selectTab('advanced')\">{{\n locale().advance\n }}</a>\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'custom'\" (click)=\"selectTab('custom')\">{{\n locale().custom\n }}</a>\n </thy-nav>\n <button thyButtonIcon=\"sweep\" thySize=\"sm\" class=\"clear-date-button\" (click)=\"clearFlexibleValue()\"></button>\n </div>\n <ng-container>\n <div class=\"{{ prefixCls }}-date-panel-advanced\" [hidden]=\"flexibleActiveTab !== 'advanced'\">\n <date-carousel\n name=\"dateCarousel\"\n (ngModelChange)=\"changeValueFromAdvancedSelect($event)\"\n [(ngModel)]=\"advancedSelectedValue\"\n [activeDate]=\"selectedValue[0]\"></date-carousel>\n </div>\n </ng-container>\n <div [hidden]=\"flexibleActiveTab !== 'custom'\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n </div>\n } @else {\n @if (isRange) {\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'left' }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'right' }\"></ng-container>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n }\n @if (!isRange) {\n <ng-container *ngTemplateOutlet=\"tplFooter\"></ng-container>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplInnerPopup let-partType=\"partType\">\n <inner-popup\n [showWeek]=\"showWeek\"\n [isRange]=\"isRange\"\n [panelMode]=\"getPanelMode(panelMode, partType)\"\n [endPanelMode]=\"getPanelMode(endPanelMode, partType)\"\n [partType]=\"partType\"\n [showDateRangeInput]=\"flexible && flexibleActiveTab === 'custom'\"\n (panelModeChange)=\"onPanelModeChange($event, partType)\"\n [value]=\"getValueBySelector(partType)\"\n [selectedValue]=\"selectedValue\"\n [activeDate]=\"getActiveDate(partType)\"\n [rangeActiveDate]=\"activeDate\"\n [disabledDate]=\"disabledDate\"\n [dateRender]=\"dateRender\"\n [hoverValue]=\"hoverValue\"\n [timeZone]=\"timeZone\"\n [enablePrev]=\"enablePrevNext('prev', partType)\"\n [enableNext]=\"enablePrevNext('next', partType)\"\n (dayHover)=\"onDayHover($event)\"\n (selectDate)=\"changeValueFromSelect($event, partType)\"\n (headerChange)=\"onHeaderChange($event, partType)\"></inner-popup>\n</ng-template>\n\n<ng-template #tplFooter>\n <calendar-footer\n [showTime]=\"showTime\"\n [mustShowTime]=\"mustShowTime\"\n [value]=\"value\"\n [timeZone]=\"timeZone\"\n [disableTimeConfirm]=\"disableTimeConfirm\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n (selectTime)=\"onSelectTime($event)\"\n (clickOk)=\"onClickOk()\"\n (clickRemove)=\"onClickRemove()\"></calendar-footer>\n</ng-template>\n\n<!-- Single ONLY -->\n\n<!-- Range ONLY -->\n<ng-template #tplRangePart let-partType=\"partType\">\n <div class=\"{{ prefixCls }}-range-part {{ prefixCls }}-range-{{ partType }}\">\n <div style=\"outline: none\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup; context: { partType: partType }\"></ng-container>\n </div>\n </div>\n</ng-template>\n" }]
2496
- }], propDecorators: { isRange: [{
2497
- type: Input
2498
- }], showWeek: [{
2499
- type: Input
2500
- }], format: [{
2501
- type: Input
2502
- }], disabledDate: [{
2503
- type: Input
2504
- }], minDate: [{
2505
- type: Input
2506
- }], maxDate: [{
2507
- type: Input
2508
- }], showToday: [{
2509
- type: Input
2510
- }], showTime: [{
2511
- type: Input
2512
- }], mustShowTime: [{
2513
- type: Input
2514
- }], dateRender: [{
2515
- type: Input
2516
- }], className: [{
2517
- type: Input
2518
- }], panelMode: [{
2519
- type: Input
2520
- }], value: [{
2521
- type: Input
2522
- }], defaultPickerValue: [{
2523
- type: Input
2524
- }], showShortcut: [{
2525
- type: Input
2526
- }], shortcutPresets: [{
2527
- type: Input
2528
- }], shortcutPosition: [{
2529
- type: Input
2530
- }], flexible: [{
2531
- type: Input
2532
- }], flexibleDateGranularity: [{
2533
- type: Input
2534
- }], timestampPrecision: [{
2535
- type: Input
2536
- }], timeZone: [{
2537
- type: Input
2538
- }], panelModeChange: [{
2539
- type: Output
2540
- }], calendarChange: [{
2541
- type: Output
2542
- }], valueChange: [{
2543
- type: Output
2544
- }], resultOk: [{
2545
- type: Output
2546
- }], showTimePickerChange: [{
2547
- type: Output
2548
- }], dateValueChange: [{
2549
- type: Output
2550
- }] } });
2458
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-popup', exportAs: 'datePopup', imports: [ThyNav, ThyNavItemDirective, ThyButtonIcon, DateCarousel, FormsModule, NgTemplateOutlet, InnerPopup, CalendarFooter], template: "<div class=\"{{ prefixCls }}-picker-container {{ className() }}\">\n <div\n class=\"{{ prefixCls }} {{ showWeek() ? prefixCls + '-week-number' : '' }}\n {{ isRange() ? prefixCls + '-range' : '' }} {{ prefixCls }}-picker-shortcut-{{ shortcutPosition() === 'left' ? 'left' : 'bottom' }}\">\n @if (showShortcut()) {\n <div class=\"{{ prefixCls }}-picker-shortcut\">\n @for (item of innerShortcutPresets; track $index) {\n <div class=\"{{ prefixCls }}-picker-shortcut-item\" [class.disabled]=\"item.disabled\" (click)=\"shortcutSetValue(item)\">\n {{ item.title }}\n </div>\n }\n </div>\n }\n <div class=\"{{ prefixCls }}-panel\">\n <div class=\"{{ prefixCls }}-date-panel\">\n @if (flexible()) {\n <div class=\"{{ prefixCls }}-date-panel-flexible\">\n <div class=\"{{ prefixCls }}-date-panel-flexible-tab\">\n <thy-nav thyType=\"pulled\" thySize=\"sm\">\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'advanced'\" (click)=\"selectTab('advanced')\">{{\n locale().advance\n }}</a>\n <a href=\"javascript:;\" thyNavLink [thyNavLinkActive]=\"flexibleActiveTab === 'custom'\" (click)=\"selectTab('custom')\">{{\n locale().custom\n }}</a>\n </thy-nav>\n <button thyButtonIcon=\"sweep\" thySize=\"sm\" class=\"clear-date-button\" (click)=\"clearFlexibleValue()\"></button>\n </div>\n <ng-container>\n <div class=\"{{ prefixCls }}-date-panel-advanced\" [hidden]=\"flexibleActiveTab !== 'advanced'\">\n <date-carousel\n name=\"dateCarousel\"\n (ngModelChange)=\"changeValueFromAdvancedSelect($event)\"\n [(ngModel)]=\"advancedSelectedValue\"\n [activeDate]=\"selectedValue[0]\"></date-carousel>\n </div>\n </ng-container>\n <div [hidden]=\"flexibleActiveTab !== 'custom'\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n </div>\n } @else {\n @if (isRange()) {\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'left' }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'right' }\"></ng-container>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n </div>\n }\n @if (!isRange()) {\n <ng-container *ngTemplateOutlet=\"tplFooter\"></ng-container>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplInnerPopup let-partType=\"partType\">\n <inner-popup\n [showWeek]=\"showWeek()\"\n [isRange]=\"isRange()\"\n [panelMode]=\"getPanelMode(panelMode(), partType)\"\n [endPanelMode]=\"getPanelMode(endPanelMode(), partType)\"\n [partType]=\"partType\"\n [showDateRangeInput]=\"flexible() && flexibleActiveTab === 'custom'\"\n (panelModeChange)=\"onPanelModeChange($event, partType)\"\n [value]=\"getValueBySelector(partType)\"\n [selectedValue]=\"selectedValue\"\n [activeDate]=\"getActiveDate(partType)\"\n [rangeActiveDate]=\"activeDate\"\n [disabledDate]=\"disabledDate()\"\n [dateRender]=\"dateRender()\"\n [hoverValue]=\"hoverValue\"\n [timeZone]=\"timeZone()\"\n (dayHover)=\"onDayHover($event)\"\n (selectDate)=\"changeValueFromSelect($event, partType)\"\n (headerChange)=\"onHeaderChange($event, partType)\"></inner-popup>\n</ng-template>\n\n<ng-template #tplFooter>\n <calendar-footer\n [showTime]=\"showTime()\"\n [mustShowTime]=\"mustShowTime()\"\n [value]=\"value()\"\n [timeZone]=\"timeZone()\"\n [disableTimeConfirm]=\"disableTimeConfirm()\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n (selectTime)=\"onSelectTime($event)\"\n (clickOk)=\"onClickOk()\"\n (clickRemove)=\"onClickRemove()\"></calendar-footer>\n</ng-template>\n\n<!-- Single ONLY -->\n\n<!-- Range ONLY -->\n<ng-template #tplRangePart let-partType=\"partType\">\n <div class=\"{{ prefixCls }}-range-part {{ prefixCls }}-range-{{ partType }}\">\n <div style=\"outline: none\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup; context: { partType: partType }\"></ng-container>\n </div>\n </div>\n</ng-template>\n" }]
2459
+ }] });
2551
2460
 
2552
2461
  class LibPackerModule {
2553
2462
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: LibPackerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -2652,81 +2561,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
2652
2561
  * @private
2653
2562
  */
2654
2563
  class ThyPicker {
2564
+ get realOpenState() {
2565
+ // The value that really decide the open state of overlay
2566
+ return this.isOpenHandledByUser() ? !!this.opened() : this.overlayOpen;
2567
+ }
2568
+ get readonlyState() {
2569
+ return this.isRange() || this.readonly() || this.mode() !== 'date';
2570
+ }
2655
2571
  constructor() {
2656
2572
  this.changeDetector = inject(ChangeDetectorRef);
2657
2573
  this.dateHelper = inject(DateHelperService);
2658
2574
  this.i18n = inject(ThyI18nService);
2659
- this.isRange = false;
2660
- this.open = undefined;
2661
- this.placement = 'bottomLeft';
2662
- this.flexible = false;
2663
- this.blur = new EventEmitter();
2664
- this.valueChange = new EventEmitter();
2665
- this.openChange = new EventEmitter(); // Emitted when overlay's open state change
2666
- this.inputChange = new EventEmitter();
2575
+ this.isRange = input(false, { transform: coerceBooleanProperty });
2576
+ this.opened = input(undefined);
2577
+ this.disabled = input(false, { transform: coerceBooleanProperty });
2578
+ this.placeholder = input();
2579
+ this.readonly = input(false, { transform: coerceBooleanProperty });
2580
+ this.allowClear = input(false, { transform: coerceBooleanProperty });
2581
+ this.autoFocus = input(false, { transform: coerceBooleanProperty });
2582
+ this.className = input();
2583
+ this.size = input();
2584
+ this.suffixIcon = input();
2585
+ this.placement = input('bottomLeft');
2586
+ this.flexible = input(false, { transform: coerceBooleanProperty });
2587
+ this.mode = input();
2588
+ this.hasBackdrop = input(false, { transform: coerceBooleanProperty });
2589
+ this.separator = input();
2590
+ this.timeZone = input();
2591
+ this.blur = output();
2592
+ this.valueChange = output();
2593
+ this.openChange = output(); // Emitted when overlay's open state change
2594
+ this.inputChange = output();
2595
+ this.origin = viewChild('origin');
2596
+ this.cdkConnectedOverlay = viewChild(CdkConnectedOverlay);
2597
+ this.pickerInput = viewChild('pickerInput');
2598
+ this.overlayContainer = viewChild('overlayContainer');
2599
+ this.format = input();
2600
+ this.flexibleDateGranularity = input();
2601
+ this.value = input();
2667
2602
  this.entering = false;
2668
2603
  this.prefixCls = 'thy-calendar';
2669
2604
  this.isShowDatePopup = false;
2670
2605
  this.overlayOpen = false; // Available when "open"=undefined
2671
- this.overlayPositions = getFlexiblePositions(this.placement, 4);
2672
- }
2673
- get format() {
2674
- return this.innerFormat;
2675
- }
2676
- set format(value) {
2677
- this.innerFormat = value;
2678
- this.updateReadableDate(this.innerValue);
2679
- }
2680
- get flexibleDateGranularity() {
2681
- return this.innerflexibleDateGranularity;
2682
- }
2683
- set flexibleDateGranularity(granularity) {
2684
- this.innerflexibleDateGranularity = granularity;
2685
- this.updateReadableDate(this.innerValue);
2686
- }
2687
- get value() {
2688
- return this.innerValue;
2689
- }
2690
- set value(value) {
2691
- this.innerValue = value;
2692
- if (!this.entering) {
2693
- this.updateReadableDate(this.innerValue);
2694
- }
2695
- }
2696
- get realOpenState() {
2697
- // The value that really decide the open state of overlay
2698
- return this.isOpenHandledByUser() ? !!this.open : this.overlayOpen;
2699
- }
2700
- get readonlyState() {
2701
- return this.isRange || this.readonly || this.mode !== 'date';
2702
- }
2703
- ngOnChanges(changes) {
2704
- // open by user
2705
- if (changes.open && changes.open.currentValue !== undefined) {
2706
- if (changes.open.currentValue) {
2707
- this.showDatePopup();
2606
+ this.overlayPositions = getFlexiblePositions(this.placement(), 4);
2607
+ effect(() => {
2608
+ this.innerValue = this.value();
2609
+ if (this.innerValue) {
2610
+ if (!this.entering) {
2611
+ this.updateReadableDate(this.innerValue);
2612
+ }
2708
2613
  }
2709
- else {
2710
- this.closeDatePopup();
2614
+ });
2615
+ effect(() => {
2616
+ this.innerFormat = this.format();
2617
+ if (this.innerFormat) {
2618
+ this.updateReadableDate(this.innerValue);
2711
2619
  }
2712
- }
2713
- if (changes.timeZone && changes.timeZone.currentValue) {
2714
- this.formatDate(this.innerValue);
2715
- }
2620
+ });
2621
+ effect(() => {
2622
+ this.innerflexibleDateGranularity = this.flexibleDateGranularity();
2623
+ if (this.innerflexibleDateGranularity) {
2624
+ this.updateReadableDate(this.innerValue);
2625
+ }
2626
+ });
2627
+ effect(() => {
2628
+ if (this.timeZone()) {
2629
+ this.formatDate(this.innerValue);
2630
+ }
2631
+ });
2632
+ effect(() => {
2633
+ const openedState = this.opened();
2634
+ if (openedState != undefined) {
2635
+ if (openedState) {
2636
+ this.showDatePopup();
2637
+ }
2638
+ else {
2639
+ this.closeDatePopup();
2640
+ }
2641
+ }
2642
+ });
2716
2643
  }
2717
2644
  ngAfterViewInit() {
2718
- this.overlayPositions = getFlexiblePositions(this.placement, 4);
2719
- if (this.autoFocus) {
2645
+ this.overlayPositions = getFlexiblePositions(this.placement(), 4);
2646
+ if (this.autoFocus()) {
2720
2647
  this.focus();
2721
2648
  }
2722
2649
  }
2723
2650
  focus() {
2724
- this.pickerInput.nativeElement.focus();
2651
+ this.pickerInput()?.nativeElement.focus();
2725
2652
  }
2726
2653
  onBlur(event) {
2727
2654
  this.blur.emit(event);
2728
2655
  if (this.entering) {
2729
- this.valueChange.emit(this.pickerInput.nativeElement.value);
2656
+ this.valueChange.emit(this.pickerInput()?.nativeElement.value);
2730
2657
  }
2731
2658
  this.entering = false;
2732
2659
  }
@@ -2739,7 +2666,7 @@ class ThyPicker {
2739
2666
  if (this.readonlyState) {
2740
2667
  return;
2741
2668
  }
2742
- this.valueChange.emit(this.pickerInput.nativeElement.value || this.getReadableValue(new TinyDate(undefined, this.timeZone)));
2669
+ this.valueChange.emit(this.pickerInput()?.nativeElement.value || this.getReadableValue(new TinyDate(undefined, this.timeZone())));
2743
2670
  this.entering = false;
2744
2671
  }
2745
2672
  showOverlay() {
@@ -2748,8 +2675,8 @@ class ThyPicker {
2748
2675
  this.showDatePopup();
2749
2676
  this.openChange.emit(this.overlayOpen);
2750
2677
  setTimeout(() => {
2751
- if (this.cdkConnectedOverlay && this.cdkConnectedOverlay.overlayRef) {
2752
- this.cdkConnectedOverlay.overlayRef.updatePosition();
2678
+ if (this.cdkConnectedOverlay() && this.cdkConnectedOverlay()?.overlayRef) {
2679
+ this.cdkConnectedOverlay()?.overlayRef.updatePosition();
2753
2680
  }
2754
2681
  });
2755
2682
  }
@@ -2774,7 +2701,7 @@ class ThyPicker {
2774
2701
  }, 200);
2775
2702
  }
2776
2703
  onClickInputBox() {
2777
- if (!this.disabled && !this.readonly && !this.isOpenHandledByUser()) {
2704
+ if (!this.disabled() && !this.readonly() && !this.isOpenHandledByUser()) {
2778
2705
  this.showOverlay();
2779
2706
  }
2780
2707
  }
@@ -2790,7 +2717,7 @@ class ThyPicker {
2790
2717
  onClickClear(event) {
2791
2718
  event.preventDefault();
2792
2719
  event.stopPropagation();
2793
- this.innerValue = this.isRange ? [] : null;
2720
+ this.innerValue = this.isRange() ? [] : null;
2794
2721
  this.valueChange.emit(this.innerValue);
2795
2722
  }
2796
2723
  getPartTypeIndex(partType) {
@@ -2800,7 +2727,7 @@ class ThyPicker {
2800
2727
  if (value === null) {
2801
2728
  return true;
2802
2729
  }
2803
- else if (this.isRange) {
2730
+ else if (this.isRange()) {
2804
2731
  return !value || !Array.isArray(value) || value.every(val => !val);
2805
2732
  }
2806
2733
  else {
@@ -2809,18 +2736,18 @@ class ThyPicker {
2809
2736
  }
2810
2737
  // Whether open state is permanently controlled by user himself
2811
2738
  isOpenHandledByUser() {
2812
- return this.open !== undefined;
2739
+ return this.opened() !== undefined;
2813
2740
  }
2814
2741
  getReadableValue(tinyDate) {
2815
2742
  let value;
2816
- if (this.isRange) {
2817
- if (this.flexible && this.innerflexibleDateGranularity !== 'day') {
2818
- return getFlexibleAdvancedReadableValue(tinyDate, this.innerflexibleDateGranularity, this.separator, this.i18n.getLocale());
2743
+ if (this.isRange()) {
2744
+ if (this.flexible() && this.innerflexibleDateGranularity !== 'day') {
2745
+ return getFlexibleAdvancedReadableValue(tinyDate, this.innerflexibleDateGranularity, this.separator(), this.i18n.getLocale());
2819
2746
  }
2820
2747
  else {
2821
2748
  const start = tinyDate[0] ? this.formatDate(tinyDate[0]) : '';
2822
2749
  const end = tinyDate[1] ? this.formatDate(tinyDate[1]) : '';
2823
- return start && end ? `${start}${this.separator}${end}` : null;
2750
+ return start && end ? `${start}${this.separator()}${end}` : null;
2824
2751
  }
2825
2752
  }
2826
2753
  else {
@@ -2839,83 +2766,24 @@ class ThyPicker {
2839
2766
  }
2840
2767
  }
2841
2768
  getPlaceholder() {
2842
- return this.isRange && this.placeholder && Array.isArray(this.placeholder)
2843
- ? this.placeholder.join(this.separator)
2844
- : this.placeholder;
2769
+ return this.isRange() && this.placeholder() && Array.isArray(this.placeholder())
2770
+ ? this.placeholder().join(this.separator())
2771
+ : this.placeholder();
2845
2772
  }
2846
2773
  updateReadableDate(setValue) {
2847
2774
  const readableValue = this.getReadableValue(setValue);
2848
- if (readableValue === this.pickerInput.nativeElement['value']) {
2775
+ if (readableValue === this.pickerInput()?.nativeElement['value']) {
2849
2776
  return;
2850
2777
  }
2851
- this.pickerInput.nativeElement.value = readableValue;
2778
+ this.pickerInput().nativeElement.value = readableValue;
2852
2779
  }
2853
2780
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyPicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2854
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyPicker, isStandalone: true, selector: "thy-picker", inputs: { isRange: "isRange", open: "open", disabled: "disabled", placeholder: "placeholder", readonly: "readonly", allowClear: "allowClear", autoFocus: "autoFocus", className: "className", size: "size", suffixIcon: "suffixIcon", placement: "placement", flexible: "flexible", mode: "mode", hasBackdrop: ["hasBackdrop", "hasBackdrop", coerceBooleanProperty], separator: "separator", timeZone: "timeZone", format: "format", flexibleDateGranularity: "flexibleDateGranularity", value: "value" }, outputs: { blur: "blur", valueChange: "valueChange", openChange: "openChange", inputChange: "inputChange" }, viewQueries: [{ propertyName: "origin", first: true, predicate: ["origin"], descendants: true, static: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "pickerInput", first: true, predicate: ["pickerInput"], descendants: true, static: true }, { propertyName: "overlayContainer", first: true, predicate: ["overlayContainer"], descendants: true }], exportAs: ["thyPicker"], usesOnChanges: true, ngImport: i0, template: "<span\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"{{ prefixCls }}-picker {{ size ? prefixCls + '-picker-' + size : '' }} {{ className }}\"\n (click)=\"onClickInputBox()\">\n <ng-container>\n <input\n #pickerInput\n thyInput\n class=\"form-control-{{ size }} form-control {{ prefixCls }}-picker-input\"\n [ngClass]=\"{ 'panel-is-opened': realOpenState }\"\n [thySize]=\"size\"\n [tabindex]=\"-1\"\n [class.thy-input-disabled]=\"disabled\"\n [class.thy-input-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonlyState\"\n (blur)=\"onBlur($event)\"\n (input)=\"onInput($event)\"\n placeholder=\"{{ getPlaceholder() }}\"\n thyEnter\n (thyEnter)=\"onEnter()\" />\n <ng-container *ngTemplateOutlet=\"tplRightRest\"></ng-container>\n </ng-container>\n</span>\n\n<!-- Right operator icons -->\n<ng-template #tplRightRest>\n <span class=\"{{ prefixCls }}-picker-clear\">\n @if (!disabled && !isEmptyValue(value) && allowClear && !readonly) {\n <thy-icon\n thyIconName=\"close-circle-bold-fill\"\n (click)=\"onClickClear($event)\"\n ngClass=\"remove-link remove-link-{{ size }}\"></thy-icon>\n }\n </span>\n <span class=\"{{ prefixCls }}-picker-icon\">\n <thy-icon [thyIconName]=\"suffixIcon\" ngClass=\"remove-link-{{ size ? size : 'default' }}\"></thy-icon>\n </span>\n</ng-template>\n\n<!-- Overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"realOpenState\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n cdkConnectedOverlayTransformOriginOn=\".thy-picker-container\"\n (positionChange)=\"onPositionChange($event)\"\n (backdropClick)=\"onClickBackdrop()\"\n (detach)=\"onOverlayDetach()\">\n <div\n #overlayContainer\n style=\"position: relative\"\n class=\"thy-picker-container\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'left' && placement !== 'right' && placement !== 'top' && placement !== 'bottom' ? 'enter' : 'void'\">\n <!-- Compatible for overlay that not support offset dynamically and immediately -->\n <ng-content></ng-content>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], animations: [scaleXMotion, scaleYMotion, scaleMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2781
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyPicker, isStandalone: true, selector: "thy-picker", inputs: { isRange: { classPropertyName: "isRange", publicName: "isRange", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, flexible: { classPropertyName: "flexible", publicName: "flexible", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, flexibleDateGranularity: { classPropertyName: "flexibleDateGranularity", publicName: "flexibleDateGranularity", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { blur: "blur", valueChange: "valueChange", openChange: "openChange", inputChange: "inputChange" }, viewQueries: [{ propertyName: "origin", first: true, predicate: ["origin"], descendants: true, isSignal: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "pickerInput", first: true, predicate: ["pickerInput"], descendants: true, isSignal: true }, { propertyName: "overlayContainer", first: true, predicate: ["overlayContainer"], descendants: true, isSignal: true }], exportAs: ["thyPicker"], ngImport: i0, template: "<span\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"{{ prefixCls }}-picker {{ size() ? prefixCls + '-picker-' + size() : '' }} {{ className() }}\"\n (click)=\"onClickInputBox()\">\n <ng-container>\n <input\n #pickerInput\n thyInput\n class=\"form-control-{{ size() }} form-control {{ prefixCls }}-picker-input\"\n [ngClass]=\"{ 'panel-is-opened': realOpenState }\"\n [thySize]=\"size()\"\n [tabindex]=\"-1\"\n [class.thy-input-disabled]=\"disabled()\"\n [class.thy-input-readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonlyState\"\n (blur)=\"onBlur($event)\"\n (input)=\"onInput($event)\"\n placeholder=\"{{ getPlaceholder() }}\"\n thyEnter\n (thyEnter)=\"onEnter()\" />\n <ng-container *ngTemplateOutlet=\"tplRightRest\"></ng-container>\n </ng-container>\n</span>\n\n<!-- Right operator icons -->\n<ng-template #tplRightRest>\n <span class=\"{{ prefixCls }}-picker-clear\">\n @if (!disabled() && !isEmptyValue(value()) && allowClear() && !readonly()) {\n <thy-icon\n thyIconName=\"close-circle-bold-fill\"\n (click)=\"onClickClear($event)\"\n ngClass=\"remove-link remove-link-{{ size() }}\"></thy-icon>\n }\n </span>\n <span class=\"{{ prefixCls }}-picker-icon\">\n <thy-icon [thyIconName]=\"suffixIcon()\" ngClass=\"remove-link-{{ size() ? size() : 'default' }}\"></thy-icon>\n </span>\n</ng-template>\n\n<!-- Overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"realOpenState\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n cdkConnectedOverlayTransformOriginOn=\".thy-picker-container\"\n (positionChange)=\"onPositionChange($event)\"\n (backdropClick)=\"onClickBackdrop()\"\n (detach)=\"onOverlayDetach()\">\n <div\n #overlayContainer\n style=\"position: relative\"\n class=\"thy-picker-container\"\n [@scaleXMotion]=\"placement() === 'left' || placement() === 'right' ? 'enter' : 'void'\"\n [@scaleYMotion]=\"placement() === 'top' || placement() === 'bottom' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n placement() !== 'left' && placement() !== 'right' && placement() !== 'top' && placement() !== 'bottom' ? 'enter' : 'void'\n \">\n <!-- Compatible for overlay that not support offset dynamically and immediately -->\n <ng-content></ng-content>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], animations: [scaleXMotion, scaleYMotion, scaleMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2855
2782
  }
2856
2783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyPicker, decorators: [{
2857
2784
  type: Component,
2858
- args: [{ selector: 'thy-picker', exportAs: 'thyPicker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkOverlayOrigin, ThyInputDirective, ThyEnterDirective, NgTemplateOutlet, ThyIcon, NgClass, CdkConnectedOverlay], animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<span\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"{{ prefixCls }}-picker {{ size ? prefixCls + '-picker-' + size : '' }} {{ className }}\"\n (click)=\"onClickInputBox()\">\n <ng-container>\n <input\n #pickerInput\n thyInput\n class=\"form-control-{{ size }} form-control {{ prefixCls }}-picker-input\"\n [ngClass]=\"{ 'panel-is-opened': realOpenState }\"\n [thySize]=\"size\"\n [tabindex]=\"-1\"\n [class.thy-input-disabled]=\"disabled\"\n [class.thy-input-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonlyState\"\n (blur)=\"onBlur($event)\"\n (input)=\"onInput($event)\"\n placeholder=\"{{ getPlaceholder() }}\"\n thyEnter\n (thyEnter)=\"onEnter()\" />\n <ng-container *ngTemplateOutlet=\"tplRightRest\"></ng-container>\n </ng-container>\n</span>\n\n<!-- Right operator icons -->\n<ng-template #tplRightRest>\n <span class=\"{{ prefixCls }}-picker-clear\">\n @if (!disabled && !isEmptyValue(value) && allowClear && !readonly) {\n <thy-icon\n thyIconName=\"close-circle-bold-fill\"\n (click)=\"onClickClear($event)\"\n ngClass=\"remove-link remove-link-{{ size }}\"></thy-icon>\n }\n </span>\n <span class=\"{{ prefixCls }}-picker-icon\">\n <thy-icon [thyIconName]=\"suffixIcon\" ngClass=\"remove-link-{{ size ? size : 'default' }}\"></thy-icon>\n </span>\n</ng-template>\n\n<!-- Overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"realOpenState\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n cdkConnectedOverlayTransformOriginOn=\".thy-picker-container\"\n (positionChange)=\"onPositionChange($event)\"\n (backdropClick)=\"onClickBackdrop()\"\n (detach)=\"onOverlayDetach()\">\n <div\n #overlayContainer\n style=\"position: relative\"\n class=\"thy-picker-container\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'left' && placement !== 'right' && placement !== 'top' && placement !== 'bottom' ? 'enter' : 'void'\">\n <!-- Compatible for overlay that not support offset dynamically and immediately -->\n <ng-content></ng-content>\n </div>\n</ng-template>\n" }]
2859
- }], propDecorators: { isRange: [{
2860
- type: Input
2861
- }], open: [{
2862
- type: Input
2863
- }], disabled: [{
2864
- type: Input
2865
- }], placeholder: [{
2866
- type: Input
2867
- }], readonly: [{
2868
- type: Input
2869
- }], allowClear: [{
2870
- type: Input
2871
- }], autoFocus: [{
2872
- type: Input
2873
- }], className: [{
2874
- type: Input
2875
- }], size: [{
2876
- type: Input
2877
- }], suffixIcon: [{
2878
- type: Input
2879
- }], placement: [{
2880
- type: Input
2881
- }], flexible: [{
2882
- type: Input
2883
- }], mode: [{
2884
- type: Input
2885
- }], hasBackdrop: [{
2886
- type: Input,
2887
- args: [{ transform: coerceBooleanProperty }]
2888
- }], separator: [{
2889
- type: Input
2890
- }], timeZone: [{
2891
- type: Input
2892
- }], blur: [{
2893
- type: Output
2894
- }], valueChange: [{
2895
- type: Output
2896
- }], openChange: [{
2897
- type: Output
2898
- }], inputChange: [{
2899
- type: Output
2900
- }], origin: [{
2901
- type: ViewChild,
2902
- args: ['origin', { static: true }]
2903
- }], cdkConnectedOverlay: [{
2904
- type: ViewChild,
2905
- args: [CdkConnectedOverlay, { static: true }]
2906
- }], pickerInput: [{
2907
- type: ViewChild,
2908
- args: ['pickerInput', { static: true }]
2909
- }], overlayContainer: [{
2910
- type: ViewChild,
2911
- args: ['overlayContainer', { static: false }]
2912
- }], format: [{
2913
- type: Input
2914
- }], flexibleDateGranularity: [{
2915
- type: Input
2916
- }], value: [{
2917
- type: Input
2918
- }] } });
2785
+ args: [{ selector: 'thy-picker', exportAs: 'thyPicker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkOverlayOrigin, ThyInputDirective, ThyEnterDirective, NgTemplateOutlet, ThyIcon, NgClass, CdkConnectedOverlay], animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<span\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"{{ prefixCls }}-picker {{ size() ? prefixCls + '-picker-' + size() : '' }} {{ className() }}\"\n (click)=\"onClickInputBox()\">\n <ng-container>\n <input\n #pickerInput\n thyInput\n class=\"form-control-{{ size() }} form-control {{ prefixCls }}-picker-input\"\n [ngClass]=\"{ 'panel-is-opened': realOpenState }\"\n [thySize]=\"size()\"\n [tabindex]=\"-1\"\n [class.thy-input-disabled]=\"disabled()\"\n [class.thy-input-readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonlyState\"\n (blur)=\"onBlur($event)\"\n (input)=\"onInput($event)\"\n placeholder=\"{{ getPlaceholder() }}\"\n thyEnter\n (thyEnter)=\"onEnter()\" />\n <ng-container *ngTemplateOutlet=\"tplRightRest\"></ng-container>\n </ng-container>\n</span>\n\n<!-- Right operator icons -->\n<ng-template #tplRightRest>\n <span class=\"{{ prefixCls }}-picker-clear\">\n @if (!disabled() && !isEmptyValue(value()) && allowClear() && !readonly()) {\n <thy-icon\n thyIconName=\"close-circle-bold-fill\"\n (click)=\"onClickClear($event)\"\n ngClass=\"remove-link remove-link-{{ size() }}\"></thy-icon>\n }\n </span>\n <span class=\"{{ prefixCls }}-picker-icon\">\n <thy-icon [thyIconName]=\"suffixIcon()\" ngClass=\"remove-link-{{ size() ? size() : 'default' }}\"></thy-icon>\n </span>\n</ng-template>\n\n<!-- Overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"realOpenState\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n cdkConnectedOverlayTransformOriginOn=\".thy-picker-container\"\n (positionChange)=\"onPositionChange($event)\"\n (backdropClick)=\"onClickBackdrop()\"\n (detach)=\"onOverlayDetach()\">\n <div\n #overlayContainer\n style=\"position: relative\"\n class=\"thy-picker-container\"\n [@scaleXMotion]=\"placement() === 'left' || placement() === 'right' ? 'enter' : 'void'\"\n [@scaleYMotion]=\"placement() === 'top' || placement() === 'bottom' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n placement() !== 'left' && placement() !== 'right' && placement() !== 'top' && placement() !== 'bottom' ? 'enter' : 'void'\n \">\n <!-- Compatible for overlay that not support offset dynamically and immediately -->\n <ng-content></ng-content>\n </div>\n</ng-template>\n" }]
2786
+ }], ctorParameters: () => [] });
2919
2787
 
2920
2788
  /**
2921
2789
  * @private
@@ -2931,22 +2799,6 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
2931
2799
  get thyMode() {
2932
2800
  return this._panelMode;
2933
2801
  }
2934
- /**
2935
- * 快捷选项面板的显示位置
2936
- * @type left | bottom
2937
- */
2938
- set thyShortcutPosition(position) {
2939
- if (!!position) {
2940
- this.shortcutPosition = position;
2941
- }
2942
- }
2943
- /**
2944
- * 自定义快捷选项
2945
- * @type ThyShortcutPreset[]
2946
- */
2947
- set thyShortcutPresets(presets) {
2948
- this.shortcutPresets = presets;
2949
- }
2950
2802
  /**
2951
2803
  * 是否禁用
2952
2804
  * @default false
@@ -2958,16 +2810,17 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
2958
2810
  return this.disabled;
2959
2811
  }
2960
2812
  get realOpenState() {
2961
- return this.picker.realOpenState;
2813
+ return this.picker().realOpenState;
2962
2814
  }
2963
2815
  get isShowDatePopup() {
2964
- return this.picker.isShowDatePopup;
2816
+ return this.picker().isShowDatePopup;
2965
2817
  }
2966
2818
  initValue() {
2967
2819
  this.thyValue = this.isRange ? [] : null;
2968
2820
  }
2969
2821
  constructor() {
2970
2822
  super();
2823
+ this.destroyRef = inject(DestroyRef);
2971
2824
  this.cdr = inject(ChangeDetectorRef);
2972
2825
  this.locale = injectLocale('datePicker');
2973
2826
  this._panelMode = 'date';
@@ -2975,81 +2828,142 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
2975
2828
  /**
2976
2829
  * 是否显示清除按钮
2977
2830
  */
2978
- this.thyAllowClear = true;
2831
+ this.thyAllowClear = input(true, { transform: coerceBooleanProperty });
2979
2832
  /**
2980
2833
  * 是否自动获取焦点
2981
- * @default false
2982
2834
  */
2983
- this.thyAutoFocus = false;
2835
+ this.thyAutoFocus = input(false, { transform: coerceBooleanProperty });
2836
+ this.thyOpen = input(undefined, { transform: coerceBooleanProperty });
2837
+ this.opened = linkedSignal(this.thyOpen);
2838
+ this.thyDisabledDate = input();
2839
+ /**
2840
+ * 最小值
2841
+ */
2842
+ this.thyMinDate = input();
2843
+ /**
2844
+ * 最大值
2845
+ */
2846
+ this.thyMaxDate = input();
2847
+ /**
2848
+ * 输入框提示文字
2849
+ * @type string | string[]
2850
+ */
2851
+ this.thyPlaceHolder = input(undefined);
2852
+ this.placeholder = signal(undefined);
2853
+ /**
2854
+ * 是否只读
2855
+ */
2856
+ this.thyReadonly = input(false, { transform: coerceBooleanProperty });
2857
+ /**
2858
+ * 选择器 className
2859
+ */
2860
+ this.thyOriginClassName = input();
2861
+ /**
2862
+ * 弹出层 className
2863
+ */
2864
+ this.thyPanelClassName = input();
2984
2865
  /**
2985
2866
  * 输入框的大小
2986
- * @type xs | sm | md | lg | default
2987
2867
  */
2988
- this.thySize = 'default';
2868
+ this.thySize = input('default');
2989
2869
  /**
2990
2870
  * 设置时间戳精度
2991
2871
  * @default seconds 10位
2992
2872
  */
2993
- this.thyTimestampPrecision = this.datePickerConfigService.config?.timestampPrecision || 'seconds';
2873
+ this.thyTimestampPrecision = input(this.datePickerConfigService.config?.timestampPrecision || 'seconds');
2874
+ /**
2875
+ * 展示的日期格式
2876
+ * @default yyyy-MM-dd
2877
+ */
2878
+ this.thyFormat = model();
2994
2879
  /**
2995
2880
  * 区间分隔符,不传值默认为 "~"
2996
2881
  */
2997
- this.thySeparator = this.datePickerConfigService.config?.separator;
2882
+ this.thySeparator = input(this.datePickerConfigService.config?.separator);
2998
2883
  this.separator = computed(() => {
2999
- return ` ${this.thySeparator?.trim()} `;
2884
+ return ` ${this.thySeparator()?.trim()} `;
3000
2885
  });
3001
2886
  /**
3002
2887
  * @description.en-us only for range picker, Whether to automatically take the beginning and ending unixTime of the day
3003
2888
  * @description.zh-cn 是否取值开始日期的00:00以及截止日期的24:00
3004
2889
  * @default false
3005
2890
  */
3006
- this.thyAutoStartAndEnd = false;
2891
+ this.thyAutoStartAndEnd = input(false, { transform: coerceBooleanProperty });
3007
2892
  /**
3008
2893
  * 面板默认日期
3009
- * @type CompatibleDate | number | null
3010
2894
  */
3011
- this.thyDefaultPickerValue = null;
2895
+ this.thyDefaultPickerValue = input(null);
3012
2896
  /**
3013
2897
  * 自定义的后缀图标
3014
2898
  */
3015
- this.thySuffixIcon = 'calendar';
2899
+ this.thySuffixIcon = input('calendar');
2900
+ /**
2901
+ * 是否展示快捷选项面板
2902
+ * @default false
2903
+ */
2904
+ this.thyShowShortcut = input(undefined, { transform: coerceBooleanProperty });
2905
+ /**
2906
+ * 快捷选项面板的显示位置
2907
+ * @type left | bottom
2908
+ */
2909
+ this.thyShortcutPosition = input('left', { transform: (value) => value || 'left' });
2910
+ /**
2911
+ * 自定义快捷选项
2912
+ * @type ThyShortcutPreset[]
2913
+ */
2914
+ this.thyShortcutPresets = input();
2915
+ /**
2916
+ * 是否支持选择时间
2917
+ */
2918
+ this.thyShowTime = input(false, {
2919
+ transform: (value) => (typeof value === 'object' ? value : coerceBooleanProperty(value))
2920
+ });
2921
+ /**
2922
+ * 是否展示时间(时、分)
2923
+ */
2924
+ this.thyMustShowTime = input(false, { transform: coerceBooleanProperty });
2925
+ this.showWeek = computed(() => this.thyMode === 'week');
2926
+ this.flexible = computed(() => this.thyMode === 'flexible');
3016
2927
  /**
3017
2928
  * 日期变化的回调
3018
2929
  */
3019
- this.thyDateChange = new EventEmitter();
3020
- this.thyOpenChange = new EventEmitter();
2930
+ this.thyDateChange = output();
2931
+ this.thyOpenChange = output();
2932
+ this.picker = viewChild(ThyPicker);
2933
+ /**
2934
+ * 时区,不传使用默认时区
2935
+ */
2936
+ this.thyTimeZone = input();
3021
2937
  this.disabled = false;
3022
- this.shortcutPosition = 'left';
3023
- this.destroyed$ = new Subject();
3024
2938
  this.isCustomPlaceHolder = false;
3025
2939
  this.onlyEmitDate = false;
3026
2940
  this.onChangeFn = () => void 0;
2941
+ effect(() => {
2942
+ if (this.isCustomPlaceHolder) {
2943
+ this.placeholder.set(this.thyPlaceHolder());
2944
+ }
2945
+ });
2946
+ effect(() => {
2947
+ if (this.thyTimeZone()) {
2948
+ this.setValue(this.innerValue);
2949
+ }
2950
+ });
3027
2951
  }
3028
2952
  ngOnInit() {
3029
2953
  this.setDefaultPlaceHolder();
2954
+ this.setDefaultTimePickerState();
3030
2955
  this.initValue();
3031
- this.isFlexible();
3032
- }
3033
- isFlexible() {
3034
- this.flexible = this.thyMode === 'flexible';
3035
2956
  }
3036
2957
  onDateValueChange(event) {
3037
2958
  this.thyDateChange.emit(event);
3038
2959
  }
3039
2960
  ngOnChanges(changes) {
3040
- if (changes.thyPlaceHolder && changes.thyPlaceHolder.firstChange && typeof this.thyPlaceHolder !== 'undefined') {
2961
+ if (changes.thyPlaceHolder && changes.thyPlaceHolder.firstChange && typeof changes.thyPlaceHolder.currentValue !== 'undefined') {
3041
2962
  this.isCustomPlaceHolder = true;
3042
2963
  }
3043
- if (changes.thyTimeZone && changes.thyTimeZone.currentValue) {
3044
- this.setValue(this.innerValue);
3045
- }
3046
- }
3047
- ngOnDestroy() {
3048
- this.destroyed$.next();
3049
- this.destroyed$.complete();
3050
2964
  }
3051
2965
  closeOverlay() {
3052
- this.picker.hideOverlay();
2966
+ this.picker().hideOverlay();
3053
2967
  }
3054
2968
  getAutoStartAndEndValue(begin, end) {
3055
2969
  let value;
@@ -3082,7 +2996,7 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
3082
2996
  let value = { begin: null, end: null };
3083
2997
  if (vAsRange.length) {
3084
2998
  const [begin, end] = vAsRange;
3085
- if (this.thyAutoStartAndEnd) {
2999
+ if (this.thyAutoStartAndEnd()) {
3086
3000
  value = this.getAutoStartAndEndValue(begin, end);
3087
3001
  }
3088
3002
  else {
@@ -3090,7 +3004,7 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
3090
3004
  }
3091
3005
  }
3092
3006
  const [beginUnixTime, endUnixTime] = this.setValueByPrecision(value);
3093
- this.onChangeFn(Object.assign({ begin: beginUnixTime, end: endUnixTime }, this.flexible ? { granularity: flexibleDateGranularity } : {}));
3007
+ this.onChangeFn(Object.assign({ begin: beginUnixTime, end: endUnixTime }, this.flexible() ? { granularity: flexibleDateGranularity } : {}));
3094
3008
  }
3095
3009
  else {
3096
3010
  const value = { date: null, with_time: this.withTime ? 1 : 0 };
@@ -3106,26 +3020,26 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
3106
3020
  }
3107
3021
  }
3108
3022
  setFormatRule() {
3109
- if (!this.thyFormat) {
3023
+ if (!this.thyFormat()) {
3110
3024
  if (this.withTime) {
3111
- this.thyFormat = 'yyyy-MM-dd HH:mm';
3025
+ this.thyFormat.set('yyyy-MM-dd HH:mm');
3112
3026
  }
3113
3027
  else {
3114
3028
  if (!this.onlyEmitDate) {
3115
- this.thyFormat = 'yyyy-MM-dd';
3029
+ this.thyFormat.set('yyyy-MM-dd');
3116
3030
  }
3117
3031
  }
3118
3032
  }
3119
3033
  }
3120
3034
  onOpenChange(open) {
3121
- this.thyOpen = open;
3035
+ this.opened.set(open);
3122
3036
  this.thyOpenChange.emit(open);
3123
3037
  }
3124
3038
  writeValue(originalValue) {
3125
3039
  const { value, withTime, flexibleDateGranularity } = transformDateValue(originalValue);
3126
3040
  this.flexibleDateGranularity = flexibleDateGranularity;
3127
3041
  this.innerValue = value;
3128
- if (this.flexible && value && value.length) {
3042
+ if (this.flexible() && value && value.length) {
3129
3043
  if (!this.flexibleDateGranularity) {
3130
3044
  this.flexibleDateGranularity = 'day';
3131
3045
  }
@@ -3140,87 +3054,51 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
3140
3054
  setTimePickerState(withTime) {
3141
3055
  this.withTime = withTime;
3142
3056
  }
3057
+ // Displays the time directly when the time must be displayed by default
3058
+ setDefaultTimePickerState() {
3059
+ this.withTime = this.thyMustShowTime();
3060
+ }
3061
+ // Restore after clearing time to select whether the original picker time is displayed or not
3062
+ restoreTimePickerState(value) {
3063
+ if (!value) {
3064
+ this.withTime = this.thyMustShowTime() || this.originWithTime;
3065
+ }
3066
+ }
3067
+ setPanelMode() {
3068
+ const mode = this.thyMode ?? 'date';
3069
+ if (this.isRange) {
3070
+ this.panelMode = this.flexible() ? ['date', 'date'] : [mode, mode];
3071
+ }
3072
+ else {
3073
+ this.panelMode = mode;
3074
+ }
3075
+ }
3143
3076
  setDisabledState(disabled) {
3144
3077
  this.thyDisabled = disabled;
3145
3078
  this.cdr.markForCheck();
3146
3079
  }
3147
3080
  setDefaultPlaceHolder() {
3148
3081
  if (!this.isCustomPlaceHolder) {
3149
- this.thyPlaceHolder = this.isRange ? [this.locale().startDate, this.locale().endDate] : this.locale().placeholder;
3082
+ const placeholder = this.isRange ? [this.locale().startDate, this.locale().endDate] : this.locale().placeholder;
3083
+ this.placeholder.set(placeholder);
3150
3084
  }
3151
- this.cdr.markForCheck();
3152
3085
  }
3153
3086
  setValue(value) {
3154
- this.thyValue = makeValue(value, this.isRange, this.thyTimeZone);
3087
+ this.thyValue = makeValue(value, this.isRange, this.thyTimeZone());
3155
3088
  }
3156
3089
  setValueByPrecision(value) {
3157
- return setValueByTimestampPrecision(value, this.isRange, this.thyTimestampPrecision, this.thyTimeZone);
3090
+ return setValueByTimestampPrecision(value, this.isRange, this.thyTimestampPrecision(), this.thyTimeZone());
3158
3091
  }
3159
3092
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AbstractPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3160
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.8", type: AbstractPickerComponent, isStandalone: true, inputs: { thyMode: "thyMode", thyAllowClear: ["thyAllowClear", "thyAllowClear", coerceBooleanProperty], thyAutoFocus: ["thyAutoFocus", "thyAutoFocus", coerceBooleanProperty], thyOpen: ["thyOpen", "thyOpen", coerceBooleanProperty], thyDisabledDate: "thyDisabledDate", thyMinDate: "thyMinDate", thyMaxDate: "thyMaxDate", thyPlaceHolder: "thyPlaceHolder", thyReadonly: ["thyReadonly", "thyReadonly", coerceBooleanProperty], thyOriginClassName: "thyOriginClassName", thyPanelClassName: "thyPanelClassName", thySize: "thySize", thyTimestampPrecision: "thyTimestampPrecision", thyFormat: "thyFormat", thySeparator: "thySeparator", thyAutoStartAndEnd: ["thyAutoStartAndEnd", "thyAutoStartAndEnd", coerceBooleanProperty], thyDefaultPickerValue: "thyDefaultPickerValue", thySuffixIcon: "thySuffixIcon", thyShowShortcut: ["thyShowShortcut", "thyShowShortcut", coerceBooleanProperty], thyShortcutPosition: "thyShortcutPosition", thyShortcutPresets: "thyShortcutPresets", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thyTimeZone: "thyTimeZone" }, outputs: { thyDateChange: "thyDateChange", thyOpenChange: "thyOpenChange" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ThyPicker, descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
3093
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.8", type: AbstractPickerComponent, isStandalone: true, inputs: { thyMode: { classPropertyName: "thyMode", publicName: "thyMode", isSignal: false, isRequired: false, transformFunction: null }, thyAllowClear: { classPropertyName: "thyAllowClear", publicName: "thyAllowClear", isSignal: true, isRequired: false, transformFunction: null }, thyAutoFocus: { classPropertyName: "thyAutoFocus", publicName: "thyAutoFocus", isSignal: true, isRequired: false, transformFunction: null }, thyOpen: { classPropertyName: "thyOpen", publicName: "thyOpen", isSignal: true, isRequired: false, transformFunction: null }, thyDisabledDate: { classPropertyName: "thyDisabledDate", publicName: "thyDisabledDate", isSignal: true, isRequired: false, transformFunction: null }, thyMinDate: { classPropertyName: "thyMinDate", publicName: "thyMinDate", isSignal: true, isRequired: false, transformFunction: null }, thyMaxDate: { classPropertyName: "thyMaxDate", publicName: "thyMaxDate", isSignal: true, isRequired: false, transformFunction: null }, thyPlaceHolder: { classPropertyName: "thyPlaceHolder", publicName: "thyPlaceHolder", isSignal: true, isRequired: false, transformFunction: null }, thyReadonly: { classPropertyName: "thyReadonly", publicName: "thyReadonly", isSignal: true, isRequired: false, transformFunction: null }, thyOriginClassName: { classPropertyName: "thyOriginClassName", publicName: "thyOriginClassName", isSignal: true, isRequired: false, transformFunction: null }, thyPanelClassName: { classPropertyName: "thyPanelClassName", publicName: "thyPanelClassName", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyTimestampPrecision: { classPropertyName: "thyTimestampPrecision", publicName: "thyTimestampPrecision", isSignal: true, isRequired: false, transformFunction: null }, thyFormat: { classPropertyName: "thyFormat", publicName: "thyFormat", isSignal: true, isRequired: false, transformFunction: null }, thySeparator: { classPropertyName: "thySeparator", publicName: "thySeparator", isSignal: true, isRequired: false, transformFunction: null }, thyAutoStartAndEnd: { classPropertyName: "thyAutoStartAndEnd", publicName: "thyAutoStartAndEnd", isSignal: true, isRequired: false, transformFunction: null }, thyDefaultPickerValue: { classPropertyName: "thyDefaultPickerValue", publicName: "thyDefaultPickerValue", isSignal: true, isRequired: false, transformFunction: null }, thySuffixIcon: { classPropertyName: "thySuffixIcon", publicName: "thySuffixIcon", isSignal: true, isRequired: false, transformFunction: null }, thyShowShortcut: { classPropertyName: "thyShowShortcut", publicName: "thyShowShortcut", isSignal: true, isRequired: false, transformFunction: null }, thyShortcutPosition: { classPropertyName: "thyShortcutPosition", publicName: "thyShortcutPosition", isSignal: true, isRequired: false, transformFunction: null }, thyShortcutPresets: { classPropertyName: "thyShortcutPresets", publicName: "thyShortcutPresets", isSignal: true, isRequired: false, transformFunction: null }, thyShowTime: { classPropertyName: "thyShowTime", publicName: "thyShowTime", isSignal: true, isRequired: false, transformFunction: null }, thyMustShowTime: { classPropertyName: "thyMustShowTime", publicName: "thyMustShowTime", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyTimeZone: { classPropertyName: "thyTimeZone", publicName: "thyTimeZone", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyFormat: "thyFormatChange", thyDateChange: "thyDateChange", thyOpenChange: "thyOpenChange" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ThyPicker, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
3161
3094
  }
3162
3095
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AbstractPickerComponent, decorators: [{
3163
3096
  type: Directive
3164
3097
  }], ctorParameters: () => [], propDecorators: { thyMode: [{
3165
3098
  type: Input
3166
- }], thyAllowClear: [{
3167
- type: Input,
3168
- args: [{ transform: coerceBooleanProperty }]
3169
- }], thyAutoFocus: [{
3170
- type: Input,
3171
- args: [{ transform: coerceBooleanProperty }]
3172
- }], thyOpen: [{
3173
- type: Input,
3174
- args: [{ transform: coerceBooleanProperty }]
3175
- }], thyDisabledDate: [{
3176
- type: Input
3177
- }], thyMinDate: [{
3178
- type: Input
3179
- }], thyMaxDate: [{
3180
- type: Input
3181
- }], thyPlaceHolder: [{
3182
- type: Input
3183
- }], thyReadonly: [{
3184
- type: Input,
3185
- args: [{ transform: coerceBooleanProperty }]
3186
- }], thyOriginClassName: [{
3187
- type: Input
3188
- }], thyPanelClassName: [{
3189
- type: Input
3190
- }], thySize: [{
3191
- type: Input
3192
- }], thyTimestampPrecision: [{
3193
- type: Input
3194
- }], thyFormat: [{
3195
- type: Input
3196
- }], thySeparator: [{
3197
- type: Input
3198
- }], thyAutoStartAndEnd: [{
3199
- type: Input,
3200
- args: [{ transform: coerceBooleanProperty }]
3201
- }], thyDefaultPickerValue: [{
3202
- type: Input
3203
- }], thySuffixIcon: [{
3204
- type: Input
3205
- }], thyShowShortcut: [{
3206
- type: Input,
3207
- args: [{ transform: coerceBooleanProperty }]
3208
- }], thyShortcutPosition: [{
3209
- type: Input
3210
- }], thyShortcutPresets: [{
3211
- type: Input
3212
- }], thyDateChange: [{
3213
- type: Output
3214
- }], thyOpenChange: [{
3215
- type: Output
3216
- }], picker: [{
3217
- type: ViewChild,
3218
- args: [ThyPicker, { static: true }]
3219
3099
  }], thyDisabled: [{
3220
3100
  type: Input,
3221
3101
  args: [{ transform: coerceBooleanProperty }]
3222
- }], thyTimeZone: [{
3223
- type: Input
3224
3102
  }] } });
3225
3103
 
3226
3104
  /**
@@ -3230,35 +3108,20 @@ class BasePicker extends AbstractPickerComponent {
3230
3108
  constructor() {
3231
3109
  super(...arguments);
3232
3110
  this.element = inject(ElementRef);
3233
- this.showWeek = false;
3111
+ this.thyPicker = viewChild('thyPicker');
3112
+ this.thyDateRender = input();
3234
3113
  /**
3235
3114
  * 是否有幕布
3236
- * @default true
3237
- */
3238
- this.thyHasBackdrop = true;
3239
- /**
3240
- * @type EventEmitter<ThyPanelMode | ThyPanelMode[]>
3241
- */
3242
- this.thyOnPanelChange = new EventEmitter();
3243
- /**
3244
- * @type EventEmitter<Date[]>
3245
3115
  */
3246
- this.thyOnCalendarChange = new EventEmitter();
3247
- /**
3248
- * 是否展示时间(时、分)
3249
- * @default false
3250
- */
3251
- this.thyMustShowTime = false;
3116
+ this.thyHasBackdrop = input(true, { transform: coerceBooleanProperty$1 });
3252
3117
  /**
3253
3118
  * 弹出位置
3254
3119
  * @type top | topLeft | topRight | bottom | bottomLeft | bottomRight | left | leftTop | leftBottom | right | rightTop | rightBottom
3255
3120
  */
3256
- this.thyPlacement = 'bottomLeft';
3257
- /**
3258
- * @type EventEmitter<CompatibleDate | null>
3259
- */
3260
- this.thyOnOk = new EventEmitter();
3261
- this.takeUntilDestroyed = takeUntilDestroyed();
3121
+ this.thyPlacement = input('bottomLeft');
3122
+ this.thyOnPanelChange = output();
3123
+ this.thyOnCalendarChange = output();
3124
+ this.thyOnOk = output();
3262
3125
  this.thyClickDispatcher = inject(ThyClickDispatcher);
3263
3126
  this.platformId = inject(PLATFORM_ID);
3264
3127
  this.ngZone = inject(NgZone);
@@ -3266,33 +3129,30 @@ class BasePicker extends AbstractPickerComponent {
3266
3129
  set thyMode(value) {
3267
3130
  this._panelMode = value ?? 'date';
3268
3131
  if (this.initialized) {
3269
- this.setDefaultTimePickerState(this._panelMode);
3132
+ this.setPanelMode();
3133
+ this.setFormat();
3270
3134
  }
3271
3135
  }
3272
3136
  get thyMode() {
3273
3137
  return this._panelMode;
3274
3138
  }
3275
- /**
3276
- * 增加时间选择功能
3277
- * @default false
3278
- */
3279
- get thyShowTime() {
3280
- return this._showTime;
3281
- }
3282
- set thyShowTime(value) {
3283
- this._showTime = typeof value === 'object' ? value : coerceBooleanProperty$1(value);
3139
+ open() {
3140
+ this.opened.set(true);
3284
3141
  }
3285
3142
  ngOnInit() {
3286
3143
  super.ngOnInit();
3287
- this.setDefaultTimePickerState(this._panelMode);
3144
+ this.setPanelMode();
3145
+ this.setFormat();
3288
3146
  this.initialized = true;
3289
3147
  if (isPlatformBrowser(this.platformId)) {
3290
3148
  this.thyClickDispatcher
3291
3149
  .clicked(0)
3292
- .pipe(this.takeUntilDestroyed)
3150
+ .pipe(takeUntilDestroyed(this.destroyRef))
3293
3151
  .subscribe((event) => {
3294
3152
  if (!this.element.nativeElement.contains(event.target) &&
3295
- !this.thyPicker?.overlayContainer?.nativeElement.contains(event.target) &&
3153
+ !this.thyPicker()
3154
+ ?.overlayContainer()
3155
+ ?.nativeElement.contains(event.target) &&
3296
3156
  this.realOpenState) {
3297
3157
  this.ngZone.run(() => {
3298
3158
  this.closeOverlay();
@@ -3303,13 +3163,13 @@ class BasePicker extends AbstractPickerComponent {
3303
3163
  }
3304
3164
  }
3305
3165
  onValueChange(value) {
3306
- this.thyPicker.entering = false;
3166
+ this.thyPicker().entering = false;
3307
3167
  this.restoreTimePickerState(value);
3308
3168
  super.onValueChange(value);
3309
- if (!this.flexible) {
3169
+ if (!this.flexible()) {
3310
3170
  this.closeOverlay();
3311
3171
  }
3312
- this.innerPreviousDate = this.thyPicker.getReadableValue(this.thyValue);
3172
+ this.innerPreviousDate = this.thyPicker().getReadableValue(this.thyValue);
3313
3173
  }
3314
3174
  onInputValueChange(formatDate) {
3315
3175
  if (!formatDate || !formatDate.length) {
@@ -3319,8 +3179,8 @@ class BasePicker extends AbstractPickerComponent {
3319
3179
  return;
3320
3180
  }
3321
3181
  let value = formatDate;
3322
- const valueValid = isValidStringDate(value, this.thyTimeZone);
3323
- const valueLimitValid = valueValid ? this.isValidDateLimit(parseStringDate(value, this.thyTimeZone)) : false;
3182
+ const valueValid = isValidStringDate(value, this.thyTimeZone());
3183
+ const valueLimitValid = valueValid ? this.isValidDateLimit(parseStringDate(value, this.thyTimeZone())) : false;
3324
3184
  if (valueValid && valueLimitValid) {
3325
3185
  this.innerPreviousDate = value;
3326
3186
  }
@@ -3328,38 +3188,23 @@ class BasePicker extends AbstractPickerComponent {
3328
3188
  value = this.innerPreviousDate;
3329
3189
  }
3330
3190
  const tinyDate = value
3331
- ? this.thyShowTime
3332
- ? parseStringDate(value, this.thyTimeZone)
3333
- : parseStringDate(value, this.thyTimeZone).startOfDay()
3191
+ ? this.thyShowTime()
3192
+ ? parseStringDate(value, this.thyTimeZone())
3193
+ : parseStringDate(value, this.thyTimeZone()).startOfDay()
3334
3194
  : null;
3335
3195
  this.restoreTimePickerState(tinyDate);
3336
3196
  super.onValueChange(tinyDate);
3337
3197
  }
3338
- // Displays the time directly when the time must be displayed by default
3339
- setDefaultTimePickerState(value) {
3340
- this.withTime = this.thyMustShowTime;
3341
- if (this.isRange) {
3342
- this.panelMode = this.flexible ? ['date', 'date'] : [value, value];
3343
- }
3344
- else {
3345
- this.panelMode = value;
3346
- }
3347
- this.showWeek = value === 'week';
3348
- if (!this.thyFormat) {
3198
+ setFormat() {
3199
+ if (!this.thyFormat()) {
3349
3200
  const inputFormats = {
3350
3201
  year: 'yyyy',
3351
- quarter: 'yyyy-qqq',
3202
+ quarter: `yyyy-${QUARTER_FORMAT}`,
3352
3203
  month: 'yyyy-MM',
3353
3204
  week: this.locale().weekThFormat,
3354
- date: this.thyShowTime ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd'
3205
+ date: this.thyShowTime() ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd'
3355
3206
  };
3356
- this.thyFormat = this.flexible ? inputFormats['date'] : inputFormats[value];
3357
- }
3358
- }
3359
- // Restore after clearing time to select whether the original picker time is displayed or not
3360
- restoreTimePickerState(value) {
3361
- if (!value) {
3362
- this.withTime = this.thyMustShowTime || this.originWithTime;
3207
+ this.thyFormat.set(this.flexible() ? inputFormats['date'] : inputFormats[this.thyMode]);
3363
3208
  }
3364
3209
  }
3365
3210
  // Emit thyOnCalendarChange when select date by thy-range-picker
@@ -3399,7 +3244,7 @@ class BasePicker extends AbstractPickerComponent {
3399
3244
  }
3400
3245
  }
3401
3246
  onFocus(event) {
3402
- this.picker.focus();
3247
+ this.picker().focus();
3403
3248
  }
3404
3249
  onBlur(event) {
3405
3250
  // Tab 聚焦后自动聚焦到 input 输入框,此分支下直接返回,无需触发 onTouchedFn
@@ -3409,26 +3254,26 @@ class BasePicker extends AbstractPickerComponent {
3409
3254
  this.onTouchedFn();
3410
3255
  }
3411
3256
  onInputDate(value) {
3412
- if (value && isValidStringDate(value, this.thyTimeZone)) {
3413
- if (this.thyShowTime) {
3414
- this.withTime = hasTimeInStringDate(value, this.thyTimeZone);
3257
+ if (value && isValidStringDate(value, this.thyTimeZone())) {
3258
+ if (this.thyShowTime()) {
3259
+ this.withTime = hasTimeInStringDate(value, this.thyTimeZone());
3415
3260
  }
3416
- this.thyValue = parseStringDate(value, this.thyTimeZone);
3261
+ this.thyValue = parseStringDate(value, this.thyTimeZone());
3417
3262
  }
3418
3263
  }
3419
3264
  isValidDateLimit(date) {
3420
3265
  let disable = false;
3421
- if (this.thyDisabledDate !== undefined) {
3422
- disable = this.thyDisabledDate(date.nativeDate);
3266
+ if (this.thyDisabledDate() !== undefined) {
3267
+ disable = this.thyDisabledDate()(date.nativeDate);
3423
3268
  }
3424
- const minDate = this.thyMinDate ? new TinyDate(transformDateValue(this.thyMinDate).value, this.thyTimeZone) : null;
3425
- const maxDate = this.thyMaxDate ? new TinyDate(transformDateValue(this.thyMaxDate).value, this.thyTimeZone) : null;
3269
+ const minDate = this.thyMinDate() ? new TinyDate(transformDateValue(this.thyMinDate()).value, this.thyTimeZone()) : null;
3270
+ const maxDate = this.thyMaxDate() ? new TinyDate(transformDateValue(this.thyMaxDate()).value, this.thyTimeZone()) : null;
3426
3271
  return ((!minDate || date.startOfDay().nativeDate >= minDate.startOfDay().nativeDate) &&
3427
3272
  (!maxDate || date.startOfDay().nativeDate <= maxDate.startOfDay().nativeDate) &&
3428
3273
  !disable);
3429
3274
  }
3430
3275
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BasePicker, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3431
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.8", type: BasePicker, isStandalone: true, selector: "ng-component", inputs: { thyDateRender: "thyDateRender", thyMode: "thyMode", thyHasBackdrop: ["thyHasBackdrop", "thyHasBackdrop", coerceBooleanProperty$1], thyShowTime: "thyShowTime", thyMustShowTime: ["thyMustShowTime", "thyMustShowTime", coerceBooleanProperty$1], thyPlacement: "thyPlacement" }, outputs: { thyOnPanelChange: "thyOnPanelChange", thyOnCalendarChange: "thyOnCalendarChange", thyOnOk: "thyOnOk" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.tabindex": "tabIndex" } }, viewQueries: [{ propertyName: "thyPicker", first: true, predicate: ["thyPicker"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: ``, isInline: true }); }
3276
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.8", type: BasePicker, isStandalone: true, selector: "ng-component", inputs: { thyDateRender: { classPropertyName: "thyDateRender", publicName: "thyDateRender", isSignal: true, isRequired: false, transformFunction: null }, thyMode: { classPropertyName: "thyMode", publicName: "thyMode", isSignal: false, isRequired: false, transformFunction: null }, thyHasBackdrop: { classPropertyName: "thyHasBackdrop", publicName: "thyHasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, thyPlacement: { classPropertyName: "thyPlacement", publicName: "thyPlacement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyOnPanelChange: "thyOnPanelChange", thyOnCalendarChange: "thyOnCalendarChange", thyOnOk: "thyOnOk" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.tabindex": "tabIndex" } }, viewQueries: [{ propertyName: "thyPicker", first: true, predicate: ["thyPicker"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: ``, isInline: true }); }
3432
3277
  }
3433
3278
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BasePicker, decorators: [{
3434
3279
  type: Component,
@@ -3440,29 +3285,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3440
3285
  '(blur)': 'onBlur($event)'
3441
3286
  }
3442
3287
  }]
3443
- }], propDecorators: { thyPicker: [{
3444
- type: ViewChild,
3445
- args: ['thyPicker', { static: true }]
3446
- }], thyDateRender: [{
3288
+ }], propDecorators: { thyMode: [{
3447
3289
  type: Input
3448
- }], thyMode: [{
3449
- type: Input
3450
- }], thyHasBackdrop: [{
3451
- type: Input,
3452
- args: [{ transform: coerceBooleanProperty$1 }]
3453
- }], thyOnPanelChange: [{
3454
- type: Output
3455
- }], thyOnCalendarChange: [{
3456
- type: Output
3457
- }], thyShowTime: [{
3458
- type: Input
3459
- }], thyMustShowTime: [{
3460
- type: Input,
3461
- args: [{ transform: coerceBooleanProperty$1 }]
3462
- }], thyPlacement: [{
3463
- type: Input
3464
- }], thyOnOk: [{
3465
- type: Output
3466
3290
  }] } });
3467
3291
 
3468
3292
  /**
@@ -3484,7 +3308,7 @@ class ThyDatePicker extends BasePicker {
3484
3308
  multi: true,
3485
3309
  useExisting: forwardRef(() => ThyDatePicker)
3486
3310
  }
3487
- ], exportAs: ["thyDatePicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "open", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["panelModeChange", "calendarChange", "valueChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3311
+ ], exportAs: ["thyDatePicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "opened", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["disabledDateChange", "panelModeChange", "valueChange", "showShortcutChange", "shortcutPresetsChange", "flexibleDateGranularityChange", "calendarChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3488
3312
  }
3489
3313
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyDatePicker, decorators: [{
3490
3314
  type: Component,
@@ -3496,7 +3320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3496
3320
  }
3497
3321
  ], imports: [ThyPicker, DatePopup], host: {
3498
3322
  '[attr.tabindex]': 'tabIndex'
3499
- }, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n" }]
3323
+ }, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n" }]
3500
3324
  }], ctorParameters: () => [] });
3501
3325
 
3502
3326
  /**
@@ -3510,19 +3334,19 @@ class ThyMonthPicker extends BasePicker {
3510
3334
  /**
3511
3335
  * 展示的月份格式
3512
3336
  */
3513
- this.thyFormat = 'yyyy-MM';
3337
+ this.thyFormat = model('yyyy-MM');
3514
3338
  this.hostRenderer = useHostRenderer();
3515
3339
  this.hostRenderer.addClass('thy-calendar-picker');
3516
3340
  this.thyMode = 'month';
3517
3341
  }
3518
3342
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMonthPicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3519
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyMonthPicker, isStandalone: true, selector: "thy-month-picker", inputs: { thyFormat: "thyFormat" }, providers: [
3343
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyMonthPicker, isStandalone: true, selector: "thy-month-picker", inputs: { thyFormat: { classPropertyName: "thyFormat", publicName: "thyFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyFormat: "thyFormatChange" }, providers: [
3520
3344
  {
3521
3345
  provide: NG_VALUE_ACCESSOR,
3522
3346
  multi: true,
3523
3347
  useExisting: forwardRef(() => ThyMonthPicker)
3524
3348
  }
3525
- ], exportAs: ["thyMonthPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "open", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["panelModeChange", "calendarChange", "valueChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3349
+ ], exportAs: ["thyMonthPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "opened", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["disabledDateChange", "panelModeChange", "valueChange", "showShortcutChange", "shortcutPresetsChange", "flexibleDateGranularityChange", "calendarChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3526
3350
  }
3527
3351
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMonthPicker, decorators: [{
3528
3352
  type: Component,
@@ -3532,10 +3356,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3532
3356
  multi: true,
3533
3357
  useExisting: forwardRef(() => ThyMonthPicker)
3534
3358
  }
3535
- ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n" }]
3536
- }], ctorParameters: () => [], propDecorators: { thyFormat: [{
3537
- type: Input
3538
- }] } });
3359
+ ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n" }]
3360
+ }], ctorParameters: () => [] });
3539
3361
 
3540
3362
  /**
3541
3363
  * 日期范围选择组件
@@ -3556,7 +3378,7 @@ class ThyRangePicker extends BasePicker {
3556
3378
  multi: true,
3557
3379
  useExisting: forwardRef(() => ThyRangePicker)
3558
3380
  }
3559
- ], exportAs: ["thyRangePicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "open", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["panelModeChange", "calendarChange", "valueChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3381
+ ], exportAs: ["thyRangePicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "opened", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["disabledDateChange", "panelModeChange", "valueChange", "showShortcutChange", "shortcutPresetsChange", "flexibleDateGranularityChange", "calendarChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3560
3382
  }
3561
3383
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyRangePicker, decorators: [{
3562
3384
  type: Component,
@@ -3566,7 +3388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3566
3388
  multi: true,
3567
3389
  useExisting: forwardRef(() => ThyRangePicker)
3568
3390
  }
3569
- ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n" }]
3391
+ ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n" }]
3570
3392
  }], ctorParameters: () => [] });
3571
3393
 
3572
3394
  /**
@@ -3577,7 +3399,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3577
3399
  class ThyWeekPicker extends BasePicker {
3578
3400
  constructor() {
3579
3401
  super();
3580
- this.showWeek = true;
3581
3402
  this.hostRenderer = useHostRenderer();
3582
3403
  this.hostRenderer.addClass('thy-calendar-picker');
3583
3404
  this.thyMode = 'week';
@@ -3589,7 +3410,7 @@ class ThyWeekPicker extends BasePicker {
3589
3410
  multi: true,
3590
3411
  useExisting: forwardRef(() => ThyWeekPicker)
3591
3412
  }
3592
- ], exportAs: ["thyWeekPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "open", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["panelModeChange", "calendarChange", "valueChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3413
+ ], exportAs: ["thyWeekPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "opened", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["disabledDateChange", "panelModeChange", "valueChange", "showShortcutChange", "shortcutPresetsChange", "flexibleDateGranularityChange", "calendarChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3593
3414
  }
3594
3415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyWeekPicker, decorators: [{
3595
3416
  type: Component,
@@ -3599,7 +3420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3599
3420
  multi: true,
3600
3421
  useExisting: forwardRef(() => ThyWeekPicker)
3601
3422
  }
3602
- ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n" }]
3423
+ ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n" }]
3603
3424
  }], ctorParameters: () => [] });
3604
3425
 
3605
3426
  /**
@@ -3612,9 +3433,8 @@ class ThyYearPicker extends BasePicker {
3612
3433
  super();
3613
3434
  /**
3614
3435
  * 展示的年份格式
3615
- * @type string
3616
3436
  */
3617
- this.thyFormat = 'yyyy';
3437
+ this.thyFormat = model('yyyy');
3618
3438
  this.isRange = false;
3619
3439
  this.endPanelMode = 'year';
3620
3440
  this.hostRenderer = useHostRenderer();
@@ -3622,13 +3442,13 @@ class ThyYearPicker extends BasePicker {
3622
3442
  this.thyMode = 'year';
3623
3443
  }
3624
3444
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyYearPicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3625
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyYearPicker, isStandalone: true, selector: "thy-year-picker", inputs: { thyFormat: "thyFormat" }, providers: [
3445
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyYearPicker, isStandalone: true, selector: "thy-year-picker", inputs: { thyFormat: { classPropertyName: "thyFormat", publicName: "thyFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyFormat: "thyFormatChange" }, providers: [
3626
3446
  {
3627
3447
  provide: NG_VALUE_ACCESSOR,
3628
3448
  multi: true,
3629
3449
  useExisting: forwardRef(() => ThyYearPicker)
3630
3450
  }
3631
- ], exportAs: ["thyYearPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "open", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["panelModeChange", "calendarChange", "valueChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3451
+ ], exportAs: ["thyYearPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "opened", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["disabledDateChange", "panelModeChange", "valueChange", "showShortcutChange", "shortcutPresetsChange", "flexibleDateGranularityChange", "calendarChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3632
3452
  }
3633
3453
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyYearPicker, decorators: [{
3634
3454
  type: Component,
@@ -3638,10 +3458,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3638
3458
  multi: true,
3639
3459
  useExisting: forwardRef(() => ThyYearPicker)
3640
3460
  }
3641
- ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n" }]
3642
- }], ctorParameters: () => [], propDecorators: { thyFormat: [{
3643
- type: Input
3644
- }] } });
3461
+ ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n" }]
3462
+ }], ctorParameters: () => [] });
3645
3463
 
3646
3464
  const DATE_PICKER_REQUIRED_VALIDATOR = {
3647
3465
  provide: NG_VALIDATORS,
@@ -3652,20 +3470,21 @@ const DATE_PICKER_REQUIRED_VALIDATOR = {
3652
3470
  * @private
3653
3471
  */
3654
3472
  class DatePickerRequiredValidator {
3655
- get required() {
3656
- return this._required;
3657
- }
3658
- set required(value) {
3659
- this._required = value != null && value !== false && `${value}` !== 'false';
3473
+ constructor() {
3474
+ this.required = input(false, {
3475
+ transform: (value) => {
3476
+ return value != null && value !== false && `${value}` !== 'false';
3477
+ }
3478
+ });
3660
3479
  }
3661
3480
  validate(control) {
3662
- return this.required ? this.validateRequired(control) : null;
3481
+ return this.required() ? this.validateRequired(control) : null;
3663
3482
  }
3664
3483
  validateRequired(control) {
3665
3484
  return isEmptyInputDateValue(control.value) ? { required: true } : null;
3666
3485
  }
3667
3486
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DatePickerRequiredValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3668
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: DatePickerRequiredValidator, isStandalone: true, selector: "[thyDatePicker][required][formControlName],[thyDatePicker][required][formControl],[thyDatePicker][required][ngModel],thy-date-picker[required][formControlName],thy-date-picker[required][formControl],thy-date-picker[required][ngModel]", inputs: { required: "required" }, providers: [DATE_PICKER_REQUIRED_VALIDATOR], ngImport: i0 }); }
3487
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: DatePickerRequiredValidator, isStandalone: true, selector: "[thyDatePicker][required][formControlName],[thyDatePicker][required][formControl],[thyDatePicker][required][ngModel],thy-date-picker[required][formControlName],thy-date-picker[required][formControl],thy-date-picker[required][ngModel]", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, providers: [DATE_PICKER_REQUIRED_VALIDATOR], ngImport: i0 }); }
3669
3488
  }
3670
3489
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DatePickerRequiredValidator, decorators: [{
3671
3490
  type: Directive,
@@ -3673,9 +3492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3673
3492
  selector: '[thyDatePicker][required][formControlName],[thyDatePicker][required][formControl],[thyDatePicker][required][ngModel],thy-date-picker[required][formControlName],thy-date-picker[required][formControl],thy-date-picker[required][ngModel]',
3674
3493
  providers: [DATE_PICKER_REQUIRED_VALIDATOR]
3675
3494
  }]
3676
- }], propDecorators: { required: [{
3677
- type: Input
3678
- }] } });
3495
+ }] });
3679
3496
  const RANGE_PICKER_REQUIRED_VALIDATOR = {
3680
3497
  provide: NG_VALIDATORS,
3681
3498
  useExisting: forwardRef(() => RangePickerRequiredValidator),
@@ -3685,20 +3502,21 @@ const RANGE_PICKER_REQUIRED_VALIDATOR = {
3685
3502
  * @private
3686
3503
  */
3687
3504
  class RangePickerRequiredValidator {
3688
- get required() {
3689
- return this._required;
3690
- }
3691
- set required(value) {
3692
- this._required = value != null && value !== false && `${value}` !== 'false';
3505
+ constructor() {
3506
+ this.required = input(false, {
3507
+ transform: (value) => {
3508
+ return value != null && value !== false && `${value}` !== 'false';
3509
+ }
3510
+ });
3693
3511
  }
3694
3512
  validate(control) {
3695
- return this.required ? this.validateRequired(control) : null;
3513
+ return this.required() ? this.validateRequired(control) : null;
3696
3514
  }
3697
3515
  validateRequired(control) {
3698
3516
  return isEmptyInputRangeValue(control.value) ? { required: true } : null;
3699
3517
  }
3700
3518
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: RangePickerRequiredValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3701
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: RangePickerRequiredValidator, isStandalone: true, selector: "[thyRangePicker][required][formControlName],[thyRangePicker][required][formControl],[thyRangePicker][required][ngModel],thy-range-picker[required][formControlName],thy-range-picker[required][formControl],thy-range-picker[required][ngModel]", inputs: { required: "required" }, providers: [RANGE_PICKER_REQUIRED_VALIDATOR], ngImport: i0 }); }
3519
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: RangePickerRequiredValidator, isStandalone: true, selector: "[thyRangePicker][required][formControlName],[thyRangePicker][required][formControl],[thyRangePicker][required][ngModel],thy-range-picker[required][formControlName],thy-range-picker[required][formControl],thy-range-picker[required][ngModel]", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, providers: [RANGE_PICKER_REQUIRED_VALIDATOR], ngImport: i0 }); }
3702
3520
  }
3703
3521
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: RangePickerRequiredValidator, decorators: [{
3704
3522
  type: Directive,
@@ -3706,9 +3524,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
3706
3524
  selector: '[thyRangePicker][required][formControlName],[thyRangePicker][required][formControl],[thyRangePicker][required][ngModel],thy-range-picker[required][formControlName],thy-range-picker[required][formControl],thy-range-picker[required][ngModel]',
3707
3525
  providers: [RANGE_PICKER_REQUIRED_VALIDATOR]
3708
3526
  }]
3709
- }], propDecorators: { required: [{
3710
- type: Input
3711
- }] } });
3527
+ }] });
3712
3528
  function isEmptyInputRangeValue(value) {
3713
3529
  return value == null || (instanceOfRangeEntry(value) && (value.begin == null || value.end == null));
3714
3530
  }
@@ -3723,135 +3539,120 @@ class PickerDirective extends AbstractPickerComponent {
3723
3539
  constructor() {
3724
3540
  super(...arguments);
3725
3541
  this.elementRef = inject(ElementRef);
3542
+ this.cdr = inject(ChangeDetectorRef);
3726
3543
  this.thyPopover = inject(ThyPopover);
3727
- this.showWeek = false;
3544
+ this.thyDateRender = input();
3545
+ this.thyOnPanelChange = output();
3546
+ this.thyOnCalendarChange = output();
3728
3547
  /**
3729
- * @type EventEmitter<ThyPanelMode | ThyPanelMode[]>
3548
+ * 弹出位置
3549
+ * @type top | topLeft | topRight | bottom | bottomLeft | bottomRight | left | leftTop | leftBottom | right | rightTop | rightBottom
3730
3550
  */
3731
- this.thyOnPanelChange = new EventEmitter();
3551
+ this.thyPlacement = input('bottom');
3732
3552
  /**
3733
- * @type EventEmitter<Date[]>
3553
+ * 弹出 DatePicker 的偏移量
3734
3554
  */
3735
- this.thyOnCalendarChange = new EventEmitter();
3555
+ this.thyOffset = input(4, {
3556
+ transform: (value) => {
3557
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
3558
+ warnDeprecation(`thyOffset parameter will be deprecated, please use thyPopoverOptions instead.`);
3559
+ }
3560
+ return numberAttribute(value);
3561
+ }
3562
+ });
3736
3563
  /**
3737
- * 是否展示时间(时、分)
3738
- * @default false
3564
+ * 是否有幕布
3739
3565
  */
3740
- this.thyMustShowTime = false;
3566
+ this.thyHasBackdrop = input(true, {
3567
+ transform: (value) => {
3568
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
3569
+ warnDeprecation(`thyOffset parameter will be deprecated, please use thyPopoverOptions instead.`);
3570
+ }
3571
+ return coerceBooleanProperty$1(value);
3572
+ }
3573
+ });
3741
3574
  /**
3742
- * 弹出位置
3743
- * @type top | topLeft | topRight | bottom | bottomLeft | bottomRight | left | leftTop | leftBottom | right | rightTop | rightBottom
3575
+ * popover 的其它参数
3744
3576
  */
3745
- this.thyPlacement = 'bottom';
3746
- this.offset = 4;
3747
- this.hasBackdrop = true;
3577
+ this.thyPopoverOptions = input();
3748
3578
  /**
3749
3579
  * 是否阻止冒泡
3750
3580
  */
3751
- this.thyStopPropagation = true;
3752
- this.destroy$ = new Subject();
3581
+ this.thyStopPropagation = input(true, { transform: coerceBooleanProperty$1 });
3753
3582
  this.el = this.elementRef.nativeElement;
3754
3583
  this.$click = fromEvent(this.el, 'click').pipe(tap(e => {
3755
- if (this.thyStopPropagation) {
3584
+ if (this.thyStopPropagation()) {
3756
3585
  e.stopPropagation();
3757
3586
  }
3758
3587
  }), mapTo(true));
3759
- this.takeUntilDestroyed = takeUntilDestroyed();
3760
- }
3761
- get thyShowTime() {
3762
- return this._showTime;
3763
- }
3764
- set thyShowTime(value) {
3765
- this._showTime = typeof value === 'object' ? value : coerceBooleanProperty$1(value);
3766
- }
3767
- /**
3768
- * 弹出 DatePicker 的偏移量
3769
- * @default 4
3770
- */
3771
- set thyOffset(value) {
3772
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
3773
- warnDeprecation(`thyOffset parameter will be deprecated, please use thyPopoverOptions instead.`);
3774
- }
3775
- this.offset = value;
3776
- }
3777
- /**
3778
- * 是否有幕布
3779
- * @default true
3780
- */
3781
- set thyHasBackdrop(value) {
3782
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
3783
- warnDeprecation(`thyHasBackdrop parameter will be deprecated, please use thyPopoverOptions instead.`);
3784
- }
3785
- this.hasBackdrop = value;
3786
3588
  }
3787
3589
  ngOnInit() {
3788
- this.getInitialState();
3789
- }
3790
- getInitialState() {
3791
- this.thyMode = this.thyMode || 'date';
3792
- this.flexible = this.thyMode === 'flexible';
3793
- if (this.isRange) {
3794
- this.panelMode = this.flexible ? ['date', 'date'] : [this.thyMode, this.thyMode];
3795
- }
3796
- else {
3797
- this.panelMode = this.thyMode;
3798
- }
3799
- this.showWeek = this.thyMode === 'week';
3590
+ this.setPanelMode();
3800
3591
  }
3801
3592
  openOverlay() {
3802
- this.getInitialState();
3593
+ this.setPanelMode();
3803
3594
  const popoverRef = this.thyPopover.open(DatePopup, Object.assign({
3804
3595
  origin: this.el,
3805
- hasBackdrop: this.hasBackdrop,
3596
+ hasBackdrop: this.thyHasBackdrop(),
3806
3597
  backdropClass: 'thy-overlay-transparent-backdrop',
3807
- offset: this.offset,
3598
+ offset: this.thyOffset(),
3808
3599
  outsideClosable: true,
3809
3600
  initialState: {
3810
3601
  isRange: this.isRange,
3811
3602
  panelMode: this.panelMode,
3812
- showWeek: this.showWeek,
3603
+ showWeek: this.showWeek(),
3813
3604
  value: this.thyValue,
3814
- showTime: this.thyShowTime,
3605
+ showTime: this.thyShowTime(),
3815
3606
  mustShowTime: this.withTime,
3816
- format: this.thyFormat,
3817
- dateRender: this.thyDateRender,
3818
- disabledDate: this.thyDisabledDate,
3819
- placeholder: this.thyPlaceHolder,
3820
- className: this.thyPanelClassName,
3821
- defaultPickerValue: this.thyDefaultPickerValue,
3822
- minDate: this.thyMinDate,
3823
- maxDate: this.thyMaxDate,
3824
- showShortcut: this.thyShowShortcut,
3825
- shortcutPresets: this.shortcutPresets,
3826
- shortcutPosition: this.shortcutPosition,
3827
- flexible: this.flexible,
3607
+ format: this.thyFormat(),
3608
+ dateRender: this.thyDateRender(),
3609
+ disabledDate: this.thyDisabledDate(),
3610
+ placeholder: this.placeholder(),
3611
+ className: this.thyPanelClassName(),
3612
+ defaultPickerValue: this.thyDefaultPickerValue(),
3613
+ minDate: this.thyMinDate(),
3614
+ maxDate: this.thyMaxDate(),
3615
+ showShortcut: this.thyShowShortcut(),
3616
+ shortcutPresets: this.thyShortcutPresets(),
3617
+ shortcutPosition: this.thyShortcutPosition(),
3618
+ flexible: this.flexible(),
3828
3619
  flexibleDateGranularity: this.flexibleDateGranularity,
3829
- timestampPrecision: this.thyTimestampPrecision
3620
+ timestampPrecision: this.thyTimestampPrecision()
3830
3621
  },
3831
- placement: this.thyPlacement
3832
- }, this.thyPopoverOptions));
3622
+ placement: this.thyPlacement()
3623
+ }, this.thyPopoverOptions()));
3833
3624
  if (popoverRef) {
3834
3625
  const componentInstance = popoverRef.componentInstance;
3835
- componentInstance.valueChange.pipe(takeUntil(this.destroy$)).subscribe((event) => this.onValueChange(event));
3836
- componentInstance.calendarChange.pipe(takeUntil(this.destroy$)).subscribe((event) => {
3626
+ if (this.valueChangeSubscription) {
3627
+ this.valueChangeSubscription.unsubscribe();
3628
+ }
3629
+ this.valueChangeSubscription = componentInstance.valueChange?.subscribe((event) => this.onValueChange(event));
3630
+ if (this.calendarChangeSubscription) {
3631
+ this.calendarChangeSubscription.unsubscribe();
3632
+ }
3633
+ this.calendarChangeSubscription = componentInstance.calendarChange?.subscribe((event) => {
3837
3634
  const rangeValue = coerceArray$1(event).map(x => x.nativeDate);
3838
3635
  this.thyOnCalendarChange.emit(rangeValue);
3839
3636
  });
3840
- componentInstance.showTimePickerChange
3841
- .pipe(takeUntil(this.destroy$))
3842
- .subscribe((event) => this.onShowTimePickerChange(event));
3637
+ if (this.showTimePickerChangeSubscription) {
3638
+ this.showTimePickerChangeSubscription.unsubscribe();
3639
+ }
3640
+ this.showTimePickerChangeSubscription = componentInstance.showTimePickerChange?.subscribe((event) => this.onShowTimePickerChange(event));
3843
3641
  // eslint-disable-next-line max-len
3844
3642
  componentInstance.ngOnChanges({ value: {} }); // dynamically created components don't call ngOnChanges, manual call
3845
- componentInstance.dateValueChange?.pipe(this.takeUntilDestroyed).subscribe((event) => {
3643
+ if (this.dateValueChangeSubscription) {
3644
+ this.dateValueChangeSubscription.unsubscribe();
3645
+ }
3646
+ this.dateValueChangeSubscription = componentInstance.dateValueChange?.subscribe((event) => {
3846
3647
  this.thyDateChange.emit(event);
3847
3648
  });
3848
3649
  popoverRef
3849
3650
  .afterOpened()
3850
- .pipe(takeUntil(this.destroy$))
3651
+ .pipe(takeUntilDestroyed(this.destroyRef))
3851
3652
  .subscribe(() => this.thyOpenChange.emit(true));
3852
3653
  popoverRef
3853
3654
  .afterClosed()
3854
- .pipe(takeUntil(this.destroy$))
3655
+ .pipe(takeUntilDestroyed(this.destroyRef))
3855
3656
  .subscribe(() => this.thyOpenChange.emit(false));
3856
3657
  }
3857
3658
  }
@@ -3859,70 +3660,45 @@ class PickerDirective extends AbstractPickerComponent {
3859
3660
  this.thyPopover.close();
3860
3661
  }
3861
3662
  initActionSubscribe() {
3862
- this.$click.pipe(debounceTime(50), takeUntil(this.destroy$)).subscribe(() => {
3863
- if (!this.thyDisabled && !this.thyReadonly) {
3663
+ this.$click.pipe(debounceTime(50), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
3664
+ if (!this.thyDisabled && !this.thyReadonly()) {
3864
3665
  this.openOverlay();
3865
3666
  }
3866
3667
  });
3867
3668
  }
3868
3669
  ngAfterViewInit() {
3869
- this.setDefaultTimePickerState();
3870
3670
  this.initActionSubscribe();
3871
3671
  }
3872
3672
  ngOnDestroy() {
3873
- this.destroy$.next();
3874
- this.destroy$.complete();
3673
+ if (this.valueChangeSubscription) {
3674
+ this.valueChangeSubscription.unsubscribe();
3675
+ }
3676
+ if (this.calendarChangeSubscription) {
3677
+ this.calendarChangeSubscription.unsubscribe();
3678
+ }
3679
+ if (this.showTimePickerChangeSubscription) {
3680
+ this.showTimePickerChangeSubscription.unsubscribe();
3681
+ }
3682
+ if (this.dateValueChangeSubscription) {
3683
+ this.dateValueChangeSubscription.unsubscribe();
3684
+ }
3875
3685
  }
3876
3686
  onValueChange(value) {
3877
3687
  this.restoreTimePickerState(value);
3878
3688
  super.onValueChange(value);
3879
- if (!this.flexible) {
3689
+ if (!this.flexible()) {
3880
3690
  this.closeOverlay();
3881
3691
  }
3882
3692
  }
3883
- // Displays the time directly when the time must be displayed by default
3884
- setDefaultTimePickerState() {
3885
- this.withTime = this.thyMustShowTime;
3886
- }
3887
- // Restore after clearing time to select whether the original picker time is displayed or not
3888
- restoreTimePickerState(value) {
3889
- if (!value) {
3890
- this.withTime = this.thyMustShowTime || this.originWithTime;
3891
- }
3892
- }
3893
3693
  onShowTimePickerChange(show) {
3894
3694
  this.withTime = show;
3895
3695
  }
3896
3696
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PickerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3897
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.8", type: PickerDirective, isStandalone: true, inputs: { thyDateRender: "thyDateRender", thyShowTime: "thyShowTime", thyMustShowTime: ["thyMustShowTime", "thyMustShowTime", coerceBooleanProperty$1], thyPlacement: "thyPlacement", thyOffset: ["thyOffset", "thyOffset", numberAttribute], thyHasBackdrop: ["thyHasBackdrop", "thyHasBackdrop", coerceBooleanProperty$1], thyPopoverOptions: "thyPopoverOptions", thyStopPropagation: ["thyStopPropagation", "thyStopPropagation", coerceBooleanProperty$1] }, outputs: { thyOnPanelChange: "thyOnPanelChange", thyOnCalendarChange: "thyOnCalendarChange" }, usesInheritance: true, ngImport: i0 }); }
3697
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: PickerDirective, isStandalone: true, inputs: { thyDateRender: { classPropertyName: "thyDateRender", publicName: "thyDateRender", isSignal: true, isRequired: false, transformFunction: null }, thyPlacement: { classPropertyName: "thyPlacement", publicName: "thyPlacement", isSignal: true, isRequired: false, transformFunction: null }, thyOffset: { classPropertyName: "thyOffset", publicName: "thyOffset", isSignal: true, isRequired: false, transformFunction: null }, thyHasBackdrop: { classPropertyName: "thyHasBackdrop", publicName: "thyHasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, thyPopoverOptions: { classPropertyName: "thyPopoverOptions", publicName: "thyPopoverOptions", isSignal: true, isRequired: false, transformFunction: null }, thyStopPropagation: { classPropertyName: "thyStopPropagation", publicName: "thyStopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyOnPanelChange: "thyOnPanelChange", thyOnCalendarChange: "thyOnCalendarChange" }, usesInheritance: true, ngImport: i0 }); }
3898
3698
  }
3899
3699
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PickerDirective, decorators: [{
3900
3700
  type: Directive
3901
- }], propDecorators: { thyDateRender: [{
3902
- type: Input
3903
- }], thyOnPanelChange: [{
3904
- type: Output
3905
- }], thyOnCalendarChange: [{
3906
- type: Output
3907
- }], thyShowTime: [{
3908
- type: Input
3909
- }], thyMustShowTime: [{
3910
- type: Input,
3911
- args: [{ transform: coerceBooleanProperty$1 }]
3912
- }], thyPlacement: [{
3913
- type: Input
3914
- }], thyOffset: [{
3915
- type: Input,
3916
- args: [{ transform: numberAttribute }]
3917
- }], thyHasBackdrop: [{
3918
- type: Input,
3919
- args: [{ transform: coerceBooleanProperty$1 }]
3920
- }], thyPopoverOptions: [{
3921
- type: Input
3922
- }], thyStopPropagation: [{
3923
- type: Input,
3924
- args: [{ transform: coerceBooleanProperty$1 }]
3925
- }] } });
3701
+ }] });
3926
3702
 
3927
3703
  /**
3928
3704
  * 日期选择指令
@@ -4002,9 +3778,8 @@ class ThyQuarterPicker extends BasePicker {
4002
3778
  super();
4003
3779
  /**
4004
3780
  * 展示的季度格式
4005
- * @type string
4006
3781
  */
4007
- this.thyFormat = 'yyyy-qqq';
3782
+ this.thyFormat = model(`yyyy-${QUARTER_FORMAT}`);
4008
3783
  this.isRange = false;
4009
3784
  this.endPanelMode = 'quarter';
4010
3785
  this.hostRenderer = useHostRenderer();
@@ -4012,13 +3787,13 @@ class ThyQuarterPicker extends BasePicker {
4012
3787
  this.thyMode = 'quarter';
4013
3788
  }
4014
3789
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyQuarterPicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4015
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyQuarterPicker, isStandalone: true, selector: "thy-quarter-picker", inputs: { thyFormat: "thyFormat" }, providers: [
3790
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyQuarterPicker, isStandalone: true, selector: "thy-quarter-picker", inputs: { thyFormat: { classPropertyName: "thyFormat", publicName: "thyFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyFormat: "thyFormatChange" }, providers: [
4016
3791
  {
4017
3792
  provide: NG_VALUE_ACCESSOR,
4018
3793
  multi: true,
4019
3794
  useExisting: forwardRef(() => ThyQuarterPicker)
4020
3795
  }
4021
- ], exportAs: ["thyQuarterPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "open", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["panelModeChange", "calendarChange", "valueChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3796
+ ], exportAs: ["thyQuarterPicker"], usesInheritance: true, ngImport: i0, template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n", dependencies: [{ kind: "component", type: ThyPicker, selector: "thy-picker", inputs: ["isRange", "opened", "disabled", "placeholder", "readonly", "allowClear", "autoFocus", "className", "size", "suffixIcon", "placement", "flexible", "mode", "hasBackdrop", "separator", "timeZone", "format", "flexibleDateGranularity", "value"], outputs: ["blur", "valueChange", "openChange", "inputChange"], exportAs: ["thyPicker"] }, { kind: "component", type: DatePopup, selector: "date-popup", inputs: ["isRange", "showWeek", "format", "disabledDate", "minDate", "maxDate", "showToday", "showTime", "mustShowTime", "dateRender", "className", "panelMode", "value", "defaultPickerValue", "showShortcut", "shortcutPresets", "shortcutPosition", "flexible", "flexibleDateGranularity", "timestampPrecision", "timeZone"], outputs: ["disabledDateChange", "panelModeChange", "valueChange", "showShortcutChange", "shortcutPresetsChange", "flexibleDateGranularityChange", "calendarChange", "resultOk", "showTimePickerChange", "dateValueChange"], exportAs: ["datePopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4022
3797
  }
4023
3798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyQuarterPicker, decorators: [{
4024
3799
  type: Component,
@@ -4028,10 +3803,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
4028
3803
  multi: true,
4029
3804
  useExisting: forwardRef(() => ThyQuarterPicker)
4030
3805
  }
4031
- ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [open]=\"thyOpen\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear\"\n [className]=\"thyOriginClassName\"\n [autoFocus]=\"thyAutoFocus\"\n [placeholder]=\"thyPlaceHolder\"\n [readonly]=\"thyReadonly\"\n [size]=\"thySize\"\n [timeZone]=\"thyTimeZone\"\n [suffixIcon]=\"thySuffixIcon\"\n [placement]=\"thyPlacement\"\n [hasBackdrop]=\"thyHasBackdrop\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat\"\n [dateRender]=\"thyDateRender\"\n [disabledDate]=\"thyDisabledDate\"\n [minDate]=\"thyMinDate\"\n [maxDate]=\"thyMaxDate\"\n [showShortcut]=\"thyShowShortcut\"\n [shortcutPresets]=\"shortcutPresets\"\n [shortcutPosition]=\"shortcutPosition\"\n [timestampPrecision]=\"thyTimestampPrecision\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone\"\n ></date-popup>\n }\n</thy-picker>\n" }]
4032
- }], ctorParameters: () => [], propDecorators: { thyFormat: [{
4033
- type: Input
4034
- }] } });
3806
+ ], imports: [ThyPicker, DatePopup], template: "<thy-picker\n #thyPicker\n [isRange]=\"isRange\"\n [value]=\"thyValue\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n (valueChange)=\"onInputValueChange($event)\"\n [opened]=\"opened()\"\n [disabled]=\"thyDisabled\"\n [format]=\"thyFormat()\"\n [separator]=\"separator()\"\n [mode]=\"thyMode\"\n [allowClear]=\"thyAllowClear()\"\n [className]=\"thyOriginClassName()\"\n [autoFocus]=\"thyAutoFocus()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"thyReadonly()\"\n [size]=\"thySize()\"\n [timeZone]=\"thyTimeZone()\"\n [suffixIcon]=\"thySuffixIcon()\"\n [placement]=\"thyPlacement()\"\n [hasBackdrop]=\"thyHasBackdrop()\"\n (openChange)=\"onOpenChange($event)\"\n (blur)=\"onBlur($event)\"\n (inputChange)=\"onInputDate($event)\">\n @if (isShowDatePopup) {\n <date-popup\n [attr.tabindex]=\"-1\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek()\"\n [panelMode]=\"panelMode\"\n [flexible]=\"flexible()\"\n [flexibleDateGranularity]=\"flexibleDateGranularity\"\n [defaultPickerValue]=\"thyDefaultPickerValue()\"\n (panelModeChange)=\"thyOnPanelChange.emit($event)\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n [value]=\"thyValue\"\n (valueChange)=\"onValueChange($event)\"\n (calendarChange)=\"onCalendarChange($event)\"\n [showTime]=\"thyShowTime()\"\n [mustShowTime]=\"withTime\"\n [format]=\"thyFormat()\"\n [dateRender]=\"thyDateRender()\"\n [disabledDate]=\"thyDisabledDate()\"\n [minDate]=\"thyMinDate()\"\n [maxDate]=\"thyMaxDate()\"\n [showShortcut]=\"thyShowShortcut()\"\n [shortcutPresets]=\"thyShortcutPresets()\"\n [shortcutPosition]=\"thyShortcutPosition()\"\n [timestampPrecision]=\"thyTimestampPrecision()\"\n (dateValueChange)=\"onDateValueChange($event)\"\n [className]=\"thyPanelClassName()\"\n (resultOk)=\"onResultOk()\"\n [timeZone]=\"thyTimeZone()\"></date-popup>\n }\n</thy-picker>\n" }]
3807
+ }], ctorParameters: () => [] });
4035
3808
 
4036
3809
  registerLocaleData(localeZhHans, 'zh-Hans');
4037
3810
  class ThyDatePickerModule {
@@ -4132,5 +3905,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
4132
3905
  * Generated bundle index. Do not edit.
4133
3906
  */
4134
3907
 
4135
- export { AbstractPickerComponent, BasePicker, CalendarFooter, CalendarHeader, DATE_HELPER_SERVICE_FACTORY, DEFAULT_DATE_PICKER_CONFIG, DateCarousel, DateHeader, DateHelperByDatePipe, DateHelperService, DatePickerAdvancedShowYearTipPipe, DatePickerRequiredValidator, DatePopup, DateTable, DateTableCell, DecadeHeader, DecadeTable, InnerPopup, LibPackerModule, MonthHeader, MonthTable, PickerDirective, QuarterTable, RangePickerRequiredValidator, THY_DATE_PICKER_CONFIG, THY_DATE_PICKER_CONFIG_PROVIDER, ThyDatePicker, ThyDatePickerConfigService, ThyDatePickerDirective, ThyDatePickerFormatPipe, ThyDatePickerFormatStringPipe, ThyDatePickerModule, ThyMonthPicker, ThyPicker, ThyQuarterPicker, ThyQuarterPickerFormatPipe, ThyRangePicker, ThyRangePickerDirective, ThyWeekPicker, ThyYearPicker, YearHeader, YearTable, useDatePickerDefaultConfig };
3908
+ export { AbstractPickerComponent, BasePicker, CalendarFooter, CalendarHeader, DATE_HELPER_SERVICE_FACTORY, DEFAULT_DATE_PICKER_CONFIG, DateCarousel, DateHeader, DateHelperByDatePipe, DateHelperService, DatePickerAdvancedShowYearTipPipe, DatePickerRequiredValidator, DatePopup, DateTable, DateTableCell, DecadeHeader, DecadeTable, InnerPopup, LibPackerModule, MonthHeader, MonthTable, PickerDirective, QUARTER_FORMAT, QuarterTable, RangePickerRequiredValidator, THY_DATE_PICKER_CONFIG, THY_DATE_PICKER_CONFIG_PROVIDER, ThyDatePicker, ThyDatePickerConfigService, ThyDatePickerDirective, ThyDatePickerFormatPipe, ThyDatePickerFormatStringPipe, ThyDatePickerModule, ThyMonthPicker, ThyPicker, ThyQuarterPicker, ThyQuarterPickerFormatPipe, ThyRangePicker, ThyRangePickerDirective, ThyWeekPicker, ThyYearPicker, YearHeader, YearTable, useDatePickerDefaultConfig };
4136
3909
  //# sourceMappingURL=ngx-tethys-date-picker.mjs.map