@delon/abc 12.2.3 → 12.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/bundles/abc.umd.js +1 -1
  2. package/bundles/autoFocus.umd.js +1 -1
  3. package/bundles/avatarList.umd.js +1 -1
  4. package/bundles/count-down.umd.js +1 -1
  5. package/bundles/datePicker.umd.js +1 -1
  6. package/bundles/downFile.umd.js +1 -1
  7. package/bundles/edit.umd.js +1 -1
  8. package/bundles/ellipsis.umd.js +1 -1
  9. package/bundles/errorCollect.umd.js +1 -1
  10. package/bundles/exception.umd.js +11 -8
  11. package/bundles/exception.umd.js.map +1 -1
  12. package/bundles/footerToolbar.umd.js +1 -1
  13. package/bundles/fullContent.umd.js +1 -1
  14. package/bundles/globalFooter.umd.js +1 -1
  15. package/bundles/grid.umd.js +1 -1
  16. package/bundles/image.umd.js +1 -1
  17. package/bundles/let.umd.js +1 -1
  18. package/bundles/loading.umd.js +1 -1
  19. package/bundles/lodop.umd.js +1 -1
  20. package/bundles/lodop.umd.js.map +1 -1
  21. package/bundles/media.umd.js +1 -1
  22. package/bundles/noticeIcon.umd.js +1 -1
  23. package/bundles/onboarding.umd.js +1 -1
  24. package/bundles/pageHeader.umd.js +1 -1
  25. package/bundles/pdf.umd.js +1 -1
  26. package/bundles/qr.umd.js +1 -1
  27. package/bundles/quickMenu.umd.js +1 -1
  28. package/bundles/result.umd.js +1 -1
  29. package/bundles/reuseTab.umd.js +9 -18
  30. package/bundles/reuseTab.umd.js.map +1 -1
  31. package/bundles/table.umd.js +250 -146
  32. package/bundles/table.umd.js.map +1 -1
  33. package/bundles/tagSelect.umd.js +1 -1
  34. package/bundles/view.umd.js +1 -1
  35. package/bundles/xlsx.umd.js +27 -32
  36. package/bundles/xlsx.umd.js.map +1 -1
  37. package/bundles/zip.umd.js +1 -1
  38. package/bundles/zip.umd.js.map +1 -1
  39. package/esm2015/exception/exception.component.js +7 -4
  40. package/esm2015/exception/exception.module.js +3 -2
  41. package/esm2015/lodop/lodop.service.js +1 -1
  42. package/esm2015/reuse-tab/reuse-tab-context-menu.component.js +2 -2
  43. package/esm2015/reuse-tab/reuse-tab-context.service.js +4 -13
  44. package/esm2015/reuse-tab/reuse-tab.component.js +6 -6
  45. package/esm2015/st/st-column-source.js +28 -7
  46. package/esm2015/st/st-data-source.js +4 -4
  47. package/esm2015/st/st-filter.component.js +149 -0
  48. package/esm2015/st/st-td.component.js +232 -0
  49. package/esm2015/st/st.component.js +39 -125
  50. package/esm2015/st/st.config.js +1 -2
  51. package/esm2015/st/st.interfaces.js +1 -1
  52. package/esm2015/st/st.module.js +9 -3
  53. package/esm2015/st/st.types.js +1 -1
  54. package/esm2015/st/table.js +3 -1
  55. package/esm2015/xlsx/xlsx.service.js +23 -29
  56. package/esm2015/xlsx/xlsx.types.js +1 -1
  57. package/esm2015/zip/zip.service.js +1 -1
  58. package/exception/exception.component.d.ts +3 -2
  59. package/exception/exception.metadata.json +1 -1
  60. package/fesm2015/exception.js +8 -4
  61. package/fesm2015/exception.js.map +1 -1
  62. package/fesm2015/lodop.js.map +1 -1
  63. package/fesm2015/reuseTab.js +9 -18
  64. package/fesm2015/reuseTab.js.map +1 -1
  65. package/fesm2015/table.js +450 -137
  66. package/fesm2015/table.js.map +1 -1
  67. package/fesm2015/xlsx.js +22 -28
  68. package/fesm2015/xlsx.js.map +1 -1
  69. package/fesm2015/zip.js.map +1 -1
  70. package/onboarding/schema.json +1 -1
  71. package/package.json +4 -4
  72. package/reuse-tab/reuse-tab.component.d.ts +1 -1
  73. package/reuse-tab/reuseTab.metadata.json +1 -1
  74. package/st/st-filter.component.d.ts +18 -0
  75. package/st/st-td.component.d.ts +27 -0
  76. package/st/st.component.d.ts +10 -24
  77. package/st/st.interfaces.d.ts +57 -3
  78. package/st/st.types.d.ts +6 -0
  79. package/st/style/index.less +8 -0
  80. package/st/table.d.ts +2 -0
  81. package/st/table.metadata.json +1 -1
  82. package/sv/style/index.less +1 -0
  83. package/xlsx/xlsx.metadata.json +1 -1
  84. package/xlsx/xlsx.types.d.ts +3 -0
package/fesm2015/table.js CHANGED
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, Directive, TemplateRef, Host, Input, Optional, Inject, ViewContainerRef, ComponentFactoryResolver, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef, ElementRef, ViewChild, Output, NgModule } from '@angular/core';
3
3
  import { DomSanitizer } from '@angular/platform-browser';
4
4
  import { ACLService, DelonACLModule } from '@delon/acl';
5
- import { ALAIN_I18N_TOKEN, _HttpClient, DatePipe, YNPipe, ModalHelper, DrawerHelper, DelonLocaleService } from '@delon/theme';
5
+ import { ALAIN_I18N_TOKEN, _HttpClient, DatePipe, YNPipe, DelonLocaleService, ModalHelper, DrawerHelper } from '@delon/theme';
6
6
  import { warn, deepCopy, deepGet, deepMergeKey } from '@delon/util/other';
7
7
  import { DecimalPipe, DOCUMENT, CommonModule } from '@angular/common';
8
8
  import { HttpParams } from '@angular/common/http';
@@ -11,7 +11,6 @@ import { map, takeUntil, filter } from 'rxjs/operators';
11
11
  import { CurrencyService } from '@delon/util/format';
12
12
  import { __awaiter, __decorate } from 'tslib';
13
13
  import { XlsxService } from '@delon/abc/xlsx';
14
- import { Router } from '@angular/router';
15
14
  import { AlainConfigService } from '@delon/util/config';
16
15
  import { toBoolean, InputNumber, InputBoolean } from '@delon/util/decorator';
17
16
  import { NzContextMenuService, NzDropDownModule } from 'ng-zorro-antd/dropdown';
@@ -19,9 +18,11 @@ import { FormsModule } from '@angular/forms';
19
18
  import { LetModule } from '@delon/abc/let';
20
19
  import { NzBadgeModule } from 'ng-zorro-antd/badge';
21
20
  import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
21
+ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
22
22
  import { NzDividerModule } from 'ng-zorro-antd/divider';
23
23
  import { NzIconModule } from 'ng-zorro-antd/icon';
24
24
  import { NzInputModule } from 'ng-zorro-antd/input';
25
+ import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
25
26
  import { NzMenuModule } from 'ng-zorro-antd/menu';
26
27
  import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
27
28
  import { NzRadioModule } from 'ng-zorro-antd/radio';
@@ -29,6 +30,7 @@ import { NzResizableModule } from 'ng-zorro-antd/resizable';
29
30
  import { NzTableModule } from 'ng-zorro-antd/table';
30
31
  import { NzTagModule } from 'ng-zorro-antd/tag';
31
32
  import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
33
+ import { Router } from '@angular/router';
32
34
 
