@delon/abc 12.2.1 → 12.4.0

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 (91) hide show
  1. package/bundles/abc.umd.js +3 -3
  2. package/bundles/autoFocus.umd.js +4 -4
  3. package/bundles/avatarList.umd.js +4 -4
  4. package/bundles/count-down.umd.js +4 -4
  5. package/bundles/datePicker.umd.js +5 -5
  6. package/bundles/downFile.umd.js +4 -4
  7. package/bundles/edit.umd.js +4 -4
  8. package/bundles/ellipsis.umd.js +4 -4
  9. package/bundles/errorCollect.umd.js +4 -4
  10. package/bundles/exception.umd.js +12 -9
  11. package/bundles/exception.umd.js.map +1 -1
  12. package/bundles/footerToolbar.umd.js +4 -4
  13. package/bundles/fullContent.umd.js +6 -8
  14. package/bundles/fullContent.umd.js.map +1 -1
  15. package/bundles/globalFooter.umd.js +4 -4
  16. package/bundles/grid.umd.js +3 -3
  17. package/bundles/image.umd.js +3 -3
  18. package/bundles/let.umd.js +4 -4
  19. package/bundles/loading.umd.js +6 -8
  20. package/bundles/loading.umd.js.map +1 -1
  21. package/bundles/lodop.umd.js +5 -7
  22. package/bundles/lodop.umd.js.map +1 -1
  23. package/bundles/media.umd.js +5 -7
  24. package/bundles/media.umd.js.map +1 -1
  25. package/bundles/noticeIcon.umd.js +4 -4
  26. package/bundles/onboarding.umd.js +6 -8
  27. package/bundles/onboarding.umd.js.map +1 -1
  28. package/bundles/pageHeader.umd.js +4 -4
  29. package/bundles/pdf.umd.js +4 -4
  30. package/bundles/qr.umd.js +3 -3
  31. package/bundles/quickMenu.umd.js +4 -4
  32. package/bundles/result.umd.js +4 -4
  33. package/bundles/reuseTab.umd.js +15 -26
  34. package/bundles/reuseTab.umd.js.map +1 -1
  35. package/bundles/table.umd.js +251 -147
  36. package/bundles/table.umd.js.map +1 -1
  37. package/bundles/tagSelect.umd.js +4 -4
  38. package/bundles/view.umd.js +4 -4
  39. package/bundles/xlsx.umd.js +30 -37
  40. package/bundles/xlsx.umd.js.map +1 -1
  41. package/bundles/zip.umd.js +5 -7
  42. package/bundles/zip.umd.js.map +1 -1
  43. package/esm2015/exception/exception.component.js +7 -4
  44. package/esm2015/exception/exception.module.js +3 -2
  45. package/esm2015/lodop/lodop.service.js +1 -1
  46. package/esm2015/reuse-tab/reuse-tab-context-menu.component.js +2 -2
  47. package/esm2015/reuse-tab/reuse-tab-context.service.js +4 -13
  48. package/esm2015/reuse-tab/reuse-tab.component.js +7 -7
  49. package/esm2015/st/index.js +2 -0
  50. package/esm2015/st/st-column-source.js +28 -7
  51. package/esm2015/st/st-data-source.js +4 -4
  52. package/esm2015/st/st-export.js +9 -3
  53. package/esm2015/st/st-filter.component.js +149 -0
  54. package/esm2015/st/st-td.component.js +232 -0
  55. package/esm2015/st/st.component.js +28 -118
  56. package/esm2015/st/st.config.js +1 -2
  57. package/esm2015/st/st.interfaces.js +1 -1
  58. package/esm2015/st/st.module.js +9 -3
  59. package/esm2015/st/st.types.js +1 -1
  60. package/esm2015/st/table.js +3 -1
  61. package/esm2015/xlsx/xlsx.service.js +23 -29
  62. package/esm2015/xlsx/xlsx.types.js +1 -1
  63. package/esm2015/zip/zip.service.js +1 -1
  64. package/exception/exception.component.d.ts +3 -2
  65. package/exception/exception.metadata.json +1 -1
  66. package/fesm2015/exception.js +8 -4
  67. package/fesm2015/exception.js.map +1 -1
  68. package/fesm2015/lodop.js.map +1 -1
  69. package/fesm2015/reuseTab.js +10 -19
  70. package/fesm2015/reuseTab.js.map +1 -1
  71. package/fesm2015/table.js +447 -132
  72. package/fesm2015/table.js.map +1 -1
  73. package/fesm2015/xlsx.js +22 -28
  74. package/fesm2015/xlsx.js.map +1 -1
  75. package/fesm2015/zip.js.map +1 -1
  76. package/package.json +4 -4
  77. package/reuse-tab/reuse-tab.component.d.ts +1 -1
  78. package/reuse-tab/reuseTab.metadata.json +1 -1
  79. package/st/index.d.ts +1 -0
  80. package/st/st-filter.component.d.ts +18 -0
  81. package/st/st-td.component.d.ts +27 -0
  82. package/st/st.component.d.ts +8 -23
  83. package/st/st.interfaces.d.ts +57 -3
  84. package/st/st.types.d.ts +6 -0
  85. package/st/style/index.less +28 -12
  86. package/st/table.d.ts +2 -0
  87. package/st/table.metadata.json +1 -1
  88. package/sv/style/index.less +1 -0
  89. package/theme-default.less +3 -0
  90. package/xlsx/xlsx.metadata.json +1 -1
  91. 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
  }
