@ng-nest/ui 14.0.0 → 14.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/auto-complete/auto-complete.component.d.ts +2 -2
  2. package/base-form/base-form.component.d.ts +6 -3
  3. package/button/button.property.d.ts +11 -1
  4. package/cascade/cascade.component.d.ts +2 -3
  5. package/color-picker/color-picker.component.d.ts +1 -1
  6. package/core/config/config.d.ts +6 -0
  7. package/date-picker/date-picker.component.d.ts +1 -1
  8. package/date-picker/date-range.component.d.ts +1 -1
  9. package/dialog/dialog.module.d.ts +2 -1
  10. package/dialog/dialog.property.d.ts +2 -0
  11. package/esm2020/auto-complete/auto-complete.component.mjs +7 -5
  12. package/esm2020/base-form/base-form.component.mjs +11 -3
  13. package/esm2020/button/button.component.mjs +3 -3
  14. package/esm2020/button/button.property.mjs +7 -2
  15. package/esm2020/cascade/cascade.component.mjs +8 -9
  16. package/esm2020/checkbox/checkbox.component.mjs +6 -4
  17. package/esm2020/color-picker/color-picker-portal.component.mjs +3 -3
  18. package/esm2020/color-picker/color-picker.component.mjs +4 -3
  19. package/esm2020/core/config/config.mjs +1 -1
  20. package/esm2020/date-picker/date-picker.component.mjs +4 -3
  21. package/esm2020/date-picker/date-range.component.mjs +1 -1
  22. package/esm2020/dialog/dialog.module.mjs +8 -4
  23. package/esm2020/dialog/dialog.property.mjs +1 -1
  24. package/esm2020/find/find.component.mjs +5 -3
  25. package/esm2020/form/control.component.mjs +39 -26
  26. package/esm2020/form/form.component.mjs +16 -3
  27. package/esm2020/form/form.module.mjs +6 -3
  28. package/esm2020/form/form.property.mjs +10 -3
  29. package/esm2020/i18n/i18n.property.mjs +1 -1
  30. package/esm2020/i18n/languages/en_US.mjs +6 -2
  31. package/esm2020/i18n/languages/zh_CN.mjs +6 -2
  32. package/esm2020/i18n/languages/zh_TW.mjs +6 -2
  33. package/esm2020/icon/icon.component.mjs +6 -2
  34. package/esm2020/input/input.component.mjs +23 -10
  35. package/esm2020/input/input.property.mjs +31 -2
  36. package/esm2020/input-number/input-number.component.mjs +3 -3
  37. package/esm2020/list/list.component.mjs +16 -16
  38. package/esm2020/radio/radio.component.mjs +4 -3
  39. package/esm2020/rate/rate.component.mjs +8 -3
  40. package/esm2020/select/select-portal.component.mjs +15 -6
  41. package/esm2020/select/select.component.mjs +297 -42
  42. package/esm2020/select/select.module.mjs +35 -4
  43. package/esm2020/select/select.property.mjs +31 -3
  44. package/esm2020/slider-select/slider-select.component.mjs +6 -5
  45. package/esm2020/switch/switch.component.mjs +1 -1
  46. package/esm2020/table/table-body.component.mjs +15 -6
  47. package/esm2020/table/table-foot.component.mjs +7 -3
  48. package/esm2020/table/table-head.component.mjs +23 -7
  49. package/esm2020/table/table.component.mjs +55 -8
  50. package/esm2020/table/table.property.mjs +20 -5
  51. package/esm2020/tag/tag.component.mjs +5 -5
  52. package/esm2020/tag/tag.property.mjs +1 -1
  53. package/esm2020/textarea/textarea.component.mjs +3 -3
  54. package/esm2020/textarea/textarea.property.mjs +1 -6
  55. package/esm2020/theme/theme.component.mjs +1 -1
  56. package/esm2020/time-picker/time-picker.component.mjs +4 -3
  57. package/esm2020/transfer/transfer.component.mjs +1 -1
  58. package/esm2020/tree/tree-node.component.mjs +4 -70
  59. package/esm2020/tree/tree.component.mjs +123 -23
  60. package/esm2020/tree/tree.property.mjs +1 -1
  61. package/esm2020/upload/upload.component.mjs +1 -1
  62. package/fesm2015/ng-nest-ui-auto-complete.mjs +6 -4
  63. package/fesm2015/ng-nest-ui-auto-complete.mjs.map +1 -1
  64. package/fesm2015/ng-nest-ui-base-form.mjs +10 -2
  65. package/fesm2015/ng-nest-ui-base-form.mjs.map +1 -1
  66. package/fesm2015/ng-nest-ui-button.mjs +8 -3
  67. package/fesm2015/ng-nest-ui-button.mjs.map +1 -1
  68. package/fesm2015/ng-nest-ui-cascade.mjs +6 -7
  69. package/fesm2015/ng-nest-ui-cascade.mjs.map +1 -1
  70. package/fesm2015/ng-nest-ui-checkbox.mjs +5 -3
  71. package/fesm2015/ng-nest-ui-checkbox.mjs.map +1 -1
  72. package/fesm2015/ng-nest-ui-color-picker.mjs +5 -4
  73. package/fesm2015/ng-nest-ui-color-picker.mjs.map +1 -1
  74. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  75. package/fesm2015/ng-nest-ui-date-picker.mjs +3 -2
  76. package/fesm2015/ng-nest-ui-date-picker.mjs.map +1 -1
  77. package/fesm2015/ng-nest-ui-dialog.mjs +7 -3
  78. package/fesm2015/ng-nest-ui-dialog.mjs.map +1 -1
  79. package/fesm2015/ng-nest-ui-find.mjs +4 -2
  80. package/fesm2015/ng-nest-ui-find.mjs.map +1 -1
  81. package/fesm2015/ng-nest-ui-form.mjs +68 -31
  82. package/fesm2015/ng-nest-ui-form.mjs.map +1 -1
  83. package/fesm2015/ng-nest-ui-i18n.mjs +15 -3
  84. package/fesm2015/ng-nest-ui-i18n.mjs.map +1 -1
  85. package/fesm2015/ng-nest-ui-icon.mjs +5 -1
  86. package/fesm2015/ng-nest-ui-icon.mjs.map +1 -1
  87. package/fesm2015/ng-nest-ui-input-number.mjs +2 -2
  88. package/fesm2015/ng-nest-ui-input-number.mjs.map +1 -1
  89. package/fesm2015/ng-nest-ui-input.mjs +52 -10
  90. package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
  91. package/fesm2015/ng-nest-ui-list.mjs +15 -15
  92. package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
  93. package/fesm2015/ng-nest-ui-radio.mjs +3 -2
  94. package/fesm2015/ng-nest-ui-radio.mjs.map +1 -1
  95. package/fesm2015/ng-nest-ui-rate.mjs +7 -2
  96. package/fesm2015/ng-nest-ui-rate.mjs.map +1 -1
  97. package/fesm2015/ng-nest-ui-select.mjs +375 -50
  98. package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
  99. package/fesm2015/ng-nest-ui-slider-select.mjs +5 -4
  100. package/fesm2015/ng-nest-ui-slider-select.mjs.map +1 -1
  101. package/fesm2015/ng-nest-ui-switch.mjs.map +1 -1
  102. package/fesm2015/ng-nest-ui-table.mjs +113 -23
  103. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  104. package/fesm2015/ng-nest-ui-tag.mjs +4 -4
  105. package/fesm2015/ng-nest-ui-tag.mjs.map +1 -1
  106. package/fesm2015/ng-nest-ui-textarea.mjs +2 -7
  107. package/fesm2015/ng-nest-ui-textarea.mjs.map +1 -1
  108. package/fesm2015/ng-nest-ui-theme.mjs.map +1 -1
  109. package/fesm2015/ng-nest-ui-time-picker.mjs +3 -2
  110. package/fesm2015/ng-nest-ui-time-picker.mjs.map +1 -1
  111. package/fesm2015/ng-nest-ui-transfer.mjs.map +1 -1
  112. package/fesm2015/ng-nest-ui-tree.mjs +125 -91
  113. package/fesm2015/ng-nest-ui-tree.mjs.map +1 -1
  114. package/fesm2015/ng-nest-ui-upload.mjs.map +1 -1
  115. package/fesm2020/ng-nest-ui-auto-complete.mjs +6 -4
  116. package/fesm2020/ng-nest-ui-auto-complete.mjs.map +1 -1
  117. package/fesm2020/ng-nest-ui-base-form.mjs +10 -2
  118. package/fesm2020/ng-nest-ui-base-form.mjs.map +1 -1
  119. package/fesm2020/ng-nest-ui-button.mjs +8 -3
  120. package/fesm2020/ng-nest-ui-button.mjs.map +1 -1
  121. package/fesm2020/ng-nest-ui-cascade.mjs +6 -7
  122. package/fesm2020/ng-nest-ui-cascade.mjs.map +1 -1
  123. package/fesm2020/ng-nest-ui-checkbox.mjs +5 -3
  124. package/fesm2020/ng-nest-ui-checkbox.mjs.map +1 -1
  125. package/fesm2020/ng-nest-ui-color-picker.mjs +5 -4
  126. package/fesm2020/ng-nest-ui-color-picker.mjs.map +1 -1
  127. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  128. package/fesm2020/ng-nest-ui-date-picker.mjs +3 -2
  129. package/fesm2020/ng-nest-ui-date-picker.mjs.map +1 -1
  130. package/fesm2020/ng-nest-ui-dialog.mjs +7 -3
  131. package/fesm2020/ng-nest-ui-dialog.mjs.map +1 -1
  132. package/fesm2020/ng-nest-ui-find.mjs +4 -2
  133. package/fesm2020/ng-nest-ui-find.mjs.map +1 -1
  134. package/fesm2020/ng-nest-ui-form.mjs +67 -31
  135. package/fesm2020/ng-nest-ui-form.mjs.map +1 -1
  136. package/fesm2020/ng-nest-ui-i18n.mjs +15 -3
  137. package/fesm2020/ng-nest-ui-i18n.mjs.map +1 -1
  138. package/fesm2020/ng-nest-ui-icon.mjs +5 -1
  139. package/fesm2020/ng-nest-ui-icon.mjs.map +1 -1
  140. package/fesm2020/ng-nest-ui-input-number.mjs +2 -2
  141. package/fesm2020/ng-nest-ui-input-number.mjs.map +1 -1
  142. package/fesm2020/ng-nest-ui-input.mjs +52 -10
  143. package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
  144. package/fesm2020/ng-nest-ui-list.mjs +15 -15
  145. package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
  146. package/fesm2020/ng-nest-ui-radio.mjs +3 -2
  147. package/fesm2020/ng-nest-ui-radio.mjs.map +1 -1
  148. package/fesm2020/ng-nest-ui-rate.mjs +7 -2
  149. package/fesm2020/ng-nest-ui-rate.mjs.map +1 -1
  150. package/fesm2020/ng-nest-ui-select.mjs +372 -50
  151. package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
  152. package/fesm2020/ng-nest-ui-slider-select.mjs +5 -4
  153. package/fesm2020/ng-nest-ui-slider-select.mjs.map +1 -1
  154. package/fesm2020/ng-nest-ui-switch.mjs.map +1 -1
  155. package/fesm2020/ng-nest-ui-table.mjs +112 -23
  156. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  157. package/fesm2020/ng-nest-ui-tag.mjs +4 -4
  158. package/fesm2020/ng-nest-ui-tag.mjs.map +1 -1
  159. package/fesm2020/ng-nest-ui-textarea.mjs +2 -7
  160. package/fesm2020/ng-nest-ui-textarea.mjs.map +1 -1
  161. package/fesm2020/ng-nest-ui-theme.mjs.map +1 -1
  162. package/fesm2020/ng-nest-ui-time-picker.mjs +3 -2
  163. package/fesm2020/ng-nest-ui-time-picker.mjs.map +1 -1
  164. package/fesm2020/ng-nest-ui-transfer.mjs.map +1 -1
  165. package/fesm2020/ng-nest-ui-tree.mjs +125 -91
  166. package/fesm2020/ng-nest-ui-tree.mjs.map +1 -1
  167. package/fesm2020/ng-nest-ui-upload.mjs.map +1 -1
  168. package/find/find.component.d.ts +1 -1
  169. package/form/control.component.d.ts +6 -3
  170. package/form/examples/en_US/default/form-vaild/README.md +8 -0
  171. package/form/examples/zh_CN/default/form-vaild/README.md +8 -0
  172. package/form/form.component.d.ts +4 -1
  173. package/form/form.module.d.ts +2 -1
  174. package/form/form.property.d.ts +7 -2
  175. package/i18n/i18n.property.d.ts +6 -0
  176. package/i18n/languages/en_US.d.ts +4 -0
  177. package/i18n/languages/zh_CN.d.ts +4 -0
  178. package/i18n/languages/zh_TW.d.ts +4 -0
  179. package/input/input.component.d.ts +3 -0
  180. package/input/input.property.d.ts +31 -1
  181. package/input-number/input-number.component.d.ts +1 -1
  182. package/package.json +1 -1
  183. package/rate/rate.component.d.ts +1 -0
  184. package/select/examples/en_US/default/search/README.md +6 -0
  185. package/select/examples/zh_CN/default/search/README.md +6 -0
  186. package/select/select-portal.component.d.ts +6 -1
  187. package/select/select.component.d.ts +33 -6
  188. package/select/select.module.d.ts +4 -2
  189. package/select/select.property.d.ts +63 -2
  190. package/slider-select/slider-select.component.d.ts +1 -1
  191. package/switch/switch.component.d.ts +1 -1
  192. package/table/examples/en_US/default/fix/README.md +6 -0
  193. package/table/examples/en_US/default/head/README.md +6 -0
  194. package/table/examples/en_US/default/header/README.md +6 -0
  195. package/table/examples/zh_CN/default/fix/README.md +6 -0
  196. package/table/examples/zh_CN/default/head/README.md +6 -0
  197. package/table/examples/zh_CN/default/header/README.md +6 -0
  198. package/table/table-foot.component.d.ts +1 -0
  199. package/table/table-head.component.d.ts +2 -1
  200. package/table/table.component.d.ts +14 -2
  201. package/table/table.property.d.ts +48 -3
  202. package/tag/tag.component.d.ts +1 -1
  203. package/tag/tag.property.d.ts +1 -1
  204. package/time-picker/time-picker.component.d.ts +1 -1
  205. package/tree/tree-node.component.d.ts +0 -3
  206. package/tree/tree.component.d.ts +3 -0
  207. package/tree/tree.property.d.ts +5 -0
