@meshmakers/shared-ui 3.4.400 → 3.4.420

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshmakers/shared-ui",
3
- "version": "3.4.400",
3
+ "version": "3.4.420",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
@@ -258,12 +258,28 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
258
258
  private readonly hostElement;
259
259
  private readonly ngZone;
260
260
  private resizeObserver?;
261
+ /** Never auto-page below this many rows, even in a tiny viewport. */
262
+ private static readonly MIN_AUTO_PAGE_SIZE;
263
+ /** Measured fit-to-height page size (`autoPageSize`); null until the first measurement. */
264
+ private readonly autoPageSizeValue;
265
+ /** Last measured row height — reused while a page renders no rows (e.g. empty filter result). */
266
+ private lastMeasuredRowHeight;
267
+ private readonly autoPageSizeRecompute$;
261
268
  private gridComponent?;
262
269
  private dataBindingDirective?;
263
270
  gridContextMenu?: ContextMenuComponent;
264
271
  rowClicked: EventEmitter<unknown[]>;
265
272
  pageSize: number;
266
273
  skip: number;
274
+ /**
275
+ * Fit-to-height paging: when enabled, the page size is derived from the grid's
276
+ * available content height and the measured row height, so a page always fills
277
+ * the viewport instead of leaving a half-empty grid with a detached pager on
278
+ * large screens. The pager's page-size dropdown is hidden (a manual choice
279
+ * would be overridden on the next resize). `pageSize` serves as the initial
280
+ * page size until the first measurement; the minimum auto page size is 5.
281
+ */
282
+ autoPageSize: boolean;
267
283
  rowIsClickable: boolean;
268
284
  showRowCheckBoxes: boolean;
269
285
  showRowSelectAllCheckBox: boolean;
@@ -280,6 +296,11 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
280
296
  sortable: boolean;
281
297
  rowFilterEnabled: boolean;
282
298
  searchTextBoxEnabled: boolean;
299
+ /** The page size the grid actually uses: the measured fit-to-height value in `autoPageSize` mode, `pageSize` otherwise. */
300
+ protected effectivePageSize(): number;
301
+ private _cachedAutoPageable?;
302
+ /** Pager settings the grid uses; in `autoPageSize` mode the page-size dropdown is stripped. Cached per source object to keep the input reference stable across change detection. */
303
+ protected get effectivePageable(): PagerSettings;
283
304
  /** Whether users can resize columns by dragging the header edges. */
284
305
  resizable: boolean;
285
306
  /**
@@ -314,6 +335,13 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
314
335
  get columns(): TableColumn[];
315
336
  constructor();
316
337
  ngAfterViewInit(): void;
338
+ /**
339
+ * Measures the grid's content viewport and the rendered row height, derives the
340
+ * number of rows that fit and applies it as the new page size (grid + query state)
341
+ * when it differs from the current one. No-op until a row has been rendered at
342
+ * least once (there is nothing to measure on a fully empty grid).
343
+ */
344
+ private recomputeAutoPageSize;
317
345
  ngOnDestroy(): void;
318
346
  /** Whether the column is hidden at the current component width (`hideBelow`). */
319
347
  protected isColumnHidden(column: TableColumn): boolean;
@@ -404,7 +432,7 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
404
432
  protected getPdfPageText(pageNum: number, totalPages: number): string;
405
433
  protected readonly moreVerticalIcon: SVGIcon$1;
406
434
  static ɵfac: i0.ɵɵFactoryDeclaration<ListViewComponent, never>;
