@delon/abc 12.3.0 → 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 (81) 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 +236 -139
  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 +1 -1
  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/index.js +2 -0
  46. package/esm2015/st/st-column-source.js +25 -7
  47. package/esm2015/st/st-data-source.js +4 -4
  48. package/esm2015/st/st-filter.component.js +149 -0
  49. package/esm2015/st/st-td.component.js +232 -0
  50. package/esm2015/st/st.component.js +28 -118
  51. package/esm2015/st/st.config.js +1 -2
  52. package/esm2015/st/st.interfaces.js +1 -1
  53. package/esm2015/st/st.module.js +9 -3
  54. package/esm2015/st/st.types.js +1 -1
  55. package/esm2015/st/table.js +3 -1
  56. package/esm2015/xlsx/xlsx.service.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 +436 -130
  66. package/fesm2015/table.js.map +1 -1
  67. package/fesm2015/xlsx.js.map +1 -1
  68. package/fesm2015/zip.js.map +1 -1
  69. package/package.json +4 -4
  70. package/reuse-tab/reuse-tab.component.d.ts +1 -1
  71. package/reuse-tab/reuseTab.metadata.json +1 -1
  72. package/st/index.d.ts +1 -0
  73. package/st/st-filter.component.d.ts +18 -0
  74. package/st/st-td.component.d.ts +27 -0
  75. package/st/st.component.d.ts +8 -23
  76. package/st/st.interfaces.d.ts +57 -3
  77. package/st/st.types.d.ts +6 -0
  78. package/st/style/index.less +8 -0
  79. package/st/table.d.ts +2 -0
  80. package/st/table.metadata.json +1 -1
  81. package/sv/style/index.less +1 -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;
@@ -726,9 +746,9 @@ class STDataSource {
726
746
  }
727
747
  return this.get(result[i], c, i);
728
748
  });
729
- if (rowClassName) {
730
- result[i]._rowClassName = rowClassName(result[i], i);
731
- }
749
+ result[i]._rowClassName = [rowClassName ? rowClassName(result[i], i) : null, result[i].className]
750
+ .filter(w => !!w)
751
+ .join(' ');
732
752
  }
733
753
  return result;
734
754
  }
@@ -1079,7 +1099,6 @@ const ST_DEFAULT_CONFIG = {
1079
1099
  trigger: 'click',
1080
1100
  placement: 'top'
1081
1101
  },
