@quadrel-enterprise-ui/framework 21.20.1 → 21.21.0

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,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, Component, Directive, NgModule, EventEmitter, HostBinding, Output, inject, Renderer2, ElementRef, Pipe, ViewContainerRef, HostListener, InjectionToken, Injectable, NO_ERRORS_SCHEMA, Injector, DestroyRef, ViewEncapsulation, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, SecurityContext, NgZone, ViewChildren, afterNextRender, forwardRef, QueryList, ContentChildren, ContentChild, afterEveryRender, reflectComponentType, isDevMode, TemplateRef, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer } from '@angular/core';
2
+ import { Input, Component, Directive, NgModule, EventEmitter, HostBinding, Output, inject, Renderer2, ElementRef, Pipe, ViewContainerRef, HostListener, InjectionToken, Injectable, NO_ERRORS_SCHEMA, Injector, DestroyRef, ViewEncapsulation, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, NgZone, SecurityContext, ViewChildren, afterNextRender, forwardRef, QueryList, ContentChildren, ContentChild, afterEveryRender, reflectComponentType, isDevMode, TemplateRef, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, NgClass, NgTemplateOutlet, AsyncPipe, NgFor, NgIf } from '@angular/common';
5
- import { BehaviorSubject, of, Subject, pairwise, ReplaySubject, fromEvent, combineLatest, concat, map as map$1, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, Subscription, throwError, startWith as startWith$1, filter as filter$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, finalize as finalize$1, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
5
+ import { BehaviorSubject, of, Subject, pairwise, ReplaySubject, fromEvent, combineLatest, concat, map as map$1, merge, isObservable, timer, filter as filter$1, take as take$1, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, switchMap as switchMap$1, asyncScheduler, Subscription, throwError, startWith as startWith$1, debounceTime as debounceTime$1, firstValueFrom, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, finalize as finalize$1, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
6
6
  import * as i1$1 from '@angular/forms';
7
7
  import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, UntypedFormArray, UntypedFormGroup, ControlContainer, FormControlDirective, AbstractControl, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule, NgForm, FormGroupDirective, FormArray, FormGroup, FormBuilder } from '@angular/forms';
8
8
  import { map, filter, startWith, take, debounceTime, distinctUntilChanged, switchMap, concatMap, skip, throttleTime, catchError, tap, takeUntil, auditTime, withLatestFrom, first, finalize, observeOn, pairwise as pairwise$1, mergeMap } from 'rxjs/operators';
@@ -6224,6 +6224,301 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
6224
6224
  type: Input
6225
6225
  }] } });
6226
6226
 
