@ng-nest/ui 15.0.3 → 15.0.5

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 (57) hide show
  1. package/core/config/config.d.ts +2 -0
  2. package/dropdown/dropdown-portal.component.d.ts +4 -0
  3. package/esm2020/core/config/config.mjs +1 -1
  4. package/esm2020/dropdown/dropdown-portal.component.mjs +16 -4
  5. package/esm2020/input/input.component.mjs +2 -2
  6. package/esm2020/pagination/pagination.component.mjs +33 -4
  7. package/esm2020/pagination/pagination.property.mjs +15 -3
  8. package/esm2020/select/select.component.mjs +15 -3
  9. package/esm2020/select/select.property.mjs +4 -2
  10. package/esm2020/table/table-body.component.mjs +6 -6
  11. package/esm2020/table/table-head.component.mjs +46 -7
  12. package/esm2020/table/table.component.mjs +16 -5
  13. package/esm2020/table/table.module.mjs +5 -1
  14. package/esm2020/table/table.property.mjs +23 -2
  15. package/esm2020/transfer/transfer.component.mjs +130 -20
  16. package/esm2020/transfer/transfer.module.mjs +12 -4
  17. package/esm2020/transfer/transfer.property.mjs +11 -2
  18. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  19. package/fesm2015/ng-nest-ui-date-picker.mjs +1 -0
  20. package/fesm2015/ng-nest-ui-dropdown.mjs +15 -3
  21. package/fesm2015/ng-nest-ui-dropdown.mjs.map +1 -1
  22. package/fesm2015/ng-nest-ui-input.mjs +2 -2
  23. package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
  24. package/fesm2015/ng-nest-ui-pagination.mjs +46 -5
  25. package/fesm2015/ng-nest-ui-pagination.mjs.map +1 -1
  26. package/fesm2015/ng-nest-ui-select.mjs +17 -3
  27. package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
  28. package/fesm2015/ng-nest-ui-table.mjs +89 -16
  29. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  30. package/fesm2015/ng-nest-ui-transfer.mjs +154 -26
  31. package/fesm2015/ng-nest-ui-transfer.mjs.map +1 -1
  32. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  33. package/fesm2020/ng-nest-ui-date-picker.mjs +1 -0
  34. package/fesm2020/ng-nest-ui-dropdown.mjs +15 -3
  35. package/fesm2020/ng-nest-ui-dropdown.mjs.map +1 -1
  36. package/fesm2020/ng-nest-ui-input.mjs +2 -2
  37. package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
  38. package/fesm2020/ng-nest-ui-pagination.mjs +46 -5
  39. package/fesm2020/ng-nest-ui-pagination.mjs.map +1 -1
  40. package/fesm2020/ng-nest-ui-select.mjs +17 -3
  41. package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
  42. package/fesm2020/ng-nest-ui-table.mjs +89 -16
  43. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  44. package/fesm2020/ng-nest-ui-transfer.mjs +151 -24
  45. package/fesm2020/ng-nest-ui-transfer.mjs.map +1 -1
  46. package/package.json +1 -1
  47. package/pagination/pagination.component.d.ts +3 -1
  48. package/pagination/pagination.property.d.ts +13 -3
  49. package/select/select.component.d.ts +4 -1
  50. package/select/select.property.d.ts +9 -4
  51. package/table/table-head.component.d.ts +9 -1
  52. package/table/table.component.d.ts +4 -2
  53. package/table/table.module.d.ts +4 -3
  54. package/table/table.property.d.ts +26 -1
  55. package/transfer/transfer.component.d.ts +12 -2
  56. package/transfer/transfer.module.d.ts +3 -1
  57. package/transfer/transfer.property.d.ts +29 -4
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
+ import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import * as i1 from '@ng-nest/ui/core';
5
- import { XDataConvert, XWithConfig, XInputBoolean, XIsArray, XIsObjectArray, XIsEmpty, XIsChange, XRemove, XSetData, XIsFunction, XIsObject, XIsBoolean } from '@ng-nest/ui/core';
5
+ import { XDataConvert, XWithConfig, XInputBoolean, XIsArray, XIsObjectArray, XIsEmpty, XIsChange, XIsUndefined, XRemove, XSetData, XIsFunction, XIsObject, XIsBoolean } from '@ng-nest/ui/core';
6
6
  import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
7
7
  import { Subject } from 'rxjs';
