ngx-tethys 19.1.0-next.0 → 19.1.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +0 -1
  3. package/action/action.component.d.ts +7 -8
  4. package/affix/affix.component.d.ts +3 -4
  5. package/arrow-switcher/arrow-switcher.component.d.ts +5 -1
  6. package/button/button-group.component.d.ts +5 -12
  7. package/button/button-icon.component.d.ts +14 -28
  8. package/button/button.component.d.ts +17 -27
  9. package/date-picker/styles/calendar.scss +1 -1
  10. package/date-picker/styles/range-picker.scss +1 -0
  11. package/date-picker/styles/week-picker.scss +1 -0
  12. package/dropdown/dropdown-active.directive.d.ts +4 -5
  13. package/dropdown/dropdown-menu-item.directive.d.ts +7 -15
  14. package/dropdown/dropdown-menu.component.d.ts +6 -13
  15. package/dropdown/dropdown-submenu.component.d.ts +2 -4
  16. package/dropdown/dropdown.directive.d.ts +14 -25
  17. package/fesm2022/ngx-tethys-action.mjs +15 -16
  18. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  19. package/fesm2022/ngx-tethys-affix.mjs +14 -18
  20. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  21. package/fesm2022/ngx-tethys-arrow-switcher.mjs +15 -3
  22. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  23. package/fesm2022/ngx-tethys-button.mjs +225 -322
  24. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  25. package/fesm2022/ngx-tethys-carousel.mjs +1 -0
  26. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  27. package/fesm2022/ngx-tethys-collapse.mjs +2 -2
  28. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  29. package/fesm2022/ngx-tethys-date-picker.mjs +6 -6
  30. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  31. package/fesm2022/ngx-tethys-dropdown.mjs +155 -203
  32. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-flexible-text.mjs +67 -86
  34. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  35. package/fesm2022/ngx-tethys-grid.mjs +10 -15
  36. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  37. package/fesm2022/ngx-tethys-icon.mjs +44 -59
  38. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  39. package/fesm2022/ngx-tethys-image.mjs +40 -36
  40. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  41. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-progress.mjs +7 -11
  43. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  44. package/fesm2022/ngx-tethys-property.mjs +8 -19
  45. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  46. package/fesm2022/ngx-tethys-radio.mjs +42 -54
  47. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  48. package/fesm2022/ngx-tethys-rate.mjs +115 -157
  49. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  50. package/fesm2022/ngx-tethys-resizable.mjs +111 -157
  51. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  52. package/fesm2022/ngx-tethys-segment.mjs +84 -103
  53. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  54. package/fesm2022/ngx-tethys-shared.mjs +2 -1
  55. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  56. package/fesm2022/ngx-tethys-slide.mjs +37 -56
  57. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  58. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  59. package/fesm2022/ngx-tethys-space.mjs +2 -8
  60. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-strength.mjs +52 -66
  62. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-transfer.mjs +98 -119
  64. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-tree-select.mjs +2 -4
  66. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-tree.mjs +281 -401
  68. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-upload.mjs +2 -2
  70. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-vote.mjs +53 -99
  72. package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys.mjs +1 -1
  74. package/fesm2022/ngx-tethys.mjs.map +1 -1
  75. package/flexible-text/flexible-text.component.d.ts +9 -15
  76. package/grid/flex.d.ts +1 -3
  77. package/grid/thy-row.directive.d.ts +1 -4
  78. package/icon/icon.component.d.ts +10 -18
  79. package/image/image.directive.d.ts +10 -13
  80. package/image/image.token.d.ts +5 -5
  81. package/input-number/input-number.component.d.ts +1 -1
  82. package/package.json +1 -1
  83. package/progress/progress-circle.component.d.ts +3 -5
  84. package/progress/progress.component.d.ts +2 -4
  85. package/property/properties.component.d.ts +0 -2
  86. package/property/property-item.component.d.ts +3 -10
  87. package/radio/group/radio-group.component.d.ts +5 -9
  88. package/rate/rate-item.component.d.ts +8 -11
  89. package/rate/rate.component.d.ts +18 -29
  90. package/resizable/resizable.directive.d.ts +18 -31
  91. package/resizable/resize-handle.component.d.ts +6 -7
  92. package/resizable/resize-handles.component.d.ts +5 -9
  93. package/schematics/version.d.ts +1 -1
  94. package/schematics/version.js +1 -1
  95. package/segment/segment-item.component.d.ts +9 -15
  96. package/segment/segment.component.d.ts +11 -15
  97. package/segment/segment.token.d.ts +4 -3
  98. package/slide/slide-body/slide-body-section.component.d.ts +2 -6
  99. package/slide/slide-header/slide-header.component.d.ts +6 -9
  100. package/space/space.component.d.ts +5 -11
  101. package/strength/strength.component.d.ts +8 -13
  102. package/transfer/transfer-list.component.d.ts +15 -15
  103. package/transfer/transfer.component.d.ts +20 -23
  104. package/tree/tree-abstract.d.ts +5 -5
  105. package/tree/tree-node.component.d.ts +24 -37
  106. package/tree/tree.class.d.ts +4 -4
  107. package/tree/tree.component.d.ts +47 -75
  108. package/tree/tree.service.d.ts +3 -4
  109. package/tree-select/tree-select.component.d.ts +2 -2
  110. package/vote/vote.component.d.ts +13 -33
