@quadrel-enterprise-ui/framework 21.4.0 → 21.4.2

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, InjectionToken, inject, ElementRef, HostBinding, Input, ViewEncapsulation, Component, Injectable, Injector, HostListener, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, NgModule, EventEmitter, Output, Renderer2, Pipe, ViewContainerRef, NO_ERRORS_SCHEMA, DestroyRef, SecurityContext, NgZone, ViewChildren, afterNextRender, forwardRef, QueryList, ContentChildren, ContentChild, isDevMode, TemplateRef, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer } from '@angular/core';
2
+ import { Directive, InjectionToken, inject, ElementRef, HostBinding, Input, ViewEncapsulation, Component, Injectable, Injector, HostListener, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, NgModule, EventEmitter, Output, Renderer2, Pipe, ViewContainerRef, NO_ERRORS_SCHEMA, DestroyRef, SecurityContext, NgZone, ViewChildren, afterNextRender, forwardRef, QueryList, ContentChildren, ContentChild, afterEveryRender, isDevMode, TemplateRef, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer } from '@angular/core';
3
3
  import { Dialog, DialogRef, DIALOG_DATA, DialogModule } from '@angular/cdk/dialog';
4
- import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, Subscription, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap, asyncScheduler, startWith as startWith$1, debounceTime as debounceTime$1, takeUntil as takeUntil$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, scan, queueScheduler, filter as filter$1, concatMap as concatMap$1, exhaustMap, finalize, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
4
+ import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, Subscription, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap, asyncScheduler, startWith as startWith$1, debounceTime as debounceTime$1, takeUntil as takeUntil$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, queueScheduler, filter as filter$1, concatMap as concatMap$1, exhaustMap, finalize, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
5
5
  import { map, startWith, take, debounceTime, takeUntil, filter, catchError, distinctUntilChanged, concatMap, skip, throttleTime, tap, auditTime, withLatestFrom, observeOn, switchMap as switchMap$1, pairwise as pairwise$1, mergeMap } from 'rxjs/operators';
6
6
  import { v4 } from 'uuid';
7
7
  import * as i2 from '@ngx-translate/core';
@@ -25156,64 +25156,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
25156
25156
  type: Injectable
25157
25157
  }] });
25158
25158
 
25159
- // @ts-strict-ignore
25160
25159
  const WHICH_COLUMN_FILLS_WIDTH_DEFAULT = 'main';
