@ng-nest/ui 14.0.7 → 14.0.8

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 (197) hide show
  1. package/avatar/avatar-group.component.d.ts +8 -0
  2. package/avatar/avatar.component.d.ts +15 -4
  3. package/avatar/avatar.module.d.ts +5 -4
  4. package/avatar/avatar.property.d.ts +31 -3
  5. package/avatar/examples/en_US/default/badge/README.md +6 -0
  6. package/avatar/examples/en_US/default/group/README.md +6 -0
  7. package/avatar/examples/en_US/default/label/README.md +6 -0
  8. package/avatar/examples/en_US/default/response/README.md +6 -0
  9. package/avatar/examples/zh_CN/default/badge/README.md +6 -0
  10. package/avatar/examples/zh_CN/default/group/README.md +6 -0
  11. package/avatar/examples/zh_CN/default/label/README.md +6 -0
  12. package/avatar/examples/zh_CN/default/response/README.md +6 -0
  13. package/avatar/public-api.d.ts +1 -0
  14. package/badge/badge.component.d.ts +4 -1
  15. package/badge/badge.property.d.ts +6 -1
  16. package/badge/examples/en_US/default/animation/README.md +4 -0
  17. package/badge/examples/en_US/default/standalone/README.md +6 -0
  18. package/badge/examples/zh_CN/default/animation/README.md +4 -0
  19. package/badge/examples/zh_CN/default/standalone/README.md +6 -0
  20. package/calendar/calendar.property.d.ts +2 -1
  21. package/core/animation/badge.d.ts +1 -0
  22. package/core/config/config.d.ts +26 -0
  23. package/core/interfaces/identify.type.d.ts +2 -0
  24. package/core/interfaces/layout.type.d.ts +15 -0
  25. package/esm2020/avatar/avatar-group.component.mjs +19 -0
  26. package/esm2020/avatar/avatar.component.mjs +91 -11
  27. package/esm2020/avatar/avatar.module.mjs +6 -5
  28. package/esm2020/avatar/avatar.property.mjs +31 -3
  29. package/esm2020/avatar/public-api.mjs +2 -1
  30. package/esm2020/badge/badge.component.mjs +24 -8
  31. package/esm2020/badge/badge.property.mjs +7 -2
  32. package/esm2020/calendar/calendar.property.mjs +1 -1
  33. package/esm2020/core/animation/badge.mjs +17 -1
  34. package/esm2020/core/config/config.mjs +1 -1
  35. package/esm2020/core/interfaces/identify.type.mjs +1 -1
  36. package/esm2020/core/interfaces/layout.type.mjs +1 -1
  37. package/esm2020/form/form.component.mjs +3 -3
  38. package/esm2020/i18n/i18n.property.mjs +1 -1
  39. package/esm2020/i18n/languages/en_US.mjs +5 -1
  40. package/esm2020/i18n/languages/zh_CN.mjs +5 -1
  41. package/esm2020/i18n/languages/zh_TW.mjs +5 -1
  42. package/esm2020/image/image-group.component.mjs +2 -2
  43. package/esm2020/image/image.component.mjs +13 -5
  44. package/esm2020/image/image.module.mjs +5 -4
  45. package/esm2020/image/image.property.mjs +22 -3
  46. package/esm2020/index.mjs +3 -1
  47. package/esm2020/keyword/keyword.directive.mjs +66 -0
  48. package/esm2020/keyword/keyword.module.mjs +19 -0
  49. package/esm2020/keyword/keyword.property.mjs +41 -0
  50. package/esm2020/keyword/ng-nest-ui-keyword.mjs +5 -0
  51. package/esm2020/keyword/public-api.mjs +4 -0
  52. package/esm2020/list/list-option.component.mjs +4 -4
  53. package/esm2020/list/list.component.mjs +4 -4
  54. package/esm2020/list/list.module.mjs +8 -4
  55. package/esm2020/list/list.property.mjs +19 -3
  56. package/esm2020/select/select-portal.component.mjs +6 -3
  57. package/esm2020/select/select.component.mjs +31 -23
  58. package/esm2020/select/select.property.mjs +8 -2
  59. package/esm2020/table/table.component.mjs +4 -4
  60. package/esm2020/tree/tree-node.component.mjs +52 -27
  61. package/esm2020/tree/tree.component.mjs +173 -58
  62. package/esm2020/tree/tree.module.mjs +5 -4
  63. package/esm2020/tree/tree.property.mjs +38 -2
  64. package/esm2020/tree-select/ng-nest-ui-tree-select.mjs +5 -0
  65. package/esm2020/tree-select/public-api.mjs +5 -0
  66. package/esm2020/tree-select/tree-select-portal.component.mjs +110 -0
  67. package/esm2020/tree-select/tree-select.component.mjs +632 -0
  68. package/esm2020/tree-select/tree-select.module.mjs +65 -0
  69. package/esm2020/tree-select/tree-select.property.mjs +153 -0
  70. package/esm2020/upload/upload.component.mjs +9 -6
  71. package/esm2020/upload/upload.module.mjs +12 -4
  72. package/esm2020/upload/upload.property.mjs +10 -3
  73. package/fesm2015/ng-nest-ui-avatar.mjs +143 -17
  74. package/fesm2015/ng-nest-ui-avatar.mjs.map +1 -1
  75. package/fesm2015/ng-nest-ui-badge.mjs +29 -8
  76. package/fesm2015/ng-nest-ui-badge.mjs.map +1 -1
  77. package/fesm2015/ng-nest-ui-calendar.mjs.map +1 -1
  78. package/fesm2015/ng-nest-ui-core.mjs +17 -1
  79. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  80. package/fesm2015/ng-nest-ui-form.mjs +2 -2
  81. package/fesm2015/ng-nest-ui-form.mjs.map +1 -1
  82. package/fesm2015/ng-nest-ui-i18n.mjs +12 -0
  83. package/fesm2015/ng-nest-ui-i18n.mjs.map +1 -1
  84. package/fesm2015/ng-nest-ui-image.mjs +39 -11
  85. package/fesm2015/ng-nest-ui-image.mjs.map +1 -1
  86. package/fesm2015/ng-nest-ui-keyword.mjs +125 -0
  87. package/fesm2015/ng-nest-ui-keyword.mjs.map +1 -0
  88. package/fesm2015/ng-nest-ui-list.mjs +32 -12
  89. package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
  90. package/fesm2015/ng-nest-ui-select.mjs +42 -25
  91. package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
  92. package/fesm2015/ng-nest-ui-table.mjs +3 -3
  93. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  94. package/fesm2015/ng-nest-ui-tree-select.mjs +951 -0
  95. package/fesm2015/ng-nest-ui-tree-select.mjs.map +1 -0
  96. package/fesm2015/ng-nest-ui-tree.mjs +271 -94
  97. package/fesm2015/ng-nest-ui-tree.mjs.map +1 -1
  98. package/fesm2015/ng-nest-ui-upload.mjs +28 -10
  99. package/fesm2015/ng-nest-ui-upload.mjs.map +1 -1
  100. package/fesm2015/ng-nest-ui.mjs +2 -0
  101. package/fesm2015/ng-nest-ui.mjs.map +1 -1
  102. package/fesm2020/ng-nest-ui-avatar.mjs +140 -17
  103. package/fesm2020/ng-nest-ui-avatar.mjs.map +1 -1
  104. package/fesm2020/ng-nest-ui-badge.mjs +29 -8
  105. package/fesm2020/ng-nest-ui-badge.mjs.map +1 -1
  106. package/fesm2020/ng-nest-ui-calendar.mjs.map +1 -1
  107. package/fesm2020/ng-nest-ui-core.mjs +17 -1
  108. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  109. package/fesm2020/ng-nest-ui-form.mjs +2 -2
  110. package/fesm2020/ng-nest-ui-form.mjs.map +1 -1
  111. package/fesm2020/ng-nest-ui-i18n.mjs +12 -0
  112. package/fesm2020/ng-nest-ui-i18n.mjs.map +1 -1
  113. package/fesm2020/ng-nest-ui-image.mjs +39 -11
  114. package/fesm2020/ng-nest-ui-image.mjs.map +1 -1
  115. package/fesm2020/ng-nest-ui-keyword.mjs +125 -0
  116. package/fesm2020/ng-nest-ui-keyword.mjs.map +1 -0
  117. package/fesm2020/ng-nest-ui-list.mjs +32 -12
  118. package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
  119. package/fesm2020/ng-nest-ui-select.mjs +42 -25
  120. package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
  121. package/fesm2020/ng-nest-ui-table.mjs +3 -3
  122. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  123. package/fesm2020/ng-nest-ui-tree-select.mjs +946 -0
  124. package/fesm2020/ng-nest-ui-tree-select.mjs.map +1 -0
  125. package/fesm2020/ng-nest-ui-tree.mjs +267 -91
  126. package/fesm2020/ng-nest-ui-tree.mjs.map +1 -1
  127. package/fesm2020/ng-nest-ui-upload.mjs +28 -10
  128. package/fesm2020/ng-nest-ui-upload.mjs.map +1 -1
  129. package/fesm2020/ng-nest-ui.mjs +2 -0
  130. package/fesm2020/ng-nest-ui.mjs.map +1 -1
  131. package/i18n/i18n.property.d.ts +5 -0
  132. package/i18n/languages/en_US.d.ts +4 -0
  133. package/i18n/languages/zh_CN.d.ts +4 -0
  134. package/i18n/languages/zh_TW.d.ts +4 -0
  135. package/image/image.component.d.ts +2 -2
  136. package/image/image.module.d.ts +3 -2
  137. package/image/image.property.d.ts +23 -7
  138. package/index.d.ts +2 -0
  139. package/keyword/index.d.ts +5 -0
  140. package/keyword/keyword.directive.d.ts +19 -0
  141. package/keyword/keyword.module.d.ts +9 -0
  142. package/keyword/keyword.property.d.ts +40 -0
  143. package/keyword/public-api.d.ts +3 -0
  144. package/list/list-option.component.d.ts +0 -1
  145. package/list/list.module.d.ts +2 -1
  146. package/list/list.property.d.ts +22 -2
  147. package/package.json +17 -1
  148. package/select/examples/en_US/default/default/README.md +1 -2
  149. package/select/examples/zh_CN/default/default/README.md +1 -2
  150. package/select/select-portal.component.d.ts +5 -1
  151. package/select/select.component.d.ts +2 -2
  152. package/select/select.property.d.ts +6 -1
  153. package/style/core/index.css +29 -0
  154. package/style/core/index.css.map +1 -1
  155. package/style/directives/index.scss +1 -0
  156. package/style/directives/keyword/index.scss +6 -0
  157. package/style/directives/keyword/mixin.scss +24 -0
  158. package/style/directives/keyword/param.scss +3 -0
  159. package/tree/tree-node.component.d.ts +4 -4
  160. package/tree/tree.component.d.ts +13 -1
  161. package/tree/tree.module.d.ts +2 -1
  162. package/tree/tree.property.d.ts +44 -14
  163. package/tree-select/examples/en_US/default/README.md +4 -0
  164. package/tree-select/examples/en_US/default/async/README.md +6 -0
  165. package/tree-select/examples/en_US/default/bordered/README.md +6 -0
  166. package/tree-select/examples/en_US/default/custom/README.md +6 -0
  167. package/tree-select/examples/en_US/default/default/README.md +6 -0
  168. package/tree-select/examples/en_US/default/disabled/README.md +6 -0
  169. package/tree-select/examples/en_US/default/label/README.md +6 -0
  170. package/tree-select/examples/en_US/default/multiple/README.md +6 -0
  171. package/tree-select/examples/en_US/default/path/README.md +6 -0
  172. package/tree-select/examples/en_US/default/required/README.md +6 -0
  173. package/tree-select/examples/en_US/default/scroll/README.md +6 -0
  174. package/tree-select/examples/en_US/default/search/README.md +7 -0
  175. package/tree-select/examples/en_US/default/size/README.md +6 -0
  176. package/tree-select/examples/zh_CN/default/README.md +4 -0
  177. package/tree-select/examples/zh_CN/default/async/README.md +6 -0
  178. package/tree-select/examples/zh_CN/default/bordered/README.md +6 -0
  179. package/tree-select/examples/zh_CN/default/custom/README.md +6 -0
  180. package/tree-select/examples/zh_CN/default/default/README.md +6 -0
  181. package/tree-select/examples/zh_CN/default/disabled/README.md +6 -0
  182. package/tree-select/examples/zh_CN/default/label/README.md +6 -0
  183. package/tree-select/examples/zh_CN/default/multiple/README.md +6 -0
  184. package/tree-select/examples/zh_CN/default/path/README.md +6 -0
  185. package/tree-select/examples/zh_CN/default/required/README.md +6 -0
  186. package/tree-select/examples/zh_CN/default/scroll/README.md +6 -0
  187. package/tree-select/examples/zh_CN/default/search/README.md +7 -0
  188. package/tree-select/examples/zh_CN/default/size/README.md +6 -0
  189. package/tree-select/index.d.ts +5 -0
  190. package/tree-select/public-api.d.ts +4 -0
  191. package/tree-select/tree-select-portal.component.d.ts +62 -0
  192. package/tree-select/tree-select.component.d.ts +101 -0
  193. package/tree-select/tree-select.module.d.ts +20 -0
  194. package/tree-select/tree-select.property.d.ts +202 -0
  195. package/upload/upload.component.d.ts +1 -1
  196. package/upload/upload.module.d.ts +3 -1
  197. package/upload/upload.property.d.ts +13 -3
