ngx-tethys 19.0.8 → 19.0.10
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 +24 -0
- package/date-range/date-range.component.d.ts +16 -28
- package/fesm2022/ngx-tethys-date-range.mjs +60 -63
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +11 -10
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +57 -2
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +11 -9
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +5 -2
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/guider/guider.directive.d.ts +2 -2
- package/i18n/i18n.d.ts +14 -1
- package/i18n/locales/de-de.d.ts +11 -0
- package/i18n/locales/en-us.d.ts +11 -0
- package/i18n/locales/ja-jp.d.ts +11 -0
- package/i18n/locales/zh-hans.d.ts +11 -0
- package/i18n/locales/zh-hant.d.ts +11 -0
- package/image/preview/image-preview.component.d.ts +1 -0
- package/nav/styles/nav.scss +4 -1
- package/package.json +1 -1
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [19.0.10](https://github.com/atinc/ngx-tethys/compare/19.0.9...19.0.10) (2025-05-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **i18n:** update translation of lastSevenDays and lastThirtyDays #TINFR-2033 ([#3385](https://github.com/atinc/ngx-tethys/issues/3385)) ([512af06](https://github.com/atinc/ngx-tethys/commit/512af0645339b39f7ce216f15e4d99d42cc839a1)), closes [#TINFR-2033](https://github.com/atinc/ngx-tethys/issues/TINFR-2033)
|
|
11
|
+
* **pagination:** fix missing type ([#3389](https://github.com/atinc/ngx-tethys/issues/3389)) ([86f09e9](https://github.com/atinc/ngx-tethys/commit/86f09e9be0d8639b3208c8cb0d2bf1c69de3780d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **image:** support i18n for image ([#3386](https://github.com/atinc/ngx-tethys/issues/3386)) ([e601d6b](https://github.com/atinc/ngx-tethys/commit/e601d6bbf1978f496911121dde68e5b2827e8556))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [19.0.9](https://github.com/atinc/ngx-tethys/compare/19.0.8...19.0.9) (2025-04-28)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **nav:** improve button offset calculation and adjust styles for better responsiveness #TINFR-1984 ([#3370](https://github.com/atinc/ngx-tethys/issues/3370)) ([#3371](https://github.com/atinc/ngx-tethys/issues/3371)) ([dee521f](https://github.com/atinc/ngx-tethys/commit/dee521fc8e462878146d73053dbec4e80455973f)), closes [#TINFR-1984](https://github.com/atinc/ngx-tethys/issues/TINFR-1984)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
5
29
|
## [19.0.8](https://github.com/atinc/ngx-tethys/compare/19.0.6...19.0.8) (2025-04-25)
|
|
6
30
|
|
|
7
31
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { DateRangeItemInfo } from './date-range.class';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* @name thy-date-range
|
|
8
8
|
* @order 10
|
|
9
9
|
*/
|
|
10
|
-
export declare class ThyDateRange implements
|
|
10
|
+
export declare class ThyDateRange implements ControlValueAccessor {
|
|
11
11
|
private thyPopover;
|
|
12
12
|
private cdr;
|
|
13
13
|
private locale;
|
|
@@ -16,58 +16,59 @@ export declare class ThyDateRange implements OnInit, ControlValueAccessor {
|
|
|
16
16
|
* 自定义可选值列表项
|
|
17
17
|
* @type DateRangeItemInfo[]
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
readonly thyOptionalDateRanges: import("@angular/core").InputSignal<DateRangeItemInfo[]>;
|
|
20
20
|
/**
|
|
21
21
|
* 隐藏下拉选择时间段
|
|
22
22
|
* @default false
|
|
23
23
|
*/
|
|
24
|
-
thyHiddenMenu: boolean
|
|
24
|
+
readonly thyHiddenMenu: import("@angular/core").InputSignalWithTransform<boolean, string | number | boolean>;
|
|
25
25
|
/**
|
|
26
26
|
* 禁用左右切换时间段
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
|
-
thyDisabledSwitch: boolean
|
|
29
|
+
readonly thyDisabledSwitch: import("@angular/core").InputSignalWithTransform<boolean, string | number | boolean>;
|
|
30
30
|
/**
|
|
31
31
|
* 自定义日期选择的展示文字
|
|
32
32
|
* @default 自定义
|
|
33
33
|
*/
|
|
34
|
-
thyCustomTextValue: string
|
|
34
|
+
readonly thyCustomTextValue: import("@angular/core").InputSignal<string>;
|
|
35
35
|
/**
|
|
36
36
|
* 自定义日期选择中可选择的最小时间
|
|
37
37
|
* @type Date | number
|
|
38
38
|
*/
|
|
39
|
-
thyMinDate:
|
|
39
|
+
readonly thyMinDate: import("@angular/core").InputSignal<number | Date>;
|
|
40
40
|
/**
|
|
41
41
|
* 自定义日期选择中可选择的最大时间
|
|
42
42
|
* @type Date | number
|
|
43
43
|
*/
|
|
44
|
-
thyMaxDate:
|
|
44
|
+
readonly thyMaxDate: import("@angular/core").InputSignal<number | Date>;
|
|
45
45
|
/**
|
|
46
46
|
* 选中的时间段的展示形式,
|
|
47
47
|
* <br/> `custom`形式:`2023-07-01 ~ 2023-07-31`;
|
|
48
48
|
* <br/> `exception`形式:`2023-07-01`,具体展示还与`thyPickerFormat`有关。
|
|
49
49
|
*/
|
|
50
|
-
thyCustomKey:
|
|
50
|
+
readonly thyCustomKey: import("@angular/core").InputSignal<"custom" | "exception">;
|
|
51
51
|
/**
|
|
52
52
|
* 自定义日期展示格式,比如`yyyy年MM月`,只有当`thyCustomKey`值设为`exception`时才会生效
|
|
53
53
|
*/
|
|
54
|
-
thyPickerFormat: string
|
|
54
|
+
readonly thyPickerFormat: import("@angular/core").InputSignal<string>;
|
|
55
55
|
/**
|
|
56
56
|
* 自定义日期禁用日期
|
|
57
57
|
*/
|
|
58
|
-
thyDisabledDate: (d: Date) => boolean
|
|
58
|
+
readonly thyDisabledDate: import("@angular/core").InputSignal<(d: Date) => boolean>;
|
|
59
59
|
/**
|
|
60
60
|
* 区间分隔符,不传值默认为 "~"
|
|
61
61
|
*/
|
|
62
|
-
thySeparator: string
|
|
62
|
+
readonly thySeparator: import("@angular/core").InputSignal<string>;
|
|
63
63
|
separator: Signal<string>;
|
|
64
64
|
/**
|
|
65
65
|
* 自定义日期选择日期回调
|
|
66
66
|
* @type EventEmitter<Date[]>
|
|
67
67
|
*/
|
|
68
|
-
readonly thyOnCalendarChange:
|
|
68
|
+
readonly thyOnCalendarChange: import("@angular/core").OutputEmitterRef<Date[]>;
|
|
69
69
|
selectedDate?: DateRangeItemInfo;
|
|
70
|
-
|
|
70
|
+
private defaultOptionalDateRanges;
|
|
71
|
+
optionalDateRanges: Signal<DateRangeItemInfo[]>;
|
|
71
72
|
selectedDateRange: {
|
|
72
73
|
begin: number;
|
|
73
74
|
end: number;
|
|
@@ -77,7 +78,6 @@ export declare class ThyDateRange implements OnInit, ControlValueAccessor {
|
|
|
77
78
|
writeValue(value: any): void;
|
|
78
79
|
registerOnChange(fn: any): void;
|
|
79
80
|
registerOnTouched(fn: any): void;
|
|
80
|
-
ngOnInit(): void;
|
|
81
81
|
private _setSelectedDateRange;
|
|
82
82
|
private _calculateNewTime;
|
|
83
83
|
private _setPreviousOrNextDate;
|
|
@@ -85,17 +85,5 @@ export declare class ThyDateRange implements OnInit, ControlValueAccessor {
|
|
|
85
85
|
next(): void;
|
|
86
86
|
openOptionalDateRangesMenu(event: Event): void;
|
|
87
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThyDateRange, never>;
|
|
88
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ThyDateRange, "thy-date-range", never, { "thyOptionalDateRanges": { "alias": "thyOptionalDateRanges"; "required": false; }; "thyHiddenMenu": { "alias": "thyHiddenMenu"; "required": false; }; "thyDisabledSwitch": { "alias": "thyDisabledSwitch"; "required": false; }; "thyCustomTextValue": { "alias": "thyCustomTextValue"; "required": false; }; "thyMinDate": { "alias": "thyMinDate"; "required": false; }; "thyMaxDate": { "alias": "thyMaxDate"; "required": false; }; "thyCustomKey": { "alias": "thyCustomKey"; "required": false; }; "thyPickerFormat": { "alias": "thyPickerFormat"; "required": false; }; "thyDisabledDate": { "alias": "thyDisabledDate"; "required": false; }; "thySeparator": { "alias": "thySeparator"; "required": false; }; }, { "thyOnCalendarChange": "thyOnCalendarChange"; }, never, never, true, never>;
|
|
89
|
-
static ngAcceptInputType_thyHiddenMenu:
|
|
90
|
-
/**
|
|
91
|
-
* 禁用左右切换时间段
|
|
92
|
-
* @default false
|
|
93
|
-
*/
|
|
94
|
-
boolean | string | number;
|
|
95
|
-
static ngAcceptInputType_thyDisabledSwitch:
|
|
96
|
-
/**
|
|
97
|
-
* 禁用左右切换时间段
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
boolean | string | number;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ThyDateRange, "thy-date-range", never, { "thyOptionalDateRanges": { "alias": "thyOptionalDateRanges"; "required": false; "isSignal": true; }; "thyHiddenMenu": { "alias": "thyHiddenMenu"; "required": false; "isSignal": true; }; "thyDisabledSwitch": { "alias": "thyDisabledSwitch"; "required": false; "isSignal": true; }; "thyCustomTextValue": { "alias": "thyCustomTextValue"; "required": false; "isSignal": true; }; "thyMinDate": { "alias": "thyMinDate"; "required": false; "isSignal": true; }; "thyMaxDate": { "alias": "thyMaxDate"; "required": false; "isSignal": true; }; "thyCustomKey": { "alias": "thyCustomKey"; "required": false; "isSignal": true; }; "thyPickerFormat": { "alias": "thyPickerFormat"; "required": false; "isSignal": true; }; "thyDisabledDate": { "alias": "thyDisabledDate"; "required": false; "isSignal": true; }; "thySeparator": { "alias": "thySeparator"; "required": false; "isSignal": true; }; }, { "thyOnCalendarChange": "thyOnCalendarChange"; }, never, never, true, never>;
|
|
101
89
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Component, forwardRef, ChangeDetectorRef,
|
|
3
|
+
import { inject, Component, forwardRef, ChangeDetectorRef, input, computed, output, NgModule } from '@angular/core';
|
|
4
4
|
import { NgClass, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -9,7 +9,7 @@ import { ThyRangePickerDirective, ThyDatePickerConfigService, ThyDatePickerForma
|
|
|
9
9
|
import { ThyDropdownMenuComponent, ThyDropdownMenuItemDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownModule } from 'ngx-tethys/dropdown';
|
|
10
10
|
import { injectLocale } from 'ngx-tethys/i18n';
|
|
11
11
|
import { ThyAction } from 'ngx-tethys/action';
|
|
12
|
-
import { getUnixTime, endOfISOWeek, TinyDate, startOfISOWeek, endOfMonth, startOfMonth, addDays, endOfDay, addMonths, isSameDay, startOfDay, addYears
|
|
12
|
+
import { coerceBooleanProperty, getUnixTime, endOfISOWeek, TinyDate, startOfISOWeek, endOfMonth, startOfMonth, addDays, endOfDay, addMonths, isSameDay, startOfDay, addYears } from 'ngx-tethys/util';
|
|
13
13
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
14
14
|
import { ThyNavModule } from 'ngx-tethys/nav';
|
|
15
15
|
|
|
@@ -71,40 +71,63 @@ class ThyDateRange {
|
|
|
71
71
|
this.cdr = inject(ChangeDetectorRef);
|
|
72
72
|
this.locale = injectLocale('dateRange');
|
|
73
73
|
this.datePickerConfigService = inject(ThyDatePickerConfigService);
|
|
74
|
+
/**
|
|
75
|
+
* 自定义可选值列表项
|
|
76
|
+
* @type DateRangeItemInfo[]
|
|
77
|
+
*/
|
|
78
|
+
this.thyOptionalDateRanges = input();
|
|
74
79
|
/**
|
|
75
80
|
* 隐藏下拉选择时间段
|
|
76
81
|
* @default false
|
|
77
82
|
*/
|
|
78
|
-
this.thyHiddenMenu = false;
|
|
83
|
+
this.thyHiddenMenu = input(false, { transform: coerceBooleanProperty });
|
|
79
84
|
/**
|
|
80
85
|
* 禁用左右切换时间段
|
|
81
86
|
* @default false
|
|
82
87
|
*/
|
|
83
|
-
this.thyDisabledSwitch = false;
|
|
88
|
+
this.thyDisabledSwitch = input(false, { transform: coerceBooleanProperty });
|
|
84
89
|
/**
|
|
85
90
|
* 自定义日期选择的展示文字
|
|
86
91
|
* @default 自定义
|
|
87
92
|
*/
|
|
88
|
-
this.thyCustomTextValue = this.locale().custom;
|
|
93
|
+
this.thyCustomTextValue = input(this.locale().custom);
|
|
94
|
+
/**
|
|
95
|
+
* 自定义日期选择中可选择的最小时间
|
|
96
|
+
* @type Date | number
|
|
97
|
+
*/
|
|
98
|
+
this.thyMinDate = input(undefined);
|
|
99
|
+
/**
|
|
100
|
+
* 自定义日期选择中可选择的最大时间
|
|
101
|
+
* @type Date | number
|
|
102
|
+
*/
|
|
103
|
+
this.thyMaxDate = input(undefined);
|
|
89
104
|
/**
|
|
90
105
|
* 选中的时间段的展示形式,
|
|
91
106
|
* <br/> `custom`形式:`2023-07-01 ~ 2023-07-31`;
|
|
92
107
|
* <br/> `exception`形式:`2023-07-01`,具体展示还与`thyPickerFormat`有关。
|
|
93
108
|
*/
|
|
94
|
-
this.thyCustomKey = 'custom';
|
|
109
|
+
this.thyCustomKey = input('custom');
|
|
110
|
+
/**
|
|
111
|
+
* 自定义日期展示格式,比如`yyyy年MM月`,只有当`thyCustomKey`值设为`exception`时才会生效
|
|
112
|
+
*/
|
|
113
|
+
this.thyPickerFormat = input(undefined);
|
|
114
|
+
/**
|
|
115
|
+
* 自定义日期禁用日期
|
|
116
|
+
*/
|
|
117
|
+
this.thyDisabledDate = input(undefined);
|
|
95
118
|
/**
|
|
96
119
|
* 区间分隔符,不传值默认为 "~"
|
|
97
120
|
*/
|
|
98
|
-
this.thySeparator = this.datePickerConfigService.config?.separator;
|
|
121
|
+
this.thySeparator = input(this.datePickerConfigService.config?.separator);
|
|
99
122
|
this.separator = computed(() => {
|
|
100
|
-
return ` ${this.thySeparator?.trim()} `;
|
|
123
|
+
return ` ${this.thySeparator()?.trim()} `;
|
|
101
124
|
});
|
|
102
125
|
/**
|
|
103
126
|
* 自定义日期选择日期回调
|
|
104
127
|
* @type EventEmitter<Date[]>
|
|
105
128
|
*/
|
|
106
|
-
this.thyOnCalendarChange =
|
|
107
|
-
this.
|
|
129
|
+
this.thyOnCalendarChange = output();
|
|
130
|
+
this.defaultOptionalDateRanges = [
|
|
108
131
|
{
|
|
109
132
|
key: 'week',
|
|
110
133
|
text: this.locale().currentWeek,
|
|
@@ -126,22 +149,21 @@ class ThyDateRange {
|
|
|
126
149
|
}
|
|
127
150
|
}
|
|
128
151
|
];
|
|
152
|
+
this.optionalDateRanges = computed(() => {
|
|
153
|
+
if (this.thyOptionalDateRanges()?.length > 0) {
|
|
154
|
+
return this.thyOptionalDateRanges();
|
|
155
|
+
}
|
|
156
|
+
return this.defaultOptionalDateRanges;
|
|
157
|
+
});
|
|
129
158
|
this.onModelChange = () => { };
|
|
130
159
|
this.onModelTouched = () => { };
|
|
131
160
|
}
|
|
132
|
-
/**
|
|
133
|
-
* 自定义可选值列表项
|
|
134
|
-
* @type DateRangeItemInfo[]
|
|
135
|
-
*/
|
|
136
|
-
set thyOptionalDateRanges(value) {
|
|
137
|
-
this.optionalDateRanges = value.length > 0 ? value : this.optionalDateRanges;
|
|
138
|
-
}
|
|
139
161
|
writeValue(value) {
|
|
140
162
|
if (value) {
|
|
141
163
|
this.selectedDate = value;
|
|
142
164
|
}
|
|
143
|
-
else if (this.optionalDateRanges.length > 0) {
|
|
144
|
-
this.selectedDate = this.optionalDateRanges[0];
|
|
165
|
+
else if (this.optionalDateRanges().length > 0) {
|
|
166
|
+
this.selectedDate = this.optionalDateRanges()[0];
|
|
145
167
|
this.onModelChange(this.selectedDate);
|
|
146
168
|
}
|
|
147
169
|
this._setSelectedDateRange();
|
|
@@ -153,7 +175,6 @@ class ThyDateRange {
|
|
|
153
175
|
registerOnTouched(fn) {
|
|
154
176
|
this.onModelTouched = fn;
|
|
155
177
|
}
|
|
156
|
-
ngOnInit() { }
|
|
157
178
|
_setSelectedDateRange() {
|
|
158
179
|
this.selectedDateRange = {
|
|
159
180
|
begin: this.selectedDate.begin,
|
|
@@ -170,14 +191,14 @@ class ThyDateRange {
|
|
|
170
191
|
return {
|
|
171
192
|
begin: getUnixTime(addDays(beginDate, -1 * interval)),
|
|
172
193
|
end: getUnixTime(addDays(endDate, -1 * interval)),
|
|
173
|
-
key: this.thyCustomKey
|
|
194
|
+
key: this.thyCustomKey()
|
|
174
195
|
};
|
|
175
196
|
}
|
|
176
197
|
else {
|
|
177
198
|
return {
|
|
178
199
|
begin: getUnixTime(addDays(beginDate, 1 * interval)),
|
|
179
200
|
end: getUnixTime(addDays(endDate, 1 * interval)),
|
|
180
|
-
key: this.thyCustomKey
|
|
201
|
+
key: this.thyCustomKey()
|
|
181
202
|
};
|
|
182
203
|
}
|
|
183
204
|
}
|
|
@@ -186,7 +207,7 @@ class ThyDateRange {
|
|
|
186
207
|
return {
|
|
187
208
|
begin: getUnixTime(addMonths(beginDate, -1 * interval)),
|
|
188
209
|
end: getUnixTime(endOfDay(addDays(beginDate, -1))),
|
|
189
|
-
key: this.thyCustomKey
|
|
210
|
+
key: this.thyCustomKey()
|
|
190
211
|
};
|
|
191
212
|
}
|
|
192
213
|
else {
|
|
@@ -196,7 +217,7 @@ class ThyDateRange {
|
|
|
196
217
|
end: endIsEndDayOfMonth
|
|
197
218
|
? getUnixTime(endOfMonth(addMonths(endDate, 1 * interval)))
|
|
198
219
|
: getUnixTime(addMonths(endDate, 1 * interval)),
|
|
199
|
-
key: this.thyCustomKey
|
|
220
|
+
key: this.thyCustomKey()
|
|
200
221
|
};
|
|
201
222
|
}
|
|
202
223
|
}
|
|
@@ -205,14 +226,14 @@ class ThyDateRange {
|
|
|
205
226
|
return {
|
|
206
227
|
begin: getUnixTime(addYears(beginDate, -1 * interval)),
|
|
207
228
|
end: getUnixTime(addYears(endDate, -1 * interval)),
|
|
208
|
-
key: this.thyCustomKey
|
|
229
|
+
key: this.thyCustomKey()
|
|
209
230
|
};
|
|
210
231
|
}
|
|
211
232
|
else {
|
|
212
233
|
return {
|
|
213
234
|
begin: getUnixTime(addYears(beginDate, 1 * interval)),
|
|
214
235
|
end: getUnixTime(addYears(endDate, 1 * interval)),
|
|
215
|
-
key: this.thyCustomKey
|
|
236
|
+
key: this.thyCustomKey()
|
|
216
237
|
};
|
|
217
238
|
}
|
|
218
239
|
}
|
|
@@ -223,14 +244,14 @@ class ThyDateRange {
|
|
|
223
244
|
return {
|
|
224
245
|
begin: this.selectedDate.begin - interval,
|
|
225
246
|
end: this.selectedDate.end - interval,
|
|
226
|
-
key: this.thyCustomKey
|
|
247
|
+
key: this.thyCustomKey()
|
|
227
248
|
};
|
|
228
249
|
}
|
|
229
250
|
else {
|
|
230
251
|
return {
|
|
231
252
|
begin: this.selectedDate.begin + interval,
|
|
232
253
|
end: this.selectedDate.end + interval,
|
|
233
|
-
key: this.thyCustomKey
|
|
254
|
+
key: this.thyCustomKey()
|
|
234
255
|
};
|
|
235
256
|
}
|
|
236
257
|
}
|
|
@@ -247,7 +268,7 @@ class ThyDateRange {
|
|
|
247
268
|
this._setPreviousOrNextDate('next');
|
|
248
269
|
}
|
|
249
270
|
openOptionalDateRangesMenu(event) {
|
|
250
|
-
if (this.thyHiddenMenu) {
|
|
271
|
+
if (this.thyHiddenMenu()) {
|
|
251
272
|
return;
|
|
252
273
|
}
|
|
253
274
|
this.thyPopover.open(OptionalDateRanges, {
|
|
@@ -258,14 +279,14 @@ class ThyDateRange {
|
|
|
258
279
|
manualClosure: true,
|
|
259
280
|
originActiveClass: 'thy-date-range-text-active',
|
|
260
281
|
initialState: {
|
|
261
|
-
hiddenMenu: this.thyHiddenMenu,
|
|
262
|
-
optionalDateRanges: this.optionalDateRanges,
|
|
282
|
+
hiddenMenu: this.thyHiddenMenu(),
|
|
283
|
+
optionalDateRanges: this.optionalDateRanges(),
|
|
263
284
|
selectedDate: this.selectedDate,
|
|
264
|
-
minDate: this.thyMinDate,
|
|
265
|
-
maxDate: this.thyMaxDate,
|
|
266
|
-
customValue: this.thyCustomTextValue,
|
|
267
|
-
customKey: this.thyCustomKey,
|
|
268
|
-
disabledDate: this.thyDisabledDate,
|
|
285
|
+
minDate: this.thyMinDate(),
|
|
286
|
+
maxDate: this.thyMaxDate(),
|
|
287
|
+
customValue: this.thyCustomTextValue(),
|
|
288
|
+
customKey: this.thyCustomKey(),
|
|
289
|
+
disabledDate: this.thyDisabledDate(),
|
|
269
290
|
selectedDateRange: (dateRange) => {
|
|
270
291
|
this.onModelChange(dateRange);
|
|
271
292
|
this.selectedDate = dateRange;
|
|
@@ -277,36 +298,12 @@ class ThyDateRange {
|
|
|
277
298
|
});
|
|
278
299
|
}
|
|
279
300
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyDateRange, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
280
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyDateRange, isStandalone: true, selector: "thy-date-range", inputs: { thyOptionalDateRanges: "thyOptionalDateRanges", thyHiddenMenu:
|
|
301
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyDateRange, isStandalone: true, selector: "thy-date-range", inputs: { thyOptionalDateRanges: { classPropertyName: "thyOptionalDateRanges", publicName: "thyOptionalDateRanges", isSignal: true, isRequired: false, transformFunction: null }, thyHiddenMenu: { classPropertyName: "thyHiddenMenu", publicName: "thyHiddenMenu", isSignal: true, isRequired: false, transformFunction: null }, thyDisabledSwitch: { classPropertyName: "thyDisabledSwitch", publicName: "thyDisabledSwitch", isSignal: true, isRequired: false, transformFunction: null }, thyCustomTextValue: { classPropertyName: "thyCustomTextValue", publicName: "thyCustomTextValue", 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 }, thyCustomKey: { classPropertyName: "thyCustomKey", publicName: "thyCustomKey", isSignal: true, isRequired: false, transformFunction: null }, thyPickerFormat: { classPropertyName: "thyPickerFormat", publicName: "thyPickerFormat", isSignal: true, isRequired: false, transformFunction: null }, thyDisabledDate: { classPropertyName: "thyDisabledDate", publicName: "thyDisabledDate", isSignal: true, isRequired: false, transformFunction: null }, thySeparator: { classPropertyName: "thySeparator", publicName: "thySeparator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyOnCalendarChange: "thyOnCalendarChange" }, providers: [INPUT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch()) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu() }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }}{{ separator() }}{{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat: thyPickerFormat() }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu()) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch()) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { 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: ThyDatePickerFormatPipe, name: "thyDatePickerFormat" }] }); }
|
|
281
302
|
}
|
|
282
303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyDateRange, decorators: [{
|
|
283
304
|
type: Component,
|
|
284
|
-
args: [{ selector: 'thy-date-range', providers: [INPUT_CONTROL_VALUE_ACCESSOR], imports: [ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe], template: "<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }}{{ separator() }}{{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat: thyPickerFormat }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n" }]
|
|
285
|
-
}]
|
|
286
|
-
type: Input
|
|
287
|
-
}], thyHiddenMenu: [{
|
|
288
|
-
type: Input,
|
|
289
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
290
|
-
}], thyDisabledSwitch: [{
|
|
291
|
-
type: Input,
|
|
292
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
293
|
-
}], thyCustomTextValue: [{
|
|
294
|
-
type: Input
|
|
295
|
-
}], thyMinDate: [{
|
|
296
|
-
type: Input
|
|
297
|
-
}], thyMaxDate: [{
|
|
298
|
-
type: Input
|
|
299
|
-
}], thyCustomKey: [{
|
|
300
|
-
type: Input
|
|
301
|
-
}], thyPickerFormat: [{
|
|
302
|
-
type: Input
|
|
303
|
-
}], thyDisabledDate: [{
|
|
304
|
-
type: Input
|
|
305
|
-
}], thySeparator: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], thyOnCalendarChange: [{
|
|
308
|
-
type: Output
|
|
309
|
-
}] } });
|
|
305
|
+
args: [{ selector: 'thy-date-range', providers: [INPUT_CONTROL_VALUE_ACCESSOR], imports: [ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe], template: "<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch()) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu() }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }}{{ separator() }}{{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat: thyPickerFormat() }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu()) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch()) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n" }]
|
|
306
|
+
}] });
|
|
310
307
|
|
|
311
308
|
class ThyDateRangeModule {
|
|
312
309
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyDateRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-date-range.mjs","sources":["../../../src/date-range/optional-dates/optional-dates.component.ts","../../../src/date-range/optional-dates/optional-dates.component.html","../../../src/date-range/date-range.component.ts","../../../src/date-range/date-range.component.html","../../../src/date-range/module.ts","../../../src/date-range/date-range.class.ts","../../../src/date-range/ngx-tethys-date-range.ts"],"sourcesContent":["import { Component, OnInit, Signal, inject } from '@angular/core';\nimport { DateRangeItemInfo } from '../date-range.class';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { FormsModule } from '@angular/forms';\nimport { ThyRangePickerDirective } from 'ngx-tethys/date-picker';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport {\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective\n} from 'ngx-tethys/dropdown';\nimport { injectLocale, ThyDateRangeLocale } from 'ngx-tethys/i18n';\n\n/**\n * @private\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'date-range-optional',\n templateUrl: './optional-dates.component.html',\n imports: [\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective,\n ThyIcon,\n ThyRangePickerDirective,\n FormsModule\n ]\n})\nexport class OptionalDateRanges implements OnInit {\n private thyPopover = inject(ThyPopover);\n private locale: Signal<ThyDateRangeLocale> = injectLocale('dateRange');\n\n hiddenMenu = false;\n\n optionalDateRanges: DateRangeItemInfo[];\n\n customValue = this.locale().custom;\n\n customKey: string;\n\n minDate: number | Date;\n\n maxDate: number | Date;\n\n disabledDate: (d: Date) => boolean;\n\n selectedDateRange: (date: DateRangeItemInfo) => void;\n\n calendarChange: (date: Date[]) => void;\n\n selectedDate: DateRangeItemInfo;\n\n ngOnInit() {}\n\n _selectDateRange(dateRange: DateRangeItemInfo) {\n this.selectedDate = dateRange;\n this.selectedDateRange(dateRange);\n this.thyPopover.close();\n }\n\n _selectedCustomDate(date: DateRangeItemInfo) {\n this.selectedDate = {\n begin: date.begin,\n end: date.end,\n key: this.customKey,\n text: this.customValue\n };\n this.selectedDateRange(this.selectedDate);\n }\n}\n","@if (!hiddenMenu) {\n <thy-dropdown-menu thyImmediateRender class=\"thy-date-range-dropdown-menu-container\">\n @for (dateRange of optionalDateRanges; track $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n @if (dateRange.key === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n }\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\">\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n @if (customKey === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n </thy-dropdown-menu>\n}\n","import { ChangeDetectorRef, Component, computed, EventEmitter, forwardRef, inject, Input, OnInit, Output, Signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { DateRangeItemInfo } from './date-range.class';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\n\nimport { NgClass } from '@angular/common';\nimport { ThyAction } from 'ngx-tethys/action';\nimport { ThyDatePickerConfigService, ThyDatePickerFormatPipe } from 'ngx-tethys/date-picker';\nimport { injectLocale, ThyDateRangeLocale } from 'ngx-tethys/i18n';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport {\n addDays,\n addMonths,\n addYears,\n coerceBooleanProperty,\n endOfDay,\n endOfISOWeek,\n endOfMonth,\n getUnixTime,\n isSameDay,\n startOfDay,\n startOfISOWeek,\n startOfMonth,\n TinyDate\n} from 'ngx-tethys/util';\n\nconst allDayTimestamp = 24 * 60 * 60;\n\nconst INPUT_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyDateRange),\n multi: true\n};\n\n/**\n * 预设时间段及自定义时间段选择组件\n * @name thy-date-range\n * @order 10\n */\n@Component({\n selector: 'thy-date-range',\n templateUrl: './date-range.component.html',\n providers: [INPUT_CONTROL_VALUE_ACCESSOR],\n imports: [ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe]\n})\nexport class ThyDateRange implements OnInit, ControlValueAccessor {\n private thyPopover = inject(ThyPopover);\n private cdr = inject(ChangeDetectorRef);\n private locale: Signal<ThyDateRangeLocale> = injectLocale('dateRange');\n private datePickerConfigService = inject(ThyDatePickerConfigService);\n\n /**\n * 自定义可选值列表项\n * @type DateRangeItemInfo[]\n */\n @Input()\n set thyOptionalDateRanges(value: DateRangeItemInfo[]) {\n this.optionalDateRanges = value.length > 0 ? value : this.optionalDateRanges;\n }\n\n /**\n * 隐藏下拉选择时间段\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyHiddenMenu = false;\n\n /**\n * 禁用左右切换时间段\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabledSwitch = false;\n\n /**\n * 自定义日期选择的展示文字\n * @default 自定义\n */\n @Input() thyCustomTextValue = this.locale().custom;\n\n /**\n * 自定义日期选择中可选择的最小时间\n * @type Date | number\n */\n @Input() thyMinDate: Date | number;\n\n /**\n * 自定义日期选择中可选择的最大时间\n * @type Date | number\n */\n @Input() thyMaxDate: Date | number;\n\n /**\n * 选中的时间段的展示形式,\n * <br/> `custom`形式:`2023-07-01 ~ 2023-07-31`;\n * <br/> `exception`形式:`2023-07-01`,具体展示还与`thyPickerFormat`有关。\n */\n @Input() thyCustomKey: 'custom' | 'exception' = 'custom';\n\n /**\n * 自定义日期展示格式,比如`yyyy年MM月`,只有当`thyCustomKey`值设为`exception`时才会生效\n */\n @Input() thyPickerFormat: string;\n\n /**\n * 自定义日期禁用日期\n */\n @Input() thyDisabledDate: (d: Date) => boolean;\n\n /**\n * 区间分隔符,不传值默认为 \"~\"\n */\n @Input() thySeparator: string = this.datePickerConfigService.config?.separator;\n\n separator: Signal<string> = computed(() => {\n return ` ${this.thySeparator?.trim()} `;\n });\n\n /**\n * 自定义日期选择日期回调\n * @type EventEmitter<Date[]>\n */\n @Output() readonly thyOnCalendarChange = new EventEmitter<Date[]>();\n\n public selectedDate?: DateRangeItemInfo;\n\n public optionalDateRanges: DateRangeItemInfo[] = [\n {\n key: 'week',\n text: this.locale().currentWeek,\n begin: getUnixTime(startOfISOWeek(new TinyDate().getTime())),\n end: getUnixTime(endOfISOWeek(new TinyDate().getTime())),\n timestamp: {\n interval: 7,\n unit: 'day'\n }\n },\n {\n key: 'month',\n text: this.locale().currentMonth,\n begin: getUnixTime(startOfMonth(new TinyDate().getTime())),\n end: getUnixTime(endOfMonth(new TinyDate().getTime())),\n timestamp: {\n interval: 1,\n unit: 'month'\n }\n }\n ];\n\n public selectedDateRange: {\n begin: number;\n end: number;\n };\n\n public onModelChange: Function = () => {};\n\n public onModelTouched: Function = () => {};\n\n writeValue(value: any): void {\n if (value) {\n this.selectedDate = value;\n } else if (this.optionalDateRanges.length > 0) {\n this.selectedDate = this.optionalDateRanges[0];\n this.onModelChange(this.selectedDate);\n }\n this._setSelectedDateRange();\n this.cdr.detectChanges();\n }\n\n registerOnChange(fn: any): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onModelTouched = fn;\n }\n\n ngOnInit() {}\n\n private _setSelectedDateRange() {\n this.selectedDateRange = {\n begin: this.selectedDate.begin,\n end: this.selectedDate.end\n };\n }\n\n private _calculateNewTime(type: string) {\n if (this.selectedDate.timestamp) {\n const beginDate = new TinyDate(this.selectedDate.begin * 1000)?.nativeDate;\n const endDate = new TinyDate(this.selectedDate.end * 1000)?.nativeDate;\n const interval = this.selectedDate.timestamp.interval;\n\n if (this.selectedDate.timestamp.unit === 'day') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addDays(beginDate, -1 * interval)),\n end: getUnixTime(addDays(endDate, -1 * interval)),\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: getUnixTime(addDays(beginDate, 1 * interval)),\n end: getUnixTime(addDays(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'month') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addMonths(beginDate, -1 * interval)),\n end: getUnixTime(endOfDay(addDays(beginDate, -1))),\n key: this.thyCustomKey\n };\n } else {\n const endIsEndDayOfMonth = isSameDay(endDate, endOfMonth(endDate));\n return {\n begin: getUnixTime(startOfDay(addDays(endDate, 1))),\n end: endIsEndDayOfMonth\n ? getUnixTime(endOfMonth(addMonths(endDate, 1 * interval)))\n : getUnixTime(addMonths(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'year') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addYears(beginDate, -1 * interval)),\n end: getUnixTime(addYears(endDate, -1 * interval)),\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: getUnixTime(addYears(beginDate, 1 * interval)),\n end: getUnixTime(addYears(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n }\n } else {\n const interval: number = this.selectedDate.end - this.selectedDate.begin + allDayTimestamp;\n if (type === 'previous') {\n return {\n begin: this.selectedDate.begin - interval,\n end: this.selectedDate.end - interval,\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: this.selectedDate.begin + interval,\n end: this.selectedDate.end + interval,\n key: this.thyCustomKey\n };\n }\n }\n }\n\n private _setPreviousOrNextDate(type: string) {\n this.selectedDate = Object.assign({}, this.selectedDate, this._calculateNewTime(type));\n this._setSelectedDateRange();\n this.onModelChange(this.selectedDate);\n }\n\n public previous() {\n this._setPreviousOrNextDate('previous');\n }\n\n public next() {\n this._setPreviousOrNextDate('next');\n }\n\n public openOptionalDateRangesMenu(event: Event) {\n if (this.thyHiddenMenu) {\n return;\n }\n this.thyPopover.open(OptionalDateRanges, {\n origin: event.currentTarget as HTMLElement,\n hasBackdrop: true,\n backdropClass: 'thy-overlay-transparent-backdrop',\n offset: 0,\n manualClosure: true,\n originActiveClass: 'thy-date-range-text-active',\n initialState: {\n hiddenMenu: this.thyHiddenMenu,\n optionalDateRanges: this.optionalDateRanges,\n selectedDate: this.selectedDate,\n minDate: this.thyMinDate,\n maxDate: this.thyMaxDate,\n customValue: this.thyCustomTextValue,\n customKey: this.thyCustomKey,\n disabledDate: this.thyDisabledDate,\n selectedDateRange: (dateRange: DateRangeItemInfo) => {\n this.onModelChange(dateRange);\n this.selectedDate = dateRange;\n },\n calendarChange: (date: Date[]) => {\n this.thyOnCalendarChange.emit(date);\n }\n }\n });\n }\n}\n","<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }}{{ separator() }}{{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat: thyPickerFormat }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThyDateRange } from './date-range.component';\nimport { ThyDropdownModule } from 'ngx-tethys/dropdown';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyDatePickerModule } from 'ngx-tethys/date-picker';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\nimport { ThyNavModule } from 'ngx-tethys/nav';\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ThyDropdownModule,\n ThySharedModule,\n ThyIconModule,\n ThyDatePickerModule,\n ThyNavModule,\n ThyDateRange,\n OptionalDateRanges\n ],\n exports: [ThyDateRange]\n})\nexport class ThyDateRangeModule {}\n","export type AttachTypes = 'day' | 'month' | 'year';\n\n/**\n * @order 20\n */\nexport class DateRangeItemInfo {\n /**\n * 开始时间\n */\n begin?: number;\n\n /**\n * 截止时间\n */\n end?: number;\n\n /**\n * 时间段的唯一标识,如'week'、'month'\n */\n key?: string;\n\n /**\n * 时间段的展示文本\n */\n text?: string;\n\n /**\n * 自定义时间段规则,interval为时间间隔;unit可选值有'day' | 'month' | 'year'\n */\n timestamp?: { interval?: number; unit?: AttachTypes };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcA;;AAEG;MAeU,kBAAkB,CAAA;AAd/B,IAAA,WAAA,GAAA;AAeY,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAA+B,YAAY,CAAC,WAAW,CAAC;QAEtE,IAAU,CAAA,UAAA,GAAG,KAAK;AAIlB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM;AAiCrC;AAjBG,IAAA,QAAQ;AAER,IAAA,gBAAgB,CAAC,SAA4B,EAAA;AACzC,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS;AAC7B,QAAA,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC;AACjC,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;;AAG3B,IAAA,mBAAmB,CAAC,IAAuB,EAAA;QACvC,IAAI,CAAC,YAAY,GAAG;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,G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A,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAZvB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,mBAAmB;YACnB,YAAY;YACZ,YAAY;AACZ,YAAA,kBAAkB,aAEZ,YAAY,CAAA,EAAA,CAAA,CAAA;AAEb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAZvB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,mBAAmB;YACnB,YAAY;YACZ,YAAY;YACZ,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAIb,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,iBAAiB;wBACjB,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,YAAY;wBACZ,YAAY;wBACZ;AACH,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY;AACzB,iBAAA;;;ACrBD;;AAEG;MACU,iBAAiB,CAAA;AAyB7B;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-date-range.mjs","sources":["../../../src/date-range/optional-dates/optional-dates.component.ts","../../../src/date-range/optional-dates/optional-dates.component.html","../../../src/date-range/date-range.component.ts","../../../src/date-range/date-range.component.html","../../../src/date-range/module.ts","../../../src/date-range/date-range.class.ts","../../../src/date-range/ngx-tethys-date-range.ts"],"sourcesContent":["import { Component, OnInit, Signal, inject } from '@angular/core';\nimport { DateRangeItemInfo } from '../date-range.class';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { FormsModule } from '@angular/forms';\nimport { ThyRangePickerDirective } from 'ngx-tethys/date-picker';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport {\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective\n} from 'ngx-tethys/dropdown';\nimport { injectLocale, ThyDateRangeLocale } from 'ngx-tethys/i18n';\n\n/**\n * @private\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'date-range-optional',\n templateUrl: './optional-dates.component.html',\n imports: [\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective,\n ThyIcon,\n ThyRangePickerDirective,\n FormsModule\n ]\n})\nexport class OptionalDateRanges implements OnInit {\n private thyPopover = inject(ThyPopover);\n private locale: Signal<ThyDateRangeLocale> = injectLocale('dateRange');\n\n hiddenMenu = false;\n\n optionalDateRanges: DateRangeItemInfo[];\n\n customValue = this.locale().custom;\n\n customKey: string;\n\n minDate: number | Date;\n\n maxDate: number | Date;\n\n disabledDate: (d: Date) => boolean;\n\n selectedDateRange: (date: DateRangeItemInfo) => void;\n\n calendarChange: (date: Date[]) => void;\n\n selectedDate: DateRangeItemInfo;\n\n ngOnInit() {}\n\n _selectDateRange(dateRange: DateRangeItemInfo) {\n this.selectedDate = dateRange;\n this.selectedDateRange(dateRange);\n this.thyPopover.close();\n }\n\n _selectedCustomDate(date: DateRangeItemInfo) {\n this.selectedDate = {\n begin: date.begin,\n end: date.end,\n key: this.customKey,\n text: this.customValue\n };\n this.selectedDateRange(this.selectedDate);\n }\n}\n","@if (!hiddenMenu) {\n <thy-dropdown-menu thyImmediateRender class=\"thy-date-range-dropdown-menu-container\">\n @for (dateRange of optionalDateRanges; track $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n @if (dateRange.key === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n }\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\">\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n @if (customKey === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n </thy-dropdown-menu>\n}\n","import { ChangeDetectorRef, Component, computed, forwardRef, inject, Signal, input, output } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { DateRangeItemInfo } from './date-range.class';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\n\nimport { NgClass } from '@angular/common';\nimport { ThyAction } from 'ngx-tethys/action';\nimport { ThyDatePickerConfigService, ThyDatePickerFormatPipe } from 'ngx-tethys/date-picker';\nimport { injectLocale, ThyDateRangeLocale } from 'ngx-tethys/i18n';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport {\n addDays,\n addMonths,\n addYears,\n coerceBooleanProperty,\n endOfDay,\n endOfISOWeek,\n endOfMonth,\n getUnixTime,\n isSameDay,\n startOfDay,\n startOfISOWeek,\n startOfMonth,\n TinyDate\n} from 'ngx-tethys/util';\n\nconst allDayTimestamp = 24 * 60 * 60;\n\nconst INPUT_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyDateRange),\n multi: true\n};\n\n/**\n * 预设时间段及自定义时间段选择组件\n * @name thy-date-range\n * @order 10\n */\n@Component({\n selector: 'thy-date-range',\n templateUrl: './date-range.component.html',\n providers: [INPUT_CONTROL_VALUE_ACCESSOR],\n imports: [ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe]\n})\nexport class ThyDateRange implements ControlValueAccessor {\n private thyPopover = inject(ThyPopover);\n private cdr = inject(ChangeDetectorRef);\n private locale: Signal<ThyDateRangeLocale> = injectLocale('dateRange');\n private datePickerConfigService = inject(ThyDatePickerConfigService);\n\n /**\n * 自定义可选值列表项\n * @type DateRangeItemInfo[]\n */\n readonly thyOptionalDateRanges = input<DateRangeItemInfo[]>();\n\n /**\n * 隐藏下拉选择时间段\n * @default false\n */\n readonly thyHiddenMenu = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 禁用左右切换时间段\n * @default false\n */\n readonly thyDisabledSwitch = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 自定义日期选择的展示文字\n * @default 自定义\n */\n readonly thyCustomTextValue = input(this.locale().custom);\n\n /**\n * 自定义日期选择中可选择的最小时间\n * @type Date | number\n */\n readonly thyMinDate = input<Date | number>(undefined);\n\n /**\n * 自定义日期选择中可选择的最大时间\n * @type Date | number\n */\n readonly thyMaxDate = input<Date | number>(undefined);\n\n /**\n * 选中的时间段的展示形式,\n * <br/> `custom`形式:`2023-07-01 ~ 2023-07-31`;\n * <br/> `exception`形式:`2023-07-01`,具体展示还与`thyPickerFormat`有关。\n */\n readonly thyCustomKey = input<'custom' | 'exception'>('custom');\n\n /**\n * 自定义日期展示格式,比如`yyyy年MM月`,只有当`thyCustomKey`值设为`exception`时才会生效\n */\n readonly thyPickerFormat = input<string>(undefined);\n\n /**\n * 自定义日期禁用日期\n */\n readonly thyDisabledDate = input<(d: Date) => boolean>(undefined);\n\n /**\n * 区间分隔符,不传值默认为 \"~\"\n */\n readonly thySeparator = input<string>(this.datePickerConfigService.config?.separator);\n\n separator = computed(() => {\n return ` ${this.thySeparator()?.trim()} `;\n });\n\n /**\n * 自定义日期选择日期回调\n * @type EventEmitter<Date[]>\n */\n readonly thyOnCalendarChange = output<Date[]>();\n\n public selectedDate?: DateRangeItemInfo;\n\n private defaultOptionalDateRanges: DateRangeItemInfo[] = [\n {\n key: 'week',\n text: this.locale().currentWeek,\n begin: getUnixTime(startOfISOWeek(new TinyDate().getTime())),\n end: getUnixTime(endOfISOWeek(new TinyDate().getTime())),\n timestamp: {\n interval: 7,\n unit: 'day'\n }\n },\n {\n key: 'month',\n text: this.locale().currentMonth,\n begin: getUnixTime(startOfMonth(new TinyDate().getTime())),\n end: getUnixTime(endOfMonth(new TinyDate().getTime())),\n timestamp: {\n interval: 1,\n unit: 'month'\n }\n }\n ];\n\n public optionalDateRanges = computed<DateRangeItemInfo[]>(() => {\n if (this.thyOptionalDateRanges()?.length > 0) {\n return this.thyOptionalDateRanges();\n }\n return this.defaultOptionalDateRanges;\n });\n\n public selectedDateRange: {\n begin: number;\n end: number;\n };\n\n public onModelChange: Function = () => {};\n\n public onModelTouched: Function = () => {};\n\n writeValue(value: any): void {\n if (value) {\n this.selectedDate = value;\n } else if (this.optionalDateRanges().length > 0) {\n this.selectedDate = this.optionalDateRanges()[0];\n this.onModelChange(this.selectedDate);\n }\n this._setSelectedDateRange();\n this.cdr.detectChanges();\n }\n\n registerOnChange(fn: any): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onModelTouched = fn;\n }\n\n private _setSelectedDateRange() {\n this.selectedDateRange = {\n begin: this.selectedDate.begin,\n end: this.selectedDate.end\n };\n }\n\n private _calculateNewTime(type: string) {\n if (this.selectedDate.timestamp) {\n const beginDate = new TinyDate(this.selectedDate.begin * 1000)?.nativeDate;\n const endDate = new TinyDate(this.selectedDate.end * 1000)?.nativeDate;\n const interval = this.selectedDate.timestamp.interval;\n\n if (this.selectedDate.timestamp.unit === 'day') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addDays(beginDate, -1 * interval)),\n end: getUnixTime(addDays(endDate, -1 * interval)),\n key: this.thyCustomKey()\n };\n } else {\n return {\n begin: getUnixTime(addDays(beginDate, 1 * interval)),\n end: getUnixTime(addDays(endDate, 1 * interval)),\n key: this.thyCustomKey()\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'month') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addMonths(beginDate, -1 * interval)),\n end: getUnixTime(endOfDay(addDays(beginDate, -1))),\n key: this.thyCustomKey()\n };\n } else {\n const endIsEndDayOfMonth = isSameDay(endDate, endOfMonth(endDate));\n return {\n begin: getUnixTime(startOfDay(addDays(endDate, 1))),\n end: endIsEndDayOfMonth\n ? getUnixTime(endOfMonth(addMonths(endDate, 1 * interval)))\n : getUnixTime(addMonths(endDate, 1 * interval)),\n key: this.thyCustomKey()\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'year') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addYears(beginDate, -1 * interval)),\n end: getUnixTime(addYears(endDate, -1 * interval)),\n key: this.thyCustomKey()\n };\n } else {\n return {\n begin: getUnixTime(addYears(beginDate, 1 * interval)),\n end: getUnixTime(addYears(endDate, 1 * interval)),\n key: this.thyCustomKey()\n };\n }\n }\n } else {\n const interval: number = this.selectedDate.end - this.selectedDate.begin + allDayTimestamp;\n if (type === 'previous') {\n return {\n begin: this.selectedDate.begin - interval,\n end: this.selectedDate.end - interval,\n key: this.thyCustomKey()\n };\n } else {\n return {\n begin: this.selectedDate.begin + interval,\n end: this.selectedDate.end + interval,\n key: this.thyCustomKey()\n };\n }\n }\n }\n\n private _setPreviousOrNextDate(type: string) {\n this.selectedDate = Object.assign({}, this.selectedDate, this._calculateNewTime(type));\n this._setSelectedDateRange();\n this.onModelChange(this.selectedDate);\n }\n\n public previous() {\n this._setPreviousOrNextDate('previous');\n }\n\n public next() {\n this._setPreviousOrNextDate('next');\n }\n\n public openOptionalDateRangesMenu(event: Event) {\n if (this.thyHiddenMenu()) {\n return;\n }\n this.thyPopover.open(OptionalDateRanges, {\n origin: event.currentTarget as HTMLElement,\n hasBackdrop: true,\n backdropClass: 'thy-overlay-transparent-backdrop',\n offset: 0,\n manualClosure: true,\n originActiveClass: 'thy-date-range-text-active',\n initialState: {\n hiddenMenu: this.thyHiddenMenu(),\n optionalDateRanges: this.optionalDateRanges(),\n selectedDate: this.selectedDate,\n minDate: this.thyMinDate(),\n maxDate: this.thyMaxDate(),\n customValue: this.thyCustomTextValue(),\n customKey: this.thyCustomKey(),\n disabledDate: this.thyDisabledDate(),\n selectedDateRange: (dateRange: DateRangeItemInfo) => {\n this.onModelChange(dateRange);\n this.selectedDate = dateRange;\n },\n calendarChange: (date: Date[]) => {\n this.thyOnCalendarChange.emit(date);\n }\n }\n });\n }\n}\n","<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch()) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu() }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }}{{ separator() }}{{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat: thyPickerFormat() }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu()) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch()) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThyDateRange } from './date-range.component';\nimport { ThyDropdownModule } from 'ngx-tethys/dropdown';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyDatePickerModule } from 'ngx-tethys/date-picker';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\nimport { ThyNavModule } from 'ngx-tethys/nav';\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ThyDropdownModule,\n ThySharedModule,\n ThyIconModule,\n ThyDatePickerModule,\n ThyNavModule,\n ThyDateRange,\n OptionalDateRanges\n ],\n exports: [ThyDateRange]\n})\nexport class ThyDateRangeModule {}\n","export type AttachTypes = 'day' | 'month' | 'year';\n\n/**\n * @order 20\n */\nexport class DateRangeItemInfo {\n /**\n * 开始时间\n */\n begin?: number;\n\n /**\n * 截止时间\n */\n end?: number;\n\n /**\n * 时间段的唯一标识,如'week'、'month'\n */\n key?: string;\n\n /**\n * 时间段的展示文本\n */\n text?: string;\n\n /**\n * 自定义时间段规则,interval为时间间隔;unit可选值有'day' | 'month' | 'year'\n */\n timestamp?: { interval?: number; unit?: AttachTypes };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcA;;AAEG;MAeU,kBAAkB,CAAA;AAd/B,IAAA,WAAA,GAAA;AAeY,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAA+B,YAAY,CAAC,WAAW,CAAC;QAEtE,IAAU,CAAA,UAAA,GAAG,KAAK;AAIlB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM;AAiCrC;AAjBG,IAAA,QAAQ;AAER,IAAA,gBAAgB,CAAC,SAA4B,EAAA;AACzC,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS;AAC7B,QAAA,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC;AACjC,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;;AAG3B,IAAA,mBAAmB,CAAC,IAAuB,EAAA;QACvC,IAAI,CAAC,YAAY,GAAG;YAChB,KAAK,EAAE,IAA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AAA;;;ACrBD;;AAEG;MACU,iBAAiB,CAAA;AAyB7B;;AC9BD;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import { DOCUMENT, NgTemplateOutlet, NgClass, CommonModule } from '@angular/comm
|
|
|
5
5
|
import { ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
|
|
6
6
|
import { Overlay } from '@angular/cdk/overlay';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Inject, RendererFactory2, NgZone, Injectable, inject, ElementRef,
|
|
8
|
+
import { Inject, RendererFactory2, NgZone, Injectable, inject, ElementRef, input, Directive, HostBinding, Component, NgModule } from '@angular/core';
|
|
9
9
|
import { fromEvent, ReplaySubject, Subject } from 'rxjs';
|
|
10
10
|
import { ThyIconModule } from 'ngx-tethys/icon';
|
|
11
11
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
@@ -497,13 +497,17 @@ class ThyGuiderTargetDirective {
|
|
|
497
497
|
this.guiderManager = inject(ThyGuiderManager);
|
|
498
498
|
this.el = inject(ElementRef);
|
|
499
499
|
this.ngZone = inject(NgZone);
|
|
500
|
+
/**
|
|
501
|
+
* 标记当前元素对应的新手引导中 step 的 key
|
|
502
|
+
*/
|
|
503
|
+
this.target = input(undefined, { alias: 'thyGuiderTarget' });
|
|
500
504
|
}
|
|
501
505
|
ngOnInit() {
|
|
502
|
-
this.guiderManager.addStepTarget(this.target, this.el.nativeElement);
|
|
506
|
+
this.guiderManager.addStepTarget(this.target(), this.el.nativeElement);
|
|
503
507
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
504
508
|
const { key, guiderRef } = this.guiderManager.getActive();
|
|
505
|
-
if (key === this.target) {
|
|
506
|
-
const index = guiderRef.steps.findIndex(step => step.key === this.target);
|
|
509
|
+
if (key === this.target()) {
|
|
510
|
+
const index = guiderRef.steps.findIndex(step => step.key === this.target());
|
|
507
511
|
this.ngZone.run(() => {
|
|
508
512
|
guiderRef.active(index);
|
|
509
513
|
});
|
|
@@ -516,10 +520,10 @@ class ThyGuiderTargetDirective {
|
|
|
516
520
|
if (guiderRef) {
|
|
517
521
|
guiderRef.close();
|
|
518
522
|
}
|
|
519
|
-
this.guiderManager.removeStepTarget(this.target);
|
|
523
|
+
this.guiderManager.removeStepTarget(this.target());
|
|
520
524
|
}
|
|
521
525
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyGuiderTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
522
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
526
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyGuiderTargetDirective, isStandalone: true, selector: "[thyGuiderTarget]", inputs: { target: { classPropertyName: "target", publicName: "thyGuiderTarget", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["thyGuiderTarget"], ngImport: i0 }); }
|
|
523
527
|
}
|
|
524
528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyGuiderTargetDirective, decorators: [{
|
|
525
529
|
type: Directive,
|
|
@@ -527,10 +531,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
527
531
|
selector: '[thyGuiderTarget]',
|
|
528
532
|
exportAs: 'thyGuiderTarget'
|
|
529
533
|
}]
|
|
530
|
-
}]
|
|
531
|
-
type: Input,
|
|
532
|
-
args: ['thyGuiderTarget']
|
|
533
|
-
}] } });
|
|
534
|
+
}] });
|
|
534
535
|
|
|
535
536
|
/**
|
|
536
537
|
* @private
|