8
- import { map, takeUntil } from 'rxjs/operators';
8
+ import { map, takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';
9
9
  import * as i5 from '@angular/cdk/drag-drop';
10
10
  import { transferArrayItem, moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
11
11
  import * as i2 from '@ng-nest/ui/i18n';
@@ -19,11 +19,16 @@ import * as i7 from '@ng-nest/ui/checkbox';
19
19
  import { XCheckboxModule } from '@ng-nest/ui/checkbox';
20
20
  import * as i8 from '@ng-nest/ui/button';
21
21
  import { XButtonModule } from '@ng-nest/ui/button';
22
- import * as i9 from '@ng-nest/ui/tree';
22
+ import * as i9 from '@ng-nest/ui/input';
23
+ import { XInputModule } from '@ng-nest/ui/input';
24
+ import * as i10 from '@ng-nest/ui/tree';
23
25
  import { XTreeModule } from '@ng-nest/ui/tree';
24
- import * as i10 from '@ng-nest/ui/table';
26
+ import * as i11 from '@ng-nest/ui/table';
25
27
  import { XTableModule } from '@ng-nest/ui/table';
26
- import { XInputModule } from '@ng-nest/ui/input';
28
+ import * as i12 from '@ng-nest/ui/keyword';
29
+ import { XKeywordModule } from '@ng-nest/ui/keyword';
30
+ import * as i13 from '@ng-nest/ui/link';
31
+ import { XLinkModule } from '@ng-nest/ui/link';
27
32
 
28
33
  /**
29
34
  * Transfer
@@ -56,7 +61,7 @@ class XTransferProperty extends XControlValueAccessor {
56
61
  }
57
62
  }
58
63
  /** @nocollapse */ XTransferProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTransferProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
59
- /** @nocollapse */ XTransferProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTransferProperty, selector: "ng-component", inputs: { data: "data", type: "type", titles: "titles", listStyle: "listStyle", hiddenCheckAll: "hiddenCheckAll", drag: "drag", search: "search", nodeTpl: "nodeTpl", titleTpl: "titleTpl", tableColumns: "tableColumns", tableIndex: "tableIndex", tableSize: "tableSize", tableQuery: "tableQuery", tableTotal: "tableTotal" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
64
+ /** @nocollapse */ XTransferProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTransferProperty, selector: "ng-component", inputs: { data: "data", type: "type", titles: "titles", listStyle: "listStyle", hiddenCheckAll: "hiddenCheckAll", drag: "drag", search: "search", tableHeadSearchTpl: "tableHeadSearchTpl", nodeTpl: "nodeTpl", titleTpl: "titleTpl", footerTpl: "footerTpl", tableColumns: "tableColumns", tableIndex: "tableIndex", tableSize: "tableSize", tableQuery: "tableQuery", tableTotal: "tableTotal", inverse: "inverse" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
60
65
  __decorate([
61
66
  XDataConvert()
62
67
  ], XTransferProperty.prototype, "data", void 0);
@@ -82,6 +87,9 @@ __decorate([
82
87
  __decorate([
83
88
  XWithConfig(X_CONFIG_NAME, 10)
84
89
  ], XTransferProperty.prototype, "tableSize", void 0);
90
+ __decorate([
91
+ XInputBoolean()
92
+ ], XTransferProperty.prototype, "inverse", void 0);
85
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTransferProperty, decorators: [{
86
94
  type: Component,
87
95
  args: [{ template: '' }]
@@ -99,10 +107,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
99
107
  type: Input
100
108
  }], search: [{
101
109
  type: Input
110
+ }], tableHeadSearchTpl: [{
111
+ type: Input
102
112
  }], nodeTpl: [{
103
113
  type: Input
104
114
  }], titleTpl: [{
105
115
  type: Input
116
+ }], footerTpl: [{
117
+ type: Input
106
118
  }], tableColumns: [{
107
119
  type: Input
108
120
  }], tableIndex: [{
@@ -113,6 +125,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
113
125
  type: Input
114
126
  }], tableTotal: [{
115
127
  type: Input
128
+ }], inverse: [{
129
+ type: Input
116
130
  }] } });
117
131
 
118
132
  class XTransferComponent extends XTransferProperty {
@@ -139,6 +153,9 @@ class XTransferComponent extends XTransferProperty {
139
153
  disabledButton: true
140
154
  };
141
155
  this.searchInput = '';
156
+ this.searchInputLeftChange = new Subject();
157
+ this.searchInputRightChange = new Subject();
158
+ this.searchDebounceTime = 200;
142
159
  this.locale = {};
143
160
  this._unSubject = new Subject();
144
161
  this.treeActivatedId = [];
@@ -176,6 +193,8 @@ class XTransferComponent extends XTransferProperty {
176
193
  this.setListStyle();
177
194
  this.setHiddenCheckAll();
178
195
  this.getTableCheckColumn();
196
+ this.setFooterTpl();
197
+ this.setTableHeadSearchTpl();
179
198
  this.i18n.localeChange
180
199
  .pipe(map((x) => x.transfer), takeUntil(this._unSubject))
181
200
  .subscribe((x) => {
@@ -183,6 +202,16 @@ class XTransferComponent extends XTransferProperty {
183
202
  XIsEmpty(this.titles) && this.setTitles();
184
203
  this.cdr.markForCheck();
185
204
  });
205
+ this.searchInputLeftChange
206
+ .pipe(debounceTime(this.searchDebounceTime), distinctUntilChanged(), takeUntil(this._unSubject))
207
+ .subscribe(() => {
208
+ this.setSearchInputChange(this.left);
209
+ });
210
+ this.searchInputRightChange
211
+ .pipe(debounceTime(this.searchDebounceTime), distinctUntilChanged(), takeUntil(this._unSubject))
212
+ .subscribe(() => {
213
+ this.setSearchInputChange(this.right);
214
+ });
186
215
  }
187
216
  ngOnChanges(changes) {
188
217
  const { data } = changes;
@@ -192,8 +221,52 @@ class XTransferComponent extends XTransferProperty {
192
221
  this._unSubject.next();
193
222
  this._unSubject.unsubscribe();
194
223
  }
195
- searchInputChange(source) {
196
- source.list = source.searchList?.filter((x) => x.label.indexOf(source.searchInput) >= 0);
224
+ onSearchInputChange(source) {
225
+ if (source.direction === 'left') {
226
+ this.searchInputLeftChange.next(source.searchInput);
227
+ }
228
+ else if (source.direction === 'right') {
229
+ this.searchInputRightChange.next(source.searchInput);
230
+ }
231
+ }
232
+ setSearchInputChange(source) {
233
+ if (XIsUndefined(source.searchInput))
234
+ return;
235
+ if (XIsEmpty(source.searchInput)) {
236
+ source.list = [...source.searchList];
237
+ }
238
+ else {
239
+ switch (this.type) {
240
+ case 'list':
241
+ source.list = source.searchList?.filter((x) => x.label.indexOf(source.searchInput) >= 0);
242
+ break;
243
+ case 'tree':
244
+ if (source.direction === 'right') {
245
+ source.list = source.searchList?.filter((x) => x.label.indexOf(source.searchInput) >= 0);
246
+ }
247
+ else if (source.direction === 'left') {
248
+ let searchList = source.searchList?.filter((x) => x.label.indexOf(source.searchInput) >= 0);
249
+ let parents = [];
250
+ const findParent = (item) => {
251
+ if (!item.pid)
252
+ return;
253
+ let parent = source.searchList?.find((x) => x.id === item.pid);
254
+ if (parent && !parents.some((x) => x.id === parent.id)) {
255
+ parents.push(parent);
256
+ findParent(parent);
257
+ }
258
+ };
259
+ for (let item of searchList) {
260
+ findParent(item);
261
+ }
262
+ source.list = [...searchList, ...parents];
263
+ }
264
+ break;
265
+ case 'table':
266
+ break;
267
+ }
268
+ }
269
+ this.setListCount(this.type, source);
197
270
  this.cdr.detectChanges();
198
271
  }
199
272
  checkedAllChange($event, source) {
@@ -236,9 +309,13 @@ class XTransferComponent extends XTransferProperty {
236
309
  let checkedItems = from.list?.filter((x) => !x.disabled && x.checked);
237
310
  let j = 0;
238
311
  checkedItems.forEach((x) => {
239
- const index = from.list?.indexOf(x);
312
+ let index = from.list?.indexOf(x);
240
313
  x.checked = false;
241
314
  transferArrayItem(from.list, to.list, index, j);
315
+ if (this.search) {
316
+ index = from.searchList?.indexOf(x);
317
+ transferArrayItem(from.searchList, to.searchList, index, j);
318
+ }
242
319
  j++;
243
320
  });
244
321
  from.list = [...from.list];
@@ -270,6 +347,9 @@ class XTransferComponent extends XTransferProperty {
270
347
  }
271
348
  else {
272
349
  checkedItems = XRemove(from.list, (x) => !x.disabled && x.checked);
350
+ if (this.search) {
351
+ XRemove(from.searchList, (x) => !x.disabled && x.checked);
352
+ }
273
353
  for (let item of checkedItems) {
274
354
  let node = to.list?.find((x) => x.id === item.id);
275
355
  if (node) {
@@ -395,6 +475,21 @@ class XTransferComponent extends XTransferProperty {
395
475
  this.setCheckedCount('table', source);
396
476
  this.setButtonDisabled(source);
397
477
  }
478
+ onInverse(source) {
479
+ for (let item of source.list) {
480
+ if (!item.disabled) {
481
+ item.checked = !item.checked;
482
+ }
483
+ }
484
+ let type = `${this.type}`;
485
+ if (type === 'tree' && source.direction === 'right') {
486
+ type = 'list';
487
+ }
488
+ this.setCheckedCount(type, source);
489
+ this.setCheckedAll(source);
490
+ this.setButtonDisabled(source);
491
+ this.cdr.detectChanges();
492
+ }
398
493
  getTableCheckColumn() {
399
494
  if (this.type !== 'table' || XIsEmpty(this.tableColumns))
400
495
  return;
@@ -440,14 +535,14 @@ class XTransferComponent extends XTransferProperty {
440
535
  }
441
536
  this.onChange(this.value);
442
537
  }
443
- setSearchList(..._sources) {
444
- // if (this.search) {
445
- // for (let source of sources) {
446
- // if (XIsEmpty(source.searchInput)) {
447
- // source.searchList = [...(source.list as XTransferNode[])];
448
- // }
449
- // }
450
- // }
538
+ setSearchList(...sources) {
539
+ if (this.search) {
540
+ for (let source of sources) {
541
+ if (XIsEmpty(source.searchInput)) {
542
+ source.searchList = [...source.list];
543
+ }
544
+ }
545
+ }
451
546
  }
452
547
  setData() {
453
548
  if (this.type === 'table') {
@@ -582,13 +677,39 @@ class XTransferComponent extends XTransferProperty {
582
677
  this.right.hiddenCheckAll = this.hiddenCheckAll[1];
583
678
  this.cdr.detectChanges();
584
679
  }
680
+ setFooterTpl() {
681
+ if (XIsUndefined(this.footerTpl))
682
+ return;
683
+ if (this.footerTpl.length > 0) {
684
+ this.left.footerTpl = this.footerTpl[0];
685
+ }
686
+ if (this.footerTpl.length > 1) {
687
+ this.right.footerTpl = this.footerTpl[1];
688
+ }
689
+ }
690
+ setTableHeadSearchTpl() {
691
+ if (XIsUndefined(this.tableHeadSearchTpl))
692
+ return;
693
+ if (this.tableHeadSearchTpl.length > 0) {
694
+ this.left.tableHeadSearchTpl = this.tableHeadSearchTpl[0];
695
+ }
696
+ if (this.tableHeadSearchTpl.length > 1) {
697
+ this.right.tableHeadSearchTpl = this.tableHeadSearchTpl[1];
698
+ }
699
+ }
585
700
  }
586
701
  /** @nocollapse */ XTransferComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTransferComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }, { token: i2.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
587
- /** @nocollapse */ XTransferComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTransferComponent, selector: "x-transfer", providers: [XValueAccessor(XTransferComponent)], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #transfer class=\"x-transfer\" cdkDropListGroup [ngClass]=\"classMap\">\r\n <div class=\"x-transfer-box\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: left }\"></ng-container>\r\n <div [ngStyle]=\"left.listStyle!\" class=\"x-transfer-list\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ul\r\n *ngSwitchCase=\"'list'\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"left.list\"\r\n [cdkDropListDisabled]=\"!drag && type === 'list'\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of left.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: left }\"></ng-container>\r\n </li>\r\n </ul>\r\n <x-tree\r\n *ngSwitchCase=\"'tree'\"\r\n [data]=\"left.list!\"\r\n multiple\r\n allowManyActivated\r\n [(activatedId)]=\"treeActivatedId\"\r\n (nodeClick)=\"onTreeNodeClick($event)\"\r\n ></x-tree>\r\n <x-table\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"tableData\"\r\n [columns]=\"tableColumns!\"\r\n [(size)]=\"tableSize\"\r\n [(index)]=\"tableIndex\"\r\n (indexChange)=\"getTableData()\"\r\n [query]=\"tableQuery\"\r\n [total]=\"tableTotal\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, left)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, left)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n ></x-table>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"x-transfer-buttons\">\r\n <x-button type=\"primary\" icon=\"fto-chevron-right\" [disabled]=\"left.disabledButton\" (click)=\"move(left, right)\"></x-button>\r\n <x-button type=\"primary\" icon=\"fto-chevron-left\" [disabled]=\"right.disabledButton\" (click)=\"move(right, left)\"></x-button>\r\n </div>\r\n <div class=\"x-transfer-box\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: right }\"></ng-container>\r\n <div [ngSwitch]=\"type\" [ngStyle]=\"right.listStyle!\" class=\"x-transfer-list\">\r\n <x-table\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"right.list!\"\r\n [columns]=\"tableColumns!\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, right)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, right)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showPagination=\"false\"\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n ></x-table>\r\n <ul\r\n *ngSwitchDefault\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"right.list\"\r\n [cdkDropListDisabled]=\"!drag || (drag && type !== 'list')\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of right.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: right }\"></ng-container>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #sourceTitleTpl let-source=\"source\">\r\n <div class=\"x-transfer-title\">\r\n <x-checkbox\r\n *ngIf=\"source.title && !source.hiddenCheckAll\"\r\n [data]=\"[titleTpl ? '' : source.title]\"\r\n [(ngModel)]=\"source.checkedAll\"\r\n (ngModelChange)=\"checkedAllChange($event, source)\"\r\n [indeterminate]=\"source.indeterminate\"\r\n ></x-checkbox>\r\n <span *ngIf=\"source.title && source.hiddenCheckAll\">{{ source.title }}</span>\r\n <ng-container *xOutlet=\"titleTpl; context: { $title: source.title, $checkedCount: source.checkedCount, $count: source.count }\"\r\n ><span class=\"x-transfer-total\">{{ source.checkedCount }} / {{ source.count }}</span></ng-container\r\n >\r\n </div>\r\n <!-- <div class=\"x-transfer-search\" *ngIf=\"search\">\r\n <x-input\r\n icon=\"fto-search\"\r\n [(ngModel)]=\"source.searchInput\"\r\n (ngModelChange)=\"searchInputChange(source)\"\r\n clearable\r\n ></x-input>\r\n </div> -->\r\n</ng-template>\r\n\r\n<ng-template #sourceNodeTpl let-node=\"node\" let-source=\"source\">\r\n <x-checkbox\r\n [data]=\"[{ id: node.id, label: nodeTpl ? nodeTpl : node.label, node: node }]\"\r\n [disabled]=\"node.disabled\"\r\n [(ngModel)]=\"node.checked\"\r\n (ngModelChange)=\"checkedChange($event, source)\"\r\n ></x-checkbox>\r\n</ng-template>\r\n", styles: [".x-transfer{margin:0;padding:0;display:inline-flex;align-items:center}.x-transfer-title{padding:.25rem .5625rem;display:flex;align-items:center;justify-content:space-between;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top-left-radius:var(--x-border-radius);border-top-right-radius:var(--x-border-radius);border-bottom:none;background-color:var(--x-background);color:var(--x-text-300)}.x-transfer-total{margin-left:.325rem}.x-transfer-list{display:flex;flex-direction:column;height:18rem;width:12rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom-left-radius:var(--x-border-radius);border-bottom-right-radius:var(--x-border-radius);overflow:auto}.x-transfer-item{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-transfer-droplist{height:100%;padding:.25rem}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:hover{background-color:transparent}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item.cdk-drag-placeholder{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-transfer-buttons{margin:0 1rem;display:flex;flex-direction:column}.x-transfer-buttons>x-button:not(:first-child){margin-top:.5rem}.x-transfer-search{padding:.5rem;border-bottom:.0625rem solid var(--x-border)}body>li.x-transfer-item.cdk-drag-preview{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>li.x-transfer-item.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { 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: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: i7.XCheckboxComponent, selector: "x-checkbox" }, { kind: "component", type: i8.XButtonComponent, selector: "x-button" }, { kind: "component", type: i9.XTreeComponent, selector: "x-tree" }, { kind: "component", type: i10.XTableComponent, selector: "x-table" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
702
+ /** @nocollapse */ XTransferComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTransferComponent, selector: "x-transfer", providers: [XValueAccessor(XTransferComponent)], viewQueries: [{ propertyName: "leftTableCom", first: true, predicate: ["leftTableCom"], descendants: true }, { propertyName: "rightTableCom", first: true, predicate: ["rightTableCom"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #transfer class=\"x-transfer\" cdkDropListGroup [ngClass]=\"classMap\">\r\n <div class=\"x-transfer-box\" [class.x-transfer-has-footer]=\"left.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: left }\"></ng-container>\r\n <div [ngStyle]=\"left.listStyle!\" class=\"x-transfer-list\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ul\r\n *ngSwitchCase=\"'list'\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"left.list\"\r\n [cdkDropListDisabled]=\"!drag && type === 'list'\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of left.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: left }\"></ng-container>\r\n </li>\r\n </ul>\r\n <x-tree\r\n *ngSwitchCase=\"'tree'\"\r\n [data]=\"left.list!\"\r\n multiple\r\n allowManyActivated\r\n [(activatedId)]=\"treeActivatedId\"\r\n (nodeClick)=\"onTreeNodeClick($event)\"\r\n [labelTpl]=\"treeLabelTpl\"\r\n ></x-tree>\r\n <ng-template #treeLabelTpl let-node=\"$node\">\r\n <span class=\"x-transfer-tree-label\" x-keyword [text]=\"left.searchInput!\">{{ node.label }}</span>\r\n </ng-template>\r\n <x-table\r\n #leftTableCom\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"tableData\"\r\n [columns]=\"tableColumns!\"\r\n [(size)]=\"tableSize\"\r\n [(index)]=\"tableIndex\"\r\n (indexChange)=\"getTableData()\"\r\n [query]=\"tableQuery\"\r\n [total]=\"tableTotal\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, left)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, left)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n [headSearchTpl]=\"left.tableHeadSearchTpl\"\r\n ></x-table>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-transfer-footer\" *ngIf=\"left.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"left.footerTpl; context: { $source: left }\"></ng-container>\r\n </div>\r\n </div>\r\n <div class=\"x-transfer-buttons\">\r\n <x-button type=\"primary\" icon=\"fto-chevron-right\" [disabled]=\"left.disabledButton\" (click)=\"move(left, right)\"></x-button>\r\n <x-button type=\"primary\" icon=\"fto-chevron-left\" [disabled]=\"right.disabledButton\" (click)=\"move(right, left)\"></x-button>\r\n </div>\r\n <div class=\"x-transfer-box\" [class.x-transfer-has-footer]=\"right.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: right }\"></ng-container>\r\n <div [ngSwitch]=\"type\" [ngStyle]=\"right.listStyle!\" class=\"x-transfer-list\">\r\n <x-table\r\n #rightTableCom\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"right.list!\"\r\n [columns]=\"tableColumns!\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, right)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, right)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showPagination=\"false\"\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n [headSearchTpl]=\"right.tableHeadSearchTpl\"\r\n ></x-table>\r\n <ul\r\n *ngSwitchDefault\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"right.list\"\r\n [cdkDropListDisabled]=\"!drag || (drag && type !== 'list')\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of right.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: right }\"></ng-container>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"x-transfer-footer\" *ngIf=\"right.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"right.footerTpl; context: { $source: right }\"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #sourceTitleTpl let-source=\"source\">\r\n <div class=\"x-transfer-title\">\r\n <div class=\"x-transfer-title-left\">\r\n <x-checkbox\r\n *ngIf=\"source.title && !source.hiddenCheckAll\"\r\n [data]=\"[titleTpl ? '' : source.title]\"\r\n [(ngModel)]=\"source.checkedAll\"\r\n (ngModelChange)=\"checkedAllChange($event, source)\"\r\n [indeterminate]=\"source.indeterminate\"\r\n ></x-checkbox>\r\n <span *ngIf=\"source.title && source.hiddenCheckAll\">{{ source.title }}</span>\r\n <x-link *ngIf=\"inverse && type === 'list'\" class=\"x-transfer-inverse\" type=\"primary\" (click)=\"onInverse(source)\">\u53CD\u9009</x-link>\r\n </div>\r\n <ng-container *xOutlet=\"titleTpl; context: { $title: source.title, $checkedCount: source.checkedCount, $count: source.count }\"\r\n ><span class=\"x-transfer-total\">{{ source.checkedCount }} / {{ source.count }}</span></ng-container\r\n >\r\n </div>\r\n <div class=\"x-transfer-search\" *ngIf=\"search && type !== 'table'\">\r\n <x-input icon=\"fto-search\" [(ngModel)]=\"source.searchInput\" (ngModelChange)=\"onSearchInputChange(source)\" clearable></x-input>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #sourceNodeTpl let-node=\"node\" let-source=\"source\">\r\n <x-checkbox\r\n [data]=\"[{ id: node.id, label: nodeTpl ? nodeTpl : labelTpl, node: node }]\"\r\n [disabled]=\"node.disabled\"\r\n [(ngModel)]=\"node.checked\"\r\n (ngModelChange)=\"checkedChange($event, source)\"\r\n ></x-checkbox>\r\n <ng-template #labelTpl>\r\n <span x-keyword [text]=\"source.searchInput!\">{{ node.label }}</span>\r\n </ng-template>\r\n</ng-template>\r\n", styles: [".x-transfer{margin:0;padding:0;display:inline-flex;align-items:center}.x-transfer-title{padding:.25rem .5625rem;display:flex;align-items:center;justify-content:space-between;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top-left-radius:var(--x-border-radius);border-top-right-radius:var(--x-border-radius);background-color:var(--x-background);color:var(--x-text-300)}.x-transfer-title-left{display:inline-flex;align-items:center}.x-transfer-inverse{margin:0 .5rem}.x-transfer-total{margin-left:.325rem}.x-transfer-box{min-width:12rem}.x-transfer-list{display:flex;flex-direction:column;height:18rem;width:100%;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top:none;border-bottom-left-radius:var(--x-border-radius);border-bottom-right-radius:var(--x-border-radius);overflow:auto}.x-transfer-item{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-transfer-droplist{height:100%;padding:.25rem}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:hover{background-color:transparent}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item.cdk-drag-placeholder{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-transfer-buttons{margin:0 1rem;display:flex;flex-direction:column}.x-transfer-buttons>x-button:not(:first-child){margin-top:.5rem}.x-transfer-search{padding:.5rem;border-left:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-transfer-search x-input{width:100%}.x-transfer-tree-label{flex:1}.x-transfer-footer{padding:.25rem .5625rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom-left-radius:var(--x-border-radius);border-bottom-right-radius:var(--x-border-radius)}.x-transfer-has-footer .x-transfer-list{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}body>li.x-transfer-item.cdk-drag-preview{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>li.x-transfer-item.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { 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: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: i7.XCheckboxComponent, selector: "x-checkbox" }, { kind: "component", type: i8.XButtonComponent, selector: "x-button" }, { kind: "component", type: i9.XInputComponent, selector: "x-input" }, { kind: "component", type: i10.XTreeComponent, selector: "x-tree" }, { kind: "component", type: i11.XTableComponent, selector: "x-table" }, { kind: "directive", type: i12.XKeywordDirective, selector: "[x-keyword]" }, { kind: "component", type: i13.XLinkComponent, selector: "x-link" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
588
703
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTransferComponent, decorators: [{
589
704
  type: Component,
590
- args: [{ selector: `${XTransferPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XTransferComponent)], template: "<div #transfer class=\"x-transfer\" cdkDropListGroup [ngClass]=\"classMap\">\r\n <div class=\"x-transfer-box\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: left }\"></ng-container>\r\n <div [ngStyle]=\"left.listStyle!\" class=\"x-transfer-list\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ul\r\n *ngSwitchCase=\"'list'\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"left.list\"\r\n [cdkDropListDisabled]=\"!drag && type === 'list'\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of left.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: left }\"></ng-container>\r\n </li>\r\n </ul>\r\n <x-tree\r\n *ngSwitchCase=\"'tree'\"\r\n [data]=\"left.list!\"\r\n multiple\r\n allowManyActivated\r\n [(activatedId)]=\"treeActivatedId\"\r\n (nodeClick)=\"onTreeNodeClick($event)\"\r\n ></x-tree>\r\n <x-table\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"tableData\"\r\n [columns]=\"tableColumns!\"\r\n [(size)]=\"tableSize\"\r\n [(index)]=\"tableIndex\"\r\n (indexChange)=\"getTableData()\"\r\n [query]=\"tableQuery\"\r\n [total]=\"tableTotal\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, left)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, left)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n ></x-table>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"x-transfer-buttons\">\r\n <x-button type=\"primary\" icon=\"fto-chevron-right\" [disabled]=\"left.disabledButton\" (click)=\"move(left, right)\"></x-button>\r\n <x-button type=\"primary\" icon=\"fto-chevron-left\" [disabled]=\"right.disabledButton\" (click)=\"move(right, left)\"></x-button>\r\n </div>\r\n <div class=\"x-transfer-box\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: right }\"></ng-container>\r\n <div [ngSwitch]=\"type\" [ngStyle]=\"right.listStyle!\" class=\"x-transfer-list\">\r\n <x-table\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"right.list!\"\r\n [columns]=\"tableColumns!\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, right)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, right)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showPagination=\"false\"\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n ></x-table>\r\n <ul\r\n *ngSwitchDefault\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"right.list\"\r\n [cdkDropListDisabled]=\"!drag || (drag && type !== 'list')\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of right.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: right }\"></ng-container>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #sourceTitleTpl let-source=\"source\">\r\n <div class=\"x-transfer-title\">\r\n <x-checkbox\r\n *ngIf=\"source.title && !source.hiddenCheckAll\"\r\n [data]=\"[titleTpl ? '' : source.title]\"\r\n [(ngModel)]=\"source.checkedAll\"\r\n (ngModelChange)=\"checkedAllChange($event, source)\"\r\n [indeterminate]=\"source.indeterminate\"\r\n ></x-checkbox>\r\n <span *ngIf=\"source.title && source.hiddenCheckAll\">{{ source.title }}</span>\r\n <ng-container *xOutlet=\"titleTpl; context: { $title: source.title, $checkedCount: source.checkedCount, $count: source.count }\"\r\n ><span class=\"x-transfer-total\">{{ source.checkedCount }} / {{ source.count }}</span></ng-container\r\n >\r\n </div>\r\n <!-- <div class=\"x-transfer-search\" *ngIf=\"search\">\r\n <x-input\r\n icon=\"fto-search\"\r\n [(ngModel)]=\"source.searchInput\"\r\n (ngModelChange)=\"searchInputChange(source)\"\r\n clearable\r\n ></x-input>\r\n </div> -->\r\n</ng-template>\r\n\r\n<ng-template #sourceNodeTpl let-node=\"node\" let-source=\"source\">\r\n <x-checkbox\r\n [data]=\"[{ id: node.id, label: nodeTpl ? nodeTpl : node.label, node: node }]\"\r\n [disabled]=\"node.disabled\"\r\n [(ngModel)]=\"node.checked\"\r\n (ngModelChange)=\"checkedChange($event, source)\"\r\n ></x-checkbox>\r\n</ng-template>\r\n", styles: [".x-transfer{margin:0;padding:0;display:inline-flex;align-items:center}.x-transfer-title{padding:.25rem .5625rem;display:flex;align-items:center;justify-content:space-between;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top-left-radius:var(--x-border-radius);border-top-right-radius:var(--x-border-radius);border-bottom:none;background-color:var(--x-background);color:var(--x-text-300)}.x-transfer-total{margin-left:.325rem}.x-transfer-list{display:flex;flex-direction:column;height:18rem;width:12rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom-left-radius:var(--x-border-radius);border-bottom-right-radius:var(--x-border-radius);overflow:auto}.x-transfer-item{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-transfer-droplist{height:100%;padding:.25rem}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:hover{background-color:transparent}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item.cdk-drag-placeholder{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-transfer-buttons{margin:0 1rem;display:flex;flex-direction:column}.x-transfer-buttons>x-button:not(:first-child){margin-top:.5rem}.x-transfer-search{padding:.5rem;border-bottom:.0625rem solid var(--x-border)}body>li.x-transfer-item.cdk-drag-preview{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>li.x-transfer-item.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
591
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }, { type: i2.XI18nService }]; } });
705
+ args: [{ selector: `${XTransferPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XTransferComponent)], template: "<div #transfer class=\"x-transfer\" cdkDropListGroup [ngClass]=\"classMap\">\r\n <div class=\"x-transfer-box\" [class.x-transfer-has-footer]=\"left.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: left }\"></ng-container>\r\n <div [ngStyle]=\"left.listStyle!\" class=\"x-transfer-list\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ul\r\n *ngSwitchCase=\"'list'\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"left.list\"\r\n [cdkDropListDisabled]=\"!drag && type === 'list'\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of left.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: left }\"></ng-container>\r\n </li>\r\n </ul>\r\n <x-tree\r\n *ngSwitchCase=\"'tree'\"\r\n [data]=\"left.list!\"\r\n multiple\r\n allowManyActivated\r\n [(activatedId)]=\"treeActivatedId\"\r\n (nodeClick)=\"onTreeNodeClick($event)\"\r\n [labelTpl]=\"treeLabelTpl\"\r\n ></x-tree>\r\n <ng-template #treeLabelTpl let-node=\"$node\">\r\n <span class=\"x-transfer-tree-label\" x-keyword [text]=\"left.searchInput!\">{{ node.label }}</span>\r\n </ng-template>\r\n <x-table\r\n #leftTableCom\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"tableData\"\r\n [columns]=\"tableColumns!\"\r\n [(size)]=\"tableSize\"\r\n [(index)]=\"tableIndex\"\r\n (indexChange)=\"getTableData()\"\r\n [query]=\"tableQuery\"\r\n [total]=\"tableTotal\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, left)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, left)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n [headSearchTpl]=\"left.tableHeadSearchTpl\"\r\n ></x-table>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-transfer-footer\" *ngIf=\"left.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"left.footerTpl; context: { $source: left }\"></ng-container>\r\n </div>\r\n </div>\r\n <div class=\"x-transfer-buttons\">\r\n <x-button type=\"primary\" icon=\"fto-chevron-right\" [disabled]=\"left.disabledButton\" (click)=\"move(left, right)\"></x-button>\r\n <x-button type=\"primary\" icon=\"fto-chevron-left\" [disabled]=\"right.disabledButton\" (click)=\"move(right, left)\"></x-button>\r\n </div>\r\n <div class=\"x-transfer-box\" [class.x-transfer-has-footer]=\"right.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"sourceTitleTpl; context: { source: right }\"></ng-container>\r\n <div [ngSwitch]=\"type\" [ngStyle]=\"right.listStyle!\" class=\"x-transfer-list\">\r\n <x-table\r\n #rightTableCom\r\n *ngSwitchCase=\"'table'\"\r\n [data]=\"right.list!\"\r\n [columns]=\"tableColumns!\"\r\n (activatedRowChange)=\"onTableCheckedRow($event, right)\"\r\n (headCheckboxChange)=\"onTableCheckedAll($event, right)\"\r\n hiddenWrapBorder\r\n hiddenPaginationBorder\r\n showPagination=\"false\"\r\n showEllipsis=\"false\"\r\n showTotal=\"false\"\r\n paginationPosition=\"bottom-center\"\r\n allowSelectRow=\"false\"\r\n [headSearchTpl]=\"right.tableHeadSearchTpl\"\r\n ></x-table>\r\n <ul\r\n *ngSwitchDefault\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListData]=\"right.list\"\r\n [cdkDropListDisabled]=\"!drag || (drag && type !== 'list')\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n class=\"x-transfer-droplist\"\r\n >\r\n <li class=\"x-transfer-item\" *ngFor=\"let node of right.list; trackBy: trackByNode\" cdkDrag [cdkDragData]=\"node\">\r\n <ng-container *ngTemplateOutlet=\"sourceNodeTpl; context: { node: node, source: right }\"></ng-container>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"x-transfer-footer\" *ngIf=\"right.footerTpl\">\r\n <ng-container *ngTemplateOutlet=\"right.footerTpl; context: { $source: right }\"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #sourceTitleTpl let-source=\"source\">\r\n <div class=\"x-transfer-title\">\r\n <div class=\"x-transfer-title-left\">\r\n <x-checkbox\r\n *ngIf=\"source.title && !source.hiddenCheckAll\"\r\n [data]=\"[titleTpl ? '' : source.title]\"\r\n [(ngModel)]=\"source.checkedAll\"\r\n (ngModelChange)=\"checkedAllChange($event, source)\"\r\n [indeterminate]=\"source.indeterminate\"\r\n ></x-checkbox>\r\n <span *ngIf=\"source.title && source.hiddenCheckAll\">{{ source.title }}</span>\r\n <x-link *ngIf=\"inverse && type === 'list'\" class=\"x-transfer-inverse\" type=\"primary\" (click)=\"onInverse(source)\">\u53CD\u9009</x-link>\r\n </div>\r\n <ng-container *xOutlet=\"titleTpl; context: { $title: source.title, $checkedCount: source.checkedCount, $count: source.count }\"\r\n ><span class=\"x-transfer-total\">{{ source.checkedCount }} / {{ source.count }}</span></ng-container\r\n >\r\n </div>\r\n <div class=\"x-transfer-search\" *ngIf=\"search && type !== 'table'\">\r\n <x-input icon=\"fto-search\" [(ngModel)]=\"source.searchInput\" (ngModelChange)=\"onSearchInputChange(source)\" clearable></x-input>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #sourceNodeTpl let-node=\"node\" let-source=\"source\">\r\n <x-checkbox\r\n [data]=\"[{ id: node.id, label: nodeTpl ? nodeTpl : labelTpl, node: node }]\"\r\n [disabled]=\"node.disabled\"\r\n [(ngModel)]=\"node.checked\"\r\n (ngModelChange)=\"checkedChange($event, source)\"\r\n ></x-checkbox>\r\n <ng-template #labelTpl>\r\n <span x-keyword [text]=\"source.searchInput!\">{{ node.label }}</span>\r\n </ng-template>\r\n</ng-template>\r\n", styles: [".x-transfer{margin:0;padding:0;display:inline-flex;align-items:center}.x-transfer-title{padding:.25rem .5625rem;display:flex;align-items:center;justify-content:space-between;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top-left-radius:var(--x-border-radius);border-top-right-radius:var(--x-border-radius);background-color:var(--x-background);color:var(--x-text-300)}.x-transfer-title-left{display:inline-flex;align-items:center}.x-transfer-inverse{margin:0 .5rem}.x-transfer-total{margin-left:.325rem}.x-transfer-box{min-width:12rem}.x-transfer-list{display:flex;flex-direction:column;height:18rem;width:100%;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-top:none;border-bottom-left-radius:var(--x-border-radius);border-bottom-right-radius:var(--x-border-radius);overflow:auto}.x-transfer-item{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-transfer-droplist{height:100%;padding:.25rem}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:hover{background-color:transparent}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item.cdk-drag-placeholder{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-transfer-droplist.cdk-drop-list-dragging .x-transfer-item:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-transfer-buttons{margin:0 1rem;display:flex;flex-direction:column}.x-transfer-buttons>x-button:not(:first-child){margin-top:.5rem}.x-transfer-search{padding:.5rem;border-left:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-transfer-search x-input{width:100%}.x-transfer-tree-label{flex:1}.x-transfer-footer{padding:.25rem .5625rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom-left-radius:var(--x-border-radius);border-bottom-right-radius:var(--x-border-radius)}.x-transfer-has-footer .x-transfer-list{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}body>li.x-transfer-item.cdk-drag-preview{padding:.125rem .25rem;border-radius:var(--x-border-radius);display:flex;align-items:center;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>li.x-transfer-item.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
706
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }, { type: i2.XI18nService }]; }, propDecorators: { leftTableCom: [{
707
+ type: ViewChild,
708
+ args: ['leftTableCom']
709
+ }], rightTableCom: [{
710
+ type: ViewChild,
711
+ args: ['rightTableCom']
712
+ }] } });
592
713
 
593
714
  class XTransferModule {
594
715
  }
@@ -602,7 +723,9 @@ class XTransferModule {
602
723
  XInputModule,
603
724
  XBaseFormModule,
604
725
  XTreeModule,
605
- XTableModule], exports: [XTransferComponent] });
726
+ XTableModule,
727
+ XKeywordModule,
728
+ XLinkModule], exports: [XTransferComponent] });
606
729
  /** @nocollapse */ XTransferModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTransferModule, imports: [CommonModule,
607
730
  FormsModule,
608
731
  DragDropModule,
@@ -612,7 +735,9 @@ class XTransferModule {
612
735
  XInputModule,
613
736
  XBaseFormModule,
614
737
  XTreeModule,
615
- XTableModule] });
738
+ XTableModule,
739
+ XKeywordModule,
740
+ XLinkModule] });
616
741
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTransferModule, decorators: [{
617
742
  type: NgModule,
618
743
  args: [{
@@ -628,7 +753,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
628
753
  XInputModule,
629
754
  XBaseFormModule,
630
755
  XTreeModule,
631
- XTableModule
756
+ XTableModule,
757
+ XKeywordModule,
758
+ XLinkModule
632
759
  ]
633
760
  }]
634
761
  }] });