6227
+ const isConfirmedNonIOS = () => /Windows|Android/.test(navigator.userAgent) ||
6228
+ (!/iPad|iPhone|iPod/.test(navigator.userAgent) && !navigator.maxTouchPoints);
6229
+
6230
+ class QdLocaleService {
6231
+ _serviceNavLanguage$ = new BehaviorSubject(null);
6232
+ locale$ = this._serviceNavLanguage$.pipe(map(serviceNavLanguage => determineLocale(serviceNavLanguage, navigator.languages, !isConfirmedNonIOS())));
6233
+ setServiceNavigationLanguage(language) {
6234
+ this._serviceNavLanguage$.next(language);
6235
+ }
6236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6237
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, providedIn: 'root' });
6238
+ }
6239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, decorators: [{
6240
+ type: Injectable,
6241
+ args: [{ providedIn: 'root' }]
6242
+ }] });
6243
+
6244
+ /**
6245
+ * Converts a point in time of a `QdTimeSpan` to a timestamp in milliseconds.
6246
+ *
6247
+ * Returns `null` when the value is missing or cannot be parsed, e.g. `'21.10.2026 10:00'`.
6248
+ */
6249
+ function qdToTimestamp(value) {
6250
+ if (value === undefined || value === null)
6251
+ return null;
6252
+ const timestamp = new Date(value).getTime();
6253
+ return Number.isNaN(timestamp) ? null : timestamp;
6254
+ }
6255
+ /**
6256
+ * Returns the duration of a `QdTimeSpan` in milliseconds.
6257
+ *
6258
+ * Returns `0` when the time span is missing, a point in time is invalid or `endsAt` is not after `startsAt`.
6259
+ */
6260
+ function qdTimeSpanDuration(timeSpan) {
6261
+ const startsAt = qdToTimestamp(timeSpan?.startsAt);
6262
+ const endsAt = qdToTimestamp(timeSpan?.endsAt);
6263
+ if (startsAt === null || endsAt === null)
6264
+ return 0;
6265
+ return Math.max(0, endsAt - startsAt);
6266
+ }
6267
+ /**
6268
+ * Returns the time left until `endsAt` of a `QdTimeSpan` in milliseconds, at most the duration of the time span.
6269
+ *
6270
+ * Returns `0` when the time span has ended, is empty or is invalid.
6271
+ */
6272
+ function qdTimeSpanRemaining(timeSpan) {
6273
+ const endsAt = qdToTimestamp(timeSpan?.endsAt) ?? 0;
6274
+ return Math.min(qdTimeSpanDuration(timeSpan), Math.max(0, endsAt - Date.now()));
6275
+ }
6276
+ /**
6277
+ * Formats a number of seconds as a duration in the given locale, e.g. `04:05` (`'digital'`) or `4 min, 5 s` (`'short'`).
6278
+ * Hours are only shown when there are hours left.
6279
+ *
6280
+ * Uses `Intl.DurationFormat`. Where the browser does not support it yet, a simple fallback formats the duration.
6281
+ */
6282
+ function qdFormatDuration(totalSeconds, locale, format) {
6283
+ const wholeSeconds = Math.max(0, Math.floor(totalSeconds));
6284
+ const parts = {
6285
+ hours: Math.floor(wholeSeconds / 3600),
6286
+ minutes: Math.floor((wholeSeconds % 3600) / 60),
6287
+ seconds: wholeSeconds % 60
6288
+ };
6289
+ const DurationFormat = Intl.DurationFormat;
6290
+ if (DurationFormat) {
6291
+ const options = { style: format, hoursDisplay: 'auto' };
6292
+ const formatter = new DurationFormat(locale, wholeSeconds === 0 ? { ...options, secondsDisplay: 'always' } : options);
6293
+ return formatter.format(parts);
6294
+ }
6295
+ return format === 'digital' ? formatDigitalFallback(parts) : formatShortFallback(parts, locale);
6296
+ }
6297
+ function formatDigitalFallback({ hours, minutes, seconds }) {
6298
+ const paddedMinutes = minutes.toString().padStart(2, '0');
6299
+ const paddedSeconds = seconds.toString().padStart(2, '0');
6300
+ return hours === 0 ? `${paddedMinutes}:${paddedSeconds}` : `${hours}:${paddedMinutes}:${paddedSeconds}`;
6301
+ }
6302
+ function formatShortFallback(parts, locale) {
6303
+ const hasNoTimeLeft = parts.hours === 0 && parts.minutes === 0 && parts.seconds === 0;
6304
+ const units = ['hours', 'minutes', 'seconds'].filter(unit => parts[unit] > 0 || (unit === 'seconds' && hasNoTimeLeft));
6305
+ const formattedUnits = units.map(unit => new Intl.NumberFormat(locale, { style: 'unit', unit: unit.slice(0, -1), unitDisplay: 'short' }).format(parts[unit]));
6306
+ return new Intl.ListFormat(locale, { type: 'unit', style: 'short' }).format(formattedUnits);
6307
+ }
6308
+
6309
+ /**
6310
+ * **QdTimerProgressBar** displays a countdown to a point in time, e.g. the end of a reaction time.
6311
+ *
6312
+ * The countdown runs until `timeSpan.endsAt`. The remaining time is `endsAt` minus the current time of the client, so
6313
+ * reloading the page does not restart the countdown. A time span that has already ended shows an empty bar and emits
6314
+ * `countdownExpired` right away. Before `timeSpan.startsAt` the bar stays full.
6315
+ * The remaining time is derived from the clock on every tick, so it is correct again on the next tick after the
6316
+ * browser has throttled the page. In a background tab the browser can delay the ticks by up to a minute, so the display
6317
+ * and `countdownExpired` can be late there. The bar empties continuously and shows the remaining time inside the bar.
6318
+ *
6319
+ * The remaining time is formatted with `Intl.DurationFormat` in the language of the application, which the service
6320
+ * navigation sets. `format` chooses between a digital clock (`04:05`) and abbreviated units (`4 min, 5 s`).
6321
+ *
6322
+ * The ticks run outside the Angular zone and only update the timer progress bar itself, so a running countdown does
6323
+ * not trigger change detection for the whole application every second. `countdownExpired` is emitted inside the
6324
+ * Angular zone and always asynchronously, so a host can update its template in response.
6325
+ *
6326
+ * This component is internal to the framework and not part of the public API.
6327
+ */
6328
+ class QdTimerProgressBarComponent {
6329
+ /**
6330
+ * The configuration of the timer progress bar, e.g. the `timeSpan` of the countdown.
6331
+ */
6332
+ config;
6333
+ /**
6334
+ * A static test ID for integration tests can be set. <br />
6335
+ * The value for the HTML attribute [data-test-id].
6336
+ */
6337
+ testId = 'timer-progress-bar';
6338
+ /**
6339
+ * Emits once when the countdown reaches 0.
6340
+ * Also emits once, right after the config is set, when the time span has already ended, is empty or is invalid.
6341
+ */
6342
+ countdownExpired = new EventEmitter();
6343
+ get dataTestId() {
6344
+ return this.testId;
6345
+ }
6346
+ get hostClasses() {
6347
+ return `qd-timer-progress-bar-${this.state}`;
6348
+ }
6349
+ state = 'critical';
6350
+ remainingSeconds = 0;
6351
+ percentage = 0;
6352
+ formattedTime = '';
6353
+ _changeDetectorRef = inject(ChangeDetectorRef);
6354
+ _destroyRef = inject(DestroyRef);
6355
+ _ngZone = inject(NgZone);
6356
+ _localeService = inject(QdLocaleService, { optional: true });
6357
+ _locale = navigator.language;
6358
+ _format = 'digital';
6359
+ _duration = 0;
6360
+ _remaining = 0;
6361
+ _countdown;
6362
+ ngOnInit() {
6363
+ this._localeService?.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
6364
+ this._locale = locale;
6365
+ this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
6366
+ this._changeDetectorRef.markForCheck();
6367
+ });
6368
+ }
6369
+ ngOnChanges(changes) {
6370
+ if (!changes['config'])
6371
+ return;
6372
+ this.state = this.config?.state ?? 'critical';
6373
+ this._format = this.config?.format ?? 'digital';
6374
+ this._duration = qdTimeSpanDuration(this.config?.timeSpan);
6375
+ this.updateData();
6376
+ this.startCountdown();
6377
+ }
6378
+ startCountdown() {
6379
+ this._countdown?.unsubscribe();
6380
+ if (this.remainingSeconds === 0) {
6381
+ this._countdown = timer(0)
6382
+ .pipe(takeUntilDestroyed(this._destroyRef))
6383
+ .subscribe(() => this.countdownExpired.emit());
6384
+ return;
6385
+ }
6386
+ this._countdown = this._ngZone.runOutsideAngular(() => timer(this._remaining % 1000 || 1000, 1000)
6387
+ .pipe(takeUntilDestroyed(this._destroyRef))
6388
+ .subscribe(() => this.tick()));
6389
+ }
6390
+ tick() {
6391
+ this.updateData();
6392
+ this._changeDetectorRef.detectChanges();
6393
+ if (this.remainingSeconds > 0)
6394
+ return;
6395
+ this._countdown?.unsubscribe();
6396
+ this._ngZone.run(() => this.countdownExpired.emit());
6397
+ }
6398
+ updateData() {
6399
+ this._remaining = qdTimeSpanRemaining(this.config?.timeSpan);
6400
+ this.remainingSeconds = Math.ceil(this._remaining / 1000);
6401
+ this.percentage = this._duration > 0 ? (this._remaining / this._duration) * 100 : 0;
6402
+ this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
6403
+ }
6404
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6405
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: QdTimerProgressBarComponent, isStandalone: false, selector: "qd-timer-progress-bar", inputs: { config: "config", testId: ["data-test-id", "testId"] }, outputs: { countdownExpired: "countdownExpired" }, host: { properties: { "attr.data-test-id": "this.dataTestId", "class": "this.hostClasses" } }, usesOnChanges: true, ngImport: i0, template: "<span class=\"qd-timer-progress-bar-container\" role=\"timer\" [attr.aria-label]=\"formattedTime\">\n <span\n class=\"qd-timer-progress-bar-progress\"\n [style.width.%]=\"percentage\"\n [attr.data-test-id]=\"testId + '-progress'\"\n ></span>\n <span class=\"qd-timer-progress-bar-value\" [attr.data-test-id]=\"testId + '-value'\">{{ formattedTime }}</span>\n</span>\n", styles: [":host{display:block}:host .qd-timer-progress-bar-container{position:relative;display:flex;overflow:hidden;width:100%;min-width:7rem;height:1.625rem;box-sizing:border-box;align-items:center;justify-content:center;padding:0 .5rem;border-radius:.8125rem}:host .qd-timer-progress-bar-progress{position:absolute;top:0;bottom:0;left:0;transition:width 1s linear}:host .qd-timer-progress-bar-value{position:relative;font-size:.8125rem;font-weight:400;white-space:nowrap}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{border:.0625rem solid rgb(117,117,117)}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-container{background:#6ebee6;color:#fff}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-progress{background:#069}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-container{background:#00813a80;color:#fff}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-progress{background:#00813a}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-container{background:#c7002380;color:#fff}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-progress{background:#c70023}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{background:#fff;color:#171717}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-progress{background:#e5e5e5}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6406
+ }
6407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, decorators: [{
6408
+ type: Component,
6409
+ args: [{ selector: 'qd-timer-progress-bar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<span class=\"qd-timer-progress-bar-container\" role=\"timer\" [attr.aria-label]=\"formattedTime\">\n <span\n class=\"qd-timer-progress-bar-progress\"\n [style.width.%]=\"percentage\"\n [attr.data-test-id]=\"testId + '-progress'\"\n ></span>\n <span class=\"qd-timer-progress-bar-value\" [attr.data-test-id]=\"testId + '-value'\">{{ formattedTime }}</span>\n</span>\n", styles: [":host{display:block}:host .qd-timer-progress-bar-container{position:relative;display:flex;overflow:hidden;width:100%;min-width:7rem;height:1.625rem;box-sizing:border-box;align-items:center;justify-content:center;padding:0 .5rem;border-radius:.8125rem}:host .qd-timer-progress-bar-progress{position:absolute;top:0;bottom:0;left:0;transition:width 1s linear}:host .qd-timer-progress-bar-value{position:relative;font-size:.8125rem;font-weight:400;white-space:nowrap}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{border:.0625rem solid rgb(117,117,117)}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-container{background:#6ebee6;color:#fff}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-progress{background:#069}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-container{background:#00813a80;color:#fff}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-progress{background:#00813a}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-container{background:#c7002380;color:#fff}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-progress{background:#c70023}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{background:#fff;color:#171717}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-progress{background:#e5e5e5}\n"] }]
6410
+ }], propDecorators: { config: [{
6411
+ type: Input
6412
+ }], testId: [{
6413
+ type: Input,
6414
+ args: ['data-test-id']
6415
+ }], countdownExpired: [{
6416
+ type: Output
6417
+ }], dataTestId: [{
6418
+ type: HostBinding,
6419
+ args: ['attr.data-test-id']
6420
+ }], hostClasses: [{
6421
+ type: HostBinding,
6422
+ args: ['class']
6423
+ }] } });
6424
+
6425
+ /**
6426
+ * @description Renders the time span of a row as a countdown.
6427
+ *
6428
+ * The value is a `QdTimeSpan` or `null`:
6429
+ *
6430
+ * * Before `startsAt`: `startsAt` is shown as date and time. When `startsAt` is reached, the timer progress bar
6431
+ * replaces it.
6432
+ * * From `startsAt` until `endsAt`: a timer progress bar counts down the remaining time until `endsAt`.
6433
+ * A page reload does not restart the countdown.
6434
+ * * From `endsAt`: the timer progress bar is hidden and `startsAt` is shown as date and time again.
6435
+ * * `endsAt` not after `startsAt` or not parsable: `startsAt` is shown as date and time.
6436
+ * * `null` or a `startsAt` that cannot be parsed: the cell stays empty.
6437
+ *
6438
+ * Date and time follow the language of the application. `state` and `format` from the options are passed to the
6439
+ * timer progress bar.
6440
+ */
6441
+ class QdDataFacetsTimerComponent {
6442
+ config;
6443
+ data;
6444
+ testId;
6445
+ timerConfig = null;
6446
+ startsAt = null;
6447
+ formattedStartsAt = '';
6448
+ _changeDetectorRef = inject(ChangeDetectorRef);
6449
+ _destroyRef = inject(DestroyRef);
6450
+ _localeService = inject(QdLocaleService);
6451
+ _ngZone = inject(NgZone);
6452
+ _locale = navigator.language;
6453
+ _startCountdown;
6454
+ ngOnInit() {
6455
+ this._localeService.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
6456
+ this._locale = locale;
6457
+ this.updateFormattedStartsAt();
6458
+ this._changeDetectorRef.markForCheck();
6459
+ });
6460
+ }
6461
+ ngOnChanges() {
6462
+ this.startsAt = qdToTimestamp(this.data?.startsAt);
6463
+ this.updateFormattedStartsAt();
6464
+ this._startCountdown?.unsubscribe();
6465
+ this.updateTimerConfig();
6466
+ }
6467
+ handleCountdownExpired() {
6468
+ this.timerConfig = null;
6469
+ this._changeDetectorRef.markForCheck();
6470
+ }
6471
+ updateTimerConfig() {
6472
+ const timeSpan = this.data;
6473
+ const remaining = qdTimeSpanRemaining(timeSpan);
6474
+ const untilStart = this.startsAt === null ? 0 : this.startsAt - Date.now();
6475
+ if (!timeSpan || remaining === 0) {
6476
+ this.timerConfig = null;
6477
+ return;
6478
+ }
6479
+ if (untilStart > 0) {
6480
+ this.timerConfig = null;
6481
+ this.waitForStart(untilStart);
6482
+ return;
6483
+ }
6484
+ this.timerConfig = { timeSpan, state: this.config?.state, format: this.config?.format };
6485
+ }
6486
+ /**
6487
+ * Shows the timer when `startsAt` is reached.
6488
+ *
6489
+ * The start is checked against the clock every second instead of one long timeout. A long timeout does not count the
6490
+ * time a computer sleeps, so the timer would show up late after a standby. The checks run outside the Angular zone,
6491
+ * so waiting cells do not trigger change detection.
6492
+ */
6493
+ waitForStart(untilStart) {
6494
+ const startsAt = this.startsAt;
6495
+ this._startCountdown = this._ngZone.runOutsideAngular(() => timer(untilStart % 1000 || 1000, 1000)
6496
+ .pipe(filter$1(() => Date.now() >= startsAt), take$1(1), takeUntilDestroyed(this._destroyRef))
6497
+ .subscribe(() => this._ngZone.run(() => {
6498
+ this.updateTimerConfig();
6499
+ this._changeDetectorRef.markForCheck();
6500
+ })));
6501
+ }
6502
+ updateFormattedStartsAt() {
6503
+ this.formattedStartsAt =
6504
+ this.startsAt === null
6505
+ ? ''
6506
+ : new Intl.DateTimeFormat(this._locale, { dateStyle: 'medium', timeStyle: 'short' }).format(this.startsAt);
6507
+ }
6508
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsTimerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6509
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdDataFacetsTimerComponent, isStandalone: false, selector: "qd-data-facets-timer", inputs: { config: "config", data: "data", testId: "testId" }, host: { properties: { "attr.data-test-id": "testId" }, classAttribute: "qd-data-facets" }, usesOnChanges: true, ngImport: i0, template: "@if (timerConfig) {\n<qd-timer-progress-bar\n [config]=\"timerConfig\"\n [data-test-id]=\"testId + '-timer'\"\n (countdownExpired)=\"handleCountdownExpired()\"\n></qd-timer-progress-bar>\n} @else if (startsAt !== null) {\n<span class=\"qd-data-facets-timer-start\" [attr.data-test-id]=\"testId + '-start'\">{{ formattedStartsAt }}</span>\n}\n", styles: [":host{display:flex}:host qd-timer-progress-bar{width:fit-content}\n"], dependencies: [{ kind: "component", type: QdTimerProgressBarComponent, selector: "qd-timer-progress-bar", inputs: ["config", "data-test-id"], outputs: ["countdownExpired"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6510
+ }
6511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsTimerComponent, decorators: [{
6512
+ type: Component,
6513
+ args: [{ selector: 'qd-data-facets-timer', host: { class: 'qd-data-facets', '[attr.data-test-id]': 'testId' }, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (timerConfig) {\n<qd-timer-progress-bar\n [config]=\"timerConfig\"\n [data-test-id]=\"testId + '-timer'\"\n (countdownExpired)=\"handleCountdownExpired()\"\n></qd-timer-progress-bar>\n} @else if (startsAt !== null) {\n<span class=\"qd-data-facets-timer-start\" [attr.data-test-id]=\"testId + '-start'\">{{ formattedStartsAt }}</span>\n}\n", styles: [":host{display:flex}:host qd-timer-progress-bar{width:fit-content}\n"] }]
6514
+ }], propDecorators: { config: [{
6515
+ type: Input
6516
+ }], data: [{
6517
+ type: Input
6518
+ }], testId: [{
6519
+ type: Input
6520
+ }] } });
6521
+
6227
6522
  class QdIconModule {
6228
6523
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6229
6524
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdIconModule, declarations: [QdIconComponent], imports: [CommonModule], exports: [QdIconComponent] });
@@ -6266,6 +6561,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
6266
6561
  }]
