@quadrel-enterprise-ui/framework 21.3.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.3.0",
3
+ "version": "21.4.1",
4
4
  "exports": {
5
5
  "./jest-preset": "./jest-preset.js",
6
6
  "./package.json": {
@@ -20,12 +20,12 @@ import * as _quadrel_enterprise_ui_framework from '@quadrel-enterprise-ui/framew
20
20
  import * as i40 from 'ngx-editor';
21
21
  import { Editor, Toolbar } from 'ngx-editor';
22
22
  import { Moment as Moment$1 } from 'moment';
23
+ import * as i13 from '@angular/cdk/drag-drop';
23
24
  import * as i26 from '@ngrx/store';
24
25
  import * as i5$1 from '@angular/cdk/stepper';
25
26
  import { CdkStep, CdkStepper, StepState, CdkStepHeader } from '@angular/cdk/stepper';
26
27
  import * as i22 from '@angular/cdk/scrolling';
27
28
  import * as rxjs_internal_scheduler_AsyncScheduler from 'rxjs/internal/scheduler/AsyncScheduler';
28
- import * as i18 from '@angular/cdk/drag-drop';
29
29
  import { ComponentType } from '@angular/cdk/portal';
30
30
 
31
31
  /**
@@ -49,6 +49,16 @@ interface QdDialogConfig extends DialogConfig {
49
49
  * FullWidth - 100%
50
50
  */
51
51
  dialogSize?: QdDialogSize;
52
+ /**
53
+ * Allows the user to move the dialog with the mouse by dragging its header.
54
+ *
55
+ * Has no effect on page dialogs (`QdDialogSize.FullWidth`) and on small screens,
56
+ * where the dialog covers the whole viewport. The position is not persisted and
57
+ * resets whenever the dialog is reopened.
58
+ *
59
+ * @default false
60
+ */
61
+ isDraggable?: boolean;
52
62
  /**
53
63
  * Additional data for the dialog.
54
64
  */
@@ -10678,7 +10688,8 @@ declare class QdDialogActionComponent {
10678
10688
  * i18n: "i18.my.modal.title",
10679
10689
  * },
10680
10690
  * dialogSize: QdDialogSize.Default,
10681
- * hideCloseHeaderButton: false
10691
+ * hideCloseHeaderButton: false,
10692
+ * isDraggable: true,
10682
10693
  * data: myData // API to provide data to the dialog
10683
10694
  * }
10684
10695
  *
@@ -10714,6 +10725,7 @@ declare class QdDialogComponent implements OnInit, AfterContentChecked, AfterVie
10714
10725
  private changeDetectorRef;
10715
10726
  private dialogChangeGuard;
10716
10727
  private dialogService;
10728
+ private breakpointService;
10717
10729
  /**
10718
10730
  * A static test ID for integration tests can be set. <br />
10719
10731
  * The value for the HTML attribute [data-test-id].
@@ -10729,10 +10741,12 @@ declare class QdDialogComponent implements OnInit, AfterContentChecked, AfterVie
10729
10741
  config: QdDialogConfig;
10730
10742
  hasSections: boolean;
10731
10743
  hasInfoBanner: boolean;
10744
+ isMobile: boolean;
10732
10745
  private _destroyed$;
10733
10746
  private _pageDialogCanCloseFn;
10734
10747
  private _isConfirmingClose;
10735
10748
  get isFullWidth(): boolean;
10749
+ get isDragEnabled(): boolean;
10736
10750
  ngOnInit(): void;
10737
10751
  ngAfterContentChecked(): void;
10738
10752
  ngAfterViewInit(): void;
@@ -11235,7 +11249,7 @@ declare class QdSpinnerModule {
11235
11249
 
11236
11250
  declare class QdDialogModule {
11237
11251
  static ɵfac: i0.ɵɵFactoryDeclaration<QdDialogModule, never>;
11238
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdDialogModule, [typeof QdDialogActionComponent, typeof QdDialogAuthSessionEndComponent, typeof QdDialogComponent, typeof QdDialogConfirmComponent, typeof QdDialogConfirmationComponent, typeof QdDialogConfirmationErrorDirective, typeof QdDialogConfirmationInfoDirective, typeof QdDialogConfirmationSuccessDirective, typeof QdDialogRecordStepperComponent, typeof QdPageDialogWithBreadcrumbsComponent, typeof QdPendingChangesGuardDirective], [typeof i2.CommonModule, typeof i5.TranslateModule, typeof i4.RouterModule, typeof i12.DialogModule, typeof QdButtonModule, typeof QdFormModule, typeof QdIconModule, typeof QdNotificationsModule, typeof QdSpinnerModule, typeof QdTextSectionModule, typeof QdCoreModule, typeof QdBreadcrumbsModule], [typeof QdDialogActionComponent, typeof QdDialogAuthSessionEndComponent, typeof QdDialogComponent, typeof QdDialogConfirmationComponent, typeof QdDialogConfirmationErrorDirective, typeof QdDialogConfirmationSuccessDirective, typeof QdDialogRecordStepperComponent, typeof QdPendingChangesGuardDirective]>;
11252
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdDialogModule, [typeof QdDialogActionComponent, typeof QdDialogAuthSessionEndComponent, typeof QdDialogComponent, typeof QdDialogConfirmComponent, typeof QdDialogConfirmationComponent, typeof QdDialogConfirmationErrorDirective, typeof QdDialogConfirmationInfoDirective, typeof QdDialogConfirmationSuccessDirective, typeof QdDialogRecordStepperComponent, typeof QdPageDialogWithBreadcrumbsComponent, typeof QdPendingChangesGuardDirective], [typeof i2.CommonModule, typeof i5.TranslateModule, typeof i4.RouterModule, typeof i12.DialogModule, typeof i13.CdkDrag, typeof QdButtonModule, typeof QdFormModule, typeof QdIconModule, typeof QdNotificationsModule, typeof QdSpinnerModule, typeof QdTextSectionModule, typeof QdCoreModule, typeof QdBreadcrumbsModule], [typeof QdDialogActionComponent, typeof QdDialogAuthSessionEndComponent, typeof QdDialogComponent, typeof QdDialogConfirmationComponent, typeof QdDialogConfirmationErrorDirective, typeof QdDialogConfirmationSuccessDirective, typeof QdDialogRecordStepperComponent, typeof QdPendingChangesGuardDirective]>;
11239
11253
  static ɵinj: i0.ɵɵInjectorDeclaration<QdDialogModule>;
11240
11254
  }
11241
11255
 
@@ -15379,44 +15393,44 @@ declare class QdSectionModule {
15379
15393
  static ɵinj: i0.ɵɵInjectorDeclaration<QdSectionModule>;
15380
15394
  }
15381
15395
 
15382
- /**
15383
- * Token for resolving table data in Angular applications.
15384
- */
15385
- declare const QD_TABLE_DATA_RESOLVER_TOKEN: InjectionToken<string>;
15396
+ declare enum QdTableConnectorState {
15397
+ NONE = "NONE",
15398
+ AWAITING = "AWAITING",
15399
+ ESTABLISHED = "ESTABLISHED"
15400
+ }
15386
15401
 
15387
- /**
15388
- * The pagination slice of `QdTableDataResolverProps`, following Spring Boot's `Pageable`
15389
- * conventions.
15390
- */
15391
- interface QdPaginationParams {
15392
- /**
15393
- * The zero-indexed page number, passed through verbatim (no off-by-one adjustment).
15394
- */
15395
- page?: number;
15396
- /**
15397
- * The number of items per page.
15398
- */
15399
- 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;
15400
15433
  }
15401
- /**
15402
- * **qdPaginationParameterize** turns pagination state into the `page` and `size` parameters read by the backend
15403
- * `QdPaginationParser`.
15404
- *
15405
- * ### Usage
15406
- *
15407
- * ```ts
15408
- * qdPaginationParameterize({ page: 0, size: 25 }).toQueryString(); // 'page=0&size=25'
15409
- * ```
15410
- *
15411
- * @remarks
15412
- * `page` stays zero-indexed and is sent as-is (no `+1`/`-1`), so `page=0` is kept. Each key is
15413
- * only set for a real number; `size` is trusted, not checked. Missing input gives empty
15414
- * parameters.
15415
- *
15416
- * @param input - The page and size from the resolver props.
15417
- * @returns A {@link QdQueryParameter} with the `page` and/or `size` keys.
15418
- */
15419
- declare function qdPaginationParameterize(input: QdPaginationParams | undefined): QdQueryParameter;
15420
15434
 
15421
15435
  /**
15422
15436
  * Represents the resolved data for a query.
@@ -15496,44 +15510,46 @@ declare enum QdTableRequestState {
15496
15510
  ERROR = 2
15497
15511
  }
15498
15512
 
15499
- declare enum QdTableConnectorState {
15500
- NONE = "NONE",
15501
- AWAITING = "AWAITING",
15502
- ESTABLISHED = "ESTABLISHED"
15503
- }
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>>;
15504
15519
 
15505
- interface QdTableState<T extends string> {
15506
- data: QdTableData<T>;
15507
- selectedRows?: QdTableRowIdentifier[];
15508
- selectedRowsData?: Record<QdTableRowIdentifier, QdTableSelectedRow<string>>;
15509
- recentSecondaryAction?: QdTableRecentSecondaryAction<T>;
15510
- hasResolver?: boolean;
15511
- hasPagination?: boolean;
15512
- pageIndex?: number;
15513
- pageSize?: number;
15514
- totalCount?: number;
15515
- sort?: QdTableStateSort<T>[];
15516
- requestState?: QdTableRequestState;
15517
- connectors?: QdTableConnector[];
15518
- connectorCriteria?: QdTableConnectorCriteria;
15519
- lastVisitedRowIdentifier?: QdTableRowIdentifier;
15520
- }
15521
- interface QdTablePaginatorCurrentPage {
15522
- start: number;
15523
- end: number;
15524
- totalCount: number;
15525
- }
15526
- interface QdTableStateSort<T extends string> {
15527
- column: T;
15528
- direction: QdSortDirection;
15529
- }
15530
- interface QdTableConnector {
15531
- connectorName: string;
15532
- connectorState: QdTableConnectorState;
15533
- }
15534
- interface QdTableConnectorCriteria {
15535
- [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;
15536
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;
15537
15553
 
15538
15554
  /**
15539
15555
  * **qdSortParameterize** turns table sort state into the Spring `sort=column,direction` format read by the backend
@@ -15706,6 +15722,8 @@ declare class QdTableComponent<T extends string> implements OnInit, OnChanges, O
15706
15722
  private readonly emptyStateService;
15707
15723
  private readonly responsiveRowService;
15708
15724
  private readonly fillingWidthService;
15725
+ private readonly scrollAnchorService;
15726
+ private readonly scrollAnchorHook;
15709
15727
  private readonly breakpointService;
15710
15728
  private readonly resolverService;
15711
15729
  private readonly confirmationDialogService;
@@ -15807,6 +15825,7 @@ declare class QdTableComponent<T extends string> implements OnInit, OnChanges, O
15807
15825
  private initializeResponsiveRowService;
15808
15826
  private updateResponsiveRowServiceTableConfig;
15809
15827
  private initializeFillingWidthService;
15828
+ private initializeScrollAnchorService;
15810
15829
  private updateFillingWidthServiceTableConfig;
15811
15830
  private initializeEmptyStateService;
15812
15831
  private initializeRowSelectionService;
@@ -16206,26 +16225,17 @@ declare class QdTreeComponent<T extends string> implements OnInit, OnChanges, On
16206
16225
  }
16207
16226
 
16208
16227
  /**
16209
- * 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.
16210
16229
  *
16211
- * 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.
16212
16231
  */
16213
- declare class QdScrollToPaginationDirective<T extends string> implements OnInit, OnDestroy {
16232
+ declare class QdScrollToPaginationDirective implements OnInit, OnDestroy {
16214
16233
  private readonly elementRef;
16215
- private readonly tableStoreService;
16216
- private readonly scrollingService;
16217
- private _destroyed$;
16218
- private _bottom;
16234
+ private readonly scrollAnchorService;
16219
16235
  ngOnInit(): void;
16220
16236
  ngOnDestroy(): void;
16221
- private getScrollBottom;
16222
- private handleScrollAnalysis;
16223
- private hasRequestBeenTriggered;
16224
- private hasRequestSucceeded;
16225
- private shouldScroll;
16226
- private performScrollIntoView;
16227
- static ɵfac: i0.ɵɵFactoryDeclaration<QdScrollToPaginationDirective<any>, never>;
16228
- 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>;
16229
16239
  }
16230
16240
 
16231
16241
  declare class QdTableBodyComponent<T extends string> implements OnInit, OnDestroy {
@@ -16292,10 +16302,16 @@ declare enum QdPaginatorDirection {
16292
16302
  LastPage = 3
16293
16303
  }
16294
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
+ */
16295
16310
  declare class QdTablePaginatorComponent<T extends string> implements OnInit, OnDestroy {
16296
16311
  private readonly tableDataResolver;
16297
16312
  private readonly tableStoreService;
16298
16313
  private readonly routerConnector;
16314
+ private readonly scrollAnchorService;
16299
16315
  /**
16300
16316
  * @description Configuration Model for Qd-Table.
16301
16317
  */
@@ -16334,7 +16350,17 @@ declare class QdTablePaginatorComponent<T extends string> implements OnInit, OnD
16334
16350
  * `pagination.pageSizes`, finally to the framework constant `PAGE_SIZE_DEFAULT`.
16335
16351
  */
16336
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;
16337
16360
  navigateToPage(direction: QdPaginatorDirection): void;
16361
+ private applyPageParams;
16362
+ private toCount;
16363
+ private getFirstOfferedPageSize;
16338
16364
  private isConfigValid;
16339
16365
  private startPagination;
16340
16366
  private initPagination;
@@ -17968,7 +17994,7 @@ declare class QdShellServiceNavigationModule {
17968
17994
 
17969
17995
  declare class QdShellModule {
17970
17996
  static ɵfac: i0.ɵɵFactoryDeclaration<QdShellModule, never>;
17971
- static ɵmod: i0.ɵɵNgModuleDeclaration<QdShellModule, [typeof QdCounterBadgeComponent, typeof QdShellComponent, typeof QdShellFooterComponent, typeof QdShellHeaderBannerComponent, typeof QdShellHeaderComponent, typeof QdShellHeaderSearchComponent, typeof QdShellLeftComponent, typeof QdShellRightComponent, typeof QdShellRightToolbarComponent, typeof QdShellNotificationsComponent, typeof QdShellNotificationComponent, typeof QdShellNavigationComponent, typeof QdShellNavigationLinkComponent, typeof QdShellToolbarComponent, typeof QdShellToolbarItemComponent], [typeof i2.CommonModule, typeof i4.RouterModule, typeof i18.CdkDrag, typeof QdIconModule, typeof QdSearchModule, typeof i5.TranslateModule, typeof QdNotificationsModule, typeof QdShellServiceNavigationModule], [typeof QdShellComponent]>;
17997
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QdShellModule, [typeof QdCounterBadgeComponent, typeof QdShellComponent, typeof QdShellFooterComponent, typeof QdShellHeaderBannerComponent, typeof QdShellHeaderComponent, typeof QdShellHeaderSearchComponent, typeof QdShellLeftComponent, typeof QdShellRightComponent, typeof QdShellRightToolbarComponent, typeof QdShellNotificationsComponent, typeof QdShellNotificationComponent, typeof QdShellNavigationComponent, typeof QdShellNavigationLinkComponent, typeof QdShellToolbarComponent, typeof QdShellToolbarItemComponent], [typeof i2.CommonModule, typeof i4.RouterModule, typeof i13.CdkDrag, typeof QdIconModule, typeof QdSearchModule, typeof i5.TranslateModule, typeof QdNotificationsModule, typeof QdShellServiceNavigationModule], [typeof QdShellComponent]>;
17972
17998
  static ɵinj: i0.ɵɵInjectorDeclaration<QdShellModule>;
17973
17999
  }
17974
18000