ngx-aur-mat-table 19.3.0 → 19.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-aur-mat-table.mjs +58 -64
- package/fesm2022/ngx-aur-mat-table.mjs.map +1 -1
- package/lib/model/ColumnConfig.d.ts +11 -0
- package/lib/model/EmptyValue.d.ts +0 -1
- package/lib/ngx-aur-mat-table.component.d.ts +3 -1
- package/lib/ngx-aur-mat-table.module.d.ts +2 -3
- package/package.json +1 -1
- package/lib/factories/MatTableDataSourceFactory.d.ts +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Component, Pipe, EventEmitter, ElementRef, Output, ViewChild, ViewChildren, ContentChild,
|
|
2
|
+
import { Directive, Input, ChangeDetectionStrategy, Component, Pipe, EventEmitter, ElementRef, Output, ViewChild, ViewChildren, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i8 from '@angular/material/sort';
|
|
4
4
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
5
5
|
import * as i3$1 from '@angular/material/table';
|
|
@@ -26,7 +26,6 @@ import * as i10 from '@angular/material/checkbox';
|
|
|
26
26
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
27
27
|
import * as i11 from '@angular/material/menu';
|
|
28
28
|
import { MatMenuModule } from '@angular/material/menu';
|
|
29
|
-
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
30
29
|
|
|
31
30
|
class NgxAurTableConfigUtil {
|
|
32
31
|
static keys(config) {
|
|
@@ -212,8 +211,6 @@ class EmptyValue {
|
|
|
212
211
|
enable: false
|
|
213
212
|
}; }
|
|
214
213
|
static { this.MAT_TABLE_DATA_SOURCE = new MatTableDataSource(); }
|
|
215
|
-
static { this.RESIZE_OBSERVER = new ResizeObserver(() => {
|
|
216
|
-
}); }
|
|
217
214
|
}
|
|
218
215
|
|
|
219
216
|
class AbstractProvider {
|
|
@@ -439,6 +436,10 @@ class TableViewFactory {
|
|
|
439
436
|
columnViewMap.set(c.key, c.valueView);
|
|
440
437
|
}
|
|
441
438
|
});
|
|
439
|
+
// ни одна колонка не определяет valueView — не создаём пустую Map на каждую строку
|
|
440
|
+
if (columnViewMap.size === 0) {
|
|
441
|
+
return [];
|
|
442
|
+
}
|
|
442
443
|
return TableViewFactory.toViewInternal(rows, columnViewMap);
|
|
443
444
|
}
|
|
444
445
|
static toViewInternal(rows, source) {
|
|
@@ -618,19 +619,6 @@ class TableRowsFactory {
|
|
|
618
619
|
}
|
|
619
620
|
}
|
|
620
621
|
|
|
621
|
-
class MatTableDataSourceFactory {
|
|
622
|
-
/**
|
|
623
|
-
* Преобразует массив объектов данных в MatTableDataSource.
|
|
624
|
-
* @param data Массив объектов данных для преобразования.
|
|
625
|
-
* @param config Настройки конфигурации для каждой колонки.
|
|
626
|
-
* @returns MatTableDataSource.
|
|
627
|
-
*/
|
|
628
|
-
static convert(data, config) {
|
|
629
|
-
let tableRows = TableRowsFactory.convert(data, config);
|
|
630
|
-
return new MatTableDataSource(tableRows);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
622
|
class DisplayColumnsFactory {
|
|
635
623
|
static create(tableConfig) {
|
|
636
624
|
return tableConfig.columnsCfg.map((tableColumn) => tableColumn.key);
|
|
@@ -1072,22 +1060,22 @@ class ServerPageController {
|
|
|
1072
1060
|
|
|
1073
1061
|
class IconViewComponent {
|
|
1074
1062
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IconViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1075
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: IconViewComponent, isStandalone: false, selector: "lib-icon-view", inputs: { view: "view" }, ngImport: i0, template: "<div [ngClass]=\"{'circle': view
|
|
1063
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: IconViewComponent, isStandalone: false, selector: "lib-icon-view", inputs: { view: "view" }, ngImport: i0, template: "<!-- \u0431\u0435\u0437 view \u043D\u0435 \u0440\u0435\u043D\u0434\u0435\u0440\u0438\u043C \u043D\u0438\u0447\u0435\u0433\u043E \u2014 \u043F\u0443\u0441\u0442\u044B\u0445 div-\u043E\u0431\u0451\u0440\u0442\u043E\u043A \u0432 \u044F\u0447\u0435\u0439\u043A\u0430\u0445 \u0431\u044B\u0442\u044C \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u043E -->\n<div *ngIf=\"view\"\n [ngClass]=\"{'circle': view.wrapper}\"\n [style.background-color]=\"view.wrapper?.color\">\n <!-- MatTooltip \u0441\u043E\u0437\u0434\u0430\u0451\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u0433\u0434\u0430 \u0442\u0443\u043B\u0442\u0438\u043F \u0437\u0430\u0434\u0430\u043D -->\n <ng-container *ngIf=\"view.visible !== false\">\n <mat-icon *ngIf=\"view.tooltip as tooltip; else plainIcon\"\n [matTooltip]=\"tooltip\"\n [style.color]=\"view.color\">\n {{ view.name }}\n </mat-icon>\n <ng-template #plainIcon>\n <mat-icon [style.color]=\"view.color\">\n {{ view.name }}\n </mat-icon>\n </ng-template>\n </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1076
1064
|
}
|
|
1077
1065
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IconViewComponent, decorators: [{
|
|
1078
1066
|
type: Component,
|
|
1079
|
-
args: [{ selector: 'lib-icon-view', standalone: false, template: "<div [ngClass]=\"{'circle': view
|
|
1067
|
+
args: [{ selector: 'lib-icon-view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- \u0431\u0435\u0437 view \u043D\u0435 \u0440\u0435\u043D\u0434\u0435\u0440\u0438\u043C \u043D\u0438\u0447\u0435\u0433\u043E \u2014 \u043F\u0443\u0441\u0442\u044B\u0445 div-\u043E\u0431\u0451\u0440\u0442\u043E\u043A \u0432 \u044F\u0447\u0435\u0439\u043A\u0430\u0445 \u0431\u044B\u0442\u044C \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u043E -->\n<div *ngIf=\"view\"\n [ngClass]=\"{'circle': view.wrapper}\"\n [style.background-color]=\"view.wrapper?.color\">\n <!-- MatTooltip \u0441\u043E\u0437\u0434\u0430\u0451\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u0433\u0434\u0430 \u0442\u0443\u043B\u0442\u0438\u043F \u0437\u0430\u0434\u0430\u043D -->\n <ng-container *ngIf=\"view.visible !== false\">\n <mat-icon *ngIf=\"view.tooltip as tooltip; else plainIcon\"\n [matTooltip]=\"tooltip\"\n [style.color]=\"view.color\">\n {{ view.name }}\n </mat-icon>\n <ng-template #plainIcon>\n <mat-icon [style.color]=\"view.color\">\n {{ view.name }}\n </mat-icon>\n </ng-template>\n </ng-container>\n</div>\n" }]
|
|
1080
1068
|
}], propDecorators: { view: [{
|
|
1081
1069
|
type: Input
|
|
1082
1070
|
}] } });
|
|
1083
1071
|
|
|
1084
1072
|
class ColumnViewComponent {
|
|
1085
1073
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ColumnViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1086
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ColumnViewComponent, isStandalone: false, selector: "lib-column-view", inputs: { config: "config", value: "value" }, ngImport: i0, template: "<div class=\"align-container\">\n\n <lib-icon-view [view]=\"config?.icon\">\n </lib-icon-view>\n\n <img *ngIf=\"config?.image?.src\"\n [src]=\"config?.image?.src\"\n [style.height]=\"config?.image?.height\"\n [style.width]=\"config?.image?.width\"\n alt=\"img\">\n\n <
|
|
1074
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ColumnViewComponent, isStandalone: false, selector: "lib-column-view", inputs: { config: "config", value: "value" }, ngImport: i0, template: "<div class=\"align-container\">\n\n <lib-icon-view *ngIf=\"config?.icon\" [view]=\"config?.icon\">\n </lib-icon-view>\n\n <img *ngIf=\"config?.image?.src\"\n [src]=\"config?.image?.src\"\n [style.height]=\"config?.image?.height\"\n [style.width]=\"config?.image?.width\"\n alt=\"img\">\n\n <!-- MatTooltip \u0441\u043E\u0437\u0434\u0430\u0451\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u0433\u0434\u0430 \u0442\u0443\u043B\u0442\u0438\u043F \u0437\u0430\u0434\u0430\u043D: \u043F\u0443\u0441\u0442\u0430\u044F \u0434\u0438\u0440\u0435\u043A\u0442\u0438\u0432\u0430 \u043D\u0430 \u043A\u0430\u0436\u0434\u043E\u0439 \u044F\u0447\u0435\u0439\u043A\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043E\u0440\u043E\u0433\u0430 -->\n <ng-container *ngIf=\"config?.text?.show != false\">\n <span *ngIf=\"config?.text?.tooltip as tooltip; else plainText\"\n [matTooltip]=\"tooltip\"\n [style.color]=\"config?.text?.color\">\n {{ value }}\n </span>\n <ng-template #plainText>\n <span [style.color]=\"config?.text?.color\">\n {{ value }}\n </span>\n </ng-template>\n </ng-container>\n</div>\n", styles: [".align-container{display:flex;align-items:center}span{margin-left:4px}.circle{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: IconViewComponent, selector: "lib-icon-view", inputs: ["view"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1087
1075
|
}
|
|
1088
1076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ColumnViewComponent, decorators: [{
|
|
1089
1077
|
type: Component,
|
|
1090
|
-
args: [{ selector: 'lib-column-view', standalone: false, template: "<div class=\"align-container\">\n\n <lib-icon-view [view]=\"config?.icon\">\n </lib-icon-view>\n\n <img *ngIf=\"config?.image?.src\"\n [src]=\"config?.image?.src\"\n [style.height]=\"config?.image?.height\"\n [style.width]=\"config?.image?.width\"\n alt=\"img\">\n\n <
|
|
1078
|
+
args: [{ selector: 'lib-column-view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"align-container\">\n\n <lib-icon-view *ngIf=\"config?.icon\" [view]=\"config?.icon\">\n </lib-icon-view>\n\n <img *ngIf=\"config?.image?.src\"\n [src]=\"config?.image?.src\"\n [style.height]=\"config?.image?.height\"\n [style.width]=\"config?.image?.width\"\n alt=\"img\">\n\n <!-- MatTooltip \u0441\u043E\u0437\u0434\u0430\u0451\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u0433\u0434\u0430 \u0442\u0443\u043B\u0442\u0438\u043F \u0437\u0430\u0434\u0430\u043D: \u043F\u0443\u0441\u0442\u0430\u044F \u0434\u0438\u0440\u0435\u043A\u0442\u0438\u0432\u0430 \u043D\u0430 \u043A\u0430\u0436\u0434\u043E\u0439 \u044F\u0447\u0435\u0439\u043A\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043E\u0440\u043E\u0433\u0430 -->\n <ng-container *ngIf=\"config?.text?.show != false\">\n <span *ngIf=\"config?.text?.tooltip as tooltip; else plainText\"\n [matTooltip]=\"tooltip\"\n [style.color]=\"config?.text?.color\">\n {{ value }}\n </span>\n <ng-template #plainText>\n <span [style.color]=\"config?.text?.color\">\n {{ value }}\n </span>\n </ng-template>\n </ng-container>\n</div>\n", styles: [".align-container{display:flex;align-items:center}span{margin-left:4px}.circle{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%}\n"] }]
|
|
1091
1079
|
}], propDecorators: { config: [{
|
|
1092
1080
|
type: Input
|
|
1093
1081
|
}], value: [{
|
|
@@ -1170,8 +1158,6 @@ class NgxAurMatTableComponent {
|
|
|
1170
1158
|
this.prevColumnOffsets = [];
|
|
1171
1159
|
this.headerButtonProvider = new HeaderButtonProviderDummy();
|
|
1172
1160
|
this.headerButton = new EventEmitter();
|
|
1173
|
-
// @ts-ignore
|
|
1174
|
-
this.resizeColumnOffsetsObserver = EmptyValue.RESIZE_OBSERVER;
|
|
1175
1161
|
this.dragDropProvider = new DragProviderDummy();
|
|
1176
1162
|
this.timelineProvider = new TimelineProviderDummy();
|
|
1177
1163
|
this._timelineFirstId = -1;
|
|
@@ -1188,6 +1174,10 @@ class NgxAurMatTableComponent {
|
|
|
1188
1174
|
this.customSortFunctions = new Map();
|
|
1189
1175
|
this.filterStorage = new Map();
|
|
1190
1176
|
this._searchText = '';
|
|
1177
|
+
/** trackBy для всех дефов строк (row defs) таблицы: бизнес-ключ из конфига или ссылка на rowSrc. */
|
|
1178
|
+
this.trackByRow = (_, row) => this.tableConfig.trackBy ? this.tableConfig.trackBy(row.rowSrc) : row.rowSrc;
|
|
1179
|
+
// дефолтный предикат персистентного инстанса — захватывается один раз на жизнь компонента
|
|
1180
|
+
this._defaultFilterPredicate = this.tableDataSource.filterPredicate;
|
|
1191
1181
|
}
|
|
1192
1182
|
ngOnChanges(changes) {
|
|
1193
1183
|
if ((changes['tableData'] && this.tableData) || (changes['displayColumns'] && this._displayColumns)) {
|
|
@@ -1267,53 +1257,60 @@ class NgxAurMatTableComponent {
|
|
|
1267
1257
|
// для клиентского режима (ngOnChanges откладывает initPaginator() при firstChange).
|
|
1268
1258
|
this.initPaginator();
|
|
1269
1259
|
this.initSortingDataAccessor();
|
|
1270
|
-
|
|
1271
|
-
|
|
1260
|
+
// SSR: на сервере ResizeObserver не определён — фича columnOffsets работает только в браузере
|
|
1261
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
1262
|
+
this.resizeColumnOffsetsObserver = new ResizeObserver(() => this.updateColumnOffsets());
|
|
1263
|
+
this.resizeColumnOffsetsObserver.observe(this.table.nativeElement);
|
|
1264
|
+
}
|
|
1272
1265
|
if (this.isServerMode()) {
|
|
1273
1266
|
this.startServerController();
|
|
1274
1267
|
}
|
|
1275
1268
|
}
|
|
1276
1269
|
initPaginator() {
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
else {
|
|
1285
|
-
this.tableDataSource.paginator = this.activePaginator;
|
|
1286
|
-
}
|
|
1270
|
+
// В серверном режиме держим null — MatTableDataSource вызвал бы
|
|
1271
|
+
// _updatePaginator(filteredDataLength) и перезаписал бы длину, присланную сервером.
|
|
1272
|
+
// ?? null нормализует undefined (пагинатор не отрендерен), чтобы гвард был точным.
|
|
1273
|
+
const target = this.isServerMode() ? null : (this.activePaginator ?? null);
|
|
1274
|
+
if (this.tableDataSource.paginator !== target) {
|
|
1275
|
+
// сеттер пересоздаёт внутреннюю подписку — присваиваем только при реальном изменении
|
|
1276
|
+
this.tableDataSource.paginator = target;
|
|
1287
1277
|
}
|
|
1288
1278
|
}
|
|
1289
1279
|
initSortingDataAccessor() {
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1280
|
+
const sort = this.matSort ?? null;
|
|
1281
|
+
if (this.tableDataSource.sort !== sort) {
|
|
1282
|
+
// тот же гвард: сеттер .sort тоже пересоздаёт подписку
|
|
1283
|
+
this.tableDataSource.sort = sort;
|
|
1284
|
+
}
|
|
1285
|
+
// обычное свойство, подписку не трогает — присваиваем без гварда
|
|
1286
|
+
this.tableDataSource.sortingDataAccessor = (data, key) => {
|
|
1287
|
+
const customSortFunction = this.customSortFunctions.get(key);
|
|
1288
|
+
return customSortFunction ? customSortFunction(data, key) : data[key];
|
|
1289
|
+
};
|
|
1297
1290
|
}
|
|
1298
1291
|
updateColumnOffsets() {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1292
|
+
const tableEl = this.table?.nativeElement;
|
|
1293
|
+
if (!tableEl) {
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
const offsets = Array.from(tableEl.querySelectorAll('th'))
|
|
1297
|
+
.slice(0, this._displayColumns.length)
|
|
1298
|
+
.map((c) => c)
|
|
1299
|
+
.map((c, index) => ({
|
|
1300
|
+
left: c.offsetLeft,
|
|
1301
|
+
width: c.offsetWidth,
|
|
1302
|
+
key: this._displayColumns[index]
|
|
1303
|
+
}));
|
|
1304
|
+
if (OffsetUtil.areNotEqual(this.prevColumnOffsets, offsets)) {
|
|
1305
|
+
this.prevColumnOffsets = offsets;
|
|
1306
|
+
this.columnOffsets.emit(offsets);
|
|
1312
1307
|
}
|
|
1313
1308
|
}
|
|
1314
1309
|
prepareTableData(initSelection = []) {
|
|
1315
|
-
|
|
1310
|
+
// карту кастомных сортировок обновляем ДО initTable(): sorting accessor читает её
|
|
1311
|
+
// синхронно во время sort-прохода пайплайна, который запускает присваивание .data=
|
|
1316
1312
|
this.initCustomSortFunctionsMap();
|
|
1313
|
+
this.initTable();
|
|
1317
1314
|
this.removeWrongKeysFromDisplayColumns();
|
|
1318
1315
|
if (!this.paginatorState) {
|
|
1319
1316
|
// Если пагинатор не серверный, то я инициализирую его здесь, иначе при обновлении данных пагинатор ломается и отображаются все элементы
|
|
@@ -1351,14 +1348,14 @@ class NgxAurMatTableComponent {
|
|
|
1351
1348
|
this._displayColumns = this._displayColumns.filter(actual => whiteKeys.has(actual) || actual.startsWith('tbl_'));
|
|
1352
1349
|
}
|
|
1353
1350
|
initCustomSortFunctionsMap() {
|
|
1351
|
+
this.customSortFunctions.clear();
|
|
1354
1352
|
this.tableConfig.columnsCfg
|
|
1355
1353
|
.filter(c => c.sort != null && isFeatureEnabled(c.sort) && c.sort.customSort)
|
|
1356
1354
|
.forEach(c => this.customSortFunctions.set(c.key, c.sort.customSort));
|
|
1357
1355
|
}
|
|
1358
1356
|
initTable() {
|
|
1359
1357
|
this._tableName = this.tableConfig.name ?? 'unknown-table-name';
|
|
1360
|
-
this.tableDataSource =
|
|
1361
|
-
this._defaultFilterPredicate = this.tableDataSource.filterPredicate;
|
|
1358
|
+
this.tableDataSource.data = TableRowsFactory.convert(this.tableData, this.tableConfig.columnsCfg);
|
|
1362
1359
|
this.tableView = TableViewFactory.toView(this.tableDataSource.data, this.tableConfig);
|
|
1363
1360
|
this.rowStyles = RowStyleFactory.toRowStyles(this.tableDataSource.data, this.tableConfig);
|
|
1364
1361
|
this._headerStyle = this.toCss(this.tableConfig.headerRowCfg?.styleCfg?.style);
|
|
@@ -1660,7 +1657,7 @@ class NgxAurMatTableComponent {
|
|
|
1660
1657
|
}
|
|
1661
1658
|
}
|
|
1662
1659
|
ngOnDestroy() {
|
|
1663
|
-
this.resizeColumnOffsetsObserver
|
|
1660
|
+
this.resizeColumnOffsetsObserver?.disconnect();
|
|
1664
1661
|
this.serverPageController?.stop();
|
|
1665
1662
|
this.externalPaginatorSub?.unsubscribe();
|
|
1666
1663
|
}
|
|
@@ -1684,7 +1681,7 @@ class NgxAurMatTableComponent {
|
|
|
1684
1681
|
this.dragDropProvider.manager.endDrag();
|
|
1685
1682
|
}
|
|
1686
1683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxAurMatTableComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1687
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: NgxAurMatTableComponent, isStandalone: false, selector: "aur-mat-table", inputs: { displayColumns: "displayColumns", extraHeaderCellTopTemplate: "extraHeaderCellTopTemplate", extraHeaderCellBottomTemplate: "extraHeaderCellBottomTemplate", tableConfig: "tableConfig", tableData: "tableData", extendedRowTemplate: "extendedRowTemplate", timelineMarkerTemplate: "timelineMarkerTemplate", paginatorState: "paginatorState", pageSource: "pageSource", externalPaginator: "externalPaginator", isTableBodyHide: "isTableBodyHide", highlight: "highlight" }, outputs: { sort: "sort", pageChange: "pageChange", rowAction: "rowAction", selectChange: "selectChange", selectAdded: "selectAdded", selectRemoved: "selectRemoved", selectedRowsAction: "selectedRowsAction", selectionModel: "selectionModel", rowClick: "rowClick", loadingChange: "loadingChange", pageError: "pageError", filterChange: "filterChange", columnOffsets: "columnOffsets", headerButton: "headerButton" }, queries: [{ propertyName: "subFooterRowTemplate", first: true, predicate: NgxTableSubFooterRowDirective, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, read: ElementRef }, { propertyName: "matPaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "rows", predicate: ["rowLink"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"aur-mat-table\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"isFeatureEnabled(tableConfig.filterCfg)\">\n <div class=\"search-container\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchPrefix]\"></ng-content>\n </ng-container>\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <mat-label>{{ tableConfig.filterCfg?.label }}</mat-label>\n <input matInput (keyup)=\"applySearchFilter($event)\"\n placeholder=\"{{tableConfig.filterCfg?.placeholder}}\"\n style=\"font-size: 18px;\">\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchSuffix]\"></ng-content>\n </ng-container>\n </div>\n </ng-container>\n\n\n <div class=\"table-container\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"headerButton.emit($event)\">\n {{ headerButtonProvider.icon }}\n </mat-icon>\n\n <!-- Table -->\n <table #table mat-table matSort\n [multiTemplateDataRows]=\"extendedRowTemplate !== null\"\n [dataSource]=\"tableDataSource\"\n (matSortChange)=\"sortTable($event)\"\n [style.height]=\"tableConfig.tableViewCfg?.height\"\n [style.max-height]=\"tableConfig.tableViewCfg?.maxHeight\"\n [style.min-height]=\"tableConfig.tableViewCfg?.minHeight\"\n [ngClass]=\"{'hide-table-body': isTableBodyHide}\">\n\n\n <!-- timeline-column-->\n <ng-container *ngIf=\"timelineProvider.isEnabled\" [matColumnDef]=\"timelineProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\">\n <div class=\"aur-timeline-marker-container\">\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineFirstId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.topColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.topGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n <ng-container *ngIf=\"timelineMarkerTemplate; else defaultMarker\">\n <ng-container *ngTemplateOutlet=\"timelineMarkerTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n <ng-template #defaultMarker>\n <div class=\"aur-timeline-marker-default\"\n [style.background-color]=\"timelineProvider.markerColor\">\n </div>\n </ng-template>\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineLastId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></td>\n </ng-container>\n\n <!-- drag-column-->\n <ng-container *ngIf=\"dragDropProvider.isEnabled && dragDropProvider.draggable\" [matColumnDef]=\"dragDropProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </th>\n\n <td mat-cell *matCellDef=\"let element;\" class=\"drag-column\"\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n <lib-icon-view draggable=\"true\"\n class=\"drag-icon\"\n [view]=\"dragDropProvider.dragIconView\"\n (dragstart)=\"onDragStart($event, element)\"\n (dragend)=\"onDragEnd($event, element)\">\n </lib-icon-view>\n\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- index-column-->\n <ng-container *ngIf=\"indexProvider.isEnabled\" [matColumnDef]=\"indexProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n <lib-column-view [config]=\"indexProvider.headerView\">\n {{ indexProvider.name }}\n </lib-column-view>\n </th>\n\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ element.id + indexProvider.offset }}\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(indexProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- selection-column-->\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider.isEnabled\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <div class=\"flex-container\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n <div\n *ngIf=\"tableConfig.selectionCfg?.showSelectedCount && selectionProvider.selection.hasValue()\">\n {{ selectionProvider.selection.selected.length }}\n <span\n *ngIf=\"tableConfig.selectionCfg?.showTotalCount !== false\">/{{ paginatorState?.length ? paginatorState?.length : tableDataSource.filteredData.length }}</span>\n </div>\n\n <div *ngIf=\"selectionProvider.selection.hasValue() && tableConfig?.selectionCfg?.actions\">\n <ng-container *ngFor=\"let action of tableConfig.selectionCfg!.actions\">\n <button mat-icon-button\n (click)=\"emitSelectedRowsAction(action.action, selectionProvider.selection.selected)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.visible !== false\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"$event.stopPropagation(); selectionProvider.selection.toggle(castSrc(row).rowSrc)\"\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selectionProvider.selection.toggle(castSrc(row).rowSrc) : null\"\n [checked]=\"selectionProvider.selection.isSelected(castSrc(row).rowSrc)\">\n </mat-checkbox>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- action column -->\n <ng-container *ngIf=\"rowActionsProvider.isEnabled\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" (click)=\"$event.stopPropagation()\" style=\"cursor: default\"\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n <ng-container *ngFor=\"let action of rowActionsProvider.actionView.get(element.id)\">\n <!-- action with dropdown menu -->\n <ng-container *ngIf=\"action.menu; else directAction\">\n <ng-container *ngIf=\"action.visible !== false\">\n <mat-menu #actionMenu=\"matMenu\">\n <ng-container *ngFor=\"let item of action.menu\">\n <button mat-menu-item\n *ngIf=\"item.visible !== false\"\n [disabled]=\"item.disabled === true\"\n (click)=\"emitMenuAction(item.action, element.rowSrc)\">\n <mat-icon *ngIf=\"item.icon\" [style.color]=\"item.icon.color\">\n {{ item.icon.name }}\n </mat-icon>\n <span>{{ item.text }}</span>\n </button>\n </ng-container>\n </mat-menu>\n <button mat-icon-button\n [matMenuTriggerFor]=\"actionMenu\"\n [matTooltip]=\"action.icon.tooltip || ''\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-container>\n </ng-container>\n\n <!-- direct action (existing behavior) -->\n <ng-template #directAction>\n <button mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.visible !== false\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-template>\n </ng-container>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(rowActionsProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- value-icon-->\n <ng-container *ngFor=\"let columnConfig of tableConfig.columnsCfg\" [matColumnDef]=\"columnConfig.key\">\n\n <!-- if sortable column header -->\n <ng-container *ngIf=\"isFeatureEnabled(columnConfig.sort); else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort?.position === 'start' ? 'before' : 'after'\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-container>\n\n <!-- else not sortable -->\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-template>\n\n <!-- header value-->\n <ng-template #headerValue>\n <lib-column-view [config]=\"columnConfig.headerView\"\n [value]=\"columnConfig.name\">\n </lib-column-view>\n </ng-template>\n\n <!-- column value \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u043E\u043B\u043E\u043D\u043E\u043A \u043D\u0443\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437 getView(rowIndex, columnConfig.key) \u0442\u0430\u043C \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0443\u0436\u0435\n \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F-->\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <lib-column-view\n [config]=\"tableView[element.id]?.get(columnConfig.key)\"\n [value]=\"element | dataPropertyGetter: columnConfig.key\">\n </lib-column-view>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n {{ totalRowProvider.totals.get(columnConfig.key) ?? '' }}\n </td>\n\n </ng-container>\n\n <!-- extra header top cell-->\n <ng-container *ngFor=\"let extraTopCell of _displayExtraHeaderTopCell; let index = index\"\n [matColumnDef]=\"extraTopCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellTopTemplate; context: {key: extraTopCell.replace(EXTRA_HEADER_CELL_TOP_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n\n\n <!-- extra header bottom cell-->\n <ng-container *ngFor=\"let extraBottomCell of _displayExtraHeaderBottomCell; let index = index\"\n [matColumnDef]=\"extraBottomCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellBottomTemplate; context: {key: extraBottomCell.replace(EXTRA_HEADER_CELL_BOTTOM_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n\n <!-- extra header top row-->\n <ng-container *ngIf=\"extraHeaderCellTopTemplate\">\n <tr mat-header-row *matHeaderRowDef=\"_displayExtraHeaderTopCell; sticky: this.tableConfig.stickyCfg?.header\"\n class=\"extra-header-top-row\">\n </tr>\n </ng-container>\n\n <!-- header row-->\n <tr mat-header-row *matHeaderRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.header\"\n [style]=\"_headerStyle\" [ngClass]=\"_headerClass\">\n </tr>\n\n <!-- extra header bottom row -->\n <ng-container *ngIf=\"extraHeaderCellBottomTemplate\">\n <tr mat-header-row\n *matHeaderRowDef=\"_displayExtraHeaderBottomCell; sticky: this.tableConfig.stickyCfg?.header\">\n </tr>\n </ng-container>\n\n <tr mat-row #rowLink\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event, row)\"\n *matRowDef=\"let row; columns: _displayColumns;\"\n (click)=\"handleRowClick(row)\"\n (mouseenter)=\"onRowEnter(row)\"\n (mouseleave)=\"onRowLeave(row)\"\n [ngClass]=\"rowNgClass(row)\"\n [style]=\"rowStyle(row)\">\n </tr>\n\n <!--expanded-row-->\n <ng-container matColumnDef=\"expandedRow\">\n <td mat-cell class=\"expanded-cell\" *matCellDef=\"let element\" [attr.colspan]=\"_displayColumns.length\"\n style=\"padding-right: 0!important;\">\n <div class=\"row-detail\"\n [@detailExpand]=\"element.rowSrc === highlighted ? expandedStateEnum.EXPANDED : expandedStateEnum.COLLAPSED\">\n <!-- timeline continuation -->\n <div *ngIf=\"timelineProvider.isEnabled\"\n class=\"aur-timeline-continuation\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n <!-- lazy-load of details -->\n <ng-container *ngIf=\"element.rowSrc === highlighted\">\n <ng-container *ngTemplateOutlet=\"extendedRowTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"extendedRowTemplate\">\n <tr mat-row class=\"expanded-row\" *matRowDef=\"let row; columns: ['expandedRow']\"></tr>\n </ng-container>\n <!--expanded-row-->\n\n <ng-container *ngIf=\"totalRowProvider.isEnabled\">\n <tr mat-footer-row *matFooterRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.total\"\n [style]=\"_totalStyle\" [ngClass]=\"_totalClass\"\n [style.display]=\"isTotalRowVisible() ? null : 'none'\"></tr>\n </ng-container>\n\n <!--sub-footer-row-->\n <ng-container matColumnDef=\"subFooterRow\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"_displayColumns.length\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSubFooterRow]\"></ng-content>\n </ng-container>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subFooterRowTemplate\">\n <tr mat-footer-row *matFooterRowDef=\"['subFooterRow']; sticky: this.tableConfig.stickyCfg?.subFooter\"></tr>\n </ng-container>\n <!-- sub-footer-row END-->\n </table>\n </div>\n </ng-container>\n\n <!-- Pagination -->\n @if (this.paginationProvider.isEnabled && !externalPaginator) {\n <mat-paginator [ngClass]=\"{'hidePaginator': isTableBodyHide}\"\n [pageSizeOptions]=\"paginationProvider.sizes\"\n [pageSize]=\"paginationProvider.size\"\n [style]=\"tableConfig?.paginationCfg?.style\"\n [length]=\"paginatorState?.length\"\n [pageIndex]=\"paginatorState?.pageIndex\"\n (page)=\"onPageChangeInternal($event)\"\n showFirstLastButtons>\n </mat-paginator>\n }\n</div>\n", styles: [".aur-mat-table{display:flex;flex-direction:column}.aur-mat-table.sticky-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.sticky-pagination{flex-grow:1;overflow:auto}.aur-mat-table th,td{padding-right:4px!important;padding-left:4px!important}.aur-mat-table .new-color td.mat-mdc-cell,.aur-mat-table .new-color td.mat-mdc-footer-cell{color:inherit}.aur-mat-table mat-form-field{width:100%}.aur-mat-table .text-right{text-align:right!important}.aur-mat-table .pointer{cursor:pointer}.aur-mat-table .flex-container{display:flex;align-items:center}.aur-mat-table .expanded-row{height:0}.aur-mat-table .expanded-row .expanded-cell{padding-right:0!important;padding-left:0!important}.aur-mat-table .row-detail{overflow:hidden;display:flex}.aur-mat-table .clear-bottom-border{border-bottom:none}.aur-mat-table .table-settings-button{position:absolute;right:4px;top:12px;cursor:pointer;border-radius:4px;padding-bottom:2px;padding-top:2px;z-index:9999999999}.mat-mdc-header-row th:last-child{padding-right:25px!important}.aur-mat-table .search-container{display:flex;gap:8px;align-items:center}.aur-mat-table .extra-header-top-row th{border-bottom:none}.aur-mat-table .drag-icon{cursor:grab}.hide-table-body tr:not(.mat-mdc-header-row){display:none!important}.hidePaginator{display:none}.aur-mat-table .drag-column{padding-left:8px;padding-right:8px;width:35px}.aur-mat-table .aur-timeline-cell{width:40px;min-width:40px;max-width:40px;padding:0!important}.aur-mat-table .aur-timeline-marker-container{display:flex;flex-direction:column;align-items:center;height:100%;min-height:48px}.aur-mat-table .aur-timeline-line{flex:1;min-height:8px}.aur-mat-table .aur-timeline-marker-default{width:12px;height:12px;border-radius:50%;flex-shrink:0}.aur-mat-table .aur-timeline-continuation{border-left-style:solid;align-self:stretch;margin-left:20px;flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i11.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i11.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: ColumnViewComponent, selector: "lib-column-view", inputs: ["config", "value"] }, { kind: "component", type: IconViewComponent, selector: "lib-icon-view", inputs: ["view"] }, { kind: "pipe", type: DataPropertyGetterPipe, name: "dataPropertyGetter" }], animations: [
|
|
1684
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: NgxAurMatTableComponent, isStandalone: false, selector: "aur-mat-table", inputs: { displayColumns: "displayColumns", extraHeaderCellTopTemplate: "extraHeaderCellTopTemplate", extraHeaderCellBottomTemplate: "extraHeaderCellBottomTemplate", tableConfig: "tableConfig", tableData: "tableData", extendedRowTemplate: "extendedRowTemplate", timelineMarkerTemplate: "timelineMarkerTemplate", paginatorState: "paginatorState", pageSource: "pageSource", externalPaginator: "externalPaginator", isTableBodyHide: "isTableBodyHide", highlight: "highlight" }, outputs: { sort: "sort", pageChange: "pageChange", rowAction: "rowAction", selectChange: "selectChange", selectAdded: "selectAdded", selectRemoved: "selectRemoved", selectedRowsAction: "selectedRowsAction", selectionModel: "selectionModel", rowClick: "rowClick", loadingChange: "loadingChange", pageError: "pageError", filterChange: "filterChange", columnOffsets: "columnOffsets", headerButton: "headerButton" }, queries: [{ propertyName: "subFooterRowTemplate", first: true, predicate: NgxTableSubFooterRowDirective, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, read: ElementRef }, { propertyName: "matPaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "rows", predicate: ["rowLink"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"aur-mat-table\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"isFeatureEnabled(tableConfig.filterCfg)\">\n <div class=\"search-container\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchPrefix]\"></ng-content>\n </ng-container>\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <mat-label>{{ tableConfig.filterCfg?.label }}</mat-label>\n <input matInput (keyup)=\"applySearchFilter($event)\"\n placeholder=\"{{tableConfig.filterCfg?.placeholder}}\"\n style=\"font-size: 18px;\">\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchSuffix]\"></ng-content>\n </ng-container>\n </div>\n </ng-container>\n\n\n <div class=\"table-container\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"headerButton.emit($event)\">\n {{ headerButtonProvider.icon }}\n </mat-icon>\n\n <!-- Table -->\n <table #table mat-table matSort\n [trackBy]=\"trackByRow\"\n [multiTemplateDataRows]=\"extendedRowTemplate !== null\"\n [dataSource]=\"tableDataSource\"\n (matSortChange)=\"sortTable($event)\"\n [style.height]=\"tableConfig.tableViewCfg?.height\"\n [style.max-height]=\"tableConfig.tableViewCfg?.maxHeight\"\n [style.min-height]=\"tableConfig.tableViewCfg?.minHeight\"\n [ngClass]=\"{'hide-table-body': isTableBodyHide}\">\n\n\n <!-- timeline-column-->\n <ng-container *ngIf=\"timelineProvider.isEnabled\" [matColumnDef]=\"timelineProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\">\n <div class=\"aur-timeline-marker-container\">\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineFirstId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.topColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.topGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n <ng-container *ngIf=\"timelineMarkerTemplate; else defaultMarker\">\n <ng-container *ngTemplateOutlet=\"timelineMarkerTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n <ng-template #defaultMarker>\n <div class=\"aur-timeline-marker-default\"\n [style.background-color]=\"timelineProvider.markerColor\">\n </div>\n </ng-template>\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineLastId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></td>\n </ng-container>\n\n <!-- drag-column-->\n <ng-container *ngIf=\"dragDropProvider.isEnabled && dragDropProvider.draggable\" [matColumnDef]=\"dragDropProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </th>\n\n <td mat-cell *matCellDef=\"let element;\" class=\"drag-column\"\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n <lib-icon-view draggable=\"true\"\n class=\"drag-icon\"\n [view]=\"dragDropProvider.dragIconView\"\n (dragstart)=\"onDragStart($event, element)\"\n (dragend)=\"onDragEnd($event, element)\">\n </lib-icon-view>\n\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- index-column-->\n <ng-container *ngIf=\"indexProvider.isEnabled\" [matColumnDef]=\"indexProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n <lib-column-view [config]=\"indexProvider.headerView\">\n {{ indexProvider.name }}\n </lib-column-view>\n </th>\n\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ element.id + indexProvider.offset }}\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(indexProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- selection-column-->\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider.isEnabled\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <div class=\"flex-container\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n <div\n *ngIf=\"tableConfig.selectionCfg?.showSelectedCount && selectionProvider.selection.hasValue()\">\n {{ selectionProvider.selection.selected.length }}\n <span\n *ngIf=\"tableConfig.selectionCfg?.showTotalCount !== false\">/{{ paginatorState?.length ? paginatorState?.length : tableDataSource.filteredData.length }}</span>\n </div>\n\n <div *ngIf=\"selectionProvider.selection.hasValue() && tableConfig?.selectionCfg?.actions\">\n <ng-container *ngFor=\"let action of tableConfig.selectionCfg!.actions\">\n <button mat-icon-button\n (click)=\"emitSelectedRowsAction(action.action, selectionProvider.selection.selected)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.visible !== false\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"$event.stopPropagation(); selectionProvider.selection.toggle(castSrc(row).rowSrc)\"\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selectionProvider.selection.toggle(castSrc(row).rowSrc) : null\"\n [checked]=\"selectionProvider.selection.isSelected(castSrc(row).rowSrc)\">\n </mat-checkbox>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- action column -->\n <ng-container *ngIf=\"rowActionsProvider.isEnabled\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" (click)=\"$event.stopPropagation()\" style=\"cursor: default\"\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n <ng-container *ngFor=\"let action of rowActionsProvider.actionView.get(element.id)\">\n <!-- action with dropdown menu -->\n <ng-container *ngIf=\"action.menu; else directAction\">\n <ng-container *ngIf=\"action.visible !== false\">\n <mat-menu #actionMenu=\"matMenu\">\n <ng-container *ngFor=\"let item of action.menu\">\n <button mat-menu-item\n *ngIf=\"item.visible !== false\"\n [disabled]=\"item.disabled === true\"\n (click)=\"emitMenuAction(item.action, element.rowSrc)\">\n <mat-icon *ngIf=\"item.icon\" [style.color]=\"item.icon.color\">\n {{ item.icon.name }}\n </mat-icon>\n <span>{{ item.text }}</span>\n </button>\n </ng-container>\n </mat-menu>\n <button *ngIf=\"action.icon.tooltip; else menuBtnPlain\" mat-icon-button\n [matMenuTriggerFor]=\"actionMenu\"\n [matTooltip]=\"action.icon.tooltip\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n <ng-template #menuBtnPlain>\n <button mat-icon-button [matMenuTriggerFor]=\"actionMenu\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- direct action (existing behavior) -->\n <ng-template #directAction>\n <ng-container *ngIf=\"action.visible !== false\">\n <button *ngIf=\"action.icon.tooltip; else directBtnPlain\" mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\n [matTooltip]=\"action.icon.tooltip\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n <ng-template #directBtnPlain>\n <button mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(rowActionsProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- value-icon-->\n <ng-container *ngFor=\"let columnConfig of tableConfig.columnsCfg\" [matColumnDef]=\"columnConfig.key\">\n\n <!-- if sortable column header -->\n <ng-container *ngIf=\"isFeatureEnabled(columnConfig.sort); else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort?.position === 'start' ? 'before' : 'after'\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-container>\n\n <!-- else not sortable -->\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-template>\n\n <!-- header value-->\n <ng-template #headerValue>\n <lib-column-view [config]=\"columnConfig.headerView\"\n [value]=\"columnConfig.name\">\n </lib-column-view>\n </ng-template>\n\n <!-- column value \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u043E\u043B\u043E\u043D\u043E\u043A \u043D\u0443\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437 getView(rowIndex, columnConfig.key) \u0442\u0430\u043C \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0443\u0436\u0435\n \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F-->\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <!-- \u043A\u043E\u043B\u043E\u043D\u043A\u0438 \u0431\u0435\u0437 valueView \u043C\u0438\u043D\u0443\u044E\u0442 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u044B \u044F\u0447\u0435\u0439\u043A\u0438: \u043B\u0451\u0433\u043A\u0438\u0439 span \u0434\u0435\u0448\u0435\u0432\u043B\u0435 \u043F\u0430\u0440\u044B \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u043E\u0432 \u0441 \u043E\u0431\u0451\u0440\u0442\u043A\u0430\u043C\u0438 -->\n <lib-column-view *ngIf=\"columnConfig.valueView; else plainCell\"\n [config]=\"tableView[element.id]?.get(columnConfig.key)\"\n [value]=\"element | dataPropertyGetter: columnConfig.key\">\n </lib-column-view>\n <ng-template #plainCell>\n <span class=\"aur-plain-cell\">{{ element | dataPropertyGetter: columnConfig.key }}</span>\n </ng-template>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n {{ totalRowProvider.totals.get(columnConfig.key) ?? '' }}\n </td>\n\n </ng-container>\n\n <!-- extra header top cell (\u0434\u0435\u0444\u044B \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430)-->\n <ng-container *ngIf=\"extraHeaderCellTopTemplate\">\n <ng-container *ngFor=\"let extraTopCell of _displayExtraHeaderTopCell; let index = index\"\n [matColumnDef]=\"extraTopCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellTopTemplate; context: {key: extraTopCell.replace(EXTRA_HEADER_CELL_TOP_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n\n\n <!-- extra header bottom cell (\u0434\u0435\u0444\u044B \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430)-->\n <ng-container *ngIf=\"extraHeaderCellBottomTemplate\">\n <ng-container *ngFor=\"let extraBottomCell of _displayExtraHeaderBottomCell; let index = index\"\n [matColumnDef]=\"extraBottomCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellBottomTemplate; context: {key: extraBottomCell.replace(EXTRA_HEADER_CELL_BOTTOM_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n\n <!-- extra header top row-->\n <ng-container *ngIf=\"extraHeaderCellTopTemplate\">\n <tr mat-header-row *matHeaderRowDef=\"_displayExtraHeaderTopCell; sticky: this.tableConfig.stickyCfg?.header\"\n class=\"extra-header-top-row\">\n </tr>\n </ng-container>\n\n <!-- header row-->\n <tr mat-header-row *matHeaderRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.header\"\n [style]=\"_headerStyle\" [ngClass]=\"_headerClass\">\n </tr>\n\n <!-- extra header bottom row -->\n <ng-container *ngIf=\"extraHeaderCellBottomTemplate\">\n <tr mat-header-row\n *matHeaderRowDef=\"_displayExtraHeaderBottomCell; sticky: this.tableConfig.stickyCfg?.header\">\n </tr>\n </ng-container>\n\n <tr mat-row #rowLink\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event, row)\"\n *matRowDef=\"let row; columns: _displayColumns;\"\n (click)=\"handleRowClick(row)\"\n (mouseenter)=\"onRowEnter(row)\"\n (mouseleave)=\"onRowLeave(row)\"\n [ngClass]=\"rowNgClass(row)\"\n [style]=\"rowStyle(row)\">\n </tr>\n\n <!--expanded-row (\u0434\u0435\u0444 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430)-->\n <ng-container *ngIf=\"extendedRowTemplate\">\n <ng-container matColumnDef=\"expandedRow\">\n <td mat-cell class=\"expanded-cell\" *matCellDef=\"let element\" [attr.colspan]=\"_displayColumns.length\"\n style=\"padding-right: 0!important;\">\n <div class=\"row-detail\"\n [@detailExpand]=\"element.rowSrc === highlighted ? expandedStateEnum.EXPANDED : expandedStateEnum.COLLAPSED\">\n <!-- timeline continuation -->\n <div *ngIf=\"timelineProvider.isEnabled\"\n class=\"aur-timeline-continuation\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n <!-- lazy-load of details -->\n <ng-container *ngIf=\"element.rowSrc === highlighted\">\n <ng-container *ngTemplateOutlet=\"extendedRowTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"extendedRowTemplate\">\n <tr mat-row class=\"expanded-row\" *matRowDef=\"let row; columns: ['expandedRow']\"></tr>\n </ng-container>\n <!--expanded-row-->\n\n <ng-container *ngIf=\"totalRowProvider.isEnabled\">\n <tr mat-footer-row *matFooterRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.total\"\n [style]=\"_totalStyle\" [ngClass]=\"_totalClass\"\n [style.display]=\"isTotalRowVisible() ? null : 'none'\"></tr>\n </ng-container>\n\n <!--sub-footer-row (\u0434\u0435\u0444 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430)-->\n <ng-container *ngIf=\"subFooterRowTemplate\">\n <ng-container matColumnDef=\"subFooterRow\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"_displayColumns.length\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSubFooterRow]\"></ng-content>\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"subFooterRowTemplate\">\n <tr mat-footer-row *matFooterRowDef=\"['subFooterRow']; sticky: this.tableConfig.stickyCfg?.subFooter\"></tr>\n </ng-container>\n <!-- sub-footer-row END-->\n </table>\n </div>\n </ng-container>\n\n <!-- Pagination -->\n @if (this.paginationProvider.isEnabled && !externalPaginator) {\n <mat-paginator [ngClass]=\"{'hidePaginator': isTableBodyHide}\"\n [pageSizeOptions]=\"paginationProvider.sizes\"\n [pageSize]=\"paginationProvider.size\"\n [style]=\"tableConfig?.paginationCfg?.style\"\n [length]=\"paginatorState?.length\"\n [pageIndex]=\"paginatorState?.pageIndex\"\n (page)=\"onPageChangeInternal($event)\"\n showFirstLastButtons>\n </mat-paginator>\n }\n</div>\n", styles: ["@charset \"UTF-8\";.aur-mat-table{display:flex;flex-direction:column}.aur-mat-table.sticky-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.sticky-pagination{flex-grow:1;overflow:auto}.aur-mat-table th,td{padding-right:4px!important;padding-left:4px!important}.aur-mat-table .new-color td.mat-mdc-cell,.aur-mat-table .new-color td.mat-mdc-footer-cell{color:inherit}.aur-mat-table mat-form-field{width:100%}.aur-mat-table .text-right{text-align:right!important}.aur-mat-table .pointer{cursor:pointer}.aur-mat-table .flex-container{display:flex;align-items:center}.aur-mat-table .aur-plain-cell{margin-left:4px}.aur-mat-table .expanded-row{height:0}.aur-mat-table .expanded-row .expanded-cell{padding-right:0!important;padding-left:0!important}.aur-mat-table .row-detail{overflow:hidden;display:flex}.aur-mat-table .clear-bottom-border{border-bottom:none}.aur-mat-table .table-settings-button{position:absolute;right:4px;top:12px;cursor:pointer;border-radius:4px;padding-bottom:2px;padding-top:2px;z-index:9999999999}.mat-mdc-header-row th:last-child{padding-right:25px!important}.aur-mat-table .search-container{display:flex;gap:8px;align-items:center}.aur-mat-table .extra-header-top-row th{border-bottom:none}.aur-mat-table .drag-icon{cursor:grab}.hide-table-body tr:not(.mat-mdc-header-row){display:none!important}.hidePaginator{display:none}.aur-mat-table .drag-column{padding-left:8px;padding-right:8px;width:35px}.aur-mat-table .aur-timeline-cell{width:40px;min-width:40px;max-width:40px;padding:0!important}.aur-mat-table .aur-timeline-marker-container{display:flex;flex-direction:column;align-items:center;height:100%;min-height:48px}.aur-mat-table .aur-timeline-line{flex:1;min-height:8px}.aur-mat-table .aur-timeline-marker-default{width:12px;height:12px;border-radius:50%;flex-shrink:0}.aur-mat-table .aur-timeline-continuation{border-left-style:solid;align-self:stretch;margin-left:20px;flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i11.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i11.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: ColumnViewComponent, selector: "lib-column-view", inputs: ["config", "value"] }, { kind: "component", type: IconViewComponent, selector: "lib-icon-view", inputs: ["view"] }, { kind: "pipe", type: DataPropertyGetterPipe, name: "dataPropertyGetter" }], animations: [
|
|
1688
1685
|
trigger('detailExpand', [
|
|
1689
1686
|
state(ExpandState.COLLAPSED, style({ height: '0px', minHeight: '0' })),
|
|
1690
1687
|
state(ExpandState.EXPANDED, style({ height: '*' })),
|
|
@@ -1700,7 +1697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
1700
1697
|
state(ExpandState.EXPANDED, style({ height: '*' })),
|
|
1701
1698
|
transition(`${ExpandState.EXPANDED} <=> ${ExpandState.COLLAPSED}`, animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1702
1699
|
]),
|
|
1703
|
-
], standalone: false, template: "<div class=\"aur-mat-table\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"isFeatureEnabled(tableConfig.filterCfg)\">\n <div class=\"search-container\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchPrefix]\"></ng-content>\n </ng-container>\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <mat-label>{{ tableConfig.filterCfg?.label }}</mat-label>\n <input matInput (keyup)=\"applySearchFilter($event)\"\n placeholder=\"{{tableConfig.filterCfg?.placeholder}}\"\n style=\"font-size: 18px;\">\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchSuffix]\"></ng-content>\n </ng-container>\n </div>\n </ng-container>\n\n\n <div class=\"table-container\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"headerButton.emit($event)\">\n {{ headerButtonProvider.icon }}\n </mat-icon>\n\n <!-- Table -->\n <table #table mat-table matSort\n [multiTemplateDataRows]=\"extendedRowTemplate !== null\"\n [dataSource]=\"tableDataSource\"\n (matSortChange)=\"sortTable($event)\"\n [style.height]=\"tableConfig.tableViewCfg?.height\"\n [style.max-height]=\"tableConfig.tableViewCfg?.maxHeight\"\n [style.min-height]=\"tableConfig.tableViewCfg?.minHeight\"\n [ngClass]=\"{'hide-table-body': isTableBodyHide}\">\n\n\n <!-- timeline-column-->\n <ng-container *ngIf=\"timelineProvider.isEnabled\" [matColumnDef]=\"timelineProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\">\n <div class=\"aur-timeline-marker-container\">\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineFirstId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.topColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.topGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n <ng-container *ngIf=\"timelineMarkerTemplate; else defaultMarker\">\n <ng-container *ngTemplateOutlet=\"timelineMarkerTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n <ng-template #defaultMarker>\n <div class=\"aur-timeline-marker-default\"\n [style.background-color]=\"timelineProvider.markerColor\">\n </div>\n </ng-template>\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineLastId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></td>\n </ng-container>\n\n <!-- drag-column-->\n <ng-container *ngIf=\"dragDropProvider.isEnabled && dragDropProvider.draggable\" [matColumnDef]=\"dragDropProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </th>\n\n <td mat-cell *matCellDef=\"let element;\" class=\"drag-column\"\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n <lib-icon-view draggable=\"true\"\n class=\"drag-icon\"\n [view]=\"dragDropProvider.dragIconView\"\n (dragstart)=\"onDragStart($event, element)\"\n (dragend)=\"onDragEnd($event, element)\">\n </lib-icon-view>\n\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- index-column-->\n <ng-container *ngIf=\"indexProvider.isEnabled\" [matColumnDef]=\"indexProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n <lib-column-view [config]=\"indexProvider.headerView\">\n {{ indexProvider.name }}\n </lib-column-view>\n </th>\n\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ element.id + indexProvider.offset }}\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(indexProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- selection-column-->\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider.isEnabled\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <div class=\"flex-container\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n <div\n *ngIf=\"tableConfig.selectionCfg?.showSelectedCount && selectionProvider.selection.hasValue()\">\n {{ selectionProvider.selection.selected.length }}\n <span\n *ngIf=\"tableConfig.selectionCfg?.showTotalCount !== false\">/{{ paginatorState?.length ? paginatorState?.length : tableDataSource.filteredData.length }}</span>\n </div>\n\n <div *ngIf=\"selectionProvider.selection.hasValue() && tableConfig?.selectionCfg?.actions\">\n <ng-container *ngFor=\"let action of tableConfig.selectionCfg!.actions\">\n <button mat-icon-button\n (click)=\"emitSelectedRowsAction(action.action, selectionProvider.selection.selected)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.visible !== false\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"$event.stopPropagation(); selectionProvider.selection.toggle(castSrc(row).rowSrc)\"\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selectionProvider.selection.toggle(castSrc(row).rowSrc) : null\"\n [checked]=\"selectionProvider.selection.isSelected(castSrc(row).rowSrc)\">\n </mat-checkbox>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- action column -->\n <ng-container *ngIf=\"rowActionsProvider.isEnabled\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" (click)=\"$event.stopPropagation()\" style=\"cursor: default\"\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n <ng-container *ngFor=\"let action of rowActionsProvider.actionView.get(element.id)\">\n <!-- action with dropdown menu -->\n <ng-container *ngIf=\"action.menu; else directAction\">\n <ng-container *ngIf=\"action.visible !== false\">\n <mat-menu #actionMenu=\"matMenu\">\n <ng-container *ngFor=\"let item of action.menu\">\n <button mat-menu-item\n *ngIf=\"item.visible !== false\"\n [disabled]=\"item.disabled === true\"\n (click)=\"emitMenuAction(item.action, element.rowSrc)\">\n <mat-icon *ngIf=\"item.icon\" [style.color]=\"item.icon.color\">\n {{ item.icon.name }}\n </mat-icon>\n <span>{{ item.text }}</span>\n </button>\n </ng-container>\n </mat-menu>\n <button mat-icon-button\n [matMenuTriggerFor]=\"actionMenu\"\n [matTooltip]=\"action.icon.tooltip || ''\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-container>\n </ng-container>\n\n <!-- direct action (existing behavior) -->\n <ng-template #directAction>\n <button mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.visible !== false\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-template>\n </ng-container>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(rowActionsProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- value-icon-->\n <ng-container *ngFor=\"let columnConfig of tableConfig.columnsCfg\" [matColumnDef]=\"columnConfig.key\">\n\n <!-- if sortable column header -->\n <ng-container *ngIf=\"isFeatureEnabled(columnConfig.sort); else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort?.position === 'start' ? 'before' : 'after'\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-container>\n\n <!-- else not sortable -->\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-template>\n\n <!-- header value-->\n <ng-template #headerValue>\n <lib-column-view [config]=\"columnConfig.headerView\"\n [value]=\"columnConfig.name\">\n </lib-column-view>\n </ng-template>\n\n <!-- column value \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u043E\u043B\u043E\u043D\u043E\u043A \u043D\u0443\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437 getView(rowIndex, columnConfig.key) \u0442\u0430\u043C \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0443\u0436\u0435\n \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F-->\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <lib-column-view\n [config]=\"tableView[element.id]?.get(columnConfig.key)\"\n [value]=\"element | dataPropertyGetter: columnConfig.key\">\n </lib-column-view>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n {{ totalRowProvider.totals.get(columnConfig.key) ?? '' }}\n </td>\n\n </ng-container>\n\n <!-- extra header top cell-->\n <ng-container *ngFor=\"let extraTopCell of _displayExtraHeaderTopCell; let index = index\"\n [matColumnDef]=\"extraTopCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellTopTemplate; context: {key: extraTopCell.replace(EXTRA_HEADER_CELL_TOP_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n\n\n <!-- extra header bottom cell-->\n <ng-container *ngFor=\"let extraBottomCell of _displayExtraHeaderBottomCell; let index = index\"\n [matColumnDef]=\"extraBottomCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellBottomTemplate; context: {key: extraBottomCell.replace(EXTRA_HEADER_CELL_BOTTOM_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n\n <!-- extra header top row-->\n <ng-container *ngIf=\"extraHeaderCellTopTemplate\">\n <tr mat-header-row *matHeaderRowDef=\"_displayExtraHeaderTopCell; sticky: this.tableConfig.stickyCfg?.header\"\n class=\"extra-header-top-row\">\n </tr>\n </ng-container>\n\n <!-- header row-->\n <tr mat-header-row *matHeaderRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.header\"\n [style]=\"_headerStyle\" [ngClass]=\"_headerClass\">\n </tr>\n\n <!-- extra header bottom row -->\n <ng-container *ngIf=\"extraHeaderCellBottomTemplate\">\n <tr mat-header-row\n *matHeaderRowDef=\"_displayExtraHeaderBottomCell; sticky: this.tableConfig.stickyCfg?.header\">\n </tr>\n </ng-container>\n\n <tr mat-row #rowLink\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event, row)\"\n *matRowDef=\"let row; columns: _displayColumns;\"\n (click)=\"handleRowClick(row)\"\n (mouseenter)=\"onRowEnter(row)\"\n (mouseleave)=\"onRowLeave(row)\"\n [ngClass]=\"rowNgClass(row)\"\n [style]=\"rowStyle(row)\">\n </tr>\n\n <!--expanded-row-->\n <ng-container matColumnDef=\"expandedRow\">\n <td mat-cell class=\"expanded-cell\" *matCellDef=\"let element\" [attr.colspan]=\"_displayColumns.length\"\n style=\"padding-right: 0!important;\">\n <div class=\"row-detail\"\n [@detailExpand]=\"element.rowSrc === highlighted ? expandedStateEnum.EXPANDED : expandedStateEnum.COLLAPSED\">\n <!-- timeline continuation -->\n <div *ngIf=\"timelineProvider.isEnabled\"\n class=\"aur-timeline-continuation\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n <!-- lazy-load of details -->\n <ng-container *ngIf=\"element.rowSrc === highlighted\">\n <ng-container *ngTemplateOutlet=\"extendedRowTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"extendedRowTemplate\">\n <tr mat-row class=\"expanded-row\" *matRowDef=\"let row; columns: ['expandedRow']\"></tr>\n </ng-container>\n <!--expanded-row-->\n\n <ng-container *ngIf=\"totalRowProvider.isEnabled\">\n <tr mat-footer-row *matFooterRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.total\"\n [style]=\"_totalStyle\" [ngClass]=\"_totalClass\"\n [style.display]=\"isTotalRowVisible() ? null : 'none'\"></tr>\n </ng-container>\n\n <!--sub-footer-row-->\n <ng-container matColumnDef=\"subFooterRow\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"_displayColumns.length\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSubFooterRow]\"></ng-content>\n </ng-container>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subFooterRowTemplate\">\n <tr mat-footer-row *matFooterRowDef=\"['subFooterRow']; sticky: this.tableConfig.stickyCfg?.subFooter\"></tr>\n </ng-container>\n <!-- sub-footer-row END-->\n </table>\n </div>\n </ng-container>\n\n <!-- Pagination -->\n @if (this.paginationProvider.isEnabled && !externalPaginator) {\n <mat-paginator [ngClass]=\"{'hidePaginator': isTableBodyHide}\"\n [pageSizeOptions]=\"paginationProvider.sizes\"\n [pageSize]=\"paginationProvider.size\"\n [style]=\"tableConfig?.paginationCfg?.style\"\n [length]=\"paginatorState?.length\"\n [pageIndex]=\"paginatorState?.pageIndex\"\n (page)=\"onPageChangeInternal($event)\"\n showFirstLastButtons>\n </mat-paginator>\n }\n</div>\n", styles: [".aur-mat-table{display:flex;flex-direction:column}.aur-mat-table.sticky-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.sticky-pagination{flex-grow:1;overflow:auto}.aur-mat-table th,td{padding-right:4px!important;padding-left:4px!important}.aur-mat-table .new-color td.mat-mdc-cell,.aur-mat-table .new-color td.mat-mdc-footer-cell{color:inherit}.aur-mat-table mat-form-field{width:100%}.aur-mat-table .text-right{text-align:right!important}.aur-mat-table .pointer{cursor:pointer}.aur-mat-table .flex-container{display:flex;align-items:center}.aur-mat-table .expanded-row{height:0}.aur-mat-table .expanded-row .expanded-cell{padding-right:0!important;padding-left:0!important}.aur-mat-table .row-detail{overflow:hidden;display:flex}.aur-mat-table .clear-bottom-border{border-bottom:none}.aur-mat-table .table-settings-button{position:absolute;right:4px;top:12px;cursor:pointer;border-radius:4px;padding-bottom:2px;padding-top:2px;z-index:9999999999}.mat-mdc-header-row th:last-child{padding-right:25px!important}.aur-mat-table .search-container{display:flex;gap:8px;align-items:center}.aur-mat-table .extra-header-top-row th{border-bottom:none}.aur-mat-table .drag-icon{cursor:grab}.hide-table-body tr:not(.mat-mdc-header-row){display:none!important}.hidePaginator{display:none}.aur-mat-table .drag-column{padding-left:8px;padding-right:8px;width:35px}.aur-mat-table .aur-timeline-cell{width:40px;min-width:40px;max-width:40px;padding:0!important}.aur-mat-table .aur-timeline-marker-container{display:flex;flex-direction:column;align-items:center;height:100%;min-height:48px}.aur-mat-table .aur-timeline-line{flex:1;min-height:8px}.aur-mat-table .aur-timeline-marker-default{width:12px;height:12px;border-radius:50%;flex-shrink:0}.aur-mat-table .aur-timeline-continuation{border-left-style:solid;align-self:stretch;margin-left:20px;flex-shrink:0}\n"] }]
|
|
1700
|
+
], standalone: false, template: "<div class=\"aur-mat-table\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"isFeatureEnabled(tableConfig.filterCfg)\">\n <div class=\"search-container\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchPrefix]\"></ng-content>\n </ng-container>\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <mat-label>{{ tableConfig.filterCfg?.label }}</mat-label>\n <input matInput (keyup)=\"applySearchFilter($event)\"\n placeholder=\"{{tableConfig.filterCfg?.placeholder}}\"\n style=\"font-size: 18px;\">\n <mat-icon matPrefix>search</mat-icon>\n </mat-form-field>\n <ng-container>\n <ng-content select=\"[ngxAurTableSearchSuffix]\"></ng-content>\n </ng-container>\n </div>\n </ng-container>\n\n\n <div class=\"table-container\"\n [ngClass]=\"{'sticky-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'sticky'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"headerButton.emit($event)\">\n {{ headerButtonProvider.icon }}\n </mat-icon>\n\n <!-- Table -->\n <table #table mat-table matSort\n [trackBy]=\"trackByRow\"\n [multiTemplateDataRows]=\"extendedRowTemplate !== null\"\n [dataSource]=\"tableDataSource\"\n (matSortChange)=\"sortTable($event)\"\n [style.height]=\"tableConfig.tableViewCfg?.height\"\n [style.max-height]=\"tableConfig.tableViewCfg?.maxHeight\"\n [style.min-height]=\"tableConfig.tableViewCfg?.minHeight\"\n [ngClass]=\"{'hide-table-body': isTableBodyHide}\">\n\n\n <!-- timeline-column-->\n <ng-container *ngIf=\"timelineProvider.isEnabled\" [matColumnDef]=\"timelineProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\">\n <div class=\"aur-timeline-marker-container\">\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineFirstId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.topColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.topGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n <ng-container *ngIf=\"timelineMarkerTemplate; else defaultMarker\">\n <ng-container *ngTemplateOutlet=\"timelineMarkerTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n <ng-template #defaultMarker>\n <div class=\"aur-timeline-marker-default\"\n [style.background-color]=\"timelineProvider.markerColor\">\n </div>\n </ng-template>\n\n <div class=\"aur-timeline-line\"\n *ngIf=\"element.id !== _timelineLastId\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef class=\"aur-timeline-cell\"\n [style.width]=\"timelineProvider.size?.width\"\n [style.min-width]=\"timelineProvider.size?.minWidth\"\n [style.max-width]=\"timelineProvider.size?.maxWidth\"></td>\n </ng-container>\n\n <!-- drag-column-->\n <ng-container *ngIf=\"dragDropProvider.isEnabled && dragDropProvider.draggable\" [matColumnDef]=\"dragDropProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </th>\n\n <td mat-cell *matCellDef=\"let element;\" class=\"drag-column\"\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n <lib-icon-view draggable=\"true\"\n class=\"drag-icon\"\n [view]=\"dragDropProvider.dragIconView\"\n (dragstart)=\"onDragStart($event, element)\"\n (dragend)=\"onDragEnd($event, element)\">\n </lib-icon-view>\n\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"dragDropProvider.size?.width\"\n [style.min-width]=\"dragDropProvider.size?.minWidth\"\n [style.max-width]=\"dragDropProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- index-column-->\n <ng-container *ngIf=\"indexProvider.isEnabled\" [matColumnDef]=\"indexProvider.COLUMN_NAME\">\n\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n <lib-column-view [config]=\"indexProvider.headerView\">\n {{ indexProvider.name }}\n </lib-column-view>\n </th>\n\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ element.id + indexProvider.offset }}\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"indexProvider.size?.width\"\n [style.min-width]=\"indexProvider.size?.minWidth\"\n [style.max-width]=\"indexProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(indexProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- selection-column-->\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider.isEnabled\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <div class=\"flex-container\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n <div\n *ngIf=\"tableConfig.selectionCfg?.showSelectedCount && selectionProvider.selection.hasValue()\">\n {{ selectionProvider.selection.selected.length }}\n <span\n *ngIf=\"tableConfig.selectionCfg?.showTotalCount !== false\">/{{ paginatorState?.length ? paginatorState?.length : tableDataSource.filteredData.length }}</span>\n </div>\n\n <div *ngIf=\"selectionProvider.selection.hasValue() && tableConfig?.selectionCfg?.actions\">\n <ng-container *ngFor=\"let action of tableConfig.selectionCfg!.actions\">\n <button mat-icon-button\n (click)=\"emitSelectedRowsAction(action.action, selectionProvider.selection.selected)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.visible !== false\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"$event.stopPropagation(); selectionProvider.selection.toggle(castSrc(row).rowSrc)\"\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selectionProvider.selection.toggle(castSrc(row).rowSrc) : null\"\n [checked]=\"selectionProvider.selection.isSelected(castSrc(row).rowSrc)\">\n </mat-checkbox>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"selectionProvider.size?.width\"\n [style.min-width]=\"selectionProvider.size?.minWidth\"\n [style.max-width]=\"selectionProvider.size?.maxWidth\">\n </td>\n </ng-container>\n\n <!-- action column -->\n <ng-container *ngIf=\"rowActionsProvider.isEnabled\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\"></th>\n <td mat-cell *matCellDef=\"let element\" (click)=\"$event.stopPropagation()\" style=\"cursor: default\"\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n <ng-container *ngFor=\"let action of rowActionsProvider.actionView.get(element.id)\">\n <!-- action with dropdown menu -->\n <ng-container *ngIf=\"action.menu; else directAction\">\n <ng-container *ngIf=\"action.visible !== false\">\n <mat-menu #actionMenu=\"matMenu\">\n <ng-container *ngFor=\"let item of action.menu\">\n <button mat-menu-item\n *ngIf=\"item.visible !== false\"\n [disabled]=\"item.disabled === true\"\n (click)=\"emitMenuAction(item.action, element.rowSrc)\">\n <mat-icon *ngIf=\"item.icon\" [style.color]=\"item.icon.color\">\n {{ item.icon.name }}\n </mat-icon>\n <span>{{ item.text }}</span>\n </button>\n </ng-container>\n </mat-menu>\n <button *ngIf=\"action.icon.tooltip; else menuBtnPlain\" mat-icon-button\n [matMenuTriggerFor]=\"actionMenu\"\n [matTooltip]=\"action.icon.tooltip\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n <ng-template #menuBtnPlain>\n <button mat-icon-button [matMenuTriggerFor]=\"actionMenu\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- direct action (existing behavior) -->\n <ng-template #directAction>\n <ng-container *ngIf=\"action.visible !== false\">\n <button *ngIf=\"action.icon.tooltip; else directBtnPlain\" mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\n [matTooltip]=\"action.icon.tooltip\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n <ng-template #directBtnPlain>\n <button mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"rowActionsProvider.size?.width\"\n [style.min-width]=\"rowActionsProvider.size?.minWidth\"\n [style.max-width]=\"rowActionsProvider.size?.maxWidth\">\n {{ totalRowProvider.totals.get(rowActionsProvider.COLUMN_NAME) ?? '' }}\n </td>\n </ng-container>\n\n <!-- value-icon-->\n <ng-container *ngFor=\"let columnConfig of tableConfig.columnsCfg\" [matColumnDef]=\"columnConfig.key\">\n\n <!-- if sortable column header -->\n <ng-container *ngIf=\"isFeatureEnabled(columnConfig.sort); else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort?.position === 'start' ? 'before' : 'after'\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-container>\n\n <!-- else not sortable -->\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\n </th>\n </ng-template>\n\n <!-- header value-->\n <ng-template #headerValue>\n <lib-column-view [config]=\"columnConfig.headerView\"\n [value]=\"columnConfig.name\">\n </lib-column-view>\n </ng-template>\n\n <!-- column value \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u043E\u043B\u043E\u043D\u043E\u043A \u043D\u0443\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437 getView(rowIndex, columnConfig.key) \u0442\u0430\u043C \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0443\u0436\u0435\n \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F-->\n <td mat-cell *matCellDef=\"let element;\"\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n <!-- \u043A\u043E\u043B\u043E\u043D\u043A\u0438 \u0431\u0435\u0437 valueView \u043C\u0438\u043D\u0443\u044E\u0442 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u044B \u044F\u0447\u0435\u0439\u043A\u0438: \u043B\u0451\u0433\u043A\u0438\u0439 span \u0434\u0435\u0448\u0435\u0432\u043B\u0435 \u043F\u0430\u0440\u044B \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u043E\u0432 \u0441 \u043E\u0431\u0451\u0440\u0442\u043A\u0430\u043C\u0438 -->\n <lib-column-view *ngIf=\"columnConfig.valueView; else plainCell\"\n [config]=\"tableView[element.id]?.get(columnConfig.key)\"\n [value]=\"element | dataPropertyGetter: columnConfig.key\">\n </lib-column-view>\n <ng-template #plainCell>\n <span class=\"aur-plain-cell\">{{ element | dataPropertyGetter: columnConfig.key }}</span>\n </ng-template>\n </td>\n\n <td mat-footer-cell *matFooterCellDef\n [style.width]=\"columnConfig.size?.width\"\n [style.min-width]=\"columnConfig.size?.minWidth\"\n [style.max-width]=\"columnConfig.size?.maxWidth\">\n {{ totalRowProvider.totals.get(columnConfig.key) ?? '' }}\n </td>\n\n </ng-container>\n\n <!-- extra header top cell (\u0434\u0435\u0444\u044B \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430)-->\n <ng-container *ngIf=\"extraHeaderCellTopTemplate\">\n <ng-container *ngFor=\"let extraTopCell of _displayExtraHeaderTopCell; let index = index\"\n [matColumnDef]=\"extraTopCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellTopTemplate; context: {key: extraTopCell.replace(EXTRA_HEADER_CELL_TOP_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n\n\n <!-- extra header bottom cell (\u0434\u0435\u0444\u044B \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430)-->\n <ng-container *ngIf=\"extraHeaderCellBottomTemplate\">\n <ng-container *ngFor=\"let extraBottomCell of _displayExtraHeaderBottomCell; let index = index\"\n [matColumnDef]=\"extraBottomCell\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"extraHeaderCellBottomTemplate; context: {key: extraBottomCell.replace(EXTRA_HEADER_CELL_BOTTOM_SUFFIX, ''), index: index}\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n\n <!-- extra header top row-->\n <ng-container *ngIf=\"extraHeaderCellTopTemplate\">\n <tr mat-header-row *matHeaderRowDef=\"_displayExtraHeaderTopCell; sticky: this.tableConfig.stickyCfg?.header\"\n class=\"extra-header-top-row\">\n </tr>\n </ng-container>\n\n <!-- header row-->\n <tr mat-header-row *matHeaderRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.header\"\n [style]=\"_headerStyle\" [ngClass]=\"_headerClass\">\n </tr>\n\n <!-- extra header bottom row -->\n <ng-container *ngIf=\"extraHeaderCellBottomTemplate\">\n <tr mat-header-row\n *matHeaderRowDef=\"_displayExtraHeaderBottomCell; sticky: this.tableConfig.stickyCfg?.header\">\n </tr>\n </ng-container>\n\n <tr mat-row #rowLink\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event, row)\"\n *matRowDef=\"let row; columns: _displayColumns;\"\n (click)=\"handleRowClick(row)\"\n (mouseenter)=\"onRowEnter(row)\"\n (mouseleave)=\"onRowLeave(row)\"\n [ngClass]=\"rowNgClass(row)\"\n [style]=\"rowStyle(row)\">\n </tr>\n\n <!--expanded-row (\u0434\u0435\u0444 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430)-->\n <ng-container *ngIf=\"extendedRowTemplate\">\n <ng-container matColumnDef=\"expandedRow\">\n <td mat-cell class=\"expanded-cell\" *matCellDef=\"let element\" [attr.colspan]=\"_displayColumns.length\"\n style=\"padding-right: 0!important;\">\n <div class=\"row-detail\"\n [@detailExpand]=\"element.rowSrc === highlighted ? expandedStateEnum.EXPANDED : expandedStateEnum.COLLAPSED\">\n <!-- timeline continuation -->\n <div *ngIf=\"timelineProvider.isEnabled\"\n class=\"aur-timeline-continuation\"\n [style.border-left-width.px]=\"timelineProvider.line.width\"\n [style.border-left-color]=\"_timelineGaps.get(element.id)?.bottomColor ?? timelineProvider.line.color\"\n [style.border-left-style]=\"_timelineGaps.get(element.id)?.bottomGap ? timelineProvider.line.gapStyle : timelineProvider.line.style\">\n </div>\n <!-- lazy-load of details -->\n <ng-container *ngIf=\"element.rowSrc === highlighted\">\n <ng-container *ngTemplateOutlet=\"extendedRowTemplate; context: {$implicit: element}\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"extendedRowTemplate\">\n <tr mat-row class=\"expanded-row\" *matRowDef=\"let row; columns: ['expandedRow']\"></tr>\n </ng-container>\n <!--expanded-row-->\n\n <ng-container *ngIf=\"totalRowProvider.isEnabled\">\n <tr mat-footer-row *matFooterRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.total\"\n [style]=\"_totalStyle\" [ngClass]=\"_totalClass\"\n [style.display]=\"isTotalRowVisible() ? null : 'none'\"></tr>\n </ng-container>\n\n <!--sub-footer-row (\u0434\u0435\u0444 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430)-->\n <ng-container *ngIf=\"subFooterRowTemplate\">\n <ng-container matColumnDef=\"subFooterRow\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"_displayColumns.length\">\n <ng-container>\n <ng-content select=\"[ngxAurTableSubFooterRow]\"></ng-content>\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"subFooterRowTemplate\">\n <tr mat-footer-row *matFooterRowDef=\"['subFooterRow']; sticky: this.tableConfig.stickyCfg?.subFooter\"></tr>\n </ng-container>\n <!-- sub-footer-row END-->\n </table>\n </div>\n </ng-container>\n\n <!-- Pagination -->\n @if (this.paginationProvider.isEnabled && !externalPaginator) {\n <mat-paginator [ngClass]=\"{'hidePaginator': isTableBodyHide}\"\n [pageSizeOptions]=\"paginationProvider.sizes\"\n [pageSize]=\"paginationProvider.size\"\n [style]=\"tableConfig?.paginationCfg?.style\"\n [length]=\"paginatorState?.length\"\n [pageIndex]=\"paginatorState?.pageIndex\"\n (page)=\"onPageChangeInternal($event)\"\n showFirstLastButtons>\n </mat-paginator>\n }\n</div>\n", styles: ["@charset \"UTF-8\";.aur-mat-table{display:flex;flex-direction:column}.aur-mat-table.sticky-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.sticky-pagination{flex-grow:1;overflow:auto}.aur-mat-table th,td{padding-right:4px!important;padding-left:4px!important}.aur-mat-table .new-color td.mat-mdc-cell,.aur-mat-table .new-color td.mat-mdc-footer-cell{color:inherit}.aur-mat-table mat-form-field{width:100%}.aur-mat-table .text-right{text-align:right!important}.aur-mat-table .pointer{cursor:pointer}.aur-mat-table .flex-container{display:flex;align-items:center}.aur-mat-table .aur-plain-cell{margin-left:4px}.aur-mat-table .expanded-row{height:0}.aur-mat-table .expanded-row .expanded-cell{padding-right:0!important;padding-left:0!important}.aur-mat-table .row-detail{overflow:hidden;display:flex}.aur-mat-table .clear-bottom-border{border-bottom:none}.aur-mat-table .table-settings-button{position:absolute;right:4px;top:12px;cursor:pointer;border-radius:4px;padding-bottom:2px;padding-top:2px;z-index:9999999999}.mat-mdc-header-row th:last-child{padding-right:25px!important}.aur-mat-table .search-container{display:flex;gap:8px;align-items:center}.aur-mat-table .extra-header-top-row th{border-bottom:none}.aur-mat-table .drag-icon{cursor:grab}.hide-table-body tr:not(.mat-mdc-header-row){display:none!important}.hidePaginator{display:none}.aur-mat-table .drag-column{padding-left:8px;padding-right:8px;width:35px}.aur-mat-table .aur-timeline-cell{width:40px;min-width:40px;max-width:40px;padding:0!important}.aur-mat-table .aur-timeline-marker-container{display:flex;flex-direction:column;align-items:center;height:100%;min-height:48px}.aur-mat-table .aur-timeline-line{flex:1;min-height:8px}.aur-mat-table .aur-timeline-marker-default{width:12px;height:12px;border-radius:50%;flex-shrink:0}.aur-mat-table .aur-timeline-continuation{border-left-style:solid;align-self:stretch;margin-left:20px;flex-shrink:0}\n"] }]
|
|
1704
1701
|
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }], propDecorators: { displayColumns: [{
|
|
1705
1702
|
type: Input
|
|
1706
1703
|
}], subFooterRowTemplate: [{
|
|
@@ -1814,7 +1811,6 @@ class NgxAurMatTableModule {
|
|
|
1814
1811
|
MatTooltipModule,
|
|
1815
1812
|
MatCheckboxModule,
|
|
1816
1813
|
MatFormFieldModule,
|
|
1817
|
-
DragDropModule,
|
|
1818
1814
|
MatMenuModule], exports: [NgxAurMatTableComponent,
|
|
1819
1815
|
DataPropertyGetterPipe,
|
|
1820
1816
|
NgxTableSubFooterRowDirective,
|
|
@@ -1830,7 +1826,6 @@ class NgxAurMatTableModule {
|
|
|
1830
1826
|
MatTooltipModule,
|
|
1831
1827
|
MatCheckboxModule,
|
|
1832
1828
|
MatFormFieldModule,
|
|
1833
|
-
DragDropModule,
|
|
1834
1829
|
MatMenuModule] }); }
|
|
1835
1830
|
}
|
|
1836
1831
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxAurMatTableModule, decorators: [{
|
|
@@ -1856,7 +1851,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
1856
1851
|
MatTooltipModule,
|
|
1857
1852
|
MatCheckboxModule,
|
|
1858
1853
|
MatFormFieldModule,
|
|
1859
|
-
DragDropModule,
|
|
1860
1854
|
MatMenuModule,
|
|
1861
1855
|
],
|
|
1862
1856
|
exports: [
|