25161
- const OBSERVE_INTERVAL_TIME = 300;
25160
+ const DEBOUNCE_TIME = 10;
25161
+ const COLUMN_MUTATIONS = { childList: true, subtree: true };
25162
+ /**
25163
+ * Lets one table column take the width that the other columns leave over.
25164
+ *
25165
+ * It runs again whenever the table width, the rows or the number of columns
25166
+ * change.
25167
+ */
25162
25168
  class QdTableFillingWidthService {
25163
25169
  tableStoreService = inject(QdTableStoreService);
25164
25170
  zone = inject(NgZone);
25171
+ injector = inject(Injector);
25172
+ renderRef;
25165
25173
  tableComponentElement;
25166
25174
  tableConfig;
25167
- fillingColumnHeadElement;
25168
- fillingColumnInitialWidth;
25175
+ fillingColumnHeadElement = null;
25176
+ fillingColumnInitialWidth = 0;
25169
25177
  fillingColumnCellElements;
25170
- tableWidthChangeInterval;
25171
- tableNumberOfColumnsInterval;
25178
+ resizeObserver;
25179
+ mutationObserver;
25180
+ tableWidth$ = new BehaviorSubject(0);
25181
+ tableNumberOfColumns$ = new BehaviorSubject(0);
25182
+ appliedWidth;
25172
25183
  destroyed$ = new Subject();
25173
25184
  get whichColumnFillsWidth() {
25174
25185
  return this.tableConfig?.whichColumnFillsWidth || WHICH_COLUMN_FILLS_WIDTH_DEFAULT;
25175
25186
  }
25187
+ /**
25188
+ * Binds the service to one table and starts watching it.
25189
+ */
25176
25190
  initialize(tableComponentElement, tableConfig) {
25177
25191
  this.tableComponentElement = tableComponentElement;
25178
25192
  this.tableConfig = tableConfig;
25179
25193
  if (this.whichColumnFillsWidth === 'none')
25180
25194
  return;
25181
- // TODO replace the observe methods with ResizeObserver and MutationObserver
25182
- // (currently not possible because the table change detection has an infinite loop)
25183
- combineLatest([
25184
- this.observeTableWidth(),
25185
- // The previous method only detects changes of the widened table width that can be caused by window resizing or
25186
- // opening of a side panel for example. After a change of the table data the remaining width is checked again
25187
- // because it can cause a change of the shrunken table width even if the widened table width is unchanged.
25188
- this.observeTableData(),
25189
- // Check remaining width again when columns are merged by the responsive row service when breakpoints are exceeded
25190
- // as specified in the columnMapping config.
25191
- this.observeTableNumberOfColumns()
25192
- ])
25193
- .pipe(debounceTime(10)) // handle consecutive emissions once together
25195
+ combineLatest([this.observeTableWidth(), this.observeTableData(), this.observeTableNumberOfColumns()])
25196
+ .pipe(debounceTime(DEBOUNCE_TIME), takeUntil(this.destroyed$))
25194
25197
  .subscribe(() => this.fillRemainingWidth());
25195
25198
  }
25199
+ /**
25200
+ * Applies a new table config and starts over.
25201
+ */
25202
+ updateTableConfig(tableConfig) {
25203
+ this.tableConfig = tableConfig;
25204
+ this.reinitialize();
25205
+ }
25206
+ /**
25207
+ * Stops watching the table and drops the styles the service applied.
25208
+ */
25209
+ destroy() {
25210
+ this.clearSubscriptions();
25211
+ }
25196
25212
  fillRemainingWidth() {
25197
25213
  this.fillingColumnHeadElement = this.getFillingColumnHeadElement();
25198
25214
  if (!this.fillingColumnHeadElement)
25199
25215
  return;
25216
+ this.pauseObservers();
25200
25217
  this.fillingColumnInitialWidth = this.fillingColumnHeadElement.getBoundingClientRect().width;
25201
25218
  this.resetStyles();
25202
25219
  const tableRemainingWidth = this.getTableRemainingWidthAfterFilling();
25203
- if (tableRemainingWidth > 0) {
25204
- this.tableComponentElement.classList.add('table-has-remaining-width');
25205
- }
25206
- else {
25207
- this.tableComponentElement.classList.remove('table-has-remaining-width');
25208
- }
25220
+ this.tableComponentElement.classList.toggle('table-has-remaining-width', tableRemainingWidth > 0);
25221
+ this.fillRightAlignedColumn(tableRemainingWidth);
25222
+ this.appliedWidth = this.getTableWidth();
25223
+ this.resumeObservers();
25224
+ }
25225
+ fillRightAlignedColumn(tableRemainingWidth) {
25209
25226
  const fillingColumnCellElement = this.getFillingColumnCellElement();
25210
- if (fillingColumnCellElement && getComputedStyle(fillingColumnCellElement).textAlign === 'right') {
25211
- // In the default case the width is filled by setting the width of the filling column to 100% and
25212
- // white-space to no-wrap for all other columns to prevent squeezing.
25213
- // But for right aligned columns the width is filled with padding right to align them with the heading.
25214
- this.tableComponentElement.classList.add('table-has-right-aligned-filling-column');
25215
- this.fillRemainingWidthWithPaddingRight(tableRemainingWidth);
25216
- }
25227
+ if (!fillingColumnCellElement)
25228
+ return;
25229
+ if (getComputedStyle(fillingColumnCellElement).textAlign !== 'right')
25230
+ return;
25231
+ this.tableComponentElement.classList.add('table-has-right-aligned-filling-column');
25232
+ this.fillRemainingWidthWithPaddingRight(tableRemainingWidth, fillingColumnCellElement);
25233
+ }
25234
+ pauseObservers() {
25235
+ this.resizeObserver?.disconnect();
25236
+ this.mutationObserver?.disconnect();
25237
+ }
25238
+ resumeObservers() {
25239
+ this.zone.runOutsideAngular(() => {
25240
+ requestAnimationFrame(() => {
25241
+ if (!this.tableComponentElement)
25242
+ return;
25243
+ this.resizeObserver?.observe(this.tableComponentElement);
25244
+ this.mutationObserver?.observe(this.tableComponentElement, COLUMN_MUTATIONS);
25245
+ this.reportTableWidth();
25246
+ this.reportNumberOfColumns();
25247
+ });
25248
+ });
25217
25249
  }
25218
25250
  getFillingColumnHeadElement() {
25219
25251
  return this.tableComponentElement.querySelector(`tr:first-child > th.${this.whichColumnFillsWidth}-column`);
@@ -25224,16 +25256,15 @@ class QdTableFillingWidthService {
25224
25256
  getFillingColumnCellElement() {
25225
25257
  return this.getFillingColumnCellElements()[0];
25226
25258
  }
25227
- fillRemainingWidthWithPaddingRight(tableRemainingWidth) {
25259
+ fillRemainingWidthWithPaddingRight(tableRemainingWidth, referenceCell) {
25228
25260
  this.fillingColumnCellElements = this.getFillingColumnCellElements();
25229
- const fillingColumnCellElement = this.getFillingColumnCellElement();
25230
- const fillingColumnPaddingRightPercentage = ((parseInt(getComputedStyle(fillingColumnCellElement).paddingRight || '0px') + tableRemainingWidth) /
25261
+ const fillingColumnPaddingRightPercentage = ((parseInt(getComputedStyle(referenceCell).paddingRight || '0px', 10) + tableRemainingWidth) /
25231
25262
  this.tableComponentElement.getBoundingClientRect().width) *
25232
25263
  100;
25233
- const fillingColumnWidth = this.fillingColumnInitialWidth + tableRemainingWidth; // table cell box-sizing is border-box
25234
- [].forEach.call(this.fillingColumnCellElements, fillingColumnCellElement => {
25235
- fillingColumnCellElement.style.width = fillingColumnWidth + 'px';
25236
- fillingColumnCellElement.style.paddingRight = fillingColumnPaddingRightPercentage + '%';
25264
+ const fillingColumnWidth = this.fillingColumnInitialWidth + tableRemainingWidth;
25265
+ this.fillingColumnCellElements.forEach(cell => {
25266
+ cell.style.width = `${fillingColumnWidth}px`;
25267
+ cell.style.paddingRight = `${fillingColumnPaddingRightPercentage}%`;
25237
25268
  });
25238
25269
  }
25239
25270
  getTableRemainingWidthAfterFilling() {
@@ -25246,72 +25277,65 @@ class QdTableFillingWidthService {
25246
25277
  this.tableComponentElement.classList.remove('table-has-remaining-width');
25247
25278
  this.tableComponentElement.classList.remove('table-has-right-aligned-filling-column');
25248
25279
  this.tableComponentElement.removeAttribute('style');
25249
- if (this.fillingColumnCellElements) {
25250
- [].forEach.call(this.fillingColumnCellElements, fillingColumnCellElement => {
25251
- fillingColumnCellElement.removeAttribute('style');
25252
- });
25253
- }
25280
+ this.fillingColumnCellElements?.forEach(cell => cell.removeAttribute('style'));
25254
25281
  }
25255
25282
  observeTableWidth() {
25256
- const tableWidth$ = new BehaviorSubject(this.getTableWidth());
25283
+ this.tableWidth$ = new BehaviorSubject(this.getTableWidth());
25257
25284
  this.zone.runOutsideAngular(() => {
25258
- this.tableWidthChangeInterval = setInterval(() => {
25259
- tableWidth$.next(this.getTableWidth());
25260
- }, OBSERVE_INTERVAL_TIME);
25285
+ this.resizeObserver = new ResizeObserver(() => this.reportTableWidth());
25286
+ this.resizeObserver.observe(this.tableComponentElement);
25261
25287
  });
25262
- return tableWidth$.pipe(distinctUntilChanged());
25288
+ return this.tableWidth$.pipe(distinctUntilChanged());
25289
+ }
25290
+ reportTableWidth() {
25291
+ const tableWidth = this.getTableWidth();
25292
+ if (tableWidth === this.appliedWidth)
25293
+ return;
25294
+ this.tableWidth$.next(tableWidth);
25263
25295
  }
25264
25296
  getTableWidth() {
25265
25297
  return this.tableComponentElement.getBoundingClientRect().width;
25266
25298
  }
25267
25299
  observeTableNumberOfColumns() {
25268
- const tableNumberOfColumns$ = new BehaviorSubject(this.getNumberOfColumns());
25300
+ this.tableNumberOfColumns$ = new BehaviorSubject(this.getNumberOfColumns());
25269
25301
  this.zone.runOutsideAngular(() => {
25270
- this.tableNumberOfColumnsInterval = setInterval(() => {
25271
- tableNumberOfColumns$.next(this.getNumberOfColumns());
25272
- }, OBSERVE_INTERVAL_TIME);
25302
+ this.mutationObserver = new MutationObserver(() => this.reportNumberOfColumns());
25303
+ this.mutationObserver.observe(this.tableComponentElement, COLUMN_MUTATIONS);
25273
25304
  });
25274
- return tableNumberOfColumns$.pipe(distinctUntilChanged());
25305
+ return this.tableNumberOfColumns$.pipe(distinctUntilChanged());
25306
+ }
25307
+ reportNumberOfColumns() {
25308
+ this.tableNumberOfColumns$.next(this.getNumberOfColumns());
25275
25309
  }
25276
25310
  getNumberOfColumns() {
25277
25311
  return this.tableComponentElement.querySelectorAll('tr:first-child > th').length;
25278
25312
  }
25279
25313
  observeTableData() {
25280
25314
  const tableData$ = new ReplaySubject(1);
25281
- // emit current table data directly
25282
25315
  this.tableStoreService
25283
25316
  .tableDataEntries$()
25284
25317
  .pipe(take(1), takeUntil(this.destroyed$))
25285
25318
  .subscribe(data => tableData$.next(data));
25286
- // emit table data changes multiple times delayed because we don't know when the DOM is updated
25287
25319
  this.tableStoreService
25288
25320
  .tableDataEntries$()
25289
25321
  .pipe(skip(1), takeUntil(this.destroyed$))
25290
25322
  .subscribe(data => {
25291
- setTimeout(() => tableData$.next(data), 200);
25292
- setTimeout(() => tableData$.next(data), 500);
25293
- setTimeout(() => tableData$.next(data), 1500);
25323
+ this.renderRef?.destroy();
25324
+ this.renderRef = afterNextRender(() => this.zone.runOutsideAngular(() => tableData$.next(data)), {
25325
+ injector: this.injector
25326
+ });
25294
25327
  });
25295
25328
  return tableData$;
25296
25329
  }
25297
- updateTableConfig(tableConfig) {
25298
- this.tableConfig = tableConfig;
25299
- this.reinitialize();
25300
- }
25301
25330
  reinitialize() {
25302
25331
  this.clearSubscriptions();
25303
25332
  this.resetStyles();
25304
25333
  this.initialize(this.tableComponentElement, this.tableConfig);
25305
25334
  }
25306
25335
  clearSubscriptions() {
25307
- this.destroyed$.next(true);
25308
- if (this.tableWidthChangeInterval)
25309
- clearInterval(this.tableWidthChangeInterval);
25310
- if (this.tableNumberOfColumnsInterval)
25311
- clearInterval(this.tableNumberOfColumnsInterval);
25312
- }
25313
- destroy() {
25314
- this.clearSubscriptions();
25336
+ this.destroyed$.next();
25337
+ this.renderRef?.destroy();
25338
+ this.pauseObservers();
25315
25339
  }
25316
25340
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTableFillingWidthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
25317
25341
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTableFillingWidthService });
@@ -25320,8 +25344,355 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
25320
25344
  type: Injectable
25321
25345
  }] });
25322
25346
 
25347
+ const MIN_TRAVEL_DURATION_MS = 180;
25348
+ const MAX_TRAVEL_DURATION_MS = 420;
25349
+ const FULL_SPEED_DISTANCE_PX = 1200;
25350
+ const EASE_MIDPOINT = 0.5;
25351
+ /**
25352
+ * Returns the height a table has to keep so the browser cannot clamp the scroll
25353
+ * position. Zero means there is nothing to keep.
25354
+ */
25355
+ function qdCalculateScrollReserve(previousScrollTop, naturalScrollHeight, clientHeight) {
25356
+ return Math.max(0, previousScrollTop - Math.max(0, naturalScrollHeight - clientHeight));
25357
+ }
25358
+ /**
25359
+ * Returns the scroll position that puts the anchor flush with the lower border
25360
+ * of its container, never beyond what the container can actually scroll.
25361
+ */
25362
+ function qdCalculateTravelTarget(currentScrollTop, anchorBottom, containerBottom, naturalMaxScrollTop) {
25363
+ const wanted = currentScrollTop + (anchorBottom - containerBottom);
25364
+ return Math.min(naturalMaxScrollTop, Math.max(0, wanted));
25365
+ }
25366
+ /**
25367
+ * Returns how long a travel over the given distance should take.
25368
+ */
25369
+ function qdCalculateTravelDuration(distance) {
25370
+ const share = Math.min(1, Math.abs(distance) / FULL_SPEED_DISTANCE_PX);
25371
+ return MIN_TRAVEL_DURATION_MS + share * (MAX_TRAVEL_DURATION_MS - MIN_TRAVEL_DURATION_MS);
25372
+ }
25373
+ /**
25374
+ * Eases into the movement and out of it again.
25375
+ */
25376
+ function qdEaseInOutCubic(progress) {
25377
+ if (progress < EASE_MIDPOINT)
25378
+ return 4 * progress * progress * progress;
25379
+ return 1 - Math.pow(-2 * progress + 2, 3) / 2;
25380
+ }
25381
+
25382
+ const SCROLLABLE_OVERFLOW = ['auto', 'scroll'];
25383
+ const REDUCED_MOTION_QUERY = '(prefers-reduced-motion: reduce)';
25384
+ const FOREIGN_SCROLL_TOLERANCE_PX = 2;
25385
+ const SETTLE_FRAMES = 2;
25386
+ const MAX_SETTLE_FRAMES = 120;
25387
+ const USER_SCROLL_EVENTS = ['wheel', 'touchmove'];
25388
+ /**
25389
+ * Keeps a table from jumping when a new page is shorter than the old one.
25390
+ *
25391
+ * The service holds back the height the new page is missing, so the browser
25392
+ * cannot pull the scroll position up. It gives that height back over a few
25393
+ * frames, and after a page change by the user the view rides along to the
25394
+ * pagination.
25395
+ *
25396
+ * #### Notes & Best Practices:
25397
+ * * The target is measured again in every frame. A table that is still settling
25398
+ * would otherwise leave the view short of the pagination.
25399
+ * * Any scroll the service did not write itself ends the movement at once.
25400
+ */
25401
+ class QdTableScrollAnchorService {
25402
+ _zone = inject(NgZone);
25403
+ _tableStoreService = inject(QdTableStoreService);
25404
+ _destroyRef = inject(DestroyRef);
25405
+ _target;
25406
+ _anchorElement;
25407
+ _snapshotScrollTop = 0;
25408
+ _neededReserve = 0;
25409
+ _dataChangePending = false;
25410
+ _reserve = 0;
25411
+ _travelRequested = false;
25412
+ _heightAtRequest;
25413
+ _settleFrame;
25414
+ _travelFrame;
25415
+ _lastWrittenScrollTop = 0;
25416
+ _onUserScroll = () => this.stopForUser();
25417
+ _onContainerScroll = () => {
25418
+ this.checkForeignScroll();
25419
+ this.takeSnapshot();
25420
+ };
25421
+ /**
25422
+ * Binds the service to one table. Later calls are ignored.
25423
+ */
25424
+ initialize(hostElement, tableElement) {
25425
+ if (this._target)
25426
+ return;
25427
+ this.bindTarget(hostElement, tableElement);
25428
+ this.listenForUserScroll();
25429
+ this._tableStoreService
25430
+ .tableDataEntries$()
25431
+ .pipe(takeUntilDestroyed(this._destroyRef))
25432
+ .subscribe(() => this.prepareForDataChange());
25433
+ }
25434
+ /**
25435
+ * Names the element the view should end up at. Without one the table itself is used.
25436
+ */
25437
+ setAnchor(element) {
25438
+ this._anchorElement = element;
25439
+ }
25440
+ /**
25441
+ * Remembers where the view stands before the rows are exchanged.
25442
+ */
25443
+ takeSnapshot() {
25444
+ if (this.isBusy())
25445
+ return;
25446
+ this._snapshotScrollTop = this.getContainerScrollTop();
25447
+ }
25448
+ /**
25449
+ * Announces that new rows are about to be rendered.
25450
+ */
25451
+ prepareForDataChange() {
25452
+ this._dataChangePending = true;
25453
+ }
25454
+ /**
25455
+ * Announces that the user asked for a new page, so the view should follow.
25456
+ */
25457
+ requestTravel() {
25458
+ this.stopTravel();
25459
+ this._travelRequested = true;
25460
+ this._heightAtRequest = this.getNaturalScrollHeight();
25461
+ this.takeSnapshot();
25462
+ this.startAfterLayoutSettled();
25463
+ }
25464
+ /**
25465
+ * Measures how much height the new page is missing.
25466
+ *
25467
+ * Call this from a render phase that may read from the DOM.
25468
+ */
25469
+ measureLayoutChange() {
25470
+ if (!this._dataChangePending)
25471
+ return;
25472
+ this._neededReserve = this.calculateReserve();
25473
+ }
25474
+ /**
25475
+ * Applies the measured reserve and puts the view back where it was.
25476
+ */
25477
+ catchLayoutChange() {
25478
+ if (!this._dataChangePending)
25479
+ return;
25480
+ this._dataChangePending = false;
25481
+ this.applyReserve(this._neededReserve);
25482
+ this.restoreSnapshot();
25483
+ this.startAfterLayoutSettled();
25484
+ }
25485
+ /**
25486
+ * Gives the held height back at once, without moving the view.
25487
+ */
25488
+ release() {
25489
+ this.stopTravel();
25490
+ this._travelRequested = false;
25491
+ this.applyReserve(0);
25492
+ }
25493
+ /**
25494
+ * Releases the held height and stops listening.
25495
+ */
25496
+ destroy() {
25497
+ this.release();
25498
+ this.stopListening();
25499
+ }
25500
+ bindTarget(hostElement, tableElement) {
25501
+ const container = this.findScrollContainer(hostElement);
25502
+ if (!container)
25503
+ return;
25504
+ this._target = { container, table: tableElement, host: hostElement };
25505
+ }
25506
+ isBusy() {
25507
+ return this._travelFrame !== undefined;
25508
+ }
25509
+ calculateReserve() {
25510
+ if (!this._target)
25511
+ return 0;
25512
+ return qdCalculateScrollReserve(this._snapshotScrollTop, this.getNaturalScrollHeight(), this._target.container.clientHeight);
25513
+ }
25514
+ restoreSnapshot() {
25515
+ if (!this._reserve)
25516
+ return;
25517
+ this.writeScrollTop(this._snapshotScrollTop);
25518
+ }
25519
+ startAfterLayoutSettled() {
25520
+ if (this.hasPendingFrame())
25521
+ return;
25522
+ this._settleFrame = requestAnimationFrame(this.createSettleStep());
25523
+ }
25524
+ hasPendingFrame() {
25525
+ return this._settleFrame !== undefined || this._travelFrame !== undefined;
25526
+ }
25527
+ createSettleStep() {
25528
+ let previousHeight = Number.NaN;
25529
+ let stableFrames = 0;
25530
+ let seenFrames = 0;
25531
+ const step = () => {
25532
+ const height = this.getNaturalScrollHeight();
25533
+ stableFrames = height === previousHeight ? stableFrames + 1 : 0;
25534
+ previousHeight = height;
25535
+ seenFrames++;
25536
+ if (this.hasSettled(height, stableFrames, seenFrames))
25537
+ return this.startTravel();
25538
+ this._settleFrame = requestAnimationFrame(step);
25539
+ };
25540
+ return step;
25541
+ }
25542
+ hasSettled(height, stableFrames, seenFrames) {
25543
+ if (seenFrames >= MAX_SETTLE_FRAMES)
25544
+ return true;
25545
+ return stableFrames >= SETTLE_FRAMES && this.hasHeightChanged(height);
25546
+ }
25547
+ hasHeightChanged(height) {
25548
+ return this._heightAtRequest === undefined || height !== this._heightAtRequest;
25549
+ }
25550
+ startTravel() {
25551
+ this._settleFrame = undefined;
25552
+ const run = this.planTravel();
25553
+ this._travelRequested = false;
25554
+ this._heightAtRequest = undefined;
25555
+ this._travelFrame = requestAnimationFrame(this.createTravelStep(run));
25556
+ }
25557
+ planTravel() {
25558
+ const start = this.getContainerScrollTop();
25559
+ const target = this.getTravelTarget(start);
25560
+ return {
25561
+ start,
25562
+ target,
25563
+ reserveStart: this._reserve,
25564
+ duration: this.isReducedMotion() ? 0 : qdCalculateTravelDuration(Math.abs(target - start)),
25565
+ followsAnchor: this._travelRequested
25566
+ };
25567
+ }
25568
+ getTravelTarget(start) {
25569
+ if (!this._travelRequested)
25570
+ return Math.min(start, this.getNaturalMaxScrollTop());
25571
+ return this.getAnchorTarget(start);
25572
+ }
25573
+ createTravelStep(run) {
25574
+ let startedAt;
25575
+ const step = (timestamp) => {
25576
+ startedAt = startedAt ?? timestamp;
25577
+ const eased = qdEaseInOutCubic(this.getProgress(run, timestamp - startedAt));
25578
+ this.applyReserve(Math.round(run.reserveStart * (1 - eased)));
25579
+ this.writeScrollTop(run.start + (this.getLiveTarget(run) - run.start) * eased);
25580
+ if (eased >= 1)
25581
+ return this.finishTravel();
25582
+ this._travelFrame = requestAnimationFrame(step);
25583
+ };
25584
+ return step;
25585
+ }
25586
+ getLiveTarget(run) {
25587
+ if (!run.followsAnchor)
25588
+ return run.target;
25589
+ return this.getAnchorTarget(this.getContainerScrollTop());
25590
+ }
25591
+ getProgress(run, elapsed) {
25592
+ if (!run.duration)
25593
+ return 1;
25594
+ return Math.min(1, elapsed / run.duration);
25595
+ }
25596
+ finishTravel() {
25597
+ this._travelFrame = undefined;
25598
+ this.applyReserve(0);
25599
+ }
25600
+ applyReserve(value) {
25601
+ this._reserve = value;
25602
+ if (!this._target)
25603
+ return;
25604
+ this._target.table.style.paddingBottom = value ? `${value}px` : '';
25605
+ }
25606
+ writeScrollTop(value) {
25607
+ if (!this._target)
25608
+ return;
25609
+ this._target.container.scrollTo({ top: Math.round(value), behavior: 'instant' });
25610
+ this._lastWrittenScrollTop = this._target.container.scrollTop;
25611
+ }
25612
+ getAnchorTarget(start) {
25613
+ if (!this._target)
25614
+ return start;
25615
+ const anchor = this._anchorElement ?? this._target.host;
25616
+ return qdCalculateTravelTarget(start, anchor.getBoundingClientRect().bottom, this._target.container.getBoundingClientRect().bottom, this.getNaturalMaxScrollTop());
25617
+ }
25618
+ getNaturalScrollHeight() {
25619
+ if (!this._target)
25620
+ return 0;
25621
+ return this._target.container.scrollHeight - this._reserve;
25622
+ }
25623
+ getNaturalMaxScrollTop() {
25624
+ if (!this._target)
25625
+ return 0;
25626
+ return Math.max(0, this.getNaturalScrollHeight() - this._target.container.clientHeight);
25627
+ }
25628
+ isReducedMotion() {
25629
+ return window.matchMedia(REDUCED_MOTION_QUERY).matches;
25630
+ }
25631
+ listenForUserScroll() {
25632
+ if (!this._target)
25633
+ return;
25634
+ const { container } = this._target;
25635
+ this._zone.runOutsideAngular(() => {
25636
+ USER_SCROLL_EVENTS.forEach(name => container.addEventListener(name, this._onUserScroll, { passive: true }));
25637
+ container.addEventListener('scroll', this._onContainerScroll, { passive: true });
25638
+ });
25639
+ }
25640
+ stopListening() {
25641
+ if (!this._target)
25642
+ return;
25643
+ const { container } = this._target;
25644
+ USER_SCROLL_EVENTS.forEach(name => container.removeEventListener(name, this._onUserScroll));
25645
+ container.removeEventListener('scroll', this._onContainerScroll);
25646
+ }
25647
+ checkForeignScroll() {
25648
+ if (!this.isBusy())
25649
+ return;
25650
+ if (this.getForeignDistance() > FOREIGN_SCROLL_TOLERANCE_PX)
25651
+ this.stopForUser();
25652
+ }
25653
+ getForeignDistance() {
25654
+ return Math.abs(this.getContainerScrollTop() - this._lastWrittenScrollTop);
25655
+ }
25656
+ getContainerScrollTop() {
25657
+ return this._target?.container.scrollTop ?? 0;
25658
+ }
25659
+ stopForUser() {
25660
+ if (!this.isBusy())
25661
+ return;
25662
+ this.stopTravel();
25663
+ this.applyReserve(0);
25664
+ }
25665
+ stopTravel() {
25666
+ this.cancelFrame(this._settleFrame);
25667
+ this.cancelFrame(this._travelFrame);
25668
+ this._settleFrame = undefined;
25669
+ this._travelFrame = undefined;
25670
+ }
25671
+ cancelFrame(handle) {
25672
+ if (handle !== undefined)
25673
+ cancelAnimationFrame(handle);
25674
+ }
25675
+ findScrollContainer(element) {
25676
+ for (let parent = element.parentElement; parent; parent = parent.parentElement) {
25677
+ if (this.scrollsVertically(parent))
25678
+ return parent;
25679
+ }
25680
+ return undefined;
25681
+ }
25682
+ scrollsVertically(element) {
25683
+ return SCROLLABLE_OVERFLOW.includes(getComputedStyle(element).overflowY);
25684
+ }
25685
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTableScrollAnchorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
25686
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTableScrollAnchorService });
25687
+ }
25688
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTableScrollAnchorService, decorators: [{
25689
+ type: Injectable
25690
+ }] });
25691
+
25323
25692
  /**
25324
25693
  * Token for resolving table data in Angular applications.
25694
+ *
25695
+ * Bind it to a class implementing `QdTableDataResolver`.
25325
25696
  */