@@ -2,23 +2,28 @@ import { Subject } from 'rxjs';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, HostListener, ViewChild, NgModule } from '@angular/core';
4
4
  import { __decorate } from 'tslib';
5
- import * as i3$1 from '@ng-nest/ui/core';
6
- import { XDataConvert, XWithConfig, XInputBoolean, XConnectBaseAnimation, XIsEmpty, XIsChange, XClearClass, XSetData, XIsObjectArray, XIsObservable, XIsArray } from '@ng-nest/ui/core';
5
+ import * as i4 from '@ng-nest/ui/core';
6
+ import { XDataConvert, XWithConfig, XInputBoolean, XInputNumber, XConnectBaseAnimation, XIsEmpty, XIsChange, XResize, XClearClass, XSetData, XIsFunction, XIsObjectArray, XRemove, XIsString, XIsObservable, XIsArray } from '@ng-nest/ui/core';
7
7
  import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
8
8
  import * as i1$1 from '@ng-nest/ui/portal';
9
9
  import { XPortalConnectedPosition, XPortalModule } from '@ng-nest/ui/portal';
10
- import { takeUntil, map, throttleTime } from 'rxjs/operators';
10
+ import { takeUntil, map, debounceTime, distinctUntilChanged, throttleTime } from 'rxjs/operators';
11
11
  import * as i1 from '@ng-nest/ui/i18n';
