@ng-nest/ui 14.0.6 → 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 (250) 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.component.d.ts +1 -0
  21. package/calendar/calendar.property.d.ts +18 -3
  22. package/calendar/examples/en_US/default/card/README.md +6 -0
  23. package/calendar/examples/en_US/default/header/README.md +6 -0
  24. package/calendar/examples/zh_CN/default/card/README.md +6 -0
  25. package/calendar/examples/zh_CN/default/header/README.md +6 -0
  26. package/collapse/collapse.property.d.ts +6 -1
  27. package/collapse/examples/en_US/default/disabled/README.md +6 -0
  28. package/collapse/examples/zh_CN/default/disabled/README.md +6 -0
  29. package/core/animation/badge.d.ts +1 -0
  30. package/core/config/config.d.ts +30 -0
  31. package/core/interfaces/identify.type.d.ts +2 -0
  32. package/core/interfaces/layout.type.d.ts +15 -0
  33. package/esm2020/avatar/avatar-group.component.mjs +19 -0
  34. package/esm2020/avatar/avatar.component.mjs +91 -11
  35. package/esm2020/avatar/avatar.module.mjs +6 -5
  36. package/esm2020/avatar/avatar.property.mjs +31 -3
  37. package/esm2020/avatar/public-api.mjs +2 -1
  38. package/esm2020/badge/badge.component.mjs +24 -8
  39. package/esm2020/badge/badge.property.mjs +7 -2
  40. package/esm2020/calendar/calendar.component.mjs +8 -4
  41. package/esm2020/calendar/calendar.property.mjs +11 -2
  42. package/esm2020/collapse/collapse-panel.component.mjs +3 -3
  43. package/esm2020/collapse/collapse.property.mjs +7 -2
  44. package/esm2020/core/animation/badge.mjs +17 -1
  45. package/esm2020/core/config/config.mjs +1 -1
  46. package/esm2020/core/interfaces/identify.type.mjs +1 -1
  47. package/esm2020/core/interfaces/layout.type.mjs +1 -1
  48. package/esm2020/date-picker/date-picker.component.mjs +5 -1
  49. package/esm2020/form/form.component.mjs +3 -3
  50. package/esm2020/i18n/i18n.property.mjs +1 -1
  51. package/esm2020/i18n/languages/en_US.mjs +8 -1
  52. package/esm2020/i18n/languages/zh_CN.mjs +8 -1
  53. package/esm2020/i18n/languages/zh_TW.mjs +8 -1
  54. package/esm2020/image/image-group.component.mjs +18 -0
  55. package/esm2020/image/image-preview.component.mjs +136 -0
  56. package/esm2020/image/image.component.mjs +89 -0
  57. package/esm2020/image/image.module.mjs +27 -0
  58. package/esm2020/image/image.property.mjs +82 -0
  59. package/esm2020/image/ng-nest-ui-image.mjs +5 -0
  60. package/esm2020/image/public-api.mjs +6 -0
  61. package/esm2020/index.mjs +4 -1
  62. package/esm2020/keyword/keyword.directive.mjs +66 -0
  63. package/esm2020/keyword/keyword.module.mjs +19 -0
  64. package/esm2020/keyword/keyword.property.mjs +41 -0
  65. package/esm2020/keyword/ng-nest-ui-keyword.mjs +5 -0
  66. package/esm2020/keyword/public-api.mjs +4 -0
  67. package/esm2020/list/list-option.component.mjs +4 -4
  68. package/esm2020/list/list.component.mjs +71 -10
  69. package/esm2020/list/list.module.mjs +12 -4
  70. package/esm2020/list/list.property.mjs +54 -3
  71. package/esm2020/select/select-portal.component.mjs +6 -3
  72. package/esm2020/select/select.component.mjs +31 -23
  73. package/esm2020/select/select.property.mjs +8 -2
  74. package/esm2020/table/table-head.component.mjs +2 -2
  75. package/esm2020/table/table.component.mjs +4 -4
  76. package/esm2020/textarea/textarea.component.mjs +2 -2
  77. package/esm2020/timeline/timeline.component.mjs +6 -4
  78. package/esm2020/tree/tree-node.component.mjs +52 -27
  79. package/esm2020/tree/tree.component.mjs +173 -58
  80. package/esm2020/tree/tree.module.mjs +5 -4
  81. package/esm2020/tree/tree.property.mjs +38 -2
  82. package/esm2020/tree-select/ng-nest-ui-tree-select.mjs +5 -0
  83. package/esm2020/tree-select/public-api.mjs +5 -0
  84. package/esm2020/tree-select/tree-select-portal.component.mjs +110 -0
  85. package/esm2020/tree-select/tree-select.component.mjs +632 -0
  86. package/esm2020/tree-select/tree-select.module.mjs +65 -0
  87. package/esm2020/tree-select/tree-select.property.mjs +153 -0
  88. package/esm2020/upload/upload.component.mjs +9 -6
  89. package/esm2020/upload/upload.module.mjs +12 -4
  90. package/esm2020/upload/upload.property.mjs +10 -3
  91. package/fesm2015/ng-nest-ui-avatar.mjs +143 -17
  92. package/fesm2015/ng-nest-ui-avatar.mjs.map +1 -1
  93. package/fesm2015/ng-nest-ui-badge.mjs +29 -8
  94. package/fesm2015/ng-nest-ui-badge.mjs.map +1 -1
  95. package/fesm2015/ng-nest-ui-calendar.mjs +17 -4
  96. package/fesm2015/ng-nest-ui-calendar.mjs.map +1 -1
  97. package/fesm2015/ng-nest-ui-collapse.mjs +8 -3
  98. package/fesm2015/ng-nest-ui-collapse.mjs.map +1 -1
  99. package/fesm2015/ng-nest-ui-core.mjs +17 -1
  100. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  101. package/fesm2015/ng-nest-ui-date-picker.mjs +4 -0
  102. package/fesm2015/ng-nest-ui-date-picker.mjs.map +1 -1
  103. package/fesm2015/ng-nest-ui-form.mjs +2 -2
  104. package/fesm2015/ng-nest-ui-form.mjs.map +1 -1
  105. package/fesm2015/ng-nest-ui-i18n.mjs +21 -0
  106. package/fesm2015/ng-nest-ui-i18n.mjs.map +1 -1
  107. package/fesm2015/ng-nest-ui-image.mjs +340 -0
  108. package/fesm2015/ng-nest-ui-image.mjs.map +1 -0
  109. package/fesm2015/ng-nest-ui-keyword.mjs +125 -0
  110. package/fesm2015/ng-nest-ui-keyword.mjs.map +1 -0
  111. package/fesm2015/ng-nest-ui-list.mjs +138 -17
  112. package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
  113. package/fesm2015/ng-nest-ui-select.mjs +42 -25
  114. package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
  115. package/fesm2015/ng-nest-ui-table.mjs +4 -4
  116. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  117. package/fesm2015/ng-nest-ui-textarea.mjs +2 -2
  118. package/fesm2015/ng-nest-ui-textarea.mjs.map +1 -1
  119. package/fesm2015/ng-nest-ui-timeline.mjs +5 -3
  120. package/fesm2015/ng-nest-ui-timeline.mjs.map +1 -1
  121. package/fesm2015/ng-nest-ui-tree-select.mjs +951 -0
  122. package/fesm2015/ng-nest-ui-tree-select.mjs.map +1 -0
  123. package/fesm2015/ng-nest-ui-tree.mjs +271 -94
  124. package/fesm2015/ng-nest-ui-tree.mjs.map +1 -1
  125. package/fesm2015/ng-nest-ui-upload.mjs +28 -10
  126. package/fesm2015/ng-nest-ui-upload.mjs.map +1 -1
  127. package/fesm2015/ng-nest-ui.mjs +3 -0
  128. package/fesm2015/ng-nest-ui.mjs.map +1 -1
  129. package/fesm2020/ng-nest-ui-avatar.mjs +140 -17
  130. package/fesm2020/ng-nest-ui-avatar.mjs.map +1 -1
  131. package/fesm2020/ng-nest-ui-badge.mjs +29 -8
  132. package/fesm2020/ng-nest-ui-badge.mjs.map +1 -1
  133. package/fesm2020/ng-nest-ui-calendar.mjs +17 -4
  134. package/fesm2020/ng-nest-ui-calendar.mjs.map +1 -1
  135. package/fesm2020/ng-nest-ui-collapse.mjs +8 -3
  136. package/fesm2020/ng-nest-ui-collapse.mjs.map +1 -1
  137. package/fesm2020/ng-nest-ui-core.mjs +17 -1
  138. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  139. package/fesm2020/ng-nest-ui-date-picker.mjs +4 -0
  140. package/fesm2020/ng-nest-ui-date-picker.mjs.map +1 -1
  141. package/fesm2020/ng-nest-ui-form.mjs +2 -2
  142. package/fesm2020/ng-nest-ui-form.mjs.map +1 -1
  143. package/fesm2020/ng-nest-ui-i18n.mjs +21 -0
  144. package/fesm2020/ng-nest-ui-i18n.mjs.map +1 -1
  145. package/fesm2020/ng-nest-ui-image.mjs +336 -0
  146. package/fesm2020/ng-nest-ui-image.mjs.map +1 -0
  147. package/fesm2020/ng-nest-ui-keyword.mjs +125 -0
  148. package/fesm2020/ng-nest-ui-keyword.mjs.map +1 -0
  149. package/fesm2020/ng-nest-ui-list.mjs +137 -17
  150. package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
  151. package/fesm2020/ng-nest-ui-select.mjs +42 -25
  152. package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
  153. package/fesm2020/ng-nest-ui-table.mjs +4 -4
  154. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  155. package/fesm2020/ng-nest-ui-textarea.mjs +2 -2
  156. package/fesm2020/ng-nest-ui-textarea.mjs.map +1 -1
  157. package/fesm2020/ng-nest-ui-timeline.mjs +5 -3
  158. package/fesm2020/ng-nest-ui-timeline.mjs.map +1 -1
  159. package/fesm2020/ng-nest-ui-tree-select.mjs +946 -0
  160. package/fesm2020/ng-nest-ui-tree-select.mjs.map +1 -0
  161. package/fesm2020/ng-nest-ui-tree.mjs +267 -91
  162. package/fesm2020/ng-nest-ui-tree.mjs.map +1 -1
  163. package/fesm2020/ng-nest-ui-upload.mjs +28 -10
  164. package/fesm2020/ng-nest-ui-upload.mjs.map +1 -1
  165. package/fesm2020/ng-nest-ui.mjs +3 -0
  166. package/fesm2020/ng-nest-ui.mjs.map +1 -1
  167. package/i18n/i18n.property.d.ts +9 -0
  168. package/i18n/languages/en_US.d.ts +7 -0
  169. package/i18n/languages/zh_CN.d.ts +7 -0
  170. package/i18n/languages/zh_TW.d.ts +7 -0
  171. package/image/examples/en_US/default/README.md +4 -0
  172. package/image/examples/en_US/default/default/README.md +6 -0
  173. package/image/examples/en_US/default/fallback/README.md +6 -0
  174. package/image/examples/en_US/default/group/README.md +6 -0
  175. package/image/examples/en_US/default/placeholder/README.md +6 -0
  176. package/image/examples/zh_CN/default/README.md +4 -0
  177. package/image/examples/zh_CN/default/default/README.md +6 -0
  178. package/image/examples/zh_CN/default/fallback/README.md +6 -0
  179. package/image/examples/zh_CN/default/group/README.md +6 -0
  180. package/image/examples/zh_CN/default/placeholder/README.md +6 -0
  181. package/image/image-group.component.d.ts +8 -0
  182. package/image/image-preview.component.d.ts +39 -0
  183. package/image/image.component.d.ts +29 -0
  184. package/image/image.module.d.ts +17 -0
  185. package/image/image.property.d.ts +112 -0
  186. package/image/index.d.ts +5 -0
  187. package/image/public-api.d.ts +5 -0
  188. package/index.d.ts +3 -0
  189. package/keyword/index.d.ts +5 -0
  190. package/keyword/keyword.directive.d.ts +19 -0
  191. package/keyword/keyword.module.d.ts +9 -0
  192. package/keyword/keyword.property.d.ts +40 -0
  193. package/keyword/public-api.d.ts +3 -0
  194. package/list/examples/en_US/default/scroll/README.md +8 -0
  195. package/list/examples/zh_CN/default/scroll/README.md +8 -0
  196. package/list/list-option.component.d.ts +0 -1
  197. package/list/list.component.d.ts +13 -1
  198. package/list/list.module.d.ts +3 -1
  199. package/list/list.property.d.ts +62 -3
  200. package/package.json +25 -1
  201. package/select/examples/en_US/default/default/README.md +1 -2
  202. package/select/examples/zh_CN/default/default/README.md +1 -2
  203. package/select/select-portal.component.d.ts +5 -1
  204. package/select/select.component.d.ts +2 -2
  205. package/select/select.property.d.ts +6 -1
  206. package/style/core/index.css +29 -0
  207. package/style/core/index.css.map +1 -1
  208. package/style/directives/index.scss +1 -0
  209. package/style/directives/keyword/index.scss +6 -0
  210. package/style/directives/keyword/mixin.scss +24 -0
  211. package/style/directives/keyword/param.scss +3 -0
  212. package/tree/tree-node.component.d.ts +4 -4
  213. package/tree/tree.component.d.ts +13 -1
  214. package/tree/tree.module.d.ts +2 -1
  215. package/tree/tree.property.d.ts +44 -14
  216. package/tree-select/examples/en_US/default/README.md +4 -0
  217. package/tree-select/examples/en_US/default/async/README.md +6 -0
  218. package/tree-select/examples/en_US/default/bordered/README.md +6 -0
  219. package/tree-select/examples/en_US/default/custom/README.md +6 -0
  220. package/tree-select/examples/en_US/default/default/README.md +6 -0
  221. package/tree-select/examples/en_US/default/disabled/README.md +6 -0
  222. package/tree-select/examples/en_US/default/label/README.md +6 -0
  223. package/tree-select/examples/en_US/default/multiple/README.md +6 -0
  224. package/tree-select/examples/en_US/default/path/README.md +6 -0
  225. package/tree-select/examples/en_US/default/required/README.md +6 -0
  226. package/tree-select/examples/en_US/default/scroll/README.md +6 -0
  227. package/tree-select/examples/en_US/default/search/README.md +7 -0
  228. package/tree-select/examples/en_US/default/size/README.md +6 -0
  229. package/tree-select/examples/zh_CN/default/README.md +4 -0
  230. package/tree-select/examples/zh_CN/default/async/README.md +6 -0
  231. package/tree-select/examples/zh_CN/default/bordered/README.md +6 -0
  232. package/tree-select/examples/zh_CN/default/custom/README.md +6 -0
  233. package/tree-select/examples/zh_CN/default/default/README.md +6 -0
  234. package/tree-select/examples/zh_CN/default/disabled/README.md +6 -0
  235. package/tree-select/examples/zh_CN/default/label/README.md +6 -0
  236. package/tree-select/examples/zh_CN/default/multiple/README.md +6 -0
  237. package/tree-select/examples/zh_CN/default/path/README.md +6 -0
  238. package/tree-select/examples/zh_CN/default/required/README.md +6 -0
  239. package/tree-select/examples/zh_CN/default/scroll/README.md +6 -0
  240. package/tree-select/examples/zh_CN/default/search/README.md +7 -0
  241. package/tree-select/examples/zh_CN/default/size/README.md +6 -0
  242. package/tree-select/index.d.ts +5 -0
  243. package/tree-select/public-api.d.ts +4 -0
  244. package/tree-select/tree-select-portal.component.d.ts +62 -0
  245. package/tree-select/tree-select.component.d.ts +101 -0
  246. package/tree-select/tree-select.module.d.ts +20 -0
  247. package/tree-select/tree-select.property.d.ts +202 -0
  248. package/upload/upload.component.d.ts +1 -1
  249. package/upload/upload.module.d.ts +3 -1
  250. package/upload/upload.property.d.ts +13 -3