33
35
  class STRowSource {
34
36
  constructor() {
@@ -220,14 +222,32 @@ class STColumnSource {
220
222
  }
221
223
  let res = item.filter;
222
224
  res.type = res.type || 'default';
225
+ res.showOPArea = res.showOPArea !== false;
223
226
  let icon = 'filter';
224
227
  let iconTheme = 'fill';
225
- if (res.type === 'keyword') {
226
- if (res.menus == null || res.menus.length === 0) {
227
- res.menus = [{ value: '' }];
228
- }
229
- icon = 'search';
230
- iconTheme = 'outline';
228
+ let fixMenus = true;
229
+ let value = undefined;
230
+ switch (res.type) {
231
+ case 'keyword':
232
+ icon = 'search';
233
+ iconTheme = 'outline';
234
+ break;
235
+ case 'number':
236
+ icon = 'search';
237
+ iconTheme = 'outline';
238
+ res.number = Object.assign({ step: 1, min: -Infinity, max: Infinity }, res.number);
239
+ break;
240
+ case 'date':
241
+ icon = 'calendar';
242
+ iconTheme = 'outline';
243
+ res.date = Object.assign({ range: false, mode: 'date', showToday: true, showNow: false }, res.date);
244
+ break;
245
+ default:
246
+ fixMenus = false;
247
+ break;
248
+ }
249
+ if (fixMenus && (res.menus == null || res.menus.length === 0)) {
250
+ res.menus = [{ value }];
231
251
  }
232
252
  if (res.menus.length === 0) {
233
253
  return null;
@@ -334,6 +354,9 @@ class STColumnSource {
334
354
  if (this.acl && item.acl && !this.acl.can(item.acl)) {
335
355
  continue;
336
356
  }
357
+ if (Array.isArray(item.children) && item.children.length > 0) {
358
+ item.children = this.cleanCond(item.children);
359
+ }
337
360
  res.push(item);
338
361
  }
339
362
  return res;
@@ -723,9 +746,9 @@ class STDataSource {
723
746
  }
724
747
  return this.get(result[i], c, i);
725
748
  });
726
- if (rowClassName) {
727
- result[i]._rowClassName = rowClassName(result[i], i);
728
- }
749
+ result[i]._rowClassName = [rowClassName ? rowClassName(result[i], i) : null, result[i].className]
750
+ .filter(w => !!w)
751
+ .join(' ');
729
752
  }
730
753
  return result;
731
754
  }
@@ -1076,7 +1099,6 @@ const ST_DEFAULT_CONFIG = {
1076
1099
  trigger: 'click',
1077
1100
  placement: 'top'
1078
1101
  },