25326
25697
  const QD_TABLE_DATA_RESOLVER_TOKEN = new InjectionToken('QD_TABLE_DATA_RESOLVER_TOKEN');
25327
25698
 
@@ -25764,103 +26135,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
25764
26135
  type: Injectable
25765
26136
  }], ctorParameters: () => [] });
25766
26137
 
25767
- class QdScrollingService {
25768
- scrollIntoViewIfNeeded(element, borderDirection = 'top', targetBorderDistance = 0) {
25769
- this.scrollIntoView(element, borderDirection, targetBorderDistance, true);
25770
- }
25771
- scrollIntoView(element, borderDirection = 'top', targetBorderDistance = 0, onlyIfOutsideView = false) {
25772
- const borderDistances = this.getBorderDistances(element);
25773
- if (onlyIfOutsideView && this.isInViewport(borderDistances))
25774
- return;
25775
- switch (borderDirection) {
25776
- case 'top':
25777
- window.scrollBy({ behavior: 'smooth', top: -(targetBorderDistance - borderDistances.top) });
25778
- break;
25779
- case 'left':
25780
- window.scrollBy({ behavior: 'smooth', left: -(targetBorderDistance - borderDistances.left) });
25781
- break;
25782
- case 'right':
25783
- window.scrollBy({ behavior: 'smooth', left: targetBorderDistance - borderDistances.right });
25784
- break;
25785
- case 'bottom':
25786
- window.scrollBy({ behavior: 'smooth', top: targetBorderDistance - borderDistances.bottom });
25787
- break;
25788
- }
25789
- }
25790
- getBorderDistances(element) {
25791
- const boundingClientRect = element.getBoundingClientRect();
25792
- return {
25793
- top: boundingClientRect.top,
25794
- left: boundingClientRect.left,
25795
- right: (window.innerWidth || document.documentElement.clientWidth) - boundingClientRect.right,
25796
- bottom: (window.innerHeight || document.documentElement.clientHeight) - boundingClientRect.bottom
25797
- };
25798
- }
25799
- isInViewport(borderDistances) {
25800
- return Object.values(borderDistances).every(distance => distance > 0);
25801
- }
25802
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
25803
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollingService, providedIn: 'root' });
25804
- }
25805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollingService, decorators: [{
25806
- type: Injectable,
25807
- args: [{
25808
- providedIn: 'root'
25809
- }]
25810
- }] });
25811
-
25812
26138
  /**
25813
- * 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.
26139
+ * Marks the element the view should end up at after a page change.
25814
26140
  *
25815
- * Apply this directive to the HTML element representing the pagination section of the QuickDesk table.
26141
+ * Apply it to the pagination section of the table.
25816
26142
  */