12
12
  import { XI18nModule } from '@ng-nest/ui/i18n';
13
- import * as i4 from '@angular/forms';
13
+ import * as i6 from '@angular/forms';
14
14
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
15
15
  import * as i3 from '@ng-nest/ui/list';
16
16
  import { XListModule } from '@ng-nest/ui/list';
17
17
  import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, MAC_ENTER, ESCAPE, TAB } from '@angular/cdk/keycodes';
18
18
  import * as i2 from '@angular/cdk/overlay';
19
- import * as i5 from '@ng-nest/ui/input';
20
- import { XInputModule } from '@ng-nest/ui/input';
19
+ import * as i5 from '@angular/common';
21
20
  import { CommonModule } from '@angular/common';
21
+ import * as i7 from '@ng-nest/ui/input';
22
+ import { XInputModule } from '@ng-nest/ui/input';
23
+ import * as i8 from '@ng-nest/ui/tag';
24
+ import { XTagModule } from '@ng-nest/ui/tag';
25
+ import * as i9 from '@ng-nest/ui/outlet';
26
+ import { XOutletModule } from '@ng-nest/ui/outlet';
22
27
 
23
28
  /**
24
29
  * Select
@@ -41,7 +46,7 @@ class XSelectProperty extends XControlValueAccessor {
41
46
  }
42
47
  }
43
48
  /** @nocollapse */ XSelectProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