1079
- rowClickTime: 200,
1080
1102
  btnIcon: {
1081
1103
  theme: 'outline',
1082
1104
  spin: false
@@ -1105,13 +1127,10 @@ const ST_DEFAULT_CONFIG = {
1105
1127
  };
1106
1128
 
1107
1129
  class STComponent {
1108
- constructor(i18nSrv, cdr, router, el, exportSrv, modalHelper, drawerHelper, doc, columnSource, dataSource, delonI18n, configSrv, cms) {
1130
+ constructor(i18nSrv, cdr, el, exportSrv, doc, columnSource, dataSource, delonI18n, configSrv, cms) {
1109
1131
  this.cdr = cdr;
1110
- this.router = router;
1111
1132
  this.el = el;
1112
1133
  this.exportSrv = exportSrv;
1113
- this.modalHelper = modalHelper;
1114
- this.drawerHelper = drawerHelper;
1115
1134
  this.doc = doc;
1116
1135
  this.columnSource = columnSource;
1117
1136
  this.dataSource = dataSource;
@@ -1119,7 +1138,6 @@ class STComponent {
1119
1138
  this.cms = cms;
1120
1139
  this.destroy$ = new Subject();
1121
1140
  this.totalTpl = ``;
1122
- this.rowClickCount = 0;
1123
1141
  this.customWidthConfig = false;
1124
1142
  this._widthConfig = [];
1125
1143
  this.locale = {};
@@ -1143,7 +1161,6 @@ class STComponent {
1143
1161
  this.showHeader = true;
1144
1162
  this.expandRowByClick = false;
1145
1163
  this.expandAccordion = false;
1146
- this.rowClickTime = 200;
1147
1164
  this.responsive = true;
1148
1165
  this.error = new EventEmitter();
1149
1166
  this.change = new EventEmitter();
@@ -1226,10 +1243,6 @@ class STComponent {
1226
1243
  get list() {
1227
1244
  return this._data;
1228
1245
  }
1229
- get routerState() {
1230
- const { pi, ps, total } = this;
1231
- return { pi, ps, total };
1232
- }
1233
1246
  setCog(cog) {
1234
1247
  const copyMultiSort = Object.assign({}, cog.multiSort);
1235
1248
  // Because multiSort.global will affect the result, it should be removed first, and multiSort will be operated again after processing.
@@ -1245,6 +1258,10 @@ class STComponent {
1245
1258
  this.cdr.detectChanges();
1246
1259
  return this;
1247
1260
  }
1261
+ refreshData() {
1262
+ this._data = [...this._data];
1263
+ return this.cd();
1264
+ }
1248
1265
  renderTotal(total, range) {
1249
1266
  return this.totalTpl
1250
1267
  ? this.totalTpl.replace('{{total}}', total).replace('{{range[0]}}', range[0]).replace('{{range[1]}}', range[1])
@@ -1425,45 +1442,30 @@ class STComponent {
1425
1442
  }
1426
1443
  this.changeEmit(type);
1427
1444
  }
1428
- _click(e, item, col) {
1429
- e.preventDefault();
1430
- e.stopPropagation();
1431
- const res = col.click(item, this);
1432
- if (typeof res === 'string') {
1433
- this.router.navigateByUrl(res, { state: this.routerState });
1434
- }
1435
- return false;
1436
- }
1437
1445
  closeOtherExpand(item) {
1438
1446
  if (this.expandAccordion === false)
1439
1447
  return;
1440
1448
  this._data.filter(i => i !== item).forEach(i => (i.expand = false));
1441
1449
  }
1442
- _rowClick(e, item, index) {
1450
+ _rowClick(e, item, index, dbl) {
1443
1451
  const el = e.target;
1444
1452
  if (el.nodeName === 'INPUT')
1445
1453
  return;
1446
- const { expand, expandRowByClick, rowClickTime } = this;
1454
+ const { expand, expandRowByClick } = this;
1447
1455
  if (!!expand && item.showExpand !== false && expandRowByClick) {
1448
1456
  item.expand = !item.expand;
1449
1457
  this.closeOtherExpand(item);
1450
1458
  this.changeEmit('expand', item);
1451
1459
  return;
1452
1460
  }
1453
- ++this.rowClickCount;
1454
- if (this.rowClickCount !== 1)
1455
- return;
1456
- setTimeout(() => {
1457
- const data = { e, item, index };
1458
- if (this.rowClickCount === 1) {
1459
- this._clickRowClassName(el, item, index);
1460
- this.changeEmit('click', data);
1461
- }
1462
- else {
1463
- this.changeEmit('dblClick', data);
1464
- }
1465
- this.rowClickCount = 0;
1466
- }, rowClickTime);
1461
+ const data = { e, item, index };
1462
+ if (dbl) {
1463
+ this.changeEmit('dblClick', data);
1464
+ }
1465
+ else {
1466
+ this._clickRowClassName(el, item, index);
1467
+ this.changeEmit('click', data);
1468
+ }
1467
1469
  }
1468
1470
  _clickRowClassName(el, item, index) {
1469
1471
  const cr = this.clickRowClassName;
@@ -1518,7 +1520,7 @@ class STComponent {
1518
1520
  const text = `${this.dataSource.getNoIndex(i, c, idx)}`;
1519
1521
  i._values[c.__point] = { text, _text: text, org: idx, safeType: 'text' };
1520
1522
  }));
1521
- return this.cd();
1523
+ return this.refreshData();
1522
1524
  }
1523
1525
  /**
1524
1526
  * Sets the row value for the `index` in the table, like this:
@@ -1543,8 +1545,7 @@ class STComponent {
1543
1545
  this.resetColumns({ emitReload: options.emitReload });
1544
1546
  return this;
1545
1547
  }
1546
- this.cdr.detectChanges();
1547
- return this;
1548
+ return this.refreshData();
1548
1549
  }
1549
1550
  // #endregion
1550
1551
  // #region sort
@@ -1571,36 +1572,28 @@ class STComponent {
1571
1572
  }
1572
1573
  // #endregion
1573
1574
  // #region filter
1574
- handleFilter(col) {
1575
+ _handleFilter(col, confirm) {
1576
+ if (!confirm) {
1577
+ this.columnSource.cleanFilter(col);
1578
+ }
1575
1579
  // 过滤表示一种数据的变化应重置页码为 `1`
1576
1580
  this.pi = 1;
1577
1581
  this.columnSource.updateDefault(col.filter);
1578
1582
  this.loadPageData();
1579
1583
  this.changeEmit('filter', col);
1580
1584
  }
1581
- _filterConfirm(col) {
1582
- this.handleFilter(col);
1583
- }
1584
- _filterRadio(col, item, checked) {
1585
- col.filter.menus.forEach(i => (i.checked = false));
1586
- item.checked = checked;
1587
- }
1588
- _filterClear(col) {
1589
- this.columnSource.cleanFilter(col);
1590
- this.handleFilter(col);
1585
+ handleFilterNotify(value) {
1586
+ this.changeEmit('filterChange', value);
1591
1587
  }
1592
1588
  clearFilter() {
1593
1589
  this._columns.filter(w => w.filter && w.filter.default === true).forEach(col => this.columnSource.cleanFilter(col));
1594
1590
  return this;
1595
1591
  }
1596
- _filterClick($event) {
1597
- $event.stopPropagation();
1598
- }
1599
1592
  // #endregion
1600
1593
  // #region checkbox
1601
1594
  /** 清除所有 `checkbox` */
1602
1595
  clearCheck() {
1603
- return this._checkAll(false);
1596
+ return this.checkAll(false);
1604
1597
  }
1605
1598
  _refCheck() {
1606
1599
  const validData = this._data.filter(w => !w.disabled);
@@ -1611,14 +1604,10 @@ class STComponent {
1611
1604
  this._allCheckedDisabled = this._data.length === this._data.filter(w => w.disabled).length;
1612
1605
  return this.cd();
1613
1606
  }
1614
- _checkAll(checked) {
1607
+ checkAll(checked) {
1615
1608
  checked = typeof checked === 'undefined' ? this._allChecked : checked;
1616
1609
  this._data.filter(w => !w.disabled).forEach(i => (i.checked = checked));
1617
- return this._refCheck()._checkNotify();
1618
- }
1619
- _checkSelection(i, value) {
1620
- i.checked = value;
1621
- return this._refCheck()._checkNotify();
1610
+ return this._refCheck()._checkNotify().refreshData();
1622
1611
  }
1623
1612
  _rowSelection(row) {
1624
1613
  row.select(this._data);
@@ -1635,65 +1624,20 @@ class STComponent {
1635
1624
  clearRadio() {
1636
1625
  this._data.filter(w => w.checked).forEach(item => (item.checked = false));
1637
1626
  this.changeEmit('radio', null);
1638
- return this;
1639
- }
1640
- _refRadio(checked, item) {
1641
- // if (item.disabled === true) return;
1642
- this._data.filter(w => !w.disabled).forEach(i => (i.checked = false));
1643
- item.checked = checked;
1644
- this.changeEmit('radio', item);
1645
- return this;
1627
+ return this.refreshData();
1646
1628
  }
1647
1629
  // #endregion
1648
- // #region buttons
1649
- _btnClick(record, btn, ev) {
1650
- if (ev) {
1651
- ev.stopPropagation();
1652
- }
1653
- if (btn.type === 'modal' || btn.type === 'static') {
1654
- const { modal } = btn;
1655
- const obj = { [modal.paramsName]: record };
1656
- this.modalHelper[btn.type === 'modal' ? 'create' : 'createStatic'](modal.component, Object.assign(Object.assign({}, obj), (modal.params && modal.params(record))), deepMergeKey({}, true, this.cog.modal, modal))
1657
- .pipe(filter(w => typeof w !== 'undefined'))
1658
- .subscribe((res) => this.btnCallback(record, btn, res));
1659
- return;
1660
- }
1661
- else if (btn.type === 'drawer') {
1662
- const { drawer } = btn;
1663
- const obj = { [drawer.paramsName]: record };
1664
- this.drawerHelper
1665
- .create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), deepMergeKey({}, true, this.cog.drawer, drawer))
1666
- .pipe(filter(w => typeof w !== 'undefined'))
1667
- .subscribe(res => this.btnCallback(record, btn, res));
1668
- return;
1669
- }
1670
- else if (btn.type === 'link') {
1671
- const clickRes = this.btnCallback(record, btn);
1672
- if (typeof clickRes === 'string') {
1673
- this.router.navigateByUrl(clickRes, { state: this.routerState });
1674
- }
1675
- return;
1676
- }
1677
- this.btnCallback(record, btn);
1678
- }
1679
- btnCallback(record, btn, modal) {
1680
- if (!btn.click)
1681
- return;
1682
- if (typeof btn.click === 'string') {
1683
- switch (btn.click) {
1684
- case 'load':
1685
- this.load();
1686
- break;
1687
- case 'reload':
1688
- this.reload();
1689
- break;
1690
- }
1691
- }
1692
- else {
1693
- return btn.click(record, modal, this);
1630
+ _handleTd(ev) {
1631
+ switch (ev.type) {
1632
+ case 'checkbox':
1633
+ this._refCheck()._checkNotify();
1634
+ break;
1635
+ case 'radio':
1636
+ this.changeEmit('radio', ev.item);
1637
+ this.refreshData();
1638
+ break;
1694
1639
  }
1695
1640
  }
1696
- // #endregion
1697
1641
  // #region export
1698
1642
  /**
1699
1643
  * 导出当前页,确保已经注册 `XlsxModule`
@@ -1840,7 +1784,7 @@ STComponent.decorators = [
1840
1784
  { type: Component, args: [{
1841
1785
  selector: 'st',
1842
1786
  exportAs: 'st',
1843
- template: "<ng-template #btnTpl let-i let-btn=\"btn\">\n <ng-container *ngIf=\"!btn.tooltip\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </ng-container>\n <span *ngIf=\"btn.tooltip\" nz-tooltip [nzTooltipTitle]=\"btn.tooltip\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </span>\n</ng-template>\n<ng-template #btnItemTpl let-i let-btn=\"btn\">\n <a\n *ngIf=\"btn.pop\"\n nz-popconfirm\n [nzPopconfirmTitle]=\"btn.pop.title\"\n [nzIcon]=\"btn.pop.icon\"\n [nzCondition]=\"btn.pop.condition(i)\"\n [nzCancelText]=\"btn.pop.cancelText\"\n [nzOkText]=\"btn.pop.okText\"\n [nzOkType]=\"btn.pop.okType\"\n (nzOnConfirm)=\"_btnClick(i, btn)\"\n class=\"st__btn-text\"\n [ngClass]=\"btn.className\"\n (click)=\"_stopPropagation($event)\"\n >\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </a>\n <a *ngIf=\"!btn.pop\" (click)=\"_btnClick(i, btn, $event)\" class=\"st__btn-text\" [ngClass]=\"btn.className\">\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </a>\n</ng-template>\n<ng-template #btnTextTpl let-i let-btn=\"btn\">\n <ng-container *ngIf=\"btn.icon\">\n <i\n *ngIf=\"!btn.icon.iconfont\"\n nz-icon\n [nzType]=\"btn.icon.type\"\n [nzTheme]=\"btn.icon.theme\"\n [nzSpin]=\"btn.icon.spin\"\n [nzTwotoneColor]=\"btn.icon.twoToneColor\"\n ></i>\n <i *ngIf=\"btn.icon.iconfont\" nz-icon [nzIconfont]=\"btn.icon.iconfont\"></i>\n </ng-container>\n <span [innerHTML]=\"btn._text\" [ngClass]=\"{ 'pl-xs': btn.icon }\"></span>\n</ng-template>\n<ng-template #titleTpl let-i>\n <span [innerHTML]=\"i._text\"></span>\n <small *ngIf=\"i.optional\" class=\"st__head-optional\" [innerHTML]=\"i.optional\"></small>\n <i\n *ngIf=\"i.optionalHelp\"\n class=\"st__head-tip\"\n nz-tooltip\n [nzTooltipTitle]=\"i.optionalHelp\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label\n nz-checkbox\n class=\"st__checkall\"\n [nzDisabled]=\"_allCheckedDisabled\"\n [(ngModel)]=\"_allChecked\"\n [nzIndeterminate]=\"_indeterminate\"\n (ngModelChange)=\"_checkAll()\"\n [class.ant-table-selection-select-all-custom]=\"custom\"\n ></label>\n</ng-template>\n<nz-table\n #table\n [nzData]=\"_data\"\n [(nzPageIndex)]=\"pi\"\n (nzPageIndexChange)=\"_change('pi')\"\n [(nzPageSize)]=\"ps\"\n (nzPageSizeChange)=\"_change('ps')\"\n [nzTotal]=\"total\"\n [nzShowPagination]=\"_isPagination\"\n [nzFrontPagination]=\"false\"\n [nzBordered]=\"bordered\"\n [nzSize]=\"size\"\n [nzLoading]=\"_loading\"\n [nzLoadingDelay]=\"loadingDelay\"\n [nzLoadingIndicator]=\"loadingIndicator\"\n [nzTitle]=\"header!\"\n [nzFooter]=\"footer!\"\n [nzScroll]=\"scroll\"\n [nzVirtualItemSize]=\"virtualItemSize\"\n [nzVirtualMaxBufferPx]=\"virtualMaxBufferPx\"\n [nzVirtualMinBufferPx]=\"virtualMinBufferPx\"\n [nzVirtualForTrackBy]=\"virtualForTrackBy\"\n [nzNoResult]=\"noResult!\"\n [nzPageSizeOptions]=\"page.pageSizes!\"\n [nzShowQuickJumper]=\"page.showQuickJumper\"\n [nzShowSizeChanger]=\"page.showSize\"\n [nzPaginationPosition]=\"page.position!\"\n [nzPaginationType]=\"page.type!\"\n [nzItemRender]=\"page.itemRender!\"\n [nzSimple]=\"page.simple\"\n [nzShowTotal]=\"totalTpl\"\n [nzWidthConfig]=\"_widthConfig\"\n (contextmenu)=\"onContextmenu($event)\"\n>\n <thead *ngIf=\"showHeader\">\n <tr *ngFor=\"let row of _headers; let rowFirst = first\">\n <th *ngIf=\"rowFirst && expand\" nzWidth=\"50px\" [rowSpan]=\"_headers.length\"></th>\n <ng-container *ngFor=\"let h of row; let index = index; let last = last\">\n <th\n *let=\"h.column as _c\"\n [colSpan]=\"h.colSpan\"\n [rowSpan]=\"h.rowSpan\"\n [nzWidth]=\"$any(_c).width\"\n [nzLeft]=\"_c._left!\"\n [nzRight]=\"_c._right!\"\n [ngClass]=\"_c.className!\"\n [attr.data-col]=\"_c.indexKey\"\n [attr.data-col-index]=\"index\"\n [nzShowSort]=\"_c._sort.enabled\"\n [nzSortOrder]=\"$any(_c)._sort.default\"\n (nzSortOrderChange)=\"sort(_c, index, $event)\"\n [nzCustomFilter]=\"$any(_c).filter\"\n nz-resizable\n [nzDisabled]=\"last || $any(_c).resizable.disabled\"\n [nzMaxWidth]=\"$any(_c).resizable.maxWidth\"\n [nzMinWidth]=\"$any(_c).resizable.minWidth\"\n [nzBounds]=\"$any(_c).resizable.bounds\"\n [nzPreview]=\"$any(_c).resizable.preview\"\n (nzResizeEnd)=\"colResize($event, _c)\"\n >\n <nz-resize-handle *ngIf=\"$any(!last && !$any(_c).resizable.disabled)\" nzDirection=\"right\">\n <i></i>\n </nz-resize-handle>\n <ng-template\n #renderTitle\n [ngTemplateOutlet]=\"_c.__renderTitle!\"\n [ngTemplateOutletContext]=\"{ $implicit: h.column, index: index }\"\n ></ng-template>\n <ng-container *ngIf=\"!_c.__renderTitle; else renderTitle\">\n <ng-container [ngSwitch]=\"_c.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngIf=\"_c.selections!.length === 0\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: false }\">\n </ng-template>\n </ng-container>\n <div *ngIf=\"_c.selections!.length > 0\" class=\"ant-table-selection\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: true }\">\n </ng-template>\n <div\n *ngIf=\"_c.selections!.length\"\n nz-dropdown\n nzPlacement=\"bottomLeft\"\n [nzDropdownMenu]=\"selectionMenu\"\n class=\"ant-table-selection-down st__checkall-selection\"\n >\n <i nz-icon nzType=\"down\"></i>\n </div>\n <nz-dropdown-menu #selectionMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li\n nz-menu-item\n *ngFor=\"let rw of _c.selections\"\n (click)=\"_rowSelection(rw)\"\n [innerHTML]=\"rw.text\"\n ></li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _c.title }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"_c.filter\">\n <div\n nz-th-extra\n *let=\"_c.filter as _f\"\n class=\"ant-table-filter-trigger-container st__filter\"\n [class.ant-table-filter-trigger-container-open]=\"$any(_f).visible\"\n >\n <span\n class=\"ant-table-filter-trigger\"\n [class.active]=\"$any(_f).visible || _f.default\"\n nz-dropdown\n [nzDropdownMenu]=\"filterMenu\"\n nzTrigger=\"click\"\n [nzClickHide]=\"false\"\n [(nzVisible)]=\"$any(_f).visible\"\n nzOverlayClassName=\"st__filter-wrap\"\n (click)=\"_filterClick($event)\"\n >\n <i nz-icon [nzType]=\"$any(_f).icon.type\" [nzTheme]=\"$any(_f).icon.theme\"></i>\n </span>\n <nz-dropdown-menu #filterMenu=\"nzDropdownMenu\">\n <div class=\"ant-table-filter-dropdown\">\n <ng-container [ngSwitch]=\"_f.type\">\n <div *ngSwitchCase=\"'keyword'\" class=\"st__filter-keyword\">\n <input\n type=\"text\"\n nz-input\n [attr.placeholder]=\"$any(_f).menus[0].text\"\n [(ngModel)]=\"$any(_f).menus[0].value\"\n />\n </div>\n <ul *ngSwitchDefault nz-menu>\n <ng-container *ngIf=\"_f.multiple\">\n <li nz-menu-item *ngFor=\"let filter of _f.menus\">\n <label nz-checkbox [(ngModel)]=\"filter.checked\">{{ filter.text }}</label>\n </li>\n </ng-container>\n <ng-container *ngIf=\"!_f.multiple\">\n <li nz-menu-item *ngFor=\"let filter of _f.menus\">\n <label\n nz-radio\n [ngModel]=\"filter.checked\"\n (ngModelChange)=\"_filterRadio(h.column, filter, $event)\"\n >{{ filter.text }}</label\n >\n </li>\n </ng-container>\n </ul>\n </ng-container>\n <div class=\"ant-table-filter-dropdown-btns\">\n <a class=\"ant-table-filter-dropdown-link confirm\" (click)=\"$any(_f).visible = false\">\n <span (click)=\"_filterConfirm(h.column)\">{{ _f.confirmText || locale.filterConfirm }}</span>\n </a>\n <a class=\"ant-table-filter-dropdown-link clear\" (click)=\"$any(_f).visible = false\">\n <span (click)=\"_filterClear(h.column)\">{{ _f.clearText || locale.filterReset }}</span>\n </a>\n </div>\n </div>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody class=\"st__body\">\n <ng-container *ngIf=\"!_loading\">\n <ng-template\n [ngTemplateOutlet]=\"bodyHeader!\"\n [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"\n ></ng-template>\n </ng-container>\n <ng-template #bodyTpl let-i let-index=\"index\">\n <tr [attr.data-index]=\"index\" (click)=\"_rowClick($event, i, index)\" [ngClass]=\"i._rowClassName\">\n <td\n *ngIf=\"expand\"\n [nzShowExpand]=\"expand && i.showExpand !== false\"\n [nzExpand]=\"i.expand\"\n (nzExpandChange)=\"_expandChange(i, $event)\"\n (click)=\"_stopPropagation($event)\"\n nzWidth=\"50px\"\n ></td>\n <td\n *ngFor=\"let c of _columns; let cIdx = index\"\n [nzLeft]=\"!!c._left\"\n [nzRight]=\"!!c._right\"\n [attr.data-col-index]=\"cIdx\"\n [ngClass]=\"c._className!\"\n [attr.colspan]=\"c.colSpan\"\n >\n <span *ngIf=\"responsive\" class=\"ant-table-rep__title\">\n <ng-template [ngTemplateOutlet]=\"titleTpl\" [ngTemplateOutletContext]=\"{ $implicit: c.title }\"></ng-template>\n </span>\n <span>\n <ng-template\n #render\n [ngTemplateOutlet]=\"c.__render!\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index, column: c }\"\n ></ng-template>\n <ng-container *ngIf=\"!c.__render; else render\">\n <ng-container [ngSwitch]=\"c.type\">\n <label\n *ngSwitchCase=\"'checkbox'\"\n nz-checkbox\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_checkSelection(i, $event)\"\n ></label>\n <label\n *ngSwitchCase=\"'radio'\"\n nz-radio\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_refRadio($event, i)\"\n ></label>\n <a\n *ngSwitchCase=\"'link'\"\n (click)=\"_click($event, i, c)\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"i._values[cIdx].text\"\n ></a>\n <ng-container *ngIf=\"i._values[cIdx].text\">\n <nz-tag *ngSwitchCase=\"'tag'\" [nzColor]=\"i._values[cIdx].color\">\n <span [innerHTML]=\"i._values[cIdx]._text\"></span>\n </nz-tag>\n <nz-badge\n *ngSwitchCase=\"'badge'\"\n [nzStatus]=\"i._values[cIdx].color\"\n [nzText]=\"i._values[cIdx].text\"\n ></nz-badge>\n </ng-container>\n <ng-template *ngSwitchCase=\"'widget'\" st-widget-host [record]=\"i\" [column]=\"c\"></ng-template>\n <ng-container *ngSwitchDefault>\n <span\n *ngIf=\"c.safeType !== 'text'\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n <span\n *ngIf=\"c.safeType === 'text'\"\n [innerText]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let btn of i._values[cIdx].buttons; let last = last\">\n <a\n *ngIf=\"btn.children!.length > 0\"\n nz-dropdown\n [nzDropdownMenu]=\"btnMenu\"\n nzOverlayClassName=\"st__btn-sub\"\n >\n <span [innerHTML]=\"btn._text\"></span>\n <i nz-icon nzType=\"down\"></i>\n </a>\n <nz-dropdown-menu #btnMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let subBtn of btn.children!\">\n <li *ngIf=\"subBtn.type !== 'divider'\" nz-menu-item [class.st__btn-disabled]=\"subBtn._disabled\">\n <ng-template\n [ngTemplateOutlet]=\"btnTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: i, btn: subBtn }\"\n >\n </ng-template>\n </li>\n <li *ngIf=\"subBtn.type === 'divider'\" nz-menu-divider></li>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n <span *ngIf=\"btn.children!.length === 0\" [class.st__btn-disabled]=\"btn._disabled\">\n <ng-template [ngTemplateOutlet]=\"btnTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\">\n </ng-template>\n </span>\n <nz-divider *ngIf=\"!last\" nzType=\"vertical\"></nz-divider>\n </ng-container>\n </ng-container>\n </span>\n </td>\n </tr>\n <tr [nzExpand]=\"i.expand\">\n <ng-template\n [ngTemplateOutlet]=\"expand\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\"\n ></ng-template>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <ng-container *ngFor=\"let i of _data; let index = index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"virtualScroll\">\n <ng-template nz-virtual-scroll let-i let-index=\"index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!_loading\">\n <ng-template [ngTemplateOutlet]=\"body!\" [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range=\"range\" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n<nz-dropdown-menu #contextmenuTpl=\"nzDropdownMenu\">\n <ul nz-menu class=\"st__contextmenu\">\n <ng-container *ngFor=\"let i of contextmenuList\">\n <li nz-menu-item *ngIf=\"i.children!.length === 0\" (click)=\"i.fn!(i)\" [innerHTML]=\"i.text\"></li>\n <li nz-submenu *ngIf=\"i.children!.length > 0\" [nzTitle]=\"i.text\">\n <ul>\n <li nz-menu-item *ngFor=\"let ci of i.children\" (click)=\"ci.fn!(ci)\" [innerHTML]=\"ci.text\"></li>\n </ul>\n </li>\n </ng-container>\n </ul>\n</nz-dropdown-menu>\n",
1787
+ template: "<ng-template #titleTpl let-i>\n <span [innerHTML]=\"i._text\"></span>\n <small *ngIf=\"i.optional\" class=\"st__head-optional\" [innerHTML]=\"i.optional\"></small>\n <i\n *ngIf=\"i.optionalHelp\"\n class=\"st__head-tip\"\n nz-tooltip\n [nzTooltipTitle]=\"i.optionalHelp\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label\n nz-checkbox\n class=\"st__checkall\"\n [nzDisabled]=\"_allCheckedDisabled\"\n [(ngModel)]=\"_allChecked\"\n [nzIndeterminate]=\"_indeterminate\"\n (ngModelChange)=\"checkAll()\"\n [class.ant-table-selection-select-all-custom]=\"custom\"\n ></label>\n</ng-template>\n<nz-table\n #table\n [nzData]=\"_data\"\n [(nzPageIndex)]=\"pi\"\n (nzPageIndexChange)=\"_change('pi')\"\n [(nzPageSize)]=\"ps\"\n (nzPageSizeChange)=\"_change('ps')\"\n [nzTotal]=\"total\"\n [nzShowPagination]=\"_isPagination\"\n [nzFrontPagination]=\"false\"\n [nzBordered]=\"bordered\"\n [nzSize]=\"size\"\n [nzLoading]=\"_loading\"\n [nzLoadingDelay]=\"loadingDelay\"\n [nzLoadingIndicator]=\"loadingIndicator\"\n [nzTitle]=\"header!\"\n [nzFooter]=\"footer!\"\n [nzScroll]=\"scroll\"\n [nzVirtualItemSize]=\"virtualItemSize\"\n [nzVirtualMaxBufferPx]=\"virtualMaxBufferPx\"\n [nzVirtualMinBufferPx]=\"virtualMinBufferPx\"\n [nzVirtualForTrackBy]=\"virtualForTrackBy\"\n [nzNoResult]=\"noResult!\"\n [nzPageSizeOptions]=\"page.pageSizes!\"\n [nzShowQuickJumper]=\"page.showQuickJumper\"\n [nzShowSizeChanger]=\"page.showSize\"\n [nzPaginationPosition]=\"page.position!\"\n [nzPaginationType]=\"page.type!\"\n [nzItemRender]=\"page.itemRender!\"\n [nzSimple]=\"page.simple\"\n [nzShowTotal]=\"totalTpl\"\n [nzWidthConfig]=\"_widthConfig\"\n (contextmenu)=\"onContextmenu($event)\"\n>\n <thead *ngIf=\"showHeader\">\n <tr *ngFor=\"let row of _headers; let rowFirst = first\">\n <th *ngIf=\"rowFirst && expand\" nzWidth=\"50px\" [rowSpan]=\"_headers.length\"></th>\n <ng-container *ngFor=\"let h of row; let index = index; let last = last\">\n <th\n *let=\"h.column as _c\"\n [colSpan]=\"h.colSpan\"\n [rowSpan]=\"h.rowSpan\"\n [nzWidth]=\"$any(_c).width\"\n [nzLeft]=\"_c._left!\"\n [nzRight]=\"_c._right!\"\n [ngClass]=\"_c.className!\"\n [attr.data-col]=\"_c.indexKey\"\n [attr.data-col-index]=\"index\"\n [nzShowSort]=\"_c._sort.enabled\"\n [nzSortOrder]=\"$any(_c)._sort.default\"\n (nzSortOrderChange)=\"sort(_c, index, $event)\"\n [nzCustomFilter]=\"$any(_c).filter\"\n nz-resizable\n [nzDisabled]=\"last || $any(_c).resizable.disabled\"\n [nzMaxWidth]=\"$any(_c).resizable.maxWidth\"\n [nzMinWidth]=\"$any(_c).resizable.minWidth\"\n [nzBounds]=\"$any(_c).resizable.bounds\"\n [nzPreview]=\"$any(_c).resizable.preview\"\n (nzResizeEnd)=\"colResize($event, _c)\"\n >\n <nz-resize-handle *ngIf=\"$any(!last && !$any(_c).resizable.disabled)\" nzDirection=\"right\">\n <i></i>\n </nz-resize-handle>\n <ng-template\n #renderTitle\n [ngTemplateOutlet]=\"_c.__renderTitle!\"\n [ngTemplateOutletContext]=\"{ $implicit: h.column, index: index }\"\n ></ng-template>\n <ng-container *ngIf=\"!_c.__renderTitle; else renderTitle\">\n <ng-container [ngSwitch]=\"_c.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngIf=\"_c.selections!.length === 0\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: false }\">\n </ng-template>\n </ng-container>\n <div *ngIf=\"_c.selections!.length > 0\" class=\"ant-table-selection\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: true }\">\n </ng-template>\n <div *ngIf=\"_c.selections!.length\" class=\"ant-table-selection-extra\">\n <div\n nz-dropdown\n nzPlacement=\"bottomLeft\"\n [nzDropdownMenu]=\"selectionMenu\"\n class=\"ant-table-selection-down st__checkall-selection\"\n >\n <i nz-icon nzType=\"down\"></i>\n </div>\n </div>\n <nz-dropdown-menu #selectionMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li\n nz-menu-item\n *ngFor=\"let rw of _c.selections\"\n (click)=\"_rowSelection(rw)\"\n [innerHTML]=\"rw.text\"\n ></li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _c.title }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"_c.filter\">\n <st-filter\n nz-th-extra\n [col]=\"h.column\"\n [f]=\"_c.filter\"\n [locale]=\"locale\"\n (n)=\"handleFilterNotify($event)\"\n (handle)=\"_handleFilter(_c, $event)\"\n ></st-filter>\n </ng-container>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody class=\"st__body\">\n <ng-container *ngIf=\"!_loading\">\n <ng-template\n [ngTemplateOutlet]=\"bodyHeader!\"\n [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"\n ></ng-template>\n </ng-container>\n <ng-template #bodyTpl let-i let-index=\"index\">\n <tr\n [attr.data-index]=\"index\"\n (click)=\"_rowClick($event, i, index, false)\"\n (dblclick)=\"_rowClick($event, i, index, true)\"\n [ngClass]=\"i._rowClassName\"\n >\n <td\n *ngIf=\"expand\"\n [nzShowExpand]=\"expand && i.showExpand !== false\"\n [nzExpand]=\"i.expand\"\n (nzExpandChange)=\"_expandChange(i, $event)\"\n (click)=\"_stopPropagation($event)\"\n nzWidth=\"50px\"\n ></td>\n <td\n *ngFor=\"let c of _columns; let cIdx = index\"\n [nzLeft]=\"!!c._left\"\n [nzRight]=\"!!c._right\"\n [attr.data-col-index]=\"cIdx\"\n [ngClass]=\"c._className!\"\n [attr.colspan]=\"c.colSpan\"\n >\n <span *ngIf=\"responsive\" class=\"ant-table-rep__title\">\n <ng-template [ngTemplateOutlet]=\"titleTpl\" [ngTemplateOutletContext]=\"{ $implicit: c.title }\"></ng-template>\n </span>\n <st-td [data]=\"_data\" [i]=\"i\" [index]=\"index\" [c]=\"c\" [cIdx]=\"cIdx\" (n)=\"_handleTd($event)\"></st-td>\n </td>\n </tr>\n <tr [nzExpand]=\"i.expand\">\n <ng-template\n [ngTemplateOutlet]=\"expand\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\"\n ></ng-template>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <ng-container *ngFor=\"let i of _data; let index = index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"virtualScroll\">\n <ng-template nz-virtual-scroll let-i let-index=\"index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!_loading\">\n <ng-template [ngTemplateOutlet]=\"body!\" [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range=\"range\" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n<nz-dropdown-menu #contextmenuTpl=\"nzDropdownMenu\">\n <ul nz-menu class=\"st__contextmenu\">\n <ng-container *ngFor=\"let i of contextmenuList\">\n <li nz-menu-item *ngIf=\"i.children!.length === 0\" (click)=\"i.fn!(i)\" [innerHTML]=\"i.text\"></li>\n <li nz-submenu *ngIf=\"i.children!.length > 0\" [nzTitle]=\"i.text\">\n <ul>\n <li nz-menu-item *ngFor=\"let ci of i.children\" (click)=\"ci.fn!(ci)\" [innerHTML]=\"ci.text\"></li>\n </ul>\n </li>\n </ng-container>\n </ul>\n</nz-dropdown-menu>\n",
1844
1788
  providers: [STDataSource, STRowSource, STColumnSource, STExport, DatePipe, YNPipe, DecimalPipe],
1845
1789
  host: {
1846
1790
  '[class.st]': `true`,
@@ -1858,11 +1802,8 @@ STComponent.decorators = [
1858
1802
  STComponent.ctorParameters = () => [
1859
1803
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ALAIN_I18N_TOKEN,] }] },
1860
1804
  { type: ChangeDetectorRef },
1861
- { type: Router },
1862
1805
  { type: ElementRef },
1863
1806
  { type: STExport },
1864
- { type: ModalHelper },
1865
- { type: DrawerHelper },
1866
1807
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
1867
1808
  { type: STColumnSource },
1868
1809
  { type: STDataSource },
@@ -1904,7 +1845,6 @@ STComponent.propDecorators = {
1904
1845
  expandAccordion: [{ type: Input }],
1905
1846
  expand: [{ type: Input }],
1906
1847
  noResult: [{ type: Input }],
1907
- rowClickTime: [{ type: Input }],
1908
1848
  responsive: [{ type: Input }],
1909
1849
  responsiveHideHeaderFooter: [{ type: Input }],
1910
1850
  error: [{ type: Output }],
@@ -1940,9 +1880,6 @@ __decorate([
1940
1880
  __decorate([
1941
1881
  InputBoolean()
1942
1882
  ], STComponent.prototype, "expandAccordion", void 0);
1943
- __decorate([
1944
- InputNumber()
1945
- ], STComponent.prototype, "rowClickTime", void 0);
1946
1883
  __decorate([
1947
1884
  InputBoolean()
1948
1885
  ], STComponent.prototype, "responsive", void 0);
@@ -1962,6 +1899,380 @@ __decorate([
1962
1899
  InputNumber()
1963
1900
  ], STComponent.prototype, "virtualMinBufferPx", void 0);
1964
1901
 
1902
+ class STFilterComponent {
1903
+ constructor() {
1904
+ this.visible = false;
1905
+ this.locale = {};
1906
+ this.n = new EventEmitter();
1907
+ this.handle = new EventEmitter();
1908
+ }
1909
+ get icon() {
1910
+ return this.f.icon;
1911
+ }
1912
+ show($event) {
1913
+ $event.stopPropagation();
1914
+ }
1915
+ checkboxChange() {
1916
+ var _a;
1917
+ this.n.emit((_a = this.f.menus) === null || _a === void 0 ? void 0 : _a.filter(w => w.checked));
1918
+ }
1919
+ radioChange(item) {
1920
+ this.f.menus.forEach(i => (i.checked = false));
1921
+ item.checked = !item.checked;
1922
+ this.n.emit(item);
1923
+ }
1924
+ confirm() {
1925
+ this.handle.emit(true);
1926
+ }
1927
+ reset() {
1928
+ this.handle.emit(false);
1929
+ }
1930
+ }
1931
+ STFilterComponent.decorators = [
1932
+ { type: Component, args: [{
1933
+ selector: 'st-filter',
1934
+ template: `
1935
+ <span
1936
+ class="ant-table-filter-trigger"
1937
+ [class.active]="visible || f.default"
1938
+ nz-dropdown
1939
+ [nzDropdownMenu]="filterMenu"
1940
+ nzTrigger="click"
1941
+ [nzClickHide]="false"
1942
+ [(nzVisible)]="visible"
1943
+ nzOverlayClassName="st__filter-wrap"
1944
+ (click)="show($event)"
1945
+ >
1946
+ <i nz-icon [nzType]="icon.type" [nzTheme]="icon.theme!"></i>
1947
+ </span>
1948
+ <nz-dropdown-menu #filterMenu="nzDropdownMenu">
1949
+ <div class="ant-table-filter-dropdown">
1950
+ <ng-container [ngSwitch]="f.type">
1951
+ <div *ngSwitchCase="'keyword'" class="st__filter-keyword">
1952
+ <input
1953
+ type="text"
1954
+ nz-input
1955
+ [attr.placeholder]="f.placeholder"
1956
+ [(ngModel)]="f.menus![0]!.value"
1957
+ (ngModelChange)="n.emit($event)"
1958
+ (keyup.enter)="confirm()"
1959
+ />
1960
+ </div>
1961
+ <div *ngSwitchCase="'number'" class="p-sm st__filter-number">
1962
+ <nz-input-number
1963
+ [(ngModel)]="f.menus![0]!.value"
1964
+ (ngModelChange)="n.emit($event)"
1965
+ [nzMin]="f.number!.min!"
1966
+ [nzMax]="f.number!.max!"
1967
+ [nzStep]="f.number!.step!"
1968
+ [nzPrecision]="f.number!.precision"
1969
+ [nzPlaceHolder]="f.placeholder!"
1970
+ class="width-100"
1971
+ ></nz-input-number>
1972
+ </div>
1973
+ <div *ngSwitchCase="'date'" class="p-sm st__filter-date">
1974
+ <nz-date-picker
1975
+ *ngIf="!f.date!.range"
1976
+ nzInline
1977
+ [nzMode]="f.date!.mode"
1978
+ [(ngModel)]="f.menus![0]!.value"
1979
+ (ngModelChange)="n.emit($event)"
1980
+ [nzShowNow]="f.date!.showNow"
1981
+ [nzShowToday]="f.date!.showToday"
1982
+ [nzDisabledDate]="f.date!.disabledDate"
1983
+ [nzDisabledTime]="f.date!.disabledTime"
1984
+ ></nz-date-picker>
1985
+ <nz-range-picker
1986
+ *ngIf="f.date!.range"
1987
+ nzInline
1988
+ [nzMode]="f.date!.mode"
1989
+ [(ngModel)]="f.menus![0]!.value"
1990
+ (ngModelChange)="n.emit($event)"
1991
+ [nzShowNow]="f.date!.showNow"
1992
+ [nzShowToday]="f.date!.showToday"
1993
+ [nzDisabledDate]="f.date!.disabledDate"
1994
+ [nzDisabledTime]="f.date!.disabledTime"
1995
+ ></nz-range-picker>
1996
+ </div>
1997
+ <div *ngSwitchCase="'time'" class="p-sm st__filter-time"> </div>
1998
+ <div *ngSwitchCase="'custom'" class="st__filter-custom">
1999
+ <ng-template
2000
+ [ngTemplateOutlet]="f.custom!"
2001
+ [ngTemplateOutletContext]="{ $implicit: f, col: col }"
2002
+ ></ng-template>
2003
+ </div>
2004
+ <ul *ngSwitchDefault nz-menu>
2005
+ <ng-container *ngIf="f.multiple">
2006
+ <li nz-menu-item *ngFor="let filter of f.menus">
2007
+ <label nz-checkbox [(ngModel)]="filter.checked" (ngModelChange)="checkboxChange()">
2008
+ {{ filter.text }}
2009
+ </label>
2010
+ </li>
2011
+ </ng-container>
2012
+ <ng-container *ngIf="!f.multiple">
2013
+ <li nz-menu-item *ngFor="let filter of f.menus">
2014
+ <label nz-radio [ngModel]="filter.checked" (ngModelChange)="radioChange(filter)">
2015
+ {{ filter.text }}
2016
+ </label>
2017
+ </li>
2018
+ </ng-container>
2019
+ </ul>
2020
+ </ng-container>
2021
+ <div *ngIf="f.showOPArea" class="ant-table-filter-dropdown-btns">
2022
+ <a class="ant-table-filter-dropdown-link confirm" (click)="visible = false">
2023
+ <span (click)="confirm()">{{ f.confirmText || locale.filterConfirm }}</span>
2024
+ </a>
2025
+ <a class="ant-table-filter-dropdown-link clear" (click)="visible = false">
2026
+ <span (click)="reset()">{{ f.clearText || locale.filterReset }}</span>
2027
+ </a>
2028
+ </div>
2029
+ </div>
2030
+ </nz-dropdown-menu>
2031
+ `,
2032
+ host: {
2033
+ '[class.ant-table-filter-trigger-container]': `true`,
2034
+ '[class.st__filter]': `true`,
2035
+ '[class.ant-table-filter-trigger-container-open]': `visible`
2036
+ },
2037
+ preserveWhitespaces: false,
2038
+ changeDetection: ChangeDetectionStrategy.OnPush,
2039
+ encapsulation: ViewEncapsulation.None
2040
+ },] }
2041
+ ];
2042
+ STFilterComponent.propDecorators = {
2043
+ col: [{ type: Input }],
2044
+ locale: [{ type: Input }],
2045
+ f: [{ type: Input }],
2046
+ n: [{ type: Output }],
2047
+ handle: [{ type: Output }]
2048
+ };
2049
+
2050
+ class STTdComponent {
2051
+ constructor(stComp, router, modalHelper, drawerHelper) {
2052
+ this.stComp = stComp;
2053
+ this.router = router;
2054
+ this.modalHelper = modalHelper;
2055
+ this.drawerHelper = drawerHelper;
2056
+ this.n = new EventEmitter();
2057
+ }
2058
+ get routerState() {
2059
+ const { pi, ps, total } = this.stComp;
2060
+ return { pi, ps, total };
2061
+ }
2062
+ report(type) {
2063
+ this.n.emit({ type, item: this.i, col: this.c });
2064
+ }
2065
+ _checkbox(value) {
2066
+ this.i.checked = value;
2067
+ this.report('checkbox');
2068
+ }
2069
+ _radio() {
2070
+ this.data.filter(w => !w.disabled).forEach(i => (i.checked = false));
2071
+ this.i.checked = true;
2072
+ this.report('radio');
2073
+ }
2074
+ _link(e) {
2075
+ this._stopPropagation(e);
2076
+ const res = this.c.click(this.i, this.stComp);
2077
+ if (typeof res === 'string') {
2078
+ this.router.navigateByUrl(res, { state: this.routerState });
2079
+ }
2080
+ return false;
2081
+ }
2082
+ _stopPropagation(ev) {
2083
+ ev.preventDefault();
2084
+ ev.stopPropagation();
2085
+ }
2086
+ _btn(btn, ev) {
2087
+ if (ev) {
2088
+ ev.stopPropagation();
2089
+ }
2090
+ const record = this.i;
2091
+ if (btn.type === 'modal' || btn.type === 'static') {
2092
+ const { modal } = btn;
2093
+ const obj = { [modal.paramsName]: record };
2094
+ this.modalHelper[btn.type === 'modal' ? 'create' : 'createStatic'](modal.component, Object.assign(Object.assign({}, obj), (modal.params && modal.params(record))), deepMergeKey({}, true, this.stComp['cog'].modal, modal))
2095
+ .pipe(filter(w => typeof w !== 'undefined'))
2096
+ .subscribe((res) => this.btnCallback(record, btn, res));
2097
+ return;
2098
+ }
2099
+ else if (btn.type === 'drawer') {
2100
+ const { drawer } = btn;
2101
+ const obj = { [drawer.paramsName]: record };
2102
+ this.drawerHelper
2103
+ .create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), deepMergeKey({}, true, this.stComp['cog'].drawer, drawer))
2104
+ .pipe(filter(w => typeof w !== 'undefined'))
2105
+ .subscribe(res => this.btnCallback(record, btn, res));
2106
+ return;
2107
+ }
2108
+ else if (btn.type === 'link') {
2109
+ const clickRes = this.btnCallback(record, btn);
2110
+ if (typeof clickRes === 'string') {
2111
+ this.router.navigateByUrl(clickRes, { state: this.routerState });
2112
+ }
2113
+ return;
2114
+ }
2115
+ this.btnCallback(record, btn);
2116
+ }
2117
+ btnCallback(record, btn, modal) {
2118
+ if (!btn.click)
2119
+ return;
2120
+ if (typeof btn.click === 'string') {
2121
+ switch (btn.click) {
2122
+ case 'load':
2123
+ this.stComp.load();
2124
+ break;
2125
+ case 'reload':
2126
+ this.stComp.reload();
2127
+ break;
2128
+ }
2129
+ }
2130
+ else {
2131
+ return btn.click(record, modal, this.stComp);
2132
+ }
2133
+ }
2134
+ }
2135
+ STTdComponent.decorators = [
2136
+ { type: Component, args: [{
2137
+ selector: 'st-td',
2138
+ template: `
2139
+ <ng-template #btnTpl let-i>
2140
+ <ng-container *ngIf="!i.tooltip">
2141
+ <ng-template [ngTemplateOutlet]="btnItemTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2142
+ </ng-container>
2143
+ <span *ngIf="i.tooltip" nz-tooltip [nzTooltipTitle]="i.tooltip">
2144
+ <ng-template [ngTemplateOutlet]="btnItemTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2145
+ </span>
2146
+ </ng-template>
2147
+ <ng-template #btnItemTpl let-i>
2148
+ <a
2149
+ *ngIf="i.pop"
2150
+ nz-popconfirm
2151
+ [nzPopconfirmTitle]="i.pop.title"
2152
+ [nzIcon]="i.pop.icon"
2153
+ [nzCondition]="i.pop.condition(i)"
2154
+ [nzCancelText]="i.pop.cancelText"
2155
+ [nzOkText]="i.pop.okText"
2156
+ [nzOkType]="i.pop.okType"
2157
+ (nzOnConfirm)="_btn(i)"
2158
+ class="st__btn-text"
2159
+ [ngClass]="i.className"
2160
+ (click)="_stopPropagation($event)"
2161
+ >
2162
+ <ng-template [ngTemplateOutlet]="btnTextTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2163
+ </a>
2164
+ <a *ngIf="!i.pop" (click)="_btn(i, $event)" class="st__btn-text" [ngClass]="i.className">
2165
+ <ng-template [ngTemplateOutlet]="btnTextTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2166
+ </a>
2167
+ </ng-template>
2168
+ <ng-template #btnTextTpl let-i>
2169
+ <ng-container *ngIf="i.icon">
2170
+ <i
2171
+ *ngIf="!i.icon.iconfont"
2172
+ nz-icon
2173
+ [nzType]="i.icon.type"
2174
+ [nzTheme]="i.icon.theme"
2175
+ [nzSpin]="i.icon.spin"
2176
+ [nzTwotoneColor]="i.icon.twoToneColor"
2177
+ ></i>
2178
+ <i *ngIf="i.icon.iconfont" nz-icon [nzIconfont]="i.icon.iconfont"></i>
2179
+ </ng-container>
2180
+ <span [innerHTML]="i._text" [ngClass]="{ 'pl-xs': i.icon }"></span>
2181
+ </ng-template>
2182
+ <ng-template
2183
+ #render
2184
+ [ngTemplateOutlet]="c.__render!"
2185
+ [ngTemplateOutletContext]="{ $implicit: i, index: index, column: c }"
2186
+ ></ng-template>
2187
+ <ng-container *ngIf="!c.__render; else render">
2188
+ <ng-container [ngSwitch]="c.type">
2189
+ <label
2190
+ *ngSwitchCase="'checkbox'"
2191
+ nz-checkbox
2192
+ [nzDisabled]="i.disabled"
2193
+ [ngModel]="i.checked"
2194
+ (ngModelChange)="_checkbox($event)"
2195
+ ></label>
2196
+ <label
2197
+ *ngSwitchCase="'radio'"
2198
+ nz-radio
2199
+ [nzDisabled]="i.disabled"
2200
+ [ngModel]="i.checked"
2201
+ (ngModelChange)="_radio()"
2202
+ ></label>
2203
+ <a
2204
+ *ngSwitchCase="'link'"
2205
+ (click)="_link($event)"
2206
+ [innerHTML]="i._values[cIdx]._text"
2207
+ [attr.title]="i._values[cIdx].text"
2208
+ ></a>
2209
+ <ng-container *ngIf="i._values[cIdx].text">
2210
+ <nz-tag *ngSwitchCase="'tag'" [nzColor]="i._values[cIdx].color">
2211
+ <span [innerHTML]="i._values[cIdx]._text"></span>
2212
+ </nz-tag>
2213
+ <nz-badge
2214
+ *ngSwitchCase="'badge'"
2215
+ [nzStatus]="i._values[cIdx].color"
2216
+ [nzText]="i._values[cIdx].text"
2217
+ ></nz-badge>
2218
+ </ng-container>
2219
+ <ng-template *ngSwitchCase="'widget'" st-widget-host [record]="i" [column]="c"></ng-template
2220
+ ><ng-container *ngSwitchDefault>
2221
+ <span
2222
+ *ngIf="c.safeType !== 'text'"
2223
+ [innerHTML]="i._values[cIdx]._text"
2224
+ [attr.title]="c._isTruncate ? i._values[cIdx].text : null"
2225
+ ></span>
2226
+ <span
2227
+ *ngIf="c.safeType === 'text'"
2228
+ [innerText]="i._values[cIdx]._text"
2229
+ [attr.title]="c._isTruncate ? i._values[cIdx].text : null"
2230
+ ></span>
2231
+ </ng-container>
2232
+ </ng-container>
2233
+ <ng-container *ngFor="let btn of i._values[cIdx].buttons; let last = last">
2234
+ <a *ngIf="btn.children!.length > 0" nz-dropdown [nzDropdownMenu]="btnMenu" nzOverlayClassName="st__btn-sub">
2235
+ <span [innerHTML]="btn._text"></span>
2236
+ <i nz-icon nzType="down"></i>
2237
+ </a>
2238
+ <nz-dropdown-menu #btnMenu="nzDropdownMenu">
2239
+ <ul nz-menu>
2240
+ <ng-container *ngFor="let subBtn of btn.children!">
2241
+ <li *ngIf="subBtn.type !== 'divider'" nz-menu-item [class.st__btn-disabled]="subBtn._disabled">
2242
+ <ng-template [ngTemplateOutlet]="btnTpl" [ngTemplateOutletContext]="{ $implicit: subBtn }">
2243
+ </ng-template>
2244
+ </li>
2245
+ <li *ngIf="subBtn.type === 'divider'" nz-menu-divider></li>
2246
+ </ng-container>
2247
+ </ul>
2248
+ </nz-dropdown-menu>
2249
+ <span *ngIf="btn.children!.length === 0" [class.st__btn-disabled]="btn._disabled">
2250
+ <ng-template [ngTemplateOutlet]="btnTpl" [ngTemplateOutletContext]="{ $implicit: btn }"> </ng-template>
2251
+ </span>
2252
+ <nz-divider *ngIf="!last" nzType="vertical"></nz-divider>
2253
+ </ng-container>
2254
+ </ng-container>
2255
+ `,
2256
+ preserveWhitespaces: false,
2257
+ changeDetection: ChangeDetectionStrategy.OnPush,
2258
+ encapsulation: ViewEncapsulation.None
2259
+ },] }
2260
+ ];
2261
+ STTdComponent.ctorParameters = () => [
2262
+ { type: STComponent, decorators: [{ type: Host }] },
2263
+ { type: Router },
2264
+ { type: ModalHelper },
2265
+ { type: DrawerHelper }
2266
+ ];
2267
+ STTdComponent.propDecorators = {
2268
+ c: [{ type: Input }],
2269
+ cIdx: [{ type: Input }],
2270
+ data: [{ type: Input }],
2271
+ i: [{ type: Input }],
2272
+ index: [{ type: Input }],
2273
+ n: [{ type: Output }]
2274
+ };
2275
+
1965
2276
  const COMPONENTS = [STComponent, STRowDirective, STWidgetHostDirective];
1966
2277
  class STModule {
1967
2278
  }
@@ -1984,9 +2295,11 @@ STModule.decorators = [
1984
2295
  NzTagModule,
1985
2296
  NzInputModule,
1986
2297
  NzToolTipModule,
1987
- NzResizableModule
2298
+ NzResizableModule,
2299
+ NzInputNumberModule,
2300
+ NzDatePickerModule
1988
2301
  ],
1989
- declarations: COMPONENTS,
2302
+ declarations: [...COMPONENTS, STFilterComponent, STTdComponent],
1990
2303
  exports: COMPONENTS
1991
2304
  },] }
1992
2305
  ];
@@ -1995,5 +2308,5 @@ STModule.decorators = [
1995
2308
  * Generated bundle index. Do not edit.
1996
2309
  */
1997
2310
 
1998
- export { STColumnSource, STComponent, STDataSource, STExport, STModule, STRowDirective, STWidgetHostDirective, STWidgetRegistry, ST_DEFAULT_CONFIG, STRowSource as ɵa };
2311
+ export { STColumnSource, STComponent, STDataSource, STExport, STModule, STRowDirective, STWidgetHostDirective, STWidgetRegistry, ST_DEFAULT_CONFIG, STRowSource as ɵa, STFilterComponent as ɵb, STTdComponent as ɵc };
1999
2312
  //# sourceMappingURL=table.js.map