@@ -1,108 +1,95 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
1
+ import { ElementRef, TemplateRef } from '@angular/core';
2
2
  import { ThyTreeNode } from './tree.class';
3
3
  import { ThyTreeEmitEvent, ThyTreeNodeCheckState, ThyClickBehavior } from './tree.class';
4
4
  import { ThyTreeService } from './tree.service';
5
5
  import * as i0 from "@angular/core";
6
- import * as i1 from "ngx-tethys/util";
7
6
  /**
8
7
  * 树形控件的节点组件
9
8
  * @private
10
9
  * @name thy-tree-node
11
10
  */
12
- export declare class ThyTreeNodeComponent implements OnDestroy, OnInit, OnChanges {
11
+ export declare class ThyTreeNodeComponent {
13
12
  root: import("./tree-abstract").ThyTreeAbstractComponent;
14
13
  thyTreeService: ThyTreeService;
15
14
  /**
16
15
  * node 节点展现所需的数据
17
16
  */
18
- node: ThyTreeNode;
17
+ readonly node: import("@angular/core").InputSignal<ThyTreeNode<any>>;
19
18
  /**
20
19
  * 设置 TreeNode 是否支持异步加载
21
20
  */
22
- thyAsync: boolean;
21
+ readonly thyAsync: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
23
22
  /**
24
23
  * 设置 TreeNode 是否支持多选节点
25
24
  */
26
- thyMultiple: boolean;
25
+ readonly thyMultiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
27
26
  /**
28
27
  * 设置 TreeNode 是否支持拖拽排序
29
28
  */
30
- thyDraggable: boolean;
29
+ readonly thyDraggable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
31
30
  /**
32
31
  * 设置 TreeNode 是否支持 Checkbox 选择
33
32
  */
34
- thyCheckable: boolean;
33
+ readonly thyCheckable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
35
34
  /**
36
35
  * 点击节点的行为,`default` 为选中当前节点,`selectCheckbox` 为选中节点的 Checkbox, `thyCheckable` 为 true 时生效。
37
36
  * @default default
38
37
  */
39
- thyClickBehavior: ThyClickBehavior;
38
+ readonly thyClickBehavior: import("@angular/core").InputSignal<ThyClickBehavior>;
40
39
  /**
41
40
  * 设置节点名称是否支持超出截取
42
41
  * @default false
43
42
  */
44
- thyTitleTruncate: boolean;
43
+ readonly thyTitleTruncate: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
45
44
  /**
46
45
  * 设置 TreeNode 的渲染模板
47
46
  */
48
- templateRef: TemplateRef<any>;
47
+ readonly templateRef: import("@angular/core").InputSignal<TemplateRef<any>>;
49
48
  /**
50
49
  * 设置子的空数据渲染模板
51
50
  */
52
- emptyChildrenTemplateRef: TemplateRef<any>;
51
+ readonly emptyChildrenTemplateRef: import("@angular/core").InputSignal<TemplateRef<any>>;
53
52
  /**
54
53
  * 设置 node 点击事件
55
54
  */
56
- thyOnClick: EventEmitter<ThyTreeEmitEvent>;
55
+ readonly thyOnClick: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
57
56
  /**
58
57
  * 双击 node 事件
59
58
  */
60
- thyDblClick: EventEmitter<ThyTreeEmitEvent>;
59
+ readonly thyDblClick: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
61
60
  /**
62
61
  * 点击展开触发事件
63
62
  */
64
- thyOnExpandChange: EventEmitter<ThyTreeEmitEvent>;
63
+ readonly thyOnExpandChange: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
65
64
  /**
66
65
  * 设置 check 选择事件
67
66
  */
68
- thyOnCheckboxChange: EventEmitter<ThyTreeEmitEvent>;
67
+ readonly thyOnCheckboxChange: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
69
68
  /**
70
69
  * 设置 childrenTree 的渲染模板
71
70
  */
72
- childrenTreeTemplateRef: TemplateRef<any>;
71
+ readonly childrenTreeTemplateRef: import("@angular/core").Signal<TemplateRef<any>>;
73
72
  /** The native `<div class="thy-tree-node-wrapper thy-sortable-item"></div>` element. */
74
- treeNodeWrapper: ElementRef<HTMLElement>;
75
- thyTreeNodeClass: boolean;
76
- itemClass: string;
73
+ readonly treeNodeWrapper: import("@angular/core").Signal<ElementRef<HTMLElement>>;
77
74
  /**
78
75
  * 开启虚拟滚动时,单行节点的高度,当`thySize`为`default`时,该参数才生效
79
76
  */
80
- thyItemSize: number;
77
+ readonly thyItemSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
81
78
  /**
82
79
  * 设置节点缩进距离,缩进距离 = thyIndent * node.level
83
80
  */
84
- thyIndent: number;
85
- get nodeIcon(): string;
86
- get nodeIconStyle(): {
81
+ readonly thyIndent: import("@angular/core").InputSignalWithTransform<number, unknown>;
82
+ readonly nodeIcon: import("@angular/core").Signal<string>;
83
+ readonly nodeIconStyle: import("@angular/core").Signal<{
87
84
  [key: string]: any;
88
- };
89
- private destroy$;
85
+ }>;
86
+ protected readonly itemClass: import("@angular/core").Signal<string>;
90
87
  checkState: typeof ThyTreeNodeCheckState;
91
88
  clickNode(event: Event): void;
92
89
  dbClickNode(event: Event): void;
93
90
  clickNodeCheck(event: Event): void;
94
91
  expandNode(event: Event): void;
95
92
  isShowExpand(node: ThyTreeNode): boolean;
96
- ngOnInit(): void;
97
- ngOnChanges(changes: SimpleChanges): void;
98
- ngOnDestroy(): void;
99
93
  static ɵfac: i0.ɵɵFactoryDeclaration<ThyTreeNodeComponent, never>;
100
- static ɵcmp: i0.ɵɵComponentDeclaration<ThyTreeNodeComponent, "thy-tree-node", never, { "node": { "alias": "node"; "required": false; }; "thyAsync": { "alias": "thyAsync"; "required": false; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; }; "thyDraggable": { "alias": "thyDraggable"; "required": false; }; "thyCheckable": { "alias": "thyCheckable"; "required": false; }; "thyClickBehavior": { "alias": "thyClickBehavior"; "required": false; }; "thyTitleTruncate": { "alias": "thyTitleTruncate"; "required": false; }; "templateRef": { "alias": "templateRef"; "required": false; }; "emptyChildrenTemplateRef": { "alias": "emptyChildrenTemplateRef"; "required": false; }; "thyItemSize": { "alias": "thyItemSize"; "required": false; }; "thyIndent": { "alias": "thyIndent"; "required": false; }; }, { "thyOnClick": "thyOnClick"; "thyDblClick": "thyDblClick"; "thyOnExpandChange": "thyOnExpandChange"; "thyOnCheckboxChange": "thyOnCheckboxChange"; }, ["childrenTreeTemplateRef"], never, true, never>;
101
- static ngAcceptInputType_thyAsync: i1.ThyBooleanInput;
102
- static ngAcceptInputType_thyMultiple: i1.ThyBooleanInput;
103
- static ngAcceptInputType_thyDraggable: i1.ThyBooleanInput;
104
- static ngAcceptInputType_thyCheckable: i1.ThyBooleanInput;
105
- static ngAcceptInputType_thyTitleTruncate: i1.ThyBooleanInput;
106
- static ngAcceptInputType_thyItemSize: unknown;
107
- static ngAcceptInputType_thyIndent: unknown;
94
+ static ɵcmp: i0.ɵɵComponentDeclaration<ThyTreeNodeComponent, "thy-tree-node", never, { "node": { "alias": "node"; "required": false; "isSignal": true; }; "thyAsync": { "alias": "thyAsync"; "required": false; "isSignal": true; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; "isSignal": true; }; "thyDraggable": { "alias": "thyDraggable"; "required": false; "isSignal": true; }; "thyCheckable": { "alias": "thyCheckable"; "required": false; "isSignal": true; }; "thyClickBehavior": { "alias": "thyClickBehavior"; "required": false; "isSignal": true; }; "thyTitleTruncate": { "alias": "thyTitleTruncate"; "required": false; "isSignal": true; }; "templateRef": { "alias": "templateRef"; "required": false; "isSignal": true; }; "emptyChildrenTemplateRef": { "alias": "emptyChildrenTemplateRef"; "required": false; "isSignal": true; }; "thyItemSize": { "alias": "thyItemSize"; "required": false; "isSignal": true; }; "thyIndent": { "alias": "thyIndent"; "required": false; "isSignal": true; }; }, { "thyOnClick": "thyOnClick"; "thyDblClick": "thyDblClick"; "thyOnExpandChange": "thyOnExpandChange"; "thyOnCheckboxChange": "thyOnCheckboxChange"; }, ["childrenTreeTemplateRef"], never, true, never>;
108
95
  }
@@ -1,4 +1,5 @@
1
- import { BehaviorSubject, Subject } from 'rxjs';
1
+ import { Signal } from '@angular/core';
2
+ import { Subject } from 'rxjs';
2
3
  export declare enum ThyTreeNodeCheckState {
3
4
  unchecked = 0,
4
5
  checked = 1,
@@ -59,12 +60,11 @@ export interface ThyTreeFormatEmitEvent {
59
60
  }
60
61
  export interface IThyTreeService {
61
62
  selectedNode: ThyTreeNode;
62
- flattenNodes$: BehaviorSubject<ThyTreeNode[]>;
63
- flattenTreeNodes: ThyTreeNode[];
63
+ flattenTreeNodes: Signal<ThyTreeNode[]>;
64
64
  treeNodes: ThyTreeNode[];
65
65
  statusChange$: Subject<ThyTreeFormatEmitEvent>;
66
66
  initializeTreeNodes: (rootNodes: ThyTreeNodeData[]) => void;
67
- syncFlattenTreeNodes: () => ThyTreeNode[];
67
+ syncFlattenTreeNodes: () => void;
68
68
  setCheckStateResolve: (resolve: (node: ThyTreeNode) => ThyTreeNodeCheckState) => void;
69
69
  resetSortedTreeNodes: (treeNodes: ThyTreeNode[], parent?: ThyTreeNode) => void;
70
70
  getTreeNode: (key: string | number) => ThyTreeNode;
@@ -1,189 +1,172 @@
1
1
  import { SelectionModel } from '@angular/cdk/collections';
2
2
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
3
- import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
3
+ import { TemplateRef } from '@angular/core';
4
4
  import { ControlValueAccessor } from '@angular/forms';
5
5
  import { ThyTreeNode } from './tree.class';
6
6
  import { ThyTreeBeforeDragDropContext, ThyTreeBeforeDragStartContext, ThyClickBehavior, ThyTreeDragDropEvent, ThyTreeEmitEvent, ThyTreeIcons, ThyTreeNodeCheckState, ThyTreeNodeData } from './tree.class';
7
7
  import { ThyTreeService } from './tree.service';
8
8
  import { CdkDrag, CdkDragDrop, CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
9
9
  import * as i0 from "@angular/core";
10
- import * as i1 from "ngx-tethys/util";
11
10
  type ThyTreeSize = 'sm' | 'default';
12
11
  type ThyTreeType = 'default' | 'especial';
13
12
  /**
14
13
  * 树形控件组件
15
14
  * @name thy-tree
16
15
  */
17
- export declare class ThyTree implements ControlValueAccessor, OnInit, OnChanges, AfterViewInit, OnDestroy {
16
+ export declare class ThyTree implements ControlValueAccessor {
18
17
  thyTreeService: ThyTreeService;
19
- private cdr;
20
18
  private document;
21
- private _templateRef;
22
- private _emptyChildrenTemplateRef;
23
- private _draggable;
24
- private _expandedKeys;
25
- private _selectedKeys;
19
+ private destroyRef;
20
+ private expandedKeys;
21
+ private selectedKeys;
26
22
  private hostRenderer;
27
23
  private _onTouched;
28
24
  private _onChange;
29
- private destroy$;
30
25
  private nodeDragsMap;
31
26
  private nodeDragMoved;
32
27
  private startDragNodeClone;
33
28
  private nodeDropTarget;
34
29
  private dropEnterPredicate?;
35
- _selectionModel: SelectionModel<ThyTreeNode>;
30
+ selectionModel: SelectionModel<ThyTreeNode>;
36
31
  get treeNodes(): ThyTreeNode<any>[];
37
- flattenTreeNodes: ThyTreeNode[];
32
+ readonly flattenTreeNodes: import("@angular/core").Signal<ThyTreeNode<any>[]>;
38
33
  /**
39
34
  * 虚拟化滚动的视口
40
35
  */
41
- viewport: CdkVirtualScrollViewport;
36
+ readonly viewport: import("@angular/core").Signal<CdkVirtualScrollViewport>;
42
37
  /**
43
38
  * TreeNode 展现所需的数据
44
39
  * @type ThyTreeNodeData[]
45
40
  */
46
- thyNodes: ThyTreeNodeData[];
41
+ readonly thyNodes: import("@angular/core").ModelSignal<ThyTreeNodeData<any>[]>;
47
42
  /**
48
43
  * 设置 TreeNode 是否支持展开
49
44
  * @type boolean | Function
50
45
  */
51
- thyShowExpand: boolean | ((_: ThyTreeNodeData) => boolean);
46
+ readonly thyShowExpand: import("@angular/core").InputSignal<boolean | ((_: ThyTreeNodeData) => boolean)>;
52
47
  /**
53
48
  * 设置是否支持多选节点
54
49
  */
55
- thyMultiple: boolean;
50
+ readonly thyMultiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
56
51
  /**
57
52
  * 设置 TreeNode 是否支持拖拽排序
58
53
  * @default false
59
54
  */
60
- set thyDraggable(value: boolean);
61
- get thyDraggable(): boolean;
55
+ readonly thyDraggable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
62
56
  /**
63
57
  * 设置 TreeNode 是否支持 Checkbox 选择
64
58
  * @default false
65
59
  */
66
- thyCheckable: boolean;
60
+ readonly thyCheckable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
67
61
  /**
68
62
  * 点击节点的行为,`default` 为选中当前节点,`selectCheckbox` 为选中节点的 Checkbox, `thyCheckable` 为 true 时生效。
69
63
  */
70
- thyClickBehavior: ThyClickBehavior;
64
+ readonly thyClickBehavior: import("@angular/core").InputSignal<ThyClickBehavior>;
71
65
  /**
72
66
  * 设置 check 状态的计算策略
73
67
  */
74
- set thyCheckStateResolve(resolve: (node: ThyTreeNode) => ThyTreeNodeCheckState);
68
+ readonly thyCheckStateResolve: import("@angular/core").InputSignal<(node: ThyTreeNode) => ThyTreeNodeCheckState>;
75
69
  /**
76
70
  * 设置 TreeNode 是否支持异步加载
77
71
  */
78
- thyAsync: boolean;
79
- private _thyType;
72
+ readonly thyAsync: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
80
73
  /**
81
74
  * 设置不同展示类型的 Tree,`default` 为小箭头展示, `especial` 为 加减号图标展示
82
75
  * @type ThyTreeType
83
76
  * @default default
84
77
  */
85
- set thyType(type: ThyTreeType);
86
- get thyType(): ThyTreeType;
78
+ readonly thyType: import("@angular/core").InputSignal<ThyTreeType>;
87
79
  /**
88
80
  * 设置不同 Tree 展开折叠的图标,`expand` 为展开状态的图标,`collapse` 为折叠状态的图标
89
81
  * @type { expand: string, collapse: string }
90
82
  */
91
- thyIcons: ThyTreeIcons;
92
- private _thySize;
83
+ readonly thyIcons: import("@angular/core").InputSignal<ThyTreeIcons>;
93
84
  /**
94
85
  * 支持 `sm` | `default` 两种大小,默认值为 `default`
95
86
  * @type ThyTreeSize
96
87
  * @default default
97
88
  */
98
- set thySize(size: ThyTreeSize);
99
- get thySize(): ThyTreeSize;
89
+ readonly thySize: import("@angular/core").InputSignal<ThyTreeSize>;
100
90
  /**
101
91
  * 设置是否开启虚拟滚动
102
92
  */
103
- thyVirtualScroll: boolean;
104
- private _thyItemSize;
93
+ readonly thyVirtualScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
105
94
  /**
106
95
  * 开启虚拟滚动时,单行节点的高度,当`thySize`为`default`时,该参数才生效
107
96
  * @default 44
108
97
  */
109
- set thyItemSize(itemSize: number);
110
- get thyItemSize(): number;
98
+ readonly thyItemSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
99
+ protected readonly icons: import("@angular/core").Signal<ThyTreeIcons>;
100
+ readonly itemSize: import("@angular/core").Signal<number>;
111
101
  /**
112
102
  * 设置节点名称是否支持超出截取
113
103
  * @type boolean
114
104
  */
115
- thyTitleTruncate: boolean;
105
+ readonly thyTitleTruncate: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
116
106
  /**
117
107
  * 已选中的 node 节点集合
118
108
  * @default []
119
109
  */
120
- thySelectedKeys: string[];
110
+ readonly thySelectedKeys: import("@angular/core").InputSignal<string[]>;
121
111
  /**
122
112
  * 展开指定的树节点
123
113
  */
124
- thyExpandedKeys: (string | number)[];
114
+ readonly thyExpandedKeys: import("@angular/core").InputSignal<(string | number)[]>;
125
115
  /**
126
116
  * 是否展开所有树节点
127
117
  */
128
- thyExpandAll: boolean;
118
+ readonly thyExpandAll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
129
119
  /**
130
120
  * 设置缩进距离,缩进距离 = thyIndent * node.level
131
121
  * @type number
132
122
  */
133
- thyIndent: number;
123
+ readonly thyIndent: import("@angular/core").InputSignalWithTransform<number, unknown>;
134
124
  /**
135
125
  * 拖拽之前的回调,函数返回 false 则阻止拖拽
136
126
  */
137
- thyBeforeDragStart: (context: ThyTreeBeforeDragStartContext) => boolean;
127
+ readonly thyBeforeDragStart: import("@angular/core").InputSignal<(context: ThyTreeBeforeDragStartContext) => boolean>;
138
128
  /**
139
129
  * 拖放到元素时回调,函数返回 false 则阻止拖放到当前元素
140
130
  */
141
- thyBeforeDragDrop: (context: ThyTreeBeforeDragDropContext) => boolean;
131
+ readonly thyBeforeDragDrop: import("@angular/core").InputSignal<(context: ThyTreeBeforeDragDropContext) => boolean>;
142
132
  /**
143
133
  * 设置子 TreeNode 点击事件
144
134
  */
145
- thyOnClick: EventEmitter<ThyTreeEmitEvent>;
135
+ readonly thyOnClick: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
146
136
  /**
147
137
  * 设置 check 选择事件
148
138
  */
149
- thyOnCheckboxChange: EventEmitter<ThyTreeEmitEvent>;
139
+ readonly thyOnCheckboxChange: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
150
140
  /**
151
141
  * 设置点击展开触发事件
152
142
  */
153
- thyOnExpandChange: EventEmitter<ThyTreeEmitEvent>;
143
+ readonly thyOnExpandChange: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
154
144
  /**
155
145
  * 设置 TreeNode 拖拽事件
156
146
  */
157
- thyOnDragDrop: EventEmitter<ThyTreeDragDropEvent>;
147
+ readonly thyOnDragDrop: import("@angular/core").OutputEmitterRef<ThyTreeDragDropEvent<any>>;
158
148
  /**
159
149
  * 双击 TreeNode 事件
160
150
  */
161
- thyDblClick: EventEmitter<ThyTreeEmitEvent>;
151
+ readonly thyDblClick: import("@angular/core").OutputEmitterRef<ThyTreeEmitEvent<any>>;
162
152
  /**
163
153
  * 设置 TreeNode 的渲染模板
164
154
  */
165
- set templateRef(template: TemplateRef<any>);
166
- get templateRef(): TemplateRef<any>;
155
+ readonly templateRef: import("@angular/core").Signal<TemplateRef<any>>;
167
156
  /**
168
157
  * 设置子的空数据渲染模板
169
158
  */
170
- emptyChildrenTemplate: TemplateRef<any>;
171
- set emptyChildrenTemplateRef(template: TemplateRef<any>);
172
- get emptyChildrenTemplateRef(): TemplateRef<any>;
173
- thyTreeClass: boolean;
174
- dragging: boolean;
175
- cdkDrags: QueryList<CdkDrag<ThyTreeNode>>;
176
- ngOnInit(): void;
177
- ngAfterViewInit(): void;
178
- ngOnChanges(changes: SimpleChanges): void;
179
- renderView: () => void;
159
+ readonly emptyChildrenTemplate: import("@angular/core").Signal<TemplateRef<any>>;
160
+ dragging: import("@angular/core").WritableSignal<boolean>;
161
+ readonly cdkDrags: import("@angular/core").Signal<readonly CdkDrag<any>[]>;
162
+ constructor();
180
163
  eventTriggerChanged(event: ThyTreeEmitEvent): void;
181
- private _initThyNodes;
182
- private _handleExpandedKeys;
183
- private _setTreeType;
184
- private _setTreeSize;
185
- private _instanceSelectionModel;
186
- private _selectTreeNodes;
164
+ private initThyNodes;
165
+ private handleExpandedKeys;
166
+ private setTreeType;
167
+ private setTreeSize;
168
+ private instanceSelectionModel;
169
+ private selectTreeNodes;
187
170
  isSelected(node: ThyTreeNode): boolean;
188
171
  toggleTreeNode(node: ThyTreeNode): void;
189
172
  trackByFn(index: number, item: any): any;
@@ -201,7 +184,6 @@ export declare class ThyTree implements ControlValueAccessor, OnInit, OnChanges,
201
184
  private cleanupDropPositionPlaceholder;
202
185
  private cleanupDragArtifacts;
203
186
  selectTreeNode(node: ThyTreeNode): void;
204
- getRootNodes(): ThyTreeNode[];
205
187
  getTreeNode(key: string): ThyTreeNode<any>;
206
188
  getSelectedNode(): ThyTreeNode;
207
189
  getSelectedNodes(): ThyTreeNode[];
@@ -211,17 +193,7 @@ export declare class ThyTree implements ControlValueAccessor, OnInit, OnChanges,
211
193
  deleteTreeNode(node: ThyTreeNode): void;
212
194
  expandAllNodes(): void;
213
195
  collapsedAllNodes(): void;
214
- ngOnDestroy(): void;
215
196
  static ɵfac: i0.ɵɵFactoryDeclaration<ThyTree, never>;
216
- static ɵcmp: i0.ɵɵComponentDeclaration<ThyTree, "thy-tree", never, { "thyNodes": { "alias": "thyNodes"; "required": false; }; "thyShowExpand": { "alias": "thyShowExpand"; "required": false; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; }; "thyDraggable": { "alias": "thyDraggable"; "required": false; }; "thyCheckable": { "alias": "thyCheckable"; "required": false; }; "thyClickBehavior": { "alias": "thyClickBehavior"; "required": false; }; "thyCheckStateResolve": { "alias": "thyCheckStateResolve"; "required": false; }; "thyAsync": { "alias": "thyAsync"; "required": false; }; "thyType": { "alias": "thyType"; "required": false; }; "thyIcons": { "alias": "thyIcons"; "required": false; }; "thySize": { "alias": "thySize"; "required": false; }; "thyVirtualScroll": { "alias": "thyVirtualScroll"; "required": false; }; "thyItemSize": { "alias": "thyItemSize"; "required": false; }; "thyTitleTruncate": { "alias": "thyTitleTruncate"; "required": false; }; "thySelectedKeys": { "alias": "thySelectedKeys"; "required": false; }; "thyExpandedKeys": { "alias": "thyExpandedKeys"; "required": false; }; "thyExpandAll": { "alias": "thyExpandAll"; "required": false; }; "thyIndent": { "alias": "thyIndent"; "required": false; }; "thyBeforeDragStart": { "alias": "thyBeforeDragStart"; "required": false; }; "thyBeforeDragDrop": { "alias": "thyBeforeDragDrop"; "required": false; }; }, { "viewport": "viewport"; "thyOnClick": "thyOnClick"; "thyOnCheckboxChange": "thyOnCheckboxChange"; "thyOnExpandChange": "thyOnExpandChange"; "thyOnDragDrop": "thyOnDragDrop"; "thyDblClick": "thyDblClick"; }, ["templateRef", "emptyChildrenTemplate"], never, true, never>;
217
- static ngAcceptInputType_thyMultiple: i1.ThyBooleanInput;
218
- static ngAcceptInputType_thyDraggable: i1.ThyBooleanInput;
219
- static ngAcceptInputType_thyCheckable: i1.ThyBooleanInput;
220
- static ngAcceptInputType_thyAsync: i1.ThyBooleanInput;
221
- static ngAcceptInputType_thyVirtualScroll: i1.ThyBooleanInput;
222
- static ngAcceptInputType_thyItemSize: unknown;
223
- static ngAcceptInputType_thyTitleTruncate: i1.ThyBooleanInput;
224
- static ngAcceptInputType_thyExpandAll: i1.ThyBooleanInput;
225
- static ngAcceptInputType_thyIndent: unknown;
197
+ static ɵcmp: i0.ɵɵComponentDeclaration<ThyTree, "thy-tree", never, { "thyNodes": { "alias": "thyNodes"; "required": false; "isSignal": true; }; "thyShowExpand": { "alias": "thyShowExpand"; "required": false; "isSignal": true; }; "thyMultiple": { "alias": "thyMultiple"; "required": false; "isSignal": true; }; "thyDraggable": { "alias": "thyDraggable"; "required": false; "isSignal": true; }; "thyCheckable": { "alias": "thyCheckable"; "required": false; "isSignal": true; }; "thyClickBehavior": { "alias": "thyClickBehavior"; "required": false; "isSignal": true; }; "thyCheckStateResolve": { "alias": "thyCheckStateResolve"; "required": false; "isSignal": true; }; "thyAsync": { "alias": "thyAsync"; "required": false; "isSignal": true; }; "thyType": { "alias": "thyType"; "required": false; "isSignal": true; }; "thyIcons": { "alias": "thyIcons"; "required": false; "isSignal": true; }; "thySize": { "alias": "thySize"; "required": false; "isSignal": true; }; "thyVirtualScroll": { "alias": "thyVirtualScroll"; "required": false; "isSignal": true; }; "thyItemSize": { "alias": "thyItemSize"; "required": false; "isSignal": true; }; "thyTitleTruncate": { "alias": "thyTitleTruncate"; "required": false; "isSignal": true; }; "thySelectedKeys": { "alias": "thySelectedKeys"; "required": false; "isSignal": true; }; "thyExpandedKeys": { "alias": "thyExpandedKeys"; "required": false; "isSignal": true; }; "thyExpandAll": { "alias": "thyExpandAll"; "required": false; "isSignal": true; }; "thyIndent": { "alias": "thyIndent"; "required": false; "isSignal": true; }; "thyBeforeDragStart": { "alias": "thyBeforeDragStart"; "required": false; "isSignal": true; }; "thyBeforeDragDrop": { "alias": "thyBeforeDragDrop"; "required": false; "isSignal": true; }; }, { "thyNodes": "thyNodesChange"; "thyOnClick": "thyOnClick"; "thyOnCheckboxChange": "thyOnCheckboxChange"; "thyOnExpandChange": "thyOnExpandChange"; "thyOnDragDrop": "thyOnDragDrop"; "thyDblClick": "thyDblClick"; }, ["templateRef", "emptyChildrenTemplate"], never, true, never>;
226
198
  }
227
199
  export {};
@@ -1,4 +1,4 @@
1
- import { BehaviorSubject, Subject } from 'rxjs';
1
+ import { Subject } from 'rxjs';
2
2
  import { OnDestroy } from '@angular/core';
3
3
  import { ThyTreeNodeCheckState, ThyTreeNodeData, ThyTreeNode, IThyTreeService, ThyTreeFormatEmitEvent } from './tree.class';
4
4
  import * as i0 from "@angular/core";
@@ -7,15 +7,14 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export declare class ThyTreeService implements IThyTreeService, OnDestroy {
9
9
  selectedNode: ThyTreeNode;
10
- flattenNodes$: BehaviorSubject<ThyTreeNode<any>[]>;
11
- flattenTreeNodes: ThyTreeNode[];
10
+ flattenTreeNodes: import("@angular/core").WritableSignal<ThyTreeNode<any>[]>;
12
11
  private originTreeNodes;
13
12
  treeNodes: ThyTreeNode[];
14
13
  checkStateResolve: (node: ThyTreeNode) => ThyTreeNodeCheckState;
15
14
  statusChange$: Subject<ThyTreeFormatEmitEvent>;
16
15
  constructor();
17
16
  initializeTreeNodes(rootNodes: ThyTreeNodeData[]): void;
18
- syncFlattenTreeNodes(): ThyTreeNode[];
17
+ syncFlattenTreeNodes(): void;
19
18
  private getParallelTreeNodes;
20
19
  setCheckStateResolve(resolve?: (node: ThyTreeNode) => ThyTreeNodeCheckState): void;
21
20
  resetSortedTreeNodes(treeNodes: ThyTreeNode[], parent?: ThyTreeNode): void;
@@ -1,7 +1,7 @@
1
1
  import { TabIndexDisabledControlValueAccessorMixin } from 'ngx-tethys/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { CdkConnectedOverlay, CdkOverlayOrigin, ConnectionPositionPair } from '@angular/cdk/overlay';
4
- import { ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef, Signal } from '@angular/core';
4
+ import { ElementRef, OnDestroy, OnInit, TemplateRef, Signal } from '@angular/core';
5
5
  import { ControlValueAccessor } from '@angular/forms';
6
6
  import { ThyTreeSelectNode, ThyTreeSelectType } from './tree-select.class';
7
7
  import * as i0 from "@angular/core";
@@ -147,7 +147,7 @@ export declare class ThyTreeSelect extends TabIndexDisabledControlValueAccessorM
147
147
  /**
148
148
  * 树选择组件展开和折叠状态事件
149
149
  */
150
- thyExpandStatusChange: EventEmitter<boolean>;
150
+ readonly thyExpandStatusChange: import("@angular/core").OutputEmitterRef<boolean>;
151
151
  private _getNgModelType;
152
152
  buildFlattenTreeNodes(): void;
153
153
  private getFlattenTreeNodes;
@@ -1,6 +1,5 @@
1
- import { OnInit, TemplateRef } from '@angular/core';
1
+ import { TemplateRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- import * as i1 from "ngx-tethys/util";
4
3
  export type ThyVoteSizes = 'default' | 'sm';
5
4
  export type ThyVoteType = 'primary' | 'success' | 'primary-weak' | 'success-weak';
6
5
  export type ThyVoteLayout = 'vertical' | 'horizontal';
@@ -9,65 +8,46 @@ export type ThyVoteLayout = 'vertical' | 'horizontal';
9
8
  * @name thy-vote,[thyVote]
10
9
  * @order 10
11
10
  */
12
- export declare class ThyVote implements OnInit {
13
- _size: ThyVoteSizes;
14
- _type: ThyVoteType;
15
- _layout: ThyVoteLayout;
16
- _initialized: boolean;
11
+ export declare class ThyVote {
17
12
  private hostRenderer;
18
- class: boolean;
19
- _hasVoted: boolean;
20
13
  /**
21
14
  * 大小,thyLayout="vertical" 时,支持: sm | default
22
- * @default default
23
15
  */
24
- set thySize(value: ThyVoteSizes);
16
+ readonly thySize: import("@angular/core").InputSignalWithTransform<ThyVoteSizes, ThyVoteSizes>;
25
17
  /**
26
18
  * 标签类型: primary | success | primary-weak | success-weak
27
- * @default primary
28
19
  */
29
- set thyVote(value: ThyVoteType);
20
+ readonly thyVote: import("@angular/core").InputSignalWithTransform<ThyVoteType, ThyVoteType>;
30
21
  /**
31
22
  * 是否是偏圆型
32
- * @default false
33
23
  */
34
- thyRound: boolean;
24
+ readonly thyRound: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
35
25
  /**
36
26
  * 布局: horizontal | vertical
37
- * @default horizontal
38
27
  */
39
- set thyLayout(value: ThyVoteLayout);
28
+ readonly thyLayout: import("@angular/core").InputSignalWithTransform<ThyVoteLayout, ThyVoteLayout>;
40
29
  /**
41
30
  * 赞同的数量
42
31
  */
43
- thyVoteCount: number | string;
32
+ readonly thyVoteCount: import("@angular/core").InputSignal<string | number>;
44
33
  /**
45
34
  * 图标
46
- * @type string
47
35
  */
48
- thyIcon: string;
36
+ readonly thyIcon: import("@angular/core").InputSignalWithTransform<string, string>;
49
37
  /**
50
38
  * 是否赞同
51
- * @type boolean
52
- * @default false
53
39
  */
54
- set thyHasVoted(value: boolean);
40
+ readonly thyHasVoted: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
55
41
  /**
56
42
  * 是否禁用
57
- * @type boolean
58
43
  */
59
- thyDisabled: boolean;
44
+ readonly thyDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
60
45
  /**
61
46
  * 自定义Icon模板
62
- * @type TemplateRef
63
47
  */
64
- voteIcon: TemplateRef<any>;
48
+ readonly voteIcon: import("@angular/core").Signal<TemplateRef<any>>;
65
49
  constructor();
66
- ngOnInit(): void;
67
- _setClassesByType(): void;
50
+ private setClassesByType;
68
51
  static ɵfac: i0.ɵɵFactoryDeclaration<ThyVote, never>;
69
- static ɵcmp: i0.ɵɵComponentDeclaration<ThyVote, "thy-vote,[thyVote]", never, { "thySize": { "alias": "thySize"; "required": false; }; "thyVote": { "alias": "thyVote"; "required": false; }; "thyRound": { "alias": "thyRound"; "required": false; }; "thyLayout": { "alias": "thyLayout"; "required": false; }; "thyVoteCount": { "alias": "thyVoteCount"; "required": false; }; "thyIcon": { "alias": "thyIcon"; "required": false; }; "thyHasVoted": { "alias": "thyHasVoted"; "required": false; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; }; }, {}, ["voteIcon"], never, true, never>;
70
- static ngAcceptInputType_thyRound: i1.ThyBooleanInput;
71
- static ngAcceptInputType_thyHasVoted: i1.ThyBooleanInput;
72
- static ngAcceptInputType_thyDisabled: i1.ThyBooleanInput;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<ThyVote, "thy-vote,[thyVote]", never, { "thySize": { "alias": "thySize"; "required": false; "isSignal": true; }; "thyVote": { "alias": "thyVote"; "required": false; "isSignal": true; }; "thyRound": { "alias": "thyRound"; "required": false; "isSignal": true; }; "thyLayout": { "alias": "thyLayout"; "required": false; "isSignal": true; }; "thyVoteCount": { "alias": "thyVoteCount"; "required": false; "isSignal": true; }; "thyIcon": { "alias": "thyIcon"; "required": false; "isSignal": true; }; "thyHasVoted": { "alias": "thyHasVoted"; "required": false; "isSignal": true; }; "thyDisabled": { "alias": "thyDisabled"; "required": false; "isSignal": true; }; }, {}, ["voteIcon"], never, true, never>;
73
53
  }