ngx-tethys 18.2.0-next.0 → 18.2.0-next.2
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.
- package/CHANGELOG.md +56 -0
- package/autocomplete/autocomplete.component.d.ts +4 -2
- package/calendar/calendar-header.component.d.ts +2 -0
- package/cascader/cascader.component.d.ts +3 -1
- package/color-picker/color-picker-panel.component.d.ts +3 -1
- package/copy/copy.directive.d.ts +1 -0
- package/core/overlay/abstract-overlay-ref.d.ts +4 -0
- package/core/overlay/abstract-overlay.service.d.ts +1 -1
- package/core/theme/store.d.ts +2 -1
- package/core/theme/theme.d.ts +2 -0
- package/date-picker/abstract-picker.component.d.ts +3 -1
- package/date-picker/date-helper.service.d.ts +3 -0
- package/date-picker/date-picker.config.d.ts +7 -1
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +3 -1
- package/date-picker/lib/calendar/calendar-header.component.d.ts +3 -1
- package/date-picker/lib/calendar/calendar-table.component.d.ts +3 -1
- package/date-picker/lib/date-carousel/date-carousel.component.d.ts +4 -1
- package/date-picker/lib/popups/date-popup.component.d.ts +3 -1
- package/date-picker/lib/popups/inner-popup.component.d.ts +3 -1
- package/date-range/date-range.component.d.ts +2 -0
- package/date-range/optional-dates/optional-dates.component.d.ts +1 -0
- package/dialog/confirm/confirm.component.d.ts +1 -0
- package/dialog/confirm.config.d.ts +14 -7
- package/dialog/dialog-ref.d.ts +10 -2
- package/dialog/dialog.service.d.ts +6 -0
- package/empty/empty.component.d.ts +14 -9
- package/empty/empty.config.d.ts +3 -0
- package/esm2022/autocomplete/autocomplete.component.mjs +9 -5
- package/esm2022/calendar/calendar-header.component.mjs +9 -5
- package/esm2022/cascader/cascader.component.mjs +9 -6
- package/esm2022/checkbox/checkbox.component.mjs +1 -1
- package/esm2022/color-picker/color-picker-panel.component.mjs +5 -3
- package/esm2022/copy/copy.directive.mjs +7 -5
- package/esm2022/core/overlay/abstract-overlay-ref.mjs +2 -2
- package/esm2022/core/overlay/abstract-overlay.service.mjs +2 -2
- package/esm2022/core/theme/store.mjs +7 -7
- package/esm2022/core/theme/theme.mjs +9 -2
- package/esm2022/date-picker/abstract-picker.component.mjs +4 -2
- package/esm2022/date-picker/base-picker.component.mjs +2 -2
- package/esm2022/date-picker/date-helper.service.mjs +4 -2
- package/esm2022/date-picker/date-picker.component.mjs +1 -1
- package/esm2022/date-picker/date-picker.config.mjs +55 -2
- package/esm2022/date-picker/date-picker.directive.mjs +1 -1
- package/esm2022/date-picker/date-picker.service.mjs +3 -3
- package/esm2022/date-picker/lib/calendar/calendar-footer.component.mjs +5 -3
- package/esm2022/date-picker/lib/calendar/calendar-header.component.mjs +3 -1
- package/esm2022/date-picker/lib/calendar/calendar-table.component.mjs +3 -1
- package/esm2022/date-picker/lib/date/date-header.component.mjs +6 -5
- package/esm2022/date-picker/lib/date/date-table.component.mjs +4 -4
- package/esm2022/date-picker/lib/date-carousel/date-carousel.component.mjs +9 -4
- package/esm2022/date-picker/lib/decade/decade-header.component.mjs +3 -3
- package/esm2022/date-picker/lib/month/month-header.component.mjs +4 -4
- package/esm2022/date-picker/lib/month/month-table.component.mjs +3 -2
- package/esm2022/date-picker/lib/popups/date-popup.component.mjs +5 -3
- package/esm2022/date-picker/lib/popups/inner-popup.component.mjs +5 -3
- package/esm2022/date-picker/lib/year/year-header.component.mjs +3 -3
- package/esm2022/date-picker/month-picker.component.mjs +1 -1
- package/esm2022/date-picker/quarter-picker.component.mjs +1 -1
- package/esm2022/date-picker/range-picker.component.mjs +1 -1
- package/esm2022/date-picker/range-picker.directive.mjs +1 -1
- package/esm2022/date-picker/week-picker.component.mjs +1 -1
- package/esm2022/date-picker/year-picker.component.mjs +1 -1
- package/esm2022/date-range/date-range.component.mjs +7 -4
- package/esm2022/date-range/optional-dates/optional-dates.component.mjs +4 -2
- package/esm2022/dialog/confirm/confirm.component.mjs +14 -3
- package/esm2022/dialog/confirm.config.mjs +17 -2
- package/esm2022/dialog/dialog-ref.mjs +9 -6
- package/esm2022/dialog/dialog.service.mjs +27 -3
- package/esm2022/empty/empty.component.mjs +7 -2
- package/esm2022/empty/empty.config.mjs +4 -1
- package/esm2022/form/form-validator-loader.mjs +17 -15
- package/esm2022/guider/guider-hint/guider-hint.component.mjs +5 -3
- package/esm2022/i18n/i18n.mjs +9 -0
- package/esm2022/i18n/i18n.service.mjs +45 -0
- package/esm2022/i18n/i18n.token.mjs +10 -0
- package/esm2022/i18n/index.mjs +10 -0
- package/esm2022/i18n/locale.mjs +14 -0
- package/esm2022/i18n/locales/de-de.mjs +130 -0
- package/esm2022/i18n/locales/en-us.mjs +151 -0
- package/esm2022/i18n/locales/ja-jp.mjs +130 -0
- package/esm2022/i18n/locales/zh-hans.mjs +130 -0
- package/esm2022/i18n/locales/zh-hant.mjs +130 -0
- package/esm2022/i18n/ngx-tethys-i18n.mjs +5 -0
- package/esm2022/nav/nav.component.mjs +5 -3
- package/esm2022/pagination/pagination.component.mjs +22 -5
- package/esm2022/pagination/pagination.module.mjs +26 -5
- package/esm2022/pagination/pagination.pipe.mjs +25 -1
- package/esm2022/property/property-item.component.mjs +3 -3
- package/esm2022/radio/button/radio-button.component.mjs +1 -1
- package/esm2022/radio/radio.component.mjs +1 -1
- package/esm2022/select/custom-select/custom-select.component.mjs +13 -6
- package/esm2022/strength/strength.component.mjs +21 -20
- package/esm2022/time-picker/time-picker-panel.component.mjs +5 -3
- package/esm2022/time-picker/time-picker.component.mjs +4 -2
- package/esm2022/tooltip/tooltip-ref.mjs +4 -1
- package/esm2022/transfer/transfer-list.component.mjs +5 -3
- package/esm2022/tree-select/tree-select.component.mjs +9 -6
- package/esm2022/version.mjs +2 -2
- package/fesm2022/ngx-tethys-autocomplete.mjs +8 -5
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +8 -5
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +8 -5
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +4 -2
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +6 -4
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +14 -7
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +95 -30
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +8 -4
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +61 -10
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +9 -1
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +16 -14
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +4 -2
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +747 -0
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -0
- package/fesm2022/ngx-tethys-nav.mjs +4 -2
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +69 -7
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +2 -2
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +12 -5
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +20 -19
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +6 -3
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +3 -0
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +4 -2
- package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +8 -5
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/form/form-validator-loader.d.ts +2 -0
- package/guider/guider-hint/guider-hint.component.d.ts +3 -1
- package/i18n/i18n.d.ts +154 -0
- package/i18n/i18n.service.d.ts +19 -0
- package/i18n/i18n.token.d.ts +8 -0
- package/i18n/index.d.ts +9 -0
- package/i18n/locale.d.ts +4 -0
- package/i18n/locales/de-de.d.ts +130 -0
- package/i18n/locales/en-us.d.ts +151 -0
- package/i18n/locales/ja-jp.d.ts +130 -0
- package/i18n/locales/zh-hans.d.ts +130 -0
- package/i18n/locales/zh-hant.d.ts +130 -0
- package/nav/nav.component.d.ts +3 -1
- package/package.json +7 -1
- package/pagination/pagination.component.d.ts +4 -1
- package/pagination/pagination.module.d.ts +1 -1
- package/pagination/pagination.pipe.d.ts +6 -0
- package/radio/radio.component.d.ts +0 -2
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/select/custom-select/custom-select.component.d.ts +3 -1
- package/strength/strength.component.d.ts +21 -2
- package/styles/modules/cdk/drag-drop.scss +1 -1
- package/time-picker/time-picker-panel.component.d.ts +3 -1
- package/time-picker/time-picker.component.d.ts +3 -1
- package/transfer/transfer-list.component.d.ts +3 -1
- package/tree-select/tree-select.component.d.ts +3 -1
|
@@ -4,6 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { Injectable, inject, EventEmitter, Directive, Input, Output, Component, ChangeDetectionStrategy, InjectionToken, Pipe, ChangeDetectorRef, forwardRef, HostBinding, NgModule, ViewChild, ElementRef, PLATFORM_ID, NgZone, numberAttribute } from '@angular/core';
|
|
5
5
|
import localeZhHans from '@angular/common/locales/zh-Hans';
|
|
6
6
|
import { TinyDate, coerceBooleanProperty, helpers, coerceArray, isTemplateRef, isEmpty, isString, valueFunctionProp, isUndefinedOrNull, isFunction, sortRangeValue, elementMatchClosest, warnDeprecation } from 'ngx-tethys/util';
|
|
7
|
+
import { useLocale, injectLocale, ThyI18nService } from 'ngx-tethys/i18n';
|
|
7
8
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
8
9
|
import * as i1 from '@angular/forms';
|
|
9
10
|
import { FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
@@ -29,6 +30,7 @@ function DATE_HELPER_SERVICE_FACTORY() {
|
|
|
29
30
|
*/
|
|
30
31
|
class DateHelperService {
|
|
31
32
|
constructor() {
|
|
33
|
+
this.locale = useLocale();
|
|
32
34
|
this.relyOnDatePipe = this instanceof DateHelperByDatePipe;
|
|
33
35
|
}
|
|
34
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DateHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -46,7 +48,7 @@ class DateHelperByDatePipe extends DateHelperService {
|
|
|
46
48
|
return +this.format(date, 'w');
|
|
47
49
|
}
|
|
48
50
|
format(date, formatStr) {
|
|
49
|
-
return date ? formatDate(date, formatStr,
|
|
51
|
+
return date ? formatDate(date, formatStr, this.locale().id) : '';
|
|
50
52
|
}
|
|
51
53
|
transCompatFormat(format) {
|
|
52
54
|
return format && format.replace(/Y/g, 'y').replace(/D/g, 'd');
|
|
@@ -59,6 +61,7 @@ class DateHelperByDatePipe extends DateHelperService {
|
|
|
59
61
|
class CalendarHeader {
|
|
60
62
|
constructor() {
|
|
61
63
|
this.dateHelper = inject(DateHelperService);
|
|
64
|
+
this.locale = injectLocale('datePicker');
|
|
62
65
|
this.showSuperPreBtn = true;
|
|
63
66
|
this.showSuperNextBtn = true;
|
|
64
67
|
this.showPreBtn = true;
|
|
@@ -144,7 +147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
144
147
|
*/
|
|
145
148
|
class MonthHeader extends CalendarHeader {
|
|
146
149
|
getSelectors() {
|
|
147
|
-
let yearFormat =
|
|
150
|
+
let yearFormat = this.locale().yearFormat;
|
|
148
151
|
return [
|
|
149
152
|
{
|
|
150
153
|
className: `${this.prefixCls}-month-btn`,
|
|
@@ -154,11 +157,11 @@ class MonthHeader extends CalendarHeader {
|
|
|
154
157
|
];
|
|
155
158
|
}
|
|
156
159
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MonthHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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=\"\
|
|
160
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 }); }
|
|
158
161
|
}
|
|
159
162
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MonthHeader, decorators: [{
|
|
160
163
|
type: Component,
|
|
161
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'month-header', standalone: true, 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=\"\
|
|
164
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'month-header', standalone: true, 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" }]
|
|
162
165
|
}] });
|
|
163
166
|
|
|
164
167
|
/**
|
|
@@ -175,6 +178,7 @@ class CalendarFooter {
|
|
|
175
178
|
this.showTimePickerChange = new EventEmitter();
|
|
176
179
|
this.isShowTime = false;
|
|
177
180
|
this.isCanTime = false;
|
|
181
|
+
this.locale = injectLocale('datePicker');
|
|
178
182
|
}
|
|
179
183
|
ngOnInit() {
|
|
180
184
|
this._initTimeShowMode();
|
|
@@ -225,11 +229,11 @@ class CalendarFooter {
|
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CalendarFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
228
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: CalendarFooter, isStandalone: true, selector: "calendar-footer", inputs: { showTime: "showTime", mustShowTime: "mustShowTime", value: "value", 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
|
|
232
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: CalendarFooter, isStandalone: true, selector: "calendar-footer", inputs: { showTime: "showTime", mustShowTime: "mustShowTime", value: "value", 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 [ngModel]=\"value?.nativeDate\"\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"], outputs: ["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 }); }
|
|
229
233
|
}
|
|
230
234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CalendarFooter, decorators: [{
|
|
231
235
|
type: Component,
|
|
232
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'calendar-footer', exportAs: 'calendarFooter', standalone: true, 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
|
|
236
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'calendar-footer', exportAs: 'calendarFooter', standalone: true, 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 [ngModel]=\"value?.nativeDate\"\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" }]
|
|
233
237
|
}], propDecorators: { showTime: [{
|
|
234
238
|
type: Input
|
|
235
239
|
}], mustShowTime: [{
|
|
@@ -249,6 +253,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
249
253
|
type: Output
|
|
250
254
|
}] } });
|
|
251
255
|
|
|
256
|
+
/**
|
|
257
|
+
* @deprecated
|
|
258
|
+
*/
|
|
252
259
|
const DEFAULT_DATE_PICKER_CONFIG = {
|
|
253
260
|
shortcutPosition: 'left',
|
|
254
261
|
showShortcut: false,
|
|
@@ -292,15 +299,64 @@ const DEFAULT_DATE_PICKER_CONFIG = {
|
|
|
292
299
|
}
|
|
293
300
|
};
|
|
294
301
|
const THY_DATE_PICKER_CONFIG = new InjectionToken('thy-date-picker-config');
|
|
302
|
+
function useDatePickerDefaultConfig() {
|
|
303
|
+
const locale = injectLocale('datePicker');
|
|
304
|
+
return {
|
|
305
|
+
shortcutPosition: 'left',
|
|
306
|
+
showShortcut: false,
|
|
307
|
+
weekStartsOn: 1,
|
|
308
|
+
timestampPrecision: 'seconds',
|
|
309
|
+
shortcutDatePresets: () => {
|
|
310
|
+
return [
|
|
311
|
+
{
|
|
312
|
+
title: locale().today,
|
|
313
|
+
value: startOfDay(new Date()).getTime()
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
title: locale().tomorrow,
|
|
317
|
+
value: startOfDay(addDays(new Date(), 1)).getTime()
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
title: locale().nextWeek,
|
|
321
|
+
value: startOfWeek(addWeeks(new Date(), 1), { weekStartsOn: 1 }).getTime()
|
|
322
|
+
}
|
|
323
|
+
];
|
|
324
|
+
},
|
|
325
|
+
shortcutRangesPresets: () => {
|
|
326
|
+
return [
|
|
327
|
+
{
|
|
328
|
+
title: locale().lastSevenDays,
|
|
329
|
+
value: [new TinyDate(subDays(new Date(), 6)).getTime(), new TinyDate().endOfDay().getTime()]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
title: locale().lastThirtyDays,
|
|
333
|
+
value: [new TinyDate(subDays(new Date(), 29)).getTime(), new TinyDate().endOfDay().getTime()]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
title: locale().currentWeek,
|
|
337
|
+
value: [
|
|
338
|
+
new TinyDate().startOfWeek({ weekStartsOn: 1 }).getTime(),
|
|
339
|
+
new TinyDate().endOfWeek({ weekStartsOn: 1 }).getTime()
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
title: locale().currentMonth,
|
|
344
|
+
value: [new TinyDate().startOfMonth().getTime(), new TinyDate().endOfMonth().getTime()]
|
|
345
|
+
}
|
|
346
|
+
];
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}
|
|
295
350
|
const THY_DATE_PICKER_CONFIG_PROVIDER = {
|
|
296
351
|
provide: THY_DATE_PICKER_CONFIG,
|
|
297
|
-
|
|
352
|
+
useFactory: useDatePickerDefaultConfig,
|
|
353
|
+
deps: [ThyI18nService]
|
|
298
354
|
};
|
|
299
355
|
|
|
300
356
|
class ThyDatePickerConfigService {
|
|
301
357
|
constructor() {
|
|
302
358
|
const datePickerConfig = inject(THY_DATE_PICKER_CONFIG, { optional: true });
|
|
303
|
-
this.config = { ...
|
|
359
|
+
this.config = { ...useDatePickerDefaultConfig(), ...datePickerConfig };
|
|
304
360
|
}
|
|
305
361
|
get shortcutDatePresets() {
|
|
306
362
|
return this.config.shortcutDatePresets;
|
|
@@ -654,6 +710,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
654
710
|
class DateCarousel {
|
|
655
711
|
constructor() {
|
|
656
712
|
this.cdr = inject(ChangeDetectorRef);
|
|
713
|
+
this.dateHelper = inject(DateHelperService);
|
|
714
|
+
this.locale = injectLocale('datePicker');
|
|
657
715
|
this.className = 'thy-date-picker-advanced-carousel';
|
|
658
716
|
this.selectableData = {};
|
|
659
717
|
this.selectedValue = [];
|
|
@@ -857,9 +915,10 @@ class DateCarousel {
|
|
|
857
915
|
}
|
|
858
916
|
getSelectableMonth(currentDate, preOrNextcount = 0) {
|
|
859
917
|
currentDate = currentDate || this.activeDate || new TinyDate().startOfMonth();
|
|
918
|
+
// Selectable months for advanced range selector
|
|
860
919
|
const cell = {
|
|
861
920
|
type: 'month',
|
|
862
|
-
content:
|
|
921
|
+
content: this.dateHelper.format(currentDate.addMonths(preOrNextcount).nativeDate, this.locale().monthFormat),
|
|
863
922
|
startValue: currentDate.startOfMonth().addMonths(preOrNextcount),
|
|
864
923
|
endValue: currentDate.endOfMonth().addMonths(preOrNextcount),
|
|
865
924
|
classMap: {}
|
|
@@ -1004,7 +1063,7 @@ class DateCarousel {
|
|
|
1004
1063
|
multi: true,
|
|
1005
1064
|
useExisting: forwardRef(() => DateCarousel)
|
|
1006
1065
|
}
|
|
1007
|
-
], ngImport: i0, template: "<ng-container\n *ngTemplateOutlet=\"carouselItem; context: { title:
|
|
1066
|
+
], ngImport: i0, 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", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { 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: "pipe", type: DatePickerAdvancedShowYearTipPipe, name: "showYearTip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1008
1067
|
}
|
|
1009
1068
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DateCarousel, decorators: [{
|
|
1010
1069
|
type: Component,
|
|
@@ -1014,7 +1073,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1014
1073
|
multi: true,
|
|
1015
1074
|
useExisting: forwardRef(() => DateCarousel)
|
|
1016
1075
|
}
|
|
1017
|
-
], standalone: true, imports: [NgTemplateOutlet, ThyButton, ThyIcon, NgClass, DatePickerAdvancedShowYearTipPipe], template: "<ng-container\n *ngTemplateOutlet=\"carouselItem; context: { title:
|
|
1076
|
+
], standalone: true, 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" }]
|
|
1018
1077
|
}], propDecorators: { className: [{
|
|
1019
1078
|
type: HostBinding,
|
|
1020
1079
|
args: ['class']
|
|
@@ -1027,7 +1086,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1027
1086
|
*/
|
|
1028
1087
|
class DateHeader extends CalendarHeader {
|
|
1029
1088
|
getSelectors() {
|
|
1030
|
-
|
|
1089
|
+
const yearFormat = this.locale().yearFormat;
|
|
1090
|
+
const monthFormat = this.locale().monthFormat;
|
|
1031
1091
|
return [
|
|
1032
1092
|
{
|
|
1033
1093
|
className: `${this.prefixCls}-year-btn`,
|
|
@@ -1039,16 +1099,16 @@ class DateHeader extends CalendarHeader {
|
|
|
1039
1099
|
className: `${this.prefixCls}-month-btn`,
|
|
1040
1100
|
title: '',
|
|
1041
1101
|
onClick: () => this.changePanel('month'),
|
|
1042
|
-
label: this.formatDateTime(
|
|
1102
|
+
label: this.formatDateTime(monthFormat)
|
|
1043
1103
|
}
|
|
1044
1104
|
];
|
|
1045
1105
|
}
|
|
1046
1106
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DateHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1047
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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=\"\
|
|
1107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 }); }
|
|
1048
1108
|
}
|
|
1049
1109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DateHeader, decorators: [{
|
|
1050
1110
|
type: Component,
|
|
1051
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-header', standalone: true, 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=\"\
|
|
1111
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-header', standalone: true, 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" }]
|
|
1052
1112
|
}] });
|
|
1053
1113
|
|
|
1054
1114
|
/**
|
|
@@ -1056,6 +1116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1056
1116
|
*/
|
|
1057
1117
|
class CalendarTable {
|
|
1058
1118
|
constructor() {
|
|
1119
|
+
this.locale = injectLocale('datePicker');
|
|
1059
1120
|
this.isTemplateRef = isTemplateRef;
|
|
1060
1121
|
this.headRow = [];
|
|
1061
1122
|
this.bodyRows = [];
|
|
@@ -1204,7 +1265,7 @@ class DateTable extends CalendarTable {
|
|
|
1204
1265
|
}
|
|
1205
1266
|
getVeryShortWeekFormat() {
|
|
1206
1267
|
if (this.dateHelper.relyOnDatePipe) {
|
|
1207
|
-
return '
|
|
1268
|
+
return this.prefixCls === 'thy-calendar-full' ? this.locale().fullWeekFormat : this.locale().weekFormat;
|
|
1208
1269
|
}
|
|
1209
1270
|
return 'dd';
|
|
1210
1271
|
}
|
|
@@ -1302,11 +1363,11 @@ class DateTable extends CalendarTable {
|
|
|
1302
1363
|
};
|
|
1303
1364
|
}
|
|
1304
1365
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DateTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1305
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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=\"\
|
|
1366
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 }); }
|
|
1306
1367
|
}
|
|
1307
1368
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DateTable, decorators: [{
|
|
1308
1369
|
type: Component,
|
|
1309
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-table', exportAs: 'dateTable', standalone: true, 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=\"\
|
|
1370
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-table', exportAs: 'dateTable', standalone: true, 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" }]
|
|
1310
1371
|
}], ctorParameters: () => [], propDecorators: { dayHover: [{
|
|
1311
1372
|
type: Output
|
|
1312
1373
|
}] } });
|
|
@@ -1341,11 +1402,11 @@ class DecadeHeader extends CalendarHeader {
|
|
|
1341
1402
|
];
|
|
1342
1403
|
}
|
|
1343
1404
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DecadeHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1344
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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=\"\
|
|
1405
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 }); }
|
|
1345
1406
|
}
|
|
1346
1407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DecadeHeader, decorators: [{
|
|
1347
1408
|
type: Component,
|
|
1348
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'decade-header', standalone: true, 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=\"\
|
|
1409
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'decade-header', standalone: true, 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" }]
|
|
1349
1410
|
}], ctorParameters: () => [] });
|
|
1350
1411
|
|
|
1351
1412
|
/**
|
|
@@ -1452,8 +1513,9 @@ class MonthTable extends CalendarTable {
|
|
|
1452
1513
|
};
|
|
1453
1514
|
for (let colIndex = 0; colIndex < this.MAX_COL; colIndex++) {
|
|
1454
1515
|
const month = this.activeDate.setMonth(monthValue);
|
|
1516
|
+
const monthFormat = this.locale().zhMonthFormat;
|
|
1455
1517
|
const isDisabled = this.disabledDate ? this.disabledDate(this.activeDate.setMonth(monthValue).nativeDate) : false;
|
|
1456
|
-
const content = this.dateHelper.format(month.nativeDate,
|
|
1518
|
+
const content = this.dateHelper.format(month.nativeDate, monthFormat);
|
|
1457
1519
|
const cell = {
|
|
1458
1520
|
trackByIndex: colIndex,
|
|
1459
1521
|
value: month.nativeDate,
|
|
@@ -1541,11 +1603,11 @@ class YearHeader extends CalendarHeader {
|
|
|
1541
1603
|
];
|
|
1542
1604
|
}
|
|
1543
1605
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: YearHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1544
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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=\"\
|
|
1606
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 }); }
|
|
1545
1607
|
}
|
|
1546
1608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: YearHeader, decorators: [{
|
|
1547
1609
|
type: Component,
|
|
1548
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'year-header', standalone: true, 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=\"\
|
|
1610
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'year-header', standalone: true, 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" }]
|
|
1549
1611
|
}] });
|
|
1550
1612
|
|
|
1551
1613
|
/**
|
|
@@ -1742,6 +1804,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1742
1804
|
class InnerPopup {
|
|
1743
1805
|
constructor() {
|
|
1744
1806
|
this.dateHelper = inject(DateHelperService);
|
|
1807
|
+
this.locale = injectLocale('datePicker');
|
|
1745
1808
|
this.className = true;
|
|
1746
1809
|
this._showDateRangeInput = false;
|
|
1747
1810
|
this.panelModeChange = new EventEmitter();
|
|
@@ -1852,7 +1915,7 @@ class InnerPopup {
|
|
|
1852
1915
|
}
|
|
1853
1916
|
}
|
|
1854
1917
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: InnerPopup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1855
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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", 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=\"\
|
|
1918
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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", 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 (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 }); }
|
|
1856
1919
|
}
|
|
1857
1920
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: InnerPopup, decorators: [{
|
|
1858
1921
|
type: Component,
|
|
@@ -1867,7 +1930,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1867
1930
|
QuarterTable,
|
|
1868
1931
|
DateHeader,
|
|
1869
1932
|
DateTable
|
|
1870
|
-
], template: "@if (showDateRangeInput) {\n <div class=\"{{ prefixCls }}-picker-inner-popup-range-input\">\n <input thyInput thySize=\"sm\" [value]=\"getReadableValue(selectedValue[0])\" placeholder=\"\
|
|
1933
|
+
], 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 (dayHover)=\"dayHover.emit($event)\"></date-table>\n </div>\n }\n}\n" }]
|
|
1871
1934
|
}], propDecorators: { className: [{
|
|
1872
1935
|
type: HostBinding,
|
|
1873
1936
|
args: ['class.thy-calendar-picker-inner-popup']
|
|
@@ -1922,6 +1985,7 @@ class DatePopup {
|
|
|
1922
1985
|
constructor() {
|
|
1923
1986
|
this.cdr = inject(ChangeDetectorRef);
|
|
1924
1987
|
this.datePickerConfigService = inject(ThyDatePickerConfigService);
|
|
1988
|
+
this.locale = injectLocale('datePicker');
|
|
1925
1989
|
this.panelModeChange = new EventEmitter();
|
|
1926
1990
|
this.calendarChange = new EventEmitter();
|
|
1927
1991
|
this.valueChange = new EventEmitter();
|
|
@@ -2388,11 +2452,11 @@ class DatePopup {
|
|
|
2388
2452
|
}
|
|
2389
2453
|
}
|
|
2390
2454
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DatePopup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2391
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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" }, 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
|
|
2455
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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" }, 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 [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 [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", "thyInsideClosable", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["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", "showDateRangeInput", "partType", "endPanelMode", "value"], outputs: ["panelModeChange", "headerChange", "selectDate", "dayHover"], exportAs: ["innerPopup"] }, { kind: "component", type: CalendarFooter, selector: "calendar-footer", inputs: ["showTime", "mustShowTime", "value", "disableTimeConfirm"], outputs: ["selectTime", "clickOk", "clickRemove", "showTimePickerChange"], exportAs: ["calendarFooter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2392
2456
|
}
|
|
2393
2457
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DatePopup, decorators: [{
|
|
2394
2458
|
type: Component,
|
|
2395
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-popup', exportAs: 'datePopup', standalone: true, 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
|
|
2459
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'date-popup', exportAs: 'datePopup', standalone: true, 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 [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 [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" }]
|
|
2396
2460
|
}], propDecorators: { isRange: [{
|
|
2397
2461
|
type: Input
|
|
2398
2462
|
}], showWeek: [{
|
|
@@ -2859,6 +2923,7 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
|
|
|
2859
2923
|
constructor() {
|
|
2860
2924
|
super();
|
|
2861
2925
|
this.cdr = inject(ChangeDetectorRef);
|
|
2926
|
+
this.locale = injectLocale('datePicker');
|
|
2862
2927
|
this._panelMode = 'date';
|
|
2863
2928
|
this.datePickerConfigService = inject(ThyDatePickerConfigService);
|
|
2864
2929
|
/**
|
|
@@ -3042,7 +3107,7 @@ class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin
|
|
|
3042
3107
|
}
|
|
3043
3108
|
setDefaultPlaceHolder() {
|
|
3044
3109
|
if (!this.isCustomPlaceHolder) {
|
|
3045
|
-
this.thyPlaceHolder = this.isRange ? [
|
|
3110
|
+
this.thyPlaceHolder = this.isRange ? [this.locale().startDate, this.locale().endDate] : this.locale().placeholder;
|
|
3046
3111
|
}
|
|
3047
3112
|
this.cdr.markForCheck();
|
|
3048
3113
|
}
|
|
@@ -3238,7 +3303,7 @@ class BasePicker extends AbstractPickerComponent {
|
|
|
3238
3303
|
year: 'yyyy',
|
|
3239
3304
|
quarter: 'yyyy-qqq',
|
|
3240
3305
|
month: 'yyyy-MM',
|
|
3241
|
-
week:
|
|
3306
|
+
week: this.locale().weekThFormat,
|
|
3242
3307
|
date: this.thyShowTime ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd'
|
|
3243
3308
|
};
|
|
3244
3309
|
this.thyFormat = this.flexible ? inputFormats['date'] : inputFormats[value];
|
|
@@ -4025,5 +4090,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
4025
4090
|
* Generated bundle index. Do not edit.
|
|
4026
4091
|
*/
|
|
4027
4092
|
|
|
4028
|
-
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 };
|
|
4093
|
+
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 };
|
|
4029
4094
|
//# sourceMappingURL=ngx-tethys-date-picker.mjs.map
|