@@ -0,0 +1,951 @@
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
+ var _a;
375
+ this._unSubject.next();
376
+ this._unSubject.unsubscribe();
377
+ (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
378
+ }
379
+ setClassMap() {
380
+ XClearClass(this.labelMap);
381
+ this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;
382
+ }
383
+ setData() {
384
+ if (this.async)
385
+ return;
386
+ XSetData(this.data, this._unSubject).subscribe((x) => {
387
+ this.nodes = x;
388
+ this.dataChange.next(this.nodes);
389
+ this.setDisplayValue();
390
+ this.setPortal();
391
+ this.cdr.detectChanges();
392
+ });
393
+ }
394
+ setSubject() {
395
+ this.closeSubject.pipe(takeUntil(this._unSubject)).subscribe(() => {
396
+ this.closePortal();
397
+ });
398
+ this.inputChange.pipe(debounceTime(this.debounceTime), distinctUntilChanged(), takeUntil(this._unSubject)).subscribe((x) => {
399
+ this.modelChange(x);
400
+ });
401
+ this.keydownSubject.pipe(throttleTime(10), takeUntil(this._unSubject)).subscribe((x) => {
402
+ const keyCode = x.keyCode;
403
+ if (!this.portalAttached() && [DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, MAC_ENTER, BACKSPACE].includes(keyCode)) {
404
+ this.inputChange.next(this.displayValue);
405
+ }
406
+ // if (this.portalAttached() && [ESCAPE].includes(keyCode)) {
407
+ // this.closeSubject.next();
408
+ // }
409
+ });
410
+ this.multipleInputSizeChange.pipe(distinctUntilChanged(), takeUntil(this._unSubject)).subscribe((x) => {
411
+ var _a;
412
+ if (this.multipleInput) {
413
+ const input = (_a = this.multipleInput) === null || _a === void 0 ? void 0 : _a.elementRef.nativeElement;
414
+ this.renderer.setStyle(input, 'width', `${x}px`);
415
+ }
416
+ });
417
+ }
418
+ setMutipleInputSize() {
419
+ var _a, _b;
420
+ const ivf = this.inputCom.inputValueRef.nativeElement;
421
+ let { clientWidth, scrollHeight } = ivf;
422
+ const len = ivf.children.length;
423
+ let lastRowTagTop = -1;
424
+ let lines = 1;
425
+ let rowTagTop = -1;
426
+ let lastRowTagsWidth = 0;
427
+ let marginLeft = 0;
428
+ let marginTop = 0;
429
+ for (let i = len - 1; i >= 0; i--) {
430
+ const ele = ivf.children[i];
431
+ if (ele.tagName === 'X-TAG') {
432
+ const { offsetTop, offsetWidth } = ele;
433
+ const style = getComputedStyle(ele);
434
+ marginLeft = Number(style.marginLeft.replace('px', ''));
435
+ marginTop = Number(style.marginTop.replace('px', ''));
436
+ if (rowTagTop === -1) {
437
+ rowTagTop = offsetTop;
438
+ }
439
+ else if (rowTagTop !== offsetTop) {
440
+ lines++;
441
+ rowTagTop = offsetTop;
442
+ }
443
+ if (lastRowTagTop === -1) {
444
+ lastRowTagTop = offsetTop;
445
+ }
446
+ if (lastRowTagTop === offsetTop) {
447
+ lastRowTagsWidth += offsetWidth + marginLeft;
448
+ }
449
+ }
450
+ }
451
+ const height = scrollHeight + (lines > 1 ? marginTop : 0);
452
+ this.renderer.setStyle(this.inputCom.inputRef.nativeElement, 'height', `${height}px`);
453
+ if (this.multipleInput) {
454
+ this.multipleInputSizeChange.next(clientWidth - lastRowTagsWidth - marginLeft);
455
+ }
456
+ (_b = (_a = this.portal) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePosition();
457
+ }
458
+ menter() {
459
+ this.enter = true;
460
+ if (this.disabled || !this.clearable || this.iconSpin)
461
+ return;
462
+ if (!XIsEmpty(this.displayValue)) {
463
+ this.icon = '';
464
+ this.showClearable = true;
465
+ this.cdr.detectChanges();
466
+ }
467
+ }
468
+ mleave() {
469
+ this.enter = false;
470
+ if (this.disabled || !this.clearable || this.iconSpin)
471
+ return;
472
+ if (this.clearable) {
473
+ this.icon = 'fto-chevron-down';
474
+ this.showClearable = false;
475
+ this.cdr.detectChanges();
476
+ }
477
+ }
478
+ modelChange(value) {
479
+ if (XIsFunction(this.data)) {
480
+ if (!this.portalAttached()) {
481
+ this.showPortal();
482
+ }
483
+ this.icon = 'fto-loader';
484
+ this.iconSpin = true;
485
+ this.cdr.detectChanges();
486
+ XSetData(this.data, this._unSubject, true, value).subscribe((x) => {
487
+ this.icon = '';
488
+ this.iconSpin = false;
489
+ if (!this.enter && this.clearable) {
490
+ this.showClearable = false;
491
+ }
492
+ this.nodes = x;
493
+ this.dataChange.next(this.nodes);
494
+ this.cdr.detectChanges();
495
+ });
496
+ return;
497
+ }
498
+ if (this.nodes) {
499
+ if (!this.portalAttached()) {
500
+ this.showPortal();
501
+ }
502
+ if (XIsEmpty(value)) {
503
+ this.searchNodes = [
504
+ ...this.nodes.map((x) => {
505
+ let res = Object.assign({}, x);
506
+ delete res.children;
507
+ delete res.childrenLoaded;
508
+ delete res.leaf;
509
+ return res;
510
+ })
511
+ ];
512
+ }
513
+ else {
514
+ this.setSearchNodes(value);
515
+ }
516
+ this.dataChange.next(this.searchNodes);
517
+ }
518
+ }
519
+ setSearchNodes(value) {
520
+ let nodes = [];
521
+ const getParent = (node) => {
522
+ if (XIsEmpty(node.pid))
523
+ return;
524
+ const parent = this.nodes.find((x) => x.id === node.pid);
525
+ parent.open = true;
526
+ if (!XIsEmpty(parent)) {
527
+ if (nodes.every((x) => x.id !== parent.id)) {
528
+ nodes.push(parent);
529
+ }
530
+ }
531
+ };
532
+ if (this.caseSensitive) {
533
+ nodes = this.nodes.filter((x) => x.label.indexOf(value) >= 0);
534
+ }
535
+ else {
536
+ nodes = this.nodes.filter((x) => x.label.toLowerCase().indexOf(value.toLowerCase()) >= 0);
537
+ }
538
+ for (let node of nodes) {
539
+ getParent(node);
540
+ }
541
+ this.searchNodes = nodes.map((x) => {
542
+ let res = Object.assign({}, x);
543
+ delete res.children;
544
+ delete res.childrenLoaded;
545
+ delete res.leaf;
546
+ return res;
547
+ });
548
+ }
549
+ clearEmit() {
550
+ this.value = this.multiple ? [] : '';
551
+ this.displayValue = '';
552
+ this.multipleSearchValue = '';
553
+ this.selectedNodes = [];
554
+ this.setDisplayNodes();
555
+ this.valueTplContext.$node = null;
556
+ this.mleave();
557
+ this.valueChange.next(this.value);
558
+ this.inputChange.next('');
559
+ if (this.onChange)
560
+ this.onChange(this.value);
561
+ }
562
+ setDisplayValue(clickNode) {
563
+ if (this.nodes.length > 0) {
564
+ if (this.multiple) {
565
+ if (XIsEmpty(this.value)) {
566
+ this.value = [];
567
+ this.displayValue = '';
568
+ this.selectedNodes = [];
569
+ this.displayNodes = [];
570
+ this.displayMore = '';
571
+ this.valueTplContext.$node = null;
572
+ this.setDisplayNodes();
573
+ }
574
+ else {
575
+ let ids = [];
576
+ let selected = [];
577
+ if (this.objectArray) {
578
+ ids = this.value.map((x) => x.id);
579
+ }
580
+ else {
581
+ ids = this.value;
582
+ }
583
+ if (clickNode) {
584
+ let inx = this.selectedNodes.findIndex((x) => x.id === clickNode.id);
585
+ if (inx >= 0) {
586
+ XRemove(this.selectedNodes, (x) => x.id === clickNode.id);
587
+ }
588
+ else {
589
+ this.selectedNodes.push(clickNode);
590
+ }
591
+ }
592
+ else {
593
+ for (let id of ids) {
594
+ let node = this.nodes.find((x) => x.id === id);
595
+ if (node)
596
+ selected.push(node);
597
+ }
598
+ this.selectedNodes = selected;
599
+ }
600
+ if (this.showPath) {
601
+ for (let node of this.selectedNodes) {
602
+ const parents = this.getParentPath(node);
603
+ node.path = parents.map((x) => x.label).join(this.separator);
604
+ }
605
+ }
606
+ this.setDisplayNodes();
607
+ this.displayValue = this.selectedNodes.map((x) => x.label).join(this.separator);
608
+ this.valueTplContext.$node = [...this.selectedNodes];
609
+ }
610
+ }
611
+ else {
612
+ let node = this.nodes.find((x) => x.id === this.value);
613
+ if (node) {
614
+ if (this.showPath) {
615
+ const parents = this.getParentPath(node);
616
+ this.displayValue = parents.map((x) => x.label).join(this.separator);
617
+ }
618
+ else {
619
+ this.displayValue = node.label;
620
+ }
621
+ this.valueTplContext.$node = node;
622
+ }
623
+ else {
624
+ this.displayValue = '';
625
+ this.valueTplContext.$node = null;
626
+ }
627
+ }
628
+ this.cdr.detectChanges();
629
+ }
630
+ }
631
+ getParentPath(node) {
632
+ let res = [node];
633
+ const getParent = (nd) => {
634
+ let parent = this.nodes.find((x) => nd.pid && x.id === nd.pid);
635
+ if (parent) {
636
+ res = [parent, ...res];
637
+ getParent(parent);
638
+ }
639
+ };
640
+ getParent(node);
641
+ return res;
642
+ }
643
+ closeNode(event, node, index) {
644
+ let inx = -1;
645
+ if (this.objectArray) {
646
+ inx = this.value.findIndex((y) => y.id === node.id);
647
+ }
648
+ else {
649
+ inx = this.value.findIndex((y) => y === node.id);
650
+ }
651
+ if (inx >= 0) {
652
+ this.value.splice(inx, 1);
653
+ this.valueChange.next(this.value);
654
+ if (this.onChange)
655
+ this.onChange(this.value);
656
+ this.selectedNodes.splice(index, 1);
657
+ this.setDisplayNodes();
658
+ }
659
+ event.stopPropagation();
660
+ }
661
+ setDisplayNodes() {
662
+ if (!this.multiple)
663
+ return;
664
+ const maxlen = this.selectedNodes.length;
665
+ let len = 0;
666
+ if (!this.maxTagCount) {
667
+ len = maxlen;
668
+ }
669
+ else {
670
+ len = maxlen > Number(this.maxTagCount) ? Number(this.maxTagCount) : maxlen;
671
+ }
672
+ let more = maxlen - len;
673
+ more = more < 0 ? 0 : more;
674
+ this.displayNodes = this.selectedNodes.slice(0, len);
675
+ this.showDisplayMore = more > 0;
676
+ if (XIsString(this.getMaxTagContent)) {
677
+ this.displayMore = more > 0 ? this.getMaxTagContent.replace(/\{\{surplus\}\}/g, `${more}`) : '';
678
+ }
679
+ else {
680
+ this.selectedSurplus = more;
681
+ this.selectedTotal = maxlen;
682
+ }
683
+ setTimeout(() => this.setMutipleInputSize());
684
+ }
685
+ portalAttached() {
686
+ var _a, _b;
687
+ return (_b = (_a = this.portal) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.hasAttached();
688
+ }
689
+ closePortal() {
690
+ var _a, _b;
691
+ if (this.portalAttached()) {
692
+ (_b = (_a = this.portal) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.detach();
693
+ this.active = false;
694
+ this.multipleSearchValue = '';
695
+ this.cdr.detectChanges();
696
+ return true;
697
+ }
698
+ return false;
699
+ }
700
+ destroyPortal() {
701
+ var _a, _b;
702
+ (_b = (_a = this.portal) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.dispose();
703
+ }
704
+ showPortal(click = false) {
705
+ if (this.disabled || this.iconSpin || this.animating)
706
+ return;
707
+ this.active = true;
708
+ if ((this.async && XIsObservable(this.data) && this.nodes.length === 0) || XIsFunction(this.data)) {
709
+ this.icon = 'fto-loader';
710
+ this.iconSpin = true;
711
+ this.inputCom.cdr.detectChanges();
712
+ XSetData(this.data, this._unSubject, true, click ? '' : this.displayValue).subscribe((x) => {
713
+ this.icon = 'fto-chevron-down';
714
+ this.iconSpin = false;
715
+ if (!this.enter && this.clearable) {
716
+ this.showClearable = false;
717
+ }
718
+ this.inputCom.cdr.detectChanges();
719
+ this.nodes = x;
720
+ this.dataChange.next(this.nodes);
721
+ if (!this.search)
722
+ this.setDisplayValue();
723
+ this.createPortal();
724
+ this.cdr.detectChanges();
725
+ });
726
+ }
727
+ else {
728
+ this.dataChange.next(this.nodes);
729
+ this.createPortal();
730
+ }
731
+ if (this.search && this.multiple) {
732
+ this.multipleInput.inputFocus();
733
+ }
734
+ else {
735
+ this.inputCom.inputFocus();
736
+ }
737
+ }
738
+ createPortal() {
739
+ var _a;
740
+ this.box = this.inputCom.inputRef.nativeElement.getBoundingClientRect();
741
+ const config = {
742
+ backdropClass: '',
743
+ width: this.box.width,
744
+ positionStrategy: this.setPlacement(),
745
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
746
+ };
747
+ this.setPosition(config);
748
+ this.portal = this.portalService.attach({
749
+ content: XTreeSelectPortalComponent,
750
+ viewContainerRef: this.viewContainerRef,
751
+ overlayConfig: config
752
+ });
753
+ (_a = this.portal.overlayRef) === null || _a === void 0 ? void 0 : _a.outsidePointerEvents().pipe(takeUntil(this._unSubject)).subscribe(() => {
754
+ this.setDisplayValue();
755
+ this.closeSubject.next();
756
+ });
757
+ this.setInstance();
758
+ }
759
+ setPosition(config) {
760
+ let position = config.positionStrategy;
761
+ position.positionChanges.pipe(takeUntil(this._unSubject)).subscribe((pos) => {
762
+ const place = XPortalConnectedPosition.get(pos.connectionPair);
763
+ place !== this.placement && this.positionChange.next(place);
764
+ });
765
+ }
766
+ setInstance() {
767
+ let componentRef = this.portal.componentRef;
768
+ if (!componentRef)
769
+ return;
770
+ Object.assign(componentRef.instance, {
771
+ data: this.nodes,
772
+ value: this.value,
773
+ placement: this.placement,
774
+ multiple: this.multiple,
775
+ selectAll: this.selectAll,
776
+ nodeTpl: this.nodeTpl,
777
+ valueChange: this.valueChange,
778
+ positionChange: this.positionChange,
779
+ closeSubject: this.closeSubject,
780
+ keydownSubject: this.keydownSubject,
781
+ dataChange: this.dataChange,
782
+ inputCom: this.inputCom,
783
+ portalMaxHeight: this.portalMaxHeight,
784
+ objectArray: this.objectArray,
785
+ selectAllText: this.selectAllText,
786
+ caseSensitive: this.caseSensitive,
787
+ search: this.search,
788
+ virtualScroll: this.virtualScroll,
789
+ size: this.size,
790
+ expandedLevel: this.expandedLevel,
791
+ inputChange: this.inputChange,
792
+ destroyPortal: () => this.destroyPortal(),
793
+ nodeEmit: (node, value) => this.nodeClick(node, value),
794
+ animating: (ing) => (this.animating = ing)
795
+ });
796
+ componentRef.changeDetectorRef.detectChanges();
797
+ }
798
+ nodeClick(node, value) {
799
+ if (this.multiple) {
800
+ if (this.value.length === 0) {
801
+ this.value = value;
802
+ }
803
+ if (this.multipleInput) {
804
+ const input = this.multipleInput.elementRef.nativeElement;
805
+ this.renderer.setStyle(input, 'width', '2rem');
806
+ }
807
+ if (this.search && this.multipleSearchValue !== '') {
808
+ this.multipleSearchValue = '';
809
+ this.inputChange.next('');
810
+ this.valueChange.next([...this.value]);
811
+ }
812
+ this.setDisplayValue(node);
813
+ }
814
+ else {
815
+ node = node;
816
+ if (this.showPath) {
817
+ const parents = this.getParentPath(node);
818
+ this.displayValue = parents.map((x) => x.label).join(this.separator);
819
+ }
820
+ else {
821
+ this.displayValue = node.label;
822
+ }
823
+ this.valueTplContext.$node = node;
824
+ this.value = node.id;
825
+ this.closeSubject.next();
826
+ }
827
+ if (this.search && this.multiple) {
828
+ this.multipleInput.inputFocus();
829
+ }
830
+ else {
831
+ this.inputCom.inputFocus();
832
+ }
833
+ if (this.onChange)
834
+ this.onChange(this.value);
835
+ this.formControlValidator();
836
+ this.cdr.detectChanges();
837
+ }
838
+ selectAllNodes(value) {
839
+ this.value = value;
840
+ }
841
+ setPlacement() {
842
+ return this.portalService.setPlacement({
843
+ elementRef: this.inputCom.inputRef,
844
+ placement: [this.placement, 'bottom', 'top'],
845
+ transformOriginOn: 'x-tree-select-portal'
846
+ });
847
+ }
848
+ setPortal() {
849
+ var _a, _b;
850
+ this.portalAttached() && ((_b = (_a = this.portal) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePositionStrategy(this.setPlacement()));
851
+ }
852
+ formControlChanges() {
853
+ this.setData();
854
+ this.ngOnInit();
855
+ this.writeValue(this.value);
856
+ this.ngAfterViewInit();
857
+ this.cdr.detectChanges();
858
+ }
859
+ onKeydown($event) {
860
+ this.keydownSubject.next($event);
861
+ if ($event.keyCode !== TAB && !this.search) {
862
+ $event.preventDefault();
863
+ }
864
+ }
865
+ onFocus(_event) {
866
+ if (this.search && this.multiple) {
867
+ this.multipleInput.inputFocus();
868
+ }
869
+ else {
870
+ this.inputCom.inputFocus();
871
+ }
872
+ }
873
+ onInput(_event) {
874
+ this.formControlValidator();
875
+ setTimeout(() => this.inputChange.next(this.multiple ? this.multipleSearchValue : this.displayValue));
876
+ }
877
+ }
878
+ /** @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 });
879
+ /** @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 });
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectComponent, decorators: [{
881
+ type: Component,
882
+ 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"] }]
883
+ }], 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: [{
884
+ type: ViewChild,
885
+ args: ['inputCom', { static: true }]
886
+ }], treeSelect: [{
887
+ type: ViewChild,
888
+ args: ['treeSelect', { static: true }]
889
+ }], multipleValueTpl: [{
890
+ type: ViewChild,
891
+ args: ['multipleValueTpl', { static: true }]
892
+ }], multipleInput: [{
893
+ type: ViewChild,
894
+ args: ['multipleInput']
895
+ }] } });
896
+
897
+ class XTreeSelectModule {
898
+ }
899
+ /** @nocollapse */ XTreeSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
900
+ /** @nocollapse */ XTreeSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, declarations: [XTreeSelectComponent, XTreeSelectPortalComponent, XTreeSelectProperty], imports: [CommonModule,
901
+ FormsModule,
902
+ ReactiveFormsModule,
903
+ XPortalModule,
904
+ XInputModule,
905
+ XListModule,
906
+ XBaseFormModule,
907
+ XTagModule,
908
+ XI18nModule,
909
+ XOutletModule,
910
+ XTreeModule,
911
+ XEmptyModule], exports: [XTreeSelectComponent, XTreeSelectPortalComponent] });
912
+ /** @nocollapse */ XTreeSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, imports: [CommonModule,
913
+ FormsModule,
914
+ ReactiveFormsModule,
915
+ XPortalModule,
916
+ XInputModule,
917
+ XListModule,
918
+ XBaseFormModule,
919
+ XTagModule,
920
+ XI18nModule,
921
+ XOutletModule,
922
+ XTreeModule,
923
+ XEmptyModule] });
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTreeSelectModule, decorators: [{
925
+ type: NgModule,
926
+ args: [{
927
+ declarations: [XTreeSelectComponent, XTreeSelectPortalComponent, XTreeSelectProperty],
928
+ exports: [XTreeSelectComponent, XTreeSelectPortalComponent],
929
+ imports: [
930
+ CommonModule,
931
+ FormsModule,
932
+ ReactiveFormsModule,
933
+ XPortalModule,
934
+ XInputModule,
935
+ XListModule,
936
+ XBaseFormModule,
937
+ XTagModule,
938
+ XI18nModule,
939
+ XOutletModule,
940
+ XTreeModule,
941
+ XEmptyModule
942
+ ]
943
+ }]
944
+ }] });
945
+
946
+ /**
947
+ * Generated bundle index. Do not edit.
948
+ */
949
+
950
+ export { XTreeSelectComponent, XTreeSelectModule, XTreeSelectPortalComponent, XTreeSelectPortalPrefix, XTreeSelectPrefix, XTreeSelectProperty };
951
+ //# sourceMappingURL=ng-nest-ui-tree-select.mjs.map