1082
- rowClickTime: 200,
1083
1102
  btnIcon: {
1084
1103
  theme: 'outline',
1085
1104
  spin: false
@@ -1108,13 +1127,10 @@ const ST_DEFAULT_CONFIG = {
1108
1127
  };
1109
1128
 
1110
1129
  class STComponent {
1111
- 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) {
1112
1131
  this.cdr = cdr;
1113
- this.router = router;
1114
1132
  this.el = el;
1115
1133
  this.exportSrv = exportSrv;
1116
- this.modalHelper = modalHelper;
1117
- this.drawerHelper = drawerHelper;
1118
1134
  this.doc = doc;
1119
1135
  this.columnSource = columnSource;
1120
1136
  this.dataSource = dataSource;
@@ -1122,7 +1138,6 @@ class STComponent {
1122
1138
  this.cms = cms;
1123
1139
  this.destroy$ = new Subject();
1124
1140
  this.totalTpl = ``;
1125
- this.rowClickCount = 0;
1126
1141
  this.customWidthConfig = false;
1127
1142
  this._widthConfig = [];
1128
1143
  this.locale = {};
@@ -1146,7 +1161,6 @@ class STComponent {
1146
1161
  this.showHeader = true;
1147
1162
  this.expandRowByClick = false;
1148
1163
  this.expandAccordion = false;
1149
- this.rowClickTime = 200;
1150
1164
  this.responsive = true;
1151
1165
  this.error = new EventEmitter();
1152
1166
  this.change = new EventEmitter();
@@ -1229,10 +1243,6 @@ class STComponent {
1229
1243
  get list() {
1230
1244
  return this._data;
1231
1245
  }
1232
- get routerState() {
1233
- const { pi, ps, total } = this;
1234
- return { pi, ps, total };
1235
- }
1236
1246
  setCog(cog) {
1237
1247
  const copyMultiSort = Object.assign({}, cog.multiSort);
1238
1248
  // Because multiSort.global will affect the result, it should be removed first, and multiSort will be operated again after processing.
@@ -1428,45 +1438,30 @@ class STComponent {
1428
1438
  }
1429
1439
  this.changeEmit(type);
1430
1440
  }
1431
- _click(e, item, col) {
1432
- e.preventDefault();
1433
- e.stopPropagation();
1434
- const res = col.click(item, this);
1435
- if (typeof res === 'string') {
1436
- this.router.navigateByUrl(res, { state: this.routerState });
1437
- }
1438
- return false;
1439
- }
1440
1441
  closeOtherExpand(item) {
1441
1442
  if (this.expandAccordion === false)
1442
1443
  return;
1443
1444
  this._data.filter(i => i !== item).forEach(i => (i.expand = false));
1444
1445
  }
1445
- _rowClick(e, item, index) {
1446
+ _rowClick(e, item, index, dbl) {
1446
1447
  const el = e.target;
1447
1448
  if (el.nodeName === 'INPUT')
1448
1449
  return;
1449
- const { expand, expandRowByClick, rowClickTime } = this;
1450
+ const { expand, expandRowByClick } = this;
1450
1451
  if (!!expand && item.showExpand !== false && expandRowByClick) {
1451
1452
  item.expand = !item.expand;
1452
1453
  this.closeOtherExpand(item);
1453
1454
  this.changeEmit('expand', item);
1454
1455
  return;
1455
1456
  }
1456
- ++this.rowClickCount;
1457
- if (this.rowClickCount !== 1)
1458
- return;
1459
- setTimeout(() => {
1460
- const data = { e, item, index };
1461
- if (this.rowClickCount === 1) {
1462
- this._clickRowClassName(el, item, index);
1463
- this.changeEmit('click', data);
1464
- }
1465
- else {
1466
- this.changeEmit('dblClick', data);
1467
- }
1468
- this.rowClickCount = 0;
1469
- }, 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
+ }
1470
1465
  }
1471
1466
  _clickRowClassName(el, item, index) {
1472
1467
  const cr = this.clickRowClassName;
@@ -1574,31 +1569,23 @@ class STComponent {
1574
1569
  }
1575
1570
  // #endregion
1576
1571
  // #region filter
1577
- handleFilter(col) {
1572
+ _handleFilter(col, confirm) {
1573
+ if (!confirm) {
1574
+ this.columnSource.cleanFilter(col);
1575
+ }
1578
1576
  // 过滤表示一种数据的变化应重置页码为 `1`
1579
1577
  this.pi = 1;
1580
1578
  this.columnSource.updateDefault(col.filter);
1581
1579
  this.loadPageData();
1582
1580
  this.changeEmit('filter', col);
1583
1581
  }
1584
- _filterConfirm(col) {
1585
- this.handleFilter(col);
1586
- }
1587
- _filterRadio(col, item, checked) {
1588
- col.filter.menus.forEach(i => (i.checked = false));
1589
- item.checked = checked;
1590
- }
1591
- _filterClear(col) {
1592
- this.columnSource.cleanFilter(col);
1593
- this.handleFilter(col);
1582
+ handleFilterNotify(value) {
1583
+ this.changeEmit('filterChange', value);
1594
1584
  }
1595
1585
  clearFilter() {
1596
1586
  this._columns.filter(w => w.filter && w.filter.default === true).forEach(col => this.columnSource.cleanFilter(col));
1597
1587
  return this;
1598
1588
  }
1599
- _filterClick($event) {
1600
- $event.stopPropagation();
1601
- }
1602
1589
  // #endregion
1603
1590
  // #region checkbox
1604
1591
  /** 清除所有 `checkbox` */
@@ -1619,10 +1606,6 @@ class STComponent {
1619
1606
  this._data.filter(w => !w.disabled).forEach(i => (i.checked = checked));
1620
1607
  return this._refCheck()._checkNotify();
1621
1608
  }
1622
- _checkSelection(i, value) {
1623
- i.checked = value;
1624
- return this._refCheck()._checkNotify();
1625
- }
1626
1609
  _rowSelection(row) {
1627
1610
  row.select(this._data);
1628
1611
  return this._refCheck()._checkNotify();
@@ -1640,63 +1623,17 @@ class STComponent {
1640
1623
  this.changeEmit('radio', null);
1641
1624
  return this;
1642
1625
  }
1643
- _refRadio(checked, item) {
1644
- // if (item.disabled === true) return;
1645
- this._data.filter(w => !w.disabled).forEach(i => (i.checked = false));
1646
- item.checked = checked;
1647
- this.changeEmit('radio', item);
1648
- return this;
1649
- }
1650
1626
  // #endregion
1651
- // #region buttons
1652
- _btnClick(record, btn, ev) {
1653
- if (ev) {
1654
- ev.stopPropagation();
1655
- }
1656
- if (btn.type === 'modal' || btn.type === 'static') {
1657
- const { modal } = btn;
1658
- const obj = { [modal.paramsName]: record };
1659
- 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))
1660
- .pipe(filter(w => typeof w !== 'undefined'))
1661
- .subscribe((res) => this.btnCallback(record, btn, res));
1662
- return;
1663
- }
1664
- else if (btn.type === 'drawer') {
1665
- const { drawer } = btn;
1666
- const obj = { [drawer.paramsName]: record };
1667
- this.drawerHelper
1668
- .create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), deepMergeKey({}, true, this.cog.drawer, drawer))
1669
- .pipe(filter(w => typeof w !== 'undefined'))
1670
- .subscribe(res => this.btnCallback(record, btn, res));
1671
- return;
1672
- }
1673
- else if (btn.type === 'link') {
1674
- const clickRes = this.btnCallback(record, btn);
1675
- if (typeof clickRes === 'string') {
1676
- this.router.navigateByUrl(clickRes, { state: this.routerState });
1677
- }
1678
- return;
1679
- }
1680
- this.btnCallback(record, btn);
1681
- }
1682
- btnCallback(record, btn, modal) {
1683
- if (!btn.click)
1684
- return;
1685
- if (typeof btn.click === 'string') {
1686
- switch (btn.click) {
1687
- case 'load':
1688
- this.load();
1689
- break;
1690
- case 'reload':
1691
- this.reload();
1692
- break;
1693
- }
1694
- }
1695
- else {
1696
- 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;
1697
1635
  }
1698
1636
  }
1699
- // #endregion
1700
1637
  // #region export
1701
1638
  /**
1702
1639
  * 导出当前页,确保已经注册 `XlsxModule`
@@ -1843,7 +1780,7 @@ STComponent.decorators = [
1843
1780
  { type: Component, args: [{
1844
1781
  selector: 'st',
1845
1782
  exportAs: 'st',
1846
- 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",
1847
1784
  providers: [STDataSource, STRowSource, STColumnSource, STExport, DatePipe, YNPipe, DecimalPipe],
1848
1785
  host: {
1849
1786
  '[class.st]': `true`,
@@ -1861,11 +1798,8 @@ STComponent.decorators = [
1861
1798
  STComponent.ctorParameters = () => [
1862
1799
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ALAIN_I18N_TOKEN,] }] },
1863
1800
  { type: ChangeDetectorRef },
1864
- { type: Router },
1865
1801
  { type: ElementRef },
1866
1802
  { type: STExport },
1867
- { type: ModalHelper },
1868
- { type: DrawerHelper },
1869
1803
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
1870
1804
  { type: STColumnSource },
1871
1805
  { type: STDataSource },
@@ -1907,7 +1841,6 @@ STComponent.propDecorators = {
1907
1841
  expandAccordion: [{ type: Input }],
1908
1842
  expand: [{ type: Input }],
1909
1843
  noResult: [{ type: Input }],
1910
- rowClickTime: [{ type: Input }],
1911
1844
  responsive: [{ type: Input }],
1912
1845
  responsiveHideHeaderFooter: [{ type: Input }],
1913
1846
  error: [{ type: Output }],
@@ -1943,9 +1876,6 @@ __decorate([
1943
1876
  __decorate([
1944
1877
  InputBoolean()
1945
1878
  ], STComponent.prototype, "expandAccordion", void 0);
1946
- __decorate([
1947
- InputNumber()
1948
- ], STComponent.prototype, "rowClickTime", void 0);
1949
1879
  __decorate([
1950
1880
  InputBoolean()
1951
1881
  ], STComponent.prototype, "responsive", void 0);
@@ -1965,6 +1895,380 @@ __decorate([
1965
1895
  InputNumber()
1966
1896
  ], STComponent.prototype, "virtualMinBufferPx", void 0);
1967
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
+
1968
2272
  const COMPONENTS = [STComponent, STRowDirective, STWidgetHostDirective];
1969
2273
  class STModule {
1970
2274
  }
@@ -1987,9 +2291,11 @@ STModule.decorators = [
1987
2291
  NzTagModule,
1988
2292
  NzInputModule,
1989
2293
  NzToolTipModule,
1990
- NzResizableModule
2294
+ NzResizableModule,
2295
+ NzInputNumberModule,
2296
+ NzDatePickerModule
1991
2297
  ],
1992
- declarations: COMPONENTS,
2298
+ declarations: [...COMPONENTS, STFilterComponent, STTdComponent],
1993
2299
  exports: COMPONENTS
1994
2300
  },] }
1995
2301
  ];
@@ -1998,5 +2304,5 @@ STModule.decorators = [
1998
2304
  * Generated bundle index. Do not edit.
1999
2305
  */
2000
2306
 
2001
- 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 };
2002
2308
  //# sourceMappingURL=table.js.map