44
- /** @nocollapse */ XSelectProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XSelectProperty, selector: "ng-component", inputs: { data: "data", clearable: "clearable", async: "async", placement: "placement", multiple: "multiple", selectAll: "selectAll", selectAllText: "selectAllText", nodeTpl: "nodeTpl", size: "size", bordered: "bordered", portalMaxHeight: "portalMaxHeight" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
49
+ /** @nocollapse */ XSelectProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XSelectProperty, selector: "ng-component", inputs: { data: "data", clearable: "clearable", async: "async", placement: "placement", multiple: "multiple", selectAll: "selectAll", selectAllText: "selectAllText", nodeTpl: "nodeTpl", size: "size", bordered: "bordered", portalMaxHeight: "portalMaxHeight", search: "search", caseSensitive: "caseSensitive", debounceTime: "debounceTime", maxTagCount: "maxTagCount", maxTagContent: "maxTagContent" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
45
50
  __decorate([
46
51
  XDataConvert()
47
52
  ], XSelectProperty.prototype, "data", void 0);
@@ -74,6 +79,24 @@ __decorate([
74
79
  __decorate([
75
80
  XWithConfig(X_CONFIG_NAME, '12rem')
76
81
  ], XSelectProperty.prototype, "portalMaxHeight", void 0);
82
+ __decorate([
83
+ XInputBoolean(),
84
+ XWithConfig(X_CONFIG_NAME, false)
85
+ ], XSelectProperty.prototype, "search", void 0);
86
+ __decorate([
87
+ XInputBoolean(),
88
+ XWithConfig(X_CONFIG_NAME, true)
89
+ ], XSelectProperty.prototype, "caseSensitive", void 0);
90
+ __decorate([
91
+ XWithConfig(X_CONFIG_NAME, 200)
92
+ ], XSelectProperty.prototype, "debounceTime", void 0);
93
+ __decorate([
94
+ XInputNumber(),
95
+ XWithConfig(X_CONFIG_NAME)
96
+ ], XSelectProperty.prototype, "maxTagCount", void 0);
97
+ __decorate([
98
+ XWithConfig(X_CONFIG_NAME)
99
+ ], XSelectProperty.prototype, "maxTagContent", void 0);
77
100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectProperty, decorators: [{
78
101
  type: Component,
79
102
  args: [{ template: '' }]
@@ -99,6 +122,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
99
122
  type: Input
100
123
  }], portalMaxHeight: [{
101
124
  type: Input
125
+ }], search: [{
126
+ type: Input
127
+ }], caseSensitive: [{
128
+ type: Input
129
+ }], debounceTime: [{
130
+ type: Input
131
+ }], maxTagCount: [{
132
+ type: Input
133
+ }], maxTagContent: [{
134
+ type: Input
102
135
  }] } });
103
136
  /**
104
137
  * Select Portal
@@ -116,9 +149,12 @@ class XSelectPortalComponent {
116
149
  this.selectAll = false;
117
150
  this.show = false;
118
151
  this.objectArray = false;
152
+ this.caseSensitive = true;
119
153
  this.active = -1;
120
154
  this.portalMaxHeight = '';
121
155
  this.locale = {};
156
+ this.search = false;
157
+ this.scrollNull = undefined;
122
158
  this._unSubject = new Subject();
123
159
  }
124
160
  done(event) {
@@ -140,6 +176,10 @@ class XSelectPortalComponent {
140
176
  this.placement = x;
141
177
  this.cdr.detectChanges();
142
178
  });
179
+ this.dataChange.pipe(takeUntil(this._unSubject)).subscribe((x) => {
180
+ this.data = x;
181
+ this.cdr.detectChanges();
182
+ });
143
183
  this.closeSubject.pipe(takeUntil(this._unSubject)).subscribe(() => {
144
184
  this.list.setUnActive(this.active);
145
185
  });
@@ -161,10 +201,12 @@ class XSelectPortalComponent {
161
201
  event.stopPropagation();
162
202
  }
163
203
  nodeClick(node) {
164
- if (this.multiple === 0)
165
- this.nodeEmit(this.value);
166
- else
204
+ if (this.multiple === 0) {
205
+ this.nodeEmit(node, this.value);
206
+ }
207
+ else {
167
208
  this.nodeEmit(node);
209
+ }
168
210
  }
169
211
  onSelectAll(_isSelectAll) {
170
212
  this.nodeEmit(this.value);
@@ -177,10 +219,10 @@ class XSelectPortalComponent {
177
219
  }
178
220
  }
179
221
  /** @nocollapse */ XSelectPortalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectPortalComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
180
- /** @nocollapse */ XSelectPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XSelectPortalComponent, selector: "x-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: "list", first: true, predicate: ["list"], descendants: true }], ngImport: i0, template: "<div #selectPortal class=\"x-select-portal\" (click)=\"inputCom.inputFocus(); stopPropagation($event)\" [style.maxHeight]=\"portalMaxHeight\">\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]=\"selectPortal\"\r\n ></x-list>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-select-portal{width:100%}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.XListComponent, selector: "x-list" }], animations: [XConnectBaseAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
222
+ /** @nocollapse */ XSelectPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XSelectPortalComponent, selector: "x-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: "list", first: true, predicate: ["list"], descendants: true }], ngImport: i0, template: "<div #selectPortal class=\"x-select-portal\" (click)=\"inputCom.inputFocus(); stopPropagation($event)\" [style.maxHeight]=\"portalMaxHeight\">\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 : selectPortal\"\r\n ></x-list>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-select-portal{width:100%}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"], dependencies: [{ kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.XListComponent, selector: "x-list" }], animations: [XConnectBaseAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
181
223
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectPortalComponent, decorators: [{
182
224
  type: Component,
183
- args: [{ selector: `${XSelectPortalPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XConnectBaseAnimation], template: "<div #selectPortal class=\"x-select-portal\" (click)=\"inputCom.inputFocus(); stopPropagation($event)\" [style.maxHeight]=\"portalMaxHeight\">\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]=\"selectPortal\"\r\n ></x-list>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-select-portal{width:100%}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"] }]
225
+ args: [{ selector: `${XSelectPortalPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XConnectBaseAnimation], template: "<div #selectPortal class=\"x-select-portal\" (click)=\"inputCom.inputFocus(); stopPropagation($event)\" [style.maxHeight]=\"portalMaxHeight\">\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 : selectPortal\"\r\n ></x-list>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-select-portal{width:100%}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"] }]
184
226
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.XI18nService }]; }, propDecorators: { placement: [{
185
227
  type: HostBinding,
186
228
  args: ['@x-connect-base-animation']
@@ -196,33 +238,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
196
238
  }] } });
197
239
 
