ngx-tethys 16.1.7 → 16.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/date-picker/abstract-picker.component.d.ts +11 -2
  3. package/date-picker/abstract-picker.directive.d.ts +1 -0
  4. package/date-picker/date-helper.service.d.ts +0 -3
  5. package/date-picker/date-picker.config.d.ts +2 -0
  6. package/date-picker/lib/date/date-table.component.d.ts +3 -1
  7. package/date-picker/lib/popups/date-popup.component.d.ts +6 -2
  8. package/date-picker/standard-types.d.ts +7 -0
  9. package/esm2022/cascader/cascader.component.mjs +2 -1
  10. package/esm2022/date-picker/abstract-picker.component.mjs +15 -2
  11. package/esm2022/date-picker/abstract-picker.directive.mjs +6 -1
  12. package/esm2022/date-picker/date-helper.service.mjs +1 -4
  13. package/esm2022/date-picker/date-picker.component.mjs +3 -3
  14. package/esm2022/date-picker/date-picker.config.mjs +2 -1
  15. package/esm2022/date-picker/lib/date/date-table.component.mjs +9 -6
  16. package/esm2022/date-picker/lib/popups/date-popup.component.mjs +21 -2
  17. package/esm2022/date-picker/month-picker.component.mjs +3 -3
  18. package/esm2022/date-picker/range-picker.component.mjs +3 -3
  19. package/esm2022/date-picker/standard-types.mjs +1 -1
  20. package/esm2022/date-picker/week-picker.component.mjs +3 -3
  21. package/esm2022/date-picker/year-picker.component.mjs +3 -3
  22. package/esm2022/version.mjs +2 -2
  23. package/fesm2022/ngx-tethys-cascader.mjs +1 -0
  24. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  25. package/fesm2022/ngx-tethys-date-picker.mjs +56 -20
  26. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  27. package/fesm2022/ngx-tethys.mjs +1 -1
  28. package/fesm2022/ngx-tethys.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/schematics/version.d.ts +1 -1
  31. package/schematics/version.js +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [16.1.9](https://github.com/atinc/ngx-tethys/compare/16.1.8...16.1.9) (2023-11-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * **date-picker:** THY_DATE_PICKER_CONFIG support weekStartsOn and set default value 1 #INFR-10198 ([#2882](https://github.com/atinc/ngx-tethys/issues/2882)) ([8377887](https://github.com/atinc/ngx-tethys/commit/837788769c8cbeabbad39bfff23033739b1b751c)), closes [#INFR-10198](https://github.com/atinc/ngx-tethys/issues/INFR-10198) [#INFR-10198](https://github.com/atinc/ngx-tethys/issues/INFR-10198)
11
+
12
+
13
+
14
+ ## [16.1.8](https://github.com/atinc/ngx-tethys/compare/16.1.7...16.1.8) (2023-11-02)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **cascader:** reset selectionModel when writeValue #INFR-10101 ([#2883](https://github.com/atinc/ngx-tethys/issues/2883)) ([56496fd](https://github.com/atinc/ngx-tethys/commit/56496fd31cc62bd113543f34cb2bad2b2f0f5d6d)), closes [#INFR-10101](https://github.com/atinc/ngx-tethys/issues/INFR-10101)
20
+
21
+
22
+ ### Features
23
+
24
+ * **date-picker:** add event thyDateChange and deprecated shortcutValueChange #INFR-9829 ([#2865](https://github.com/atinc/ngx-tethys/issues/2865)) ([adf0f6b](https://github.com/atinc/ngx-tethys/commit/adf0f6b6fb05993ad811b62a13d64d9da86e46ee)), closes [#INFR-9829](https://github.com/atinc/ngx-tethys/issues/INFR-9829)
25
+
26
+
27
+
5
28
  ## [16.1.7](https://github.com/atinc/ngx-tethys/compare/16.1.6...16.1.7) (2023-11-02)
6
29
 
7
30
 
@@ -5,7 +5,7 @@ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleCh
5
5
  import { ControlValueAccessor } from '@angular/forms';
6
6
  import { CompatibleValue, RangeAdvancedValue } from './inner-types';
7
7
  import { ThyPickerComponent } from './picker.component';
8
- import { CompatibleDate, DateEntry, DisabledDateFn, ThyDateRangeEntry, ThyPanelMode, ThyShortcutPosition, CompatiblePresets, ThyShortcutValueChange, ThyDateGranularity } from './standard-types';
8
+ import { CompatibleDate, DateEntry, DisabledDateFn, ThyDateRangeEntry, ThyPanelMode, ThyShortcutPosition, CompatiblePresets, ThyShortcutValueChange, ThyDateGranularity, ThyDateChangeEvent } from './standard-types';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
11
11
  * @private
@@ -99,7 +99,15 @@ export declare abstract class AbstractPickerComponent extends TabIndexDisabledCo
99
99
  * @type ThyShortcutPreset[]
100
100
  */
101
101
  set thyShortcutPresets(presets: CompatiblePresets);
102
+ /**
103
+ * 已废弃,请使用 thyDateChange
104
+ * @deprecated please use thyDateChange
105
+ */
102
106
  readonly thyShortcutValueChange: EventEmitter<ThyShortcutValueChange>;
107
+ /**
108
+ * 日期变化的回调
109
+ */
110
+ readonly thyDateChange: EventEmitter<ThyDateChangeEvent>;
103
111
  readonly thyOpenChange: EventEmitter<boolean>;
104
112
  picker: ThyPickerComponent;
105
113
  /**
@@ -125,6 +133,7 @@ export declare abstract class AbstractPickerComponent extends TabIndexDisabledCo
125
133
  ngOnInit(): void;
126
134
  isFlexible(): void;
127
135
  onShortcutValueChange(event: ThyShortcutValueChange): void;
136
+ onDateValueChange(event: ThyDateChangeEvent): void;
128
137
  ngOnChanges(changes: SimpleChanges): void;
129
138
  ngOnDestroy(): void;
130
139
  closeOverlay(): void;
@@ -142,5 +151,5 @@ export declare abstract class AbstractPickerComponent extends TabIndexDisabledCo
142
151
  private setDefaultPlaceHolder;
143
152
  setValue(value: CompatibleDate): void;
144
153
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractPickerComponent, never>;
145
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractPickerComponent, never, never, { "thyMode": { "alias": "thyMode"; "required": false; }; "thyAllowClear": { "alias": "thyAllowClear"; "required": false; }; "thyAutoFocus": { "alias": "thyAutoFocus"; "required": false; }; "thyOpen": { "alias": "thyOpen"; "required": false; }; "thyDisabledDate": { "alias": "thyDisabledDate"; "required": false; }; "thyMinDate": { "alias": "thyMinDate"; "required": false; }; "thyMaxDate": { "alias": "thyMaxDate"; "required": false; }; "thyPlaceHolder": { "alias": "thyPlaceHolder"; "required": false; }; "thyReadonly": { "alias": "thyReadonly"; "required": false; }; "thyOriginClassName": { "alias": "thyOriginClassName"; "required": false; }; "thyPanelClassName": { "alias": "thyPanelClassName"; "required": false; }; "thySize": { "alias": "thySize"; "required": false; }; "thyFormat": { "alias": "thyFormat"; "required": false; }; "thyAutoStartAndEnd": { "alias": "thyAutoStartAndEnd"; "required": false; }; "thyDefaultPickerValue": { "alias": "thyDefaultPickerValue"; "required": false; }; "thySuffixIcon": { "alias": "thySuffixIcon"; "required": false; }; "thyShowShortcut": { "alias": "thyShowShortcut"; "required": false; }; "thyShortcutPosition": { "alias": "thyShortcutPosition"; "required": false; }; "thyShortcutPresets": { "alias": "thyShortcutPresets"; "required": false; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; }, { "thyShortcutValueChange": "thyShortcutValueChange"; "thyOpenChange": "thyOpenChange"; }, never, never, false, never>;
154
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractPickerComponent, never, never, { "thyMode": { "alias": "thyMode"; "required": false; }; "thyAllowClear": { "alias": "thyAllowClear"; "required": false; }; "thyAutoFocus": { "alias": "thyAutoFocus"; "required": false; }; "thyOpen": { "alias": "thyOpen"; "required": false; }; "thyDisabledDate": { "alias": "thyDisabledDate"; "required": false; }; "thyMinDate": { "alias": "thyMinDate"; "required": false; }; "thyMaxDate": { "alias": "thyMaxDate"; "required": false; }; "thyPlaceHolder": { "alias": "thyPlaceHolder"; "required": false; }; "thyReadonly": { "alias": "thyReadonly"; "required": false; }; "thyOriginClassName": { "alias": "thyOriginClassName"; "required": false; }; "thyPanelClassName": { "alias": "thyPanelClassName"; "required": false; }; "thySize": { "alias": "thySize"; "required": false; }; "thyFormat": { "alias": "thyFormat"; "required": false; }; "thyAutoStartAndEnd": { "alias": "thyAutoStartAndEnd"; "required": false; }; "thyDefaultPickerValue": { "alias": "thyDefaultPickerValue"; "required": false; }; "thySuffixIcon": { "alias": "thySuffixIcon"; "required": false; }; "thyShowShortcut": { "alias": "thyShowShortcut"; "required": false; }; "thyShortcutPosition": { "alias": "thyShortcutPosition"; "required": false; }; "thyShortcutPresets": { "alias": "thyShortcutPresets"; "required": false; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; }, { "thyShortcutValueChange": "thyShortcutValueChange"; "thyDateChange": "thyDateChange"; "thyOpenChange": "thyOpenChange"; }, never, never, false, never>;
146
155
  }
@@ -61,6 +61,7 @@ export declare abstract class PickerDirective extends AbstractPickerComponent im
61
61
  private destroy$;
62
62
  private el;
63
63
  readonly $click: Observable<boolean>;
64
+ takeUntilDestroyed: import("rxjs").MonoTypeOperatorFunction<unknown>;
64
65
  ngOnInit(): void;
65
66
  private getInitialState;
66
67
  private openOverlay;
@@ -1,4 +1,3 @@
1
- import { WeekDayIndex } from 'ngx-tethys/util';
2
1
  import * as i0 from "@angular/core";
3
2
  export declare function DATE_HELPER_SERVICE_FACTORY(): DateHelperService;
4
3
  /**
@@ -7,14 +6,12 @@ export declare function DATE_HELPER_SERVICE_FACTORY(): DateHelperService;
7
6
  export declare abstract class DateHelperService {
8
7
  relyOnDatePipe: boolean;
9
8
  abstract getISOWeek(date: Date): number;
10
- abstract getFirstDayOfWeek(): WeekDayIndex;
11
9
  abstract format(date: Date, formatStr: string): string;
12
10
  static ɵfac: i0.ɵɵFactoryDeclaration<DateHelperService, never>;
13
11
  static ɵprov: i0.ɵɵInjectableDeclaration<DateHelperService>;
14
12
  }
15
13
  export declare class DateHelperByDatePipe extends DateHelperService {
16
14
  getISOWeek(date: Date): number;
17
- getFirstDayOfWeek(): WeekDayIndex;
18
15
  format(date: Date | null, formatStr: string): string;
19
16
  transCompatFormat(format: string): string;
20
17
  }
@@ -1,10 +1,12 @@
1
1
  import { InjectionToken } from '@angular/core';
2
+ import { WeekDayIndex } from 'ngx-tethys/util';
2
3
  import { CompatiblePresets, ThyShortcutPosition } from './standard-types';
3
4
  export interface ThyDatePickerConfig {
4
5
  shortcutPosition: ThyShortcutPosition;
5
6
  shortcutDatePresets: CompatiblePresets;
6
7
  shortcutRangesPresets: CompatiblePresets;
7
8
  showShortcut: boolean;
9
+ weekStartsOn: WeekDayIndex;
8
10
  }
9
11
  export declare const DEFAULT_DATE_PICKER_CONFIG: ThyDatePickerConfig;
10
12
  export declare const THY_DATE_PICKER_CONFIG: InjectionToken<ThyDatePickerConfig>;
@@ -3,14 +3,16 @@ import { EventEmitter, OnChanges } from '@angular/core';
3
3
  import { DateHelperService } from '../../date-helper.service';
4
4
  import { DateCell, DateBodyRow } from './types';
5
5
  import { CalendarTable } from '../calendar/calendar-table.component';
6
+ import { ThyDatePickerConfigService } from '../../date-picker.service';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
8
9
  * @private
9
10
  */
10
11
  export declare class DateTableComponent extends CalendarTable implements OnChanges {
11
12
  private dateHelper;
13
+ private datePickerConfigService;
12
14
  readonly dayHover: EventEmitter<TinyDate>;
13
- constructor(dateHelper: DateHelperService);
15
+ constructor(dateHelper: DateHelperService, datePickerConfigService: ThyDatePickerConfigService);
14
16
  private chooseDate;
15
17
  makeHeadRow(): DateCell[];
16
18
  private getVeryShortWeekFormat;
@@ -2,7 +2,7 @@ import { FunctionProp, TinyDate } from 'ngx-tethys/util';
2
2
  import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
3
3
  import { ThyDatePickerConfigService } from '../../date-picker.service';
4
4
  import { CompatibleValue, DatePickerFlexibleTab, RangeAdvancedValue, RangePartType } from '../../inner-types';
5
- import { CompatibleDate, CompatiblePresets, DisabledDateFn, SupportTimeOptions, ThyDateGranularity, ThyPanelMode, ThyShortcutPosition, ThyShortcutPreset, ThyShortcutValueChange } from '../../standard-types';
5
+ import { CompatibleDate, CompatiblePresets, DisabledDateFn, SupportTimeOptions, ThyDateChangeEvent, ThyDateGranularity, ThyPanelMode, ThyShortcutPosition, ThyShortcutPreset, ThyShortcutValueChange } from '../../standard-types';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * @private
@@ -40,7 +40,11 @@ export declare class DatePopupComponent implements OnChanges, OnInit {
40
40
  readonly valueChange: EventEmitter<CompatibleValue | RangeAdvancedValue>;
41
41
  readonly resultOk: EventEmitter<void>;
42
42
  readonly showTimePickerChange: EventEmitter<boolean>;
43
+ /**
44
+ * @deprecated
45
+ */
43
46
  readonly shortcutValueChange: EventEmitter<ThyShortcutValueChange>;
47
+ readonly dateValueChange: EventEmitter<ThyDateChangeEvent>;
44
48
  prefixCls: string;
45
49
  showTimePicker: boolean;
46
50
  timeOptions: SupportTimeOptions | SupportTimeOptions[] | null;
@@ -92,5 +96,5 @@ export declare class DatePopupComponent implements OnChanges, OnInit {
92
96
  shortcutSetValue(shortcutPresets: ThyShortcutPreset): void;
93
97
  trackByFn(index: number): number;
94
98
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePopupComponent, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<DatePopupComponent, "date-popup", ["datePopup"], { "isRange": { "alias": "isRange"; "required": false; }; "showWeek": { "alias": "showWeek"; "required": false; }; "format": { "alias": "format"; "required": false; }; "disabledDate": { "alias": "disabledDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "showToday": { "alias": "showToday"; "required": false; }; "showTime": { "alias": "showTime"; "required": false; }; "mustShowTime": { "alias": "mustShowTime"; "required": false; }; "dateRender": { "alias": "dateRender"; "required": false; }; "className": { "alias": "className"; "required": false; }; "panelMode": { "alias": "panelMode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultPickerValue": { "alias": "defaultPickerValue"; "required": false; }; "showShortcut": { "alias": "showShortcut"; "required": false; }; "shortcutPresets": { "alias": "shortcutPresets"; "required": false; }; "shortcutPosition": { "alias": "shortcutPosition"; "required": false; }; "flexible": { "alias": "flexible"; "required": false; }; "flexibleDateGranularity": { "alias": "flexibleDateGranularity"; "required": false; }; }, { "panelModeChange": "panelModeChange"; "calendarChange": "calendarChange"; "valueChange": "valueChange"; "resultOk": "resultOk"; "showTimePickerChange": "showTimePickerChange"; "shortcutValueChange": "shortcutValueChange"; }, never, never, true, never>;
99
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatePopupComponent, "date-popup", ["datePopup"], { "isRange": { "alias": "isRange"; "required": false; }; "showWeek": { "alias": "showWeek"; "required": false; }; "format": { "alias": "format"; "required": false; }; "disabledDate": { "alias": "disabledDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "showToday": { "alias": "showToday"; "required": false; }; "showTime": { "alias": "showTime"; "required": false; }; "mustShowTime": { "alias": "mustShowTime"; "required": false; }; "dateRender": { "alias": "dateRender"; "required": false; }; "className": { "alias": "className"; "required": false; }; "panelMode": { "alias": "panelMode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultPickerValue": { "alias": "defaultPickerValue"; "required": false; }; "showShortcut": { "alias": "showShortcut"; "required": false; }; "shortcutPresets": { "alias": "shortcutPresets"; "required": false; }; "shortcutPosition": { "alias": "shortcutPosition"; "required": false; }; "flexible": { "alias": "flexible"; "required": false; }; "flexibleDateGranularity": { "alias": "flexibleDateGranularity"; "required": false; }; }, { "panelModeChange": "panelModeChange"; "calendarChange": "calendarChange"; "valueChange": "valueChange"; "resultOk": "resultOk"; "showTimePickerChange": "showTimePickerChange"; "shortcutValueChange": "shortcutValueChange"; "dateValueChange": "dateValueChange"; }, never, never, true, never>;
96
100
  }
@@ -43,10 +43,17 @@ export interface ThyShortcutPreset {
43
43
  value?: ThyShortcutValue | [ThyShortcutValue, ThyShortcutValue];
44
44
  disabled?: boolean;
45
45
  }
46
+ /**
47
+ * @deprecated
48
+ */
46
49
  export interface ThyShortcutValueChange {
47
50
  value: CompatibleValue;
48
51
  triggerPresets: ThyShortcutPreset;
49
52
  }
53
+ export interface ThyDateChangeEvent {
54
+ value: CompatibleValue;
55
+ triggerPreset?: ThyShortcutPreset;
56
+ }
50
57
  /**
51
58
  * @deprecated please use ThyPanelMode
52
59
  */