@tetacom/ng-components 1.0.102 → 1.0.104
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/component/table/service/table.service.d.ts +2 -0
- package/component/table/table-head/main-dropdown-tab/main-dropdown-tab.component.d.ts +1 -0
- package/esm2020/component/table/service/table.service.mjs +20 -1
- package/esm2020/component/table/table-body/table-body.component.mjs +3 -3
- package/esm2020/component/table/table-head/main-dropdown-tab/main-dropdown-tab.component.mjs +6 -3
- package/fesm2015/tetacom-ng-components.mjs +26 -4
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +26 -4
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
package/esm2020/component/table/table-head/main-dropdown-tab/main-dropdown-tab.component.mjs
CHANGED
|
@@ -19,6 +19,9 @@ export class MainDropdownTabComponent {
|
|
|
19
19
|
get filtered() {
|
|
20
20
|
return StateUtil.isColumnFiltered(this.state, this.column);
|
|
21
21
|
}
|
|
22
|
+
get parent() {
|
|
23
|
+
return this._svc.getColumnParent(this.column);
|
|
24
|
+
}
|
|
22
25
|
pinColumn() {
|
|
23
26
|
this._svc.pinColumn(this.column);
|
|
24
27
|
}
|
|
@@ -63,10 +66,10 @@ export class MainDropdownTabComponent {
|
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
MainDropdownTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainDropdownTabComponent, deps: [{ token: i1.TableService }, { token: i2.TetaConfigService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
-
MainDropdownTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: MainDropdownTabComponent, selector: "teta-main-dropdown-tab", inputs: { columns: "columns", column: "column", state: "state", data: "data", close: "close" }, ngImport: i0, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <div class=\"list-item list-item_interactive\"
|
|
69
|
+
MainDropdownTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: MainDropdownTabComponent, selector: "teta-main-dropdown-tab", inputs: { columns: "columns", column: "column", state: "state", data: "data", close: "close" }, ngImport: i0, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <ng-container *ngIf=\"!parent\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"pinColumn()\">\n {{column.locked ? loc.unpin : loc.pin}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"column.sortable\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortAsc($event)\">\n {{loc.sortAsc}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortDesc($event)\">\n {{loc.sortDesc}}\n </div>\n <ng-container *ngIf=\"hasSortedColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"sortParam\"\n (click)=\"clearSort()\">\n {{loc.clearSort}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllSort()\">\n {{loc.clearAllSort}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasFilteredColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"filtered\"\n (click)=\"clearFilter()\">\n {{loc.clearFilter}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllFilters()\">\n {{loc.clearAllFilters}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeColumn()\">\n {{loc.autosizeColumn}}\n </div>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeAllColumns()\">\n {{loc.autosizeAll}}\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item list-item_interactive\" (click)=\"restoreDefaultColumns()\">\n {{loc.resetColumnsSize}}\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
67
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainDropdownTabComponent, decorators: [{
|
|
68
71
|
type: Component,
|
|
69
|
-
args: [{ selector: 'teta-main-dropdown-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <div class=\"list-item list-item_interactive\"
|
|
72
|
+
args: [{ selector: 'teta-main-dropdown-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <ng-container *ngIf=\"!parent\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"pinColumn()\">\n {{column.locked ? loc.unpin : loc.pin}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"column.sortable\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortAsc($event)\">\n {{loc.sortAsc}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortDesc($event)\">\n {{loc.sortDesc}}\n </div>\n <ng-container *ngIf=\"hasSortedColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"sortParam\"\n (click)=\"clearSort()\">\n {{loc.clearSort}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllSort()\">\n {{loc.clearAllSort}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasFilteredColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"filtered\"\n (click)=\"clearFilter()\">\n {{loc.clearFilter}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllFilters()\">\n {{loc.clearAllFilters}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeColumn()\">\n {{loc.autosizeColumn}}\n </div>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeAllColumns()\">\n {{loc.autosizeAll}}\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item list-item_interactive\" (click)=\"restoreDefaultColumns()\">\n {{loc.resetColumnsSize}}\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
70
73
|
}], ctorParameters: function () { return [{ type: i1.TableService }, { type: i2.TetaConfigService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
71
74
|
type: Input
|
|
72
75
|
}], column: [{
|
|
@@ -78,4 +81,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
78
81
|
}], close: [{
|
|
79
82
|
type: Input
|
|
80
83
|
}] } });
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi1kcm9wZG93bi10YWIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudC90YWJsZS90YWJsZS1oZWFkL21haW4tZHJvcGRvd24tdGFiL21haW4tZHJvcGRvd24tdGFiLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnQvdGFibGUvdGFibGUtaGVhZC9tYWluLWRyb3Bkb3duLXRhYi9tYWluLWRyb3Bkb3duLXRhYi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQXFCLFNBQVMsRUFBYyxLQUFL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yYWN0aXZlXCIgKGNsaWNrKT1cImF1dG9zaXplQ29sdW1uKClcIj5cbiAgICB7e2xvYy5hdXRvc2l6ZUNvbHVtbn19XG4gIDwvZGl2PlxuICA8ZGl2IGNsYXNzPVwibGlzdC1pdGVtIGxpc3QtaXRlbV9pbnRlcmFjdGl2ZVwiIChjbGljayk9XCJhdXRvc2l6ZUFsbENvbHVtbnMoKVwiPlxuICAgIHt7bG9jLmF1dG9zaXplQWxsfX1cbiAgPC9kaXY+XG4gIDxkaXYgY2xhc3M9XCJsaXN0LWRpdmlkZXJcIj48L2Rpdj5cbiAgPGRpdiBjbGFzcz1cImxpc3QtaXRlbSBsaXN0LWl0ZW1faW50ZXJhY3RpdmVcIiAoY2xpY2spPVwicmVzdG9yZURlZmF1bHRDb2x1bW5zKClcIj5cbiAgICB7e2xvYy5yZXNldENvbHVtbnNTaXplfX1cbiAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -7688,6 +7688,9 @@ class TableService {
|
|
|
7688
7688
|
}
|
|
7689
7689
|
}
|
|
7690
7690
|
}
|
|
7691
|
+
getColumnParent(column) {
|
|
7692
|
+
return this.findParentColumn(column, this.displayColumns);
|
|
7693
|
+
}
|
|
7691
7694
|
startEditRow(cellEvent) {
|
|
7692
7695
|
var _a;
|
|
7693
7696
|
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.row) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row)) {
|
|
@@ -7982,6 +7985,22 @@ class TableService {
|
|
|
7982
7985
|
}
|
|
7983
7986
|
return null;
|
|
7984
7987
|
}
|
|
7988
|
+
findParentColumn(column, columns) {
|
|
7989
|
+
const found = columns.find((x) => x.columns.indexOf(column) >= 0);
|
|
7990
|
+
if (found !== null && found !== undefined) {
|
|
7991
|
+
return found;
|
|
7992
|
+
}
|
|
7993
|
+
for (let i = 0, l = columns.length; i < l; i++) {
|
|
7994
|
+
const col = columns[i];
|
|
7995
|
+
if (col.columns && col.columns.length) {
|
|
7996
|
+
const result = this.findParentColumn(column, col.columns);
|
|
7997
|
+
if (result !== null && result !== undefined) {
|
|
7998
|
+
return result;
|
|
7999
|
+
}
|
|
8000
|
+
}
|
|
8001
|
+
}
|
|
8002
|
+
return null;
|
|
8003
|
+
}
|
|
7985
8004
|
getTableElement(element) {
|
|
7986
8005
|
return element.closest('teta-table');
|
|
7987
8006
|
}
|
|
@@ -8659,6 +8678,9 @@ class MainDropdownTabComponent {
|
|
|
8659
8678
|
get filtered() {
|
|
8660
8679
|
return StateUtil.isColumnFiltered(this.state, this.column);
|
|
8661
8680
|
}
|
|
8681
|
+
get parent() {
|
|
8682
|
+
return this._svc.getColumnParent(this.column);
|
|
8683
|
+
}
|
|
8662
8684
|
pinColumn() {
|
|
8663
8685
|
this._svc.pinColumn(this.column);
|
|
8664
8686
|
}
|
|
@@ -8703,10 +8725,10 @@ class MainDropdownTabComponent {
|
|
|
8703
8725
|
}
|
|
8704
8726
|
}
|
|
8705
8727
|
MainDropdownTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainDropdownTabComponent, deps: [{ token: TableService }, { token: TetaConfigService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8706
|
-
MainDropdownTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: MainDropdownTabComponent, selector: "teta-main-dropdown-tab", inputs: { columns: "columns", column: "column", state: "state", data: "data", close: "close" }, ngImport: i0, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <div class=\"list-item list-item_interactive\"
|
|
8728
|
+
MainDropdownTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: MainDropdownTabComponent, selector: "teta-main-dropdown-tab", inputs: { columns: "columns", column: "column", state: "state", data: "data", close: "close" }, ngImport: i0, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <ng-container *ngIf=\"!parent\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"pinColumn()\">\n {{column.locked ? loc.unpin : loc.pin}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"column.sortable\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortAsc($event)\">\n {{loc.sortAsc}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortDesc($event)\">\n {{loc.sortDesc}}\n </div>\n <ng-container *ngIf=\"hasSortedColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"sortParam\"\n (click)=\"clearSort()\">\n {{loc.clearSort}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllSort()\">\n {{loc.clearAllSort}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasFilteredColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"filtered\"\n (click)=\"clearFilter()\">\n {{loc.clearFilter}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllFilters()\">\n {{loc.clearAllFilters}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeColumn()\">\n {{loc.autosizeColumn}}\n </div>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeAllColumns()\">\n {{loc.autosizeAll}}\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item list-item_interactive\" (click)=\"restoreDefaultColumns()\">\n {{loc.resetColumnsSize}}\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8707
8729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainDropdownTabComponent, decorators: [{
|
|
8708
8730
|
type: Component,
|
|
8709
|
-
args: [{ selector: 'teta-main-dropdown-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <div class=\"list-item list-item_interactive\"
|
|
8731
|
+
args: [{ selector: 'teta-main-dropdown-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list column_auto\" *ngIf=\"locale | async as loc\">\n <ng-container *ngIf=\"!parent\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"pinColumn()\">\n {{column.locked ? loc.unpin : loc.pin}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"column.sortable\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortAsc($event)\">\n {{loc.sortAsc}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortDesc($event)\">\n {{loc.sortDesc}}\n </div>\n <ng-container *ngIf=\"hasSortedColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"sortParam\"\n (click)=\"clearSort()\">\n {{loc.clearSort}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllSort()\">\n {{loc.clearAllSort}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasFilteredColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"filtered\"\n (click)=\"clearFilter()\">\n {{loc.clearFilter}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllFilters()\">\n {{loc.clearAllFilters}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeColumn()\">\n {{loc.autosizeColumn}}\n </div>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeAllColumns()\">\n {{loc.autosizeAll}}\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item list-item_interactive\" (click)=\"restoreDefaultColumns()\">\n {{loc.resetColumnsSize}}\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
8710
8732
|
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8711
8733
|
type: Input
|
|
8712
8734
|
}], column: [{
|
|
@@ -10103,10 +10125,10 @@ class TableBodyComponent {
|
|
|
10103
10125
|
}
|
|
10104
10126
|
}
|
|
10105
10127
|
TableBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TableBodyComponent, deps: [{ token: TableService }, { token: i0.ElementRef }, { token: TetaConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10106
|
-
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow", selectedRows: "selectedRows", additionalComponent: "additionalComponent", aggregate: "aggregate", selectType: "selectType", rowClass: "rowClass" }, host: { properties: { "class.table-body": "this.tableBodyClass" } }, viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], ngImport: i0, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row, $event)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ?
|
|
10128
|
+
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow", selectedRows: "selectedRows", additionalComponent: "additionalComponent", aggregate: "aggregate", selectType: "selectType", rowClass: "rowClass" }, host: { properties: { "class.table-body": "this.tableBodyClass" } }, viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], ngImport: i0, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row, $event)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ? 2 : 1\">\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n</ng-template>\n\n<ng-template #aggTemplate>\n <ng-container *ngIf=\"locale | async as loc\">\n <div class=\"table-row\"\n *ngIf=\"aggregate\"\n [class.table-row_virtual]=\"virtual\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component\"\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component\"\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n </ng-container>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { kind: "directive", type: i6.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i6.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i6.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: CellComponent, selector: "teta-cell", inputs: ["column", "filterOptions", "dict", "row"] }, { kind: "component", type: SelectionCellComponent, selector: "teta-selection-cell", inputs: ["row"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10107
10129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
10108
10130
|
type: Component,
|
|
10109
|
-
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row, $event)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ?
|
|
10131
|
+
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row, $event)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ? 2 : 1\">\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n</ng-template>\n\n<ng-template #aggTemplate>\n <ng-container *ngIf=\"locale | async as loc\">\n <div class=\"table-row\"\n *ngIf=\"aggregate\"\n [class.table-row_virtual]=\"virtual\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component\"\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component\"\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
10110
10132
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
10111
10133
|
type: Input
|
|
10112
10134
|
}], activeRow: [{
|