198
240
  class XSelectComponent extends XSelectProperty {
199
- constructor(renderer, cdr, portalService, viewContainerRef, overlay, configService) {
241
+ constructor(renderer, cdr, portalService, viewContainerRef, overlay, i18n, configService) {
200
242
  super();
201
243
  this.renderer = renderer;
202
244
  this.cdr = cdr;
203
245
  this.portalService = portalService;
204
246
  this.viewContainerRef = viewContainerRef;
205
247
  this.overlay = overlay;
248
+ this.i18n = i18n;
206
249
  this.configService = configService;
207
250
  this.readonly = true;
208
251
  this.enter = false;
209
252
  this.showClearable = false;
210
253
  this.displayValue = '';
254
+ this.multipleSearchValue = '';
211
255
  this.nodes = [];
256
+ this.selectedNodes = [];
257
+ this.displayNodes = [];
258
+ this.displayMore = '';
259
+ this.showDisplayMore = false;
260
+ this.searchNodes = [];
212
261
  this.icon = 'fto-chevron-down';
213
262
  this.iconSpin = false;
214
263
  this.maxNodes = 6;
264
+ this.inputPadding = 0.4;
215
265
  this.protalTobottom = true;
216
266
  this.asyncLoading = false;
217
267
  this.animating = false;
218
268
  this.objectArray = false;
269
+ this.selectedSurplus = 0;
270
+ this.selectedTotal = 0;
271
+ this.locale = {};
219
272
  this.valueTplContext = { $node: null, $isValue: true };
220
273
  this.valueChange = new Subject();
221
274
  this.positionChange = new Subject();
222
275
  this.closeSubject = new Subject();
276
+ this.dataChange = new Subject();
223
277
  this.keydownSubject = new Subject();
278
+ this.inputChange = new Subject();
279
+ this.composition = false;
280
+ this.multipleInputSizeChange = new Subject();
224
281
  this._unSubject = new Subject();
225
282
  }
283
+ get getReadonly() {
284
+ return (this.readonly && !this.search) || (Boolean(this.search) && Boolean(this.multiple));
285
+ }
286
+ get getMaxTagContent() {
287
+ return this.maxTagContent || this.locale.maxTagContent;
288
+ }
226
289
  writeValue(value) {
227
290
  if (this.multiple && XIsEmpty(value)) {
228
291
  value = [];
@@ -236,6 +299,16 @@ class XSelectComponent extends XSelectProperty {
236
299
  this.setFlex(this.select.nativeElement, this.renderer, this.justify, this.align, this.direction);
237
300
  this.setClassMap();
238
301
  this.setSubject();
302
+ if (this.multiple) {
303
+ this.valueTpl = this.multipleValueTpl;
304
+ this.inputPadding = 0.125;
305
+ }
306
+ this.i18n.localeChange
307
+ .pipe(map((x) => x.select), takeUntil(this._unSubject))
308
+ .subscribe((x) => {
309
+ this.locale = x;
310
+ this.cdr.markForCheck();
311
+ });
239
312
  }
240
313
  ngOnChanges(changes) {
241
314
  const { data } = changes;
@@ -243,10 +316,19 @@ class XSelectComponent extends XSelectProperty {
243
316
  }
244
317
  ngAfterViewInit() {
245
318
  this.setPortal();
319
+ if (this.multiple && this.inputCom.inputValueRef) {
320
+ XResize(this.inputCom.inputValueRef.nativeElement)
321
+ .pipe(debounceTime(30), takeUntil(this._unSubject))
322
+ .subscribe((x) => {
323
+ this._resizeObserver = x.resizeObserver;
324
+ this.setMutipleInputSize();
325
+ });
326
+ }
246
327
  }
247
328
  ngOnDestroy() {
248
329
  this._unSubject.next();
249
330
  this._unSubject.unsubscribe();
331
+ this._resizeObserver?.disconnect();
250
332
  }
251
333
  setClassMap() {
252
334
  XClearClass(this.labelMap);
@@ -266,18 +348,66 @@ class XSelectComponent extends XSelectProperty {
266
348
  this.closeSubject.pipe(takeUntil(this._unSubject)).subscribe(() => {
267
349
  this.closePortal();
268
350
  });
351
+ this.inputChange.pipe(debounceTime(this.debounceTime), distinctUntilChanged(), takeUntil(this._unSubject)).subscribe((x) => {
352
+ this.modelChange(x);
353
+ });
269
354
  this.keydownSubject.pipe(throttleTime(10), takeUntil(this._unSubject)).subscribe((x) => {
270
355
  const keyCode = x.keyCode;
271
356
  if (!this.portalAttached() && [DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, MAC_ENTER].includes(keyCode)) {
272
- this.showPortal();
357
+ this.inputChange.next(this.displayValue);
273
358
  }
274
359
  if (this.portalAttached() && [ESCAPE].includes(keyCode)) {
275
360
  this.closeSubject.next();
276
361
  }
277
362
  });
363
+ this.multipleInputSizeChange.pipe(distinctUntilChanged(), takeUntil(this._unSubject)).subscribe((x) => {
364
+ if (this.multipleInput) {
365
+ const input = this.multipleInput?.elementRef.nativeElement;
366
+ this.renderer.setStyle(input, 'width', `${x}px`);
367
+ }
368
+ });
369
+ }
370
+ setMutipleInputSize() {
371
+ const ivf = this.inputCom.inputValueRef.nativeElement;
372
+ let { clientWidth, scrollHeight } = ivf;
373
+ const len = ivf.children.length;
374
+ let lastRowTagTop = -1;
375
+ let lines = 1;
376
+ let rowTagTop = -1;
377
+ let lastRowTagsWidth = 0;
378
+ let marginLeft = 0;
379
+ let marginTop = 0;
380
+ for (let i = len - 1; i >= 0; i--) {
381
+ const ele = ivf.children[i];
382
+ if (ele.tagName === 'X-TAG') {
383
+ const { offsetTop, offsetWidth } = ele;
384
+ const style = getComputedStyle(ele);
385
+ marginLeft = Number(style.marginLeft.replace('px', ''));
386
+ marginTop = Number(style.marginTop.replace('px', ''));
387
+ if (rowTagTop === -1) {
388
+ rowTagTop = offsetTop;
389
+ }
390
+ else if (rowTagTop !== offsetTop) {
391
+ lines++;
392
+ rowTagTop = offsetTop;
393
+ }
394
+ if (lastRowTagTop === -1) {
395
+ lastRowTagTop = offsetTop;
396
+ }
397
+ if (lastRowTagTop === offsetTop) {
398
+ lastRowTagsWidth += offsetWidth + marginLeft;
399
+ }
400
+ }
401
+ }
402
+ const height = scrollHeight + (lines > 1 ? marginTop : 0);
403
+ this.renderer.setStyle(this.inputCom.inputRef.nativeElement, 'height', `${height}px`);
404
+ if (this.multipleInput) {
405
+ this.multipleInputSizeChange.next(clientWidth - lastRowTagsWidth - marginLeft);
406
+ }
407
+ this.portal?.overlayRef?.updatePosition();
278
408
  }
279
409
  menter() {
280
- if (this.disabled || !this.clearable)
410
+ if (this.disabled || !this.clearable || this.iconSpin)
281
411
  return;
282
412
  this.enter = true;
283
413
  if (!XIsEmpty(this.displayValue)) {
@@ -287,7 +417,7 @@ class XSelectComponent extends XSelectProperty {
287
417
  }
288
418
  }
289
419
  mleave() {
290
- if (this.disabled || !this.clearable)
420
+ if (this.disabled || !this.clearable || this.iconSpin)
291
421
  return;
292
422
  this.enter = false;
293
423
  if (this.clearable) {
@@ -296,34 +426,102 @@ class XSelectComponent extends XSelectProperty {
296
426
  this.cdr.detectChanges();
297
427
  }
298
428
  }
429
+ modelChange(value) {
430
+ if (XIsFunction(this.data)) {
431
+ if (!this.portalAttached()) {
432
+ this.showPortal();
433
+ }
434
+ else {
435
+ this.icon = 'fto-loader';
436
+ this.iconSpin = true;
437
+ this.cdr.detectChanges();
438
+ XSetData(this.data, this._unSubject, true, value).subscribe((x) => {
439
+ this.icon = '';
440
+ this.iconSpin = false;
441
+ this.nodes = x;
442
+ this.dataChange.next(this.nodes);
443
+ this.cdr.detectChanges();
444
+ });
445
+ }
446
+ return;
447
+ }
448
+ if (this.nodes) {
449
+ if (!this.portalAttached()) {
450
+ this.showPortal();
451
+ }
452
+ else {
453
+ if (XIsEmpty(value)) {
454
+ this.searchNodes = [...this.nodes];
455
+ }
456
+ else {
457
+ this.setSearchNodes(value);
458
+ }
459
+ this.dataChange.next(this.searchNodes);
460
+ }
461
+ }
462
+ }
463
+ setSearchNodes(value) {
464
+ if (this.caseSensitive) {
465
+ this.searchNodes = this.nodes.filter((x) => x.label.indexOf(value) >= 0);
466
+ }
467
+ else {
468
+ this.searchNodes = this.nodes.filter((x) => x.label.toLowerCase().indexOf(value.toLowerCase()) >= 0);
469
+ }
470
+ }
299
471
  clearEmit() {
300
- this.value = '';
472
+ this.value = this.multiple ? [] : '';
301
473
  this.displayValue = '';
474
+ this.multipleSearchValue = '';
475
+ this.selectedNodes = [];
476
+ this.setDisplayNodes();
302
477
  this.valueTplContext.$node = null;
303
478
  this.mleave();
304
479
  this.valueChange.next(this.value);
480
+ this.inputChange.next('');
305
481
  if (this.onChange)
306
482
  this.onChange(this.value);
307
483
  }
308
- setDisplayValue() {
484
+ setDisplayValue(clickNode) {
309
485
  if (this.nodes.length > 0) {
310
486
  if (this.multiple) {
311
487
  if (XIsEmpty(this.value)) {
312
488
  this.displayValue = '';
489
+ this.selectedNodes = [];
490
+ this.displayNodes = [];
491
+ this.displayMore = '';
313
492
  this.valueTplContext.$node = null;
493
+ this.setDisplayNodes();
314
494
  }
315
495
  else {
316
- let nodes = [];
496
+ let ids = [];
497
+ let selected = [];
317
498
  if (XIsObjectArray(this.value)) {
318
499
  this.objectArray = true;
319
- nodes = this.nodes.filter((x) => !XIsEmpty(this.value.find((y) => y.id === x.id)));
500
+ ids = this.value.map((x) => x.id);
320
501
  }
321
502
  else {
322
503
  this.objectArray = false;
323
- nodes = this.nodes.filter((x) => !XIsEmpty(this.value.find((y) => y === x.id)));
504
+ ids = this.value;
505
+ }
506
+ if (clickNode) {
507
+ if (clickNode.selected) {
508
+ this.selectedNodes.push(clickNode);
509
+ }
510
+ else {
511
+ XRemove(this.selectedNodes, (x) => x.id === clickNode.id);
512
+ }
513
+ }
514
+ else {
515
+ for (let id of ids) {
516
+ let node = this.nodes.find((x) => x.id === id);
517
+ if (node)
518
+ selected.push(node);
519
+ }
520
+ this.selectedNodes = selected;
324
521
  }
325
- this.displayValue = nodes.map((x) => x.label).join(',');
326
- this.valueTplContext.$node = [...nodes];
522
+ this.setDisplayNodes();
523
+ this.displayValue = this.selectedNodes.map((x) => x.label).join(',');
524
+ this.valueTplContext.$node = [...this.selectedNodes];
327
525
  }
328
526
  }
329
527
  else {
@@ -340,6 +538,46 @@ class XSelectComponent extends XSelectProperty {
340
538
  this.cdr.detectChanges();
341
539
  }
342
540
  }
541
+ closeNode(event, node, index) {
542
+ let inx = -1;
543
+ if (XIsObjectArray(this.value)) {
544
+ inx = this.value.findIndex((y) => y.id === node.id);
545
+ }
546
+ else {
547
+ inx = this.value.findIndex((y) => y === node.id);
548
+ }
549
+ if (inx >= 0) {
550
+ this.value.splice(inx, 1);
551
+ this.valueChange.next(this.value);
552
+ if (this.onChange)
553
+ this.onChange(this.value);
554
+ this.selectedNodes.splice(index, 1);
555
+ this.setDisplayNodes();
556
+ }
557
+ event.stopPropagation();
558
+ }
559
+ setDisplayNodes() {
560
+ const maxlen = this.selectedNodes.length;
561
+ let len = 0;
562
+ if (!this.maxTagCount) {
563
+ len = maxlen;
564
+ }
565
+ else {
566
+ len = maxlen > Number(this.maxTagCount) ? Number(this.maxTagCount) : maxlen;
567
+ }
568
+ let more = maxlen - len;
569
+ more = more < 0 ? 0 : more;
570
+ this.displayNodes = this.selectedNodes.slice(0, len);
571
+ this.showDisplayMore = more > 0;
572
+ if (XIsString(this.getMaxTagContent)) {
573
+ this.displayMore = more > 0 ? this.getMaxTagContent.replace(/\{\{surplus\}\}/g, `${more}`) : '';
574
+ }
575
+ else {
576
+ this.selectedSurplus = more;
577
+ this.selectedTotal = maxlen;
578
+ }
579
+ setTimeout(() => this.setMutipleInputSize());
580
+ }
343
581
  portalAttached() {
344
582
  return this.portal?.overlayRef?.hasAttached();
345
583
  }
@@ -347,6 +585,7 @@ class XSelectComponent extends XSelectProperty {
347
585
  if (this.portalAttached()) {
348
586
  this.portal?.overlayRef?.detach();
349
587
  this.active = false;
588
+ this.multipleSearchValue = '';
350
589
  this.cdr.detectChanges();
351
590
  return true;
352
591
  }
@@ -355,29 +594,34 @@ class XSelectComponent extends XSelectProperty {
355
594
  destroyPortal() {
356
595
  this.portal?.overlayRef?.dispose();
357
596
  }
358
- showPortal() {
359
- if (this.disabled || this.iconSpin)
360
- return;
361
- if (this.animating)
597
+ showPortal(click = false) {
598
+ if (this.disabled || this.iconSpin || this.animating)
362
599
  return;
363
600
  this.active = true;
364
- if (this.async && XIsObservable(this.data) && this.nodes.length === 0) {
601
+ if ((this.async && XIsObservable(this.data) && this.nodes.length === 0) || XIsFunction(this.data)) {
365
602
  this.icon = 'fto-loader';
366
603
  this.iconSpin = true;
367
- this.cdr.detectChanges();
368
- XSetData(this.data, this._unSubject).subscribe((x) => {
369
- this.nodes = x;
370
- this.setDisplayValue();
371
- this.createPortal();
604
+ this.inputCom.cdr.detectChanges();
605
+ XSetData(this.data, this._unSubject, true, click ? '' : this.displayValue).subscribe((x) => {
372
606
  this.icon = 'fto-chevron-down';
373
607
  this.iconSpin = false;
608
+ this.inputCom.cdr.detectChanges();
609
+ this.nodes = x;
610
+ if (!this.search)
611
+ this.setDisplayValue();
612
+ this.createPortal();
374
613
  this.cdr.detectChanges();
375
614
  });
376
615
  }
377
616
  else {
378
617
  this.createPortal();
379
618
  }
380
- this.inputCom.inputFocus();
619
+ if (this.search && this.multiple) {
620
+ this.multipleInput.inputFocus();
621
+ }
622
+ else {
623
+ this.inputCom.inputFocus();
624
+ }
381
625
  }
382
626
  createPortal() {
383
627
  this.nodes.filter((x) => x.selected).map((x) => (x.selected = false));
@@ -425,21 +669,48 @@ class XSelectComponent extends XSelectProperty {
425
669
  positionChange: this.positionChange,
426
670
  closeSubject: this.closeSubject,
427
671
  keydownSubject: this.keydownSubject,
672
+ dataChange: this.dataChange,
428
673
  inputCom: this.inputCom,
429
674
  portalMaxHeight: this.portalMaxHeight,
430
675
  objectArray: this.objectArray,
431
676
  selectAllText: this.selectAllText,
677
+ caseSensitive: this.caseSensitive,
678
+ search: this.search,
432
679
  destroyPortal: () => this.destroyPortal(),
433
- nodeEmit: (node) => this.nodeClick(node),
680
+ nodeEmit: (node, value) => this.nodeClick(node, value),
434
681
  animating: (ing) => (this.animating = ing)
435
682
  });
436
683
  componentRef.changeDetectorRef.detectChanges();
437
684
  }
438
- nodeClick(node) {
439
- if (this.multiple && XIsArray(node)) {
440
- node = node;
441
- this.value = node;
442
- this.setDisplayValue();
685
+ nodeClick(node, value) {
686
+ if (this.multiple) {
687
+ if (XIsObjectArray(value)) {
688
+ if (node.selected) {
689
+ this.value.push(node);
690
+ }
691
+ else {
692
+ let inx = this.value.findIndex((x) => x.id === node.id);
693
+ this.value.splice(inx, 1);
694
+ }
695
+ }
696
+ else if (XIsArray(value)) {
697
+ if (node.selected) {
698
+ this.value.push(node.id);
699
+ }
700
+ else {
701
+ this.value.splice(this.value.indexOf(node.id), 1);
702
+ }
703
+ }
704
+ if (this.multipleInput) {
705
+ const input = this.multipleInput.elementRef.nativeElement;
706
+ this.renderer.setStyle(input, 'width', '2rem');
707
+ }
708
+ if (this.search && this.multipleSearchValue !== '') {
709
+ this.multipleSearchValue = '';
710
+ this.inputChange.next('');
711
+ this.valueChange.next([...this.value]);
712
+ }
713
+ this.setDisplayValue(node);
443
714
  }
444
715
  else {
445
716
  node = node;
@@ -448,9 +719,15 @@ class XSelectComponent extends XSelectProperty {
448
719
  this.value = node.id;
449
720
  this.closeSubject.next();
450
721
  }
451
- this.inputCom.inputFocus();
722
+ if (this.search && this.multiple) {
723
+ this.multipleInput.inputFocus();
724
+ }
725
+ else {
726
+ this.inputCom.inputFocus();
727
+ }
452
728
  if (this.onChange)
453
729
  this.onChange(this.value);
730
+ this.formControlValidator();
454
731
  this.cdr.detectChanges();
455
732
  }
456
733
  setPlacement() {
@@ -470,37 +747,82 @@ class XSelectComponent extends XSelectProperty {
470
747
  }
471
748
  onKeydown($event) {
472
749
  this.keydownSubject.next($event);
473
- if ($event.keyCode !== TAB)
750
+ if ($event.keyCode !== TAB && !this.search) {
474
751
  $event.preventDefault();
752
+ }
475
753
  }
476
754
  onFocus(_event) {
477
- this.inputCom.inputFocus();
755
+ if (this.search && this.multiple) {
756
+ this.multipleInput.inputFocus();
757
+ }
758
+ else {
759
+ this.inputCom.inputFocus();
760
+ }
761
+ }
762
+ onInput(_event) {
763
+ this.formControlValidator();
764
+ setTimeout(() => this.inputChange.next(this.multiple ? this.multipleSearchValue : this.displayValue));
478
765
  }
479
766
  }
480
- /** @nocollapse */ XSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1$1.XPortalService }, { token: i0.ViewContainerRef }, { token: i2.Overlay }, { token: i3$1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
481
- /** @nocollapse */ XSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XSelectComponent, selector: "x-select", providers: [XValueAccessor(XSelectComponent)], viewQueries: [{ propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, static: true }, { propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #select class=\"x-select\">\r\n <div class=\"x-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 [disabled]=\"disabled\"\r\n [required]=\"required\"\r\n [icon]=\"icon\"\r\n [iconSpin]=\"iconSpin\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\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 [(active)]=\"active\"\r\n (clearEmit)=\"clearEmit()\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xFocus)=\"onFocus($event)\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-select{display:inline-block}.x-select{margin:0;padding:0;width:100%}.x-select x-input{width:100%}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.XInputComponent, selector: "x-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
767
+ /** @nocollapse */ XSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1$1.XPortalService }, { token: i0.ViewContainerRef }, { token: i2.Overlay }, { token: i1.XI18nService }, { token: i4.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
768
+ /** @nocollapse */ XSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XSelectComponent, selector: "x-select", providers: [XValueAccessor(XSelectComponent)], viewQueries: [{ propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, static: true }, { propertyName: "select", first: true, predicate: ["select"], 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 #select class=\"x-select\" [class.x-select-multiple]=\"multiple\">\r\n <div class=\"x-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 [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 [@.disabled]=\"true\" *ngFor=\"let node of displayNodes; index as i\" closable (close)=\"closeNode($event, node, i)\" [size]=\"size\">{{\r\n node.label\r\n }}</x-tag>\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-select{display:inline-block;width:12rem}.x-select{margin:0;padding:0;width:100%}.x-select x-input{width:100%}.x-select-multiple .x-input-value-template-value{display:flex;align-items:center;margin-bottom:.125rem;flex-wrap:wrap;width:initial;height:initial!important}.x-select-multiple .x-input-value-template-value>x-tag{display:inline-flex;margin-left:.0625rem;margin-top:.125rem}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-big>.x-icon{right:calc(-var(--x-padding-large)/2)}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-large>.x-icon{right:calc(-var(--x-padding-medium)/2)}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-medium>.x-icon{right:calc(-var(--x-padding-small)/2)}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-small>.x-icon{right:calc(-var(--x-padding-mini)/2)}.x-select-multiple .x-input-value-template-value>x-tag .x-tag-mini{height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-select-multiple .x-input-value-template-value>x-tag .x-tag-mini>.x-icon{right:-.0625rem}.x-select-multiple .x-input-value-template-value>x-input{margin-top:.125rem;width:5rem}.x-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-mini>label{height:1.125rem;line-height:1.125rem}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\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 });
482
769
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectComponent, decorators: [{
483
770
  type: Component,
484
- args: [{ selector: `${XSelectPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XSelectComponent)], template: "<div #select class=\"x-select\">\r\n <div class=\"x-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 [disabled]=\"disabled\"\r\n [required]=\"required\"\r\n [icon]=\"icon\"\r\n [iconSpin]=\"iconSpin\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\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 [(active)]=\"active\"\r\n (clearEmit)=\"clearEmit()\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xFocus)=\"onFocus($event)\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-select{display:inline-block}.x-select{margin:0;padding:0;width:100%}.x-select x-input{width:100%}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"] }]
485
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1$1.XPortalService }, { type: i0.ViewContainerRef }, { type: i2.Overlay }, { type: i3$1.XConfigService }]; }, propDecorators: { inputCom: [{
771
+ args: [{ selector: `${XSelectPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XSelectComponent)], template: "<div #select class=\"x-select\" [class.x-select-multiple]=\"multiple\">\r\n <div class=\"x-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 [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 [@.disabled]=\"true\" *ngFor=\"let node of displayNodes; index as i\" closable (close)=\"closeNode($event, node, i)\" [size]=\"size\">{{\r\n node.label\r\n }}</x-tag>\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-select{display:inline-block;width:12rem}.x-select{margin:0;padding:0;width:100%}.x-select x-input{width:100%}.x-select-multiple .x-input-value-template-value{display:flex;align-items:center;margin-bottom:.125rem;flex-wrap:wrap;width:initial;height:initial!important}.x-select-multiple .x-input-value-template-value>x-tag{display:inline-flex;margin-left:.0625rem;margin-top:.125rem}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-big>.x-icon{right:calc(-var(--x-padding-large)/2)}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-large>.x-icon{right:calc(-var(--x-padding-medium)/2)}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-medium>.x-icon{right:calc(-var(--x-padding-small)/2)}.x-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-select-multiple .x-input-value-template-value>x-tag .x-tag-small>.x-icon{right:calc(-var(--x-padding-mini)/2)}.x-select-multiple .x-input-value-template-value>x-tag .x-tag-mini{height:1.125rem;line-height:1.125rem;padding:0 .125rem}.x-select-multiple .x-input-value-template-value>x-tag .x-tag-mini>.x-icon{right:-.0625rem}.x-select-multiple .x-input-value-template-value>x-input{margin-top:.125rem;width:5rem}.x-select-multiple .x-input-value-template-value>x-input .x-input-big>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-large>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-medium>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-small>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-mini>.x-input-row>.x-input-input>input,.x-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-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-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-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-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-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-select-multiple .x-input-value-template-value>x-input .x-input-mini>label{height:1.125rem;line-height:1.125rem}.x-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;background-color:var(--x-background);overflow:hidden auto;max-height:calc((calc(var(--x-font-size) + .875rem) * 6) + (var(--x-border-width) * 7))}\n"] }]
772
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1$1.XPortalService }, { type: i0.ViewContainerRef }, { type: i2.Overlay }, { type: i1.XI18nService }, { type: i4.XConfigService }]; }, propDecorators: { inputCom: [{
486
773
  type: ViewChild,
487
774
  args: ['inputCom', { static: true }]
488
775
  }], select: [{
489
776
  type: ViewChild,
490
777
  args: ['select', { static: true }]
778
+ }], multipleValueTpl: [{
779
+ type: ViewChild,
780
+ args: ['multipleValueTpl', { static: true }]
781
+ }], multipleInput: [{
782
+ type: ViewChild,
783
+ args: ['multipleInput']
491
784
  }] } });
492
785
 
493
786
  class XSelectModule {
494
787
  }
495
788
  /** @nocollapse */ XSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
496
- /** @nocollapse */ XSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: XSelectModule, declarations: [XSelectComponent, XSelectPortalComponent, XSelectProperty], imports: [CommonModule, FormsModule, ReactiveFormsModule, XPortalModule, XInputModule, XListModule, XBaseFormModule, XI18nModule], exports: [XSelectComponent, XSelectPortalComponent] });
497
- /** @nocollapse */ XSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, XPortalModule, XInputModule, XListModule, XBaseFormModule, XI18nModule] });
789
+ /** @nocollapse */ XSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: XSelectModule, declarations: [XSelectComponent, XSelectPortalComponent, XSelectProperty], imports: [CommonModule,
790
+ FormsModule,
791
+ ReactiveFormsModule,
792
+ XPortalModule,
793
+ XInputModule,
794
+ XListModule,
795
+ XBaseFormModule,
796
+ XTagModule,
797
+ XI18nModule,
798
+ XOutletModule], exports: [XSelectComponent, XSelectPortalComponent] });
799
+ /** @nocollapse */ XSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectModule, imports: [CommonModule,
800
+ FormsModule,
801
+ ReactiveFormsModule,
802
+ XPortalModule,
803
+ XInputModule,
804
+ XListModule,
805
+ XBaseFormModule,
806
+ XTagModule,
807
+ XI18nModule,
808
+ XOutletModule] });
498
809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XSelectModule, decorators: [{
499
810
  type: NgModule,
500
811
  args: [{
501
812
  declarations: [XSelectComponent, XSelectPortalComponent, XSelectProperty],
502
813
  exports: [XSelectComponent, XSelectPortalComponent],
503
- imports: [CommonModule, FormsModule, ReactiveFormsModule, XPortalModule, XInputModule, XListModule, XBaseFormModule, XI18nModule]
814
+ imports: [
815
+ CommonModule,
816
+ FormsModule,
817
+ ReactiveFormsModule,
818
+ XPortalModule,
819
+ XInputModule,
820
+ XListModule,
821
+ XBaseFormModule,
822
+ XTagModule,
823
+ XI18nModule,
824
+ XOutletModule
825
+ ]
504
826
  }]
505
827
  }] });
506
828