ngx-aur-mat-table 19.0.16 → 19.0.19
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 +294 -28
- package/fesm2022/ngx-aur-mat-table.mjs.map +1 -1
- package/lib/factories/ActionViewFactory.d.ts +1 -0
- package/lib/model/AurPage.d.ts +20 -0
- package/lib/model/ColumnConfig.d.ts +24 -0
- package/lib/model/PaginatorState.d.ts +12 -0
- package/lib/model/RowStyleFactory.d.ts +13 -0
- package/lib/ngx-aur-mat-table.component.d.ts +38 -10
- package/lib/ngx-aur-mat-table.module.d.ts +2 -1
- package/lib/providers/ServerPageController.d.ts +37 -0
- package/lib/utils/ngx-aur-table-page-event.utils.d.ts +4 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -8,7 +8,8 @@ import * as i4 from '@angular/material/paginator';
|
|
|
8
8
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
9
9
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
10
10
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
11
|
-
import { first } from 'rxjs';
|
|
11
|
+
import { first, Subject, EMPTY } from 'rxjs';
|
|
12
|
+
import { tap, switchMap, map, catchError } from 'rxjs/operators';
|
|
12
13
|
import * as i1 from '@angular/common';
|
|
13
14
|
import { CommonModule } from '@angular/common';
|
|
14
15
|
import * as i2 from '@angular/material/icon';
|
|
@@ -23,6 +24,8 @@ import * as i3 from '@angular/material/tooltip';
|
|
|
23
24
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
24
25
|
import * as i10 from '@angular/material/checkbox';
|
|
25
26
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
27
|
+
import * as i11 from '@angular/material/menu';
|
|
28
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
26
29
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
27
30
|
|
|
28
31
|
class NgxAurTableConfigUtil {
|
|
@@ -41,6 +44,10 @@ class NgxAurTableConfigUtil {
|
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
class NgxAurTablePageEventUtils {
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Not needed with the `pageSource` API — the table performs the initial
|
|
49
|
+
* load itself. Kept for the legacy manual server-pagination path.
|
|
50
|
+
*/
|
|
44
51
|
static createEmpty(tableConfig) {
|
|
45
52
|
return {
|
|
46
53
|
pageSize: tableConfig.pageableCfg.size,
|
|
@@ -193,9 +200,19 @@ class ActionViewFactory {
|
|
|
193
200
|
return actionConfig.actions.map(action => ({
|
|
194
201
|
action: action.action(row.rowSrc),
|
|
195
202
|
icon: this.prepareIconConfig(action.icon, row.rowSrc),
|
|
196
|
-
display: action.display ? action.display(row.rowSrc) : 'show'
|
|
203
|
+
display: action.display ? action.display(row.rowSrc) : 'show',
|
|
204
|
+
menu: action.menu ? action.menu.map(item => this.prepareMenuItem(item, row.rowSrc)) : undefined
|
|
197
205
|
}));
|
|
198
206
|
}
|
|
207
|
+
static prepareMenuItem(item, value) {
|
|
208
|
+
return {
|
|
209
|
+
action: item.action(value),
|
|
210
|
+
text: item.text(value),
|
|
211
|
+
icon: item.icon ? this.prepareIconConfig(item.icon, value) : undefined,
|
|
212
|
+
display: item.display ? item.display(value) : 'show',
|
|
213
|
+
disabled: item.disabled ? item.disabled(value) : 'false'
|
|
214
|
+
};
|
|
215
|
+
}
|
|
199
216
|
static prepareIconConfig(iconSource, value) {
|
|
200
217
|
return {
|
|
201
218
|
name: iconSource.name(value),
|
|
@@ -333,6 +350,23 @@ class TableViewFactory {
|
|
|
333
350
|
}
|
|
334
351
|
}
|
|
335
352
|
|
|
353
|
+
class RowStyleFactory {
|
|
354
|
+
/**
|
|
355
|
+
* Resolves rowStyleCfg into a per-row array indexed by row.id.
|
|
356
|
+
* Returns an empty array when the hook is not configured.
|
|
357
|
+
*/
|
|
358
|
+
static toRowStyles(rows, tableConfig) {
|
|
359
|
+
const cfg = tableConfig.rowStyleCfg;
|
|
360
|
+
if (!cfg || (!cfg.class && !cfg.style)) {
|
|
361
|
+
return [];
|
|
362
|
+
}
|
|
363
|
+
return rows.map(row => ({
|
|
364
|
+
class: cfg.class ? cfg.class(row) : null,
|
|
365
|
+
style: cfg.style ? cfg.style(row) : {},
|
|
366
|
+
}));
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
336
370
|
/**
|
|
337
371
|
* Provides functionality to manage the index column in a table.
|
|
338
372
|
* The class can handle index configurations and modify the column array to include an index column.
|
|
@@ -829,6 +863,80 @@ class TimelineProviderDummy extends TimelineProvider {
|
|
|
829
863
|
}
|
|
830
864
|
}
|
|
831
865
|
|
|
866
|
+
class PaginatorState {
|
|
867
|
+
constructor(_length, _pageIndex) {
|
|
868
|
+
this._length = _length;
|
|
869
|
+
this._pageIndex = _pageIndex;
|
|
870
|
+
}
|
|
871
|
+
get length() {
|
|
872
|
+
return this._length;
|
|
873
|
+
}
|
|
874
|
+
get pageIndex() {
|
|
875
|
+
return this._pageIndex;
|
|
876
|
+
}
|
|
877
|
+
static empty() {
|
|
878
|
+
return new PaginatorState(0, 0);
|
|
879
|
+
}
|
|
880
|
+
static of(args) {
|
|
881
|
+
return new PaginatorState(args.total, args.pageIndex);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
class ServerPageController {
|
|
886
|
+
constructor(pageSource, callbacks) {
|
|
887
|
+
this.pageSource = pageSource;
|
|
888
|
+
this.callbacks = callbacks;
|
|
889
|
+
this.request$ = new Subject();
|
|
890
|
+
this.pageIndex = 0;
|
|
891
|
+
this.pageSize = 0;
|
|
892
|
+
}
|
|
893
|
+
start(initial) {
|
|
894
|
+
this.subscription?.unsubscribe();
|
|
895
|
+
this.pageIndex = initial.pageIndex ?? 0;
|
|
896
|
+
this.pageSize = initial.pageSize;
|
|
897
|
+
this.sort = initial.sort;
|
|
898
|
+
this.subscription = this.request$
|
|
899
|
+
.pipe(tap(() => this.callbacks.onLoading(true)), switchMap(req => this.pageSource(req).pipe(map(page => ({ req, page })), catchError(error => {
|
|
900
|
+
this.callbacks.onLoading(false);
|
|
901
|
+
this.callbacks.onError(error);
|
|
902
|
+
return EMPTY;
|
|
903
|
+
}))))
|
|
904
|
+
.subscribe(({ req, page }) => {
|
|
905
|
+
this.callbacks.onLoading(false);
|
|
906
|
+
this.callbacks.onResult({
|
|
907
|
+
content: page.content,
|
|
908
|
+
state: PaginatorState.of({
|
|
909
|
+
total: page.totalElements,
|
|
910
|
+
pageIndex: page.number ?? req.pageIndex,
|
|
911
|
+
}),
|
|
912
|
+
});
|
|
913
|
+
});
|
|
914
|
+
this.emit();
|
|
915
|
+
}
|
|
916
|
+
emit() {
|
|
917
|
+
this.request$.next({ pageIndex: this.pageIndex, pageSize: this.pageSize, sort: this.sort });
|
|
918
|
+
}
|
|
919
|
+
onPage(event) {
|
|
920
|
+
this.pageIndex = event.pageIndex;
|
|
921
|
+
this.pageSize = event.pageSize;
|
|
922
|
+
this.emit();
|
|
923
|
+
}
|
|
924
|
+
onSort(sort) {
|
|
925
|
+
this.sort = sort;
|
|
926
|
+
this.pageIndex = 0;
|
|
927
|
+
this.emit();
|
|
928
|
+
}
|
|
929
|
+
reload(opts) {
|
|
930
|
+
if (opts?.resetPageIndex !== false) {
|
|
931
|
+
this.pageIndex = 0;
|
|
932
|
+
}
|
|
933
|
+
this.emit();
|
|
934
|
+
}
|
|
935
|
+
stop() {
|
|
936
|
+
this.subscription?.unsubscribe();
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
832
940
|
class IconViewComponent {
|
|
833
941
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IconViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
834
942
|
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?.wrapper}\"\n [style.background-color]=\"view?.wrapper?.color\">\n <mat-icon *ngIf=\"view && view?.display !== 'none'\"\n [matTooltip]=\"view?.tooltip?.toString() || ''\"\n [style.color]=\"view?.color\">\n {{ view?.name }}\n </mat-icon>\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"] }] }); }
|
|
@@ -868,21 +976,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
868
976
|
}]
|
|
869
977
|
}] });
|
|
870
978
|
|
|
871
|
-
class PaginatorState {
|
|
872
|
-
constructor(_length, _pageIndex) {
|
|
873
|
-
this._length = _length;
|
|
874
|
-
this._pageIndex = _pageIndex;
|
|
875
|
-
}
|
|
876
|
-
get length() {
|
|
877
|
-
return this._length;
|
|
878
|
-
}
|
|
879
|
-
get pageIndex() {
|
|
880
|
-
return this._pageIndex;
|
|
881
|
-
}
|
|
882
|
-
static empty() {
|
|
883
|
-
return new PaginatorState(0, 0);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
979
|
var ExpandState;
|
|
887
980
|
(function (ExpandState) {
|
|
888
981
|
ExpandState["COLLAPSED"] = "collapsed";
|
|
@@ -895,6 +988,9 @@ class NgxAurMatTableComponent {
|
|
|
895
988
|
this._customDisplayColumnsEnabled = columns && columns.length > 0;
|
|
896
989
|
}
|
|
897
990
|
}
|
|
991
|
+
get activePaginator() {
|
|
992
|
+
return this.externalPaginator ?? this.matPaginator;
|
|
993
|
+
}
|
|
898
994
|
constructor(viewContainerRef, cdr) {
|
|
899
995
|
this.viewContainerRef = viewContainerRef;
|
|
900
996
|
this.cdr = cdr;
|
|
@@ -908,6 +1004,7 @@ class NgxAurMatTableComponent {
|
|
|
908
1004
|
this._customDisplayColumnsEnabled = false;
|
|
909
1005
|
this._tableName = 'unknown-table-name';
|
|
910
1006
|
this.tableView = [];
|
|
1007
|
+
this.rowStyles = [];
|
|
911
1008
|
this.tableData = [];
|
|
912
1009
|
this.extendedRowTemplate = null;
|
|
913
1010
|
this.timelineMarkerTemplate = null;
|
|
@@ -925,6 +1022,8 @@ class NgxAurMatTableComponent {
|
|
|
925
1022
|
this.selectionModel = new EventEmitter();
|
|
926
1023
|
//------------------------
|
|
927
1024
|
this.onRowClick = new EventEmitter();
|
|
1025
|
+
this.loadingChange = new EventEmitter();
|
|
1026
|
+
this.pageError = new EventEmitter();
|
|
928
1027
|
/**
|
|
929
1028
|
* return filtered rows
|
|
930
1029
|
*/
|
|
@@ -957,10 +1056,39 @@ class NgxAurMatTableComponent {
|
|
|
957
1056
|
if (changes['highlight'] && this.highlight) {
|
|
958
1057
|
this.handleHighlightChange(this.highlight);
|
|
959
1058
|
}
|
|
1059
|
+
if (changes['externalPaginator']) {
|
|
1060
|
+
if (this.externalPaginator) {
|
|
1061
|
+
if (this.isServerMode()) {
|
|
1062
|
+
// Server mode: do NOT bind dataSource.paginator (would slice the loaded page).
|
|
1063
|
+
// Only (re)wire once the controller exists; a first-change arriving before
|
|
1064
|
+
// ngAfterViewInit is handled by startServerController().
|
|
1065
|
+
if (this.serverPageController) {
|
|
1066
|
+
this.subscribeExternalPaginator();
|
|
1067
|
+
if (this.paginatorState) {
|
|
1068
|
+
this.applyExternalPaginatorState(this.paginatorState);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
else if (!changes['externalPaginator'].firstChange) {
|
|
1073
|
+
// Client mode: bind the external paginator so MatTableDataSource slices through it.
|
|
1074
|
+
// Guard firstChange so we don't call initPaginator() before ngAfterViewInit.
|
|
1075
|
+
this.initPaginator();
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
else {
|
|
1079
|
+
// External paginator removed: tear down its page subscription to avoid a leak.
|
|
1080
|
+
this.externalPaginatorSub?.unsubscribe();
|
|
1081
|
+
this.externalPaginatorSub = undefined;
|
|
1082
|
+
// Client mode falls back to the (now-rendered) built-in paginator.
|
|
1083
|
+
if (!this.isServerMode() && !changes['externalPaginator'].firstChange) {
|
|
1084
|
+
this.initPaginator();
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
960
1088
|
}
|
|
961
1089
|
resetPaginatorPageIndex() {
|
|
962
|
-
if (this.
|
|
963
|
-
this.
|
|
1090
|
+
if (this.activePaginator) {
|
|
1091
|
+
this.activePaginator.firstPage();
|
|
964
1092
|
}
|
|
965
1093
|
}
|
|
966
1094
|
refreshTable() {
|
|
@@ -989,17 +1117,33 @@ class NgxAurMatTableComponent {
|
|
|
989
1117
|
if (!this.tableConfig) {
|
|
990
1118
|
throw new Error("init inputs [tableConfig] is mandatory!");
|
|
991
1119
|
}
|
|
1120
|
+
if (this.isServerWiring() && !this.paginatorState) {
|
|
1121
|
+
this.paginatorState = PaginatorState.empty();
|
|
1122
|
+
}
|
|
992
1123
|
}
|
|
993
1124
|
// we need this, in order to make pagination work with *ngIf
|
|
994
1125
|
ngAfterViewInit() {
|
|
1126
|
+
// Must remain unconditional — also covers the externalPaginator first-change case
|
|
1127
|
+
// for client mode (ngOnChanges defers initPaginator() on firstChange).
|
|
995
1128
|
this.initPaginator();
|
|
996
1129
|
this.initSortingDataAccessor();
|
|
997
1130
|
this.resizeColumnOffsetsObserver = new ResizeObserver(() => this.updateColumnOffsets());
|
|
998
1131
|
this.resizeColumnOffsetsObserver.observe(this.table.nativeElement);
|
|
1132
|
+
if (this.isServerMode()) {
|
|
1133
|
+
this.startServerController();
|
|
1134
|
+
}
|
|
999
1135
|
}
|
|
1000
1136
|
initPaginator() {
|
|
1001
1137
|
if (this.tableDataSource) {
|
|
1002
|
-
|
|
1138
|
+
// In server mode, do NOT bind the paginator to the data source — MatTableDataSource
|
|
1139
|
+
// would call _updatePaginator(filteredDataLength) and overwrite the server-supplied length.
|
|
1140
|
+
// Pagination is driven by ServerPageController instead.
|
|
1141
|
+
if (this.isServerMode()) {
|
|
1142
|
+
this.tableDataSource.paginator = null;
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
this.tableDataSource.paginator = this.activePaginator;
|
|
1146
|
+
}
|
|
1003
1147
|
}
|
|
1004
1148
|
}
|
|
1005
1149
|
initSortingDataAccessor() {
|
|
@@ -1072,6 +1216,7 @@ class NgxAurMatTableComponent {
|
|
|
1072
1216
|
this.tableDataSource = MatTableDataSourceFactory.convert(this.tableData, this.tableConfig.columnsCfg);
|
|
1073
1217
|
this._defaultFilterPredicate = this.tableDataSource.filterPredicate;
|
|
1074
1218
|
this.tableView = TableViewFactory.toView(this.tableDataSource.data, this.tableConfig);
|
|
1219
|
+
this.rowStyles = RowStyleFactory.toRowStyles(this.tableDataSource.data, this.tableConfig);
|
|
1075
1220
|
if (!this._customDisplayColumnsEnabled) {
|
|
1076
1221
|
this._displayColumns = DisplayColumnsFactory.create(this.tableConfig);
|
|
1077
1222
|
}
|
|
@@ -1118,6 +1263,9 @@ class NgxAurMatTableComponent {
|
|
|
1118
1263
|
}
|
|
1119
1264
|
sortTable(sortParameters) {
|
|
1120
1265
|
this.sort.emit(sortParameters);
|
|
1266
|
+
if (this.isServerMode() && this.serverPageController) {
|
|
1267
|
+
this.serverPageController.onSort(sortParameters);
|
|
1268
|
+
}
|
|
1121
1269
|
// MatTableDataSource обрабатывает sort через RxJS-подписку —
|
|
1122
1270
|
// filteredData обновится в следующем микротаске
|
|
1123
1271
|
Promise.resolve().then(() => {
|
|
@@ -1128,6 +1276,9 @@ class NgxAurMatTableComponent {
|
|
|
1128
1276
|
onPageChangeInternal(event) {
|
|
1129
1277
|
this.updateTimelineBounds();
|
|
1130
1278
|
this.pageChange.emit(event);
|
|
1279
|
+
if (this.isServerMode() && this.serverPageController) {
|
|
1280
|
+
this.serverPageController.onPage({ pageIndex: event.pageIndex, pageSize: event.pageSize });
|
|
1281
|
+
}
|
|
1131
1282
|
}
|
|
1132
1283
|
updateTimelineBounds() {
|
|
1133
1284
|
if (!this.timelineProvider.isEnabled)
|
|
@@ -1164,9 +1315,9 @@ class NgxAurMatTableComponent {
|
|
|
1164
1315
|
if (this.paginatorState)
|
|
1165
1316
|
return data;
|
|
1166
1317
|
// Client-side с пагинацией: вырезаем видимый срез
|
|
1167
|
-
if (this.paginationProvider.isEnabled && this.
|
|
1168
|
-
const start = this.
|
|
1169
|
-
return data.slice(start, start + this.
|
|
1318
|
+
if (this.paginationProvider.isEnabled && this.activePaginator) {
|
|
1319
|
+
const start = this.activePaginator.pageIndex * this.activePaginator.pageSize;
|
|
1320
|
+
return data.slice(start, start + this.activePaginator.pageSize);
|
|
1170
1321
|
}
|
|
1171
1322
|
// Без пагинации
|
|
1172
1323
|
return data;
|
|
@@ -1178,6 +1329,18 @@ class NgxAurMatTableComponent {
|
|
|
1178
1329
|
$event.stopPropagation();
|
|
1179
1330
|
this.onRowAction.emit({ action, value: row });
|
|
1180
1331
|
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Emit an action triggered from a mat-menu item.
|
|
1334
|
+
*
|
|
1335
|
+
* Unlike {@link emitRowAction} this must NOT call $event.stopPropagation():
|
|
1336
|
+
* mat-menu closes when the click bubbles up to its panel
|
|
1337
|
+
* ((click)="closed.emit('click')"), so stopping propagation would keep the
|
|
1338
|
+
* menu open. The menu renders in an overlay outside the row, so there is no
|
|
1339
|
+
* row-click to suppress here.
|
|
1340
|
+
*/
|
|
1341
|
+
emitMenuAction(action, row) {
|
|
1342
|
+
this.onRowAction.emit({ action, value: row });
|
|
1343
|
+
}
|
|
1181
1344
|
masterToggle() {
|
|
1182
1345
|
this.selectionProvider.masterToggle();
|
|
1183
1346
|
}
|
|
@@ -1187,6 +1350,40 @@ class NgxAurMatTableComponent {
|
|
|
1187
1350
|
castSrc(row) {
|
|
1188
1351
|
return row;
|
|
1189
1352
|
}
|
|
1353
|
+
decorToCss(d) {
|
|
1354
|
+
const css = {};
|
|
1355
|
+
if (!d) {
|
|
1356
|
+
return css;
|
|
1357
|
+
}
|
|
1358
|
+
if (d.color)
|
|
1359
|
+
css['color'] = d.color;
|
|
1360
|
+
if (d.background)
|
|
1361
|
+
css['background-color'] = d.background;
|
|
1362
|
+
if (d.border)
|
|
1363
|
+
css['border'] = d.border;
|
|
1364
|
+
if (d.fontWeight)
|
|
1365
|
+
css['font-weight'] = d.fontWeight;
|
|
1366
|
+
return css;
|
|
1367
|
+
}
|
|
1368
|
+
rowNgStyle(row) {
|
|
1369
|
+
const base = this.decorToCss(this.rowStyles[row.id]?.style);
|
|
1370
|
+
if (this.highlighted === row.rowSrc) {
|
|
1371
|
+
// highlightClicked overrides only the properties it sets (per-property merge; highlight wins)
|
|
1372
|
+
return { ...base, ...this.decorToCss(this.tableConfig.clickCfg?.highlightClicked) };
|
|
1373
|
+
}
|
|
1374
|
+
return base;
|
|
1375
|
+
}
|
|
1376
|
+
rowNgClass(row) {
|
|
1377
|
+
const cls = {
|
|
1378
|
+
'pointer': this.tableConfig.clickCfg?.pointer || false,
|
|
1379
|
+
'new-color': this.highlighted === row.rowSrc && !!this.tableConfig.clickCfg?.highlightClicked?.color,
|
|
1380
|
+
};
|
|
1381
|
+
const custom = this.rowStyles[row.id]?.class;
|
|
1382
|
+
if (custom) {
|
|
1383
|
+
cls[custom] = true; // NgClass accepts a multi-class key, e.g. 'total not-hover'
|
|
1384
|
+
}
|
|
1385
|
+
return cls;
|
|
1386
|
+
}
|
|
1190
1387
|
rowClick(row) {
|
|
1191
1388
|
if (row.rowSrc !== this.highlighted || (row.rowSrc === this.highlighted && !this.tableConfig.clickCfg?.cancelable)) {
|
|
1192
1389
|
this.onRowClick.emit(row.rowSrc);
|
|
@@ -1200,8 +1397,66 @@ class NgxAurMatTableComponent {
|
|
|
1200
1397
|
getSelectionModel() {
|
|
1201
1398
|
return this.selectionProvider.selection;
|
|
1202
1399
|
}
|
|
1400
|
+
isServerMode() {
|
|
1401
|
+
return !!this.pageSource;
|
|
1402
|
+
}
|
|
1403
|
+
isServerWiring() {
|
|
1404
|
+
return !!this.pageSource || this.tableConfig?.pageableCfg?.mode === 'server';
|
|
1405
|
+
}
|
|
1406
|
+
startServerController() {
|
|
1407
|
+
if (!this.pageSource) {
|
|
1408
|
+
return;
|
|
1409
|
+
}
|
|
1410
|
+
this.serverPageController = new ServerPageController(this.pageSource, {
|
|
1411
|
+
onResult: result => {
|
|
1412
|
+
this.paginatorState = result.state;
|
|
1413
|
+
this.applyExternalPaginatorState(result.state);
|
|
1414
|
+
this.tableData = result.content;
|
|
1415
|
+
this.refreshTable();
|
|
1416
|
+
this.cdr.markForCheck();
|
|
1417
|
+
},
|
|
1418
|
+
onLoading: loading => {
|
|
1419
|
+
this.loadingChange.emit(loading);
|
|
1420
|
+
this.cdr.markForCheck();
|
|
1421
|
+
},
|
|
1422
|
+
onError: error => this.pageError.emit(error),
|
|
1423
|
+
});
|
|
1424
|
+
this.subscribeExternalPaginator();
|
|
1425
|
+
const initialSort = this.matSort?.active ? { active: this.matSort.active, direction: this.matSort.direction } : undefined;
|
|
1426
|
+
this.serverPageController.start({
|
|
1427
|
+
// provider may not be initialized yet (no tableData binding in server mode) — read from config
|
|
1428
|
+
pageSize: this.tableConfig.pageableCfg?.size ?? 20,
|
|
1429
|
+
sort: initialSort,
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
subscribeExternalPaginator() {
|
|
1433
|
+
this.externalPaginatorSub?.unsubscribe();
|
|
1434
|
+
if (this.externalPaginator) {
|
|
1435
|
+
this.externalPaginatorSub = this.externalPaginator.page.subscribe(event => this.onPageChangeInternal(event));
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
applyExternalPaginatorState(state) {
|
|
1439
|
+
if (this.externalPaginator) {
|
|
1440
|
+
// RISK (spec approach C): OnPush MatPaginator needs CD to reflect imperative changes.
|
|
1441
|
+
this.externalPaginator.length = state.length;
|
|
1442
|
+
this.externalPaginator.pageIndex = state.pageIndex;
|
|
1443
|
+
this.cdr.markForCheck();
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
/** Re-invoke pageSource (server mode). resetPageIndex defaults to true (e.g. external filter changed). */
|
|
1447
|
+
reload(opts) {
|
|
1448
|
+
if (this.isServerMode() && this.serverPageController) {
|
|
1449
|
+
this.serverPageController.reload(opts);
|
|
1450
|
+
}
|
|
1451
|
+
else {
|
|
1452
|
+
// Client mode: re-apply current data/filters.
|
|
1453
|
+
this.refreshTable();
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1203
1456
|
ngOnDestroy() {
|
|
1204
1457
|
this.resizeColumnOffsetsObserver.disconnect();
|
|
1458
|
+
this.serverPageController?.stop();
|
|
1459
|
+
this.externalPaginatorSub?.unsubscribe();
|
|
1205
1460
|
}
|
|
1206
1461
|
onDragStart($event, row) {
|
|
1207
1462
|
if (this.selectionProvider.isEnabled && this.dragDropProvider.multiple && this.selectionProvider.selection.selected.length > 1) {
|
|
@@ -1223,7 +1478,7 @@ class NgxAurMatTableComponent {
|
|
|
1223
1478
|
this.dragDropProvider.manager.endDrag();
|
|
1224
1479
|
}
|
|
1225
1480
|
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 }); }
|
|
1226
|
-
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", isTableBodyHide: "isTableBodyHide", highlight: "highlight" }, outputs: { sort: "sort", pageChange: "pageChange", onRowAction: "onRowAction", selected: "selected", onSelect: "onSelect", onDeselect: "onDeselect", onSelectedRowsAction: "onSelectedRowsAction", selectionModel: "selectionModel", onRowClick: "onRowClick", onFilter: "onFilter", columnOffsets: "columnOffsets", onHeaderButton: "onHeaderButton" }, 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]=\"{'bottom-pagination': paginationProvider.isEnabled && paginationProvider.position === 'bottom'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"tableConfig.filterCfg?.enable ?? false\">\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]=\"{'bottom-pagination': paginationProvider.isEnabled && paginationProvider.position === 'bottom'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"onHeaderButton.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.tableView?.height\"\n [style.max-height]=\"tableConfig.tableView?.maxHeight\"\n [style.min-height]=\"tableConfig.tableView?.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.display !== 'none'\">\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 <button mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.display !== 'none'\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\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=\"columnConfig.sort && columnConfig.sort.enable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort.position === 'right' ? '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 </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)=\"rowClick(row)\"\n [ngClass]=\"{'pointer': tableConfig.clickCfg?.pointer || false, 'new-color': highlighted===row.rowSrc && tableConfig?.clickCfg?.highlightClicked?.color}\"\n [ngStyle]=\"{\n 'color': highlighted===row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.color : undefined,\n 'background-color': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.background : undefined,\n 'border': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.border : undefined\n }\">\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]=\"totalRowProvider.style\"></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) {\n <mat-paginator [ngClass]=\"{'hidePaginator': isTableBodyHide}\"\n [pageSizeOptions]=\"paginationProvider.sizes\"\n [pageSize]=\"paginationProvider.size\"\n [style]=\"tableConfig?.pageableCfg?.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.bottom-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.bottom-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:hover{background-color:#f2f2f2;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: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: 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: [
|
|
1481
|
+
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", onRowAction: "onRowAction", selected: "selected", onSelect: "onSelect", onDeselect: "onDeselect", onSelectedRowsAction: "onSelectedRowsAction", selectionModel: "selectionModel", onRowClick: "onRowClick", loadingChange: "loadingChange", pageError: "pageError", onFilter: "onFilter", columnOffsets: "columnOffsets", onHeaderButton: "onHeaderButton" }, 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]=\"{'bottom-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'bottom'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"tableConfig.filterCfg?.enable ?? false\">\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]=\"{'bottom-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'bottom'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"onHeaderButton.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.tableView?.height\"\n [style.max-height]=\"tableConfig.tableView?.maxHeight\"\n [style.min-height]=\"tableConfig.tableView?.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.display !== 'none'\">\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.display !== 'none'\">\n <mat-menu #actionMenu=\"matMenu\">\n <ng-container *ngFor=\"let item of action.menu\">\n <button mat-menu-item\n *ngIf=\"item.display !== 'none'\"\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.display !== 'none'\">\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=\"columnConfig.sort && columnConfig.sort.enable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort.position === 'right' ? '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 </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)=\"rowClick(row)\"\n [ngClass]=\"rowNgClass(row)\"\n [ngStyle]=\"rowNgStyle(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]=\"totalRowProvider.style\"></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?.pageableCfg?.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.bottom-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.bottom-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:hover{background-color:#f2f2f2;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: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: [
|
|
1227
1482
|
trigger('detailExpand', [
|
|
1228
1483
|
state(ExpandState.COLLAPSED, style({ height: '0px', minHeight: '0' })),
|
|
1229
1484
|
state(ExpandState.EXPANDED, style({ height: '*' })),
|
|
@@ -1239,7 +1494,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
1239
1494
|
state(ExpandState.EXPANDED, style({ height: '*' })),
|
|
1240
1495
|
transition(`${ExpandState.EXPANDED} <=> ${ExpandState.COLLAPSED}`, animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1241
1496
|
]),
|
|
1242
|
-
], standalone: false, template: "<div class=\"aur-mat-table\"\n [ngClass]=\"{'bottom-pagination': paginationProvider.isEnabled && paginationProvider.position === 'bottom'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"tableConfig.filterCfg?.enable ?? false\">\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]=\"{'bottom-pagination': paginationProvider.isEnabled && paginationProvider.position === 'bottom'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"onHeaderButton.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.tableView?.height\"\n [style.max-height]=\"tableConfig.tableView?.maxHeight\"\n [style.min-height]=\"tableConfig.tableView?.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.display !== 'none'\">\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 <button mat-icon-button\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\n [matTooltip]=\"action.icon.tooltip || ''\"\n *ngIf=\"action.display !== 'none'\">\n <mat-icon [style.color]=\"action.icon.color\">\n {{ action.icon.name }}\n </mat-icon>\n </button>\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=\"columnConfig.sort && columnConfig.sort.enable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort.position === 'right' ? '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 </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)=\"rowClick(row)\"\n [ngClass]=\"{'pointer': tableConfig.clickCfg?.pointer || false, 'new-color': highlighted===row.rowSrc && tableConfig?.clickCfg?.highlightClicked?.color}\"\n [ngStyle]=\"{\n 'color': highlighted===row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.color : undefined,\n 'background-color': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.background : undefined,\n 'border': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.border : undefined\n }\">\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]=\"totalRowProvider.style\"></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) {\n <mat-paginator [ngClass]=\"{'hidePaginator': isTableBodyHide}\"\n [pageSizeOptions]=\"paginationProvider.sizes\"\n [pageSize]=\"paginationProvider.size\"\n [style]=\"tableConfig?.pageableCfg?.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.bottom-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.bottom-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:hover{background-color:#f2f2f2;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"] }]
|
|
1497
|
+
], standalone: false, template: "<div class=\"aur-mat-table\"\n [ngClass]=\"{'bottom-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'bottom'}\">\n <ng-container>\n <!-- Filter -->\n <ng-container *ngIf=\"tableConfig.filterCfg?.enable ?? false\">\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]=\"{'bottom-pagination': paginationProvider.isEnabled && !externalPaginator && paginationProvider.position === 'bottom'}\">\n <mat-icon *ngIf=\"headerButtonProvider.isEnabled\"\n class=\"table-settings-button\"\n [style.color]=\"headerButtonProvider.color\"\n [style.background-color]=\"headerButtonProvider.background\"\n (click)=\"onHeaderButton.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.tableView?.height\"\n [style.max-height]=\"tableConfig.tableView?.maxHeight\"\n [style.min-height]=\"tableConfig.tableView?.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.display !== 'none'\">\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.display !== 'none'\">\n <mat-menu #actionMenu=\"matMenu\">\n <ng-container *ngFor=\"let item of action.menu\">\n <button mat-menu-item\n *ngIf=\"item.display !== 'none'\"\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.display !== 'none'\">\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=\"columnConfig.sort && columnConfig.sort.enable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\n [arrowPosition]=\"columnConfig.sort.position === 'right' ? '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 </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)=\"rowClick(row)\"\n [ngClass]=\"rowNgClass(row)\"\n [ngStyle]=\"rowNgStyle(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]=\"totalRowProvider.style\"></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?.pageableCfg?.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.bottom-pagination{height:100%}.aur-mat-table table{border-collapse:collapse}.aur-mat-table .table-container{position:relative}.aur-mat-table .table-container.bottom-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:hover{background-color:#f2f2f2;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"] }]
|
|
1243
1498
|
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }], propDecorators: { displayColumns: [{
|
|
1244
1499
|
type: Input
|
|
1245
1500
|
}], subFooterRowTemplate: [{
|
|
@@ -1265,6 +1520,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
1265
1520
|
type: Input
|
|
1266
1521
|
}], paginatorState: [{
|
|
1267
1522
|
type: Input
|
|
1523
|
+
}], pageSource: [{
|
|
1524
|
+
type: Input
|
|
1525
|
+
}], externalPaginator: [{
|
|
1526
|
+
type: Input
|
|
1268
1527
|
}], isTableBodyHide: [{
|
|
1269
1528
|
type: Input
|
|
1270
1529
|
}], matPaginator: [{
|
|
@@ -1291,6 +1550,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
1291
1550
|
type: Output
|
|
1292
1551
|
}], onRowClick: [{
|
|
1293
1552
|
type: Output
|
|
1553
|
+
}], loadingChange: [{
|
|
1554
|
+
type: Output
|
|
1555
|
+
}], pageError: [{
|
|
1556
|
+
type: Output
|
|
1294
1557
|
}], onFilter: [{
|
|
1295
1558
|
type: Output
|
|
1296
1559
|
}], columnOffsets: [{
|
|
@@ -1345,7 +1608,8 @@ class NgxAurMatTableModule {
|
|
|
1345
1608
|
MatTooltipModule,
|
|
1346
1609
|
MatCheckboxModule,
|
|
1347
1610
|
MatFormFieldModule,
|
|
1348
|
-
DragDropModule
|
|
1611
|
+
DragDropModule,
|
|
1612
|
+
MatMenuModule], exports: [NgxAurMatTableComponent,
|
|
1349
1613
|
DataPropertyGetterPipe,
|
|
1350
1614
|
NgxTableSubFooterRowDirective,
|
|
1351
1615
|
NgxAurTableSearchPrefixDirective,
|
|
@@ -1360,7 +1624,8 @@ class NgxAurMatTableModule {
|
|
|
1360
1624
|
MatTooltipModule,
|
|
1361
1625
|
MatCheckboxModule,
|
|
1362
1626
|
MatFormFieldModule,
|
|
1363
|
-
DragDropModule
|
|
1627
|
+
DragDropModule,
|
|
1628
|
+
MatMenuModule] }); }
|
|
1364
1629
|
}
|
|
1365
1630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxAurMatTableModule, decorators: [{
|
|
1366
1631
|
type: NgModule,
|
|
@@ -1386,6 +1651,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
1386
1651
|
MatCheckboxModule,
|
|
1387
1652
|
MatFormFieldModule,
|
|
1388
1653
|
DragDropModule,
|
|
1654
|
+
MatMenuModule,
|
|
1389
1655
|
],
|
|
1390
1656
|
exports: [
|
|
1391
1657
|
NgxAurMatTableComponent,
|
|
@@ -1783,5 +2049,5 @@ var NgxAurFilters;
|
|
|
1783
2049
|
* Generated bundle index. Do not edit.
|
|
1784
2050
|
*/
|
|
1785
2051
|
|
|
1786
|
-
export { AurDragDropManager, DataPropertyGetterPipe, IndexProvider, IndexProviderDummy, NgxAurFilters, NgxAurMatTableComponent, NgxAurMatTableModule, NgxAurTableConfigUtil, NgxAurTablePageEventUtils, NgxAurTableSearchPrefixDirective, NgxAurTableSearchSuffixDirective, NgxTableSubFooterRowDirective, PaginatorState, RowActionProvider, RowActionProviderDummy, SelectionProvider, SelectionProviderDummy, StyleBuilder, TableRow, TimelineProvider, TimelineProviderDummy };
|
|
2052
|
+
export { AurDragDropManager, DataPropertyGetterPipe, IndexProvider, IndexProviderDummy, NgxAurFilters, NgxAurMatTableComponent, NgxAurMatTableModule, NgxAurTableConfigUtil, NgxAurTablePageEventUtils, NgxAurTableSearchPrefixDirective, NgxAurTableSearchSuffixDirective, NgxTableSubFooterRowDirective, PaginatorState, RowActionProvider, RowActionProviderDummy, SelectionProvider, SelectionProviderDummy, ServerPageController, StyleBuilder, TableRow, TimelineProvider, TimelineProviderDummy };
|
|
1787
2053
|
//# sourceMappingURL=ngx-aur-mat-table.mjs.map
|