ngx-tethys 16.1.1 → 16.1.3

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 (84) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/cascader/cascader.component.d.ts +2 -4
  3. package/checkbox/styles/checkbox.scss +6 -0
  4. package/color-picker/color-picker.component.d.ts +18 -4
  5. package/color-picker/styles/color-picker.scss +9 -0
  6. package/core/behaviors/index.d.ts +1 -0
  7. package/core/behaviors/mixin.d.ts +5 -0
  8. package/date-picker/abstract-picker.component.d.ts +2 -4
  9. package/esm2022/cascader/cascader.component.mjs +3 -4
  10. package/esm2022/checkbox/checkbox.component.mjs +5 -4
  11. package/esm2022/color-picker/color-picker.component.mjs +30 -5
  12. package/esm2022/core/behaviors/index.mjs +2 -1
  13. package/esm2022/core/behaviors/mixin.mjs +5 -0
  14. package/esm2022/core/behaviors/tabindex.mjs +1 -1
  15. package/esm2022/date-picker/abstract-picker.component.mjs +3 -4
  16. package/esm2022/date-picker/lib/popups/date-popup.component.mjs +2 -5
  17. package/esm2022/form/form-validator.service.mjs +19 -2
  18. package/esm2022/form/form.class.mjs +1 -1
  19. package/esm2022/form/form.directive.mjs +5 -3
  20. package/esm2022/image/image.directive.mjs +4 -3
  21. package/esm2022/input-number/input-number.component.mjs +4 -4
  22. package/esm2022/radio/button/radio-button.component.mjs +5 -3
  23. package/esm2022/radio/group/radio-group.component.mjs +5 -3
  24. package/esm2022/radio/radio.component.mjs +6 -4
  25. package/esm2022/rate/rate.component.mjs +22 -16
  26. package/esm2022/select/custom-select/custom-select.component.mjs +3 -4
  27. package/esm2022/select/select.component.mjs +3 -4
  28. package/esm2022/shared/base-form-check.component.mjs +11 -5
  29. package/esm2022/shared/select/select-control/select-control.component.mjs +4 -2
  30. package/esm2022/slider/slider.component.mjs +24 -17
  31. package/esm2022/switch/switch.component.mjs +17 -23
  32. package/esm2022/tree-select/tree-select.component.mjs +3 -4
  33. package/esm2022/version.mjs +2 -2
  34. package/fesm2022/ngx-tethys-cascader.mjs +2 -3
  35. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  36. package/fesm2022/ngx-tethys-checkbox.mjs +4 -3
  37. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys-color-picker.mjs +30 -5
  39. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  40. package/fesm2022/ngx-tethys-core.mjs +3 -1
  41. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-date-picker.mjs +3 -7
  43. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  44. package/fesm2022/ngx-tethys-form.mjs +22 -3
  45. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  46. package/fesm2022/ngx-tethys-image.mjs +3 -2
  47. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  48. package/fesm2022/ngx-tethys-input-number.mjs +3 -3
  49. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  50. package/fesm2022/ngx-tethys-radio.mjs +13 -7
  51. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  52. package/fesm2022/ngx-tethys-rate.mjs +21 -15
  53. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  54. package/fesm2022/ngx-tethys-select.mjs +3 -5
  55. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  56. package/fesm2022/ngx-tethys-shared.mjs +13 -5
  57. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  58. package/fesm2022/ngx-tethys-slider.mjs +24 -17
  59. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  60. package/fesm2022/ngx-tethys-switch.mjs +16 -22
  61. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  62. package/fesm2022/ngx-tethys-tree-select.mjs +2 -3
  63. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  64. package/fesm2022/ngx-tethys.mjs +1 -1
  65. package/fesm2022/ngx-tethys.mjs.map +1 -1
  66. package/form/form-validator.service.d.ts +9 -4
  67. package/form/form.class.d.ts +11 -0
  68. package/form/styles/mixin.scss +8 -5
  69. package/image/styles/image.scss +4 -0
  70. package/input-number/input-number.component.d.ts +2 -3
  71. package/package.json +7 -7
  72. package/radio/styles/radio.scss +15 -1
  73. package/rate/rate.component.d.ts +5 -2
  74. package/rate/styles/rate.scss +51 -45
  75. package/schematics/version.d.ts +1 -1
  76. package/schematics/version.js +1 -1
  77. package/select/custom-select/custom-select.component.d.ts +2 -4
  78. package/select/select.component.d.ts +2 -4
  79. package/shared/base-form-check.component.d.ts +4 -2
  80. package/slider/slider.component.d.ts +5 -2
  81. package/slider/slider.scss +9 -0
  82. package/switch/styles/switch.scss +6 -0
  83. package/switch/switch.component.d.ts +7 -6
  84. package/tree-select/tree-select.component.d.ts +2 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
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.3](https://github.com/atinc/ngx-tethys/compare/16.1.2...16.1.3) (2023-09-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **datePicker:** thy-year-picker does not have a default time, when i… ([#2836](https://github.com/atinc/ngx-tethys/issues/2836)) ([367c436](https://github.com/atinc/ngx-tethys/commit/367c436728e762363b64e894ab2f31945b2992e4)), closes [#INFR-9345](https://github.com/atinc/ngx-tethys/issues/INFR-9345)
11
+ * **shared:** fix select control cursor error #INFR-9813 ([9cd8d84](https://github.com/atinc/ngx-tethys/commit/9cd8d84369dc67d654dcdda5f65508f63f303f23)), closes [#INFR-9813](https://github.com/atinc/ngx-tethys/issues/INFR-9813)
12
+
13
+
14
+ ### Features
15
+
16
+ * **form:** auto focus first error element when form validate #INFR-8244 ([3803ee7](https://github.com/atinc/ngx-tethys/commit/3803ee7fc647028d789d4b5602fc1a91dedc11cc)), closes [#INFR-8244](https://github.com/atinc/ngx-tethys/issues/INFR-8244)
17
+ * **input-number:** #INFR-7140 restrict decimal places input  ([#2841](https://github.com/atinc/ngx-tethys/issues/2841)) ([561b916](https://github.com/atinc/ngx-tethys/commit/561b916362968d6b9609e68baeb4467ac23c008e)), closes [#INFR-7140](https://github.com/atinc/ngx-tethys/issues/INFR-7140)
18
+ * support focus(tabindex) for colorPicker, slider, rate, radio, checkbox and switch #INFR-9451 ([09c7f1e](https://github.com/atinc/ngx-tethys/commit/09c7f1ee253f85ca28224f04fd7019dcad01703f)), closes [#INFR-9451](https://github.com/atinc/ngx-tethys/issues/INFR-9451)
19
+
20
+
21
+
22
+ ## [16.1.2](https://github.com/atinc/ngx-tethys/compare/16.1.1...16.1.2) (2023-09-05)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **image:** set default cursor when thyDisablePreview is true #INFR-9513 ([#2833](https://github.com/atinc/ngx-tethys/issues/2833)) ([77a1c02](https://github.com/atinc/ngx-tethys/commit/77a1c024e9e0ac8f3c345e71bf1f5607b2e8cdd0)), closes [#INFR-9513](https://github.com/atinc/ngx-tethys/issues/INFR-9513)
28
+
29
+
30
+ ### Features
31
+
32
+ * **cdk:** rename useAction and useAsync to actionBehavior and asyncBehavior #INFR-9544 ([#2834](https://github.com/atinc/ngx-tethys/issues/2834)) ([414f1a9](https://github.com/atinc/ngx-tethys/commit/414f1a918641153a33bab84dada6091a905b42a0)), closes [#INFR-9544](https://github.com/atinc/ngx-tethys/issues/INFR-9544)
33
+
34
+
35
+
5
36
  ## [16.1.1](https://github.com/atinc/ngx-tethys/compare/16.1.0-next.0...16.1.1) (2023-09-01)
6
37
 
7
38
 
@@ -1,4 +1,4 @@
1
- import { AbstractControlValueAccessor, Constructor, ThyCanDisable, ThyHasTabIndex } from 'ngx-tethys/core';
1
+ import { TabIndexDisabledControlValueAccessorMixin } from 'ngx-tethys/core';
2
2
  import { SelectControlSize, SelectOptionBase } from 'ngx-tethys/shared';
3
3
  import { SelectionModel } from '@angular/cdk/collections';
4
4
  import { CdkConnectedOverlay, ConnectedOverlayPositionChange, ConnectionPositionPair, ViewportRuler } from '@angular/cdk/overlay';
@@ -6,12 +6,11 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryLi
6
6
  import { ControlValueAccessor } from '@angular/forms';
7
7
  import { ThyCascaderExpandTrigger, ThyCascaderOption, ThyCascaderSearchOption, ThyCascaderTriggerType } from './types';
8
8
  import * as i0 from "@angular/core";
9
- declare const _MixinBase: Constructor<ThyHasTabIndex> & Constructor<ThyCanDisable> & typeof AbstractControlValueAccessor;
10
9
  /**
11
10
  * 级联选择菜单
12
11
  * @name thy-cascader
13
12
  */
14
- export declare class ThyCascaderComponent extends _MixinBase implements ControlValueAccessor, OnInit, OnDestroy {
13
+ export declare class ThyCascaderComponent extends TabIndexDisabledControlValueAccessorMixin implements ControlValueAccessor, OnInit, OnDestroy {
15
14
  private cdr;
16
15
  private viewPortRuler;
17
16
  elementRef: ElementRef;
@@ -263,4 +262,3 @@ export declare class ThyCascaderComponent extends _MixinBase implements ControlV
263
262
  static ɵfac: i0.ɵɵFactoryDeclaration<ThyCascaderComponent, never>;
264
263
  static ɵcmp: i0.ɵɵComponentDeclaration<ThyCascaderComponent, "thy-cascader,[thy-cascader]", never, { "thyValueProperty": { "alias": "thyValueProperty"; "required": false; }; "thyLabelProperty": { "alias": "thyLabelProperty"; "required": false; }; "thyPlaceholder": { "alias": "thyPlaceholder"; "required": false; }; "thySize": { "alias": "thySize"; "required": false; }; "thyOptions": { "alias": "thyOptions"; "required": false; }; "thyChangeOn": { "alias": "thyChangeOn"; "required": false; }; "thyChangeOnSelect": { "alias": "thyChangeOnSelect"; "required": false; }; "thyShowInput": { "alias": "thyShowInput"; "required": false; }; "thyLabelRender": { "alias": "thyLabelRender"; "required": false; }; "thyLoadData": { "alias": "thyLoadData"; "required": false; }; "thyTriggerAction": { "alias": "thyTriggerAction"; "required": false; }; "thyExpandTriggerAction": { "alias": "thyExpandTriggerAction"; "required": false; }; "thyMenuStyle": { "alias": "thyMenuStyle"; "required": false; }; "thyMenuClassName": { "alias": "thyMenuClassName"; "required": false; }; "thyColumnClassName": { "alias": "thyColumnClassName"; "required": false; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; "thyEmptyStateText": { "alias": "thyEmptyStateText"; "required": false; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; }; "thyMaxTagCount": { "alias": "thyMaxTagCount"; "required": false; }; "thyIsOnlySelectLeaf": { "alias": "thyIsOnlySelectLeaf"; "required": false; }; "thyShowSearch": { "alias": "thyShowSearch"; "required": false; }; }, { "thyChange": "thyChange"; "thySelectionChange": "thySelectionChange"; "thySelect": "thySelect"; "thyDeselect": "thyDeselect"; "thyClear": "thyClear"; }, never, never, true, never>;
265
264
  }
266
- export {};
@@ -8,4 +8,10 @@
8
8
  cursor: variables.$disabled-cursor;
9
9
  }
10
10
  }
11
+
12
+ .form-check-input:not(.disabled) {
13
+ &:focus {
14
+ border: 1px solid variables.$primary;
15
+ }
16
+ }
11
17
  }