6267
6562
  }] });
6268
6563
 
6564
+ /**
6565
+ * Internal module of the timer progress bar. It is deliberately not part of the public API.
6566
+ * Consumers use the timer through a configuration, e.g. the page object header facet of type `timer`.
6567
+ */
6568
+ class QdTimerProgressBarModule {
6569
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6570
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, declarations: [QdTimerProgressBarComponent], exports: [QdTimerProgressBarComponent] });
6571
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule });
6572
+ }
6573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, decorators: [{
6574
+ type: NgModule,
6575
+ args: [{
6576
+ declarations: [QdTimerProgressBarComponent],
6577
+ exports: [QdTimerProgressBarComponent]
6578
+ }]
6579
+ }] });
6580
+
6269
6581
  /**
6270
6582
  * @description A constant map that associates each `QdDataFacetsType` with its corresponding component.
6271
6583
  *
@@ -6286,6 +6598,7 @@ const COMPONENT_MAP = {
6286
6598
  progress: QdDataFacetsProgressComponent,
6287
6599
  status: QdDataFacetsStatusComponent,
6288
6600
  text: QdDataFacetsTextComponent,
6601
+ timer: QdDataFacetsTimerComponent,
6289
6602
  enum: QdDataFacetsTextComponent
6290
6603
  };
6291
6604
 
@@ -6302,14 +6615,32 @@ class QdDataFacetsModule {
6302
6615
  QdDataFacetsProgressComponent,
6303
6616
  QdDataFacetsStatusComponent,
6304
6617
  QdDataFacetsTextComponent,
6618
+ QdDataFacetsTimerComponent,
6305
6619
  QdDataFacetsChipTruncatedTooltipComponent,
6306
- QdDataFacetsChipTruncatedIndicatorComponent], imports: [CommonModule, TranslateModule, QdIconModule, QdChipModule, QdStatusIndicatorModule] });
6307
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsModule, imports: [CommonModule, TranslateModule, QdIconModule, QdChipModule, QdStatusIndicatorModule] });
6620
+ QdDataFacetsChipTruncatedIndicatorComponent], imports: [CommonModule,
6621
+ TranslateModule,
6622
+ QdIconModule,
6623
+ QdChipModule,
6624
+ QdStatusIndicatorModule,
6625
+ QdTimerProgressBarModule] });
6626
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsModule, imports: [CommonModule,
6627
+ TranslateModule,
6628
+ QdIconModule,
6629
+ QdChipModule,
6630
+ QdStatusIndicatorModule,
6631
+ QdTimerProgressBarModule] });
6308
6632
  }
6309
6633
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsModule, decorators: [{
6310
6634
  type: NgModule,
6311
6635
  args: [{
6312
- imports: [CommonModule, TranslateModule, QdIconModule, QdChipModule, QdStatusIndicatorModule],
6636
+ imports: [
6637
+ CommonModule,
6638
+ TranslateModule,
6639
+ QdIconModule,
6640
+ QdChipModule,
6641
+ QdStatusIndicatorModule,
6642
+ QdTimerProgressBarModule
6643
+ ],
6313
6644
  declarations: [
6314
6645
  QdDataFacetsBlankComponent,
6315
6646
  QdDataFacetsBooleanComponent,
@@ -6322,6 +6653,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
6322
6653
  QdDataFacetsProgressComponent,
6323
6654
  QdDataFacetsStatusComponent,
6324
6655
  QdDataFacetsTextComponent,
6656
+ QdDataFacetsTimerComponent,
6325
6657
  QdDataFacetsChipTruncatedTooltipComponent,
6326
6658
  QdDataFacetsChipTruncatedIndicatorComponent
6327
6659
  ],
@@ -6981,23 +7313,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
6981
7313
  }]
6982
7314
  }] });
6983
7315
 
6984
- const isConfirmedNonIOS = () => /Windows|Android/.test(navigator.userAgent) ||
6985
- (!/iPad|iPhone|iPod/.test(navigator.userAgent) && !navigator.maxTouchPoints);
6986
-
6987
- class QdLocaleService {
6988
- _serviceNavLanguage$ = new BehaviorSubject(null);
6989
- locale$ = this._serviceNavLanguage$.pipe(map(serviceNavLanguage => determineLocale(serviceNavLanguage, navigator.languages, !isConfirmedNonIOS())));
6990
- setServiceNavigationLanguage(language) {
6991
- this._serviceNavLanguage$.next(language);
6992
- }
6993
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6994
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, providedIn: 'root' });
6995
- }
6996
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, decorators: [{
6997
- type: Injectable,
6998
- args: [{ providedIn: 'root' }]
6999
- }] });
7000
-
7001
7316
  class QdNumberInputService {
7002
7317
  _locale;
7003
7318
  _decimalSeparator;
@@ -23454,6 +23769,9 @@ class QdFilterItemSelectCategoryComponent {
23454
23769
  get isRadioGroup() {
23455
23770
  return this.type === 'singleSelect';
23456
23771
  }
23772
+ get isOpenListboxWithoutItemFilter() {
23773
+ return this.open && !this.isRadioGroup && !this.filter;
23774
+ }
23457
23775
  createKeyManager() {
23458
23776
  const manager = this.isRadioGroup
23459
23777
  ? new FocusKeyManager(this.options)
@@ -23479,6 +23797,8 @@ class QdFilterItemSelectCategoryComponent {
23479
23797
  this.publishOptions();
23480
23798
  if (this.isRadioGroup)
23481
23799
  this.ensureTabStop();
23800
+ if (this.isOpenListboxWithoutItemFilter)
23801
+ queueMicrotask(() => this.ensureActiveOptionIfOpen());
23482
23802
  }
23483
23803
  unregisterOption(option) {
23484
23804
  const index = this.registeredOptions.indexOf(option);
@@ -23517,14 +23837,19 @@ class QdFilterItemSelectCategoryComponent {
23517
23837
  onLayerOpened() {
23518
23838
  this.open = true;
23519
23839
  this.freezeDropdownOrder();
23520
- this.activateOptionIfListboxFocused();
23840
+ this.activateInitialOption();
23521
23841
  this.updateListboxAriaState();
23522
23842
  }
23523
- activateOptionIfListboxFocused() {
23524
- if (!this.isRadioGroup || !this.options.length)
23843
+ activateInitialOption() {
23844
+ if (!this.options.length)
23525
23845
  return;
23526
- this.keyManager?.updateActiveItem(this.initialActiveOption());
23527
- this.moveTabStopToActiveOption();
23846
+ if (this.isRadioGroup) {
23847
+ this.keyManager?.updateActiveItem(this.initialActiveOption());
23848
+ this.moveTabStopToActiveOption();
23849
+ return;
23850
+ }
23851
+ if (!this.filter)
23852
+ this.ensureActiveOption();
23528
23853
  }
23529
23854
  onLayerClosed() {
23530
23855
  this.open = false;
@@ -23587,6 +23912,10 @@ class QdFilterItemSelectCategoryComponent {
23587
23912
  this.keyManager.setActiveItem(this.initialActiveOption());
23588
23913
  this.updateListboxAriaState();
23589
23914
  }
23915
+ ensureActiveOptionIfOpen() {
23916
+ if (this.isOpenListboxWithoutItemFilter)
23917
+ this.ensureActiveOption();
23918
+ }
23590
23919
  initialActiveOption() {
23591
23920
  return this.options.find(option => !!option.active) ?? this.options.first;
23592
23921
  }
@@ -25679,204 +26008,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
25679
26008
  }]
25680
26009
  }] });
25681
26010
 
25682
- /**
25683
- * Converts a point in time of a `QdTimeSpan` to a timestamp in milliseconds.
25684
- *
25685
- * Returns `null` when the value is missing or cannot be parsed, e.g. `'21.10.2026 10:00'`.
25686
- */
25687
- function qdToTimestamp(value) {
25688
- if (value === undefined || value === null)
25689
- return null;
25690
- const timestamp = new Date(value).getTime();
25691
- return Number.isNaN(timestamp) ? null : timestamp;
25692
- }
25693
- /**
25694
- * Returns the duration of a `QdTimeSpan` in milliseconds.
25695
- *
25696
- * Returns `0` when the time span is missing, a point in time is invalid or `endsAt` is not after `startsAt`.
25697
- */
25698
- function qdTimeSpanDuration(timeSpan) {
25699
- const startsAt = qdToTimestamp(timeSpan?.startsAt);
25700
- const endsAt = qdToTimestamp(timeSpan?.endsAt);
25701
- if (startsAt === null || endsAt === null)
25702
- return 0;
25703
- return Math.max(0, endsAt - startsAt);
25704
- }
25705
- /**
25706
- * Returns the time left until `endsAt` of a `QdTimeSpan` in milliseconds, at most the duration of the time span.
25707
- *
25708
- * Returns `0` when the time span has ended, is empty or is invalid.
25709
- */
25710
- function qdTimeSpanRemaining(timeSpan) {
25711
- const endsAt = qdToTimestamp(timeSpan?.endsAt) ?? 0;
25712
- return Math.min(qdTimeSpanDuration(timeSpan), Math.max(0, endsAt - Date.now()));
25713
- }
25714
- /**
25715
- * Formats a number of seconds as a duration in the given locale, e.g. `04:05` (`'digital'`) or `4 min, 5 s` (`'short'`).
25716
- * Hours are only shown when there are hours left.
25717
- *
25718
- * Uses `Intl.DurationFormat`. Where the browser does not support it yet, a simple fallback formats the duration.
25719
- */
25720
- function qdFormatDuration(totalSeconds, locale, format) {
25721
- const wholeSeconds = Math.max(0, Math.floor(totalSeconds));
25722
- const parts = {
25723
- hours: Math.floor(wholeSeconds / 3600),
25724
- minutes: Math.floor((wholeSeconds % 3600) / 60),
25725
- seconds: wholeSeconds % 60
25726
- };
25727
- const DurationFormat = Intl.DurationFormat;
25728
- if (DurationFormat) {
25729
- const options = { style: format, hoursDisplay: 'auto' };
25730
- const formatter = new DurationFormat(locale, wholeSeconds === 0 ? { ...options, secondsDisplay: 'always' } : options);
25731
- return formatter.format(parts);
25732
- }
25733
- return format === 'digital' ? formatDigitalFallback(parts) : formatShortFallback(parts, locale);
25734
- }
25735
- function formatDigitalFallback({ hours, minutes, seconds }) {
25736
- const paddedMinutes = minutes.toString().padStart(2, '0');
25737
- const paddedSeconds = seconds.toString().padStart(2, '0');
25738
- return hours === 0 ? `${paddedMinutes}:${paddedSeconds}` : `${hours}:${paddedMinutes}:${paddedSeconds}`;
25739
- }
25740
- function formatShortFallback(parts, locale) {
25741
- const hasNoTimeLeft = parts.hours === 0 && parts.minutes === 0 && parts.seconds === 0;
25742
- const units = ['hours', 'minutes', 'seconds'].filter(unit => parts[unit] > 0 || (unit === 'seconds' && hasNoTimeLeft));
25743
- const formattedUnits = units.map(unit => new Intl.NumberFormat(locale, { style: 'unit', unit: unit.slice(0, -1), unitDisplay: 'short' }).format(parts[unit]));
25744
- return new Intl.ListFormat(locale, { type: 'unit', style: 'short' }).format(formattedUnits);
25745
- }
25746
-
25747
- /**
25748
- * **QdTimerProgressBar** displays a countdown to a point in time, e.g. the end of a reaction time.
25749
- *
25750
- * The countdown runs until `timeSpan.endsAt`. The remaining time is `endsAt` minus the current time of the client, so
25751
- * reloading the page does not restart the countdown. A time span that has already ended shows an empty bar and emits
25752
- * `countdownExpired` right away. Before `timeSpan.startsAt` the bar stays full.
25753
- * The remaining time is derived from the clock on every tick, so it is correct again on the next tick after the
25754
- * browser has throttled the page. In a background tab the browser can delay the ticks by up to a minute, so the display
25755
- * and `countdownExpired` can be late there. The bar empties continuously and shows the remaining time inside the bar.
25756
- *
25757
- * The remaining time is formatted with `Intl.DurationFormat` in the language of the application, which the service
25758
- * navigation sets. `format` chooses between a digital clock (`04:05`) and abbreviated units (`4 min, 5 s`).
25759
- *
25760
- * The ticks run outside the Angular zone and only update the timer progress bar itself, so a running countdown does
25761
- * not trigger change detection for the whole application every second. `countdownExpired` is emitted inside the
25762
- * Angular zone and always asynchronously, so a host can update its template in response.
25763
- *
25764
- * This component is internal to the framework and not part of the public API.
25765
- */
25766
- class QdTimerProgressBarComponent {
25767
- /**
25768
- * The configuration of the timer progress bar, e.g. the `timeSpan` of the countdown.
25769
- */
25770
- config;
25771
- /**
25772
- * A static test ID for integration tests can be set. <br />
25773
- * The value for the HTML attribute [data-test-id].
25774
- */
25775
- testId = 'timer-progress-bar';
25776
- /**
25777
- * Emits once when the countdown reaches 0.
25778
- * Also emits once, right after the config is set, when the time span has already ended, is empty or is invalid.
25779
- */
25780
- countdownExpired = new EventEmitter();
25781
- get dataTestId() {
25782
- return this.testId;
25783
- }
25784
- get hostClasses() {
25785
- return `qd-timer-progress-bar-${this.state}`;
25786
- }
25787
- state = 'critical';
25788
- remainingSeconds = 0;
25789
- percentage = 0;
25790
- formattedTime = '';
25791
- _changeDetectorRef = inject(ChangeDetectorRef);
25792
- _destroyRef = inject(DestroyRef);
25793
- _ngZone = inject(NgZone);
25794
- _localeService = inject(QdLocaleService, { optional: true });
25795
- _locale = navigator.language;
25796
- _format = 'digital';
25797
- _duration = 0;
25798
- _remaining = 0;
25799
- _countdown;
25800
- ngOnInit() {
25801
- this._localeService?.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
25802
- this._locale = locale;
25803
- this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
25804
- this._changeDetectorRef.markForCheck();
25805
- });
25806
- }
25807
- ngOnChanges(changes) {
25808
- if (!changes['config'])
25809
- return;
25810
- this.state = this.config?.state ?? 'critical';
25811
- this._format = this.config?.format ?? 'digital';
25812
- this._duration = qdTimeSpanDuration(this.config?.timeSpan);
25813
- this.updateData();
25814
- this.startCountdown();
25815
- }
25816
- startCountdown() {
25817
- this._countdown?.unsubscribe();
25818
- if (this.remainingSeconds === 0) {
25819
- this._countdown = timer(0)
25820
- .pipe(takeUntilDestroyed(this._destroyRef))
25821
- .subscribe(() => this.countdownExpired.emit());
25822
- return;
25823
- }
25824
- this._countdown = this._ngZone.runOutsideAngular(() => timer(this._remaining % 1000 || 1000, 1000)
25825
- .pipe(takeUntilDestroyed(this._destroyRef))
25826
- .subscribe(() => this.tick()));
25827
- }
25828
- tick() {
25829
- this.updateData();
25830
- this._changeDetectorRef.detectChanges();
25831
- if (this.remainingSeconds > 0)
25832
- return;
25833
- this._countdown?.unsubscribe();
25834
- this._ngZone.run(() => this.countdownExpired.emit());
25835
- }
25836
- updateData() {
25837
- this._remaining = qdTimeSpanRemaining(this.config?.timeSpan);
25838
- this.remainingSeconds = Math.ceil(this._remaining / 1000);
25839
- this.percentage = this._duration > 0 ? (this._remaining / this._duration) * 100 : 0;
25840
- this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
25841
- }
25842
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25843
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: QdTimerProgressBarComponent, isStandalone: false, selector: "qd-timer-progress-bar", inputs: { config: "config", testId: ["data-test-id", "testId"] }, outputs: { countdownExpired: "countdownExpired" }, host: { properties: { "attr.data-test-id": "this.dataTestId", "class": "this.hostClasses" } }, usesOnChanges: true, ngImport: i0, template: "<span class=\"qd-timer-progress-bar-container\" role=\"timer\" [attr.aria-label]=\"formattedTime\">\n <span\n class=\"qd-timer-progress-bar-progress\"\n [style.width.%]=\"percentage\"\n [attr.data-test-id]=\"testId + '-progress'\"\n ></span>\n <span class=\"qd-timer-progress-bar-value\" [attr.data-test-id]=\"testId + '-value'\">{{ formattedTime }}</span>\n</span>\n", styles: [":host{display:block}:host .qd-timer-progress-bar-container{position:relative;display:flex;overflow:hidden;width:100%;min-width:7rem;height:1.625rem;box-sizing:border-box;align-items:center;justify-content:center;padding:0 .5rem;border-radius:.8125rem}:host .qd-timer-progress-bar-progress{position:absolute;top:0;bottom:0;left:0;transition:width 1s linear}:host .qd-timer-progress-bar-value{position:relative;font-size:.8125rem;font-weight:400;white-space:nowrap}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{border:.0625rem solid rgb(117,117,117)}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-container{background:#6ebee6;color:#fff}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-progress{background:#069}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-container{background:#00813a80;color:#fff}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-progress{background:#00813a}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-container{background:#c7002380;color:#fff}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-progress{background:#c70023}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{background:#fff;color:#171717}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-progress{background:#e5e5e5}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25844
- }
25845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, decorators: [{
25846
- type: Component,
25847
- args: [{ selector: 'qd-timer-progress-bar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<span class=\"qd-timer-progress-bar-container\" role=\"timer\" [attr.aria-label]=\"formattedTime\">\n <span\n class=\"qd-timer-progress-bar-progress\"\n [style.width.%]=\"percentage\"\n [attr.data-test-id]=\"testId + '-progress'\"\n ></span>\n <span class=\"qd-timer-progress-bar-value\" [attr.data-test-id]=\"testId + '-value'\">{{ formattedTime }}</span>\n</span>\n", styles: [":host{display:block}:host .qd-timer-progress-bar-container{position:relative;display:flex;overflow:hidden;width:100%;min-width:7rem;height:1.625rem;box-sizing:border-box;align-items:center;justify-content:center;padding:0 .5rem;border-radius:.8125rem}:host .qd-timer-progress-bar-progress{position:absolute;top:0;bottom:0;left:0;transition:width 1s linear}:host .qd-timer-progress-bar-value{position:relative;font-size:.8125rem;font-weight:400;white-space:nowrap}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{border:.0625rem solid rgb(117,117,117)}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-container{background:#6ebee6;color:#fff}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-progress{background:#069}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-container{background:#00813a80;color:#fff}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-progress{background:#00813a}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-container{background:#c7002380;color:#fff}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-progress{background:#c70023}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{background:#fff;color:#171717}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-progress{background:#e5e5e5}\n"] }]
25848
- }], propDecorators: { config: [{
25849
- type: Input
25850
- }], testId: [{
25851
- type: Input,
25852
- args: ['data-test-id']
25853
- }], countdownExpired: [{
25854
- type: Output
25855
- }], dataTestId: [{
25856
- type: HostBinding,
25857
- args: ['attr.data-test-id']
25858
- }], hostClasses: [{
25859
- type: HostBinding,
25860
- args: ['class']
25861
- }] } });
25862
-
25863
- /**
25864
- * Internal module of the timer progress bar. It is deliberately not part of the public API.
25865
- * Consumers use the timer through a configuration, e.g. the page object header facet of type `timer`.
25866
- */
25867
- class QdTimerProgressBarModule {
25868
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
25869
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, declarations: [QdTimerProgressBarComponent], exports: [QdTimerProgressBarComponent] });
25870
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule });
25871
- }
25872
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, decorators: [{
25873
- type: NgModule,
25874
- args: [{
25875
- declarations: [QdTimerProgressBarComponent],
25876
- exports: [QdTimerProgressBarComponent]
25877
- }]
25878
- }] });
25879
-
25880
26011
  const updateStateWithNewSearch = (state, searchId, newSearch) => ({
25881
26012
  ...state,
25882
26013
  [searchId]: newSearch
@@ -28838,11 +28969,11 @@ class QdTableRowComponent {
28838
28969
  return this.config.columns.find(column => column.column === item)?.tooltip;
28839
28970
  }
28840
28971
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTableRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28841
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdTableRowComponent, isStandalone: false, selector: "[qd-table-row]", inputs: { config: "config", rowData: "rowData", rowIndex: "rowIndex", testId: ["data-test-id", "testId"] }, host: { properties: { "attr.data-test-id": "this.hostTestId" } }, providers: [QdDataFacetsContextService], ngImport: i0, template: "@if (config.selection) {\n<td\n qd-table-row-selection\n class=\"qd-table__body-cell--selection\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [data-test-id]=\"testId + '-cell-selection'\"\n></td>\n} @for (item of columnsDefinitions$ | async; track $index) { @if (hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell--merged ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-merged'\">\n @for (mergedColumn of item; track $index; let first = $first) {\n <div>\n <ng-container *ngTemplateOutlet=\"headings; context: { item: mergedColumn, translations, first }\"></ng-container>\n <span class=\"qd-table__body-cell\">\n <ng-container\n *ngComponentOutlet=\"getComponentType(mergedColumn); inputs: getComponentInputs(mergedColumn)\"\n ></ng-container>\n </span>\n </div>\n }\n</td>\n} @if (!hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-' + item\">\n <ng-container *ngComponentOutlet=\"getComponentType(item); inputs: getComponentInputs(item)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n qd-table-row-actions-secondary-menu\n class=\"qd-table__body-cell--actions-secondary-actions-menu\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [actions]=\"config.secondaryActions\"\n [i18ns]=\"config.i18ns\"\n [testId]=\"testId + '-secondary-actions'\"\n [viewonly]=\"config.viewonly\"\n [trackRowBy]=\"config.trackRowBy\"\n [attr.data-test-id]=\"testId + '-cell-secondary-actions'\"\n></td>\n}\n\n<ng-template #headings let-item=\"item\" let-translations=\"translations\" let-first=\"first\">\n @if (!first && findColumnType(item) !== 'blank') {\n <span class=\"qd-table__body-cell--merged-headings\">\n {{ translations ? (getI18n(item) | translate) : capitalize(item) }}\n <qd-tooltip-icon [tooltip]=\"getTooltip(item)\"></qd-tooltip-icon>\n </span>\n }\n</ng-template>\n", styles: ["[qd-table-row] .qd-table__body-cell--actions-secondary-actions-menu{vertical-align:top}[qd-table-row] .qd-data-facets{display:block}[qd-table-row] qd-data-facets-progress.qd-data-facets{transform:translateY(.1875rem)}[qd-table-row] qd-data-facets-chip.qd-data-facets{display:contents}[qd-table-row] .qd-table__body-cell qd-data-facets-text.qd-data-facets{margin:.625rem 0}[qd-table-row] .qd-table__body-cell--merged qd-data-facets-text.qd-data-facets{margin:0;line-height:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdTooltipIconComponent, selector: "qd-tooltip-icon", inputs: ["tooltip"] }, { kind: "component", type: QdTableRowActionsSecondaryMenuComponent, selector: "[qd-table-row-actions-secondary-menu]", inputs: ["rowIndex", "rowData", "actions", "i18ns", "testId", "viewonly", "trackRowBy"] }, { kind: "component", type: QdTableRowSelectionComponent, selector: "[qd-table-row-selection]", inputs: ["rowIndex", "rowData", "data-test-id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
28972
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdTableRowComponent, isStandalone: false, selector: "[qd-table-row]", inputs: { config: "config", rowData: "rowData", rowIndex: "rowIndex", testId: ["data-test-id", "testId"] }, host: { properties: { "attr.data-test-id": "this.hostTestId" } }, providers: [QdDataFacetsContextService], ngImport: i0, template: "@if (config.selection) {\n<td\n qd-table-row-selection\n class=\"qd-table__body-cell--selection\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [data-test-id]=\"testId + '-cell-selection'\"\n></td>\n} @for (item of columnsDefinitions$ | async; track $index) { @if (hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell--merged ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-merged'\">\n @for (mergedColumn of item; track $index; let first = $first) {\n <div>\n <ng-container *ngTemplateOutlet=\"headings; context: { item: mergedColumn, translations, first }\"></ng-container>\n <span class=\"qd-table__body-cell\">\n <ng-container\n *ngComponentOutlet=\"getComponentType(mergedColumn); inputs: getComponentInputs(mergedColumn)\"\n ></ng-container>\n </span>\n </div>\n }\n</td>\n} @if (!hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-' + item\">\n <ng-container *ngComponentOutlet=\"getComponentType(item); inputs: getComponentInputs(item)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n qd-table-row-actions-secondary-menu\n class=\"qd-table__body-cell--actions-secondary-actions-menu\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [actions]=\"config.secondaryActions\"\n [i18ns]=\"config.i18ns\"\n [testId]=\"testId + '-secondary-actions'\"\n [viewonly]=\"config.viewonly\"\n [trackRowBy]=\"config.trackRowBy\"\n [attr.data-test-id]=\"testId + '-cell-secondary-actions'\"\n></td>\n}\n\n<ng-template #headings let-item=\"item\" let-translations=\"translations\" let-first=\"first\">\n @if (!first && findColumnType(item) !== 'blank') {\n <span class=\"qd-table__body-cell--merged-headings\">\n {{ translations ? (getI18n(item) | translate) : capitalize(item) }}\n <qd-tooltip-icon [tooltip]=\"getTooltip(item)\"></qd-tooltip-icon>\n </span>\n }\n</ng-template>\n", styles: ["[qd-table-row] .qd-table__body-cell--actions-secondary-actions-menu{vertical-align:top}[qd-table-row] .qd-data-facets{display:block}[qd-table-row] qd-data-facets-progress.qd-data-facets{transform:translateY(.1875rem)}[qd-table-row] qd-data-facets-timer.qd-data-facets{display:flex;min-height:1lh;align-items:center}[qd-table-row] qd-data-facets-chip.qd-data-facets{display:contents}[qd-table-row] .qd-table__body-cell qd-data-facets-text.qd-data-facets{margin:.625rem 0}[qd-table-row] .qd-table__body-cell--merged qd-data-facets-text.qd-data-facets{margin:0;line-height:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdTooltipIconComponent, selector: "qd-tooltip-icon", inputs: ["tooltip"] }, { kind: "component", type: QdTableRowActionsSecondaryMenuComponent, selector: "[qd-table-row-actions-secondary-menu]", inputs: ["rowIndex", "rowData", "actions", "i18ns", "testId", "viewonly", "trackRowBy"] }, { kind: "component", type: QdTableRowSelectionComponent, selector: "[qd-table-row-selection]", inputs: ["rowIndex", "rowData", "data-test-id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
28842
28973
  }
28843
28974
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTableRowComponent, decorators: [{
28844
28975
  type: Component,
28845
- args: [{ selector: '[qd-table-row]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [QdDataFacetsContextService], standalone: false, template: "@if (config.selection) {\n<td\n qd-table-row-selection\n class=\"qd-table__body-cell--selection\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [data-test-id]=\"testId + '-cell-selection'\"\n></td>\n} @for (item of columnsDefinitions$ | async; track $index) { @if (hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell--merged ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-merged'\">\n @for (mergedColumn of item; track $index; let first = $first) {\n <div>\n <ng-container *ngTemplateOutlet=\"headings; context: { item: mergedColumn, translations, first }\"></ng-container>\n <span class=\"qd-table__body-cell\">\n <ng-container\n *ngComponentOutlet=\"getComponentType(mergedColumn); inputs: getComponentInputs(mergedColumn)\"\n ></ng-container>\n </span>\n </div>\n }\n</td>\n} @if (!hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-' + item\">\n <ng-container *ngComponentOutlet=\"getComponentType(item); inputs: getComponentInputs(item)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n qd-table-row-actions-secondary-menu\n class=\"qd-table__body-cell--actions-secondary-actions-menu\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [actions]=\"config.secondaryActions\"\n [i18ns]=\"config.i18ns\"\n [testId]=\"testId + '-secondary-actions'\"\n [viewonly]=\"config.viewonly\"\n [trackRowBy]=\"config.trackRowBy\"\n [attr.data-test-id]=\"testId + '-cell-secondary-actions'\"\n></td>\n}\n\n<ng-template #headings let-item=\"item\" let-translations=\"translations\" let-first=\"first\">\n @if (!first && findColumnType(item) !== 'blank') {\n <span class=\"qd-table__body-cell--merged-headings\">\n {{ translations ? (getI18n(item) | translate) : capitalize(item) }}\n <qd-tooltip-icon [tooltip]=\"getTooltip(item)\"></qd-tooltip-icon>\n </span>\n }\n</ng-template>\n", styles: ["[qd-table-row] .qd-table__body-cell--actions-secondary-actions-menu{vertical-align:top}[qd-table-row] .qd-data-facets{display:block}[qd-table-row] qd-data-facets-progress.qd-data-facets{transform:translateY(.1875rem)}[qd-table-row] qd-data-facets-chip.qd-data-facets{display:contents}[qd-table-row] .qd-table__body-cell qd-data-facets-text.qd-data-facets{margin:.625rem 0}[qd-table-row] .qd-table__body-cell--merged qd-data-facets-text.qd-data-facets{margin:0;line-height:inherit}\n"] }]
28976
+ args: [{ selector: '[qd-table-row]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [QdDataFacetsContextService], standalone: false, template: "@if (config.selection) {\n<td\n qd-table-row-selection\n class=\"qd-table__body-cell--selection\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [data-test-id]=\"testId + '-cell-selection'\"\n></td>\n} @for (item of columnsDefinitions$ | async; track $index) { @if (hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell--merged ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-merged'\">\n @for (mergedColumn of item; track $index; let first = $first) {\n <div>\n <ng-container *ngTemplateOutlet=\"headings; context: { item: mergedColumn, translations, first }\"></ng-container>\n <span class=\"qd-table__body-cell\">\n <ng-container\n *ngComponentOutlet=\"getComponentType(mergedColumn); inputs: getComponentInputs(mergedColumn)\"\n ></ng-container>\n </span>\n </div>\n }\n</td>\n} @if (!hasMergedColumns(item)) {\n<td [class]=\"'qd-table__body-cell ' + getCellClass(item)\" [attr.data-test-id]=\"testId + '-cell-' + item\">\n <ng-container *ngComponentOutlet=\"getComponentType(item); inputs: getComponentInputs(item)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n qd-table-row-actions-secondary-menu\n class=\"qd-table__body-cell--actions-secondary-actions-menu\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [actions]=\"config.secondaryActions\"\n [i18ns]=\"config.i18ns\"\n [testId]=\"testId + '-secondary-actions'\"\n [viewonly]=\"config.viewonly\"\n [trackRowBy]=\"config.trackRowBy\"\n [attr.data-test-id]=\"testId + '-cell-secondary-actions'\"\n></td>\n}\n\n<ng-template #headings let-item=\"item\" let-translations=\"translations\" let-first=\"first\">\n @if (!first && findColumnType(item) !== 'blank') {\n <span class=\"qd-table__body-cell--merged-headings\">\n {{ translations ? (getI18n(item) | translate) : capitalize(item) }}\n <qd-tooltip-icon [tooltip]=\"getTooltip(item)\"></qd-tooltip-icon>\n </span>\n }\n</ng-template>\n", styles: ["[qd-table-row] .qd-table__body-cell--actions-secondary-actions-menu{vertical-align:top}[qd-table-row] .qd-data-facets{display:block}[qd-table-row] qd-data-facets-progress.qd-data-facets{transform:translateY(.1875rem)}[qd-table-row] qd-data-facets-timer.qd-data-facets{display:flex;min-height:1lh;align-items:center}[qd-table-row] qd-data-facets-chip.qd-data-facets{display:contents}[qd-table-row] .qd-table__body-cell qd-data-facets-text.qd-data-facets{margin:.625rem 0}[qd-table-row] .qd-table__body-cell--merged qd-data-facets-text.qd-data-facets{margin:0;line-height:inherit}\n"] }]
28846
28977
  }], propDecorators: { config: [{
28847
28978
  type: Input
28848
28979
  }], rowData: [{