25817
26143
  class QdScrollToPaginationDirective {
25818
26144
  elementRef = inject(ElementRef);
25819
- tableStoreService = inject(QdTableStoreService);
25820
- scrollingService = inject(QdScrollingService);
25821
- _destroyed$ = new Subject();
25822
- _bottom;
26145
+ scrollAnchorService = inject(QdTableScrollAnchorService, { optional: true });
25823
26146
  ngOnInit() {
25824
- this._bottom = this.getScrollBottom();
25825
- this.tableStoreService
25826
- .pageChangeInfo$()
25827
- .pipe(takeUntil(this._destroyed$), filter(pageInfo => pageInfo !== undefined), scan((acc, curr) => this.handleScrollAnalysis(acc, curr)), tap(curr => this.performScrollIntoView(curr)))
25828
- .subscribe();
26147
+ this.scrollAnchorService?.setAnchor(this.elementRef.nativeElement);
25829
26148
  }
25830
26149
  ngOnDestroy() {
25831
- this._destroyed$.next(null);
25832
- this._destroyed$.complete();
25833
- }
25834
- getScrollBottom() {
25835
- return this.scrollingService.getBorderDistances(this.elementRef.nativeElement).bottom;
25836
- }
25837
- handleScrollAnalysis(acc, curr) {
25838
- const result = { ...curr, shouldScroll: acc.shouldScroll, hasRequestSucceeded: acc.hasRequestSucceeded };
25839
- if (!this.hasRequestBeenTriggered(acc, curr)) {
25840
- result.shouldScroll = false;
25841
- result.hasRequestSucceeded = false;
25842
- }
25843
- if (this.shouldScroll(acc, curr)) {
25844
- this._bottom = this.getScrollBottom();
25845
- result.shouldScroll = true;
25846
- }
25847
- if (this.hasRequestSucceeded(acc, curr))
25848
- result.hasRequestSucceeded = true;
25849
- return result;
25850
- }
25851
- hasRequestBeenTriggered(acc, curr) {
25852
- return !(acc.requestState === QdTableRequestState.SUCCESS && curr.requestState === QdTableRequestState.SUCCESS);
25853
- }
25854
- hasRequestSucceeded(acc, curr) {
25855
- return acc.requestState === QdTableRequestState.PENDING && curr.requestState === QdTableRequestState.SUCCESS;
25856
- }
25857
- shouldScroll(acc, curr) {
25858
- return acc.pageIndex !== curr.pageIndex || acc.pageSize !== curr.pageSize;
25859
- }
25860
- performScrollIntoView(curr) {
25861
- if (!curr.shouldScroll || !curr.hasRequestSucceeded)
25862
- return;
25863
- window.setTimeout(() => this.scrollingService.scrollIntoView(this.elementRef.nativeElement, 'bottom', this._bottom), 10);
26150
+ this.scrollAnchorService?.setAnchor();
25864
26151
  }
25865
26152
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollToPaginationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
25866
26153
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: QdScrollToPaginationDirective, isStandalone: false, selector: "[qdScrollToPagination]", ngImport: i0 });
@@ -25873,6 +26160,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
25873
26160
  }]
25874
26161
  }] });
25875
26162
 
