@coolon/angular-ui-powerups 16.1.0-alpha.332 → 16.1.0-alpha.333
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-model.mjs +8 -7
- package/esm2022/lib/components/tables/end-of-rows/end-of-rows-watcher.mjs +4 -2
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +3 -3
- package/fesm2022/coolon-angular-ui-powerups.mjs +12 -9
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/abstract-table-model.d.ts +7 -6
- package/package.json +1 -1
|
@@ -7099,15 +7099,16 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
7099
7099
|
return this.columnManager.displayScope$;
|
|
7100
7100
|
}
|
|
7101
7101
|
/**
|
|
7102
|
-
* Shows a row
|
|
7103
|
-
* [loading$] is true and, in a table that watches the end of its rows ({@link watchEndOfRows}), until
|
|
7104
|
-
* measured the chunk's rows. A page that loads its rows a chunk at a time sets [loading$] while a chunk
|
|
7105
|
-
*
|
|
7106
|
-
* appears.
|
|
7102
|
+
* Shows a row with a spinner and [message], pinned to the bottom of the table, while the next chunk of rows is on
|
|
7103
|
+
* its way: while [loading$] is true and, in a table that watches the end of its rows ({@link watchEndOfRows}), until
|
|
7104
|
+
* the table has measured the chunk's rows. A page that loads its rows a chunk at a time sets [loading$] while a chunk
|
|
7105
|
+
* is on its way. The row is pinned, so the reader sees that more are coming wherever they have scrolled to. Screen
|
|
7106
|
+
* readers announce the message as it appears.
|
|
7107
7107
|
*
|
|
7108
7108
|
* In a table that watches the end of its rows, [loading$] also tells the table when a chunk is on its way, and the
|
|
7109
7109
|
* end of the rows does not count as in view meanwhile. The row stays until the table has measured afresh, so it does
|
|
7110
|
-
* not drop out between two chunks that follow one another.
|
|
7110
|
+
* not drop out between two chunks that follow one another. The row sits above any other footer row
|
|
7111
|
+
* ({@link addFooterRow}).
|
|
7111
7112
|
*
|
|
7112
7113
|
* Call it once: a second call would replace the first's flag and message. The table reads it as it initialises, in
|
|
7113
7114
|
* its ngOnInit, so call it where the model is built, not from a directive on the aup-table, which initialises after
|
|
@@ -7484,7 +7485,9 @@ class EndOfRowsWatcher {
|
|
|
7484
7485
|
// The table's own sections, not those of a table drawn in one of its cells.
|
|
7485
7486
|
const table = scrollContainer.querySelector(':scope > table');
|
|
7486
7487
|
const headerHeight = heightOf(table?.tHead);
|
|
7487
|
-
|
|
7488
|
+
// The loading row is a footer row that comes and goes as chunks load. Counted, it would shrink the rows that fit
|
|
7489
|
+
// while a chunk is on its way, and so the size of the next chunk.
|
|
7490
|
+
const footerHeight = heightOf(table?.tFoot) - heightOf(table?.tFoot?.querySelector(':scope > tr.loading-footer-row'));
|
|
7488
7491
|
const rowArea = table?.tBodies.item(0);
|
|
7489
7492
|
const drawnRowCount = rowArea?.rows.length ?? 0;
|
|
7490
7493
|
const rowHeight = drawnRowCount > 0 ? heightOf(rowArea) / drawnRowCount : this.themeRowHeight();
|
|
@@ -8038,7 +8041,7 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
8038
8041
|
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 });
|
|
8039
8042
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableBodyComponent, selector: "aup-table-body", inputs: { data$: "data$", tableModel: "tableModel", footerRows: "footerRows", showHeader$: "showHeader$", showHeader: "showHeader", trackBy: "trackBy", scrollMode$: "scrollMode$", scrollMode: "scrollMode", holdScrollPosition: "holdScrollPosition" }, host: { properties: { "attr.scrollMode": "this.scrollMode", "class.hold-scroll-position": "this.holdScrollPosition", "class": "this.baseCssClass", "class.aup-animations-disabled": "this.animationsDisabledClass", "class.hide-header": "this.hideHeader", "style.--aup-table-header-height": "this.headerHeightCssVar", "style.--aup-table-row-height": "this.rowHeightCssVar" } }, providers: [
|
|
8040
8043
|
{ provide: AUP_DETACHED_PARENT_CDR, useFactory: () => inject(AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, { optional: true }) ? inject(ChangeDetectorRef) : null }
|
|
8041
|
-
], viewQueries: [{ propertyName: "scrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "classicScrollContainer", first: true, predicate: ["classicScrollContainer"], descendants: true }, { propertyName: "endOfRowsMarker", first: true, predicate: ["endOfRowsMarker"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n<div #classicScrollContainer class=\"classic-scroll-container\" aup-table-scroller *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]=\"$any(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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n </table>\n <!-- The status region is in the page before its message appears in it, so screen readers announce the message. -->\n <div *ngIf=\"tableModel._loadingRow as loadingRow\" role=\"status\">\n <div *ngIf=\"loadingRowShown$.value\" class=\"loading-row\" aup-loading-row>\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"20\" aria-hidden=\"true\"></mat-progress-spinner>\n <span>{{ loadingRow.message() }}</span>\n </div>\n </div>\n <!-- The marker after the last row, watched to tell when the end of the rows is in view. -->\n <div #endOfRowsMarker *ngIf=\"tableModel._endOfRows && scrollMode$.value === 'classic'\" class=\"end-of-rows\" aria-hidden=\"true\"></div>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\" aup-table-scroller\n [@.disabled]=\"animationsDisabled$.value\"\n [tvsItemSize]=\"rowHeight$.value\"\n [headerHeight]=\"headerHeight$.value\"\n [footerEnabled]=\"(footerRowDefs$?.value?.length ?? 0) > 0\"\n [footerHeight]=\"48 * (footerRowDefs$?.value?.length ?? 0)\"\n [bufferMultiplier]=\"bufferMultiplier\"\n>\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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{--enter-animation-duration: .1s;display:flex;flex-direction:column;align-items:stretch}:host.aup-animations-disabled{--enter-animation-duration: 0ms}:host table{width:100%}:host tr.aup-footer-row-hidden{display:none}:host td.footer-cell{border-top:0!important;box-shadow:0 -1px 0 0 var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))}: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}:host.hold-scroll-position .classic-scroll-container{overflow-anchor:none}.loading-row{display:flex;align-items:center;justify-content:center;gap:12px;height:var(--aup-table-row-height);color:var(--aup-table-loading-row-color, inherit)}.end-of-rows{height:1px;flex-shrink:0;pointer-events:none}\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: "directive", type: HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }, { kind: "component", type: i3$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$3.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3$3.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3$3.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$3.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i2$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i6.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", "tableModel"] }, { kind: "component", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }, { kind: "component", type: TableFooterRow, selector: "aup-table-footer-row", inputs: ["cell"] }] });
|
|
8044
|
+
], viewQueries: [{ propertyName: "scrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "classicScrollContainer", first: true, predicate: ["classicScrollContainer"], descendants: true }, { propertyName: "endOfRowsMarker", first: true, predicate: ["endOfRowsMarker"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Reads the loading row's message to screen readers. It is in the page before the message appears in it, as a\n screen reader announces only a change to a status region it already knows, and the loading row is hidden while\n no chunk is on its way. -->\n<div *ngIf=\"tableModel._loadingRow as loadingRow\" role=\"status\" class=\"loading-status\">{{ loadingRowShown$.value ? loadingRow.message() : '' }}</div>\n\n<div #classicScrollContainer class=\"classic-scroll-container\" aup-table-scroller *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]=\"$any(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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <!-- The loading row, pinned to the bottom of the table above any other footer row. The status region outside the\n table reads its message to screen readers, so the row itself is hidden from them. -->\n <ng-container *ngIf=\"tableModel._loadingRow as loadingRow\" matColumnDef=\"aup-loading-row\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"columnIds$.value.length\" class=\"footer-cell loading-row-cell\">\n <div *ngIf=\"loadingRowShown$.value\" class=\"loading-row\" aup-loading-row aria-hidden=\"true\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n <span>{{ loadingRow.message() }}</span>\n </div>\n </td>\n <tr mat-footer-row *matFooterRowDef=\"['aup-loading-row']; sticky: true\" class=\"loading-footer-row\"\n [class.aup-footer-row-hidden]=\"!loadingRowShown$.value\"></tr>\n </ng-container>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n </table>\n <!-- The marker after the last row, watched to tell when the end of the rows is in view. -->\n <div #endOfRowsMarker *ngIf=\"tableModel._endOfRows && scrollMode$.value === 'classic'\" class=\"end-of-rows\" aria-hidden=\"true\"></div>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\" aup-table-scroller\n [@.disabled]=\"animationsDisabled$.value\"\n [tvsItemSize]=\"rowHeight$.value\"\n [headerHeight]=\"headerHeight$.value\"\n [footerEnabled]=\"(footerRowDefs$?.value?.length ?? 0) > 0\"\n [footerHeight]=\"48 * (footerRowDefs$?.value?.length ?? 0)\"\n [bufferMultiplier]=\"bufferMultiplier\"\n>\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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <!-- The loading row, pinned to the bottom of the table above any other footer row. The status region outside the\n table reads its message to screen readers, so the row itself is hidden from them. -->\n <ng-container *ngIf=\"tableModel._loadingRow as loadingRow\" matColumnDef=\"aup-loading-row\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"columnIds$.value.length\" class=\"footer-cell loading-row-cell\">\n <div *ngIf=\"loadingRowShown$.value\" class=\"loading-row\" aup-loading-row aria-hidden=\"true\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n <span>{{ loadingRow.message() }}</span>\n </div>\n </td>\n <tr mat-footer-row *matFooterRowDef=\"['aup-loading-row']; sticky: true\" class=\"loading-footer-row\"\n [class.aup-footer-row-hidden]=\"!loadingRowShown$.value\"></tr>\n </ng-container>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{--enter-animation-duration: .1s;display:flex;flex-direction:column;align-items:stretch}:host.aup-animations-disabled{--enter-animation-duration: 0ms}:host table{width:100%}:host tr.aup-footer-row-hidden{display:none}:host td.footer-cell{border-top:0!important;box-shadow:0 -1px 0 0 var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))}: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}:host.hold-scroll-position .classic-scroll-container{overflow-anchor:none}td.loading-row-cell{padding:0}.loading-row{display:flex;align-items:center;justify-content:center;gap:12px;height:var(--aup-table-row-height);color:var(--aup-table-loading-row-color, inherit)}.loading-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.end-of-rows{height:1px;flex-shrink:0;pointer-events:none}\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: "directive", type: HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }, { kind: "component", type: i3$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$3.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3$3.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3$3.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$3.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i2$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i6.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", "tableModel"] }, { kind: "component", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }, { kind: "component", type: TableFooterRow, selector: "aup-table-footer-row", inputs: ["cell"] }] });
|
|
8042
8045
|
}
|
|
8043
8046
|
__decorate([
|
|
8044
8047
|
Proxify(),
|
|
@@ -8068,7 +8071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
8068
8071
|
type: Component,
|
|
8069
8072
|
args: [{ selector: "aup-table-body", providers: [
|
|
8070
8073
|
{ provide: AUP_DETACHED_PARENT_CDR, useFactory: () => inject(AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, { optional: true }) ? inject(ChangeDetectorRef) : null }
|
|
8071
|
-
], template: "\n<div #classicScrollContainer class=\"classic-scroll-container\" aup-table-scroller *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]=\"$any(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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n </table>\n <!-- The
|
|
8074
|
+
], template: "<!-- Reads the loading row's message to screen readers. It is in the page before the message appears in it, as a\n screen reader announces only a change to a status region it already knows, and the loading row is hidden while\n no chunk is on its way. -->\n<div *ngIf=\"tableModel._loadingRow as loadingRow\" role=\"status\" class=\"loading-status\">{{ loadingRowShown$.value ? loadingRow.message() : '' }}</div>\n\n<div #classicScrollContainer class=\"classic-scroll-container\" aup-table-scroller *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]=\"$any(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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <!-- The loading row, pinned to the bottom of the table above any other footer row. The status region outside the\n table reads its message to screen readers, so the row itself is hidden from them. -->\n <ng-container *ngIf=\"tableModel._loadingRow as loadingRow\" matColumnDef=\"aup-loading-row\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"columnIds$.value.length\" class=\"footer-cell loading-row-cell\">\n <div *ngIf=\"loadingRowShown$.value\" class=\"loading-row\" aup-loading-row aria-hidden=\"true\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n <span>{{ loadingRow.message() }}</span>\n </div>\n </td>\n <tr mat-footer-row *matFooterRowDef=\"['aup-loading-row']; sticky: true\" class=\"loading-footer-row\"\n [class.aup-footer-row-hidden]=\"!loadingRowShown$.value\"></tr>\n </ng-container>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n </table>\n <!-- The marker after the last row, watched to tell when the end of the rows is in view. -->\n <div #endOfRowsMarker *ngIf=\"tableModel._endOfRows && scrollMode$.value === 'classic'\" class=\"end-of-rows\" aria-hidden=\"true\"></div>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\" aup-table-scroller\n [@.disabled]=\"animationsDisabled$.value\"\n [tvsItemSize]=\"rowHeight$.value\"\n [headerHeight]=\"headerHeight$.value\"\n [footerEnabled]=\"(footerRowDefs$?.value?.length ?? 0) > 0\"\n [footerHeight]=\"48 * (footerRowDefs$?.value?.length ?? 0)\"\n [bufferMultiplier]=\"bufferMultiplier\"\n>\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.isCursorEnabledForRow(column, row)\"\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 [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n [aupHighlightTextModel]=\"highlightTextFor($any(column))\"\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.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <!-- The loading row, pinned to the bottom of the table above any other footer row. The status region outside the\n table reads its message to screen readers, so the row itself is hidden from them. -->\n <ng-container *ngIf=\"tableModel._loadingRow as loadingRow\" matColumnDef=\"aup-loading-row\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"columnIds$.value.length\" class=\"footer-cell loading-row-cell\">\n <div *ngIf=\"loadingRowShown$.value\" class=\"loading-row\" aup-loading-row aria-hidden=\"true\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n <span>{{ loadingRow.message() }}</span>\n </div>\n </td>\n <tr mat-footer-row *matFooterRowDef=\"['aup-loading-row']; sticky: true\" class=\"loading-footer-row\"\n [class.aup-footer-row-hidden]=\"!loadingRowShown$.value\"></tr>\n </ng-container>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{--enter-animation-duration: .1s;display:flex;flex-direction:column;align-items:stretch}:host.aup-animations-disabled{--enter-animation-duration: 0ms}:host table{width:100%}:host tr.aup-footer-row-hidden{display:none}:host td.footer-cell{border-top:0!important;box-shadow:0 -1px 0 0 var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))}: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}:host.hold-scroll-position .classic-scroll-container{overflow-anchor:none}td.loading-row-cell{padding:0}.loading-row{display:flex;align-items:center;justify-content:center;gap:12px;height:var(--aup-table-row-height);color:var(--aup-table-loading-row-color, inherit)}.loading-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.end-of-rows{height:1px;flex-shrink:0;pointer-events:none}\n"] }]
|
|
8072
8075
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8073
8076
|
type: Inject,
|
|
8074
8077
|
args: [AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER]
|