@@ -0,0 +1,946 @@
1
+ import { Subject, BehaviorSubject } from 'rxjs';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, HostListener, ViewChild, NgModule } from '@angular/core';
4
+ import { __decorate } from 'tslib';
5
+ import * as i4$1 from '@ng-nest/ui/core';
6
+ import { XDataConvert, XWithConfig, XInputBoolean, XInputNumber, XIsEmpty, XConnectBaseAnimation, XIsArray, XIsObjectArray, XIsChange, XResize, XClearClass, XSetData, XIsFunction, XRemove, XIsString, XIsObservable } from '@ng-nest/ui/core';
7
+ import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
8
+ import * as i1$1 from '@ng-nest/ui/portal';
9
+ import { XPortalConnectedPosition, XPortalModule } from '@ng-nest/ui/portal';
10
+ import { takeUntil, map, debounceTime, distinctUntilChanged, throttleTime } from 'rxjs/operators';
11
+ import * as i1 from '@ng-nest/ui/i18n';
12
+ import { XI18nModule } from '@ng-nest/ui/i18n';
13
+ import * as i5 from '@angular/common';
14
+ import { CommonModule } from '@angular/common';
15
+ import * as i3 from '@ng-nest/ui/tree';
16
+ import { XTreeModule } from '@ng-nest/ui/tree';
17
+ import * as i4 from '@ng-nest/ui/empty';
18
+ import { XEmptyModule } from '@ng-nest/ui/empty';
19
+ import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, MAC_ENTER, BACKSPACE, TAB } from '@angular/cdk/keycodes';
20
+ import * as i2 from '@angular/cdk/overlay';
21
+ import * as i6 from '@angular/forms';
22
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
23
+ import * as i7 from '@ng-nest/ui/input';
24
+ import { XInputModule } from '@ng-nest/ui/input';
25
+ import * as i8 from '@ng-nest/ui/tag';
26
+ import { XTagModule } from '@ng-nest/ui/tag';
27
+ import * as i9 from '@ng-nest/ui/outlet';
28
+ import { XOutletModule } from '@ng-nest/ui/outlet';
29
+ import { XListModule } from '@ng-nest/ui/list';
30
+
31
+ /**
32
+ * Tree Select
33
+ * @selector x-tree-select
34
+ * @decorator component
35
+ */
36
+ const XTreeSelectPrefix = 'x-tree-select';
37
+ const X_CONFIG_NAME = 'treeSelect';
38
+ /**
39
+ * Tree Select Property
40
+ */
41
+ class XTreeSelectProperty extends XControlValueAccessor {
42
+ constructor() {
43
+ super(...arguments);
44
+ /**
45
+ * @zh_CN 节点数据
46
+ * @en_US Node data
47
+ */
48
+ this.data = [];
49
+ /**
50
+ * @zh_CN 默认展开的层级
51
+ * @en_US Default expanded level
52
+ */
53
+ this.expandedLevel = -1;
54
+ /**
55
+ * @zh_CN 路径分隔符
56
+ * @en_US Path separator
57
+ * @default ' / '
58
+ */
59
+ this.separator = ' / ';
60
+ }
61
+ }
62
+ /** @nocollapse */ XTreeSelectProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
63
+ /** @nocollapse */ XTreeSelectProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XTreeSelectProperty, selector: "ng-component", inputs: { data: "data", clearable: "clearable", async: "async", placement: "placement", multiple: "multiple", selectAll: "selectAll", selectAllText: "selectAllText", nodeTpl: "nodeTpl", size: "size", expandedLevel: "expandedLevel", bordered: "bordered", portalMaxHeight: "portalMaxHeight", search: "search", caseSensitive: "caseSensitive", debounceTime: "debounceTime", maxTagCount: "maxTagCount", maxTagContent: "maxTagContent", virtualScroll: "virtualScroll", showPath: "showPath", separator: "separator" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
64
+ __decorate([
65
+ XDataConvert()
66
+ ], XTreeSelectProperty.prototype, "data", void 0);
67
+ __decorate([
68
+ XWithConfig(X_CONFIG_NAME, true),
69
+ XInputBoolean()
70
+ ], XTreeSelectProperty.prototype, "clearable", void 0);
71
+ __decorate([
72
+ XInputBoolean()
73
+ ], XTreeSelectProperty.prototype, "async", void 0);
74
+ __decorate([
75
+ XWithConfig(X_CONFIG_NAME, 'bottom')
76
+ ], XTreeSelectProperty.prototype, "placement", void 0);
77
+ __decorate([
78
+ XInputBoolean()
79
+ ], XTreeSelectProperty.prototype, "multiple", void 0);
80
+ __decorate([
81
+ XInputBoolean()
82
+ ], XTreeSelectProperty.prototype, "selectAll", void 0);
83
+ __decorate([
84
+ XWithConfig(X_CONFIG_NAME)
85
+ ], XTreeSelectProperty.prototype, "selectAllText", void 0);
86
+ __decorate([
87
+ XWithConfig(X_CONFIG_NAME, 'medium')
88
+ ], XTreeSelectProperty.prototype, "size", void 0);
89
+ __decorate([
90
+ XInputNumber()
91
+ ], XTreeSelectProperty.prototype, "expandedLevel", void 0);
92
+ __decorate([
93
+ XInputBoolean(),
94
+ XWithConfig(X_CONFIG_NAME, true)
95
+ ], XTreeSelectProperty.prototype, "bordered", void 0);
96
+ __decorate([
97
+ XWithConfig(X_CONFIG_NAME, '12rem')
98
+ ], XTreeSelectProperty.prototype, "portalMaxHeight", void 0);
99
+ __decorate([
100
+ XInputBoolean(),
101
+ XWithConfig(X_CONFIG_NAME, false)
102
+ ], XTreeSelectProperty.prototype, "search", void 0);
103
+ __decorate([
104
+ XInputBoolean(),
105
+ XWithConfig(X_CONFIG_NAME, true)
106
+ ], XTreeSelectProperty.prototype, "caseSensitive", void 0);
107
+ __decorate([
108
+ XWithConfig(X_CONFIG_NAME, 200)
109
+ ], XTreeSelectProperty.prototype, "debounceTime", void 0);
110
+ __decorate([
111
+ XInputNumber(),
112
+ XWithConfig(X_CONFIG_NAME)
113
+ ], XTreeSelectProperty.prototype, "maxTagCount", void 0);
114
+ __decorate([
115
+ XWithConfig(X_CONFIG_NAME)
116
+ ], XTreeSelectProperty.prototype, "maxTagContent", void 0);
117
+ __decorate([
118
+ XWithConfig(X_CONFIG_NAME),
119
+ XInputBoolean()
120
+ ], XTreeSelectProperty.prototype, "virtualScroll", void 0);
121
+ __decorate([
122
+ XWithConfig(X_CONFIG_NAME, false),
123
+ XInputBoolean()
124
+ ], XTreeSelectProperty.prototype, "showPath", void 0);
125
+ __decorate([
126
+ XWithConfig(X_CONFIG_NAME)
127
+ ], XTreeSelectProperty.prototype, "separator", void 0);
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectProperty, decorators: [{
129
+ type: Component,
130
+ args: [{ template: '' }]
131
+ }], propDecorators: { data: [{
132
+ type: Input
133
+ }], clearable: [{
134
+ type: Input
135
+ }], async: [{
136
+ type: Input
137
+ }], placement: [{
138
+ type: Input
139
+ }], multiple: [{
140
+ type: Input
141
+ }], selectAll: [{
142
+ type: Input
143
+ }], selectAllText: [{
144
+ type: Input
145
+ }], nodeTpl: [{
146
+ type: Input
147
+ }], size: [{
148
+ type: Input
149
+ }], expandedLevel: [{
150
+ type: Input
151
+ }], bordered: [{
152
+ type: Input
153
+ }], portalMaxHeight: [{
154
+ type: Input
155
+ }], search: [{
156
+ type: Input
157
+ }], caseSensitive: [{
158
+ type: Input
159
+ }], debounceTime: [{
160
+ type: Input
161
+ }], maxTagCount: [{
162
+ type: Input
163
+ }], maxTagContent: [{
164
+ type: Input
165
+ }], virtualScroll: [{
166
+ type: Input
167
+ }], showPath: [{
168
+ type: Input
169
+ }], separator: [{
170
+ type: Input
171
+ }] } });
172
+ /**
173
+ * Tree Select Portal
174
+ * @selector x-tree-select-portal
175
+ * @decorator component
176
+ */
177
+ const XTreeSelectPortalPrefix = 'x-tree-select-portal';
178
+
179
+ class XTreeSelectPortalComponent {
180
+ constructor(renderer, cdr, i18n) {
181
+ this.renderer = renderer;
182
+ this.cdr = cdr;
183
+ this.i18n = i18n;
184
+ this.selectAll = false;
185
+ this.show = false;
186
+ this.objectArray = false;
187
+ this.caseSensitive = true;
188
+ this.active = -1;
189
+ this.portalMaxHeight = '';
190
+ this.locale = {};
191
+ this.search = false;
192
+ this.scrollNull = undefined;
193
+ this._unSubject = new Subject();
194
+ }
195
+ done(event) {
196
+ this.animating(false);
197
+ event.toState === 'void' && this.destroyPortal();
198
+ }
199
+ start() {
200
+ this.animating(true);
201
+ }
202
+ // @ViewChild('list') list!: XListComponent;
203
+ get isEmpty() {
204
+ return XIsEmpty(this.data);
205
+ }
206
+ get getSelectAllText() {
207
+ return this.selectAllText || this.locale.selectAllText;
208
+ }
209
+ ngOnInit() {
210
+ this.valueChange.pipe(takeUntil(this._unSubject)).subscribe((x) => {
211
+ this.value = x;
212
+ this.cdr.detectChanges();
213
+ });
214
+ this.positionChange.pipe(takeUntil(this._unSubject)).subscribe((x) => {
215
+ this.placement = x;
216
+ this.cdr.detectChanges();
217
+ });
218
+ this.dataChange.pipe(takeUntil(this._unSubject)).subscribe((x) => {
219
+ this.data = x;
220
+ this.cdr.detectChanges();
221
+ });
222
+ this.closeSubject.pipe(takeUntil(this._unSubject)).subscribe(() => {
223
+ // this.tree.setUnActive(this.active);
224
+ });
225
+ this.keydownSubject.pipe(takeUntil(this._unSubject)).subscribe((_x) => {
226
+ // this.tree.keydown(x);
227
+ });
228
+ this.inputChange.pipe(takeUntil(this._unSubject)).subscribe((x) => {
229
+ this.keywordText = x;
230
+ });
231
+ this.i18n.localeChange
232
+ .pipe(map((x) => x.treeSelect), takeUntil(this._unSubject))
233
+ .subscribe((x) => {
234
+ this.locale = x;
235
+ this.cdr.markForCheck();
236
+ });
237
+ }
238
+ ngOnDestroy() {
239
+ this._unSubject.next();
240
+ this._unSubject.unsubscribe();
241
+ }
242
+ stopPropagation(event) {
243
+ event.stopPropagation();
244
+ }
245
+ nodeClick(node) {
246
+ if (this.multiple) {
247
+ this.nodeEmit(node, this.value);
248
+ }
249
+ else {
250
+ this.nodeEmit(node);
251
+ }
252
+ }
253
+ onSelectAll(_isSelectAll) {
254
+ this.nodeEmit(null, this.value);
255
+ }
256
+ onActive(num) {
257
+ this.active = num;
258
+ }
259
+ }
260
+ /** @nocollapse */ XTreeSelectPortalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectPortalComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
261
+ /** @nocollapse */ XTreeSelectPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XTreeSelectPortalComponent, selector: "x-tree-select-portal", host: { listeners: { "@x-connect-base-animation.done": "done($event)", "@x-connect-base-animation.start": "start($event)" }, properties: { "@x-connect-base-animation": "this.placement" } }, viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true }], ngImport: i0, template: "<div\r\n #treeSelectPortal\r\n class=\"x-tree-select-portal\"\r\n (click)=\"inputCom.inputFocus(); stopPropagation($event)\"\r\n [style.maxHeight]=\"portalMaxHeight\"\r\n>\r\n <!-- <x-list\r\n #list\r\n [data]=\"data\"\r\n [(ngModel)]=\"value\"\r\n (nodeClick)=\"nodeClick($event)\"\r\n (keyManagerChange)=\"onActive($event)\"\r\n (keyManagerTabOut)=\"onTabOut()\"\r\n (onSelectAll)=\"onSelectAll($event)\"\r\n checked\r\n [objectArray]=\"objectArray\"\r\n [multiple]=\"multiple\"\r\n [selectAll]=\"selectAll\"\r\n [selectAllText]=\"getSelectAllText\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [scrollElement]=\"search ? scrollNull : treeSelectPortal\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [size]=\"size\"\r\n [heightAdaption]=\"treeSelectPortal\"\r\n ></x-list> -->\r\n <x-tree\r\n #tree\r\n [data]=\"data\"\r\n [labelTpl]=\"nodeTpl\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [scrollElement]=\"search ? scrollNull : treeSelectPortal\"\r\n [heightAdaption]=\"treeSelectPortal\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [(activatedId)]=\"value\"\r\n (nodeClick)=\"nodeClick($event)\"\r\n [multiple]=\"multiple\"\r\n [allowManyActivated]=\"multiple\"\r\n [objectArray]=\"objectArray\"\r\n [keywordText]=\"keywordText\"\r\n [caseSensitive]=\"caseSensitive\"\r\n ></x-tree>\r\n <x-empty *ngIf=\"isEmpty\"></x-empty>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-tree-select-portal{width:100%}.x-tree-select-portal{margin:.0625rem 0;font-size:var(--x-font-size);color:var(--x-text);border:var(--x-border-width) var(--x-border-style) var(--x-border);width:100%;border-radius:var(--x-border-radius);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);position:relative;display:flex;flex-direction:column;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}.x-tree-select-portal x-tree{width:100%}.x-tree-select-portal x-empty{margin:1rem;display:block}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XTreeComponent, selector: "x-tree" }, { kind: "component", type: i4.XEmptyComponent, selector: "x-empty" }], animations: [XConnectBaseAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectPortalComponent, decorators: [{
263
+ type: Component,
264
+ args: [{ selector: `${XTreeSelectPortalPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XConnectBaseAnimation], template: "<div\r\n #treeSelectPortal\r\n class=\"x-tree-select-portal\"\r\n (click)=\"inputCom.inputFocus(); stopPropagation($event)\"\r\n [style.maxHeight]=\"portalMaxHeight\"\r\n>\r\n <!-- <x-list\r\n #list\r\n [data]=\"data\"\r\n [(ngModel)]=\"value\"\r\n (nodeClick)=\"nodeClick($event)\"\r\n (keyManagerChange)=\"onActive($event)\"\r\n (keyManagerTabOut)=\"onTabOut()\"\r\n (onSelectAll)=\"onSelectAll($event)\"\r\n checked\r\n [objectArray]=\"objectArray\"\r\n [multiple]=\"multiple\"\r\n [selectAll]=\"selectAll\"\r\n [selectAllText]=\"getSelectAllText\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [scrollElement]=\"search ? scrollNull : treeSelectPortal\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [size]=\"size\"\r\n [heightAdaption]=\"treeSelectPortal\"\r\n ></x-list> -->\r\n <x-tree\r\n #tree\r\n [data]=\"data\"\r\n [labelTpl]=\"nodeTpl\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [scrollElement]=\"search ? scrollNull : treeSelectPortal\"\r\n [heightAdaption]=\"treeSelectPortal\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [(activatedId)]=\"value\"\r\n (nodeClick)=\"nodeClick($event)\"\r\n [multiple]=\"multiple\"\r\n [allowManyActivated]=\"multiple\"\r\n [objectArray]=\"objectArray\"\r\n [keywordText]=\"keywordText\"\r\n [caseSensitive]=\"caseSensitive\"\r\n ></x-tree>\r\n <x-empty *ngIf=\"isEmpty\"></x-empty>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-tree-select-portal{width:100%}.x-tree-select-portal{margin:.0625rem 0;font-size:var(--x-font-size);color:var(--x-text);border:var(--x-border-width) var(--x-border-style) var(--x-border);width:100%;border-radius:var(--x-border-radius);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);position:relative;display:flex;flex-direction:column;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}.x-tree-select-portal x-tree{width:100%}.x-tree-select-portal x-empty{margin:1rem;display:block}\n"] }]
265
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.XI18nService }]; }, propDecorators: { placement: [{
266
+ type: HostBinding,
267
+ args: ['@x-connect-base-animation']
268
+ }], done: [{
269
+ type: HostListener,
270
+ args: ['@x-connect-base-animation.done', ['$event']]
271
+ }], start: [{
272
+ type: HostListener,
273
+ args: ['@x-connect-base-animation.start', ['$event']]
274
+ }], tree: [{
275
+ type: ViewChild,
276
+ args: ['tree']
277
+ }] } });
278
+
279
+ class XTreeSelectComponent extends XTreeSelectProperty {
280
+ constructor(renderer, cdr, portalService, viewContainerRef, overlay, i18n, configService) {
281
+ super();
282
+ this.renderer = renderer;
283
+ this.cdr = cdr;
284
+ this.portalService = portalService;
285
+ this.viewContainerRef = viewContainerRef;
286
+ this.overlay = overlay;
287
+ this.i18n = i18n;
288
+ this.configService = configService;
289
+ this.readonly = true;
290
+ this.enter = false;
291
+ this.showClearable = false;
292
+ this.displayValue = '';
293
+ this.multipleSearchValue = '';
294
+ this.nodes = [];
295
+ this.selectedNodes = [];
296
+ this.displayNodes = [];
297
+ this.displayMore = '';
298
+ this.showDisplayMore = false;
299
+ this.searchNodes = [];
300
+ this.icon = 'fto-chevron-down';
301
+ this.iconSpin = false;
302
+ this.maxNodes = 6;
303
+ this.inputPadding = 0.4;
304
+ this.protalTobottom = true;
305
+ this.asyncLoading = false;
306
+ this.animating = false;
307
+ this.objectArray = false;
308
+ this.selectedSurplus = 0;
309
+ this.selectedTotal = 0;
310
+ this.locale = {};
311
+ this.valueTplContext = { $node: null, $isValue: true };
312
+ this.valueChange = new Subject();
313
+ this.positionChange = new Subject();
314
+ this.closeSubject = new Subject();
315
+ this.dataChange = new BehaviorSubject([]);
316
+ this.keydownSubject = new Subject();
317
+ this.inputChange = new Subject();
318
+ this.composition = false;
319
+ this.multipleInputSizeChange = new Subject();
320
+ this._unSubject = new Subject();
321
+ }
322
+ get getReadonly() {
323
+ return (this.readonly && !this.search) || (Boolean(this.search) && Boolean(this.multiple));
324
+ }
325
+ get getMaxTagContent() {
326
+ return this.maxTagContent || this.locale.maxTagContent;
327
+ }
328
+ writeValue(value) {
329
+ if (this.multiple) {
330
+ if (XIsEmpty(value)) {
331
+ value = [];
332
+ }
333
+ if (!XIsArray(value)) {
334
+ value = [value];
335
+ }
336
+ this.objectArray = XIsObjectArray(value);
337
+ }
338
+ this.value = value;
339
+ this.setDisplayValue();
340
+ this.valueChange.next(this.value);
341
+ this.cdr.detectChanges();
342
+ }
343
+ ngOnInit() {
344
+ this.setFlex(this.treeSelect.nativeElement, this.renderer, this.justify, this.align, this.direction);
345
+ this.setClassMap();
346
+ this.setSubject();
347
+ if (this.multiple) {
348
+ this.valueTpl = this.multipleValueTpl;
349
+ this.inputPadding = 0.125;
350
+ }
351
+ this.i18n.localeChange
352
+ .pipe(map((x) => x.treeSelect), takeUntil(this._unSubject))
353
+ .subscribe((x) => {
354
+ this.locale = x;
355
+ this.cdr.markForCheck();
356
+ });
357
+ }
358
+ ngOnChanges(changes) {
359
+ const { data } = changes;
360
+ XIsChange(data) && this.setData();
361
+ }
362
+ ngAfterViewInit() {
363
+ this.setPortal();
364
+ if (this.multiple && this.inputCom.inputValueRef) {
365
+ XResize(this.inputCom.inputValueRef.nativeElement)
366
+ .pipe(debounceTime(30), takeUntil(this._unSubject))
367
+ .subscribe((x) => {
368
+ this._resizeObserver = x.resizeObserver;
369
+ this.setMutipleInputSize();
370
+ });
371
+ }
372
+ }
373
+ ngOnDestroy() {
374
+ this._unSubject.next();
375
+ this._unSubject.unsubscribe();
376
+ this._resizeObserver?.disconnect();
377
+ }
378
+ setClassMap() {
379
+ XClearClass(this.labelMap);
380
+ this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;
381
+ }
382
+ setData() {
383
+ if (this.async)
384
+ return;
385
+ XSetData(this.data, this._unSubject).subscribe((x) => {
386
+ this.nodes = x;
387
+ this.dataChange.next(this.nodes);
388
+ this.setDisplayValue();
389
+ this.setPortal();
390
+ this.cdr.detectChanges();
391
+ });
392
+ }
393
+ setSubject() {
394
+ this.closeSubject.pipe(takeUntil(this._unSubject)).subscribe(() => {
395
+ this.closePortal();
396
+ });
397
+ this.inputChange.pipe(debounceTime(this.debounceTime), distinctUntilChanged(), takeUntil(this._unSubject)).subscribe((x) => {
398
+ this.modelChange(x);
399
+ });
400
+ this.keydownSubject.pipe(throttleTime(10), takeUntil(this._unSubject)).subscribe((x) => {
401
+ const keyCode = x.keyCode;
402
+ if (!this.portalAttached() && [DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, MAC_ENTER, BACKSPACE].includes(keyCode)) {
403
+ this.inputChange.next(this.displayValue);
404
+ }
405
+ // if (this.portalAttached() && [ESCAPE].includes(keyCode)) {
406
+ // this.closeSubject.next();
407
+ // }
408
+ });
409
+ this.multipleInputSizeChange.pipe(distinctUntilChanged(), takeUntil(this._unSubject)).subscribe((x) => {
410
+ if (this.multipleInput) {
411
+ const input = this.multipleInput?.elementRef.nativeElement;
412
+ this.renderer.setStyle(input, 'width', `${x}px`);
413
+ }
414
+ });
415
+ }
416
+ setMutipleInputSize() {
417
+ const ivf = this.inputCom.inputValueRef.nativeElement;
418
+ let { clientWidth, scrollHeight } = ivf;
419
+ const len = ivf.children.length;
420
+ let lastRowTagTop = -1;
421
+ let lines = 1;
422
+ let rowTagTop = -1;
423
+ let lastRowTagsWidth = 0;
424
+ let marginLeft = 0;
425
+ let marginTop = 0;
426
+ for (let i = len - 1; i >= 0; i--) {
427
+ const ele = ivf.children[i];
428
+ if (ele.tagName === 'X-TAG') {
429
+ const { offsetTop, offsetWidth } = ele;
430
+ const style = getComputedStyle(ele);
431
+ marginLeft = Number(style.marginLeft.replace('px', ''));
432
+ marginTop = Number(style.marginTop.replace('px', ''));
433
+ if (rowTagTop === -1) {
434
+ rowTagTop = offsetTop;
435
+ }
436
+ else if (rowTagTop !== offsetTop) {
437
+ lines++;
438
+ rowTagTop = offsetTop;
439
+ }
440
+ if (lastRowTagTop === -1) {
441
+ lastRowTagTop = offsetTop;
442
+ }
443
+ if (lastRowTagTop === offsetTop) {
444
+ lastRowTagsWidth += offsetWidth + marginLeft;
445
+ }
446
+ }
447
+ }
448
+ const height = scrollHeight + (lines > 1 ? marginTop : 0);
449
+ this.renderer.setStyle(this.inputCom.inputRef.nativeElement, 'height', `${height}px`);
450
+ if (this.multipleInput) {
451
+ this.multipleInputSizeChange.next(clientWidth - lastRowTagsWidth - marginLeft);
452
+ }
453
+ this.portal?.overlayRef?.updatePosition();
454
+ }
455
+ menter() {
456
+ this.enter = true;
457
+ if (this.disabled || !this.clearable || this.iconSpin)
458
+ return;
459
+ if (!XIsEmpty(this.displayValue)) {
460
+ this.icon = '';
461
+ this.showClearable = true;
462
+ this.cdr.detectChanges();
463
+ }
464
+ }
465
+ mleave() {
466
+ this.enter = false;
467
+ if (this.disabled || !this.clearable || this.iconSpin)
468
+ return;
469
+ if (this.clearable) {
470
+ this.icon = 'fto-chevron-down';
471
+ this.showClearable = false;
472
+ this.cdr.detectChanges();
473
+ }
474
+ }
475
+ modelChange(value) {
476
+ if (XIsFunction(this.data)) {
477
+ if (!this.portalAttached()) {
478
+ this.showPortal();
479
+ }
480
+ this.icon = 'fto-loader';
481
+ this.iconSpin = true;
482
+ this.cdr.detectChanges();
483
+ XSetData(this.data, this._unSubject, true, value).subscribe((x) => {
484
+ this.icon = '';
485
+ this.iconSpin = false;
486
+ if (!this.enter && this.clearable) {
487
+ this.showClearable = false;
488
+ }
489
+ this.nodes = x;
490
+ this.dataChange.next(this.nodes);
491
+ this.cdr.detectChanges();
492
+ });
493
+ return;
494
+ }
495
+ if (this.nodes) {
496
+ if (!this.portalAttached()) {
497
+ this.showPortal();
498
+ }
499
+ if (XIsEmpty(value)) {
500
+ this.searchNodes = [
501
+ ...this.nodes.map((x) => {
502
+ let res = { ...x };
503
+ delete res.children;
504
+ delete res.childrenLoaded;
505
+ delete res.leaf;
506
+ return res;
507
+ })
508
+ ];
509
+ }
510
+ else {
511
+ this.setSearchNodes(value);
512
+ }
513
+ this.dataChange.next(this.searchNodes);
514
+ }
515
+ }
516
+ setSearchNodes(value) {
517
+ let nodes = [];
518
+ const getParent = (node) => {
519
+ if (XIsEmpty(node.pid))
520
+ return;
521
+ const parent = this.nodes.find((x) => x.id === node.pid);
522
+ parent.open = true;
523
+ if (!XIsEmpty(parent)) {
524
+ if (nodes.every((x) => x.id !== parent.id)) {
525
+ nodes.push(parent);
526
+ }
527
+ }
528
+ };
529
+ if (this.caseSensitive) {
530
+ nodes = this.nodes.filter((x) => x.label.indexOf(value) >= 0);
531
+ }
532
+ else {
533
+ nodes = this.nodes.filter((x) => x.label.toLowerCase().indexOf(value.toLowerCase()) >= 0);
534
+ }
535
+ for (let node of nodes) {
536
+ getParent(node);
537
+ }
538
+ this.searchNodes = nodes.map((x) => {
539
+ let res = { ...x };
540
+ delete res.children;
541
+ delete res.childrenLoaded;
542
+ delete res.leaf;
543
+ return res;
544
+ });
545
+ }
546
+ clearEmit() {
547
+ this.value = this.multiple ? [] : '';
548
+ this.displayValue = '';
549
+ this.multipleSearchValue = '';
550
+ this.selectedNodes = [];
551
+ this.setDisplayNodes();
552
+ this.valueTplContext.$node = null;
553
+ this.mleave();
554
+ this.valueChange.next(this.value);
555
+ this.inputChange.next('');
556
+ if (this.onChange)
557
+ this.onChange(this.value);
558
+ }
559
+ setDisplayValue(clickNode) {
560
+ if (this.nodes.length > 0) {
561
+ if (this.multiple) {
562
+ if (XIsEmpty(this.value)) {
563
+ this.value = [];
564
+ this.displayValue = '';
565
+ this.selectedNodes = [];
566
+ this.displayNodes = [];
567
+ this.displayMore = '';
568
+ this.valueTplContext.$node = null;
569
+ this.setDisplayNodes();
570
+ }
571
+ else {
572
+ let ids = [];
573
+ let selected = [];
574
+ if (this.objectArray) {
575
+ ids = this.value.map((x) => x.id);
576
+ }
577
+ else {
578
+ ids = this.value;
579
+ }
580
+ if (clickNode) {
581
+ let inx = this.selectedNodes.findIndex((x) => x.id === clickNode.id);
582
+ if (inx >= 0) {
583
+ XRemove(this.selectedNodes, (x) => x.id === clickNode.id);
584
+ }
585
+ else {
586
+ this.selectedNodes.push(clickNode);
587
+ }
588
+ }
589
+ else {
590
+ for (let id of ids) {
591
+ let node = this.nodes.find((x) => x.id === id);
592
+ if (node)
593
+ selected.push(node);
594
+ }
595
+ this.selectedNodes = selected;
596
+ }
597
+ if (this.showPath) {
598
+ for (let node of this.selectedNodes) {
599
+ const parents = this.getParentPath(node);
600
+ node.path = parents.map((x) => x.label).join(this.separator);
601
+ }
602
+ }
603
+ this.setDisplayNodes();
604
+ this.displayValue = this.selectedNodes.map((x) => x.label).join(this.separator);
605
+ this.valueTplContext.$node = [...this.selectedNodes];
606
+ }
607
+ }
608
+ else {
609
+ let node = this.nodes.find((x) => x.id === this.value);
610
+ if (node) {
611
+ if (this.showPath) {
612
+ const parents = this.getParentPath(node);
613
+ this.displayValue = parents.map((x) => x.label).join(this.separator);
614
+ }
615
+ else {
616
+ this.displayValue = node.label;
617
+ }
618
+ this.valueTplContext.$node = node;
619
+ }
620
+ else {
621
+ this.displayValue = '';
622
+ this.valueTplContext.$node = null;
623
+ }
624
+ }
625
+ this.cdr.detectChanges();
626
+ }
627
+ }
628
+ getParentPath(node) {
629
+ let res = [node];
630
+ const getParent = (nd) => {
631
+ let parent = this.nodes.find((x) => nd.pid && x.id === nd.pid);
632
+ if (parent) {
633
+ res = [parent, ...res];
634
+ getParent(parent);
635
+ }
636
+ };
637
+ getParent(node);
638
+ return res;
639
+ }
640
+ closeNode(event, node, index) {
641
+ let inx = -1;
642
+ if (this.objectArray) {
643
+ inx = this.value.findIndex((y) => y.id === node.id);
644
+ }
645
+ else {
646
+ inx = this.value.findIndex((y) => y === node.id);
647
+ }
648
+ if (inx >= 0) {
649
+ this.value.splice(inx, 1);
650
+ this.valueChange.next(this.value);
651
+ if (this.onChange)
652
+ this.onChange(this.value);
653
+ this.selectedNodes.splice(index, 1);
654
+ this.setDisplayNodes();
655
+ }
656
+ event.stopPropagation();
657
+ }
658
+ setDisplayNodes() {
659
+ if (!this.multiple)
660
+ return;
661
+ const maxlen = this.selectedNodes.length;
662
+ let len = 0;
663
+ if (!this.maxTagCount) {
664
+ len = maxlen;
665
+ }
666
+ else {
667
+ len = maxlen > Number(this.maxTagCount) ? Number(this.maxTagCount) : maxlen;
668
+ }
669
+ let more = maxlen - len;
670
+ more = more < 0 ? 0 : more;
671
+ this.displayNodes = this.selectedNodes.slice(0, len);
672
+ this.showDisplayMore = more > 0;
673
+ if (XIsString(this.getMaxTagContent)) {
674
+ this.displayMore = more > 0 ? this.getMaxTagContent.replace(/\{\{surplus\}\}/g, `${more}`) : '';
675
+ }
676
+ else {
677
+ this.selectedSurplus = more;
678
+ this.selectedTotal = maxlen;
679
+ }
680
+ setTimeout(() => this.setMutipleInputSize());
681
+ }
682
+ portalAttached() {
683
+ return this.portal?.overlayRef?.hasAttached();
684
+ }
685
+ closePortal() {
686
+ if (this.portalAttached()) {
687
+ this.portal?.overlayRef?.detach();
688
+ this.active = false;
689
+ this.multipleSearchValue = '';
690
+ this.cdr.detectChanges();
691
+ return true;
692
+ }
693
+ return false;
694
+ }
695
+ destroyPortal() {
696
+ this.portal?.overlayRef?.dispose();
697
+ }
698
+ showPortal(click = false) {
699
+ if (this.disabled || this.iconSpin || this.animating)
700
+ return;
701
+ this.active = true;
702
+ if ((this.async && XIsObservable(this.data) && this.nodes.length === 0) || XIsFunction(this.data)) {
703
+ this.icon = 'fto-loader';
704
+ this.iconSpin = true;
705
+ this.inputCom.cdr.detectChanges();
706
+ XSetData(this.data, this._unSubject, true, click ? '' : this.displayValue).subscribe((x) => {
707
+ this.icon = 'fto-chevron-down';
708
+ this.iconSpin = false;
709
+ if (!this.enter && this.clearable) {
710
+ this.showClearable = false;
711
+ }
712
+ this.inputCom.cdr.detectChanges();
713
+ this.nodes = x;
714
+ this.dataChange.next(this.nodes);
715
+ if (!this.search)
716
+ this.setDisplayValue();
717
+ this.createPortal();
718
+ this.cdr.detectChanges();
719
+ });
720
+ }
721
+ else {
722
+ this.dataChange.next(this.nodes);
723
+ this.createPortal();
724
+ }
725
+ if (this.search && this.multiple) {
726
+ this.multipleInput.inputFocus();
727
+ }
728
+ else {
729
+ this.inputCom.inputFocus();
730
+ }
731
+ }
732
+ createPortal() {
733
+ this.box = this.inputCom.inputRef.nativeElement.getBoundingClientRect();
734
+ const config = {
735
+ backdropClass: '',
736
+ width: this.box.width,
737
+ positionStrategy: this.setPlacement(),
738
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
739
+ };
740
+ this.setPosition(config);
741
+ this.portal = this.portalService.attach({
742
+ content: XTreeSelectPortalComponent,
743
+ viewContainerRef: this.viewContainerRef,
744
+ overlayConfig: config
745
+ });
746
+ this.portal.overlayRef
747
+ ?.outsidePointerEvents()
748
+ .pipe(takeUntil(this._unSubject))
749
+ .subscribe(() => {
750
+ this.setDisplayValue();
751
+ this.closeSubject.next();
752
+ });
753
+ this.setInstance();
754
+ }
755
+ setPosition(config) {
756
+ let position = config.positionStrategy;
757
+ position.positionChanges.pipe(takeUntil(this._unSubject)).subscribe((pos) => {
758
+ const place = XPortalConnectedPosition.get(pos.connectionPair);
759
+ place !== this.placement && this.positionChange.next(place);
760
+ });
761
+ }
762
+ setInstance() {
763
+ let componentRef = this.portal.componentRef;
764
+ if (!componentRef)
765
+ return;
766
+ Object.assign(componentRef.instance, {
767
+ data: this.nodes,
768
+ value: this.value,
769
+ placement: this.placement,
770
+ multiple: this.multiple,
771
+ selectAll: this.selectAll,
772
+ nodeTpl: this.nodeTpl,
773
+ valueChange: this.valueChange,
774
+ positionChange: this.positionChange,
775
+ closeSubject: this.closeSubject,
776
+ keydownSubject: this.keydownSubject,
777
+ dataChange: this.dataChange,
778
+ inputCom: this.inputCom,
779
+ portalMaxHeight: this.portalMaxHeight,
780
+ objectArray: this.objectArray,
781
+ selectAllText: this.selectAllText,
782
+ caseSensitive: this.caseSensitive,
783
+ search: this.search,
784
+ virtualScroll: this.virtualScroll,
785
+ size: this.size,
786
+ expandedLevel: this.expandedLevel,
787
+ inputChange: this.inputChange,
788
+ destroyPortal: () => this.destroyPortal(),
789
+ nodeEmit: (node, value) => this.nodeClick(node, value),
790
+ animating: (ing) => (this.animating = ing)
791
+ });
792
+ componentRef.changeDetectorRef.detectChanges();
793
+ }
794
+ nodeClick(node, value) {
795
+ if (this.multiple) {
796
+ if (this.value.length === 0) {
797
+ this.value = value;
798
+ }
799
+ if (this.multipleInput) {
800
+ const input = this.multipleInput.elementRef.nativeElement;
801
+ this.renderer.setStyle(input, 'width', '2rem');
802
+ }
803
+ if (this.search && this.multipleSearchValue !== '') {
804
+ this.multipleSearchValue = '';
805
+ this.inputChange.next('');
806
+ this.valueChange.next([...this.value]);
807
+ }
808
+ this.setDisplayValue(node);
809
+ }
810
+ else {
811
+ node = node;
812
+ if (this.showPath) {
813
+ const parents = this.getParentPath(node);
814
+ this.displayValue = parents.map((x) => x.label).join(this.separator);
815
+ }
816
+ else {
817
+ this.displayValue = node.label;
818
+ }
819
+ this.valueTplContext.$node = node;
820
+ this.value = node.id;
821
+ this.closeSubject.next();
822
+ }
823
+ if (this.search && this.multiple) {
824
+ this.multipleInput.inputFocus();
825
+ }
826
+ else {
827
+ this.inputCom.inputFocus();
828
+ }
829
+ if (this.onChange)
830
+ this.onChange(this.value);
831
+ this.formControlValidator();
832
+ this.cdr.detectChanges();
833
+ }
834
+ selectAllNodes(value) {
835
+ this.value = value;
836
+ }
837
+ setPlacement() {
838
+ return this.portalService.setPlacement({
839
+ elementRef: this.inputCom.inputRef,
840
+ placement: [this.placement, 'bottom', 'top'],
841
+ transformOriginOn: 'x-tree-select-portal'
842
+ });
843
+ }
844
+ setPortal() {
845
+ this.portalAttached() && this.portal?.overlayRef?.updatePositionStrategy(this.setPlacement());
846
+ }
847
+ formControlChanges() {
848
+ this.setData();
849
+ this.ngOnInit();
850
+ this.writeValue(this.value);
851
+ this.ngAfterViewInit();
852
+ this.cdr.detectChanges();
853
+ }
854
+ onKeydown($event) {
855
+ this.keydownSubject.next($event);
856
+ if ($event.keyCode !== TAB && !this.search) {
857
+ $event.preventDefault();
858
+ }
859
+ }
860
+ onFocus(_event) {
861
+ if (this.search && this.multiple) {
862
+ this.multipleInput.inputFocus();
863
+ }
864
+ else {
865
+ this.inputCom.inputFocus();
866
+ }
867
+ }
868
+ onInput(_event) {
869
+ this.formControlValidator();
870
+ setTimeout(() => this.inputChange.next(this.multiple ? this.multipleSearchValue : this.displayValue));
871
+ }
872
+ }
873
+ /** @nocollapse */ XTreeSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1$1.XPortalService }, { token: i0.ViewContainerRef }, { token: i2.Overlay }, { token: i1.XI18nService }, { token: i4$1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
874
+ /** @nocollapse */ XTreeSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XTreeSelectComponent, selector: "x-tree-select", providers: [XValueAccessor(XTreeSelectComponent)], viewQueries: [{ propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, static: true }, { propertyName: "treeSelect", first: true, predicate: ["treeSelect"], descendants: true, static: true }, { propertyName: "multipleValueTpl", first: true, predicate: ["multipleValueTpl"], descendants: true, static: true }, { propertyName: "multipleInput", first: true, predicate: ["multipleInput"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #treeSelect class=\"x-tree-select\" [class.x-tree-select-multiple]=\"multiple\">\r\n <div class=\"x-tree-select-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label\"\r\n [labelWidth]=\"labelWidth\"\r\n [labelAlign]=\"labelAlign\"\r\n [justify]=\"justify\"\r\n [align]=\"align\"\r\n [direction]=\"direction\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled\"\r\n [validator]=\"validator\"\r\n [icon]=\"icon\"\r\n [iconSpin]=\"iconSpin\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"getReadonly\"\r\n [clearable]=\"showClearable\"\r\n [(ngModel)]=\"displayValue\"\r\n [valueTpl]=\"valueTpl ? valueTpl : nodeTpl\"\r\n [valueTplContext]=\"valueTplContext\"\r\n [size]=\"size\"\r\n [bordered]=\"bordered\"\r\n [before]=\"before\"\r\n [after]=\"after\"\r\n [pattern]=\"pattern\"\r\n [message]=\"message\"\r\n [pointer]=\"true\"\r\n [inputPadding]=\"inputPadding\"\r\n [(active)]=\"active\"\r\n (clearEmit)=\"clearEmit()\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xInput)=\"onInput($event)\"\r\n (xFocus)=\"onFocus($event)\"\r\n (xClick)=\"showPortal(true)\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n (xComposition)=\"composition = $event\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template #multipleValueTpl>\r\n <x-tag\r\n [@.disabled]=\"true\"\r\n *ngFor=\"let node of displayNodes; index as i\"\r\n [closable]=\"!disabled\"\r\n (close)=\"closeNode($event, node, i)\"\r\n [size]=\"size\"\r\n >{{ showPath ? node.path : node.label }}</x-tag\r\n >\r\n <x-tag [@.disabled]=\"true\" *ngIf=\"showDisplayMore\" [size]=\"size\">\r\n <ng-container *xOutlet=\"getMaxTagContent; context: { $surplus: selectedSurplus, $total: selectedTotal }\">{{\r\n displayMore\r\n }}</ng-container>\r\n </x-tag>\r\n <x-input\r\n #multipleInput\r\n *ngIf=\"search\"\r\n bordered=\"false\"\r\n [size]=\"size\"\r\n inputPadding=\"0.275\"\r\n [(ngModel)]=\"multipleSearchValue\"\r\n (xInput)=\"onInput($event)\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n ></x-input>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";x-tree-select{display:inline-block;width:12rem}.x-tree-select{margin:0;padding:0;width:100%}.x-tree-select x-input{width:100%}.x-tree-select-multiple .x-input-value-template-value{display:flex;align-items:center;margin-bottom:.125rem;flex-wrap:wrap;width:initial;height:initial!important}.x-tree-select-multiple .x-input-value-template-value>x-tag{display:inline-flex;margin-left:.0625rem;margin-top:.125rem}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-big{height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-big>.x-icon{right:calc(-var(--x-padding-large)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-large{height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-large>.x-icon{right:calc(-var(--x-padding-medium)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-medium{height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-medium>.x-icon{right:calc(-var(--x-padding-small)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-small{height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-small>.x-icon{right:calc(-var(--x-padding-mini)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-mini{height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-mini>.x-icon{right:-.0625rem}.x-tree-select-multiple .x-input-value-template-value>x-input{margin-top:.125rem;width:5rem;min-width:3rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-large);line-height:var(--x-height-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-small);line-height:var(--x-height-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-max-length{height:1.125rem;line-height:1.125rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>label{height:1.125rem;line-height:1.125rem}.x-tree-select-portal{margin:.0625rem 0;font-size:var(--x-font-size);color:var(--x-text);border:var(--x-border-width) var(--x-border-style) var(--x-border);width:100%;border-radius:var(--x-border-radius);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);position:relative;display:flex;flex-direction:column;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}.x-tree-select-portal x-tree{width:100%}.x-tree-select-portal x-empty{margin:1rem;display:block}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.XInputComponent, selector: "x-input" }, { kind: "component", type: i8.XTagComponent, selector: "x-tag" }, { kind: "directive", type: i9.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectComponent, decorators: [{
876
+ type: Component,
877
+ args: [{ selector: `${XTreeSelectPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XTreeSelectComponent)], template: "<div #treeSelect class=\"x-tree-select\" [class.x-tree-select-multiple]=\"multiple\">\r\n <div class=\"x-tree-select-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label\"\r\n [labelWidth]=\"labelWidth\"\r\n [labelAlign]=\"labelAlign\"\r\n [justify]=\"justify\"\r\n [align]=\"align\"\r\n [direction]=\"direction\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled\"\r\n [validator]=\"validator\"\r\n [icon]=\"icon\"\r\n [iconSpin]=\"iconSpin\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"getReadonly\"\r\n [clearable]=\"showClearable\"\r\n [(ngModel)]=\"displayValue\"\r\n [valueTpl]=\"valueTpl ? valueTpl : nodeTpl\"\r\n [valueTplContext]=\"valueTplContext\"\r\n [size]=\"size\"\r\n [bordered]=\"bordered\"\r\n [before]=\"before\"\r\n [after]=\"after\"\r\n [pattern]=\"pattern\"\r\n [message]=\"message\"\r\n [pointer]=\"true\"\r\n [inputPadding]=\"inputPadding\"\r\n [(active)]=\"active\"\r\n (clearEmit)=\"clearEmit()\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xInput)=\"onInput($event)\"\r\n (xFocus)=\"onFocus($event)\"\r\n (xClick)=\"showPortal(true)\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n (xComposition)=\"composition = $event\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template #multipleValueTpl>\r\n <x-tag\r\n [@.disabled]=\"true\"\r\n *ngFor=\"let node of displayNodes; index as i\"\r\n [closable]=\"!disabled\"\r\n (close)=\"closeNode($event, node, i)\"\r\n [size]=\"size\"\r\n >{{ showPath ? node.path : node.label }}</x-tag\r\n >\r\n <x-tag [@.disabled]=\"true\" *ngIf=\"showDisplayMore\" [size]=\"size\">\r\n <ng-container *xOutlet=\"getMaxTagContent; context: { $surplus: selectedSurplus, $total: selectedTotal }\">{{\r\n displayMore\r\n }}</ng-container>\r\n </x-tag>\r\n <x-input\r\n #multipleInput\r\n *ngIf=\"search\"\r\n bordered=\"false\"\r\n [size]=\"size\"\r\n inputPadding=\"0.275\"\r\n [(ngModel)]=\"multipleSearchValue\"\r\n (xInput)=\"onInput($event)\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n ></x-input>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";x-tree-select{display:inline-block;width:12rem}.x-tree-select{margin:0;padding:0;width:100%}.x-tree-select x-input{width:100%}.x-tree-select-multiple .x-input-value-template-value{display:flex;align-items:center;margin-bottom:.125rem;flex-wrap:wrap;width:initial;height:initial!important}.x-tree-select-multiple .x-input-value-template-value>x-tag{display:inline-flex;margin-left:.0625rem;margin-top:.125rem}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-big{height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-big>.x-icon{right:calc(-var(--x-padding-large)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-large{height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-large>.x-icon{right:calc(-var(--x-padding-medium)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-medium{height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-medium>.x-icon{right:calc(-var(--x-padding-small)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-small{height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-small>.x-icon{right:calc(-var(--x-padding-mini)/2)}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-mini{height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-tree-select-multiple .x-input-value-template-value>x-tag .x-tag-mini>.x-icon{right:-.0625rem}.x-tree-select-multiple .x-input-value-template-value>x-input{margin-top:.125rem;width:5rem;min-width:3rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-large);line-height:var(--x-height-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-big>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-large>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-small);line-height:var(--x-height-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-medium>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-small>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>input,.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>.x-input-max-length{height:1.125rem;line-height:1.125rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-tree-select-multiple .x-input-value-template-value>x-input .x-input-mini>label{height:1.125rem;line-height:1.125rem}.x-tree-select-portal{margin:.0625rem 0;font-size:var(--x-font-size);color:var(--x-text);border:var(--x-border-width) var(--x-border-style) var(--x-border);width:100%;border-radius:var(--x-border-radius);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);position:relative;display:flex;flex-direction:column;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}.x-tree-select-portal x-tree{width:100%}.x-tree-select-portal x-empty{margin:1rem;display:block}\n"] }]
878
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1$1.XPortalService }, { type: i0.ViewContainerRef }, { type: i2.Overlay }, { type: i1.XI18nService }, { type: i4$1.XConfigService }]; }, propDecorators: { inputCom: [{
879
+ type: ViewChild,
880
+ args: ['inputCom', { static: true }]
881
+ }], treeSelect: [{
882
+ type: ViewChild,
883
+ args: ['treeSelect', { static: true }]
884
+ }], multipleValueTpl: [{
885
+ type: ViewChild,
886
+ args: ['multipleValueTpl', { static: true }]
887
+ }], multipleInput: [{
888
+ type: ViewChild,
889
+ args: ['multipleInput']
890
+ }] } });
891
+
892
+ class XTreeSelectModule {
893
+ }
894
+ /** @nocollapse */ XTreeSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
895
+ /** @nocollapse */ XTreeSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, declarations: [XTreeSelectComponent, XTreeSelectPortalComponent, XTreeSelectProperty], imports: [CommonModule,
896
+ FormsModule,
897
+ ReactiveFormsModule,
898
+ XPortalModule,
899
+ XInputModule,
900
+ XListModule,
901
+ XBaseFormModule,
902
+ XTagModule,
903
+ XI18nModule,
904
+ XOutletModule,
905
+ XTreeModule,
906
+ XEmptyModule], exports: [XTreeSelectComponent, XTreeSelectPortalComponent] });
907
+ /** @nocollapse */ XTreeSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, imports: [CommonModule,
908
+ FormsModule,
909
+ ReactiveFormsModule,
910
+ XPortalModule,
911
+ XInputModule,
912
+ XListModule,
913
+ XBaseFormModule,
914
+ XTagModule,
915
+ XI18nModule,
916
+ XOutletModule,
917
+ XTreeModule,
918
+ XEmptyModule] });
919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, decorators: [{
920
+ type: NgModule,
921
+ args: [{
922
+ declarations: [XTreeSelectComponent, XTreeSelectPortalComponent, XTreeSelectProperty],
923
+ exports: [XTreeSelectComponent, XTreeSelectPortalComponent],
924
+ imports: [
925
+ CommonModule,
926
+ FormsModule,
927
+ ReactiveFormsModule,
928
+ XPortalModule,
929
+ XInputModule,
930
+ XListModule,
931
+ XBaseFormModule,
932
+ XTagModule,
933
+ XI18nModule,
934
+ XOutletModule,
935
+ XTreeModule,
936
+ XEmptyModule
937
+ ]
938
+ }]
939
+ }] });
940
+
941
+ /**
942
+ * Generated bundle index. Do not edit.
943
+ */
944
+
945
+ export { XTreeSelectComponent, XTreeSelectModule, XTreeSelectPortalComponent, XTreeSelectPortalPrefix, XTreeSelectPrefix, XTreeSelectProperty };
946
+ //# sourceMappingURL=ng-nest-ui-tree-select.mjs.map