ngx-axis-appforge 0.0.81 → 0.0.83
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/axis-components/edit-table/index.d.ts +2 -5
- package/axis-components/table/index.d.ts +6 -8
- package/axis-components/table-helper/index.d.ts +24 -0
- package/axis-components/transfer/index.d.ts +2 -0
- package/core/index.d.ts +7 -3
- package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs +9 -9
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +21 -21
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown-design.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-echarts-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-echarts-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-echarts.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-echarts.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs +10 -12
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +7 -10
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-editor-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-editor-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-input.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-menu-design.mjs +13 -13
- package/fesm2022/ngx-axis-appforge-axis-components-menu-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-menu.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-menu.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs +7 -7
- package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-radio-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-radio-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-radio.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-rate-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-rate-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-rate.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-rate.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs +12 -12
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs +9 -9
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-steps-design.mjs +9 -9
- package/fesm2022/ngx-axis-appforge-axis-components-steps-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-steps.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-steps.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-switch-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-switch-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-switch.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-switch.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +17 -29
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs +235 -42
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +74 -36
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tabs-design.mjs +9 -9
- package/fesm2022/ngx-axis-appforge-axis-components-tabs-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tabs.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-text.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-text.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-timer-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-timer-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-timer.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-timer.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-transfer-design.mjs +9 -9
- package/fesm2022/ngx-axis-appforge-axis-components-transfer-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs +9 -7
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +9 -9
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +0 -4
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +263 -145
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-providers.mjs +2 -0
- package/fesm2022/ngx-axis-appforge-providers.mjs.map +1 -1
- package/package.json +211 -209
|
@@ -14,12 +14,12 @@ import * as i4 from 'ng-zorro-antd/modal';
|
|
|
14
14
|
import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
15
15
|
import { moveItemInArray, transferArrayItem, CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
|
|
16
16
|
import { debounceTime, Subject, tap, filter, take, of, map } from 'rxjs';
|
|
17
|
+
import { CommonModule, DatePipe, DecimalPipe, PercentPipe } from '@angular/common';
|
|
17
18
|
import * as i3 from 'ng-zorro-antd/core/transition-patch';
|
|
18
19
|
import * as i3$1 from 'ng-zorro-antd/resizable';
|
|
19
20
|
import { NzResizableModule } from 'ng-zorro-antd/resizable';
|
|
20
21
|
import * as i4$1 from 'ng-zorro-antd/flex';
|
|
21
22
|
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
22
|
-
import { DatePipe, DecimalPipe, PercentPipe } from '@angular/common';
|
|
23
23
|
import * as i1$1 from 'ngx-axis-appforge/axis-components/table-helper';
|
|
24
24
|
import { AXIS_TABLE_SELECT_TOKEN, TableFieldDisplayService, TableService, SelectService, ExpandService, StatisticService } from 'ngx-axis-appforge/axis-components/table-helper';
|
|
25
25
|
import { utils } from 'xlsx-js-style';
|
|
@@ -48,9 +48,6 @@ class TableOptions extends DataOptions {
|
|
|
48
48
|
defaultSelectFirstRow = signal(false, ...(ngDevMode ? [{ debugName: "defaultSelectFirstRow" }] : []));
|
|
49
49
|
showStatistic = signal(false, ...(ngDevMode ? [{ debugName: "showStatistic" }] : []));
|
|
50
50
|
statisticTitle = signal("合计", ...(ngDevMode ? [{ debugName: "statisticTitle" }] : []));
|
|
51
|
-
showSubTotal = signal(false, ...(ngDevMode ? [{ debugName: "showSubTotal" }] : []));
|
|
52
|
-
subTotalTitle = signal("小计", ...(ngDevMode ? [{ debugName: "subTotalTitle" }] : []));
|
|
53
|
-
subTotalGroupLevel = signal(1, ...(ngDevMode ? [{ debugName: "subTotalGroupLevel" }] : []));
|
|
54
51
|
showPagination = signal(true, ...(ngDevMode ? [{ debugName: "showPagination" }] : []));
|
|
55
52
|
virtualScroll = signal(false, ...(ngDevMode ? [{ debugName: "virtualScroll" }] : []));
|
|
56
53
|
virtualItemSize = signal(32, ...(ngDevMode ? [{ debugName: "virtualItemSize" }] : []));
|
|
@@ -89,6 +86,7 @@ class TableFieldOptions {
|
|
|
89
86
|
width = signal(null, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
90
87
|
align = signal("left", ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
91
88
|
freezeMode = signal("none", ...(ngDevMode ? [{ debugName: "freezeMode" }] : []));
|
|
89
|
+
groupAble = signal(false, ...(ngDevMode ? [{ debugName: "groupAble" }] : []));
|
|
92
90
|
groupLevel = signal(null, ...(ngDevMode ? [{ debugName: "groupLevel" }] : []));
|
|
93
91
|
statisticAble = signal(false, ...(ngDevMode ? [{ debugName: "statisticAble" }] : []));
|
|
94
92
|
statisticType = signal("sum", ...(ngDevMode ? [{ debugName: "statisticType" }] : []));
|
|
@@ -99,8 +97,8 @@ class TableFieldOptions {
|
|
|
99
97
|
|
|
100
98
|
class TableSetter {
|
|
101
99
|
constructor() {
|
|
102
|
-
effect(() => this.buildFixAndNotFixColumn());
|
|
103
|
-
effect(() => this.onChange.emit(this.fix()));
|
|
100
|
+
effect(() => this.buildFixAndNotFixColumn(), { debugName: "test" });
|
|
101
|
+
effect(() => this.onChange.emit([...this.fix()]));
|
|
104
102
|
this.sub = this.saveCacheSubject.pipe(debounceTime(200)).subscribe(v => this.saveCache());
|
|
105
103
|
}
|
|
106
104
|
fields = input.required(...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
@@ -114,20 +112,21 @@ class TableSetter {
|
|
|
114
112
|
sub;
|
|
115
113
|
buildFixAndNotFixColumn() {
|
|
116
114
|
this.loadCache();
|
|
115
|
+
const fields = this.fields();
|
|
117
116
|
if (this.cache) {
|
|
118
117
|
const fieldMap = new Map();
|
|
119
|
-
for (const f of
|
|
118
|
+
for (const f of fields) {
|
|
120
119
|
fieldMap.set(f.field(), f);
|
|
121
120
|
if (this.cache.widths.hasOwnProperty(f.field())) {
|
|
122
121
|
f.width.set(this.cache.widths[f.field()]);
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
124
|
this.fix.set(this.cache.fix.filter(f => fieldMap.has(f)).map(f => fieldMap.get(f))
|
|
126
|
-
.concat(
|
|
125
|
+
.concat(fields.filter(f => !this.cache.fix.includes(f.field()) && !this.cache.notFix.includes(f.field()))));
|
|
127
126
|
this.notFix.set(this.cache.notFix.filter(f => fieldMap.has(f)).map(f => fieldMap.get(f)));
|
|
128
127
|
}
|
|
129
128
|
else {
|
|
130
|
-
this.fix.set(
|
|
129
|
+
this.fix.set([...fields]);
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
loadCache() {
|
|
@@ -178,7 +177,7 @@ class TableSetter {
|
|
|
178
177
|
this.saveCacheSubject.next();
|
|
179
178
|
}
|
|
180
179
|
resetDefault() {
|
|
181
|
-
this.fix.set(this.fields());
|
|
180
|
+
this.fix.set([...this.fields()]);
|
|
182
181
|
this.notFix.set([]);
|
|
183
182
|
if (this.cacheKey()) {
|
|
184
183
|
localStorage.removeItem(this.cacheKey());
|
|
@@ -188,23 +187,21 @@ class TableSetter {
|
|
|
188
187
|
this.sub?.unsubscribe();
|
|
189
188
|
this.saveCacheSubject.unsubscribe();
|
|
190
189
|
}
|
|
191
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableSetter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TableSetter, isStandalone: true, selector: "axis-table-setter", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, cacheKey: { classPropertyName: "cacheKey", publicName: "cacheKey", isSignal: true, isRequired: false, transformFunction: null }, modalVisible: { classPropertyName: "modalVisible", publicName: "modalVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", modalVisible: "modalVisibleChange" }, ngImport: i0, template: "<a nz-button nzType=\"link\" nzSize=\"small\" (click)=\"modalVisible.set(true)\"\n style=\"margin: 2px;\">\n <nz-icon nzType=\"setting\" nzTheme=\"outline\" />\n</a>\n<nz-modal [(nzVisible)]=\"modalVisible\" nzTitle=\"\u8868\u5934\u8BBE\u7F6E\" nzDraggable [nzOkText]=\"null\" nzCancelText=\"\u5173\u95ED\"\n (nzOnCancel)=\"modalVisible.set(false)\">\n <ng-container *nzModalContent>\n <div nz-row [nzGutter]=\"24\">\n <div nz-col class=\"gutter-row\" [nzSpan]=\"12\">\n <div class=\"container\">\n <p>\u5C55\u793A\u5B57\u6BB5<a nz-button nzType=\"link\" (click)=\"resetDefault()\">\u6062\u590D\u9ED8\u8BA4</a></p>\n <div cdkDropList #todoList=\"cdkDropList\" [cdkDropListData]=\"fix()\"\n [cdkDropListConnectedTo]=\"[doneList]\" class=\"list\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of fix(); track item.field(); let i = $index) {\n <div class=\"box\" cdkDrag>\n {{ item.title() }}\n <nz-icon nzType=\"minus-circle\" nzTheme=\"outline\" (click)=\"deleteCustom(i)\" />\n </div>\n }\n </div>\n </div>\n </div>\n <div nz-col class=\"gutter-row\" [nzSpan]=\"12\">\n <div class=\"container\">\n <p>\u9690\u85CF\u5B57\u6BB5</p>\n <div cdkDropList #doneList=\"cdkDropList\" [cdkDropListData]=\"notFix()\"\n [cdkDropListConnectedTo]=\"[todoList]\" class=\"list\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of notFix(); track item.field(); let i = $index) {\n <div class=\"box\" cdkDrag>\n {{ item.title() }}\n <nz-icon nzType=\"plus-circle\" nzTheme=\"outline\" (click)=\"addCustom(i)\" />\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</nz-modal>", styles: [".container{height:350px;display:flex;flex-direction:column}.list{min-height:60px;border-radius:4px;overflow-x:hidden;overflow-y:auto;display:block;border:1px dashed #ccc;flex:1 1 auto}.list>.box{cursor:move}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list.cdk-drop-list-dragging .box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.box{display:flex;flex-direction:row;justify-content:space-between;align-items:center;box-sizing:border-box;margin:4px;padding:4px 8px;background-color:#0070cc26}.box span{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i4.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i4.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i5.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i5.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
193
192
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableSetter, decorators: [{
|
|
195
194
|
type: Component,
|
|
196
|
-
args: [{ selector: 'axis-table-setter', imports: [NzIconModule, NzButtonModule, NzModalModule, NzGridModule, CdkDrag, CdkDropList], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a nz-button nzType=\"link\" nzSize=\"small\" (click)=\"modalVisible.set(true)\"
|
|
197
|
-
}], ctorParameters: () => [] });
|
|
195
|
+
args: [{ selector: 'axis-table-setter', imports: [NzIconModule, NzButtonModule, NzModalModule, NzGridModule, CdkDrag, CdkDropList, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a nz-button nzType=\"link\" nzSize=\"small\" (click)=\"modalVisible.set(true)\"\n style=\"margin: 2px;\">\n <nz-icon nzType=\"setting\" nzTheme=\"outline\" />\n</a>\n<nz-modal [(nzVisible)]=\"modalVisible\" nzTitle=\"\u8868\u5934\u8BBE\u7F6E\" nzDraggable [nzOkText]=\"null\" nzCancelText=\"\u5173\u95ED\"\n (nzOnCancel)=\"modalVisible.set(false)\">\n <ng-container *nzModalContent>\n <div nz-row [nzGutter]=\"24\">\n <div nz-col class=\"gutter-row\" [nzSpan]=\"12\">\n <div class=\"container\">\n <p>\u5C55\u793A\u5B57\u6BB5<a nz-button nzType=\"link\" (click)=\"resetDefault()\">\u6062\u590D\u9ED8\u8BA4</a></p>\n <div cdkDropList #todoList=\"cdkDropList\" [cdkDropListData]=\"fix()\"\n [cdkDropListConnectedTo]=\"[doneList]\" class=\"list\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of fix(); track item.field(); let i = $index) {\n <div class=\"box\" cdkDrag>\n {{ item.title() }}\n <nz-icon nzType=\"minus-circle\" nzTheme=\"outline\" (click)=\"deleteCustom(i)\" />\n </div>\n }\n </div>\n </div>\n </div>\n <div nz-col class=\"gutter-row\" [nzSpan]=\"12\">\n <div class=\"container\">\n <p>\u9690\u85CF\u5B57\u6BB5</p>\n <div cdkDropList #doneList=\"cdkDropList\" [cdkDropListData]=\"notFix()\"\n [cdkDropListConnectedTo]=\"[todoList]\" class=\"list\" (cdkDropListDropped)=\"drop($event)\">\n @for (item of notFix(); track item.field(); let i = $index) {\n <div class=\"box\" cdkDrag>\n {{ item.title() }}\n <nz-icon nzType=\"plus-circle\" nzTheme=\"outline\" (click)=\"addCustom(i)\" />\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</nz-modal>", styles: [".container{height:350px;display:flex;flex-direction:column}.list{min-height:60px;border-radius:4px;overflow-x:hidden;overflow-y:auto;display:block;border:1px dashed #ccc;flex:1 1 auto}.list>.box{cursor:move}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list.cdk-drop-list-dragging .box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.box{display:flex;flex-direction:row;justify-content:space-between;align-items:center;box-sizing:border-box;margin:4px;padding:4px 8px;background-color:#0070cc26}.box span{cursor:pointer}\n"] }]
|
|
196
|
+
}], ctorParameters: () => [], propDecorators: { fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: true }] }], cacheKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "cacheKey", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], modalVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalVisible", required: false }] }, { type: i0.Output, args: ["modalVisibleChange"] }] } });
|
|
198
197
|
|
|
199
198
|
class Table extends Base {
|
|
200
|
-
elementRef;
|
|
201
199
|
tableFieldDisplayService;
|
|
202
200
|
tableSvc;
|
|
203
201
|
expand;
|
|
204
202
|
statistic;
|
|
205
|
-
constructor(
|
|
203
|
+
constructor(tableFieldDisplayService, tableSvc, select, expand, statistic, parentSelect) {
|
|
206
204
|
super();
|
|
207
|
-
this.elementRef = elementRef;
|
|
208
205
|
this.tableFieldDisplayService = tableFieldDisplayService;
|
|
209
206
|
this.tableSvc = tableSvc;
|
|
210
207
|
this.expand = expand;
|
|
@@ -220,7 +217,7 @@ class Table extends Base {
|
|
|
220
217
|
}
|
|
221
218
|
this.select.init({ options: this.options, keyField: this.options.keyField(), data: this.options.data, onSelectedChange: () => this.onSelectedChange(), parent: parentSelect, scope: this.getScope(), registToParent: true });
|
|
222
219
|
this.expand.init({ options: this.options, keyField: this.options.keyField(), data: this.options.data });
|
|
223
|
-
this.statistic.init({ options: this.options, data: this.options.data, fields: this.fields });
|
|
220
|
+
this.statistic.init({ options: this.options, data: this.options.data, fields: this.fields, tableSvc: this.tableSvc });
|
|
224
221
|
});
|
|
225
222
|
effect(() => {
|
|
226
223
|
let i = 0;
|
|
@@ -228,17 +225,17 @@ class Table extends Base {
|
|
|
228
225
|
this.options.fields().forEach((f) => {
|
|
229
226
|
if (f.loop) {
|
|
230
227
|
for (const item of this.loopFieldMap().get(f.field)()) {
|
|
231
|
-
loopFieldDataMap.set(this.
|
|
228
|
+
loopFieldDataMap.set(this.oriFields()[i], item);
|
|
232
229
|
if (f.fieldFunForLoop) {
|
|
233
230
|
f = copy(f);
|
|
234
231
|
f.field = this.getScope()?.runFnWithSnapshot(f.fieldFunForLoop, { loopRow: item });
|
|
235
232
|
}
|
|
236
|
-
this.bindWithConfig(f, { options: this.
|
|
233
|
+
this.bindWithConfig(f, { options: this.oriFields()[i], tag: `bindField.${i}`, tempDataSource: { loopRow: item } });
|
|
237
234
|
i++;
|
|
238
235
|
}
|
|
239
236
|
}
|
|
240
237
|
else {
|
|
241
|
-
this.bindWithConfig(f, { options: this.
|
|
238
|
+
this.bindWithConfig(f, { options: this.oriFields()[i], tag: `bindField.${i}` });
|
|
242
239
|
i++;
|
|
243
240
|
}
|
|
244
241
|
});
|
|
@@ -279,6 +276,7 @@ class Table extends Base {
|
|
|
279
276
|
options = new TableOptions();
|
|
280
277
|
select;
|
|
281
278
|
scroll = signal({ x: "", y: "" }, ...(ngDevMode ? [{ debugName: "scroll" }] : []));
|
|
279
|
+
oriFields = computed(() => this.buildOriFields(), ...(ngDevMode ? [{ debugName: "oriFields" }] : []));
|
|
282
280
|
fields = computed(() => this.buildFields(), ...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
283
281
|
rowActions = computed(() => this.actionsFieldWidth() > 0 ? this.options.rowActions() : [], ...(ngDevMode ? [{ debugName: "rowActions" }] : []));
|
|
284
282
|
actionsFieldWidth = computed(() => this.buildActionsFieldWidth(), ...(ngDevMode ? [{ debugName: "actionsFieldWidth" }] : []));
|
|
@@ -319,7 +317,7 @@ class Table extends Base {
|
|
|
319
317
|
trackByKeyField = (i, data) => {
|
|
320
318
|
return data[this.options.keyField()];
|
|
321
319
|
};
|
|
322
|
-
|
|
320
|
+
buildOriFields() {
|
|
323
321
|
const fields = [];
|
|
324
322
|
this.options.fields().forEach(f => {
|
|
325
323
|
if (f.loop) {
|
|
@@ -333,6 +331,9 @@ class Table extends Base {
|
|
|
333
331
|
});
|
|
334
332
|
return fields;
|
|
335
333
|
}
|
|
334
|
+
buildFields() {
|
|
335
|
+
return this.options.showTableTitleSet() ? this.fixFields() : this.oriFields();
|
|
336
|
+
}
|
|
336
337
|
buildActionsFieldWidth() {
|
|
337
338
|
if (this.options.actionsFieldWidth() == 0 || this.options.rowActions().length == 0) {
|
|
338
339
|
return 0;
|
|
@@ -397,11 +398,8 @@ class Table extends Base {
|
|
|
397
398
|
this.backendPageParamsChange.next();
|
|
398
399
|
}
|
|
399
400
|
sortChange() {
|
|
400
|
-
this.tableSvc.clearCursorMarks();
|
|
401
401
|
this.backendPageParamsChange.next();
|
|
402
|
-
|
|
403
|
-
rowspan(field, index) {
|
|
404
|
-
return 1;
|
|
402
|
+
this.tableSvc.sortChange();
|
|
405
403
|
}
|
|
406
404
|
onSelectedChange() {
|
|
407
405
|
if (this.hasEventHandler("onSelectedChange")) {
|
|
@@ -428,10 +426,24 @@ class Table extends Base {
|
|
|
428
426
|
dataObs = of(copy(this.options.data().rows, true));
|
|
429
427
|
}
|
|
430
428
|
else {
|
|
431
|
-
dataObs = of(copy(this.
|
|
429
|
+
dataObs = of(copy(this.tableSvc.tableData(), true));
|
|
432
430
|
}
|
|
433
431
|
return dataObs.pipe(map(data => {
|
|
434
|
-
|
|
432
|
+
const insertDatas = [];
|
|
433
|
+
for (let i = 0; i < data.length; i++) {
|
|
434
|
+
const row = data[i];
|
|
435
|
+
if (this.tableSvc.isGroupEnd(i, row)) {
|
|
436
|
+
const insertRow = this.statistic.statisticGroupMap()[this.tableSvc.getGroupValue(row)];
|
|
437
|
+
const groupField = this.tableSvc.groupAbleFields()[0];
|
|
438
|
+
if (groupField.field() == fields[0].field()) {
|
|
439
|
+
insertRow[groupField.field()] = `${row[groupField.field()]}(${this.options.statisticTitle()})`;
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
insertRow[fields[0].field()] = this.options.statisticTitle();
|
|
443
|
+
insertRow[groupField.field()] = row[groupField.field()];
|
|
444
|
+
}
|
|
445
|
+
insertDatas.unshift({ index: i + 1, row: insertRow });
|
|
446
|
+
}
|
|
435
447
|
for (const field of fields) {
|
|
436
448
|
let loopRow;
|
|
437
449
|
if (this.loopFieldDataMap().has(field)) {
|
|
@@ -450,12 +462,38 @@ class Table extends Base {
|
|
|
450
462
|
}
|
|
451
463
|
}
|
|
452
464
|
}
|
|
465
|
+
for (const r of insertDatas) {
|
|
466
|
+
data.splice(r.index, 0, r.row);
|
|
467
|
+
}
|
|
453
468
|
const headerRow = {};
|
|
454
469
|
for (const field of fields) {
|
|
455
470
|
headerRow[field.field()] = field.title();
|
|
456
471
|
}
|
|
457
472
|
data.unshift(headerRow);
|
|
458
|
-
|
|
473
|
+
if (this.options.showStatistic()) {
|
|
474
|
+
const statisticRow = { ...this.statistic.statisticMap() };
|
|
475
|
+
if (fields.length && !fields[0].statisticAble()) {
|
|
476
|
+
statisticRow[fields[0].field()] = this.options.statisticTitle();
|
|
477
|
+
}
|
|
478
|
+
data.push(statisticRow);
|
|
479
|
+
}
|
|
480
|
+
const ws = utils.json_to_sheet(data, { header: fields.map(f => f.field()), skipHeader: true });
|
|
481
|
+
const merges = [];
|
|
482
|
+
for (const [field, group] of this.tableSvc.rowsGroupMap()) {
|
|
483
|
+
const c = fields.findIndex(f => f.field() == field);
|
|
484
|
+
for (const indexs of group.values()) {
|
|
485
|
+
let offset = 0;
|
|
486
|
+
for (let i = insertDatas.length - 1; i >= 0; i--) {
|
|
487
|
+
if (indexs[indexs.length - 1] < insertDatas[i].index) {
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
offset++;
|
|
491
|
+
}
|
|
492
|
+
merges.push({ s: { c, r: indexs[0] + 1 + offset }, e: { c, r: indexs[indexs.length - 1] + 1 + offset } });
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
ws['!merges'] = merges;
|
|
496
|
+
return ws;
|
|
459
497
|
}));
|
|
460
498
|
}
|
|
461
499
|
onEvents(e) {
|
|
@@ -475,23 +513,23 @@ class Table extends Base {
|
|
|
475
513
|
this.select.close();
|
|
476
514
|
clearInterval(this.timer);
|
|
477
515
|
}
|
|
478
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
479
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
516
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Table, deps: [{ token: i1$1.TableFieldDisplayService }, { token: i1$1.TableService }, { token: i1$1.SelectService }, { token: i1$1.ExpandService }, { token: i1$1.StatisticService }, { token: AXIS_TABLE_SELECT_TOKEN, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
517
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: Table, isStandalone: true, selector: "axis-table", providers: [DatePipe, DecimalPipe, PercentPipe, TableFieldDisplayService, TableService, SelectService, ExpandService, StatisticService,
|
|
480
518
|
{
|
|
481
519
|
provide: AXIS_TABLE_SELECT_TOKEN,
|
|
482
520
|
useExisting: SelectService,
|
|
483
521
|
},
|
|
484
|
-
], viewQueries: [{ propertyName: "tableSetter", first: true, predicate: TableSetter, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (options.showTableTitleSet()) {\n<axis-table-setter [fields]=\"fields()\" [cacheKey]=\"options.tableSetCacheKey()\"\n (onChange)=\"fixFields.set($event)\"></axis-table-setter>\n}\n<nz-table #table [nzSize]=\"options.size()\" [nzData]=\"tableSvc.rows()??[]\" [nzLoading]=\"!options.data()\"\n [nzBordered]=\"options.bordered()\" [nzOuterBordered]=\"options.outerBordered()\"\n [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination() && !options.useBackEndPaging()\" [nzTotal]=\"tableSvc.rowtotal()\"\n [(nzPageSize)]=\"options.pageSize\" [nzShowSizeChanger]=\"options.showSizeChanger()\"\n [nzPageSizeOptions]=\"tableSvc.pageSizeOptions()\" [nzShowTotal]=\"options.showDataSize()?totalRange:null\"\n [nzScroll]=\"scroll()\" (nzPageIndexChange)=\"onPageIndexChange()\" (nzPageSizeChange)=\"onPageSizeChange()\"\n [(nzPageIndex)]=\"tableSvc.pageIndex\" [nzVirtualItemSize]=\"options.virtualItemSize()\"\n [nzVirtualForTrackBy]=\"trackByKeyField\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if (!options.checkboxLinkageForExpand() && !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\"></th>\n }\n }\n @if (options.showExpand()) {\n <th nzLeft nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()-15+'px'\"></th>\n }\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of tableSvc.displayFields(); track f.field()) {\n <th [attr.data-field]=\"f.field()\" nz-resizable nzBounds=\"window\"\n [nzDisabled]=\"!options.showTableTitleSet() || !f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"tableSetter?.onResize(f,$event)\"\n [nzShowSort]=\"f.sortAble()\" [nzSortFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.sortFn\"\n [(nzSortOrder)]=\"f.sortOrder\" [nzSortPriority]=\"f.sortPriority()??false\"\n [nzShowFilter]=\"f.filterAble() && !options.useBackEndPaging()\"\n [nzFilters]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterFn\"\n (nzFilterChange)=\"tableSvc.filterChange(f.field(),$event)\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\"\n (nzSortOrderChange)=\"sortChange()\">\n <span>\n {{f.title()}}\n @if(options.showTableTitleSet()){\n <nz-resize-handle [style.transform]=\"`translateX(${resizeHandleOffsetX(f)}px)`\" nzDirection=\"right\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n }\n </span>\n </th>\n }\n @if (rowActions().length)\n {\n <th nzRight nzAlign=\"center\" [nzWidth]=\"actionsFieldWidth()+'px'\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!options.showPagination() && options.virtualScroll()) {\n <ng-template nz-virtual-scroll let-data let-i=\"index\">\n </ng-template>\n }@else {\n @for (trow of table.data; track options.keyField()?trow[options.keyField()]:trow;let i=$index) {\n @for (data of expand.getListForExpanded(trow); track options.keyField()?data[options.keyField()]:data) {\n <tr (click)=\"rowClick(data)\" [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:data}]\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId().has(data[options.keyField()])\"\n [nzIndeterminate]=\"select.setOfIndeterminateId().has(data[options.keyField()])\"\n [nzDisabled]=\"select.setOfDisabledId().has(data[options.keyField()])\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n @if (options.showExpand()) {\n @if(options.expandMode() == \"tree\" && !expand.nodeMap().get(data[options.keyField()])?.children?.length){\n <td nzLeft></td>\n }@else{\n <td nzLeft [nzExpand]=\"expand.expandedSet.has(data[options.keyField()])\"\n (nzExpandChange)=\"expand.onExpandChange(data[options.keyField()],$event)\"></td>\n }\n }\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of tableSvc.displayFields(); track f.field()) {\n @if (rowspan(f.field(),i)) {\n <td [attr.rowspan]=\"rowspan(f.field(),i)\" [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-field]=\"f.field()\"\n [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n @if (f.child()) {\n @if(loopFieldDataMap().has(f)){\n <ng-container [axisScope]=\"options.id+'.fields.'+f.field()+'.row.loop'\" scopeName=\"\u5217\u5FAA\u73AF\"\n [dataSources]=\"[{name:'loopRow',type:'local',data:loopFieldDataMap().get(f)}]\">\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n </ng-container>\n }@else{\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }\n }@else {\n {{data[f.field()]}}\n }\n </td>\n }\n }\n @if (rowActions().length) {\n <td nzRight>\n <div nz-flex nzJustify=\"space-evenly\" data-rowactions>\n @for (a of rowActions(); track a.id) {\n <ng-container [axisDynamic]=\"a\"></ng-container>\n }\n </div>\n </td>\n }\n </tr>\n }\n @if (options.showExpand() && options.expandMode() == \"custom\") {\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:trow}]\"\n [nzExpand]=\"expand.expandedSet.has(trow[options.keyField()])\" data-expandrow>\n <ng-container [axisDynamic]=\"options.expandRow()\"></ng-container>\n </tr>\n }\n }\n }\n </tbody>\n @if (options.showStatistic()) {\n <tfoot nzSummary>\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:statistic.statisticMap()}]\">\n @if (options.showCheckbox()) {\n <td nzLeft></td>\n }\n @if (options.showExpand()) {\n <td nzLeft></td>\n }\n <td nzAlign=\"right\" [nzLeft]=\"!options.showOrder() && tableSvc.displayFields()[0].freezeMode() == 'left'\"\n [nzRight]=\"!options.showOrder()&& tableSvc.displayFields()[0].freezeMode() == 'right'\">\n <b>{{options.statisticTitle()}}</b>\n </td>\n @for (f of tableSvc.displayFields(); track f.field()) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n @if (f.statisticAble()) {\n <b>\n @if (f.child()) {\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }@else {\n {{statistic.statisticMap()[f.field()]}}\n }\n </b>\n }\n </td>\n }\n @if (rowActions().length) {\n <td nzRight></td>\n }\n </tr>\n </tfoot>\n }\n <ng-template #totalRange let-range=\"range\" let-total>\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n</nz-table>", styles: [":host{display:block;width:100%;overflow:hidden}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}\n"], dependencies: [{ kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i2$1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i2$1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i2$1.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i2$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i2$1.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i2$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i2$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i2$1.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "directive", type: i2$1.NzTableVirtualScrollDirective, selector: "[nz-virtual-scroll]", exportAs: ["nzVirtualScroll"] }, { kind: "directive", type: i2$1.NzCellFixedDirective, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { kind: "directive", type: i2$1.NzTrExpandDirective, selector: "tr[nzExpand]", inputs: ["nzExpand"] }, { kind: "component", type: i2$1.NzTfootSummaryComponent, selector: "tfoot[nzSummary]", inputs: ["nzFixed"] }, { kind: "directive", type: i2$1.NzCellAlignDirective, selector: "th[nzAlign],td[nzAlign]", inputs: ["nzAlign"] }, { kind: "component", type: i2$1.NzTableFixedRowComponent, selector: "tr[nz-table-fixed-row], tr[nzExpand]" }, { kind: "component", type: i2$1.NzThSelectionComponent, selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]", inputs: ["nzSelections", "nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzShowCheckbox", "nzShowRowSelection"], outputs: ["nzCheckedChange"] }, { kind: "directive", type: ScopeDirective, selector: "[axisScope]", inputs: ["axisScope", "scopeName", "isRoot", "dataSources"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TableSetter, selector: "axis-table-setter", inputs: ["fields", "cacheKey", "modalVisible"], outputs: ["onChange", "modalVisibleChange"] }, { kind: "ngmodule", type: NzResizableModule }, { kind: "directive", type: i3$1.NzResizableDirective, selector: "[nz-resizable]", inputs: ["nzBounds", "nzMaxHeight", "nzMaxWidth", "nzMinHeight", "nzMinWidth", "nzGridColumnCount", "nzMaxColumn", "nzMinColumn", "nzLockAspectRatio", "nzPreview", "nzDisabled"], outputs: ["nzResize", "nzResizeEnd", "nzResizeStart"], exportAs: ["nzResizable"] }, { kind: "component", type: i3$1.NzResizeHandleComponent, selector: "nz-resize-handle, [nz-resize-handle]", inputs: ["nzDirection", "nzCursorType"], outputs: ["nzMouseDown"], exportAs: ["nzResizeHandle"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i4$1.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
522
|
+
], viewQueries: [{ propertyName: "tableSetter", first: true, predicate: TableSetter, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (options.showTableTitleSet()) {\n<axis-table-setter [fields]=\"oriFields()\" [cacheKey]=\"options.tableSetCacheKey()\"\n (onChange)=\"fixFields.set($event)\"></axis-table-setter>\n}\n<nz-table #table [nzSize]=\"options.size()\" [nzData]=\"tableSvc.rows()??[]\" [nzLoading]=\"!options.data()\"\n [nzBordered]=\"options.bordered()\" [nzOuterBordered]=\"options.outerBordered()\"\n [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination() && !options.useBackEndPaging()\" [nzTotal]=\"tableSvc.rowtotal()\"\n [(nzPageSize)]=\"options.pageSize\" [nzShowSizeChanger]=\"options.showSizeChanger()\"\n [nzPageSizeOptions]=\"tableSvc.pageSizeOptions()\" [nzShowTotal]=\"options.showDataSize()?totalRange:null\"\n [nzScroll]=\"scroll()\" (nzPageIndexChange)=\"onPageIndexChange()\" (nzPageSizeChange)=\"onPageSizeChange()\"\n [(nzPageIndex)]=\"tableSvc.pageIndex\" [nzVirtualItemSize]=\"options.virtualItemSize()\"\n [nzVirtualForTrackBy]=\"trackByKeyField\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if (!options.checkboxLinkageForExpand() && !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\"></th>\n }\n }\n @if (options.showExpand()) {\n <th nzLeft nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()-15+'px'\"></th>\n }\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of tableSvc.displayFields(); track f.field();let i=$index) {\n <th [attr.data-field]=\"f.field()\" nz-resizable nzBounds=\"window\"\n [nzDisabled]=\"!options.showTableTitleSet() || !f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"tableSetter?.onResize(f,$event)\"\n [nzShowSort]=\"tableSvc.fieldSortAble(f)\" [nzSortDirections]=\"tableSvc.fieldSortDirections(f)\"\n [nzSortFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.sortFn\" [(nzSortOrder)]=\"f.sortOrder\"\n [nzSortPriority]=\"tableSvc.fieldSortPriority(f)\"\n [nzShowFilter]=\"f.filterAble() && !options.useBackEndPaging()\" (nzSortOrderChange)=\"sortChange()\"\n [nzFilters]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterFn\"\n (nzFilterChange)=\"tableSvc.filterChange(f.field(),$event)\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\">\n <span>\n {{f.title()}}\n @if(options.showTableTitleSet()){\n <nz-resize-handle [style.transform]=\"`translateX(${resizeHandleOffsetX(f)}px)`\" nzDirection=\"right\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n }\n </span>\n </th>\n }\n @if (rowActions().length)\n {\n <th nzRight nzAlign=\"center\" [nzWidth]=\"actionsFieldWidth()+'px'\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!options.showPagination() && options.virtualScroll()) {\n <ng-template nz-virtual-scroll let-data let-i=\"index\">\n </ng-template>\n }@else {\n @for (trow of table.data; track options.keyField()?trow[options.keyField()]:trow;let i=$index) {\n @for (data of expand.getListForExpanded(trow); track options.keyField()?data[options.keyField()]:data) {\n <tr (click)=\"rowClick(data)\" [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:data}]\"\n [class.checkedRow]=\"select.setOfCheckedId().has(data[options.keyField()])\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId().has(data[options.keyField()])\"\n [nzIndeterminate]=\"select.setOfIndeterminateId().has(data[options.keyField()])\"\n [nzDisabled]=\"select.setOfDisabledId().has(data[options.keyField()])\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n @if (options.showExpand()) {\n @if(options.expandMode() == \"tree\" && !expand.nodeMap().get(data[options.keyField()])?.children?.length){\n <td nzLeft></td>\n }@else{\n <td nzLeft [nzExpand]=\"expand.expandedSet.has(data[options.keyField()])\"\n (nzExpandChange)=\"expand.onExpandChange(data[options.keyField()],$event)\"></td>\n }\n }\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of tableSvc.displayFields(); track f.field()) {\n <td [attr.rowspan]=\"tableSvc.rowspan(f,i,table.nzPageIndex,table.nzPageSize,data)\"\n [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-field]=\"f.field()\" [nzRight]=\"f.freezeMode()=='right'\"\n [nzAlign]=\"f.align()\">\n @if (f.child()) {\n @if(loopFieldDataMap().has(f)){\n <ng-container [axisScope]=\"options.id+'.fields.'+f.field()+'.row.loop'\" scopeName=\"\u5217\u5FAA\u73AF\"\n [dataSources]=\"[{name:'loopRow',type:'local',data:loopFieldDataMap().get(f)}]\">\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n </ng-container>\n }@else{\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }\n }@else {\n {{data[f.field()]}}\n }\n </td>\n }\n @if (rowActions().length) {\n <td nzRight>\n <div nz-flex nzJustify=\"space-evenly\" data-rowactions>\n @for (a of rowActions(); track a.id) {\n <ng-container [axisDynamic]=\"a\"></ng-container>\n }\n </div>\n </td>\n }\n </tr>\n @if (options.showStatistic() && tableSvc.isGroupEnd(i+(table.nzPageIndex-1)*table.nzPageSize,data)) {\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:statistic.statisticGroupMap()[tableSvc.getGroupValue(data)]}]\">\n @if (options.showCheckbox()) {\n <td nzLeft></td>\n }\n @if (options.showExpand()) {\n <td nzLeft></td>\n }\n @if(options.showOrder()){\n <td nzAlign=\"right\">\n {{options.statisticTitle()}}\n </td>\n }\n @for (f of tableSvc.displayFields(); track f.field();let i=$index) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n @if (f.statisticAble()) {\n @if (f.child()) {\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }@else {\n {{statistic.statisticGroupMap()[tableSvc.getGroupValue(data)]?.[f.field()]}}\n }\n }@else if(i==0 && !options.showOrder()){\n @if(tableSvc.groupAbleFields()[0] == f){\n {{data[f.field()]}}({{options.statisticTitle()}})\n }@else{\n {{options.statisticTitle()}}\n }\n }@else if (f.groupAble() && f == tableSvc.groupAbleFields()[0]) {\n {{data[f.field()]}}\n }\n </td>\n }\n @if (rowActions().length) {\n <td nzRight></td>\n }\n </tr>\n }\n }\n @if (options.showExpand() && options.expandMode() == \"custom\") {\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:trow}]\"\n [nzExpand]=\"expand.expandedSet.has(trow[options.keyField()])\" data-expandrow>\n <ng-container [axisDynamic]=\"options.expandRow()\"></ng-container>\n </tr>\n }\n }\n }\n </tbody>\n @if (options.showStatistic()) {\n <tfoot nzSummary>\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:statistic.statisticMap()}]\">\n @if (options.showCheckbox()) {\n <td nzLeft></td>\n }\n @if (options.showExpand()) {\n <td nzLeft></td>\n }\n @if(options.showOrder()){\n <td nzAlign=\"right\">\n <b>{{options.statisticTitle()}}</b>\n </td>\n }\n @for (f of tableSvc.displayFields(); track f.field();let i=$index) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n <b>\n @if (f.statisticAble()) {\n @if (f.child()) {\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }@else {\n {{statistic.statisticMap()[f.field()]}}\n }\n }@else if(i==0 && !options.showOrder()){\n {{options.statisticTitle()}}\n }\n </b>\n </td>\n }\n @if (rowActions().length) {\n <td nzRight></td>\n }\n </tr>\n </tfoot>\n }\n <ng-template #totalRange let-range=\"range\" let-total>\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n</nz-table>", styles: [":host{display:block;width:100%;overflow:hidden}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}td[rowspan=\"0\"]{display:none}.checkedRow>td{background-color:var(--ant-primary-2)}.checkedRow:hover>td{background-color:var(--ant-primary-3)}\n"], dependencies: [{ kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i2$1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i2$1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i2$1.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i2$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i2$1.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i2$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i2$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i2$1.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "directive", type: i2$1.NzTableVirtualScrollDirective, selector: "[nz-virtual-scroll]", exportAs: ["nzVirtualScroll"] }, { kind: "directive", type: i2$1.NzCellFixedDirective, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { kind: "directive", type: i2$1.NzTrExpandDirective, selector: "tr[nzExpand]", inputs: ["nzExpand"] }, { kind: "component", type: i2$1.NzTfootSummaryComponent, selector: "tfoot[nzSummary]", inputs: ["nzFixed"] }, { kind: "directive", type: i2$1.NzCellAlignDirective, selector: "th[nzAlign],td[nzAlign]", inputs: ["nzAlign"] }, { kind: "component", type: i2$1.NzTableFixedRowComponent, selector: "tr[nz-table-fixed-row], tr[nzExpand]" }, { kind: "component", type: i2$1.NzThSelectionComponent, selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]", inputs: ["nzSelections", "nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzShowCheckbox", "nzShowRowSelection"], outputs: ["nzCheckedChange"] }, { kind: "directive", type: ScopeDirective, selector: "[axisScope]", inputs: ["axisScope", "scopeName", "isRoot", "dataSources"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TableSetter, selector: "axis-table-setter", inputs: ["fields", "cacheKey", "modalVisible"], outputs: ["onChange", "modalVisibleChange"] }, { kind: "ngmodule", type: NzResizableModule }, { kind: "directive", type: i3$1.NzResizableDirective, selector: "[nz-resizable]", inputs: ["nzBounds", "nzMaxHeight", "nzMaxWidth", "nzMinHeight", "nzMinWidth", "nzGridColumnCount", "nzMaxColumn", "nzMinColumn", "nzLockAspectRatio", "nzPreview", "nzDisabled"], outputs: ["nzResize", "nzResizeEnd", "nzResizeStart"], exportAs: ["nzResizable"] }, { kind: "component", type: i3$1.NzResizeHandleComponent, selector: "nz-resize-handle, [nz-resize-handle]", inputs: ["nzDirection", "nzCursorType"], outputs: ["nzMouseDown"], exportAs: ["nzResizeHandle"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i4$1.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
485
523
|
}
|
|
486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Table, decorators: [{
|
|
487
525
|
type: Component,
|
|
488
526
|
args: [{ selector: 'axis-table', imports: [NzTableModule, ScopeDirective, DynamicDirective, FormsModule, TableSetter, NzResizableModule, NzFlexModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [DatePipe, DecimalPipe, PercentPipe, TableFieldDisplayService, TableService, SelectService, ExpandService, StatisticService,
|
|
489
527
|
{
|
|
490
528
|
provide: AXIS_TABLE_SELECT_TOKEN,
|
|
491
529
|
useExisting: SelectService,
|
|
492
530
|
},
|
|
493
|
-
], template: "@if (options.showTableTitleSet()) {\n<axis-table-setter [fields]=\"fields()\" [cacheKey]=\"options.tableSetCacheKey()\"\n (onChange)=\"fixFields.set($event)\"></axis-table-setter>\n}\n<nz-table #table [nzSize]=\"options.size()\" [nzData]=\"tableSvc.rows()??[]\" [nzLoading]=\"!options.data()\"\n [nzBordered]=\"options.bordered()\" [nzOuterBordered]=\"options.outerBordered()\"\n [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination() && !options.useBackEndPaging()\" [nzTotal]=\"tableSvc.rowtotal()\"\n [(nzPageSize)]=\"options.pageSize\" [nzShowSizeChanger]=\"options.showSizeChanger()\"\n [nzPageSizeOptions]=\"tableSvc.pageSizeOptions()\" [nzShowTotal]=\"options.showDataSize()?totalRange:null\"\n [nzScroll]=\"scroll()\" (nzPageIndexChange)=\"onPageIndexChange()\" (nzPageSizeChange)=\"onPageSizeChange()\"\n [(nzPageIndex)]=\"tableSvc.pageIndex\" [nzVirtualItemSize]=\"options.virtualItemSize()\"\n [nzVirtualForTrackBy]=\"trackByKeyField\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if (!options.checkboxLinkageForExpand() && !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\"></th>\n }\n }\n @if (options.showExpand()) {\n <th nzLeft nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()-15+'px'\"></th>\n }\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of tableSvc.displayFields(); track f.field()) {\n <th [attr.data-field]=\"f.field()\" nz-resizable nzBounds=\"window\"\n [nzDisabled]=\"!options.showTableTitleSet() || !f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"tableSetter?.onResize(f,$event)\"\n [nzShowSort]=\"f.sortAble()\" [nzSortFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.sortFn\"\n [(nzSortOrder)]=\"f.sortOrder\" [nzSortPriority]=\"f.sortPriority()??false\"\n [nzShowFilter]=\"f.filterAble() && !options.useBackEndPaging()\"\n [nzFilters]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterFn\"\n (nzFilterChange)=\"tableSvc.filterChange(f.field(),$event)\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\"\n (nzSortOrderChange)=\"sortChange()\">\n <span>\n {{f.title()}}\n @if(options.showTableTitleSet()){\n <nz-resize-handle [style.transform]=\"`translateX(${resizeHandleOffsetX(f)}px)`\" nzDirection=\"right\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n }\n </span>\n </th>\n }\n @if (rowActions().length)\n {\n <th nzRight nzAlign=\"center\" [nzWidth]=\"actionsFieldWidth()+'px'\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!options.showPagination() && options.virtualScroll()) {\n <ng-template nz-virtual-scroll let-data let-i=\"index\">\n </ng-template>\n }@else {\n @for (trow of table.data; track options.keyField()?trow[options.keyField()]:trow;let i=$index) {\n @for (data of expand.getListForExpanded(trow); track options.keyField()?data[options.keyField()]:data) {\n <tr (click)=\"rowClick(data)\" [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:data}]\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId().has(data[options.keyField()])\"\n [nzIndeterminate]=\"select.setOfIndeterminateId().has(data[options.keyField()])\"\n [nzDisabled]=\"select.setOfDisabledId().has(data[options.keyField()])\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n @if (options.showExpand()) {\n @if(options.expandMode() == \"tree\" && !expand.nodeMap().get(data[options.keyField()])?.children?.length){\n <td nzLeft></td>\n }@else{\n <td nzLeft [nzExpand]=\"expand.expandedSet.has(data[options.keyField()])\"\n (nzExpandChange)=\"expand.onExpandChange(data[options.keyField()],$event)\"></td>\n }\n }\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of tableSvc.displayFields(); track f.field()) {\n @if (rowspan(f.field(),i)) {\n <td [attr.rowspan]=\"rowspan(f.field(),i)\" [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-field]=\"f.field()\"\n [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n @if (f.child()) {\n @if(loopFieldDataMap().has(f)){\n <ng-container [axisScope]=\"options.id+'.fields.'+f.field()+'.row.loop'\" scopeName=\"\u5217\u5FAA\u73AF\"\n [dataSources]=\"[{name:'loopRow',type:'local',data:loopFieldDataMap().get(f)}]\">\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n </ng-container>\n }@else{\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }\n }@else {\n {{data[f.field()]}}\n }\n </td>\n }\n }\n @if (rowActions().length) {\n <td nzRight>\n <div nz-flex nzJustify=\"space-evenly\" data-rowactions>\n @for (a of rowActions(); track a.id) {\n <ng-container [axisDynamic]=\"a\"></ng-container>\n }\n </div>\n </td>\n }\n </tr>\n }\n @if (options.showExpand() && options.expandMode() == \"custom\") {\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:trow}]\"\n [nzExpand]=\"expand.expandedSet.has(trow[options.keyField()])\" data-expandrow>\n <ng-container [axisDynamic]=\"options.expandRow()\"></ng-container>\n </tr>\n }\n }\n }\n </tbody>\n @if (options.showStatistic()) {\n <tfoot nzSummary>\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:statistic.statisticMap()}]\">\n @if (options.showCheckbox()) {\n <td nzLeft></td>\n }\n @if (options.showExpand()) {\n <td nzLeft></td>\n }\n <td nzAlign=\"right\" [nzLeft]=\"!options.showOrder() && tableSvc.displayFields()[0].freezeMode() == 'left'\"\n [nzRight]=\"!options.showOrder()&& tableSvc.displayFields()[0].freezeMode() == 'right'\">\n <b>{{options.statisticTitle()}}</b>\n </td>\n @for (f of tableSvc.displayFields(); track f.field()) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n @if (f.statisticAble()) {\n <b>\n @if (f.child()) {\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }@else {\n {{statistic.statisticMap()[f.field()]}}\n }\n </b>\n }\n </td>\n }\n @if (rowActions().length) {\n <td nzRight></td>\n }\n </tr>\n </tfoot>\n }\n <ng-template #totalRange let-range=\"range\" let-total>\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n</nz-table>", styles: [":host{display:block;width:100%;overflow:hidden}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}\n"] }]
|
|
494
|
-
}], ctorParameters: () => [{ type:
|
|
531
|
+
], template: "@if (options.showTableTitleSet()) {\n<axis-table-setter [fields]=\"oriFields()\" [cacheKey]=\"options.tableSetCacheKey()\"\n (onChange)=\"fixFields.set($event)\"></axis-table-setter>\n}\n<nz-table #table [nzSize]=\"options.size()\" [nzData]=\"tableSvc.rows()??[]\" [nzLoading]=\"!options.data()\"\n [nzBordered]=\"options.bordered()\" [nzOuterBordered]=\"options.outerBordered()\"\n [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination() && !options.useBackEndPaging()\" [nzTotal]=\"tableSvc.rowtotal()\"\n [(nzPageSize)]=\"options.pageSize\" [nzShowSizeChanger]=\"options.showSizeChanger()\"\n [nzPageSizeOptions]=\"tableSvc.pageSizeOptions()\" [nzShowTotal]=\"options.showDataSize()?totalRange:null\"\n [nzScroll]=\"scroll()\" (nzPageIndexChange)=\"onPageIndexChange()\" (nzPageSizeChange)=\"onPageSizeChange()\"\n [(nzPageIndex)]=\"tableSvc.pageIndex\" [nzVirtualItemSize]=\"options.virtualItemSize()\"\n [nzVirtualForTrackBy]=\"trackByKeyField\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if (!options.checkboxLinkageForExpand() && !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\"></th>\n }\n }\n @if (options.showExpand()) {\n <th nzLeft nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()-15+'px'\"></th>\n }\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of tableSvc.displayFields(); track f.field();let i=$index) {\n <th [attr.data-field]=\"f.field()\" nz-resizable nzBounds=\"window\"\n [nzDisabled]=\"!options.showTableTitleSet() || !f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"tableSetter?.onResize(f,$event)\"\n [nzShowSort]=\"tableSvc.fieldSortAble(f)\" [nzSortDirections]=\"tableSvc.fieldSortDirections(f)\"\n [nzSortFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.sortFn\" [(nzSortOrder)]=\"f.sortOrder\"\n [nzSortPriority]=\"tableSvc.fieldSortPriority(f)\"\n [nzShowFilter]=\"f.filterAble() && !options.useBackEndPaging()\" (nzSortOrderChange)=\"sortChange()\"\n [nzFilters]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterFn\"\n (nzFilterChange)=\"tableSvc.filterChange(f.field(),$event)\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\">\n <span>\n {{f.title()}}\n @if(options.showTableTitleSet()){\n <nz-resize-handle [style.transform]=\"`translateX(${resizeHandleOffsetX(f)}px)`\" nzDirection=\"right\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n }\n </span>\n </th>\n }\n @if (rowActions().length)\n {\n <th nzRight nzAlign=\"center\" [nzWidth]=\"actionsFieldWidth()+'px'\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!options.showPagination() && options.virtualScroll()) {\n <ng-template nz-virtual-scroll let-data let-i=\"index\">\n </ng-template>\n }@else {\n @for (trow of table.data; track options.keyField()?trow[options.keyField()]:trow;let i=$index) {\n @for (data of expand.getListForExpanded(trow); track options.keyField()?data[options.keyField()]:data) {\n <tr (click)=\"rowClick(data)\" [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:data}]\"\n [class.checkedRow]=\"select.setOfCheckedId().has(data[options.keyField()])\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId().has(data[options.keyField()])\"\n [nzIndeterminate]=\"select.setOfIndeterminateId().has(data[options.keyField()])\"\n [nzDisabled]=\"select.setOfDisabledId().has(data[options.keyField()])\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n @if (options.showExpand()) {\n @if(options.expandMode() == \"tree\" && !expand.nodeMap().get(data[options.keyField()])?.children?.length){\n <td nzLeft></td>\n }@else{\n <td nzLeft [nzExpand]=\"expand.expandedSet.has(data[options.keyField()])\"\n (nzExpandChange)=\"expand.onExpandChange(data[options.keyField()],$event)\"></td>\n }\n }\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of tableSvc.displayFields(); track f.field()) {\n <td [attr.rowspan]=\"tableSvc.rowspan(f,i,table.nzPageIndex,table.nzPageSize,data)\"\n [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-field]=\"f.field()\" [nzRight]=\"f.freezeMode()=='right'\"\n [nzAlign]=\"f.align()\">\n @if (f.child()) {\n @if(loopFieldDataMap().has(f)){\n <ng-container [axisScope]=\"options.id+'.fields.'+f.field()+'.row.loop'\" scopeName=\"\u5217\u5FAA\u73AF\"\n [dataSources]=\"[{name:'loopRow',type:'local',data:loopFieldDataMap().get(f)}]\">\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n </ng-container>\n }@else{\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }\n }@else {\n {{data[f.field()]}}\n }\n </td>\n }\n @if (rowActions().length) {\n <td nzRight>\n <div nz-flex nzJustify=\"space-evenly\" data-rowactions>\n @for (a of rowActions(); track a.id) {\n <ng-container [axisDynamic]=\"a\"></ng-container>\n }\n </div>\n </td>\n }\n </tr>\n @if (options.showStatistic() && tableSvc.isGroupEnd(i+(table.nzPageIndex-1)*table.nzPageSize,data)) {\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:statistic.statisticGroupMap()[tableSvc.getGroupValue(data)]}]\">\n @if (options.showCheckbox()) {\n <td nzLeft></td>\n }\n @if (options.showExpand()) {\n <td nzLeft></td>\n }\n @if(options.showOrder()){\n <td nzAlign=\"right\">\n {{options.statisticTitle()}}\n </td>\n }\n @for (f of tableSvc.displayFields(); track f.field();let i=$index) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n @if (f.statisticAble()) {\n @if (f.child()) {\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }@else {\n {{statistic.statisticGroupMap()[tableSvc.getGroupValue(data)]?.[f.field()]}}\n }\n }@else if(i==0 && !options.showOrder()){\n @if(tableSvc.groupAbleFields()[0] == f){\n {{data[f.field()]}}({{options.statisticTitle()}})\n }@else{\n {{options.statisticTitle()}}\n }\n }@else if (f.groupAble() && f == tableSvc.groupAbleFields()[0]) {\n {{data[f.field()]}}\n }\n </td>\n }\n @if (rowActions().length) {\n <td nzRight></td>\n }\n </tr>\n }\n }\n @if (options.showExpand() && options.expandMode() == \"custom\") {\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:trow}]\"\n [nzExpand]=\"expand.expandedSet.has(trow[options.keyField()])\" data-expandrow>\n <ng-container [axisDynamic]=\"options.expandRow()\"></ng-container>\n </tr>\n }\n }\n }\n </tbody>\n @if (options.showStatistic()) {\n <tfoot nzSummary>\n <tr [axisScope]=\"options.id+'.row'\" scopeName=\"\u8868\u683C\u884C\"\n [dataSources]=\"[{name:'row',type:'local',data:statistic.statisticMap()}]\">\n @if (options.showCheckbox()) {\n <td nzLeft></td>\n }\n @if (options.showExpand()) {\n <td nzLeft></td>\n }\n @if(options.showOrder()){\n <td nzAlign=\"right\">\n <b>{{options.statisticTitle()}}</b>\n </td>\n }\n @for (f of tableSvc.displayFields(); track f.field();let i=$index) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\" [nzAlign]=\"f.align()\">\n <b>\n @if (f.statisticAble()) {\n @if (f.child()) {\n <ng-container [axisDynamic]=\"f.child()\"></ng-container>\n }@else {\n {{statistic.statisticMap()[f.field()]}}\n }\n }@else if(i==0 && !options.showOrder()){\n {{options.statisticTitle()}}\n }\n </b>\n </td>\n }\n @if (rowActions().length) {\n <td nzRight></td>\n }\n </tr>\n </tfoot>\n }\n <ng-template #totalRange let-range=\"range\" let-total>\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n</nz-table>", styles: [":host{display:block;width:100%;overflow:hidden}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}td[rowspan=\"0\"]{display:none}.checkedRow>td{background-color:var(--ant-primary-2)}.checkedRow:hover>td{background-color:var(--ant-primary-3)}\n"] }]
|
|
532
|
+
}], ctorParameters: () => [{ type: i1$1.TableFieldDisplayService }, { type: i1$1.TableService }, { type: i1$1.SelectService }, { type: i1$1.ExpandService }, { type: i1$1.StatisticService }, { type: i1$1.SelectService, decorators: [{
|
|
495
533
|
type: SkipSelf
|
|
496
534
|
}, {
|
|
497
535
|
type: Optional
|