@quadrel-enterprise-ui/framework 21.4.0 → 21.4.1

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": "@quadrel-enterprise-ui/framework",
3
- "version": "21.4.0",
3
+ "version": "21.4.1",
4
4
  "exports": {
5
5
  "./jest-preset": "./jest-preset.js",
6
6
  "./package.json": {
@@ -15393,44 +15393,44 @@ declare class QdSectionModule {
15393
15393
  static ɵinj: i0.ɵɵInjectorDeclaration<QdSectionModule>;
15394
15394
  }
15395
15395
 
15396
- /**
15397
- * Token for resolving table data in Angular applications.
15398
- */
15399
- declare const QD_TABLE_DATA_RESOLVER_TOKEN: InjectionToken<string>;
15396
+ declare enum QdTableConnectorState {
15397
+ NONE = "NONE",
15398
+ AWAITING = "AWAITING",
15399
+ ESTABLISHED = "ESTABLISHED"
15400
+ }
15400
15401
 
15401
- /**
15402
- * The pagination slice of `QdTableDataResolverProps`, following Spring Boot's `Pageable`
15403
- * conventions.
15404
- */
15405
- interface QdPaginationParams {
15406
- /**
15407
- * The zero-indexed page number, passed through verbatim (no off-by-one adjustment).
15408
- */
15409
- page?: number;
15410
- /**
15411
- * The number of items per page.
15412
- */
15413
- size?: number;
15402
+ interface QdTableState<T extends string> {
15403
+ data: QdTableData<T>;
15404
+ selectedRows?: QdTableRowIdentifier[];
15405
+ selectedRowsData?: Record<QdTableRowIdentifier, QdTableSelectedRow<string>>;
15406
+ recentSecondaryAction?: QdTableRecentSecondaryAction<T>;
15407
+ hasResolver?: boolean;
15408
+ hasPagination?: boolean;
15409
+ pageIndex?: number;
15410
+ pageSize?: number;
15411
+ totalCount?: number;
15412
+ sort?: QdTableStateSort<T>[];
15413
+ requestState?: QdTableRequestState;
15414
+ connectors?: QdTableConnector[];
15415
+ connectorCriteria?: QdTableConnectorCriteria;
15416
+ lastVisitedRowIdentifier?: QdTableRowIdentifier;
15417
+ }
15418
+ interface QdTablePaginatorCurrentPage {
15419
+ start: number;
15420
+ end: number;
15421
+ totalCount: number;
15422
+ }
15423
+ interface QdTableStateSort<T extends string> {
15424
+ column: T;
15425
+ direction: QdSortDirection;
15426
+ }
15427
+ interface QdTableConnector {
15428
+ connectorName: string;
15429
+ connectorState: QdTableConnectorState;
15430
+ }
15431
+ interface QdTableConnectorCriteria {
15432
+ [criteria: string]: unknown;
15414
15433
  }
15415
- /**
15416
- * **qdPaginationParameterize** turns pagination state into the `page` and `size` parameters read by the backend
15417
- * `QdPaginationParser`.
15418
- *
15419
- * ### Usage
15420
- *
15421
- * ```ts
15422
- * qdPaginationParameterize({ page: 0, size: 25 }).toQueryString(); // 'page=0&size=25'
15423
- * ```
15424
- *
15425
- * @remarks
15426
- * `page` stays zero-indexed and is sent as-is (no `+1`/`-1`), so `page=0` is kept. Each key is
15427
- * only set for a real number; `size` is trusted, not checked. Missing input gives empty
15428
- * parameters.
15429
- *
15430
- * @param input - The page and size from the resolver props.
15431
- * @returns A {@link QdQueryParameter} with the `page` and/or `size` keys.
15432
- */
15433
- declare function qdPaginationParameterize(input: QdPaginationParams | undefined): QdQueryParameter;
15434
15434
 
15435
15435
  /**
15436
15436
  * Represents the resolved data for a query.
@@ -15510,44 +15510,46 @@ declare enum QdTableRequestState {
15510
15510
  ERROR = 2
15511
15511
  }
15512
15512
 
15513
- declare enum QdTableConnectorState {
15514
- NONE = "NONE",
15515
- AWAITING = "AWAITING",
15516
- ESTABLISHED = "ESTABLISHED"
15517
- }
15513
+ /**
15514
+ * Token for resolving table data in Angular applications.
15515
+ *
15516
+ * Bind it to a class implementing `QdTableDataResolver`.
15517
+ */
15518
+ declare const QD_TABLE_DATA_RESOLVER_TOKEN: InjectionToken<QdTableDataResolver<string>>;
15518
15519
 
15519
- interface QdTableState<T extends string> {
15520
- data: QdTableData<T>;
15521
- selectedRows?: QdTableRowIdentifier[];
15522
- selectedRowsData?: Record<QdTableRowIdentifier, QdTableSelectedRow<string>>;
15523
- recentSecondaryAction?: QdTableRecentSecondaryAction<T>;
15524
- hasResolver?: boolean;
15525
- hasPagination?: boolean;
15526
- pageIndex?: number;
15527
- pageSize?: number;
15528
- totalCount?: number;
15529
- sort?: QdTableStateSort<T>[];
15530
- requestState?: QdTableRequestState;
15531
- connectors?: QdTableConnector[];
15532
- connectorCriteria?: QdTableConnectorCriteria;
15533
- lastVisitedRowIdentifier?: QdTableRowIdentifier;
15534
- }
15535
- interface QdTablePaginatorCurrentPage {
15536
- start: number;
15537
- end: number;
15538
- totalCount: number;
15539
- }
15540
- interface QdTableStateSort<T extends string> {
15541
- column: T;
15542
- direction: QdSortDirection;
15543
- }
15544
- interface QdTableConnector {
15545
- connectorName: string;
15546
- connectorState: QdTableConnectorState;
15547
- }
15548
- interface QdTableConnectorCriteria {
15549
- [criteria: string]: unknown;
15520
+ /**
15521
+ * The pagination slice of `QdTableDataResolverProps`, following Spring Boot's `Pageable`
15522
+ * conventions.
15523
+ */
15524
+ interface QdPaginationParams {
15525
+ /**
15526
+ * The zero-indexed page number, passed through verbatim (no off-by-one adjustment).
15527
+ */
15528
+ page?: number;
15529
+ /**
15530
+ * The number of items per page.
15531
+ */
15532
+ size?: number;
15550
15533
  }
15534
+ /**
15535
+ * **qdPaginationParameterize** turns pagination state into the `page` and `size` parameters read by the backend
15536
+ * `QdPaginationParser`.
15537
+ *
15538
+ * ### Usage
15539
+ *
15540
+ * ```ts
15541
+ * qdPaginationParameterize({ page: 0, size: 25 }).toQueryString(); // 'page=0&size=25'
15542
+ * ```
15543
+ *
15544
+ * @remarks
15545
+ * `page` stays zero-indexed and is sent as-is (no `+1`/`-1`), so `page=0` is kept. Each key is
15546
+ * only set for a real number; `size` is trusted, not checked. Missing input gives empty
15547
+ * parameters.
15548
+ *
15549
+ * @param input - The page and size from the resolver props.
15550
+ * @returns A {@link QdQueryParameter} with the `page` and/or `size` keys.
15551
+ */
15552
+ declare function qdPaginationParameterize(input: QdPaginationParams | undefined): QdQueryParameter;
15551
15553
 
15552
15554
  /**
15553
15555
  * **qdSortParameterize** turns table sort state into the Spring `sort=column,direction` format read by the backend
@@ -15720,6 +15722,8 @@ declare class QdTableComponent<T extends string> implements OnInit, OnChanges, O
15720
15722
  private readonly emptyStateService;
15721
15723
  private readonly responsiveRowService;
15722
15724
  private readonly fillingWidthService;
15725
+ private readonly scrollAnchorService;
15726
+ private readonly scrollAnchorHook;
15723
15727
  private readonly breakpointService;
15724
15728
  private readonly resolverService;
15725
15729
  private readonly confirmationDialogService;
@@ -15821,6 +15825,7 @@ declare class QdTableComponent<T extends string> implements OnInit, OnChanges, O
15821
15825
  private initializeResponsiveRowService;
15822
15826
  private updateResponsiveRowServiceTableConfig;
15823
15827
  private initializeFillingWidthService;
15828
+ private initializeScrollAnchorService;
15824
15829
  private updateFillingWidthServiceTableConfig;
15825
15830
  private initializeEmptyStateService;
15826
15831
  private initializeRowSelectionService;
@@ -16220,26 +16225,17 @@ declare class QdTreeComponent<T extends string> implements OnInit, OnChanges, On
16220
16225
  }
16221
16226
 
16222
16227
  /**
16223
- * The `QdScrollToPaginationDirective` directive makes it possible to scroll to the pagination section of a table when changing pages. It synchronizes with the page change events of the table and triggers scrolling when it is necessary to keep the pagination section accessible to the user.
16228
+ * Marks the element the view should end up at after a page change.
16224
16229
  *
16225
- * Apply this directive to the HTML element representing the pagination section of the QuickDesk table.
16230
+ * Apply it to the pagination section of the table.
16226
16231
  */
16227
- declare class QdScrollToPaginationDirective<T extends string> implements OnInit, OnDestroy {
16232
+ declare class QdScrollToPaginationDirective implements OnInit, OnDestroy {
16228
16233
  private readonly elementRef;
16229
- private readonly tableStoreService;
16230
- private readonly scrollingService;
16231
- private _destroyed$;
16232
- private _bottom;
16234
+ private readonly scrollAnchorService;
16233
16235
  ngOnInit(): void;
16234
16236
  ngOnDestroy(): void;
16235
- private getScrollBottom;
16236
- private handleScrollAnalysis;
16237
- private hasRequestBeenTriggered;
16238
- private hasRequestSucceeded;
16239
- private shouldScroll;
16240
- private performScrollIntoView;
16241
- static ɵfac: i0.ɵɵFactoryDeclaration<QdScrollToPaginationDirective<any>, never>;
16242
- static ɵdir: i0.ɵɵDirectiveDeclaration<QdScrollToPaginationDirective<any>, "[qdScrollToPagination]", never, {}, {}, never, never, false, never>;
16237
+ static ɵfac: i0.ɵɵFactoryDeclaration<QdScrollToPaginationDirective, never>;
16238
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QdScrollToPaginationDirective, "[qdScrollToPagination]", never, {}, {}, never, never, false, never>;
16243
16239
  }
16244
16240
 
16245
16241
  declare class QdTableBodyComponent<T extends string> implements OnInit, OnDestroy {
@@ -16306,10 +16302,16 @@ declare enum QdPaginatorDirection {
16306
16302
  LastPage = 3
16307
16303
  }
16308
16304
 
16305
+ /**
16306
+ * Shows how many entries the current page holds and lets the user step through the pages.
16307
+ *
16308
+ * The table renders it on its own when the config carries a `pagination` section.
16309
+ */
16309
16310
  declare class QdTablePaginatorComponent<T extends string> implements OnInit, OnDestroy {
16310
16311
  private readonly tableDataResolver;
16311
16312
  private readonly tableStoreService;
16312
16313
  private readonly routerConnector;
16314
+ private readonly scrollAnchorService;
16313
16315
  /**
16314
16316
  * @description Configuration Model for Qd-Table.
16315
16317
  */
@@ -16348,7 +16350,17 @@ declare class QdTablePaginatorComponent<T extends string> implements OnInit, OnD
16348
16350
  * `pagination.pageSizes`, finally to the framework constant `PAGE_SIZE_DEFAULT`.
16349
16351
  */
16350
16352
  getPageSizeDefault(): number;
16353
+ /**
16354
+ * Navigates to another page after the user asked for it.
16355
+ *
16356
+ * Unlike `navigateToPage`, this tells the table that the view may follow the
16357
+ * pagination. Programmatic page changes must not use it.
16358
+ */
16359
+ navigateByUser(direction: QdPaginatorDirection): void;
16351
16360
  navigateToPage(direction: QdPaginatorDirection): void;
16361
+ private applyPageParams;
16362
+ private toCount;
16363
+ private getFirstOfferedPageSize;
16352
16364
  private isConfigValid;
16353
16365
  private startPagination;
16354
16366
  private initPagination;