407
- static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "mm-list-view", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "skip": { "alias": "skip"; "required": false; }; "rowIsClickable": { "alias": "rowIsClickable"; "required": false; }; "showRowCheckBoxes": { "alias": "showRowCheckBoxes"; "required": false; }; "showRowSelectAllCheckBox": { "alias": "showRowSelectAllCheckBox"; "required": false; }; "contextMenuType": { "alias": "contextMenuType"; "required": false; }; "leftToolbarActions": { "alias": "leftToolbarActions"; "required": false; }; "rightToolbarActions": { "alias": "rightToolbarActions"; "required": false; }; "actionCommandItems": { "alias": "actionCommandItems"; "required": false; }; "contextMenuCommandItems": { "alias": "contextMenuCommandItems"; "required": false; }; "excelExportFileName": { "alias": "excelExportFileName"; "required": false; }; "pdfExportFileName": { "alias": "pdfExportFileName"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "rowFilterEnabled": { "alias": "rowFilterEnabled"; "required": false; }; "searchTextBoxEnabled": { "alias": "searchTextBoxEnabled"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionsColumnWidth": { "alias": "actionsColumnWidth"; "required": false; }; "hideCheckboxesBelow": { "alias": "hideCheckboxesBelow"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; }, { "rowClicked": "rowClicked"; }, never, never, true, never>;
435
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "mm-list-view", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "skip": { "alias": "skip"; "required": false; }; "autoPageSize": { "alias": "autoPageSize"; "required": false; }; "rowIsClickable": { "alias": "rowIsClickable"; "required": false; }; "showRowCheckBoxes": { "alias": "showRowCheckBoxes"; "required": false; }; "showRowSelectAllCheckBox": { "alias": "showRowSelectAllCheckBox"; "required": false; }; "contextMenuType": { "alias": "contextMenuType"; "required": false; }; "leftToolbarActions": { "alias": "leftToolbarActions"; "required": false; }; "rightToolbarActions": { "alias": "rightToolbarActions"; "required": false; }; "actionCommandItems": { "alias": "actionCommandItems"; "required": false; }; "contextMenuCommandItems": { "alias": "contextMenuCommandItems"; "required": false; }; "excelExportFileName": { "alias": "excelExportFileName"; "required": false; }; "pdfExportFileName": { "alias": "pdfExportFileName"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "rowFilterEnabled": { "alias": "rowFilterEnabled"; "required": false; }; "searchTextBoxEnabled": { "alias": "searchTextBoxEnabled"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionsColumnWidth": { "alias": "actionsColumnWidth"; "required": false; }; "hideCheckboxesBelow": { "alias": "hideCheckboxesBelow"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; }, { "rowClicked": "rowClicked"; }, never, never, true, never>;
408
436
  }
409
437
 
410
438
  declare class UploadFileDialogComponent extends DialogContentBase {
@@ -975,6 +1003,15 @@ declare abstract class DataSourceBase {
975
1003
  readonly isLoading$: Observable<boolean>;
976
1004
  /** Current loading state */
977
1005
  get isLoading(): boolean;
1006
+ private readonly _totalCount;
1007
+ /**
1008
+ * Total row count reported by the last fetch (`null` before the first result).
1009
+ * Kept current by MmListViewDataBindingDirective; lets host pages show the
1010
+ * overall count (e.g. in a header badge) without a second query.
1011
+ */
1012
+ readonly totalCount: i0.Signal<number | null>;
1013
+ /** Set the total row count (called by MmListViewDataBindingDirective) */
1014
+ setTotalCount(count: number | null): void;
978
1015
  protected constructor(listViewComponent: ListViewComponent);
979
1016
  /** Set the loading state (called by MmListViewDataBindingDirective) */
980
1017
  setLoading(loading: boolean): void;
@@ -1012,6 +1049,12 @@ declare class MmListViewDataBindingDirective extends DataBindingDirective implem
1012
1049
  * Syncs the grid's filter into the DataBindingDirective state before rebinding.
1013
1050
  */
1014
1051
  notifyFilterChange(filter: CompositeFilterDescriptor): void;
1052
+ /**
1053
+ * Applies a programmatic page-size change (fit-to-height mode of mm-list-view).
1054
+ * The inherited setters sync grid and query state; `skip` is realigned to the
1055
+ * new page grid so the pager stays on a valid page, then the data is refetched.
1056
+ */
1057
+ applyPageSize(take: number): void;
1015
1058
  rebind(): void;
1016
1059
  static ɵfac: i0.ɵɵFactoryDeclaration<MmListViewDataBindingDirective, never>;
1017
1060
  static ɵdir: i0.ɵɵDirectiveDeclaration<MmListViewDataBindingDirective, "[mmListViewDataBinding]", never, {}, {}, never, never, true, never>;