mn-angular-lib 2.0.26 → 2.0.28
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/package.json
CHANGED
|
@@ -127,6 +127,12 @@ type MnCollectionDataSource<T> = {
|
|
|
127
127
|
pageSize?: number;
|
|
128
128
|
/** Options for the page-size selector dropdown. Defaults to [5, 10, 25, 50]. */
|
|
129
129
|
pageSizeOptions?: number[];
|
|
130
|
+
/**
|
|
131
|
+
* The largest page mn-table's phone "Load more" may ask a `paginated` (server-side) consumer
|
|
132
|
+
* for. Each tap grows the page by the size it started at, up to this cap; past it the pager
|
|
133
|
+
* comes back. Defaults to 100, a common server limit. Client-side pagination has no cap.
|
|
134
|
+
*/
|
|
135
|
+
maxPageSize?: number;
|
|
130
136
|
/** Callback invoked when the user changes the page size via the dropdown. */
|
|
131
137
|
onPageSizeChange?: (newSize: number) => void;
|
|
132
138
|
/**
|
|
@@ -1119,6 +1125,40 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
1119
1125
|
* an empty or short list is chrome with nothing to do. Above it the strip stays as it was.
|
|
1120
1126
|
*/
|
|
1121
1127
|
get showsPagination(): boolean;
|
|
1128
|
+
/**
|
|
1129
|
+
* Whether a paginated table offers "Load more" instead of the pager: below 640px, on the first
|
|
1130
|
+
* page, while rows remain and the next size stays within {@link MnCollectionDataSource.maxPageSize}.
|
|
1131
|
+
* A tap grows the page instead of appending the next one, so a consumer that reloads after an
|
|
1132
|
+
* edit or a delete gets the whole visible list back rather than one page under stale rows.
|
|
1133
|
+
*/
|
|
1134
|
+
get showsPhoneLoadMore(): boolean;
|
|
1135
|
+
/**
|
|
1136
|
+
* How many rows the phone list shows. A server-side consumer's rows, not the size asked for:
|
|
1137
|
+
* a consumer that answers an older, bigger request last shows more than {@link pageSize}.
|
|
1138
|
+
*/
|
|
1139
|
+
private get phoneShownCount();
|
|
1140
|
+
/** How far the phone list has grown, as "10 of 48". */
|
|
1141
|
+
get phoneLoadedLabel(): string;
|
|
1142
|
+
/** The phone "Load more" button's label: the consumer's, the app's convention key, or English. */
|
|
1143
|
+
get phoneLoadMoreLabel(): string;
|
|
1144
|
+
/** A grown phone list has no pager to hold steady, so it keeps no full-page height floor. */
|
|
1145
|
+
get reservedPageHeight(): number;
|
|
1146
|
+
/**
|
|
1147
|
+
* Grows the phone list by one step: a client-side table shows more of the rows it holds, a
|
|
1148
|
+
* server-side one asks its consumer for a bigger first page. The rows on screen stay there
|
|
1149
|
+
* while that loads ({@link phoneLoadingMore}); skeletons would throw the reader back to the top.
|
|
1150
|
+
*/
|
|
1151
|
+
loadMorePhoneRows(): void;
|
|
1152
|
+
/**
|
|
1153
|
+
* The page size the next "Load more" asks for: one step more than the rows shown, capped for a
|
|
1154
|
+
* server.
|
|
1155
|
+
* @returns The next size; equal to the rows shown when the cap is reached.
|
|
1156
|
+
*/
|
|
1157
|
+
private nextPhonePageSize;
|
|
1158
|
+
/** Fresh rows answer a "Load more": the button stops spinning. */
|
|
1159
|
+
protected onRowsChanged(): void;
|
|
1160
|
+
/** A failed "Load more" shows the error, not a button that spins forever. */
|
|
1161
|
+
ngDoCheck(): void;
|
|
1122
1162
|
/** How many column filters are set, shown as a count on the filter button. */
|
|
1123
1163
|
get activeFilterCount(): number;
|
|
1124
1164
|
/**
|
|
@@ -1165,6 +1205,12 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
1165
1205
|
* and its footer is pinned over the bottom of the table.
|
|
1166
1206
|
*/
|
|
1167
1207
|
private static readonly MOBILE_PAGE_SIZE;
|
|
1208
|
+
/** {@link MnCollectionDataSource.maxPageSize} when the consumer sets none. */
|
|
1209
|
+
private static readonly DEFAULT_MAX_PAGE_SIZE;
|
|
1210
|
+
/** Rows one phone "Load more" tap adds: the page size before the first tap; 0 while not grown. */
|
|
1211
|
+
private phoneLoadStep;
|
|
1212
|
+
/** Whether a phone "Load more" refetch is in flight: rows stay up and the button spins. */
|
|
1213
|
+
protected phoneLoadingMore: boolean;
|
|
1168
1214
|
/**
|
|
1169
1215
|
* The component's own element, measured for every responsive decision. Typed via
|
|
1170
1216
|
* the annotation, not `inject(ElementRef<HTMLElement>)` — that form is a generic
|