@@ -929,11 +952,17 @@ class STExport {
929
952
  ret.t = 'n';
930
953
  break;
931
954
  case 'date':
932
- ret.t = 'd';
955
+ // Can't be a empty value, it will cause `#NULL!`
956
+ // See https://github.com/SheetJS/sheetjs/blob/master/docbits/52_datatype.md
957
+ if (`${val}`.length > 0) {
958
+ ret.t = 'd';
959
+ // Number Formats: https://github.com/SheetJS/sheetjs/blob/master/docbits/63_numfmt.md
960
+ ret.z = col.dateFormat;
961
+ }
933
962
  break;
934
963
  case 'yn':
935
964
  const yn = col.yn;
936
- ret.v = ret.v === yn.truth ? yn.yes : yn.no;
965
+ ret.v = val === yn.truth ? yn.yes : yn.no;
937
966
  break;
938
967
  }
939
968
  }
@@ -1070,7 +1099,6 @@ const ST_DEFAULT_CONFIG = {
1070
1099
  trigger: 'click',
1071
1100
  placement: 'top'
1072
1101
  },
1073
- rowClickTime: 200,
1074
1102
  btnIcon: {
1075
1103
  theme: 'outline',
1076
1104
  spin: false
@@ -1099,13 +1127,10 @@ const ST_DEFAULT_CONFIG = {
1099
1127
  };
1100
1128
 
1101
1129
  class STComponent {
1102
- 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) {
1103
1131
  this.cdr = cdr;
1104
- this.router = router;
1105
1132
  this.el = el;
1106
1133
  this.exportSrv = exportSrv;
1107
- this.modalHelper = modalHelper;
1108
- this.drawerHelper = drawerHelper;
1109
1134
  this.doc = doc;
1110
1135
  this.columnSource = columnSource;
1111
1136
  this.dataSource = dataSource;
@@ -1113,7 +1138,6 @@ class STComponent {
1113
1138
  this.cms = cms;
1114
1139
  this.destroy$ = new Subject();
1115
1140
  this.totalTpl = ``;
1116
- this.rowClickCount = 0;
1117
1141
  this.customWidthConfig = false;
1118
1142
  this._widthConfig = [];
1119
1143
  this.locale = {};
@@ -1137,7 +1161,6 @@ class STComponent {
1137
1161
  this.showHeader = true;
1138
1162
  this.expandRowByClick = false;
1139
1163
  this.expandAccordion = false;
1140
- this.rowClickTime = 200;
1141
1164
  this.responsive = true;
1142
1165
  this.error = new EventEmitter();
1143
1166
  this.change = new EventEmitter();
@@ -1220,10 +1243,6 @@ class STComponent {
1220
1243
  get list() {
1221
1244
  return this._data;
1222
1245
  }
1223
- get routerState() {
1224
- const { pi, ps, total } = this;
1225
- return { pi, ps, total };
1226
- }
1227
1246
  setCog(cog) {
1228
1247
  const copyMultiSort = Object.assign({}, cog.multiSort);
1229
1248
  // Because multiSort.global will affect the result, it should be removed first, and multiSort will be operated again after processing.
@@ -1419,45 +1438,30 @@ class STComponent {
1419
1438
  }
1420
1439
  this.changeEmit(type);
1421
1440
  }
1422
- _click(e, item, col) {
1423
- e.preventDefault();
1424
- e.stopPropagation();
1425
- const res = col.click(item, this);
1426
- if (typeof res === 'string') {
1427
- this.router.navigateByUrl(res, { state: this.routerState });
1428
- }
1429
- return false;
1430
- }
1431
1441
  closeOtherExpand(item) {
1432
1442
  if (this.expandAccordion === false)
1433
1443
  return;
1434
1444
  this._data.filter(i => i !== item).forEach(i => (i.expand = false));
1435
1445
  }
1436
- _rowClick(e, item, index) {
1446
+ _rowClick(e, item, index, dbl) {
1437
1447
  const el = e.target;
1438
1448
  if (el.nodeName === 'INPUT')
1439
1449
  return;
1440
- const { expand, expandRowByClick, rowClickTime } = this;
1450
+ const { expand, expandRowByClick } = this;
1441
1451
  if (!!expand && item.showExpand !== false && expandRowByClick) {
1442
1452
  item.expand = !item.expand;
1443
1453
  this.closeOtherExpand(item);
1444
1454
  this.changeEmit('expand', item);
1445
1455
  return;
1446
1456
  }
1447
- ++this.rowClickCount;
1448
- if (this.rowClickCount !== 1)
1449
- return;
1450
- setTimeout(() => {
1451
- const data = { e, item, index };
1452
- if (this.rowClickCount === 1) {
1453
- this._clickRowClassName(el, item, index);
1454
- this.changeEmit('click', data);
1455
- }
1456
- else {
1457
- this.changeEmit('dblClick', data);
1458
- }
1459
- this.rowClickCount = 0;
1460
- }, rowClickTime);
1457
+ const data = { e, item, index };
1458
+ if (dbl) {
1459
+ this.changeEmit('dblClick', data);
1460
+ }
1461
+ else {
1462
+ this._clickRowClassName(el, item, index);
1463
+ this.changeEmit('click', data);
1464
+ }
1461
1465
  }
1462
1466
  _clickRowClassName(el, item, index) {
1463
1467
  const cr = this.clickRowClassName;
@@ -1565,31 +1569,23 @@ class STComponent {
1565
1569
  }
1566
1570
  // #endregion
1567
1571
  // #region filter
1568
- handleFilter(col) {
1572
+ _handleFilter(col, confirm) {
1573
+ if (!confirm) {
1574
+ this.columnSource.cleanFilter(col);
1575
+ }
1569
1576
  // 过滤表示一种数据的变化应重置页码为 `1`
1570
1577
  this.pi = 1;
1571
1578
  this.columnSource.updateDefault(col.filter);
1572
1579
  this.loadPageData();
1573
1580
  this.changeEmit('filter', col);
1574
1581
  }
1575
- _filterConfirm(col) {
1576
- this.handleFilter(col);
1577
- }
1578
- _filterRadio(col, item, checked) {
1579
- col.filter.menus.forEach(i => (i.checked = false));
1580
- item.checked = checked;
1581
- }
1582
- _filterClear(col) {
1583
- this.columnSource.cleanFilter(col);
1584
- this.handleFilter(col);
1582
+ handleFilterNotify(value) {
1583
+ this.changeEmit('filterChange', value);
1585
1584
  }
1586
1585
  clearFilter() {
1587
1586
  this._columns.filter(w => w.filter && w.filter.default === true).forEach(col => this.columnSource.cleanFilter(col));
1588
1587
  return this;
1589
1588
  }
1590
- _filterClick($event) {
1591
- $event.stopPropagation();
1592
- }
1593
1589
  // #endregion
1594
1590
  // #region checkbox
1595
1591
  /** 清除所有 `checkbox` */
@@ -1610,10 +1606,6 @@ class STComponent {
1610
1606
  this._data.filter(w => !w.disabled).forEach(i => (i.checked = checked));
1611
1607
  return this._refCheck()._checkNotify();
1612
1608
  }
1613
- _checkSelection(i, value) {
1614
- i.checked = value;
1615
- return this._refCheck()._checkNotify();
1616
- }
1617
1609
  _rowSelection(row) {
1618
1610
  row.select(this._data);
1619
1611
  return this._refCheck()._checkNotify();
@@ -1631,63 +1623,17 @@ class STComponent {
1631
1623
  this.changeEmit('radio', null);
1632
1624
  return this;
1633
1625
  }
1634
- _refRadio(checked, item) {
1635
- // if (item.disabled === true) return;
1636
- this._data.filter(w => !w.disabled).forEach(i => (i.checked = false));
1637
- item.checked = checked;
1638
- this.changeEmit('radio', item);
1639
- return this;
1640
- }
1641
1626
  // #endregion
1642
- // #region buttons
1643
- _btnClick(record, btn, ev) {
1644
- if (ev) {
1645
- ev.stopPropagation();
1646
- }
1647
- if (btn.type === 'modal' || btn.type === 'static') {
1648
- const { modal } = btn;
1649
- const obj = { [modal.paramsName]: record };
1650
- 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))
1651
- .pipe(filter(w => typeof w !== 'undefined'))
1652
- .subscribe((res) => this.btnCallback(record, btn, res));
1653
- return;
1654
- }
1655
- else if (btn.type === 'drawer') {
1656
- const { drawer } = btn;
1657
- const obj = { [drawer.paramsName]: record };
1658
- this.drawerHelper
1659
- .create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), deepMergeKey({}, true, this.cog.drawer, drawer))
1660
- .pipe(filter(w => typeof w !== 'undefined'))
1661
- .subscribe(res => this.btnCallback(record, btn, res));
1662
- return;
1663
- }
1664
- else if (btn.type === 'link') {
1665
- const clickRes = this.btnCallback(record, btn);
1666
- if (typeof clickRes === 'string') {
1667
- this.router.navigateByUrl(clickRes, { state: this.routerState });
1668
- }
1669
- return;
1670
- }
1671
- this.btnCallback(record, btn);
1672
- }
1673
- btnCallback(record, btn, modal) {
1674
- if (!btn.click)
1675
- return;
1676
- if (typeof btn.click === 'string') {
1677
- switch (btn.click) {
1678
- case 'load':
1679
- this.load();
1680
- break;
1681
- case 'reload':
1682
- this.reload();
1683
- break;
1684
- }
1685
- }
1686
- else {
1687
- return btn.click(record, modal, this);
1627
+ _handleTd(ev) {
1628
+ switch (ev.type) {
1629
+ case 'checkbox':
1630
+ this._refCheck()._checkNotify();
1631
+ break;
1632
+ case 'radio':
1633
+ this.changeEmit('radio', ev.item);
1634
+ break;
1688
1635
  }
1689
1636
  }
1690
- // #endregion
1691
1637
  // #region export
1692
1638
  /**
1693
1639
  * 导出当前页,确保已经注册 `XlsxModule`
@@ -1834,7 +1780,7 @@ STComponent.decorators = [
1834
1780
  { type: Component, args: [{
1835
1781
  selector: 'st',
1836
1782
  exportAs: 'st',
1837
- 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",
1783
+ 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",
1838
1784
  providers: [STDataSource, STRowSource, STColumnSource, STExport, DatePipe, YNPipe, DecimalPipe],
1839
1785
  host: {
1840
1786
  '[class.st]': `true`,
@@ -1852,11 +1798,8 @@ STComponent.decorators = [
1852
1798
  STComponent.ctorParameters = () => [
1853
1799
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ALAIN_I18N_TOKEN,] }] },
1854
1800
  { type: ChangeDetectorRef },
1855
- { type: Router },
1856
1801
  { type: ElementRef },
1857
1802
  { type: STExport },
1858
- { type: ModalHelper },
1859
- { type: DrawerHelper },
1860
1803
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
1861
1804
  { type: STColumnSource },
1862
1805
  { type: STDataSource },
@@ -1898,7 +1841,6 @@ STComponent.propDecorators = {
1898
1841
  expandAccordion: [{ type: Input }],
1899
1842
  expand: [{ type: Input }],
1900
1843
  noResult: [{ type: Input }],
1901
- rowClickTime: [{ type: Input }],
1902
1844
  responsive: [{ type: Input }],
1903
1845
  responsiveHideHeaderFooter: [{ type: Input }],
1904
1846
  error: [{ type: Output }],
@@ -1934,9 +1876,6 @@ __decorate([
1934
1876
  __decorate([
1935
1877
  InputBoolean()
1936
1878
  ], STComponent.prototype, "expandAccordion", void 0);
1937
- __decorate([
1938
- InputNumber()
1939
- ], STComponent.prototype, "rowClickTime", void 0);
1940
1879
  __decorate([
1941
1880
  InputBoolean()
1942
1881
  ], STComponent.prototype, "responsive", void 0);
@@ -1956,6 +1895,380 @@ __decorate([
1956
1895
  InputNumber()
1957
1896
  ], STComponent.prototype, "virtualMinBufferPx", void 0);
1958
1897
 
1898
+ class STFilterComponent {
1899
+ constructor() {
1900
+ this.visible = false;
1901
+ this.locale = {};
1902
+ this.n = new EventEmitter();
1903
+ this.handle = new EventEmitter();
1904
+ }
1905
+ get icon() {
1906
+ return this.f.icon;
1907
+ }
1908
+ show($event) {
1909
+ $event.stopPropagation();
1910
+ }
1911
+ checkboxChange() {
1912
+ var _a;
1913
+ this.n.emit((_a = this.f.menus) === null || _a === void 0 ? void 0 : _a.filter(w => w.checked));
1914
+ }
1915
+ radioChange(item) {
1916
+ this.f.menus.forEach(i => (i.checked = false));
1917
+ item.checked = !item.checked;
1918
+ this.n.emit(item);
1919
+ }
1920
+ confirm() {
1921
+ this.handle.emit(true);
1922
+ }
1923
+ reset() {
1924
+ this.handle.emit(false);
1925
+ }
1926
+ }
1927
+ STFilterComponent.decorators = [
1928
+ { type: Component, args: [{
1929
+ selector: 'st-filter',
1930
+ template: `
1931
+ <span
1932
+ class="ant-table-filter-trigger"
1933
+ [class.active]="visible || f.default"
1934
+ nz-dropdown
1935
+ [nzDropdownMenu]="filterMenu"
1936
+ nzTrigger="click"
1937
+ [nzClickHide]="false"
1938
+ [(nzVisible)]="visible"
1939
+ nzOverlayClassName="st__filter-wrap"
1940
+ (click)="show($event)"
1941
+ >
1942
+ <i nz-icon [nzType]="icon.type" [nzTheme]="icon.theme!"></i>
1943
+ </span>
1944
+ <nz-dropdown-menu #filterMenu="nzDropdownMenu">
1945
+ <div class="ant-table-filter-dropdown">
1946
+ <ng-container [ngSwitch]="f.type">
1947
+ <div *ngSwitchCase="'keyword'" class="st__filter-keyword">
1948
+ <input
1949
+ type="text"
1950
+ nz-input
1951
+ [attr.placeholder]="f.placeholder"
1952
+ [(ngModel)]="f.menus![0]!.value"
1953
+ (ngModelChange)="n.emit($event)"
1954
+ (keyup.enter)="confirm()"
1955
+ />
1956
+ </div>
1957
+ <div *ngSwitchCase="'number'" class="p-sm st__filter-number">
1958
+ <nz-input-number
1959
+ [(ngModel)]="f.menus![0]!.value"
1960
+ (ngModelChange)="n.emit($event)"
1961
+ [nzMin]="f.number!.min!"
1962
+ [nzMax]="f.number!.max!"
1963
+ [nzStep]="f.number!.step!"
1964
+ [nzPrecision]="f.number!.precision"
1965
+ [nzPlaceHolder]="f.placeholder!"
1966
+ class="width-100"
1967
+ ></nz-input-number>
1968
+ </div>
1969
+ <div *ngSwitchCase="'date'" class="p-sm st__filter-date">
1970
+ <nz-date-picker
1971
+ *ngIf="!f.date!.range"
1972
+ nzInline
1973
+ [nzMode]="f.date!.mode"
1974
+ [(ngModel)]="f.menus![0]!.value"
1975
+ (ngModelChange)="n.emit($event)"
1976
+ [nzShowNow]="f.date!.showNow"
1977
+ [nzShowToday]="f.date!.showToday"
1978
+ [nzDisabledDate]="f.date!.disabledDate"
1979
+ [nzDisabledTime]="f.date!.disabledTime"
1980
+ ></nz-date-picker>
1981
+ <nz-range-picker
1982
+ *ngIf="f.date!.range"
1983
+ nzInline
1984
+ [nzMode]="f.date!.mode"
1985
+ [(ngModel)]="f.menus![0]!.value"
1986
+ (ngModelChange)="n.emit($event)"
1987
+ [nzShowNow]="f.date!.showNow"
1988
+ [nzShowToday]="f.date!.showToday"
1989
+ [nzDisabledDate]="f.date!.disabledDate"
1990
+ [nzDisabledTime]="f.date!.disabledTime"
1991
+ ></nz-range-picker>
1992
+ </div>
1993
+ <div *ngSwitchCase="'time'" class="p-sm st__filter-time"> </div>
1994
+ <div *ngSwitchCase="'custom'" class="st__filter-custom">
1995
+ <ng-template
1996
+ [ngTemplateOutlet]="f.custom!"
1997
+ [ngTemplateOutletContext]="{ $implicit: f, col: col }"
1998
+ ></ng-template>
1999
+ </div>
2000
+ <ul *ngSwitchDefault nz-menu>
2001
+ <ng-container *ngIf="f.multiple">
2002
+ <li nz-menu-item *ngFor="let filter of f.menus">
2003
+ <label nz-checkbox [(ngModel)]="filter.checked" (ngModelChange)="checkboxChange()">
2004
+ {{ filter.text }}
2005
+ </label>
2006
+ </li>
2007
+ </ng-container>
2008
+ <ng-container *ngIf="!f.multiple">
2009
+ <li nz-menu-item *ngFor="let filter of f.menus">
2010
+ <label nz-radio [ngModel]="filter.checked" (ngModelChange)="radioChange(filter)">
2011
+ {{ filter.text }}
2012
+ </label>
2013
+ </li>
2014
+ </ng-container>
2015
+ </ul>
2016
+ </ng-container>
2017
+ <div *ngIf="f.showOPArea" class="ant-table-filter-dropdown-btns">
2018
+ <a class="ant-table-filter-dropdown-link confirm" (click)="visible = false">
2019
+ <span (click)="confirm()">{{ f.confirmText || locale.filterConfirm }}</span>
2020
+ </a>
2021
+ <a class="ant-table-filter-dropdown-link clear" (click)="visible = false">
2022
+ <span (click)="reset()">{{ f.clearText || locale.filterReset }}</span>
2023
+ </a>
2024
+ </div>
2025
+ </div>
2026
+ </nz-dropdown-menu>
2027
+ `,
2028
+ host: {
2029
+ '[class.ant-table-filter-trigger-container]': `true`,
2030
+ '[class.st__filter]': `true`,
2031
+ '[class.ant-table-filter-trigger-container-open]': `visible`
2032
+ },
2033
+ preserveWhitespaces: false,
2034
+ changeDetection: ChangeDetectionStrategy.OnPush,
2035
+ encapsulation: ViewEncapsulation.None
2036
+ },] }
2037
+ ];
2038
+ STFilterComponent.propDecorators = {
2039
+ col: [{ type: Input }],
2040
+ locale: [{ type: Input }],
2041
+ f: [{ type: Input }],
2042
+ n: [{ type: Output }],
2043
+ handle: [{ type: Output }]
2044
+ };
2045
+
2046
+ class STTdComponent {
2047
+ constructor(stComp, router, modalHelper, drawerHelper) {
2048
+ this.stComp = stComp;
2049
+ this.router = router;
2050
+ this.modalHelper = modalHelper;
2051
+ this.drawerHelper = drawerHelper;
2052
+ this.n = new EventEmitter();
2053
+ }
2054
+ get routerState() {
2055
+ const { pi, ps, total } = this.stComp;
2056
+ return { pi, ps, total };
2057
+ }
2058
+ report(type) {
2059
+ this.n.emit({ type, item: this.i, col: this.c });
2060
+ }
2061
+ _checkbox(value) {
2062
+ this.i.checked = value;
2063
+ this.report('checkbox');
2064
+ }
2065
+ _radio(checked) {
2066
+ this.data.filter(w => !w.disabled).forEach(i => (i.checked = false));
2067
+ this.i.checked = checked;
2068
+ this.report('radio');
2069
+ }
2070
+ _link(e) {
2071
+ this._stopPropagation(e);
2072
+ const res = this.c.click(this.i, this.stComp);
2073
+ if (typeof res === 'string') {
2074
+ this.router.navigateByUrl(res, { state: this.routerState });
2075
+ }
2076
+ return false;
2077
+ }
2078
+ _stopPropagation(ev) {
2079
+ ev.preventDefault();
2080
+ ev.stopPropagation();
2081
+ }
2082
+ _btn(btn, ev) {
2083
+ if (ev) {
2084
+ ev.stopPropagation();
2085
+ }
2086
+ const record = this.i;
2087
+ if (btn.type === 'modal' || btn.type === 'static') {
2088
+ const { modal } = btn;
2089
+ const obj = { [modal.paramsName]: record };
2090
+ 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))
2091
+ .pipe(filter(w => typeof w !== 'undefined'))
2092
+ .subscribe((res) => this.btnCallback(record, btn, res));
2093
+ return;
2094
+ }
2095
+ else if (btn.type === 'drawer') {
2096
+ const { drawer } = btn;
2097
+ const obj = { [drawer.paramsName]: record };
2098
+ this.drawerHelper
2099
+ .create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), deepMergeKey({}, true, this.stComp['cog'].drawer, drawer))
2100
+ .pipe(filter(w => typeof w !== 'undefined'))
2101
+ .subscribe(res => this.btnCallback(record, btn, res));
2102
+ return;
2103
+ }
2104
+ else if (btn.type === 'link') {
2105
+ const clickRes = this.btnCallback(record, btn);
2106
+ if (typeof clickRes === 'string') {
2107
+ this.router.navigateByUrl(clickRes, { state: this.routerState });
2108
+ }
2109
+ return;
2110
+ }
2111
+ this.btnCallback(record, btn);
2112
+ }
2113
+ btnCallback(record, btn, modal) {
2114
+ if (!btn.click)
2115
+ return;
2116
+ if (typeof btn.click === 'string') {
2117
+ switch (btn.click) {
2118
+ case 'load':
2119
+ this.stComp.load();
2120
+ break;
2121
+ case 'reload':
2122
+ this.stComp.reload();
2123
+ break;
2124
+ }
2125
+ }
2126
+ else {
2127
+ return btn.click(record, modal, this.stComp);
2128
+ }
2129
+ }
2130
+ }
2131
+ STTdComponent.decorators = [
2132
+ { type: Component, args: [{
2133
+ selector: 'st-td',
2134
+ template: `
2135
+ <ng-template #btnTpl let-i>
2136
+ <ng-container *ngIf="!i.tooltip">
2137
+ <ng-template [ngTemplateOutlet]="btnItemTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2138
+ </ng-container>
2139
+ <span *ngIf="i.tooltip" nz-tooltip [nzTooltipTitle]="i.tooltip">
2140
+ <ng-template [ngTemplateOutlet]="btnItemTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2141
+ </span>
2142
+ </ng-template>
2143
+ <ng-template #btnItemTpl let-i>
2144
+ <a
2145
+ *ngIf="i.pop"
2146
+ nz-popconfirm
2147
+ [nzPopconfirmTitle]="i.pop.title"
2148
+ [nzIcon]="i.pop.icon"
2149
+ [nzCondition]="i.pop.condition(i)"
2150
+ [nzCancelText]="i.pop.cancelText"
2151
+ [nzOkText]="i.pop.okText"
2152
+ [nzOkType]="i.pop.okType"
2153
+ (nzOnConfirm)="_btn(i)"
2154
+ class="st__btn-text"
2155
+ [ngClass]="i.className"
2156
+ (click)="_stopPropagation($event)"
2157
+ >
2158
+ <ng-template [ngTemplateOutlet]="btnTextTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2159
+ </a>
2160
+ <a *ngIf="!i.pop" (click)="_btn(i, $event)" class="st__btn-text" [ngClass]="i.className">
2161
+ <ng-template [ngTemplateOutlet]="btnTextTpl" [ngTemplateOutletContext]="{ $implicit: i }"></ng-template>
2162
+ </a>
2163
+ </ng-template>
2164
+ <ng-template #btnTextTpl let-i>
2165
+ <ng-container *ngIf="i.icon">
2166
+ <i
2167
+ *ngIf="!i.icon.iconfont"
2168
+ nz-icon
2169
+ [nzType]="i.icon.type"
2170
+ [nzTheme]="i.icon.theme"
2171
+ [nzSpin]="i.icon.spin"
2172
+ [nzTwotoneColor]="i.icon.twoToneColor"
2173
+ ></i>
2174
+ <i *ngIf="i.icon.iconfont" nz-icon [nzIconfont]="i.icon.iconfont"></i>
2175
+ </ng-container>
2176
+ <span [innerHTML]="i._text" [ngClass]="{ 'pl-xs': i.icon }"></span>
2177
+ </ng-template>
2178
+ <ng-template
2179
+ #render
2180
+ [ngTemplateOutlet]="c.__render!"
2181
+ [ngTemplateOutletContext]="{ $implicit: i, index: index, column: c }"
2182
+ ></ng-template>
2183
+ <ng-container *ngIf="!c.__render; else render">
2184
+ <ng-container [ngSwitch]="c.type">
2185
+ <label
2186
+ *ngSwitchCase="'checkbox'"
2187
+ nz-checkbox
2188
+ [nzDisabled]="i.disabled"
2189
+ [ngModel]="i.checked"
2190
+ (ngModelChange)="_checkbox($event)"
2191
+ ></label>
2192
+ <label
2193
+ *ngSwitchCase="'radio'"
2194
+ nz-radio
2195
+ [nzDisabled]="i.disabled"
2196
+ [ngModel]="i.checked"
2197
+ (ngModelChange)="_radio($event)"
2198
+ ></label>
2199
+ <a
2200
+ *ngSwitchCase="'link'"
2201
+ (click)="_link($event)"
2202
+ [innerHTML]="i._values[cIdx]._text"
2203
+ [attr.title]="i._values[cIdx].text"
2204
+ ></a>
2205
+ <ng-container *ngIf="i._values[cIdx].text">
2206
+ <nz-tag *ngSwitchCase="'tag'" [nzColor]="i._values[cIdx].color">
2207
+ <span [innerHTML]="i._values[cIdx]._text"></span>
2208
+ </nz-tag>
2209
+ <nz-badge
2210
+ *ngSwitchCase="'badge'"
2211
+ [nzStatus]="i._values[cIdx].color"
2212
+ [nzText]="i._values[cIdx].text"
2213
+ ></nz-badge>
2214
+ </ng-container>
2215
+ <ng-template *ngSwitchCase="'widget'" st-widget-host [record]="i" [column]="c"></ng-template
2216
+ ><ng-container *ngSwitchDefault>
2217
+ <span
2218
+ *ngIf="c.safeType !== 'text'"
2219
+ [innerHTML]="i._values[cIdx]._text"
2220
+ [attr.title]="c._isTruncate ? i._values[cIdx].text : null"
2221
+ ></span>
2222
+ <span
2223
+ *ngIf="c.safeType === 'text'"
2224
+ [innerText]="i._values[cIdx]._text"
2225
+ [attr.title]="c._isTruncate ? i._values[cIdx].text : null"
2226
+ ></span>
2227
+ </ng-container>
2228
+ </ng-container>
2229
+ <ng-container *ngFor="let btn of i._values[cIdx].buttons; let last = last">
2230
+ <a *ngIf="btn.children!.length > 0" nz-dropdown [nzDropdownMenu]="btnMenu" nzOverlayClassName="st__btn-sub">
2231
+ <span [innerHTML]="btn._text"></span>
2232
+ <i nz-icon nzType="down"></i>
2233
+ </a>
2234
+ <nz-dropdown-menu #btnMenu="nzDropdownMenu">
2235
+ <ul nz-menu>
2236
+ <ng-container *ngFor="let subBtn of btn.children!">
2237
+ <li *ngIf="subBtn.type !== 'divider'" nz-menu-item [class.st__btn-disabled]="subBtn._disabled">
2238
+ <ng-template [ngTemplateOutlet]="btnTpl" [ngTemplateOutletContext]="{ $implicit: subBtn }">
2239
+ </ng-template>
2240
+ </li>
2241
+ <li *ngIf="subBtn.type === 'divider'" nz-menu-divider></li>
2242
+ </ng-container>
2243
+ </ul>
2244
+ </nz-dropdown-menu>
2245
+ <span *ngIf="btn.children!.length === 0" [class.st__btn-disabled]="btn._disabled">
2246
+ <ng-template [ngTemplateOutlet]="btnTpl" [ngTemplateOutletContext]="{ $implicit: btn }"> </ng-template>
2247
+ </span>
2248
+ <nz-divider *ngIf="!last" nzType="vertical"></nz-divider>
2249
+ </ng-container>
2250
+ </ng-container>
2251
+ `,
2252
+ preserveWhitespaces: false,
2253
+ changeDetection: ChangeDetectionStrategy.OnPush,
2254
+ encapsulation: ViewEncapsulation.None
2255
+ },] }
2256
+ ];
2257
+ STTdComponent.ctorParameters = () => [
2258
+ { type: STComponent, decorators: [{ type: Host }] },
2259
+ { type: Router },
2260
+ { type: ModalHelper },
2261
+ { type: DrawerHelper }
2262
+ ];
2263
+ STTdComponent.propDecorators = {
2264
+ c: [{ type: Input }],
2265
+ cIdx: [{ type: Input }],
2266
+ data: [{ type: Input }],
2267
+ i: [{ type: Input }],
2268
+ index: [{ type: Input }],
2269
+ n: [{ type: Output }]
2270
+ };
2271
+
1959
2272
  const COMPONENTS = [STComponent, STRowDirective, STWidgetHostDirective];
1960
2273
  class STModule {
1961
2274
  }
@@ -1978,9 +2291,11 @@ STModule.decorators = [
1978
2291
  NzTagModule,
1979
2292
  NzInputModule,
1980
2293
  NzToolTipModule,
1981
- NzResizableModule
2294
+ NzResizableModule,
2295
+ NzInputNumberModule,
2296
+ NzDatePickerModule
1982
2297
  ],
1983
- declarations: COMPONENTS,
2298
+ declarations: [...COMPONENTS, STFilterComponent, STTdComponent],
1984
2299
  exports: COMPONENTS
1985
2300
  },] }
1986
2301
  ];
@@ -1989,5 +2304,5 @@ STModule.decorators = [
1989
2304
  * Generated bundle index. Do not edit.
1990
2305
  */
1991
2306
 
1992
- export { STColumnSource, STComponent, STDataSource, STExport, STModule, STRowDirective, STWidgetHostDirective, STWidgetRegistry, ST_DEFAULT_CONFIG, STRowSource as ɵa };
2307
+ export { STColumnSource, STComponent, STDataSource, STExport, STModule, STRowDirective, STWidgetHostDirective, STWidgetRegistry, ST_DEFAULT_CONFIG, STRowSource as ɵa, STFilterComponent as ɵb, STTdComponent as ɵc };
1993
2308
  //# sourceMappingURL=table.js.map