@coolon/angular-ui-powerups 16.1.0-aplpha.80 → 16.1.0-aplpha.82
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/assets/table.scss +0 -8
- package/esm2022/lib/components/forms/checkbox-input/checkbox-input.component.mjs +3 -3
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +17 -116
- package/fesm2022/coolon-angular-ui-powerups.mjs +18 -117
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/renderer/table-body/table-body.component.d.ts +2 -0
- package/package.json +3 -3
|
@@ -2122,11 +2122,11 @@ class CheckboxInputComponent extends AbstractValueInputComponent {
|
|
|
2122
2122
|
super();
|
|
2123
2123
|
}
|
|
2124
2124
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CheckboxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CheckboxInputComponent, selector: "aup-checkbox-input", inputs: { color: "color", labelPosition: "labelPosition" }, usesInheritance: true, ngImport: i0, template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValue$.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:
|
|
2125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CheckboxInputComponent, selector: "aup-checkbox-input", inputs: { color: "color", labelPosition: "labelPosition" }, usesInheritance: true, ngImport: i0, template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValue$.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{ label }}\n</mat-checkbox>\n<ng-container *ngIf=\"!dense\">\n <mat-hint *ngIf=\"showHint\">{{ hint }}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{ firstError }}</mat-error>\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:10px 0 0}:host.dense{padding:4px 0 2px}mat-hint,mat-error{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
|
|
2126
2126
|
}
|
|
2127
2127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CheckboxInputComponent, decorators: [{
|
|
2128
2128
|
type: Component,
|
|
2129
|
-
args: [{ selector: 'aup-checkbox-input', template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValue$.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:
|
|
2129
|
+
args: [{ selector: 'aup-checkbox-input', template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValue$.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{ label }}\n</mat-checkbox>\n<ng-container *ngIf=\"!dense\">\n <mat-hint *ngIf=\"showHint\">{{ hint }}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{ firstError }}</mat-error>\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:10px 0 0}:host.dense{padding:4px 0 2px}mat-hint,mat-error{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}\n"] }]
|
|
2130
2130
|
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
|
|
2131
2131
|
type: Input
|
|
2132
2132
|
}], labelPosition: [{
|
|
@@ -4475,117 +4475,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
4475
4475
|
args: ['class']
|
|
4476
4476
|
}] } });
|
|
4477
4477
|
|
|
4478
|
-
// /**
|
|
4479
|
-
// * Virtual Scroll Strategy
|
|
4480
|
-
// */
|
|
4481
|
-
// export class CustomVirtualScrollStrategy extends FixedSizeVirtualScrollStrategy {
|
|
4482
|
-
// protected readonly garbage = new GarbageCollector();
|
|
4483
|
-
//
|
|
4484
|
-
// constructor(rowHeight$: ValueModel<number>, minBufferPx: number, maxBufferPx: number) {
|
|
4485
|
-
// super(rowHeight$.value, minBufferPx, maxBufferPx);
|
|
4486
|
-
// const {chain, when} = Dsl.disposeWith(this.garbage);
|
|
4487
|
-
// when(rowHeight$).changes(h => {
|
|
4488
|
-
// this.updateItemAndBufferSize(h, minBufferPx, maxBufferPx);
|
|
4489
|
-
// }, {initialValue: "triggerChangeUnlessNil"})
|
|
4490
|
-
// }
|
|
4491
|
-
// }
|
|
4492
|
-
// export class VirtualScrollDataSource<Row> extends DataSource<Row> implements Disposable, Disposable.Collector {
|
|
4493
|
-
//
|
|
4494
|
-
// private garbage = new GarbageCollector();
|
|
4495
|
-
//
|
|
4496
|
-
// readonly virtualScrollRowRange$: ValueModelChain<{ start: number; end: number }>;
|
|
4497
|
-
// readonly virtualScrollSpacerSize$: ValueModelChain<number>;
|
|
4498
|
-
// readonly totalContentSize$: ValueModelChain<number>;
|
|
4499
|
-
// readonly showVirtualScrollOffset: (index: number, rowData: any) => boolean;
|
|
4500
|
-
//
|
|
4501
|
-
// protected readonly virtualRowsObservable$ = new BehaviorSubject<readonly Row[]>([]);
|
|
4502
|
-
// private readonly virtualScrollPixelOffset$ = new MutableValueModel<number>(0);
|
|
4503
|
-
//
|
|
4504
|
-
//
|
|
4505
|
-
// constructor(readonly viewport: CdkVirtualScrollViewport, data$:ListModel<Row>, readonly rowHeight$:ValueModel<number>, pageSize$: ValueModel<number>) {
|
|
4506
|
-
// super();
|
|
4507
|
-
// const {chain, when, observe} = Dsl.disposeWith(this);
|
|
4508
|
-
//
|
|
4509
|
-
// observe.valuesFrom(viewport.elementScrolled()).subscribe((ev: Event) => {
|
|
4510
|
-
// this.virtualScrollPixelOffset$.value = (ev.currentTarget as any).scrollTop;
|
|
4511
|
-
// });
|
|
4512
|
-
//
|
|
4513
|
-
// this.virtualScrollRowRange$ = chain(this.virtualScrollPixelOffset$).map(rawPixelOffset => {
|
|
4514
|
-
// const startIndex = Math.floor(rawPixelOffset / this.rowHeight$.value);
|
|
4515
|
-
// console.log(rawPixelOffset, startIndex)
|
|
4516
|
-
// // const prevExtraData = startIndex > 5 ? 5 : 0;
|
|
4517
|
-
// const prevExtraData = 0;
|
|
4518
|
-
// // return rows.slice(startIndex - prevExtraData, startIndex + (pageSize$.value - prevExtraData));
|
|
4519
|
-
// return {
|
|
4520
|
-
// start: startIndex - prevExtraData,
|
|
4521
|
-
// end: startIndex + (pageSize$.value - prevExtraData)
|
|
4522
|
-
// }
|
|
4523
|
-
// }, {
|
|
4524
|
-
// dependsOn: [this.rowHeight$, pageSize$],
|
|
4525
|
-
// postponeWhile: chain.numericValue(pageSize$).isLessThan(1),
|
|
4526
|
-
// changed: (is, was) => {
|
|
4527
|
-
// return was?.start !== is?.start || was?.end !== is?.end
|
|
4528
|
-
// }
|
|
4529
|
-
// })
|
|
4530
|
-
//
|
|
4531
|
-
// this.virtualScrollSpacerSize$ = chain(this.virtualScrollRowRange$).map(range => {
|
|
4532
|
-
// const pixelOffset = this.rowHeight$.value * range.start;
|
|
4533
|
-
// return pixelOffset;
|
|
4534
|
-
// }, { dependsOn: this.rowHeight$})
|
|
4535
|
-
//
|
|
4536
|
-
// this.totalContentSize$ = chain(data$).count().map(rowCount => {
|
|
4537
|
-
// return this.rowHeight$.value * rowCount
|
|
4538
|
-
// }, {dependsOn: rowHeight$})
|
|
4539
|
-
//
|
|
4540
|
-
// chain(this.virtualScrollRowRange$).mapToList(range => {
|
|
4541
|
-
// return data$.value.slice(range.start, range.end);
|
|
4542
|
-
// }, {
|
|
4543
|
-
// dependsOn: data$
|
|
4544
|
-
// }).subscribe(visibleRows => {
|
|
4545
|
-
// console.log(visibleRows)
|
|
4546
|
-
// this.virtualRowsObservable$.next(visibleRows)
|
|
4547
|
-
// });
|
|
4548
|
-
//
|
|
4549
|
-
// when(this.virtualScrollSpacerSize$).changes(scrollTop => {
|
|
4550
|
-
// viewport.setRenderedContentOffset(scrollTop, "to-start");
|
|
4551
|
-
// }, {initialValue: "triggerChangeUnlessNil"});
|
|
4552
|
-
//
|
|
4553
|
-
// when(this.totalContentSize$).changes(totalSize => {
|
|
4554
|
-
// viewport.setTotalContentSize(totalSize);
|
|
4555
|
-
// }, {initialValue: "triggerChangeUnlessNil"});
|
|
4556
|
-
//
|
|
4557
|
-
//
|
|
4558
|
-
// this.showVirtualScrollOffset = (index: number, rowData: any): boolean => {
|
|
4559
|
-
// const haveScrolled = this.virtualScrollSpacerSize$.value > 0;
|
|
4560
|
-
// const firstRow = index === 0;
|
|
4561
|
-
// return index === 0 && haveScrolled
|
|
4562
|
-
// };
|
|
4563
|
-
//
|
|
4564
|
-
//
|
|
4565
|
-
//
|
|
4566
|
-
// }
|
|
4567
|
-
//
|
|
4568
|
-
//
|
|
4569
|
-
//
|
|
4570
|
-
// dispose(): void {
|
|
4571
|
-
// this.garbage.dispose();
|
|
4572
|
-
// }
|
|
4573
|
-
//
|
|
4574
|
-
// registerDisposable<T extends Disposable>(disposable: T): T {
|
|
4575
|
-
// return this.garbage.registerDisposable(disposable);
|
|
4576
|
-
// }
|
|
4577
|
-
//
|
|
4578
|
-
//
|
|
4579
|
-
// connect(collectionViewer: CollectionViewer): Observable<readonly Row[]> {
|
|
4580
|
-
// return this.virtualRowsObservable$;
|
|
4581
|
-
// }
|
|
4582
|
-
//
|
|
4583
|
-
// disconnect(collectionViewer: CollectionViewer): void {
|
|
4584
|
-
// // noop
|
|
4585
|
-
// }
|
|
4586
|
-
//
|
|
4587
|
-
//
|
|
4588
|
-
// }
|
|
4589
4478
|
const AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER = new InjectionToken("AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER");
|
|
4590
4479
|
class TableRowAttributesDirective {
|
|
4591
4480
|
elementRef;
|
|
@@ -4634,8 +4523,8 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
4634
4523
|
columnIds$;
|
|
4635
4524
|
columnsById$;
|
|
4636
4525
|
// TODO: support user defined header and row heights via css vars.
|
|
4637
|
-
headerHeight$ = new MutableValueModel(
|
|
4638
|
-
rowHeight$ = new MutableValueModel(
|
|
4526
|
+
headerHeight$ = new MutableValueModel(48);
|
|
4527
|
+
rowHeight$ = new MutableValueModel(44);
|
|
4639
4528
|
baseCssClass = "aup-table-component";
|
|
4640
4529
|
virtualScrollDataSource = new TableVirtualScrollDataSource();
|
|
4641
4530
|
constructor(bufferMultiplier = 1) {
|
|
@@ -4678,6 +4567,12 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
4678
4567
|
get hideHeader() {
|
|
4679
4568
|
return !this.showHeader;
|
|
4680
4569
|
}
|
|
4570
|
+
get headerHeightCssVar() {
|
|
4571
|
+
return `${this.headerHeight$.value}px`;
|
|
4572
|
+
}
|
|
4573
|
+
get rowHeightCssVar() {
|
|
4574
|
+
return `${this.rowHeight$.value}px`;
|
|
4575
|
+
}
|
|
4681
4576
|
isEditing(row) {
|
|
4682
4577
|
return !!this.tableModel.getEditSessionFor(row);
|
|
4683
4578
|
}
|
|
@@ -4717,7 +4612,7 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
4717
4612
|
}, waitMillis);
|
|
4718
4613
|
}
|
|
4719
4614
|
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 });
|
|
4720
|
-
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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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: "directive", type: TableRowAttributesDirective, selector: "[aupTableRowAttributes]", inputs: ["aupTableRowAttributes"] }, { kind: "component", type: TableCellComponent, selector: "aup-table-cell", inputs: ["row", "column", "editSession", "tableModel"] }, { kind: "component", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }] });
|
|
4615
|
+
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", "style.--aup-table-header-height": "this.headerHeightCssVar", "style.--aup-table-row-height": "this.rowHeightCssVar" } }, 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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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=virtual] table th{height:var(--aup-table-header-height);max-height:var(--aup-table-header-height);min-height:var(--aup-table-header-height)}:host[scrollMode=virtual] table td{height:var(--aup-table-row-height);max-height:var(--aup-table-row-height);min-height:var(--aup-table-row-height)}: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: "directive", type: TableRowAttributesDirective, selector: "[aupTableRowAttributes]", inputs: ["aupTableRowAttributes"] }, { kind: "component", type: TableCellComponent, selector: "aup-table-cell", inputs: ["row", "column", "editSession", "tableModel"] }, { kind: "component", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }] });
|
|
4721
4616
|
}
|
|
4722
4617
|
__decorate([
|
|
4723
4618
|
Proxify(),
|
|
@@ -4745,7 +4640,7 @@ __decorate([
|
|
|
4745
4640
|
], TableBodyComponent.prototype, "scrollMode", null);
|
|
4746
4641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
4747
4642
|
type: Component,
|
|
4748
|
-
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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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"] }]
|
|
4643
|
+
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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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 [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\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=virtual] table th{height:var(--aup-table-header-height);max-height:var(--aup-table-header-height);min-height:var(--aup-table-header-height)}:host[scrollMode=virtual] table td{height:var(--aup-table-row-height);max-height:var(--aup-table-row-height);min-height:var(--aup-table-row-height)}: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"] }]
|
|
4749
4644
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4750
4645
|
type: Inject,
|
|
4751
4646
|
args: [AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER]
|
|
@@ -4774,6 +4669,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
4774
4669
|
}], hideHeader: [{
|
|
4775
4670
|
type: HostBinding,
|
|
4776
4671
|
args: ["class.hide-header"]
|
|
4672
|
+
}], headerHeightCssVar: [{
|
|
4673
|
+
type: HostBinding,
|
|
4674
|
+
args: ["style.--aup-table-header-height"]
|
|
4675
|
+
}], rowHeightCssVar: [{
|
|
4676
|
+
type: HostBinding,
|
|
4677
|
+
args: ["style.--aup-table-row-height"]
|
|
4777
4678
|
}] } });
|
|
4778
4679
|
|
|
4779
4680
|
class TableMoreMenuPopupComponent extends DisposableComponent {
|