@coolon/angular-ui-powerups 16.1.0-alpha.328 → 16.1.0-alpha.329
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/renderer/table-body/table-body.component.mjs +62 -4
- package/esm2022/lib/components/tables/table/table.component.mjs +13 -4
- package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +1 -1
- package/fesm2022/coolon-angular-ui-powerups.mjs +74 -7
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/renderer/table-body/table-body.component.d.ts +20 -1
- package/lib/components/tables/table/table.component.d.ts +8 -1
- package/package.json +1 -1
|
@@ -29,7 +29,10 @@ export declare class TableBodyComponent<Row extends object> extends ResizeAwareC
|
|
|
29
29
|
trackBy: (index: number, item: Row) => any;
|
|
30
30
|
accessor scrollMode$: ValueModel<TableBodyComponent.ScrollMode>;
|
|
31
31
|
accessor scrollMode: TableBodyComponent.ScrollMode;
|
|
32
|
+
/** Keeps the rows in view where they are when rows change above them: see `TableComponent.holdScrollPosition`. */
|
|
33
|
+
holdScrollPosition: boolean;
|
|
32
34
|
scrollViewport: CdkVirtualScrollViewport;
|
|
35
|
+
private classicScrollContainer?;
|
|
33
36
|
columns$: ListModelChain<ColumnModel<Row>>;
|
|
34
37
|
columnIds$: ListModelChain<string>;
|
|
35
38
|
footerRowDefs$: ValueModel<ResolvedFooterRow[]>;
|
|
@@ -82,6 +85,17 @@ export declare class TableBodyComponent<Row extends object> extends ResizeAwareC
|
|
|
82
85
|
protected takeHeightsFromTheme(): void;
|
|
83
86
|
/** A length custom property as resolved on an element, in px; undefined when unset or not a length. */
|
|
84
87
|
private readCssPixels;
|
|
88
|
+
/**
|
|
89
|
+
* Where each row in view sits, by its id, when [holdScrollPosition] applies and the table is scrolled down;
|
|
90
|
+
* otherwise undefined. A row behind the sticky header is not in view.
|
|
91
|
+
*/
|
|
92
|
+
private rowsInViewToHold;
|
|
93
|
+
/**
|
|
94
|
+
* Renders the new rows now, then scrolls by however far the first of [rowsInView] still in the table has
|
|
95
|
+
* moved, so it is drawn where it was. Both happen before the browser paints, so the reader never sees the
|
|
96
|
+
* rows move.
|
|
97
|
+
*/
|
|
98
|
+
private holdInView;
|
|
85
99
|
private scheduleTableHeightCheck;
|
|
86
100
|
private notifyScrolled;
|
|
87
101
|
private notifyScrollEnded;
|
|
@@ -89,8 +103,13 @@ export declare class TableBodyComponent<Row extends object> extends ResizeAwareC
|
|
|
89
103
|
private resetAnimationsAfterFrame;
|
|
90
104
|
private clearScrollTimeout;
|
|
91
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableBodyComponent<any>, [{ optional: true; }]>;
|
|
92
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableBodyComponent<any>, "aup-table-body", never, { "data$": { "alias": "data$"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; "footerRows": { "alias": "footerRows"; "required": false; }; "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; }, {}, never, never, false, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableBodyComponent<any>, "aup-table-body", never, { "data$": { "alias": "data$"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; "footerRows": { "alias": "footerRows"; "required": false; }; "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; "holdScrollPosition": { "alias": "holdScrollPosition"; "required": false; }; }, {}, never, never, false, never>;
|
|
93
107
|
}
|
|
94
108
|
export declare namespace TableBodyComponent {
|
|
95
109
|
type ScrollMode = "none" | "classic" | "virtual";
|
|
110
|
+
/** A row in view, by the id it is drawn with, and the top of its box in the viewport. */
|
|
111
|
+
interface RowInView {
|
|
112
|
+
readonly id: string;
|
|
113
|
+
readonly top: number;
|
|
114
|
+
}
|
|
96
115
|
}
|
|
@@ -85,6 +85,13 @@ export declare class TableComponent<Row extends object> extends AbstractTableCom
|
|
|
85
85
|
*/
|
|
86
86
|
accessor scrollMode$: ValueModel<TableComponent.ScrollMode>;
|
|
87
87
|
accessor scrollMode: TableComponent.ScrollMode;
|
|
88
|
+
/**
|
|
89
|
+
* Set to true to keep the rows in view where they are when rows are inserted, removed or resized above
|
|
90
|
+
* them, so a reader scrolled down the table is not moved. At the top of the table nothing is held, so a
|
|
91
|
+
* row inserted there comes into view. Applies with `scrollMode="classic"` only, and only to rows with an
|
|
92
|
+
* identity of their own (a list `identifiedBy` an id), because a row is found again by its id.
|
|
93
|
+
*/
|
|
94
|
+
holdScrollPosition: boolean;
|
|
88
95
|
private _footerContentAdded;
|
|
89
96
|
private readonly _filteredRows$;
|
|
90
97
|
protected readonly tableBodyScrollMode$: ValueModel<TableBodyComponent.ScrollMode>;
|
|
@@ -99,7 +106,7 @@ export declare class TableComponent<Row extends object> extends AbstractTableCom
|
|
|
99
106
|
protected get showsEmptyContent(): boolean;
|
|
100
107
|
footerContentChanged($event: unknown): void;
|
|
101
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
102
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "aup-table", never, { "tableModel": { "alias": "tableModel"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; }, {}, never, ["[empty], [slot=empty]", "[footer], [slot=footer]"], false, never>;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "aup-table", never, { "tableModel": { "alias": "tableModel"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; "holdScrollPosition": { "alias": "holdScrollPosition"; "required": false; }; }, {}, never, ["[empty], [slot=empty]", "[footer], [slot=footer]"], false, never>;
|
|
103
110
|
}
|
|
104
111
|
export declare namespace TableComponent {
|
|
105
112
|
type ScrollMode = Omit<TableBodyComponent.ScrollMode, 'none'>;
|