26163
+ /**
26164
+ * Measures how far an element sits from the borders of the viewport.
26165
+ */
26166
+ class QdScrollingService {
26167
+ /**
26168
+ * Returns the distance of an element to each viewport border.
26169
+ */
26170
+ getBorderDistances(element) {
26171
+ const boundingClientRect = element.getBoundingClientRect();
26172
+ return {
26173
+ top: boundingClientRect.top,
26174
+ left: boundingClientRect.left,
26175
+ right: this.getViewportWidth() - boundingClientRect.right,
26176
+ bottom: this.getViewportHeight() - boundingClientRect.bottom
26177
+ };
26178
+ }
26179
+ getViewportWidth() {
26180
+ return window.innerWidth || document.documentElement.clientWidth;
26181
+ }
26182
+ getViewportHeight() {
26183
+ return window.innerHeight || document.documentElement.clientHeight;
26184
+ }
26185
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26186
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollingService, providedIn: 'root' });
26187
+ }
26188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdScrollingService, decorators: [{
26189
+ type: Injectable,
26190
+ args: [{
26191
+ providedIn: 'root'
26192
+ }]
26193
+ }] });
26194
+
25876
26195
  /**
25877
26196
  * A directive that allows the paginator to set the page size of a table paginator. Also writes the result to the store.
25878
26197
  *
@@ -25989,10 +26308,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
25989
26308
  }] } });
25990
26309
 
25991
26310
  const PAGE_SIZE_DEFAULT = 25;
26311
+ const PAGE_NUMBER_CALCULATORS = {
26312
+ [QdPaginatorDirection.FirstPage]: () => 0,
26313
+ [QdPaginatorDirection.NextPage]: ({ currentPage }) => currentPage + 1,
26314
+ [QdPaginatorDirection.PreviousPage]: ({ currentPage }) => currentPage - 1,
26315
+ [QdPaginatorDirection.LastPage]: ({ totalCount, pageSize }) => Math.ceil(totalCount / pageSize) - 1
26316
+ };
26317
+ /**
26318
+ * Shows how many entries the current page holds and lets the user step through the pages.
26319
+ *
26320
+ * The table renders it on its own when the config carries a `pagination` section.
26321
+ */
25992
26322
  class QdTablePaginatorComponent {
25993
26323
  tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
25994
26324
  tableStoreService = inject(QdTableStoreService);
25995
26325
  routerConnector = inject(QdTablePaginationRouterConnectorService);
26326
+ scrollAnchorService = inject(QdTableScrollAnchorService, { optional: true });
25996
26327
  /**
25997
26328
  * @description Configuration Model for Qd-Table.
25998
26329
  */
@@ -26057,20 +26388,39 @@ class QdTablePaginatorComponent {
26057
26388
  getPageSizeDefault() {
26058
26389
  if (typeof this.config?.pagination !== 'object')
26059
26390
  return PAGE_SIZE_DEFAULT;
26060
- const { pageSizeDefault, pageSizes } = this.config.pagination;
26061
- const pageSize = pageSizes && pageSizes.length ? pageSizes[0] : PAGE_SIZE_DEFAULT;
26062
- return pageSizeDefault || pageSize;
26391
+ return this.config.pagination.pageSizeDefault || this.getFirstOfferedPageSize();
26392
+ }
26393
+ /**
26394
+ * Navigates to another page after the user asked for it.
26395
+ *
26396
+ * Unlike `navigateToPage`, this tells the table that the view may follow the
26397
+ * pagination. Programmatic page changes must not use it.
26398
+ */
26399
+ navigateByUser(direction) {
26400
+ this.scrollAnchorService?.requestTravel();
26401
+ this.navigateToPage(direction);
26063
26402
  }
26064
26403
  navigateToPage(direction) {
26065
26404
  if (!this.paginatorButtons)
26066
26405
  return;
26067
26406
  this.tableStoreService
26068
26407
  .table$()
26069
- .pipe(takeUntil(this._destroyed$), take$1(1), tap(table => {
26070
- this.tableStoreService.setPageParams(this.calculatePageNumber(direction, table?.totalCount ?? 0, table?.pageSize ?? 0, table?.pageIndex ?? 0), table?.pageSize ?? 0, table?.totalCount ?? 0);
26071
- }))
26408
+ .pipe(takeUntil(this._destroyed$), take$1(1), tap(table => this.applyPageParams(direction, table)))
26072
26409
  .subscribe();
26073
26410
  }
26411
+ applyPageParams(direction, table) {
26412
+ const pageSize = this.toCount(table?.pageSize);
26413
+ const totalCount = this.toCount(table?.totalCount);
26414
+ const pageNumber = this.calculatePageNumber(direction, totalCount, pageSize, this.toCount(table?.pageIndex));
26415
+ this.tableStoreService.setPageParams(pageNumber, pageSize, totalCount);
26416
+ }
26417
+ toCount(value) {
26418
+ return value ?? 0;
26419
+ }
26420
+ getFirstOfferedPageSize() {
26421
+ const pageSizes = typeof this.config?.pagination === 'object' ? this.config.pagination.pageSizes : undefined;
26422
+ return pageSizes?.length ? pageSizes[0] : PAGE_SIZE_DEFAULT;
26423
+ }
26074
26424
  isConfigValid() {
26075
26425
  if (!this.tableDataResolver) {
26076
26426
  console.error('Quadrel Framework | QdTable Pagination - Provide a resolver for pagination. Please use the "QD_TABLE_DATA_RESOLVER_TOKEN" injection token.');
@@ -26095,28 +26445,15 @@ class QdTablePaginatorComponent {
26095
26445
  this.tableStoreService.setupPagination(this.getPageSizeDefault());
26096
26446
  }
26097
26447
  calculatePageNumber(direction, totalCount, pageSize, currentPage) {
26098
- switch (direction) {
26099
- case QdPaginatorDirection.NextPage: {
26100
- return currentPage + 1;
26101
- }
26102
- case QdPaginatorDirection.PreviousPage: {
26103
- return currentPage - 1;
26104
- }
26105
- case QdPaginatorDirection.LastPage: {
26106
- return Math.ceil(totalCount / pageSize) - 1;
26107
- }
26108
- case QdPaginatorDirection.FirstPage:
26109
- default: {
26110
- return 0;
26111
- }
26112
- }
26448
+ const calculate = PAGE_NUMBER_CALCULATORS[direction] ?? PAGE_NUMBER_CALCULATORS[QdPaginatorDirection.FirstPage];
26449
+ return calculate({ totalCount, pageSize, currentPage });
26113
26450
  }
26114
26451
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTablePaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26115
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdTablePaginatorComponent, isStandalone: false, selector: "qd-table-paginator", inputs: { config: "config", testId: ["data-test-id", "testId"] }, providers: [QdTablePaginationRouterConnectorService], viewQueries: [{ propertyName: "paginatorButtons", first: true, predicate: ["paginatorButtons"], descendants: true }], ngImport: i0, template: "@if (hasData$ | async) { @if (pageSizes.length > 0) {\n<qd-table-paginator-page-size [pageSizes]=\"pageSizes\"></qd-table-paginator-page-size>\n} @if (currentPage$ | async; as page) {\n<span class=\"paginator-current-page\">\n {{ page.start }}\u2014{{ page.end }}\n {{ \"i18n.qd.table.pagination.of\" | translate }}\n {{ page.totalCount }}\n {{\n page.totalCount === 1\n ? (\"i18n.qd.table.pagination.entry\" | translate)\n : (\"i18n.qd.table.pagination.entries\" | translate)\n }}\n</span>\n} @if ({ count: (selectedRowsCount$ | async) ?? 0 }; as ctx) {\n<span\n [hidden]=\"ctx.count === 0 || config?.selection?.type !== 'multiSelect'\"\n class=\"paginator-selection-count\"\n [attr.data-test-id]=\"testId + '-paginator-selection-count'\"\n>\n {{\n ctx.count === 1\n ? (\"i18n.qd.table.pagination.selectedSingular\" | translate)\n : (\"i18n.qd.table.pagination.selectedPlural\" | translate : { count: ctx.count })\n }}\n</span>\n}\n<span class=\"paginator-buttons\" data-test=\"paginator-buttons\" #paginatorButtons qdScrollToPagination>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-first-page'\"\n (click)=\"navigateToPage(pageNav.FirstPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageFirst1'\"></qd-icon>\n </button>\n }\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-backward'\"\n (click)=\"navigateToPage(pageNav.PreviousPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleLeftSolid'\"></qd-icon>\n </button>\n <button\n class=\"paginator-button forward\"\n [attr.data-test-id]=\"testId + '-paginator-forward'\"\n (click)=\"navigateToPage(pageNav.NextPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleRightSolid'\"></qd-icon>\n </button>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-last-page'\"\n (click)=\"navigateToPage(pageNav.LastPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageLast'\"></qd-icon>\n </button>\n }\n</span>\n}\n", styles: [":host{color:#454545;font-size:.875rem;font-weight:400;line-height:1.3125rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:#fff}.paginator-current-page{margin-left:1rem}.paginator-selection-count{margin-right:1rem;margin-left:1rem}.paginator-buttons{margin-left:auto;text-align:right;white-space:nowrap}button.paginator-button{width:2.75rem;height:2.75rem;border-left:.0625rem solid rgb(229,229,229);background-color:unset;color:#454545;font-size:1.5rem}button.paginator-button:disabled{color:#b4b4b4;cursor:default}button.paginator-button:not(:disabled):hover{background-color:#e5e5e5;color:#171717}\n"], dependencies: [{ kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "directive", type: QdScrollToPaginationDirective, selector: "[qdScrollToPagination]" }, { kind: "component", type: QdTablePaginatorPageSizeComponent, selector: "qd-table-paginator-page-size", inputs: ["pageSizes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
26452
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdTablePaginatorComponent, isStandalone: false, selector: "qd-table-paginator", inputs: { config: "config", testId: ["data-test-id", "testId"] }, providers: [QdTablePaginationRouterConnectorService], viewQueries: [{ propertyName: "paginatorButtons", first: true, predicate: ["paginatorButtons"], descendants: true }], ngImport: i0, template: "@if (hasData$ | async) { @if (pageSizes.length > 0) {\n<qd-table-paginator-page-size [pageSizes]=\"pageSizes\"></qd-table-paginator-page-size>\n} @if (currentPage$ | async; as page) {\n<span class=\"paginator-current-page\" [attr.data-test-id]=\"testId + '-paginator-current-page'\">\n {{ page.start }}\u2014{{ page.end }}\n {{ \"i18n.qd.table.pagination.of\" | translate }}\n {{ page.totalCount }}\n {{\n page.totalCount === 1\n ? (\"i18n.qd.table.pagination.entry\" | translate)\n : (\"i18n.qd.table.pagination.entries\" | translate)\n }}\n</span>\n} @if ({ count: (selectedRowsCount$ | async) ?? 0 }; as ctx) {\n<span\n [hidden]=\"ctx.count === 0 || config?.selection?.type !== 'multiSelect'\"\n class=\"paginator-selection-count\"\n [attr.data-test-id]=\"testId + '-paginator-selection-count'\"\n>\n {{\n ctx.count === 1\n ? (\"i18n.qd.table.pagination.selectedSingular\" | translate)\n : (\"i18n.qd.table.pagination.selectedPlural\" | translate : { count: ctx.count })\n }}\n</span>\n}\n<span\n class=\"paginator-buttons\"\n data-test=\"paginator-buttons\"\n [attr.data-test-id]=\"testId + '-paginator-buttons'\"\n #paginatorButtons\n qdScrollToPagination\n>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-first-page'\"\n (click)=\"navigateByUser(pageNav.FirstPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageFirst1'\"></qd-icon>\n </button>\n }\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-backward'\"\n (click)=\"navigateByUser(pageNav.PreviousPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleLeftSolid'\"></qd-icon>\n </button>\n <button\n class=\"paginator-button forward\"\n [attr.data-test-id]=\"testId + '-paginator-forward'\"\n (click)=\"navigateByUser(pageNav.NextPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleRightSolid'\"></qd-icon>\n </button>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-last-page'\"\n (click)=\"navigateByUser(pageNav.LastPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageLast'\"></qd-icon>\n </button>\n }\n</span>\n}\n", styles: [":host{color:#454545;font-size:.875rem;font-weight:400;line-height:1.3125rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:#fff}.paginator-current-page{margin-left:1rem}.paginator-selection-count{margin-right:1rem;margin-left:1rem}.paginator-buttons{margin-left:auto;text-align:right;white-space:nowrap}button.paginator-button{width:2.75rem;height:2.75rem;border-left:.0625rem solid rgb(229,229,229);background-color:unset;color:#454545;font-size:1.5rem}button.paginator-button:disabled{color:#b4b4b4;cursor:default}button.paginator-button:not(:disabled):hover{background-color:#e5e5e5;color:#171717}\n"], dependencies: [{ kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "directive", type: QdScrollToPaginationDirective, selector: "[qdScrollToPagination]" }, { kind: "component", type: QdTablePaginatorPageSizeComponent, selector: "qd-table-paginator-page-size", inputs: ["pageSizes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
26116
26453
  }
26117
26454
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTablePaginatorComponent, decorators: [{
26118
26455
  type: Component,
26119
- args: [{ selector: 'qd-table-paginator', providers: [QdTablePaginationRouterConnectorService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (hasData$ | async) { @if (pageSizes.length > 0) {\n<qd-table-paginator-page-size [pageSizes]=\"pageSizes\"></qd-table-paginator-page-size>\n} @if (currentPage$ | async; as page) {\n<span class=\"paginator-current-page\">\n {{ page.start }}\u2014{{ page.end }}\n {{ \"i18n.qd.table.pagination.of\" | translate }}\n {{ page.totalCount }}\n {{\n page.totalCount === 1\n ? (\"i18n.qd.table.pagination.entry\" | translate)\n : (\"i18n.qd.table.pagination.entries\" | translate)\n }}\n</span>\n} @if ({ count: (selectedRowsCount$ | async) ?? 0 }; as ctx) {\n<span\n [hidden]=\"ctx.count === 0 || config?.selection?.type !== 'multiSelect'\"\n class=\"paginator-selection-count\"\n [attr.data-test-id]=\"testId + '-paginator-selection-count'\"\n>\n {{\n ctx.count === 1\n ? (\"i18n.qd.table.pagination.selectedSingular\" | translate)\n : (\"i18n.qd.table.pagination.selectedPlural\" | translate : { count: ctx.count })\n }}\n</span>\n}\n<span class=\"paginator-buttons\" data-test=\"paginator-buttons\" #paginatorButtons qdScrollToPagination>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-first-page'\"\n (click)=\"navigateToPage(pageNav.FirstPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageFirst1'\"></qd-icon>\n </button>\n }\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-backward'\"\n (click)=\"navigateToPage(pageNav.PreviousPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleLeftSolid'\"></qd-icon>\n </button>\n <button\n class=\"paginator-button forward\"\n [attr.data-test-id]=\"testId + '-paginator-forward'\"\n (click)=\"navigateToPage(pageNav.NextPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleRightSolid'\"></qd-icon>\n </button>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-last-page'\"\n (click)=\"navigateToPage(pageNav.LastPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageLast'\"></qd-icon>\n </button>\n }\n</span>\n}\n", styles: [":host{color:#454545;font-size:.875rem;font-weight:400;line-height:1.3125rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:#fff}.paginator-current-page{margin-left:1rem}.paginator-selection-count{margin-right:1rem;margin-left:1rem}.paginator-buttons{margin-left:auto;text-align:right;white-space:nowrap}button.paginator-button{width:2.75rem;height:2.75rem;border-left:.0625rem solid rgb(229,229,229);background-color:unset;color:#454545;font-size:1.5rem}button.paginator-button:disabled{color:#b4b4b4;cursor:default}button.paginator-button:not(:disabled):hover{background-color:#e5e5e5;color:#171717}\n"] }]
26456
+ args: [{ selector: 'qd-table-paginator', providers: [QdTablePaginationRouterConnectorService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (hasData$ | async) { @if (pageSizes.length > 0) {\n<qd-table-paginator-page-size [pageSizes]=\"pageSizes\"></qd-table-paginator-page-size>\n} @if (currentPage$ | async; as page) {\n<span class=\"paginator-current-page\" [attr.data-test-id]=\"testId + '-paginator-current-page'\">\n {{ page.start }}\u2014{{ page.end }}\n {{ \"i18n.qd.table.pagination.of\" | translate }}\n {{ page.totalCount }}\n {{\n page.totalCount === 1\n ? (\"i18n.qd.table.pagination.entry\" | translate)\n : (\"i18n.qd.table.pagination.entries\" | translate)\n }}\n</span>\n} @if ({ count: (selectedRowsCount$ | async) ?? 0 }; as ctx) {\n<span\n [hidden]=\"ctx.count === 0 || config?.selection?.type !== 'multiSelect'\"\n class=\"paginator-selection-count\"\n [attr.data-test-id]=\"testId + '-paginator-selection-count'\"\n>\n {{\n ctx.count === 1\n ? (\"i18n.qd.table.pagination.selectedSingular\" | translate)\n : (\"i18n.qd.table.pagination.selectedPlural\" | translate : { count: ctx.count })\n }}\n</span>\n}\n<span\n class=\"paginator-buttons\"\n data-test=\"paginator-buttons\"\n [attr.data-test-id]=\"testId + '-paginator-buttons'\"\n #paginatorButtons\n qdScrollToPagination\n>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-first-page'\"\n (click)=\"navigateByUser(pageNav.FirstPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageFirst1'\"></qd-icon>\n </button>\n }\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-backward'\"\n (click)=\"navigateByUser(pageNav.PreviousPage)\"\n [disabled]=\"(canPageBackward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleLeftSolid'\"></qd-icon>\n </button>\n <button\n class=\"paginator-button forward\"\n [attr.data-test-id]=\"testId + '-paginator-forward'\"\n (click)=\"navigateByUser(pageNav.NextPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'triangleRightSolid'\"></qd-icon>\n </button>\n @if (config?.pagination['hasFirstLastPageNavigation']) {\n <button\n class=\"paginator-button\"\n [attr.data-test-id]=\"testId + '-paginator-last-page'\"\n (click)=\"navigateByUser(pageNav.LastPage)\"\n [disabled]=\"(canPageForward$ | async) === false\"\n >\n <qd-icon [icon]=\"'pageLast'\"></qd-icon>\n </button>\n }\n</span>\n}\n", styles: [":host{color:#454545;font-size:.875rem;font-weight:400;line-height:1.3125rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:#fff}.paginator-current-page{margin-left:1rem}.paginator-selection-count{margin-right:1rem;margin-left:1rem}.paginator-buttons{margin-left:auto;text-align:right;white-space:nowrap}button.paginator-button{width:2.75rem;height:2.75rem;border-left:.0625rem solid rgb(229,229,229);background-color:unset;color:#454545;font-size:1.5rem}button.paginator-button:disabled{color:#b4b4b4;cursor:default}button.paginator-button:not(:disabled):hover{background-color:#e5e5e5;color:#171717}\n"] }]
26120
26457
  }], propDecorators: { config: [{
26121
26458
  type: Input
26122
26459
  }], testId: [{
@@ -26891,6 +27228,15 @@ class QdTableComponent {
26891
27228
  emptyStateService = inject(QdTableEmptyStateService);
26892
27229
  responsiveRowService = inject(QdTableResponsiveRowService);
26893
27230
  fillingWidthService = inject(QdTableFillingWidthService);
27231
+ scrollAnchorService = inject(QdTableScrollAnchorService);
27232
+ scrollAnchorHook = afterEveryRender({
27233
+ earlyRead: () => {
27234
+ this.initializeScrollAnchorService();
27235
+ this.scrollAnchorService.measureLayoutChange();
27236
+ },
27237
+ write: () => this.scrollAnchorService.catchLayoutChange(),
27238
+ read: () => this.scrollAnchorService.takeSnapshot()
27239
+ });
26894
27240
  breakpointService = inject(QdBreakpointService);
26895
27241
  resolverService = inject(QdTableResolverService);
26896
27242
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
@@ -27035,6 +27381,7 @@ class QdTableComponent {
27035
27381
  this.tableStoreService.updateTableStateRecentSecondaryAction(undefined);
27036
27382
  this.tableStoreService.resetConnectorStates();
27037
27383
  this.fillingWidthService.destroy();
27384
+ this.scrollAnchorService.destroy();
27038
27385
  this._recentSecondaryActionsSubscription?.unsubscribe();
27039
27386
  this._rowSelectionServiceSubscription?.unsubscribe();
27040
27387
  this._emptyStateActionServiceSubscription?.unsubscribe();
@@ -27071,6 +27418,12 @@ class QdTableComponent {
27071
27418
  initializeFillingWidthService() {
27072
27419
  this.fillingWidthService.initialize(this.element.nativeElement, this.config);
27073
27420
  }
27421
+ initializeScrollAnchorService() {
27422
+ const host = this.element.nativeElement;
27423
+ const table = host.querySelector('table');
27424
+ if (table)
27425
+ this.scrollAnchorService.initialize(host, table);
27426
+ }
27074
27427
  updateFillingWidthServiceTableConfig() {
27075
27428
  this.fillingWidthService.updateTableConfig(this.config);
27076
27429
  }
@@ -27187,10 +27540,11 @@ class QdTableComponent {
27187
27540
  QdTableResponsiveRowService,
27188
27541
  QdTableRowSelectionService,
27189
27542
  QdTableFillingWidthService,
27543
+ QdTableScrollAnchorService,
27190
27544
  QdTableResolverService,
27191
27545
  QdTableExternalActionResultService,
27192
27546
  QdTableSortRouterConnectorService
27193
- ], viewQueries: [{ propertyName: "paginator", first: true, predicate: QdTablePaginatorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<table [class]=\"'qd-table__table'\">\n <tr qd-table-head [config]=\"config\" [data-test-id]=\"testId\"></tr>\n <tbody qd-table-body [config]=\"config\" [data]=\"(data$ | async) ?? []\" [data-test-id]=\"testId\"></tbody>\n</table>\n\n@if (hasPagination) {\n<qd-table-paginator [config]=\"config\" [data-test-id]=\"testId\"></qd-table-paginator>\n} @if (hasEmptyStateView$ | async) {\n<qd-table-empty-state [config]=\"config.emptyStateView\"></qd-table-empty-state>\n}\n", styles: [":host{display:inline-flex;flex-direction:column}:host .qd-table__table{background:#fff;border-spacing:0;color:#171717;font-size:.875rem;font-weight:400;line-height:2.5rem}:host .qd-table__head,:host .qd-table__body{vertical-align:center}:host .qd-table__head{background:#e5e5e5;text-align:left}:host .qd-table__head ::ng-deep .qd-table__head-cell{font-weight:600}:host .qd-table__body{color:#171717}:host ::ng-deep .qd-table__head-cell,:host ::ng-deep .qd-table__body-cell{padding:.125rem 1rem 0;vertical-align:top}:host ::ng-deep .qd-table__head-cell--selection,:host ::ng-deep .qd-table__body-cell--selection{width:1.875rem;padding-top:.1875rem;text-align:center}:host ::ng-deep .qd-table__head-cell--actions-inline-menu,:host ::ng-deep .qd-table__body-cell--actions-inline-menu{padding-top:.125rem;vertical-align:top}:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.main-column,:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.main-column{width:100%}:host.main-column-fills-width.table-has-remaining-width ::ng-deep th:not(.main-column),:host.main-column-fills-width.table-has-remaining-width ::ng-deep td:not(.main-column){white-space:nowrap}:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.last-column,:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.last-column{width:100%}:host.last-column-fills-width.table-has-remaining-width ::ng-deep th:not(.last-column),:host.last-column-fills-width.table-has-remaining-width ::ng-deep td:not(.last-column){white-space:nowrap}:host.harmonized{width:100%}\n"], dependencies: [{ kind: "component", type: QdTableBodyComponent, selector: "[qd-table-body]", inputs: ["config", "data", "data-test-id"] }, { kind: "component", type: QdTableEmptyStateComponent, selector: "qd-table-empty-state", inputs: ["config"] }, { kind: "component", type: QdTableHeadComponent, selector: "[qd-table-head]", inputs: ["config", "data-test-id"] }, { kind: "component", type: QdTablePaginatorComponent, selector: "qd-table-paginator", inputs: ["config", "data-test-id"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
27547
+ ], viewQueries: [{ propertyName: "paginator", first: true, predicate: QdTablePaginatorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<table [class]=\"'qd-table__table'\" [attr.data-test-id]=\"testId + '-element'\">\n <tr qd-table-head [config]=\"config\" [data-test-id]=\"testId\"></tr>\n <tbody qd-table-body [config]=\"config\" [data]=\"(data$ | async) ?? []\" [data-test-id]=\"testId\"></tbody>\n</table>\n\n@if (hasPagination) {\n<qd-table-paginator [config]=\"config\" [data-test-id]=\"testId\"></qd-table-paginator>\n} @if (hasEmptyStateView$ | async) {\n<qd-table-empty-state [config]=\"config.emptyStateView\"></qd-table-empty-state>\n}\n", styles: [":host{display:inline-flex;flex-direction:column}:host .qd-table__table{background:#fff;border-spacing:0;color:#171717;font-size:.875rem;font-weight:400;line-height:2.5rem}:host .qd-table__head,:host .qd-table__body{vertical-align:center}:host .qd-table__head{background:#e5e5e5;text-align:left}:host .qd-table__head ::ng-deep .qd-table__head-cell{font-weight:600}:host .qd-table__body{color:#171717}:host ::ng-deep .qd-table__head-cell,:host ::ng-deep .qd-table__body-cell{padding:.125rem 1rem 0;vertical-align:top}:host ::ng-deep .qd-table__head-cell--selection,:host ::ng-deep .qd-table__body-cell--selection{width:1.875rem;padding-top:.1875rem;text-align:center}:host ::ng-deep .qd-table__head-cell--actions-inline-menu,:host ::ng-deep .qd-table__body-cell--actions-inline-menu{padding-top:.125rem;vertical-align:top}:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.main-column,:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.main-column{width:100%}:host.main-column-fills-width.table-has-remaining-width ::ng-deep th:not(.main-column),:host.main-column-fills-width.table-has-remaining-width ::ng-deep td:not(.main-column){white-space:nowrap}:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.last-column,:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.last-column{width:100%}:host.last-column-fills-width.table-has-remaining-width ::ng-deep th:not(.last-column),:host.last-column-fills-width.table-has-remaining-width ::ng-deep td:not(.last-column){white-space:nowrap}:host.harmonized{width:100%}\n"], dependencies: [{ kind: "component", type: QdTableBodyComponent, selector: "[qd-table-body]", inputs: ["config", "data", "data-test-id"] }, { kind: "component", type: QdTableEmptyStateComponent, selector: "qd-table-empty-state", inputs: ["config"] }, { kind: "component", type: QdTableHeadComponent, selector: "[qd-table-head]", inputs: ["config", "data-test-id"] }, { kind: "component", type: QdTablePaginatorComponent, selector: "qd-table-paginator", inputs: ["config", "data-test-id"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
27194
27548
  }
27195
27549
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTableComponent, decorators: [{
27196
27550
  type: Component,
@@ -27202,6 +27556,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
27202
27556
  QdTableResponsiveRowService,
27203
27557
  QdTableRowSelectionService,
27204
27558
  QdTableFillingWidthService,
27559
+ QdTableScrollAnchorService,
27205
27560
  QdTableResolverService,
27206
27561
  QdTableExternalActionResultService,
27207
27562
  QdTableSortRouterConnectorService
@@ -27211,7 +27566,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
27211
27566
  '[class.last-column-fills-width]': 'whichColumnFillsWidth === "last"',
27212
27567
  '[class.harmonized]': 'whichColumnFillsWidth === "harmonized"',
27213
27568
  '[attr.data-qd-no-horizontal-padding-small]': 'true'
27214
- }, standalone: false, template: "<table [class]=\"'qd-table__table'\">\n <tr qd-table-head [config]=\"config\" [data-test-id]=\"testId\"></tr>\n <tbody qd-table-body [config]=\"config\" [data]=\"(data$ | async) ?? []\" [data-test-id]=\"testId\"></tbody>\n</table>\n\n@if (hasPagination) {\n<qd-table-paginator [config]=\"config\" [data-test-id]=\"testId\"></qd-table-paginator>\n} @if (hasEmptyStateView$ | async) {\n<qd-table-empty-state [config]=\"config.emptyStateView\"></qd-table-empty-state>\n}\n", styles: [":host{display:inline-flex;flex-direction:column}:host .qd-table__table{background:#fff;border-spacing:0;color:#171717;font-size:.875rem;font-weight:400;line-height:2.5rem}:host .qd-table__head,:host .qd-table__body{vertical-align:center}:host .qd-table__head{background:#e5e5e5;text-align:left}:host .qd-table__head ::ng-deep .qd-table__head-cell{font-weight:600}:host .qd-table__body{color:#171717}:host ::ng-deep .qd-table__head-cell,:host ::ng-deep .qd-table__body-cell{padding:.125rem 1rem 0;vertical-align:top}:host ::ng-deep .qd-table__head-cell--selection,:host ::ng-deep .qd-table__body-cell--selection{width:1.875rem;padding-top:.1875rem;text-align:center}:host ::ng-deep .qd-table__head-cell--actions-inline-menu,:host ::ng-deep .qd-table__body-cell--actions-inline-menu{padding-top:.125rem;vertical-align:top}:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.main-column,:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.main-column{width:100%}:host.main-column-fills-width.table-has-remaining-width ::ng-deep th:not(.main-column),:host.main-column-fills-width.table-has-remaining-width ::ng-deep td:not(.main-column){white-space:nowrap}:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.last-column,:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.last-column{width:100%}:host.last-column-fills-width.table-has-remaining-width ::ng-deep th:not(.last-column),:host.last-column-fills-width.table-has-remaining-width ::ng-deep td:not(.last-column){white-space:nowrap}:host.harmonized{width:100%}\n"] }]
27569
+ }, standalone: false, template: "<table [class]=\"'qd-table__table'\" [attr.data-test-id]=\"testId + '-element'\">\n <tr qd-table-head [config]=\"config\" [data-test-id]=\"testId\"></tr>\n <tbody qd-table-body [config]=\"config\" [data]=\"(data$ | async) ?? []\" [data-test-id]=\"testId\"></tbody>\n</table>\n\n@if (hasPagination) {\n<qd-table-paginator [config]=\"config\" [data-test-id]=\"testId\"></qd-table-paginator>\n} @if (hasEmptyStateView$ | async) {\n<qd-table-empty-state [config]=\"config.emptyStateView\"></qd-table-empty-state>\n}\n", styles: [":host{display:inline-flex;flex-direction:column}:host .qd-table__table{background:#fff;border-spacing:0;color:#171717;font-size:.875rem;font-weight:400;line-height:2.5rem}:host .qd-table__head,:host .qd-table__body{vertical-align:center}:host .qd-table__head{background:#e5e5e5;text-align:left}:host .qd-table__head ::ng-deep .qd-table__head-cell{font-weight:600}:host .qd-table__body{color:#171717}:host ::ng-deep .qd-table__head-cell,:host ::ng-deep .qd-table__body-cell{padding:.125rem 1rem 0;vertical-align:top}:host ::ng-deep .qd-table__head-cell--selection,:host ::ng-deep .qd-table__body-cell--selection{width:1.875rem;padding-top:.1875rem;text-align:center}:host ::ng-deep .qd-table__head-cell--actions-inline-menu,:host ::ng-deep .qd-table__body-cell--actions-inline-menu{padding-top:.125rem;vertical-align:top}:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.main-column,:host.main-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.main-column{width:100%}:host.main-column-fills-width.table-has-remaining-width ::ng-deep th:not(.main-column),:host.main-column-fills-width.table-has-remaining-width ::ng-deep td:not(.main-column){white-space:nowrap}:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep th.last-column,:host.last-column-fills-width.table-has-remaining-width:not(.table-has-right-aligned-filling-column) ::ng-deep td.last-column{width:100%}:host.last-column-fills-width.table-has-remaining-width ::ng-deep th:not(.last-column),:host.last-column-fills-width.table-has-remaining-width ::ng-deep td:not(.last-column){white-space:nowrap}:host.harmonized{width:100%}\n"] }]
27215
27570
  }], propDecorators: { config: [{
27216
27571
  type: Input
27217
27572
  }], data: [{
@@ -28519,6 +28874,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
28519
28874
  }] });
28520
28875
 
28521
28876
  // @ts-strict-ignore
28877
+ const RESERVED_ROW_PROPERTIES = ['uid', 'nestedRows', 'expanded', 'full'];
28522
28878
  class QdTreeRowsService {
28523
28879
  groupService = inject(QdTreeGroupService);
28524
28880
  expanderService = inject(QdTreeRowExpanderService, { optional: true });
@@ -28572,6 +28928,9 @@ class QdTreeRowsService {
28572
28928
  this.ungroupedColumns.forEach(column => {
28573
28929
  lastTreeRow[column.column] = row[column.column];
28574
28930
  });
28931
+ this.getMetadataProperties(row).forEach(property => {
28932
+ lastTreeRow[property] = row[property];
28933
+ });
28575
28934
  if (row.uid)
28576
28935
  lastTreeRow.uid = row.uid;
28577
28936
  lastTreeRow.nestedRows = row.nestedRows;
@@ -28580,6 +28939,13 @@ class QdTreeRowsService {
28580
28939
  }
28581
28940
  return this.nestRowsIntoOneAnother(treeRows);
28582
28941
  }
28942
+ getMetadataProperties(row) {
28943
+ const configuredColumns = [
28944
+ ...this.groupColumn.groupedColumns.map(column => column.column),
28945
+ ...this.ungroupedColumns.map(column => column.column)
28946
+ ];
28947
+ return Object.keys(row).filter(property => !configuredColumns.includes(property) && !RESERVED_ROW_PROPERTIES.includes(property));
28948
+ }
28583
28949
  nestRowsIntoOneAnother(rows) {
28584
28950
  let rootRow = rows[0];
28585
28951
  for (let index = 1; index < rows.length; index++) {
@@ -32794,7 +33160,7 @@ class QdPageComponent {
32794
33160
  QdPageSubmitActionService,
32795
33161
  QdResolverTriggerService,
32796
33162
  QdPageNavigationInterceptorService
32797
- ], queries: [{ propertyName: "controlPanel", first: true, predicate: QdPageControlPanelComponent, descendants: true }, { propertyName: "stepperComponent", first: true, predicate: QdPageStepperComponent, descendants: true }, { propertyName: "tabsComponent", first: true, predicate: QdPageTabsComponent, descendants: true }, { propertyName: "stepperAdapterDirective", first: true, predicate: QdPageStepperAdapterDirective, descendants: true }, { propertyName: "tabsAdapterDirective", first: true, predicate: QdPageTabsAdapterDirective, descendants: true }, { propertyName: "sections", predicate: QdSectionComponent }, { propertyName: "infoBanners", predicate: QdPageInfoBannerComponent }], usesOnChanges: true, ngImport: i0, template: "<main qdSnackbarListener cdkScrollable>\n <qd-page-object-header\n [data-test-id]=\"testId\"\n [attr.data-test-id]=\"testId + 'object-header'\"\n [config]=\"config\"\n [hasNavigation]=\"hasNavigation\"\n >\n <ng-content select=\"[qdPageHeaderExtension]\"></ng-content>\n </qd-page-object-header>\n\n <div class=\"page-info-banners\">\n <ng-content select=\"qd-page-info-banner\"></ng-content>\n </div>\n\n @if (config.pageType === 'create' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-stepper\"></ng-content>\n <ng-content select=\"[qdPageStepperAdapter]\"></ng-content>\n } @if (config.pageType === 'overview' || config.pageType === 'inspect' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-tabs\"></ng-content>\n <ng-content select=\"[qdPageTabsAdapter]\"></ng-content>\n <ng-content select=\"qd-section\"></ng-content>\n <ng-content select=\"[qdSectionAdapter]\"></ng-content>\n } @if (config.pageType === 'custom') {\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n }\n</main>\n\n@if (footerHasContent$ | async) {\n<footer>\n <qd-page-footer [attr.data-test-id]=\"testId + '-footer'\">\n <ng-content select=\"[qdPageFooter]\"></ng-content>\n </qd-page-footer>\n</footer>\n} @if (isControlPanelVisible) {\n<aside>\n <ng-content select=\"qd-page-control-panel\"></ng-content>\n</aside>\n} @if (config.pageType !== 'custom') {\n<qd-projection-guard [warningMessage]=\"projectionGuardMessage\">\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n</qd-projection-guard>\n}\n\n<ng-template #projectedContent>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{position:absolute;display:grid;overflow:hidden;width:100%;height:100%;background:#efefef;grid-template-areas:\"main\";grid-template-columns:1fr;grid-template-rows:1fr}:host.has-control-panel{grid-template-areas:\"main aside\";grid-template-columns:1fr 18.75rem}:host.control-panel-broad{grid-template-columns:1fr 27rem}:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding:1rem 1.25rem .5rem;border-bottom:rgb(213,213,213) solid .0625rem;background-color:#fff}@media(max-width:599.98px){:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding-right:.9375rem;padding-left:.9375rem}}:host .page-info-banners>qd-page-info-banner:last-child{margin-bottom:0}:host.has-footer{grid-template-areas:\"main\" \"footer\";grid-template-rows:calc(100% - 4rem) 4rem}:host.has-control-panel.has-footer{grid-template-areas:\"main aside\" \"footer aside\"}:host main{position:relative;grid-area:main;overflow-y:auto}:host aside{border-left:rgb(213,213,213) solid .0625rem;background:#fff;grid-area:aside}:host footer{grid-area:footer}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive{position:relative;top:-.5rem;padding-top:0rem;padding-bottom:0rem;border-top-width:0;margin-bottom:0rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .icon,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .icon,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .icon,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .icon{display:none}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .title,:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .message,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .title,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .message,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .title,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .message,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .title,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .message{position:relative;top:-.625rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info:before,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning:before,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical:before,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive:before{position:relative;top:-.625rem;left:-2.75rem;display:block;width:calc(100% + 4.75rem);height:.625rem;background-color:#fff;content:\"\"}\n"], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$6.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: QdProjectionGuardComponent, selector: "qd-projection-guard", inputs: ["isDisabled", "warningMessage"] }, { kind: "component", type: QdPageFooterComponent, selector: "qd-page-footer" }, { kind: "component", type: QdPageObjectHeaderComponent, selector: "qd-page-object-header", inputs: ["config", "hasNavigation", "data-test-id"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
33163
+ ], queries: [{ propertyName: "controlPanel", first: true, predicate: QdPageControlPanelComponent, descendants: true }, { propertyName: "stepperComponent", first: true, predicate: QdPageStepperComponent, descendants: true }, { propertyName: "tabsComponent", first: true, predicate: QdPageTabsComponent, descendants: true }, { propertyName: "stepperAdapterDirective", first: true, predicate: QdPageStepperAdapterDirective, descendants: true }, { propertyName: "tabsAdapterDirective", first: true, predicate: QdPageTabsAdapterDirective, descendants: true }, { propertyName: "sections", predicate: QdSectionComponent }, { propertyName: "infoBanners", predicate: QdPageInfoBannerComponent }], usesOnChanges: true, ngImport: i0, template: "<main qdSnackbarListener cdkScrollable [attr.data-test-id]=\"testId + '-main'\">\n <qd-page-object-header\n [data-test-id]=\"testId\"\n [attr.data-test-id]=\"testId + 'object-header'\"\n [config]=\"config\"\n [hasNavigation]=\"hasNavigation\"\n >\n <ng-content select=\"[qdPageHeaderExtension]\"></ng-content>\n </qd-page-object-header>\n\n <div class=\"page-info-banners\">\n <ng-content select=\"qd-page-info-banner\"></ng-content>\n </div>\n\n @if (config.pageType === 'create' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-stepper\"></ng-content>\n <ng-content select=\"[qdPageStepperAdapter]\"></ng-content>\n } @if (config.pageType === 'overview' || config.pageType === 'inspect' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-tabs\"></ng-content>\n <ng-content select=\"[qdPageTabsAdapter]\"></ng-content>\n <ng-content select=\"qd-section\"></ng-content>\n <ng-content select=\"[qdSectionAdapter]\"></ng-content>\n } @if (config.pageType === 'custom') {\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n }\n</main>\n\n@if (footerHasContent$ | async) {\n<footer>\n <qd-page-footer [attr.data-test-id]=\"testId + '-footer'\">\n <ng-content select=\"[qdPageFooter]\"></ng-content>\n </qd-page-footer>\n</footer>\n} @if (isControlPanelVisible) {\n<aside>\n <ng-content select=\"qd-page-control-panel\"></ng-content>\n</aside>\n} @if (config.pageType !== 'custom') {\n<qd-projection-guard [warningMessage]=\"projectionGuardMessage\">\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n</qd-projection-guard>\n}\n\n<ng-template #projectedContent>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{position:absolute;display:grid;overflow:hidden;width:100%;height:100%;background:#efefef;grid-template-areas:\"main\";grid-template-columns:1fr;grid-template-rows:1fr}:host.has-control-panel{grid-template-areas:\"main aside\";grid-template-columns:1fr 18.75rem}:host.control-panel-broad{grid-template-columns:1fr 27rem}:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding:1rem 1.25rem .5rem;border-bottom:rgb(213,213,213) solid .0625rem;background-color:#fff}@media(max-width:599.98px){:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding-right:.9375rem;padding-left:.9375rem}}:host .page-info-banners>qd-page-info-banner:last-child{margin-bottom:0}:host.has-footer{grid-template-areas:\"main\" \"footer\";grid-template-rows:calc(100% - 4rem) 4rem}:host.has-control-panel.has-footer{grid-template-areas:\"main aside\" \"footer aside\"}:host main{position:relative;grid-area:main;overflow-y:auto}:host aside{border-left:rgb(213,213,213) solid .0625rem;background:#fff;grid-area:aside}:host footer{grid-area:footer}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive{position:relative;top:-.5rem;padding-top:0rem;padding-bottom:0rem;border-top-width:0;margin-bottom:0rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .icon,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .icon,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .icon,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .icon{display:none}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .title,:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .message,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .title,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .message,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .title,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .message,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .title,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .message{position:relative;top:-.625rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info:before,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning:before,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical:before,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive:before{position:relative;top:-.625rem;left:-2.75rem;display:block;width:calc(100% + 4.75rem);height:.625rem;background-color:#fff;content:\"\"}\n"], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$6.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: QdProjectionGuardComponent, selector: "qd-projection-guard", inputs: ["isDisabled", "warningMessage"] }, { kind: "component", type: QdPageFooterComponent, selector: "qd-page-footer" }, { kind: "component", type: QdPageObjectHeaderComponent, selector: "qd-page-object-header", inputs: ["config", "hasNavigation", "data-test-id"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
32798
33164
  }
32799
33165
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdPageComponent, decorators: [{
32800
33166
  type: Component,
@@ -32804,7 +33170,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
32804
33170
  QdPageSubmitActionService,
32805
33171
  QdResolverTriggerService,
32806
33172
  QdPageNavigationInterceptorService
32807
- ], host: { '[class.has-control-panel]': 'isControlPanelVisible', '[class.control-panel-broad]': 'isControlPanelBroad' }, standalone: false, template: "<main qdSnackbarListener cdkScrollable>\n <qd-page-object-header\n [data-test-id]=\"testId\"\n [attr.data-test-id]=\"testId + 'object-header'\"\n [config]=\"config\"\n [hasNavigation]=\"hasNavigation\"\n >\n <ng-content select=\"[qdPageHeaderExtension]\"></ng-content>\n </qd-page-object-header>\n\n <div class=\"page-info-banners\">\n <ng-content select=\"qd-page-info-banner\"></ng-content>\n </div>\n\n @if (config.pageType === 'create' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-stepper\"></ng-content>\n <ng-content select=\"[qdPageStepperAdapter]\"></ng-content>\n } @if (config.pageType === 'overview' || config.pageType === 'inspect' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-tabs\"></ng-content>\n <ng-content select=\"[qdPageTabsAdapter]\"></ng-content>\n <ng-content select=\"qd-section\"></ng-content>\n <ng-content select=\"[qdSectionAdapter]\"></ng-content>\n } @if (config.pageType === 'custom') {\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n }\n</main>\n\n@if (footerHasContent$ | async) {\n<footer>\n <qd-page-footer [attr.data-test-id]=\"testId + '-footer'\">\n <ng-content select=\"[qdPageFooter]\"></ng-content>\n </qd-page-footer>\n</footer>\n} @if (isControlPanelVisible) {\n<aside>\n <ng-content select=\"qd-page-control-panel\"></ng-content>\n</aside>\n} @if (config.pageType !== 'custom') {\n<qd-projection-guard [warningMessage]=\"projectionGuardMessage\">\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n</qd-projection-guard>\n}\n\n<ng-template #projectedContent>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{position:absolute;display:grid;overflow:hidden;width:100%;height:100%;background:#efefef;grid-template-areas:\"main\";grid-template-columns:1fr;grid-template-rows:1fr}:host.has-control-panel{grid-template-areas:\"main aside\";grid-template-columns:1fr 18.75rem}:host.control-panel-broad{grid-template-columns:1fr 27rem}:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding:1rem 1.25rem .5rem;border-bottom:rgb(213,213,213) solid .0625rem;background-color:#fff}@media(max-width:599.98px){:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding-right:.9375rem;padding-left:.9375rem}}:host .page-info-banners>qd-page-info-banner:last-child{margin-bottom:0}:host.has-footer{grid-template-areas:\"main\" \"footer\";grid-template-rows:calc(100% - 4rem) 4rem}:host.has-control-panel.has-footer{grid-template-areas:\"main aside\" \"footer aside\"}:host main{position:relative;grid-area:main;overflow-y:auto}:host aside{border-left:rgb(213,213,213) solid .0625rem;background:#fff;grid-area:aside}:host footer{grid-area:footer}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive{position:relative;top:-.5rem;padding-top:0rem;padding-bottom:0rem;border-top-width:0;margin-bottom:0rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .icon,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .icon,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .icon,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .icon{display:none}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .title,:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .message,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .title,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .message,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .title,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .message,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .title,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .message{position:relative;top:-.625rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info:before,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning:before,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical:before,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive:before{position:relative;top:-.625rem;left:-2.75rem;display:block;width:calc(100% + 4.75rem);height:.625rem;background-color:#fff;content:\"\"}\n"] }]
33173
+ ], host: { '[class.has-control-panel]': 'isControlPanelVisible', '[class.control-panel-broad]': 'isControlPanelBroad' }, standalone: false, template: "<main qdSnackbarListener cdkScrollable [attr.data-test-id]=\"testId + '-main'\">\n <qd-page-object-header\n [data-test-id]=\"testId\"\n [attr.data-test-id]=\"testId + 'object-header'\"\n [config]=\"config\"\n [hasNavigation]=\"hasNavigation\"\n >\n <ng-content select=\"[qdPageHeaderExtension]\"></ng-content>\n </qd-page-object-header>\n\n <div class=\"page-info-banners\">\n <ng-content select=\"qd-page-info-banner\"></ng-content>\n </div>\n\n @if (config.pageType === 'create' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-stepper\"></ng-content>\n <ng-content select=\"[qdPageStepperAdapter]\"></ng-content>\n } @if (config.pageType === 'overview' || config.pageType === 'inspect' || config.pageType === 'custom') {\n <ng-content select=\"qd-page-tabs\"></ng-content>\n <ng-content select=\"[qdPageTabsAdapter]\"></ng-content>\n <ng-content select=\"qd-section\"></ng-content>\n <ng-content select=\"[qdSectionAdapter]\"></ng-content>\n } @if (config.pageType === 'custom') {\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n }\n</main>\n\n@if (footerHasContent$ | async) {\n<footer>\n <qd-page-footer [attr.data-test-id]=\"testId + '-footer'\">\n <ng-content select=\"[qdPageFooter]\"></ng-content>\n </qd-page-footer>\n</footer>\n} @if (isControlPanelVisible) {\n<aside>\n <ng-content select=\"qd-page-control-panel\"></ng-content>\n</aside>\n} @if (config.pageType !== 'custom') {\n<qd-projection-guard [warningMessage]=\"projectionGuardMessage\">\n <ng-container *ngTemplateOutlet=\"projectedContent\"></ng-container>\n</qd-projection-guard>\n}\n\n<ng-template #projectedContent>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{position:absolute;display:grid;overflow:hidden;width:100%;height:100%;background:#efefef;grid-template-areas:\"main\";grid-template-columns:1fr;grid-template-rows:1fr}:host.has-control-panel{grid-template-areas:\"main aside\";grid-template-columns:1fr 18.75rem}:host.control-panel-broad{grid-template-columns:1fr 27rem}:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding:1rem 1.25rem .5rem;border-bottom:rgb(213,213,213) solid .0625rem;background-color:#fff}@media(max-width:599.98px){:host .page-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding-right:.9375rem;padding-left:.9375rem}}:host .page-info-banners>qd-page-info-banner:last-child{margin-bottom:0}:host.has-footer{grid-template-areas:\"main\" \"footer\";grid-template-rows:calc(100% - 4rem) 4rem}:host.has-control-panel.has-footer{grid-template-areas:\"main aside\" \"footer aside\"}:host main{position:relative;grid-area:main;overflow-y:auto}:host aside{border-left:rgb(213,213,213) solid .0625rem;background:#fff;grid-area:aside}:host footer{grid-area:footer}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive{position:relative;top:-.5rem;padding-top:0rem;padding-bottom:0rem;border-top-width:0;margin-bottom:0rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .icon,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .icon,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .icon,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .icon{display:none}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .title,:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info .message,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .title,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning .message,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .title,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical .message,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .title,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive .message{position:relative;top:-.625rem}:host ::ng-deep .qd-page-info-banner-info+.qd-page-info-banner-info:before,:host ::ng-deep .qd-page-info-banner-warning+.qd-page-info-banner-warning:before,:host ::ng-deep .qd-page-info-banner-critical+.qd-page-info-banner-critical:before,:host ::ng-deep .qd-page-info-banner-positive+.qd-page-info-banner-positive:before{position:relative;top:-.625rem;left:-2.75rem;display:block;width:calc(100% + 4.75rem);height:.625rem;background-color:#fff;content:\"\"}\n"] }]
32808
33174
  }], ctorParameters: () => [], propDecorators: { config: [{
32809
33175
  type: Input,
32810
33176
  args: [{ required: true }]