@coolon/angular-ui-powerups 16.1.0-aplpha.53 → 16.1.0-aplpha.55
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/esm2022/lib/components/tables/abstract-table.component.mjs +1 -2
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +128 -99
- package/esm2022/lib/components/tables/table/table.component.mjs +2 -1
- package/fesm2022/coolon-angular-ui-powerups.mjs +128 -98
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/renderer/table-body/table-body.component.d.ts +6 -33
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
17
17
|
import * as i3$2 from '@angular/cdk/portal';
|
|
18
18
|
import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
19
19
|
import * as i1$2 from '@angular/cdk/scrolling';
|
|
20
|
-
import {
|
|
20
|
+
import { CdkScrollableModule, ScrollingModule } from '@angular/cdk/scrolling';
|
|
21
21
|
import * as i7 from '@angular/material/autocomplete';
|
|
22
22
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
23
23
|
import * as i2 from '@angular/material/button';
|
|
@@ -52,8 +52,6 @@ import { Enum } from 'typescript-string-enums';
|
|
|
52
52
|
import { lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolon/typescript-utilities';
|
|
53
53
|
import * as i5 from '@angular/material/core';
|
|
54
54
|
import { produce } from 'immer';
|
|
55
|
-
import { DataSource } from '@angular/cdk/collections';
|
|
56
|
-
import { BehaviorSubject } from 'rxjs';
|
|
57
55
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
58
56
|
import { isFunction as isFunction$1, isNil as isNil$1, isEmpty as isEmpty$1, last, findLast } from 'lodash-es';
|
|
59
57
|
import { generateKeyBetween } from 'fractional-indexing';
|
|
@@ -3137,7 +3135,6 @@ class AbstractTableComponent extends DisposableComponent {
|
|
|
3137
3135
|
super();
|
|
3138
3136
|
this.injector = injector;
|
|
3139
3137
|
const { chain, when } = Dsl.disposeWith(this);
|
|
3140
|
-
this._visibleRows$.setDelegate(this._dataSource$);
|
|
3141
3138
|
when(chain(this._dataSource$).first()).becomesTruthy(it => {
|
|
3142
3139
|
if (it === this.identityOf(it)) {
|
|
3143
3140
|
console.warn("Table model identity function is using reference equality. This can cause lots of table re-rendering", {
|
|
@@ -4367,95 +4364,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
4367
4364
|
args: ['class']
|
|
4368
4365
|
}] } });
|
|
4369
4366
|
|
|
4370
|
-
/**
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
class CustomVirtualScrollStrategy extends FixedSizeVirtualScrollStrategy {
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
}
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4367
|
+
// /**
|
|
4368
|
+
// * Virtual Scroll Strategy
|
|
4369
|
+
// */
|
|
4370
|
+
// export class CustomVirtualScrollStrategy extends FixedSizeVirtualScrollStrategy {
|
|
4371
|
+
// protected readonly garbage = new GarbageCollector();
|
|
4372
|
+
//
|
|
4373
|
+
// constructor(rowHeight$: ValueModel<number>, minBufferPx: number, maxBufferPx: number) {
|
|
4374
|
+
// super(rowHeight$.value, minBufferPx, maxBufferPx);
|
|
4375
|
+
// const {chain, when} = Dsl.disposeWith(this.garbage);
|
|
4376
|
+
// when(rowHeight$).changes(h => {
|
|
4377
|
+
// this.updateItemAndBufferSize(h, minBufferPx, maxBufferPx);
|
|
4378
|
+
// }, {initialValue: "triggerChangeUnlessNil"})
|
|
4379
|
+
// }
|
|
4380
|
+
// }
|
|
4381
|
+
// export class VirtualScrollDataSource<Row> extends DataSource<Row> implements Disposable, Disposable.Collector {
|
|
4382
|
+
//
|
|
4383
|
+
// private garbage = new GarbageCollector();
|
|
4384
|
+
//
|
|
4385
|
+
// readonly virtualScrollRowRange$: ValueModelChain<{ start: number; end: number }>;
|
|
4386
|
+
// readonly virtualScrollSpacerSize$: ValueModelChain<number>;
|
|
4387
|
+
// readonly totalContentSize$: ValueModelChain<number>;
|
|
4388
|
+
// readonly showVirtualScrollOffset: (index: number, rowData: any) => boolean;
|
|
4389
|
+
//
|
|
4390
|
+
// protected readonly virtualRowsObservable$ = new BehaviorSubject<readonly Row[]>([]);
|
|
4391
|
+
// private readonly virtualScrollPixelOffset$ = new MutableValueModel<number>(0);
|
|
4392
|
+
//
|
|
4393
|
+
//
|
|
4394
|
+
// constructor(readonly viewport: CdkVirtualScrollViewport, data$:ListModel<Row>, readonly rowHeight$:ValueModel<number>, pageSize$: ValueModel<number>) {
|
|
4395
|
+
// super();
|
|
4396
|
+
// const {chain, when, observe} = Dsl.disposeWith(this);
|
|
4397
|
+
//
|
|
4398
|
+
// observe.valuesFrom(viewport.elementScrolled()).subscribe((ev: Event) => {
|
|
4399
|
+
// this.virtualScrollPixelOffset$.value = (ev.currentTarget as any).scrollTop;
|
|
4400
|
+
// });
|
|
4401
|
+
//
|
|
4402
|
+
// this.virtualScrollRowRange$ = chain(this.virtualScrollPixelOffset$).map(rawPixelOffset => {
|
|
4403
|
+
// const startIndex = Math.floor(rawPixelOffset / this.rowHeight$.value);
|
|
4404
|
+
// console.log(rawPixelOffset, startIndex)
|
|
4405
|
+
// // const prevExtraData = startIndex > 5 ? 5 : 0;
|
|
4406
|
+
// const prevExtraData = 0;
|
|
4407
|
+
// // return rows.slice(startIndex - prevExtraData, startIndex + (pageSize$.value - prevExtraData));
|
|
4408
|
+
// return {
|
|
4409
|
+
// start: startIndex - prevExtraData,
|
|
4410
|
+
// end: startIndex + (pageSize$.value - prevExtraData)
|
|
4411
|
+
// }
|
|
4412
|
+
// }, {
|
|
4413
|
+
// dependsOn: [this.rowHeight$, pageSize$],
|
|
4414
|
+
// postponeWhile: chain.numericValue(pageSize$).isLessThan(1),
|
|
4415
|
+
// changed: (is, was) => {
|
|
4416
|
+
// return was?.start !== is?.start || was?.end !== is?.end
|
|
4417
|
+
// }
|
|
4418
|
+
// })
|
|
4419
|
+
//
|
|
4420
|
+
// this.virtualScrollSpacerSize$ = chain(this.virtualScrollRowRange$).map(range => {
|
|
4421
|
+
// const pixelOffset = this.rowHeight$.value * range.start;
|
|
4422
|
+
// return pixelOffset;
|
|
4423
|
+
// }, { dependsOn: this.rowHeight$})
|
|
4424
|
+
//
|
|
4425
|
+
// this.totalContentSize$ = chain(data$).count().map(rowCount => {
|
|
4426
|
+
// return this.rowHeight$.value * rowCount
|
|
4427
|
+
// }, {dependsOn: rowHeight$})
|
|
4428
|
+
//
|
|
4429
|
+
// chain(this.virtualScrollRowRange$).mapToList(range => {
|
|
4430
|
+
// return data$.value.slice(range.start, range.end);
|
|
4431
|
+
// }, {
|
|
4432
|
+
// dependsOn: data$
|
|
4433
|
+
// }).subscribe(visibleRows => {
|
|
4434
|
+
// console.log(visibleRows)
|
|
4435
|
+
// this.virtualRowsObservable$.next(visibleRows)
|
|
4436
|
+
// });
|
|
4437
|
+
//
|
|
4438
|
+
// when(this.virtualScrollSpacerSize$).changes(scrollTop => {
|
|
4439
|
+
// viewport.setRenderedContentOffset(scrollTop, "to-start");
|
|
4440
|
+
// }, {initialValue: "triggerChangeUnlessNil"});
|
|
4441
|
+
//
|
|
4442
|
+
// when(this.totalContentSize$).changes(totalSize => {
|
|
4443
|
+
// viewport.setTotalContentSize(totalSize);
|
|
4444
|
+
// }, {initialValue: "triggerChangeUnlessNil"});
|
|
4445
|
+
//
|
|
4446
|
+
//
|
|
4447
|
+
// this.showVirtualScrollOffset = (index: number, rowData: any): boolean => {
|
|
4448
|
+
// const haveScrolled = this.virtualScrollSpacerSize$.value > 0;
|
|
4449
|
+
// const firstRow = index === 0;
|
|
4450
|
+
// return index === 0 && haveScrolled
|
|
4451
|
+
// };
|
|
4452
|
+
//
|
|
4453
|
+
//
|
|
4454
|
+
//
|
|
4455
|
+
// }
|
|
4456
|
+
//
|
|
4457
|
+
//
|
|
4458
|
+
//
|
|
4459
|
+
// dispose(): void {
|
|
4460
|
+
// this.garbage.dispose();
|
|
4461
|
+
// }
|
|
4462
|
+
//
|
|
4463
|
+
// registerDisposable<T extends Disposable>(disposable: T): T {
|
|
4464
|
+
// return this.garbage.registerDisposable(disposable);
|
|
4465
|
+
// }
|
|
4466
|
+
//
|
|
4467
|
+
//
|
|
4468
|
+
// connect(collectionViewer: CollectionViewer): Observable<readonly Row[]> {
|
|
4469
|
+
// return this.virtualRowsObservable$;
|
|
4470
|
+
// }
|
|
4471
|
+
//
|
|
4472
|
+
// disconnect(collectionViewer: CollectionViewer): void {
|
|
4473
|
+
// // noop
|
|
4474
|
+
// }
|
|
4475
|
+
//
|
|
4476
|
+
//
|
|
4477
|
+
// }
|
|
4478
|
+
const AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER = new InjectionToken("AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER");
|
|
4458
4479
|
class TableBodyComponent extends ResizeAwareComponent {
|
|
4480
|
+
bufferMultiplier;
|
|
4459
4481
|
#data$_accessor_storage = proxify((ListModel));
|
|
4460
4482
|
get data$() { return this.#data$_accessor_storage; }
|
|
4461
4483
|
set data$(value) { this.#data$_accessor_storage = value; }
|
|
@@ -4483,8 +4505,9 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
4483
4505
|
rowHeight$ = new MutableValueModel(40);
|
|
4484
4506
|
baseCssClass = "aup-table-component";
|
|
4485
4507
|
virtualScrollDataSource = new TableVirtualScrollDataSource();
|
|
4486
|
-
constructor() {
|
|
4508
|
+
constructor(bufferMultiplier = 1) {
|
|
4487
4509
|
super();
|
|
4510
|
+
this.bufferMultiplier = bufferMultiplier;
|
|
4488
4511
|
const { chain, when, observe } = Dsl.disposeWith(this);
|
|
4489
4512
|
const actualHeaderHeight$ = chain(this.showHeader$).map(show => {
|
|
4490
4513
|
return show ? this.headerHeight$.value : 0;
|
|
@@ -4502,6 +4525,7 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
4502
4525
|
// // .map(count => 2 * count).otherwise(0)
|
|
4503
4526
|
// const pageSize$ = ValueModel.constant(12)
|
|
4504
4527
|
when(this.data$).changes(is => {
|
|
4528
|
+
console.log(is);
|
|
4505
4529
|
this.virtualScrollDataSource.data = is;
|
|
4506
4530
|
});
|
|
4507
4531
|
this.onInit(() => {
|
|
@@ -4541,8 +4565,8 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
4541
4565
|
}
|
|
4542
4566
|
return classes;
|
|
4543
4567
|
}
|
|
4544
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4545
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableBodyComponent, selector: "aup-table-body", inputs: { data$: "data$", tableModel: "tableModel", showHeader$: "showHeader$", showHeader: "showHeader", trackBy: "trackBy", scrollMode$: "scrollMode$", scrollMode: "scrollMode" }, host: { properties: { "attr.scrollMode": "this.scrollMode", "class": "this.baseCssClass", "class.hide-header": "this.hideHeader" } }, usesInheritance: true, ngImport: i0, template: "\n<div class=\"classic-scroll-container\" *ngIf=\"scrollMode$.value !== 'virtual'\">\n <table mat-table [dataSource]=\"data$.value\" [trackBy]=\"trackBy\" [multiTemplateDataRows]>\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [editSession]=\"$any(tableModel.getEditSessionFor(row))\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\"
|
|
4568
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableBodyComponent, deps: [{ token: AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4569
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableBodyComponent, selector: "aup-table-body", inputs: { data$: "data$", tableModel: "tableModel", showHeader$: "showHeader$", showHeader: "showHeader", trackBy: "trackBy", scrollMode$: "scrollMode$", scrollMode: "scrollMode" }, host: { properties: { "attr.scrollMode": "this.scrollMode", "class": "this.baseCssClass", "class.hide-header": "this.hideHeader" } }, usesInheritance: true, ngImport: i0, template: "\n<div class=\"classic-scroll-container\" *ngIf=\"scrollMode$.value !== 'virtual'\">\n <table mat-table [dataSource]=\"data$.value\" [trackBy]=\"trackBy\" [multiTemplateDataRows]>\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [editSession]=\"$any(tableModel.getEditSessionFor(row))\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\"\n [tvsItemSize]=\"rowHeight$.value\" [headerHeight]=\"headerHeight$.value\" [bufferMultiplier]=\"bufferMultiplier\">\n <table mat-table [dataSource]=\"virtualScrollDataSource\" [trackBy]=\"trackBy\">\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [editSession]=\"$any(tableModel.getEditSessionFor(row))\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host[scrollMode=virtual] cdk-virtual-scroll-viewport{flex:1}:host[scrollMode=classic]{min-height:0}:host[scrollMode=classic] .classic-scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i2$6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i1$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i4$5.TableItemSizeDirective, selector: "cdk-virtual-scroll-viewport[tvsItemSize]", inputs: ["tvsItemSize", "headerEnabled", "headerHeight", "footerEnabled", "footerHeight", "bufferMultiplier"] }, { kind: "component", type: TableCellComponent, selector: "aup-table-cell", inputs: ["row", "column", "editSession", "tableModel"] }, { kind: "component", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }] });
|
|
4546
4570
|
}
|
|
4547
4571
|
__decorate([
|
|
4548
4572
|
Proxify(),
|
|
@@ -4570,8 +4594,13 @@ __decorate([
|
|
|
4570
4594
|
], TableBodyComponent.prototype, "scrollMode", null);
|
|
4571
4595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
4572
4596
|
type: Component,
|
|
4573
|
-
args: [{ selector: "aup-table-body", template: "\n<div class=\"classic-scroll-container\" *ngIf=\"scrollMode$.value !== 'virtual'\">\n <table mat-table [dataSource]=\"data$.value\" [trackBy]=\"trackBy\" [multiTemplateDataRows]>\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [editSession]=\"$any(tableModel.getEditSessionFor(row))\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\"
|
|
4574
|
-
}], ctorParameters: function () { return [
|
|
4597
|
+
args: [{ selector: "aup-table-body", template: "\n<div class=\"classic-scroll-container\" *ngIf=\"scrollMode$.value !== 'virtual'\">\n <table mat-table [dataSource]=\"data$.value\" [trackBy]=\"trackBy\" [multiTemplateDataRows]>\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [editSession]=\"$any(tableModel.getEditSessionFor(row))\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\"\n [tvsItemSize]=\"rowHeight$.value\" [headerHeight]=\"headerHeight$.value\" [bufferMultiplier]=\"bufferMultiplier\">\n <table mat-table [dataSource]=\"virtualScrollDataSource\" [trackBy]=\"trackBy\">\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [editSession]=\"$any(tableModel.getEditSessionFor(row))\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host[scrollMode=virtual] cdk-virtual-scroll-viewport{flex:1}:host[scrollMode=classic]{min-height:0}:host[scrollMode=classic] .classic-scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"] }]
|
|
4598
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4599
|
+
type: Inject,
|
|
4600
|
+
args: [AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER]
|
|
4601
|
+
}, {
|
|
4602
|
+
type: Optional
|
|
4603
|
+
}] }]; }, propDecorators: { data$: [{
|
|
4575
4604
|
type: Input
|
|
4576
4605
|
}], tableModel: [{
|
|
4577
4606
|
type: Input
|
|
@@ -4941,6 +4970,7 @@ class TableComponent extends AbstractTableComponent {
|
|
|
4941
4970
|
else {
|
|
4942
4971
|
this._filteredRows$.setDelegate(this._dataSource$);
|
|
4943
4972
|
}
|
|
4973
|
+
this._visibleRows$.setDelegate(this._filteredRows$);
|
|
4944
4974
|
this.tableModel.bindToTable(this._filteredRows$, this._visibleRows$);
|
|
4945
4975
|
}
|
|
4946
4976
|
getModel() {
|
|
@@ -12061,5 +12091,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
12061
12091
|
* Generated bundle index. Do not edit.
|
|
12062
12092
|
*/
|
|
12063
12093
|
|
|
12064
|
-
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel,
|
|
12094
|
+
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControlsComponent, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableHeaderCellComponent, TableModel, TableMoreMenuComponent, TableMoreMenuPopupComponent, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, TextSearchContext, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
12065
12095
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|