@@ -5,13 +5,21 @@ import { ThyOverlayDirectiveBase, ThyPlacement, ThyOverlayTrigger } from 'ngx-te
5
5
  import { ThyPopover, ThyPopoverRef } from 'ngx-tethys/popover';
6
6
  import { ThyColorPickerPanelComponent } from './color-picker-panel.component';
7
7
  import * as i0 from "@angular/core";
8
+ export declare class OverlayBase extends ThyOverlayDirectiveBase {
9
+ protected zone: NgZone;
10
+ protected elementRef: ElementRef<HTMLElement>;
11
+ constructor(zone: NgZone, elementRef: ElementRef<HTMLElement>, platform: Platform, focusMonitor: FocusMonitor);
12
+ show(): void;
13
+ hide(): void;
14
+ }
15
+ declare const _BaseMixin: (new (...args: any[]) => import("ngx-tethys/core").ThyHasTabIndex) & import("ngx-tethys/core").ThyCanDisableCtor & typeof OverlayBase;
8
16
  /**
9
17
  * 颜色选择组件
10
18
  * @name thyColorPicker
11
19
  */
12
- export declare class ThyColorPickerDirective extends ThyOverlayDirectiveBase implements OnInit, OnDestroy {
20
+ export declare class ThyColorPickerDirective extends _BaseMixin implements OnInit, OnDestroy {
13
21
  private thyPopover;
14
- private zone;
22
+ protected zone: NgZone;
15
23
  protected elementRef: ElementRef<HTMLElement>;
16
24
  /**
17
25
  * 弹框偏移量
@@ -62,7 +70,12 @@ export declare class ThyColorPickerDirective extends ThyOverlayDirectiveBase imp
62
70
  * 隐藏延迟时间
63
71
  */
64
72
  set thyHideDelay(value: number);
65
- private onChangeFn;
73
+ /**
74
+ * 是否属于禁用状态
75
+ */
76
+ get thyDisabled(): boolean;
77
+ set thyDisabled(value: boolean);
78
+ protected onChangeFn: (value: number | string) => void;
66
79
  private onTouchFn;
67
80
  color: string;
68
81
  private popoverRef;
@@ -81,5 +94,6 @@ export declare class ThyColorPickerDirective extends ThyOverlayDirectiveBase imp
81
94
  onModelChange(value: string): void;
82
95
  ngOnDestroy(): void;
83
96
  static ɵfac: i0.ɵɵFactoryDeclaration<ThyColorPickerDirective, never>;
84
- static ɵdir: i0.ɵɵDirectiveDeclaration<ThyColorPickerDirective, "[thyColorPicker]", never, { "thyOffset": { "alias": "thyOffset"; "required": false; }; "thyHasBackdrop": { "alias": "thyHasBackdrop"; "required": false; }; "thyDefaultColor": { "alias": "thyDefaultColor"; "required": false; }; "thyTransparentColorSelectable": { "alias": "thyTransparentColorSelectable"; "required": false; }; "thyPresetColors": { "alias": "thyPresetColors"; "required": false; }; "thyPlacement": { "alias": "thyPlacement"; "required": false; }; "thyTrigger": { "alias": "thyTrigger"; "required": false; }; "thyShowDelay": { "alias": "thyShowDelay"; "required": false; }; "thyHideDelay": { "alias": "thyHideDelay"; "required": false; }; }, { "thyPanelOpen": "thyPanelOpen"; "thyPanelClose": "thyPanelClose"; }, never, never, true, never>;
97
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ThyColorPickerDirective, "[thyColorPicker]", never, { "thyOffset": { "alias": "thyOffset"; "required": false; }; "thyHasBackdrop": { "alias": "thyHasBackdrop"; "required": false; }; "thyDefaultColor": { "alias": "thyDefaultColor"; "required": false; }; "thyTransparentColorSelectable": { "alias": "thyTransparentColorSelectable"; "required": false; }; "thyPresetColors": { "alias": "thyPresetColors"; "required": false; }; "thyPlacement": { "alias": "thyPlacement"; "required": false; }; "thyTrigger": { "alias": "thyTrigger"; "required": false; }; "thyShowDelay": { "alias": "thyShowDelay"; "required": false; }; "thyHideDelay": { "alias": "thyHideDelay"; "required": false; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; }, { "thyPanelOpen": "thyPanelOpen"; "thyPanelClose": "thyPanelClose"; }, never, never, true, never>;
85
98
  }
99
+ export {};
@@ -11,3 +11,12 @@
11
11
  opacity: 0.5;
12
12
  cursor: variables.$disabled-cursor;
13
13
  }
14
+
15
+ .thy-color-picker {
16
+ &:not(.disabled) {
17
+ &:focus {
18
+ outline: 0;
19
+ border: 1px solid variables.$primary !important;
20
+ }
21
+ }
22
+ }
@@ -7,3 +7,4 @@ export * from './tabindex';
7
7
  export * from './unsubscribe';
8
8
  export * from './control-value-accessor';
9
9
  export * from './focus-control';
10
+ export * from './mixin';
@@ -0,0 +1,5 @@
1
+ import { Constructor } from './constructor';
2
+ import { AbstractControlValueAccessor } from './control-value-accessor';
3
+ import { ThyCanDisable } from './disabled';
4
+ import { ThyHasTabIndex } from './tabindex';
5
+ export declare const TabIndexDisabledControlValueAccessorMixin: Constructor<ThyHasTabIndex> & Constructor<ThyCanDisable> & typeof AbstractControlValueAccessor;
@@ -1,4 +1,4 @@
1
- import { AbstractControlValueAccessor, Constructor, ThyCanDisable, ThyHasTabIndex } from 'ngx-tethys/core';
1
+ import { TabIndexDisabledControlValueAccessorMixin } from 'ngx-tethys/core';
2
2
  import { TinyDate } from 'ngx-tethys/util';
3
3
  import { Subject } from 'rxjs';
4
4
  import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
@@ -7,11 +7,10 @@ import { CompatibleValue, RangeAdvancedValue } from './inner-types';
7
7
  import { ThyPickerComponent } from './picker.component';
8
8
  import { CompatibleDate, DateEntry, DisabledDateFn, ThyDateRangeEntry, ThyPanelMode, ThyShortcutPosition, CompatiblePresets, ThyShortcutValueChange, ThyDateGranularity } from './standard-types';
9
9
  import * as i0 from "@angular/core";
10
- declare const _MixinBase: Constructor<ThyHasTabIndex> & Constructor<ThyCanDisable> & typeof AbstractControlValueAccessor;
11
10
  /**
12
11
  * @private
13
12
  */
14
- export declare abstract class AbstractPickerComponent extends _MixinBase implements OnInit, OnChanges, OnDestroy, ControlValueAccessor {
13
+ export declare abstract class AbstractPickerComponent extends TabIndexDisabledControlValueAccessorMixin implements OnInit, OnChanges, OnDestroy, ControlValueAccessor {
15
14
  cdr: ChangeDetectorRef;
16
15
  thyValue: CompatibleValue | null;
17
16
  _panelMode: ThyPanelMode;
@@ -145,4 +144,3 @@ export declare abstract class AbstractPickerComponent extends _MixinBase impleme
145
144
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractPickerComponent, never>;
146
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>;
147
146
  }
148
- export {};