@delon/abc 12.4.1 → 12.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/abc.umd.js +1 -1
- package/bundles/autoFocus.umd.js +1 -1
- package/bundles/avatarList.umd.js +1 -1
- package/bundles/count-down.umd.js +1 -1
- package/bundles/datePicker.umd.js +1 -1
- package/bundles/downFile.umd.js +1 -1
- package/bundles/edit.umd.js +1 -1
- package/bundles/ellipsis.umd.js +1 -1
- package/bundles/errorCollect.umd.js +1 -1
- package/bundles/exception.umd.js +1 -1
- package/bundles/footerToolbar.umd.js +1 -1
- package/bundles/fullContent.umd.js +1 -1
- package/bundles/globalFooter.umd.js +1 -1
- package/bundles/grid.umd.js +1 -1
- package/bundles/image.umd.js +1 -1
- package/bundles/let.umd.js +1 -1
- package/bundles/loading.umd.js +1 -1
- package/bundles/lodop.umd.js +1 -1
- package/bundles/media.umd.js +1 -1
- package/bundles/noticeIcon.umd.js +1 -1
- package/bundles/onboarding.umd.js +1 -1
- package/bundles/pageHeader.umd.js +1 -1
- package/bundles/pdf.umd.js +1 -1
- package/bundles/qr.umd.js +1 -1
- package/bundles/quickMenu.umd.js +1 -1
- package/bundles/result.umd.js +1 -1
- package/bundles/reuseTab.umd.js +1 -1
- package/bundles/table.umd.js +16 -12
- package/bundles/table.umd.js.map +1 -1
- package/bundles/tagSelect.umd.js +1 -1
- package/bundles/view.umd.js +1 -1
- package/bundles/xlsx.umd.js +1 -1
- package/bundles/zip.umd.js +1 -1
- package/esm2015/st/st-td.component.js +5 -5
- package/esm2015/st/st.component.js +13 -9
- package/fesm2015/table.js +15 -11
- package/fesm2015/table.js.map +1 -1
- package/onboarding/schema.json +1 -1
- package/package.json +4 -4
- package/st/st-td.component.d.ts +2 -2
- package/st/st.component.d.ts +2 -1
- package/st/table.metadata.json +1 -1
- package/esm2015/st/index.js +0 -2
- package/st/index.d.ts +0 -1
package/fesm2015/table.js
CHANGED
|
@@ -1258,6 +1258,10 @@ class STComponent {
|
|
|
1258
1258
|
this.cdr.detectChanges();
|
|
1259
1259
|
return this;
|
|
1260
1260
|
}
|
|
1261
|
+
refreshData() {
|
|
1262
|
+
this._data = [...this._data];
|
|
1263
|
+
return this.cd();
|
|
1264
|
+
}
|
|
1261
1265
|
renderTotal(total, range) {
|
|
1262
1266
|
return this.totalTpl
|
|
1263
1267
|
? this.totalTpl.replace('{{total}}', total).replace('{{range[0]}}', range[0]).replace('{{range[1]}}', range[1])
|
|
@@ -1516,7 +1520,7 @@ class STComponent {
|
|
|
1516
1520
|
const text = `${this.dataSource.getNoIndex(i, c, idx)}`;
|
|
1517
1521
|
i._values[c.__point] = { text, _text: text, org: idx, safeType: 'text' };
|
|
1518
1522
|
}));
|
|
1519
|
-
return this.
|
|
1523
|
+
return this.refreshData();
|
|
1520
1524
|
}
|
|
1521
1525
|
/**
|
|
1522
1526
|
* Sets the row value for the `index` in the table, like this:
|
|
@@ -1541,8 +1545,7 @@ class STComponent {
|
|
|
1541
1545
|
this.resetColumns({ emitReload: options.emitReload });
|
|
1542
1546
|
return this;
|
|
1543
1547
|
}
|
|
1544
|
-
this.
|
|
1545
|
-
return this;
|
|
1548
|
+
return this.refreshData();
|
|
1546
1549
|
}
|
|
1547
1550
|
// #endregion
|
|
1548
1551
|
// #region sort
|
|
@@ -1590,7 +1593,7 @@ class STComponent {
|
|
|
1590
1593
|
// #region checkbox
|
|
1591
1594
|
/** 清除所有 `checkbox` */
|
|
1592
1595
|
clearCheck() {
|
|
1593
|
-
return this.
|
|
1596
|
+
return this.checkAll(false);
|
|
1594
1597
|
}
|
|
1595
1598
|
_refCheck() {
|
|
1596
1599
|
const validData = this._data.filter(w => !w.disabled);
|
|
@@ -1601,10 +1604,10 @@ class STComponent {
|
|
|
1601
1604
|
this._allCheckedDisabled = this._data.length === this._data.filter(w => w.disabled).length;
|
|
1602
1605
|
return this.cd();
|
|
1603
1606
|
}
|
|
1604
|
-
|
|
1607
|
+
checkAll(checked) {
|
|
1605
1608
|
checked = typeof checked === 'undefined' ? this._allChecked : checked;
|
|
1606
1609
|
this._data.filter(w => !w.disabled).forEach(i => (i.checked = checked));
|
|
1607
|
-
return this._refCheck()._checkNotify();
|
|
1610
|
+
return this._refCheck()._checkNotify().refreshData();
|
|
1608
1611
|
}
|
|
1609
1612
|
_rowSelection(row) {
|
|
1610
1613
|
row.select(this._data);
|
|
@@ -1621,7 +1624,7 @@ class STComponent {
|
|
|
1621
1624
|
clearRadio() {
|
|
1622
1625
|
this._data.filter(w => w.checked).forEach(item => (item.checked = false));
|
|
1623
1626
|
this.changeEmit('radio', null);
|
|
1624
|
-
return this;
|
|
1627
|
+
return this.refreshData();
|
|
1625
1628
|
}
|
|
1626
1629
|
// #endregion
|
|
1627
1630
|
_handleTd(ev) {
|
|
@@ -1631,6 +1634,7 @@ class STComponent {
|
|
|
1631
1634
|
break;
|
|
1632
1635
|
case 'radio':
|
|
1633
1636
|
this.changeEmit('radio', ev.item);
|
|
1637
|
+
this.refreshData();
|
|
1634
1638
|
break;
|
|
1635
1639
|
}
|
|
1636
1640
|
}
|
|
@@ -1780,7 +1784,7 @@ STComponent.decorators = [
|
|
|
1780
1784
|
{ type: Component, args: [{
|
|
1781
1785
|
selector: 'st',
|
|
1782
1786
|
exportAs: 'st',
|
|
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)=\"
|
|
1787
|
+
template: "<ng-template #titleTpl let-i>\n <span [innerHTML]=\"i._text\"></span>\n <small *ngIf=\"i.optional\" class=\"st__head-optional\" [innerHTML]=\"i.optional\"></small>\n <i\n *ngIf=\"i.optionalHelp\"\n class=\"st__head-tip\"\n nz-tooltip\n [nzTooltipTitle]=\"i.optionalHelp\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label\n nz-checkbox\n class=\"st__checkall\"\n [nzDisabled]=\"_allCheckedDisabled\"\n [(ngModel)]=\"_allChecked\"\n [nzIndeterminate]=\"_indeterminate\"\n (ngModelChange)=\"checkAll()\"\n [class.ant-table-selection-select-all-custom]=\"custom\"\n ></label>\n</ng-template>\n<nz-table\n #table\n [nzData]=\"_data\"\n [(nzPageIndex)]=\"pi\"\n (nzPageIndexChange)=\"_change('pi')\"\n [(nzPageSize)]=\"ps\"\n (nzPageSizeChange)=\"_change('ps')\"\n [nzTotal]=\"total\"\n [nzShowPagination]=\"_isPagination\"\n [nzFrontPagination]=\"false\"\n [nzBordered]=\"bordered\"\n [nzSize]=\"size\"\n [nzLoading]=\"_loading\"\n [nzLoadingDelay]=\"loadingDelay\"\n [nzLoadingIndicator]=\"loadingIndicator\"\n [nzTitle]=\"header!\"\n [nzFooter]=\"footer!\"\n [nzScroll]=\"scroll\"\n [nzVirtualItemSize]=\"virtualItemSize\"\n [nzVirtualMaxBufferPx]=\"virtualMaxBufferPx\"\n [nzVirtualMinBufferPx]=\"virtualMinBufferPx\"\n [nzVirtualForTrackBy]=\"virtualForTrackBy\"\n [nzNoResult]=\"noResult!\"\n [nzPageSizeOptions]=\"page.pageSizes!\"\n [nzShowQuickJumper]=\"page.showQuickJumper\"\n [nzShowSizeChanger]=\"page.showSize\"\n [nzPaginationPosition]=\"page.position!\"\n [nzPaginationType]=\"page.type!\"\n [nzItemRender]=\"page.itemRender!\"\n [nzSimple]=\"page.simple\"\n [nzShowTotal]=\"totalTpl\"\n [nzWidthConfig]=\"_widthConfig\"\n (contextmenu)=\"onContextmenu($event)\"\n>\n <thead *ngIf=\"showHeader\">\n <tr *ngFor=\"let row of _headers; let rowFirst = first\">\n <th *ngIf=\"rowFirst && expand\" nzWidth=\"50px\" [rowSpan]=\"_headers.length\"></th>\n <ng-container *ngFor=\"let h of row; let index = index; let last = last\">\n <th\n *let=\"h.column as _c\"\n [colSpan]=\"h.colSpan\"\n [rowSpan]=\"h.rowSpan\"\n [nzWidth]=\"$any(_c).width\"\n [nzLeft]=\"_c._left!\"\n [nzRight]=\"_c._right!\"\n [ngClass]=\"_c.className!\"\n [attr.data-col]=\"_c.indexKey\"\n [attr.data-col-index]=\"index\"\n [nzShowSort]=\"_c._sort.enabled\"\n [nzSortOrder]=\"$any(_c)._sort.default\"\n (nzSortOrderChange)=\"sort(_c, index, $event)\"\n [nzCustomFilter]=\"$any(_c).filter\"\n nz-resizable\n [nzDisabled]=\"last || $any(_c).resizable.disabled\"\n [nzMaxWidth]=\"$any(_c).resizable.maxWidth\"\n [nzMinWidth]=\"$any(_c).resizable.minWidth\"\n [nzBounds]=\"$any(_c).resizable.bounds\"\n [nzPreview]=\"$any(_c).resizable.preview\"\n (nzResizeEnd)=\"colResize($event, _c)\"\n >\n <nz-resize-handle *ngIf=\"$any(!last && !$any(_c).resizable.disabled)\" nzDirection=\"right\">\n <i></i>\n </nz-resize-handle>\n <ng-template\n #renderTitle\n [ngTemplateOutlet]=\"_c.__renderTitle!\"\n [ngTemplateOutletContext]=\"{ $implicit: h.column, index: index }\"\n ></ng-template>\n <ng-container *ngIf=\"!_c.__renderTitle; else renderTitle\">\n <ng-container [ngSwitch]=\"_c.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngIf=\"_c.selections!.length === 0\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: false }\">\n </ng-template>\n </ng-container>\n <div *ngIf=\"_c.selections!.length > 0\" class=\"ant-table-selection\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: true }\">\n </ng-template>\n <div *ngIf=\"_c.selections!.length\" class=\"ant-table-selection-extra\">\n <div\n nz-dropdown\n nzPlacement=\"bottomLeft\"\n [nzDropdownMenu]=\"selectionMenu\"\n class=\"ant-table-selection-down st__checkall-selection\"\n >\n <i nz-icon nzType=\"down\"></i>\n </div>\n </div>\n <nz-dropdown-menu #selectionMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li\n nz-menu-item\n *ngFor=\"let rw of _c.selections\"\n (click)=\"_rowSelection(rw)\"\n [innerHTML]=\"rw.text\"\n ></li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _c.title }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"_c.filter\">\n <st-filter\n nz-th-extra\n [col]=\"h.column\"\n [f]=\"_c.filter\"\n [locale]=\"locale\"\n (n)=\"handleFilterNotify($event)\"\n (handle)=\"_handleFilter(_c, $event)\"\n ></st-filter>\n </ng-container>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody class=\"st__body\">\n <ng-container *ngIf=\"!_loading\">\n <ng-template\n [ngTemplateOutlet]=\"bodyHeader!\"\n [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"\n ></ng-template>\n </ng-container>\n <ng-template #bodyTpl let-i let-index=\"index\">\n <tr\n [attr.data-index]=\"index\"\n (click)=\"_rowClick($event, i, index, false)\"\n (dblclick)=\"_rowClick($event, i, index, true)\"\n [ngClass]=\"i._rowClassName\"\n >\n <td\n *ngIf=\"expand\"\n [nzShowExpand]=\"expand && i.showExpand !== false\"\n [nzExpand]=\"i.expand\"\n (nzExpandChange)=\"_expandChange(i, $event)\"\n (click)=\"_stopPropagation($event)\"\n nzWidth=\"50px\"\n ></td>\n <td\n *ngFor=\"let c of _columns; let cIdx = index\"\n [nzLeft]=\"!!c._left\"\n [nzRight]=\"!!c._right\"\n [attr.data-col-index]=\"cIdx\"\n [ngClass]=\"c._className!\"\n [attr.colspan]=\"c.colSpan\"\n >\n <span *ngIf=\"responsive\" class=\"ant-table-rep__title\">\n <ng-template [ngTemplateOutlet]=\"titleTpl\" [ngTemplateOutletContext]=\"{ $implicit: c.title }\"></ng-template>\n </span>\n <st-td [data]=\"_data\" [i]=\"i\" [index]=\"index\" [c]=\"c\" [cIdx]=\"cIdx\" (n)=\"_handleTd($event)\"></st-td>\n </td>\n </tr>\n <tr [nzExpand]=\"i.expand\">\n <ng-template\n [ngTemplateOutlet]=\"expand\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\"\n ></ng-template>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <ng-container *ngFor=\"let i of _data; let index = index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"virtualScroll\">\n <ng-template nz-virtual-scroll let-i let-index=\"index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!_loading\">\n <ng-template [ngTemplateOutlet]=\"body!\" [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range=\"range\" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n<nz-dropdown-menu #contextmenuTpl=\"nzDropdownMenu\">\n <ul nz-menu class=\"st__contextmenu\">\n <ng-container *ngFor=\"let i of contextmenuList\">\n <li nz-menu-item *ngIf=\"i.children!.length === 0\" (click)=\"i.fn!(i)\" [innerHTML]=\"i.text\"></li>\n <li nz-submenu *ngIf=\"i.children!.length > 0\" [nzTitle]=\"i.text\">\n <ul>\n <li nz-menu-item *ngFor=\"let ci of i.children\" (click)=\"ci.fn!(ci)\" [innerHTML]=\"ci.text\"></li>\n </ul>\n </li>\n </ng-container>\n </ul>\n</nz-dropdown-menu>\n",
|
|
1784
1788
|
providers: [STDataSource, STRowSource, STColumnSource, STExport, DatePipe, YNPipe, DecimalPipe],
|
|
1785
1789
|
host: {
|
|
1786
1790
|
'[class.st]': `true`,
|
|
@@ -2062,9 +2066,9 @@ class STTdComponent {
|
|
|
2062
2066
|
this.i.checked = value;
|
|
2063
2067
|
this.report('checkbox');
|
|
2064
2068
|
}
|
|
2065
|
-
_radio(
|
|
2069
|
+
_radio() {
|
|
2066
2070
|
this.data.filter(w => !w.disabled).forEach(i => (i.checked = false));
|
|
2067
|
-
this.i.checked =
|
|
2071
|
+
this.i.checked = true;
|
|
2068
2072
|
this.report('radio');
|
|
2069
2073
|
}
|
|
2070
2074
|
_link(e) {
|
|
@@ -2194,7 +2198,7 @@ STTdComponent.decorators = [
|
|
|
2194
2198
|
nz-radio
|
|
2195
2199
|
[nzDisabled]="i.disabled"
|
|
2196
2200
|
[ngModel]="i.checked"
|
|
2197
|
-
(ngModelChange)="_radio(
|
|
2201
|
+
(ngModelChange)="_radio()"
|
|
2198
2202
|
></label>
|
|
2199
2203
|
<a
|
|
2200
2204
|
*ngSwitchCase="'link'"
|