@quadrel-enterprise-ui/framework 21.20.2 → 21.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -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,
|
|
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,
|
|
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';
|
|
@@ -2553,7 +2553,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2553
2553
|
}]
|
|
2554
2554
|
}] });
|
|
2555
2555
|
|
|
2556
|
-
// @ts-strict-ignore
|
|
2557
2556
|
class QdMockNavigationTileComponent {
|
|
2558
2557
|
title;
|
|
2559
2558
|
icon;
|
|
@@ -2599,7 +2598,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2599
2598
|
}]
|
|
2600
2599
|
}] });
|
|
2601
2600
|
|
|
2602
|
-
// @ts-strict-ignore
|
|
2603
2601
|
class QdMockNotificationComponent {
|
|
2604
2602
|
state = 'critical';
|
|
2605
2603
|
notification;
|
|
@@ -2656,7 +2654,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2656
2654
|
type: Input
|
|
2657
2655
|
}] } });
|
|
2658
2656
|
|
|
2659
|
-
// @ts-strict-ignore
|
|
2660
2657
|
class QdMockNotificationsService {
|
|
2661
2658
|
getNotificationsForContext(context) {
|
|
2662
2659
|
return { context };
|
|
@@ -2747,7 +2744,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2747
2744
|
}]
|
|
2748
2745
|
}], ctorParameters: () => [] });
|
|
2749
2746
|
|
|
2750
|
-
// @ts-strict-ignore
|
|
2751
2747
|
class QdDesktopNotificationsService {
|
|
2752
2748
|
injector = inject(Injector);
|
|
2753
2749
|
_destroyRef = inject(DestroyRef);
|
|
@@ -2853,7 +2849,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2853
2849
|
}]
|
|
2854
2850
|
}] });
|
|
2855
2851
|
|
|
2856
|
-
// @ts-strict-ignore
|
|
2857
2852
|
class QdNotificationsService {
|
|
2858
2853
|
snackbarService = inject(QdSnackbarService);
|
|
2859
2854
|
osNotificationsService = inject(QdOsNotificationsService);
|
|
@@ -2983,7 +2978,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2983
2978
|
}]
|
|
2984
2979
|
}] });
|
|
2985
2980
|
|
|
2986
|
-
// @ts-strict-ignore
|
|
2987
2981
|
class QdMockPageComponent {
|
|
2988
2982
|
config;
|
|
2989
2983
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3054,7 +3048,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3054
3048
|
}]
|
|
3055
3049
|
}] });
|
|
3056
3050
|
|
|
3057
|
-
// @ts-strict-ignore
|
|
3058
3051
|
class QdMockPercentageProgressBarComponent {
|
|
3059
3052
|
percentage;
|
|
3060
3053
|
testId = 'percentage-progress-bar';
|
|
@@ -3094,7 +3087,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3094
3087
|
}]
|
|
3095
3088
|
}] });
|
|
3096
3089
|
|
|
3097
|
-
// @ts-strict-ignore
|
|
3098
3090
|
class QdMockSearchComponent {
|
|
3099
3091
|
configData;
|
|
3100
3092
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3125,7 +3117,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3125
3117
|
}]
|
|
3126
3118
|
}] });
|
|
3127
3119
|
|
|
3128
|
-
// @ts-strict-ignore
|
|
3129
3120
|
class QdMockSectionComponent {
|
|
3130
3121
|
config;
|
|
3131
3122
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3142,7 +3133,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3142
3133
|
type: Input
|
|
3143
3134
|
}] } });
|
|
3144
3135
|
|
|
3145
|
-
// @ts-strict-ignore
|
|
3146
3136
|
class QdMockSectionToolbarComponent {
|
|
3147
3137
|
config;
|
|
3148
3138
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockSectionToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3173,7 +3163,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3173
3163
|
}]
|
|
3174
3164
|
}] });
|
|
3175
3165
|
|
|
3176
|
-
// @ts-strict-ignore
|
|
3177
3166
|
class QdMockShellComponent {
|
|
3178
3167
|
config;
|
|
3179
3168
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3203,7 +3192,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3203
3192
|
}]
|
|
3204
3193
|
}] });
|
|
3205
3194
|
|
|
3206
|
-
// @ts-strict-ignore
|
|
3207
3195
|
class QdMockShellHeaderComponent {
|
|
3208
3196
|
config;
|
|
3209
3197
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockShellHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3259,7 +3247,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3259
3247
|
}]
|
|
3260
3248
|
}] });
|
|
3261
3249
|
|
|
3262
|
-
// @ts-strict-ignore
|
|
3263
3250
|
class QdMockShellToolbarItemComponent {
|
|
3264
3251
|
item;
|
|
3265
3252
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockShellToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3419,7 +3406,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3419
3406
|
}]
|
|
3420
3407
|
}] });
|
|
3421
3408
|
|
|
3422
|
-
// @ts-strict-ignore
|
|
3423
3409
|
class QdMockTableBodyComponent {
|
|
3424
3410
|
data;
|
|
3425
3411
|
config;
|
|
@@ -3444,7 +3430,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3444
3430
|
args: ['data-test-id']
|
|
3445
3431
|
}] } });
|
|
3446
3432
|
|
|
3447
|
-
// @ts-strict-ignore
|
|
3448
3433
|
class QdMockTableBodyTreeComponent {
|
|
3449
3434
|
config;
|
|
3450
3435
|
data;
|
|
@@ -3469,7 +3454,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3469
3454
|
args: ['data-test-id']
|
|
3470
3455
|
}] } });
|
|
3471
3456
|
|
|
3472
|
-
// @ts-strict-ignore
|
|
3473
3457
|
class QdMockTableComponent {
|
|
3474
3458
|
config;
|
|
3475
3459
|
data;
|
|
@@ -3514,7 +3498,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3514
3498
|
}]
|
|
3515
3499
|
}] });
|
|
3516
3500
|
|
|
3517
|
-
// @ts-strict-ignore
|
|
3518
3501
|
class QdMockTableDataBooleanComponent {
|
|
3519
3502
|
cellData;
|
|
3520
3503
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockTableDataBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3532,7 +3515,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3532
3515
|
type: Input
|
|
3533
3516
|
}] } });
|
|
3534
3517
|
|
|
3535
|
-
// @ts-strict-ignore
|
|
3536
3518
|
class QdMockTableDataDateComponent {
|
|
3537
3519
|
columnOptions;
|
|
3538
3520
|
cellData;
|
|
@@ -3553,7 +3535,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3553
3535
|
type: Input
|
|
3554
3536
|
}] } });
|
|
3555
3537
|
|
|
3556
|
-
// @ts-strict-ignore
|
|
3557
3538
|
class QdMockTableDataIntegerComponent {
|
|
3558
3539
|
cellData;
|
|
3559
3540
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockTableDataIntegerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3571,7 +3552,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3571
3552
|
type: Input
|
|
3572
3553
|
}] } });
|
|
3573
3554
|
|
|
3574
|
-
// @ts-strict-ignore
|
|
3575
3555
|
class QdMockTableDataLinkComponent {
|
|
3576
3556
|
cellData;
|
|
3577
3557
|
rowIndex;
|
|
@@ -3598,7 +3578,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3598
3578
|
type: Input
|
|
3599
3579
|
}] } });
|
|
3600
3580
|
|
|
3601
|
-
// @ts-strict-ignore
|
|
3602
3581
|
class QdMockTableDataProgressComponent {
|
|
3603
3582
|
cellData;
|
|
3604
3583
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockTableDataProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3616,7 +3595,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3616
3595
|
type: Input
|
|
3617
3596
|
}] } });
|
|
3618
3597
|
|
|
3619
|
-
// @ts-strict-ignore
|
|
3620
3598
|
class QdMockTableDataTextComponent {
|
|
3621
3599
|
columnOptions;
|
|
3622
3600
|
cellData;
|
|
@@ -3667,7 +3645,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3667
3645
|
args: ['data-test-id']
|
|
3668
3646
|
}] } });
|
|
3669
3647
|
|
|
3670
|
-
// @ts-strict-ignore
|
|
3671
3648
|
class QdMockTableHeadComponent {
|
|
3672
3649
|
config;
|
|
3673
3650
|
testId;
|
|
@@ -3689,7 +3666,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3689
3666
|
args: ['data-test-id']
|
|
3690
3667
|
}] } });
|
|
3691
3668
|
|
|
3692
|
-
// @ts-strict-ignore
|
|
3693
3669
|
class QdMockTablePaginatorComponent {
|
|
3694
3670
|
config;
|
|
3695
3671
|
testId;
|
|
@@ -3711,7 +3687,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3711
3687
|
args: ['data-test-id']
|
|
3712
3688
|
}] } });
|
|
3713
3689
|
|
|
3714
|
-
// @ts-strict-ignore
|
|
3715
3690
|
class QdMockTablePaginatorPageSizeDirective {
|
|
3716
3691
|
qdTablePaginatorPageSize;
|
|
3717
3692
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockTablePaginatorPageSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -3728,7 +3703,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3728
3703
|
type: Input
|
|
3729
3704
|
}] } });
|
|
3730
3705
|
|
|
3731
|
-
// @ts-strict-ignore
|
|
3732
3706
|
class QdMockTableSortComponent {
|
|
3733
3707
|
isSortable;
|
|
3734
3708
|
config;
|
|
@@ -3864,7 +3838,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3864
3838
|
}]
|
|
3865
3839
|
}] });
|
|
3866
3840
|
|
|
3867
|
-
// @ts-strict-ignore
|
|
3868
3841
|
class QdMockTileComponent {
|
|
3869
3842
|
name;
|
|
3870
3843
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3920,7 +3893,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3920
3893
|
}]
|
|
3921
3894
|
}] });
|
|
3922
3895
|
|
|
3923
|
-
// @ts-strict-ignore
|
|
3924
3896
|
class QdMockTilesContainerComponent {
|
|
3925
3897
|
name;
|
|
3926
3898
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMockTilesContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -6045,7 +6017,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6045
6017
|
type: Input
|
|
6046
6018
|
}] } });
|
|
6047
6019
|
|
|
6048
|
-
// @ts-strict-ignore
|
|
6049
6020
|
/**
|
|
6050
6021
|
* **QdStatusIndicatorItem** is an element of the**QdStatusIndicator** component.
|
|
6051
6022
|
*/
|
|
@@ -6065,13 +6036,13 @@ class QdStatusIndicatorItemComponent {
|
|
|
6065
6036
|
return this._state;
|
|
6066
6037
|
}
|
|
6067
6038
|
get isPositive() {
|
|
6068
|
-
return this.active && this._state === 'positive';
|
|
6039
|
+
return !!this.active && this._state === 'positive';
|
|
6069
6040
|
}
|
|
6070
6041
|
get isWarning() {
|
|
6071
|
-
return this.active && this._state === 'warning';
|
|
6042
|
+
return !!this.active && this._state === 'warning';
|
|
6072
6043
|
}
|
|
6073
6044
|
get isCritical() {
|
|
6074
|
-
return this.active && this._state === 'critical';
|
|
6045
|
+
return !!this.active && this._state === 'critical';
|
|
6075
6046
|
}
|
|
6076
6047
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdStatusIndicatorItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6077
6048
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: QdStatusIndicatorItemComponent, isStandalone: false, selector: "qd-status-indicator-item", inputs: { active: "active", state: "state" }, host: { properties: { "class.qd-status-indicator__item--positive": "this.isPositive", "class.qd-status-indicator__item--warning": "this.isWarning", "class.qd-status-indicator__item--critical": "this.isCritical" }, classAttribute: "qd-status-indicator__item" }, ngImport: i0, template: '', isInline: true, styles: [".qd-status-indicator__item{display:block;width:.75rem;height:.75rem;border-radius:50%;margin-right:.25rem;background:#b4b4b4}.qd-status-indicator__item--positive,.qd-status-indicator__item--success{background:#00813a}.qd-status-indicator__item--warning{background:#ff9b00}.qd-status-indicator__item--critical{background:#c70023}.qd-status-indicator__item:last-child{margin:0}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
@@ -6106,13 +6077,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6106
6077
|
args: [{ selector: 'qd-status-indicator-caption', template: '<ng-content></ng-content>', host: { class: 'qd-status-indicator__caption' }, standalone: false, styles: [":host{display:block;margin-bottom:0;color:#757575;font-size:.875rem;margin-bottom:.375rem;line-height:1rem}\n"] }]
|
|
6107
6078
|
}] });
|
|
6108
6079
|
|
|
6109
|
-
// @ts-strict-ignore
|
|
6110
6080
|
/**
|
|
6111
6081
|
* With the **QdStatusIndicator** component you can combine a status with a progress indicator.
|
|
6112
6082
|
*/
|
|
6113
6083
|
class QdStatusIndicatorComponent {
|
|
6114
6084
|
indicatorCount = 5;
|
|
6115
|
-
items;
|
|
6085
|
+
items = [];
|
|
6116
6086
|
_state = 'positive';
|
|
6117
6087
|
/**
|
|
6118
6088
|
* State of the indicator.
|
|
@@ -6224,6 +6194,301 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6224
6194
|
type: Input
|
|
6225
6195
|
}] } });
|
|
6226
6196
|
|
|
6197
|
+
const isConfirmedNonIOS = () => /Windows|Android/.test(navigator.userAgent) ||
|
|
6198
|
+
(!/iPad|iPhone|iPod/.test(navigator.userAgent) && !navigator.maxTouchPoints);
|
|
6199
|
+
|
|
6200
|
+
class QdLocaleService {
|
|
6201
|
+
_serviceNavLanguage$ = new BehaviorSubject(null);
|
|
6202
|
+
locale$ = this._serviceNavLanguage$.pipe(map(serviceNavLanguage => determineLocale(serviceNavLanguage, navigator.languages, !isConfirmedNonIOS())));
|
|
6203
|
+
setServiceNavigationLanguage(language) {
|
|
6204
|
+
this._serviceNavLanguage$.next(language);
|
|
6205
|
+
}
|
|
6206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6207
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, providedIn: 'root' });
|
|
6208
|
+
}
|
|
6209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdLocaleService, decorators: [{
|
|
6210
|
+
type: Injectable,
|
|
6211
|
+
args: [{ providedIn: 'root' }]
|
|
6212
|
+
}] });
|
|
6213
|
+
|
|
6214
|
+
/**
|
|
6215
|
+
* Converts a point in time of a `QdTimeSpan` to a timestamp in milliseconds.
|
|
6216
|
+
*
|
|
6217
|
+
* Returns `null` when the value is missing or cannot be parsed, e.g. `'21.10.2026 10:00'`.
|
|
6218
|
+
*/
|
|
6219
|
+
function qdToTimestamp(value) {
|
|
6220
|
+
if (value === undefined || value === null)
|
|
6221
|
+
return null;
|
|
6222
|
+
const timestamp = new Date(value).getTime();
|
|
6223
|
+
return Number.isNaN(timestamp) ? null : timestamp;
|
|
6224
|
+
}
|
|
6225
|
+
/**
|
|
6226
|
+
* Returns the duration of a `QdTimeSpan` in milliseconds.
|
|
6227
|
+
*
|
|
6228
|
+
* Returns `0` when the time span is missing, a point in time is invalid or `endsAt` is not after `startsAt`.
|
|
6229
|
+
*/
|
|
6230
|
+
function qdTimeSpanDuration(timeSpan) {
|
|
6231
|
+
const startsAt = qdToTimestamp(timeSpan?.startsAt);
|
|
6232
|
+
const endsAt = qdToTimestamp(timeSpan?.endsAt);
|
|
6233
|
+
if (startsAt === null || endsAt === null)
|
|
6234
|
+
return 0;
|
|
6235
|
+
return Math.max(0, endsAt - startsAt);
|
|
6236
|
+
}
|
|
6237
|
+
/**
|
|
6238
|
+
* Returns the time left until `endsAt` of a `QdTimeSpan` in milliseconds, at most the duration of the time span.
|
|
6239
|
+
*
|
|
6240
|
+
* Returns `0` when the time span has ended, is empty or is invalid.
|
|
6241
|
+
*/
|
|
6242
|
+
function qdTimeSpanRemaining(timeSpan) {
|
|
6243
|
+
const endsAt = qdToTimestamp(timeSpan?.endsAt) ?? 0;
|
|
6244
|
+
return Math.min(qdTimeSpanDuration(timeSpan), Math.max(0, endsAt - Date.now()));
|
|
6245
|
+
}
|
|
6246
|
+
/**
|
|
6247
|
+
* Formats a number of seconds as a duration in the given locale, e.g. `04:05` (`'digital'`) or `4 min, 5 s` (`'short'`).
|
|
6248
|
+
* Hours are only shown when there are hours left.
|
|
6249
|
+
*
|
|
6250
|
+
* Uses `Intl.DurationFormat`. Where the browser does not support it yet, a simple fallback formats the duration.
|
|
6251
|
+
*/
|
|
6252
|
+
function qdFormatDuration(totalSeconds, locale, format) {
|
|
6253
|
+
const wholeSeconds = Math.max(0, Math.floor(totalSeconds));
|
|
6254
|
+
const parts = {
|
|
6255
|
+
hours: Math.floor(wholeSeconds / 3600),
|
|
6256
|
+
minutes: Math.floor((wholeSeconds % 3600) / 60),
|
|
6257
|
+
seconds: wholeSeconds % 60
|
|
6258
|
+
};
|
|
6259
|
+
const DurationFormat = Intl.DurationFormat;
|
|
6260
|
+
if (DurationFormat) {
|
|
6261
|
+
const options = { style: format, hoursDisplay: 'auto' };
|
|
6262
|
+
const formatter = new DurationFormat(locale, wholeSeconds === 0 ? { ...options, secondsDisplay: 'always' } : options);
|
|
6263
|
+
return formatter.format(parts);
|
|
6264
|
+
}
|
|
6265
|
+
return format === 'digital' ? formatDigitalFallback(parts) : formatShortFallback(parts, locale);
|
|
6266
|
+
}
|
|
6267
|
+
function formatDigitalFallback({ hours, minutes, seconds }) {
|
|
6268
|
+
const paddedMinutes = minutes.toString().padStart(2, '0');
|
|
6269
|
+
const paddedSeconds = seconds.toString().padStart(2, '0');
|
|
6270
|
+
return hours === 0 ? `${paddedMinutes}:${paddedSeconds}` : `${hours}:${paddedMinutes}:${paddedSeconds}`;
|
|
6271
|
+
}
|
|
6272
|
+
function formatShortFallback(parts, locale) {
|
|
6273
|
+
const hasNoTimeLeft = parts.hours === 0 && parts.minutes === 0 && parts.seconds === 0;
|
|
6274
|
+
const units = ['hours', 'minutes', 'seconds'].filter(unit => parts[unit] > 0 || (unit === 'seconds' && hasNoTimeLeft));
|
|
6275
|
+
const formattedUnits = units.map(unit => new Intl.NumberFormat(locale, { style: 'unit', unit: unit.slice(0, -1), unitDisplay: 'short' }).format(parts[unit]));
|
|
6276
|
+
return new Intl.ListFormat(locale, { type: 'unit', style: 'short' }).format(formattedUnits);
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6279
|
+
/**
|
|
6280
|
+
* **QdTimerProgressBar** displays a countdown to a point in time, e.g. the end of a reaction time.
|
|
6281
|
+
*
|
|
6282
|
+
* The countdown runs until `timeSpan.endsAt`. The remaining time is `endsAt` minus the current time of the client, so
|
|
6283
|
+
* reloading the page does not restart the countdown. A time span that has already ended shows an empty bar and emits
|
|
6284
|
+
* `countdownExpired` right away. Before `timeSpan.startsAt` the bar stays full.
|
|
6285
|
+
* The remaining time is derived from the clock on every tick, so it is correct again on the next tick after the
|
|
6286
|
+
* browser has throttled the page. In a background tab the browser can delay the ticks by up to a minute, so the display
|
|
6287
|
+
* and `countdownExpired` can be late there. The bar empties continuously and shows the remaining time inside the bar.
|
|
6288
|
+
*
|
|
6289
|
+
* The remaining time is formatted with `Intl.DurationFormat` in the language of the application, which the service
|
|
6290
|
+
* navigation sets. `format` chooses between a digital clock (`04:05`) and abbreviated units (`4 min, 5 s`).
|
|
6291
|
+
*
|
|
6292
|
+
* The ticks run outside the Angular zone and only update the timer progress bar itself, so a running countdown does
|
|
6293
|
+
* not trigger change detection for the whole application every second. `countdownExpired` is emitted inside the
|
|
6294
|
+
* Angular zone and always asynchronously, so a host can update its template in response.
|
|
6295
|
+
*
|
|
6296
|
+
* This component is internal to the framework and not part of the public API.
|
|
6297
|
+
*/
|
|
6298
|
+
class QdTimerProgressBarComponent {
|
|
6299
|
+
/**
|
|
6300
|
+
* The configuration of the timer progress bar, e.g. the `timeSpan` of the countdown.
|
|
6301
|
+
*/
|
|
6302
|
+
config;
|
|
6303
|
+
/**
|
|
6304
|
+
* A static test ID for integration tests can be set. <br />
|
|
6305
|
+
* The value for the HTML attribute [data-test-id].
|
|
6306
|
+
*/
|
|
6307
|
+
testId = 'timer-progress-bar';
|
|
6308
|
+
/**
|
|
6309
|
+
* Emits once when the countdown reaches 0.
|
|
6310
|
+
* Also emits once, right after the config is set, when the time span has already ended, is empty or is invalid.
|
|
6311
|
+
*/
|
|
6312
|
+
countdownExpired = new EventEmitter();
|
|
6313
|
+
get dataTestId() {
|
|
6314
|
+
return this.testId;
|
|
6315
|
+
}
|
|
6316
|
+
get hostClasses() {
|
|
6317
|
+
return `qd-timer-progress-bar-${this.state}`;
|
|
6318
|
+
}
|
|
6319
|
+
state = 'critical';
|
|
6320
|
+
remainingSeconds = 0;
|
|
6321
|
+
percentage = 0;
|
|
6322
|
+
formattedTime = '';
|
|
6323
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
6324
|
+
_destroyRef = inject(DestroyRef);
|
|
6325
|
+
_ngZone = inject(NgZone);
|
|
6326
|
+
_localeService = inject(QdLocaleService, { optional: true });
|
|
6327
|
+
_locale = navigator.language;
|
|
6328
|
+
_format = 'digital';
|
|
6329
|
+
_duration = 0;
|
|
6330
|
+
_remaining = 0;
|
|
6331
|
+
_countdown;
|
|
6332
|
+
ngOnInit() {
|
|
6333
|
+
this._localeService?.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
|
|
6334
|
+
this._locale = locale;
|
|
6335
|
+
this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
|
|
6336
|
+
this._changeDetectorRef.markForCheck();
|
|
6337
|
+
});
|
|
6338
|
+
}
|
|
6339
|
+
ngOnChanges(changes) {
|
|
6340
|
+
if (!changes['config'])
|
|
6341
|
+
return;
|
|
6342
|
+
this.state = this.config?.state ?? 'critical';
|
|
6343
|
+
this._format = this.config?.format ?? 'digital';
|
|
6344
|
+
this._duration = qdTimeSpanDuration(this.config?.timeSpan);
|
|
6345
|
+
this.updateData();
|
|
6346
|
+
this.startCountdown();
|
|
6347
|
+
}
|
|
6348
|
+
startCountdown() {
|
|
6349
|
+
this._countdown?.unsubscribe();
|
|
6350
|
+
if (this.remainingSeconds === 0) {
|
|
6351
|
+
this._countdown = timer(0)
|
|
6352
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
6353
|
+
.subscribe(() => this.countdownExpired.emit());
|
|
6354
|
+
return;
|
|
6355
|
+
}
|
|
6356
|
+
this._countdown = this._ngZone.runOutsideAngular(() => timer(this._remaining % 1000 || 1000, 1000)
|
|
6357
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
6358
|
+
.subscribe(() => this.tick()));
|
|
6359
|
+
}
|
|
6360
|
+
tick() {
|
|
6361
|
+
this.updateData();
|
|
6362
|
+
this._changeDetectorRef.detectChanges();
|
|
6363
|
+
if (this.remainingSeconds > 0)
|
|
6364
|
+
return;
|
|
6365
|
+
this._countdown?.unsubscribe();
|
|
6366
|
+
this._ngZone.run(() => this.countdownExpired.emit());
|
|
6367
|
+
}
|
|
6368
|
+
updateData() {
|
|
6369
|
+
this._remaining = qdTimeSpanRemaining(this.config?.timeSpan);
|
|
6370
|
+
this.remainingSeconds = Math.ceil(this._remaining / 1000);
|
|
6371
|
+
this.percentage = this._duration > 0 ? (this._remaining / this._duration) * 100 : 0;
|
|
6372
|
+
this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
|
|
6373
|
+
}
|
|
6374
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6375
|
+
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 });
|
|
6376
|
+
}
|
|
6377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, decorators: [{
|
|
6378
|
+
type: Component,
|
|
6379
|
+
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"] }]
|
|
6380
|
+
}], propDecorators: { config: [{
|
|
6381
|
+
type: Input
|
|
6382
|
+
}], testId: [{
|
|
6383
|
+
type: Input,
|
|
6384
|
+
args: ['data-test-id']
|
|
6385
|
+
}], countdownExpired: [{
|
|
6386
|
+
type: Output
|
|
6387
|
+
}], dataTestId: [{
|
|
6388
|
+
type: HostBinding,
|
|
6389
|
+
args: ['attr.data-test-id']
|
|
6390
|
+
}], hostClasses: [{
|
|
6391
|
+
type: HostBinding,
|
|
6392
|
+
args: ['class']
|
|
6393
|
+
}] } });
|
|
6394
|
+
|
|
6395
|
+
/**
|
|
6396
|
+
* @description Renders the time span of a row as a countdown.
|
|
6397
|
+
*
|
|
6398
|
+
* The value is a `QdTimeSpan` or `null`:
|
|
6399
|
+
*
|
|
6400
|
+
* * Before `startsAt`: `startsAt` is shown as date and time. When `startsAt` is reached, the timer progress bar
|
|
6401
|
+
* replaces it.
|
|
6402
|
+
* * From `startsAt` until `endsAt`: a timer progress bar counts down the remaining time until `endsAt`.
|
|
6403
|
+
* A page reload does not restart the countdown.
|
|
6404
|
+
* * From `endsAt`: the timer progress bar is hidden and `startsAt` is shown as date and time again.
|
|
6405
|
+
* * `endsAt` not after `startsAt` or not parsable: `startsAt` is shown as date and time.
|
|
6406
|
+
* * `null` or a `startsAt` that cannot be parsed: the cell stays empty.
|
|
6407
|
+
*
|
|
6408
|
+
* Date and time follow the language of the application. `state` and `format` from the options are passed to the
|
|
6409
|
+
* timer progress bar.
|
|
6410
|
+
*/
|
|
6411
|
+
class QdDataFacetsTimerComponent {
|
|
6412
|
+
config;
|
|
6413
|
+
data;
|
|
6414
|
+
testId;
|
|
6415
|
+
timerConfig = null;
|
|
6416
|
+
startsAt = null;
|
|
6417
|
+
formattedStartsAt = '';
|
|
6418
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
6419
|
+
_destroyRef = inject(DestroyRef);
|
|
6420
|
+
_localeService = inject(QdLocaleService);
|
|
6421
|
+
_ngZone = inject(NgZone);
|
|
6422
|
+
_locale = navigator.language;
|
|
6423
|
+
_startCountdown;
|
|
6424
|
+
ngOnInit() {
|
|
6425
|
+
this._localeService.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
|
|
6426
|
+
this._locale = locale;
|
|
6427
|
+
this.updateFormattedStartsAt();
|
|
6428
|
+
this._changeDetectorRef.markForCheck();
|
|
6429
|
+
});
|
|
6430
|
+
}
|
|
6431
|
+
ngOnChanges() {
|
|
6432
|
+
this.startsAt = qdToTimestamp(this.data?.startsAt);
|
|
6433
|
+
this.updateFormattedStartsAt();
|
|
6434
|
+
this._startCountdown?.unsubscribe();
|
|
6435
|
+
this.updateTimerConfig();
|
|
6436
|
+
}
|
|
6437
|
+
handleCountdownExpired() {
|
|
6438
|
+
this.timerConfig = null;
|
|
6439
|
+
this._changeDetectorRef.markForCheck();
|
|
6440
|
+
}
|
|
6441
|
+
updateTimerConfig() {
|
|
6442
|
+
const timeSpan = this.data;
|
|
6443
|
+
const remaining = qdTimeSpanRemaining(timeSpan);
|
|
6444
|
+
const untilStart = this.startsAt === null ? 0 : this.startsAt - Date.now();
|
|
6445
|
+
if (!timeSpan || remaining === 0) {
|
|
6446
|
+
this.timerConfig = null;
|
|
6447
|
+
return;
|
|
6448
|
+
}
|
|
6449
|
+
if (untilStart > 0) {
|
|
6450
|
+
this.timerConfig = null;
|
|
6451
|
+
this.waitForStart(untilStart);
|
|
6452
|
+
return;
|
|
6453
|
+
}
|
|
6454
|
+
this.timerConfig = { timeSpan, state: this.config?.state, format: this.config?.format };
|
|
6455
|
+
}
|
|
6456
|
+
/**
|
|
6457
|
+
* Shows the timer when `startsAt` is reached.
|
|
6458
|
+
*
|
|
6459
|
+
* The start is checked against the clock every second instead of one long timeout. A long timeout does not count the
|
|
6460
|
+
* time a computer sleeps, so the timer would show up late after a standby. The checks run outside the Angular zone,
|
|
6461
|
+
* so waiting cells do not trigger change detection.
|
|
6462
|
+
*/
|
|
6463
|
+
waitForStart(untilStart) {
|
|
6464
|
+
const startsAt = this.startsAt;
|
|
6465
|
+
this._startCountdown = this._ngZone.runOutsideAngular(() => timer(untilStart % 1000 || 1000, 1000)
|
|
6466
|
+
.pipe(filter$1(() => Date.now() >= startsAt), take$1(1), takeUntilDestroyed(this._destroyRef))
|
|
6467
|
+
.subscribe(() => this._ngZone.run(() => {
|
|
6468
|
+
this.updateTimerConfig();
|
|
6469
|
+
this._changeDetectorRef.markForCheck();
|
|
6470
|
+
})));
|
|
6471
|
+
}
|
|
6472
|
+
updateFormattedStartsAt() {
|
|
6473
|
+
this.formattedStartsAt =
|
|
6474
|
+
this.startsAt === null
|
|
6475
|
+
? ''
|
|
6476
|
+
: new Intl.DateTimeFormat(this._locale, { dateStyle: 'medium', timeStyle: 'short' }).format(this.startsAt);
|
|
6477
|
+
}
|
|
6478
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsTimerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6479
|
+
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 });
|
|
6480
|
+
}
|
|
6481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsTimerComponent, decorators: [{
|
|
6482
|
+
type: Component,
|
|
6483
|
+
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"] }]
|
|
6484
|
+
}], propDecorators: { config: [{
|
|
6485
|
+
type: Input
|
|
6486
|
+
}], data: [{
|
|
6487
|
+
type: Input
|
|
6488
|
+
}], testId: [{
|
|
6489
|
+
type: Input
|
|
6490
|
+
}] } });
|
|
6491
|
+
|
|
6227
6492
|
class QdIconModule {
|
|
6228
6493
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6229
6494
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdIconModule, declarations: [QdIconComponent], imports: [CommonModule], exports: [QdIconComponent] });
|
|
@@ -6266,6 +6531,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6266
6531
|
}]
|
|
6267
6532
|
}] });
|
|
6268
6533
|
|
|
6534
|
+
/**
|
|
6535
|
+
* Internal module of the timer progress bar. It is deliberately not part of the public API.
|
|
6536
|
+
* Consumers use the timer through a configuration, e.g. the page object header facet of type `timer`.
|
|
6537
|
+
*/
|
|
6538
|
+
class QdTimerProgressBarModule {
|
|
6539
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6540
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, declarations: [QdTimerProgressBarComponent], exports: [QdTimerProgressBarComponent] });
|
|
6541
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule });
|
|
6542
|
+
}
|
|
6543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, decorators: [{
|
|
6544
|
+
type: NgModule,
|
|
6545
|
+
args: [{
|
|
6546
|
+
declarations: [QdTimerProgressBarComponent],
|
|
6547
|
+
exports: [QdTimerProgressBarComponent]
|
|
6548
|
+
}]
|
|
6549
|
+
}] });
|
|
6550
|
+
|
|
6269
6551
|
/**
|
|
6270
6552
|
* @description A constant map that associates each `QdDataFacetsType` with its corresponding component.
|
|
6271
6553
|
*
|
|
@@ -6286,6 +6568,7 @@ const COMPONENT_MAP = {
|
|
|
6286
6568
|
progress: QdDataFacetsProgressComponent,
|
|
6287
6569
|
status: QdDataFacetsStatusComponent,
|
|
6288
6570
|
text: QdDataFacetsTextComponent,
|
|
6571
|
+
timer: QdDataFacetsTimerComponent,
|
|
6289
6572
|
enum: QdDataFacetsTextComponent
|
|
6290
6573
|
};
|
|
6291
6574
|
|
|
@@ -6302,14 +6585,32 @@ class QdDataFacetsModule {
|
|
|
6302
6585
|
QdDataFacetsProgressComponent,
|
|
6303
6586
|
QdDataFacetsStatusComponent,
|
|
6304
6587
|
QdDataFacetsTextComponent,
|
|
6588
|
+
QdDataFacetsTimerComponent,
|
|
6305
6589
|
QdDataFacetsChipTruncatedTooltipComponent,
|
|
6306
|
-
QdDataFacetsChipTruncatedIndicatorComponent], imports: [CommonModule,
|
|
6307
|
-
|
|
6590
|
+
QdDataFacetsChipTruncatedIndicatorComponent], imports: [CommonModule,
|
|
6591
|
+
TranslateModule,
|
|
6592
|
+
QdIconModule,
|
|
6593
|
+
QdChipModule,
|
|
6594
|
+
QdStatusIndicatorModule,
|
|
6595
|
+
QdTimerProgressBarModule] });
|
|
6596
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsModule, imports: [CommonModule,
|
|
6597
|
+
TranslateModule,
|
|
6598
|
+
QdIconModule,
|
|
6599
|
+
QdChipModule,
|
|
6600
|
+
QdStatusIndicatorModule,
|
|
6601
|
+
QdTimerProgressBarModule] });
|
|
6308
6602
|
}
|
|
6309
6603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdDataFacetsModule, decorators: [{
|
|
6310
6604
|
type: NgModule,
|
|
6311
6605
|
args: [{
|
|
6312
|
-
imports: [
|
|
6606
|
+
imports: [
|
|
6607
|
+
CommonModule,
|
|
6608
|
+
TranslateModule,
|
|
6609
|
+
QdIconModule,
|
|
6610
|
+
QdChipModule,
|
|
6611
|
+
QdStatusIndicatorModule,
|
|
6612
|
+
QdTimerProgressBarModule
|
|
6613
|
+
],
|
|
6313
6614
|
declarations: [
|
|
6314
6615
|
QdDataFacetsBlankComponent,
|
|
6315
6616
|
QdDataFacetsBooleanComponent,
|
|
@@ -6322,6 +6623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6322
6623
|
QdDataFacetsProgressComponent,
|
|
6323
6624
|
QdDataFacetsStatusComponent,
|
|
6324
6625
|
QdDataFacetsTextComponent,
|
|
6626
|
+
QdDataFacetsTimerComponent,
|
|
6325
6627
|
QdDataFacetsChipTruncatedTooltipComponent,
|
|
6326
6628
|
QdDataFacetsChipTruncatedIndicatorComponent
|
|
6327
6629
|
],
|
|
@@ -6981,23 +7283,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6981
7283
|
}]
|
|
6982
7284
|
}] });
|
|
6983
7285
|
|
|
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
7286
|
class QdNumberInputService {
|
|
7002
7287
|
_locale;
|
|
7003
7288
|
_decimalSeparator;
|
|
@@ -17401,7 +17686,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
17401
17686
|
}]
|
|
17402
17687
|
}] });
|
|
17403
17688
|
|
|
17404
|
-
// @ts-strict-ignore
|
|
17405
17689
|
/**
|
|
17406
17690
|
* **QdNotification** displays a single notification item within a **QdNotifications** container.
|
|
17407
17691
|
*
|
|
@@ -17929,18 +18213,18 @@ class QdNotificationComponent {
|
|
|
17929
18213
|
this.notificationService.remove(this.notification.context, this.notification.uuid);
|
|
17930
18214
|
}
|
|
17931
18215
|
}
|
|
17932
|
-
handleLinkClick() {
|
|
17933
|
-
|
|
18216
|
+
handleLinkClick(link) {
|
|
18217
|
+
link.handler();
|
|
17934
18218
|
}
|
|
17935
18219
|
isNotificationInSnackbar() {
|
|
17936
18220
|
return !!this.element.nativeElement.closest('qd-snackbar');
|
|
17937
18221
|
}
|
|
17938
18222
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17939
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdNotificationComponent, isStandalone: false, selector: "qd-notification", inputs: { state: "state", notification: "notification" }, host: { properties: { "class": "this.typeClassName" }, classAttribute: "qd-notification" }, usesOnChanges: true, ngImport: i0, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick()\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"], dependencies: [{ kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
18223
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdNotificationComponent, isStandalone: false, selector: "qd-notification", inputs: { state: "state", notification: "notification" }, host: { properties: { "class": "this.typeClassName" }, classAttribute: "qd-notification" }, usesOnChanges: true, ngImport: i0, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick(notification.link)\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"], dependencies: [{ kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
17940
18224
|
}
|
|
17941
18225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdNotificationComponent, decorators: [{
|
|
17942
18226
|
type: Component,
|
|
17943
|
-
args: [{ selector: 'qd-notification', host: { class: 'qd-notification' }, standalone: false, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick()\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"] }]
|
|
18227
|
+
args: [{ selector: 'qd-notification', host: { class: 'qd-notification' }, standalone: false, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick(notification.link)\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"] }]
|
|
17944
18228
|
}], propDecorators: { state: [{
|
|
17945
18229
|
type: Input
|
|
17946
18230
|
}], notification: [{
|
|
@@ -17969,14 +18253,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
17969
18253
|
args: [{ selector: 'qd-notification-content', standalone: false, template: "<ng-content></ng-content>\n" }]
|
|
17970
18254
|
}] });
|
|
17971
18255
|
|
|
17972
|
-
// @ts-strict-ignore
|
|
17973
18256
|
/**
|
|
17974
18257
|
* **QdNotifications** creates a container for the single **QdNotification** items.
|
|
17975
18258
|
*/
|
|
17976
18259
|
class QdNotificationsComponent {
|
|
17977
18260
|
notificationService = inject(QdNotificationsService);
|
|
17978
18261
|
_destroyRef = inject(DestroyRef);
|
|
17979
|
-
notifications;
|
|
18262
|
+
notifications = [];
|
|
17980
18263
|
/**
|
|
17981
18264
|
* The context can be assigned to control the positioning of the notifications.
|
|
17982
18265
|
*/
|
|
@@ -18148,7 +18431,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
18148
18431
|
}]
|
|
18149
18432
|
}] });
|
|
18150
18433
|
|
|
18151
|
-
// @ts-strict-ignore
|
|
18152
18434
|
/**
|
|
18153
18435
|
* **QdNotificationsSnackbar** provides a container for **QdNotification** items in the form of a snackbar. <br />
|
|
18154
18436
|
* Positioned at the bottom of the view port.
|
|
@@ -25318,7 +25600,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
25318
25600
|
args: [{ selector: 'qd-navigation-tiles', encapsulation: ViewEncapsulation.None, standalone: false, template: "<ng-content select=\"[qd-navigation-tile]\"></ng-content>\n", styles: ["qd-navigation-tiles{display:grid;gap:1rem;grid-template-columns:repeat(2,minmax(0,1fr))}@media(min-width:600px){qd-navigation-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:960px){qd-navigation-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1280px){qd-navigation-tiles{display:flex;flex-wrap:wrap}qd-navigation-tiles>[qd-navigation-tile]{width:15rem;max-width:15rem;flex:1}}\n"] }]
|
|
25319
25601
|
}] });
|
|
25320
25602
|
|
|
25321
|
-
// @ts-strict-ignore
|
|
25322
25603
|
/**
|
|
25323
25604
|
* **QdNavigationTile** represents a single tile within **QdNavigationTile**.<br />
|
|
25324
25605
|
* It is possible to bind it to an `a` tag.
|
|
@@ -25633,7 +25914,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
25633
25914
|
args: [{ selector: 'qd-indeterminate-progress-bar', template: '', encapsulation: ViewEncapsulation.None, host: { class: 'qd-progress-line' }, standalone: false, styles: [".qd-progress-line,.qd-progress-line:before{width:100%;height:.1875rem;margin:0}.qd-progress-line{display:flex;background-color:#d5d5d5}.qd-progress-line:before{animation:running-progress 2s cubic-bezier(.4,0,.2,1) infinite;background-color:#069;content:\"\"}@keyframes running-progress{0%{margin-right:100%;margin-left:0}50%{margin-right:0;margin-left:25%}to{margin-right:0;margin-left:100%}}\n"] }]
|
|
25634
25915
|
}] });
|
|
25635
25916
|
|
|
25636
|
-
// @ts-strict-ignore
|
|
25637
25917
|
/**
|
|
25638
25918
|
* **QdPercentageProgressBar** creates a ProgressBar with percentages.
|
|
25639
25919
|
*/
|
|
@@ -25693,204 +25973,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
25693
25973
|
}]
|
|
25694
25974
|
}] });
|
|
25695
25975
|
|
|
25696
|
-
/**
|
|
25697
|
-
* Converts a point in time of a `QdTimeSpan` to a timestamp in milliseconds.
|
|
25698
|
-
*
|
|
25699
|
-
* Returns `null` when the value is missing or cannot be parsed, e.g. `'21.10.2026 10:00'`.
|
|
25700
|
-
*/
|
|
25701
|
-
function qdToTimestamp(value) {
|
|
25702
|
-
if (value === undefined || value === null)
|
|
25703
|
-
return null;
|
|
25704
|
-
const timestamp = new Date(value).getTime();
|
|
25705
|
-
return Number.isNaN(timestamp) ? null : timestamp;
|
|
25706
|
-
}
|
|
25707
|
-
/**
|
|
25708
|
-
* Returns the duration of a `QdTimeSpan` in milliseconds.
|
|
25709
|
-
*
|
|
25710
|
-
* Returns `0` when the time span is missing, a point in time is invalid or `endsAt` is not after `startsAt`.
|
|
25711
|
-
*/
|
|
25712
|
-
function qdTimeSpanDuration(timeSpan) {
|
|
25713
|
-
const startsAt = qdToTimestamp(timeSpan?.startsAt);
|
|
25714
|
-
const endsAt = qdToTimestamp(timeSpan?.endsAt);
|
|
25715
|
-
if (startsAt === null || endsAt === null)
|
|
25716
|
-
return 0;
|
|
25717
|
-
return Math.max(0, endsAt - startsAt);
|
|
25718
|
-
}
|
|
25719
|
-
/**
|
|
25720
|
-
* Returns the time left until `endsAt` of a `QdTimeSpan` in milliseconds, at most the duration of the time span.
|
|
25721
|
-
*
|
|
25722
|
-
* Returns `0` when the time span has ended, is empty or is invalid.
|
|
25723
|
-
*/
|
|
25724
|
-
function qdTimeSpanRemaining(timeSpan) {
|
|
25725
|
-
const endsAt = qdToTimestamp(timeSpan?.endsAt) ?? 0;
|
|
25726
|
-
return Math.min(qdTimeSpanDuration(timeSpan), Math.max(0, endsAt - Date.now()));
|
|
25727
|
-
}
|
|
25728
|
-
/**
|
|
25729
|
-
* Formats a number of seconds as a duration in the given locale, e.g. `04:05` (`'digital'`) or `4 min, 5 s` (`'short'`).
|
|
25730
|
-
* Hours are only shown when there are hours left.
|
|
25731
|
-
*
|
|
25732
|
-
* Uses `Intl.DurationFormat`. Where the browser does not support it yet, a simple fallback formats the duration.
|
|
25733
|
-
*/
|
|
25734
|
-
function qdFormatDuration(totalSeconds, locale, format) {
|
|
25735
|
-
const wholeSeconds = Math.max(0, Math.floor(totalSeconds));
|
|
25736
|
-
const parts = {
|
|
25737
|
-
hours: Math.floor(wholeSeconds / 3600),
|
|
25738
|
-
minutes: Math.floor((wholeSeconds % 3600) / 60),
|
|
25739
|
-
seconds: wholeSeconds % 60
|
|
25740
|
-
};
|
|
25741
|
-
const DurationFormat = Intl.DurationFormat;
|
|
25742
|
-
if (DurationFormat) {
|
|
25743
|
-
const options = { style: format, hoursDisplay: 'auto' };
|
|
25744
|
-
const formatter = new DurationFormat(locale, wholeSeconds === 0 ? { ...options, secondsDisplay: 'always' } : options);
|
|
25745
|
-
return formatter.format(parts);
|
|
25746
|
-
}
|
|
25747
|
-
return format === 'digital' ? formatDigitalFallback(parts) : formatShortFallback(parts, locale);
|
|
25748
|
-
}
|
|
25749
|
-
function formatDigitalFallback({ hours, minutes, seconds }) {
|
|
25750
|
-
const paddedMinutes = minutes.toString().padStart(2, '0');
|
|
25751
|
-
const paddedSeconds = seconds.toString().padStart(2, '0');
|
|
25752
|
-
return hours === 0 ? `${paddedMinutes}:${paddedSeconds}` : `${hours}:${paddedMinutes}:${paddedSeconds}`;
|
|
25753
|
-
}
|
|
25754
|
-
function formatShortFallback(parts, locale) {
|
|
25755
|
-
const hasNoTimeLeft = parts.hours === 0 && parts.minutes === 0 && parts.seconds === 0;
|
|
25756
|
-
const units = ['hours', 'minutes', 'seconds'].filter(unit => parts[unit] > 0 || (unit === 'seconds' && hasNoTimeLeft));
|
|
25757
|
-
const formattedUnits = units.map(unit => new Intl.NumberFormat(locale, { style: 'unit', unit: unit.slice(0, -1), unitDisplay: 'short' }).format(parts[unit]));
|
|
25758
|
-
return new Intl.ListFormat(locale, { type: 'unit', style: 'short' }).format(formattedUnits);
|
|
25759
|
-
}
|
|
25760
|
-
|
|
25761
|
-
/**
|
|
25762
|
-
* **QdTimerProgressBar** displays a countdown to a point in time, e.g. the end of a reaction time.
|
|
25763
|
-
*
|
|
25764
|
-
* The countdown runs until `timeSpan.endsAt`. The remaining time is `endsAt` minus the current time of the client, so
|
|
25765
|
-
* reloading the page does not restart the countdown. A time span that has already ended shows an empty bar and emits
|
|
25766
|
-
* `countdownExpired` right away. Before `timeSpan.startsAt` the bar stays full.
|
|
25767
|
-
* The remaining time is derived from the clock on every tick, so it is correct again on the next tick after the
|
|
25768
|
-
* browser has throttled the page. In a background tab the browser can delay the ticks by up to a minute, so the display
|
|
25769
|
-
* and `countdownExpired` can be late there. The bar empties continuously and shows the remaining time inside the bar.
|
|
25770
|
-
*
|
|
25771
|
-
* The remaining time is formatted with `Intl.DurationFormat` in the language of the application, which the service
|
|
25772
|
-
* navigation sets. `format` chooses between a digital clock (`04:05`) and abbreviated units (`4 min, 5 s`).
|
|
25773
|
-
*
|
|
25774
|
-
* The ticks run outside the Angular zone and only update the timer progress bar itself, so a running countdown does
|
|
25775
|
-
* not trigger change detection for the whole application every second. `countdownExpired` is emitted inside the
|
|
25776
|
-
* Angular zone and always asynchronously, so a host can update its template in response.
|
|
25777
|
-
*
|
|
25778
|
-
* This component is internal to the framework and not part of the public API.
|
|
25779
|
-
*/
|
|
25780
|
-
class QdTimerProgressBarComponent {
|
|
25781
|
-
/**
|
|
25782
|
-
* The configuration of the timer progress bar, e.g. the `timeSpan` of the countdown.
|
|
25783
|
-
*/
|
|
25784
|
-
config;
|
|
25785
|
-
/**
|
|
25786
|
-
* A static test ID for integration tests can be set. <br />
|
|
25787
|
-
* The value for the HTML attribute [data-test-id].
|
|
25788
|
-
*/
|
|
25789
|
-
testId = 'timer-progress-bar';
|
|
25790
|
-
/**
|
|
25791
|
-
* Emits once when the countdown reaches 0.
|
|
25792
|
-
* Also emits once, right after the config is set, when the time span has already ended, is empty or is invalid.
|
|
25793
|
-
*/
|
|
25794
|
-
countdownExpired = new EventEmitter();
|
|
25795
|
-
get dataTestId() {
|
|
25796
|
-
return this.testId;
|
|
25797
|
-
}
|
|
25798
|
-
get hostClasses() {
|
|
25799
|
-
return `qd-timer-progress-bar-${this.state}`;
|
|
25800
|
-
}
|
|
25801
|
-
state = 'critical';
|
|
25802
|
-
remainingSeconds = 0;
|
|
25803
|
-
percentage = 0;
|
|
25804
|
-
formattedTime = '';
|
|
25805
|
-
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
25806
|
-
_destroyRef = inject(DestroyRef);
|
|
25807
|
-
_ngZone = inject(NgZone);
|
|
25808
|
-
_localeService = inject(QdLocaleService, { optional: true });
|
|
25809
|
-
_locale = navigator.language;
|
|
25810
|
-
_format = 'digital';
|
|
25811
|
-
_duration = 0;
|
|
25812
|
-
_remaining = 0;
|
|
25813
|
-
_countdown;
|
|
25814
|
-
ngOnInit() {
|
|
25815
|
-
this._localeService?.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
|
|
25816
|
-
this._locale = locale;
|
|
25817
|
-
this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
|
|
25818
|
-
this._changeDetectorRef.markForCheck();
|
|
25819
|
-
});
|
|
25820
|
-
}
|
|
25821
|
-
ngOnChanges(changes) {
|
|
25822
|
-
if (!changes['config'])
|
|
25823
|
-
return;
|
|
25824
|
-
this.state = this.config?.state ?? 'critical';
|
|
25825
|
-
this._format = this.config?.format ?? 'digital';
|
|
25826
|
-
this._duration = qdTimeSpanDuration(this.config?.timeSpan);
|
|
25827
|
-
this.updateData();
|
|
25828
|
-
this.startCountdown();
|
|
25829
|
-
}
|
|
25830
|
-
startCountdown() {
|
|
25831
|
-
this._countdown?.unsubscribe();
|
|
25832
|
-
if (this.remainingSeconds === 0) {
|
|
25833
|
-
this._countdown = timer(0)
|
|
25834
|
-
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
25835
|
-
.subscribe(() => this.countdownExpired.emit());
|
|
25836
|
-
return;
|
|
25837
|
-
}
|
|
25838
|
-
this._countdown = this._ngZone.runOutsideAngular(() => timer(this._remaining % 1000 || 1000, 1000)
|
|
25839
|
-
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
25840
|
-
.subscribe(() => this.tick()));
|
|
25841
|
-
}
|
|
25842
|
-
tick() {
|
|
25843
|
-
this.updateData();
|
|
25844
|
-
this._changeDetectorRef.detectChanges();
|
|
25845
|
-
if (this.remainingSeconds > 0)
|
|
25846
|
-
return;
|
|
25847
|
-
this._countdown?.unsubscribe();
|
|
25848
|
-
this._ngZone.run(() => this.countdownExpired.emit());
|
|
25849
|
-
}
|
|
25850
|
-
updateData() {
|
|
25851
|
-
this._remaining = qdTimeSpanRemaining(this.config?.timeSpan);
|
|
25852
|
-
this.remainingSeconds = Math.ceil(this._remaining / 1000);
|
|
25853
|
-
this.percentage = this._duration > 0 ? (this._remaining / this._duration) * 100 : 0;
|
|
25854
|
-
this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
|
|
25855
|
-
}
|
|
25856
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25857
|
-
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 });
|
|
25858
|
-
}
|
|
25859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, decorators: [{
|
|
25860
|
-
type: Component,
|
|
25861
|
-
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"] }]
|
|
25862
|
-
}], propDecorators: { config: [{
|
|
25863
|
-
type: Input
|
|
25864
|
-
}], testId: [{
|
|
25865
|
-
type: Input,
|
|
25866
|
-
args: ['data-test-id']
|
|
25867
|
-
}], countdownExpired: [{
|
|
25868
|
-
type: Output
|
|
25869
|
-
}], dataTestId: [{
|
|
25870
|
-
type: HostBinding,
|
|
25871
|
-
args: ['attr.data-test-id']
|
|
25872
|
-
}], hostClasses: [{
|
|
25873
|
-
type: HostBinding,
|
|
25874
|
-
args: ['class']
|
|
25875
|
-
}] } });
|
|
25876
|
-
|
|
25877
|
-
/**
|
|
25878
|
-
* Internal module of the timer progress bar. It is deliberately not part of the public API.
|
|
25879
|
-
* Consumers use the timer through a configuration, e.g. the page object header facet of type `timer`.
|
|
25880
|
-
*/
|
|
25881
|
-
class QdTimerProgressBarModule {
|
|
25882
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
25883
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, declarations: [QdTimerProgressBarComponent], exports: [QdTimerProgressBarComponent] });
|
|
25884
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule });
|
|
25885
|
-
}
|
|
25886
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, decorators: [{
|
|
25887
|
-
type: NgModule,
|
|
25888
|
-
args: [{
|
|
25889
|
-
declarations: [QdTimerProgressBarComponent],
|
|
25890
|
-
exports: [QdTimerProgressBarComponent]
|
|
25891
|
-
}]
|
|
25892
|
-
}] });
|
|
25893
|
-
|
|
25894
25976
|
const updateStateWithNewSearch = (state, searchId, newSearch) => ({
|
|
25895
25977
|
...state,
|
|
25896
25978
|
[searchId]: newSearch
|
|
@@ -25919,7 +26001,6 @@ const QdSearchActions = {
|
|
|
25919
26001
|
updatePreSelect
|
|
25920
26002
|
};
|
|
25921
26003
|
|
|
25922
|
-
// @ts-strict-ignore
|
|
25923
26004
|
const initialState$1 = {};
|
|
25924
26005
|
const _searchReducer = createReducer(initialState$1, on(QdSearchActions.initSearchState, (state, { searchId, phrase, preSelect }) => updateStateWithNewSearch(state, searchId, { phrase, preSelect })), on(QdSearchActions.updatePhrase, (state, { searchId, phrase }) => updateStateWithNewPhrase(state, searchId, phrase)), on(QdSearchActions.updatePreSelect, (state, { searchId, preSelect }) => updateStateWithNewPreSelect(state, searchId, preSelect)));
|
|
25925
26006
|
function searchReducer(state, action) {
|
|
@@ -26035,14 +26116,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
26035
26116
|
type: Injectable
|
|
26036
26117
|
}], ctorParameters: () => [] });
|
|
26037
26118
|
|
|
26038
|
-
// @ts-strict-ignore
|
|
26039
26119
|
const selectFeature = (state) => state.qdSearch;
|
|
26040
26120
|
const selectSearchDataById = createSelector(selectFeature, (state, { searchId }) => state[searchId]);
|
|
26041
26121
|
const QdSearchSelector = {
|
|
26042
26122
|
selectSearchDataById
|
|
26043
26123
|
};
|
|
26044
26124
|
|
|
26045
|
-
// @ts-strict-ignore
|
|
26046
26125
|
class QdSearchStoreService {
|
|
26047
26126
|
store = inject(Store);
|
|
26048
26127
|
initSearchState(searchId, phrase, preSelect) {
|
|
@@ -26067,7 +26146,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
26067
26146
|
}]
|
|
26068
26147
|
}] });
|
|
26069
26148
|
|
|
26070
|
-
// @ts-strict-ignore
|
|
26071
26149
|
class QdSearchService {
|
|
26072
26150
|
search = '';
|
|
26073
26151
|
preSelect = '';
|
|
@@ -26100,12 +26178,12 @@ class QdSearchService {
|
|
|
26100
26178
|
static getDefaultOptions(searchOptions) {
|
|
26101
26179
|
const result = searchOptions;
|
|
26102
26180
|
if (searchOptions !== undefined && searchOptions.preSelect !== undefined) {
|
|
26103
|
-
|
|
26181
|
+
searchOptions.preSelect.disabled = !!searchOptions.preSelect.disabled || false;
|
|
26104
26182
|
}
|
|
26105
26183
|
if (searchOptions !== undefined &&
|
|
26106
26184
|
searchOptions.preSelect !== undefined &&
|
|
26107
26185
|
searchOptions.preSelect.globalSearch !== undefined) {
|
|
26108
|
-
|
|
26186
|
+
searchOptions.preSelect.globalSearch.disabled = !!searchOptions.preSelect.globalSearch.disabled;
|
|
26109
26187
|
}
|
|
26110
26188
|
return result;
|
|
26111
26189
|
}
|
|
@@ -27566,14 +27644,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
27566
27644
|
type: Injectable
|
|
27567
27645
|
}], ctorParameters: () => [] });
|
|
27568
27646
|
|
|
27569
|
-
// @ts-strict-ignore
|
|
27570
27647
|
class QdTableResponsiveRowService {
|
|
27571
27648
|
_config;
|
|
27572
27649
|
_breakpoints = breakpoints;
|
|
27573
27650
|
_currentBreakpoint = Object.keys(breakpoints)[0];
|
|
27574
27651
|
_defaultColumnMapping = { xs: 1, sm: 2, md: 4, lg: 6, xl: 8, xxl: 10 };
|
|
27575
27652
|
_headCellDefinitionsSubject = new ReplaySubject(1);
|
|
27576
|
-
_columnsDefinitions;
|
|
27653
|
+
_columnsDefinitions = [];
|
|
27577
27654
|
_columnsDefinitionsSubject = new ReplaySubject(1);
|
|
27578
27655
|
headCellDefinitions$ = this._headCellDefinitionsSubject.asObservable();
|
|
27579
27656
|
columnsDefinitions$ = this._columnsDefinitionsSubject.asObservable();
|
|
@@ -27592,17 +27669,18 @@ class QdTableResponsiveRowService {
|
|
|
27592
27669
|
return this._currentBreakpoint;
|
|
27593
27670
|
}
|
|
27594
27671
|
get mainColumn() {
|
|
27595
|
-
return this._config
|
|
27672
|
+
return this._config?.mainColumn || this._config?.columns[0]?.column;
|
|
27596
27673
|
}
|
|
27597
27674
|
get mainColumnIndex() {
|
|
27598
|
-
|
|
27675
|
+
const config = this._config;
|
|
27676
|
+
if (!config?.mainColumn)
|
|
27599
27677
|
return 0;
|
|
27600
|
-
return
|
|
27678
|
+
return config.columns.findIndex(column => column.column === config.mainColumn);
|
|
27601
27679
|
}
|
|
27602
27680
|
get columnMapping() {
|
|
27603
27681
|
return Object.keys(this._breakpoints).reduce((acc, cur) => ({
|
|
27604
27682
|
...acc,
|
|
27605
|
-
...{ [cur]: this._config
|
|
27683
|
+
...{ [cur]: this._config?.columnMapping?.[cur] || this._defaultColumnMapping[cur] }
|
|
27606
27684
|
}), {});
|
|
27607
27685
|
}
|
|
27608
27686
|
isMainColumn(column) {
|
|
@@ -27611,7 +27689,11 @@ class QdTableResponsiveRowService {
|
|
|
27611
27689
|
isLastColumn(column) {
|
|
27612
27690
|
const columnsDefinitions = this._columnsDefinitions;
|
|
27613
27691
|
const lastColumnDefinition = columnsDefinitions[columnsDefinitions.length - 1];
|
|
27614
|
-
|
|
27692
|
+
if (lastColumnDefinition === undefined)
|
|
27693
|
+
return false;
|
|
27694
|
+
if (qdIsDeepEqual(lastColumnDefinition, column))
|
|
27695
|
+
return true;
|
|
27696
|
+
return Array.isArray(lastColumnDefinition) && !Array.isArray(column) && lastColumnDefinition.includes(column);
|
|
27615
27697
|
}
|
|
27616
27698
|
updateDefinitions() {
|
|
27617
27699
|
this._headCellDefinitionsSubject.next(this.getHeadCellDefinitions());
|
|
@@ -27628,11 +27710,12 @@ class QdTableResponsiveRowService {
|
|
|
27628
27710
|
return [...Array(columnsLength - maxCurrentColumns).keys()].map(i => this.mainColumnIndex + i + 1);
|
|
27629
27711
|
}
|
|
27630
27712
|
getColumnsDefinitions() {
|
|
27631
|
-
|
|
27713
|
+
const config = this._config;
|
|
27714
|
+
if (!config || !this._currentBreakpoint)
|
|
27632
27715
|
return [];
|
|
27633
|
-
const columnsLength =
|
|
27716
|
+
const columnsLength = config.columns.length;
|
|
27634
27717
|
const maxCurrentColumns = this.columnMapping[this._currentBreakpoint];
|
|
27635
|
-
let columnsDefinitions =
|
|
27718
|
+
let columnsDefinitions = config.columns.map(column => column.column);
|
|
27636
27719
|
if (this.mainColumnIndex >= maxCurrentColumns) {
|
|
27637
27720
|
console.warn('Quadrel Framework | QdTable - The index of the "mainColumn" cannot be equal or greater than maximum columns for this breakpoint.');
|
|
27638
27721
|
return columnsDefinitions;
|
|
@@ -27643,22 +27726,19 @@ class QdTableResponsiveRowService {
|
|
|
27643
27726
|
const mergedColumns = [];
|
|
27644
27727
|
let alreadyMerged = false;
|
|
27645
27728
|
for (let i = 0; i <= columnsLength - maxCurrentColumns; i++) {
|
|
27646
|
-
mergedColumns.push(
|
|
27729
|
+
mergedColumns.push(config.columns[this.mainColumnIndex + i].column);
|
|
27647
27730
|
}
|
|
27648
27731
|
for (let i = 0; i < columnsLength; i++) {
|
|
27649
|
-
if (mergedColumns.includes(
|
|
27732
|
+
if (mergedColumns.includes(config.columns[i].column) && !alreadyMerged) {
|
|
27650
27733
|
columnsDefinitions.push(mergedColumns);
|
|
27651
27734
|
alreadyMerged = true;
|
|
27652
27735
|
}
|
|
27653
|
-
if (!mergedColumns.includes(
|
|
27654
|
-
columnsDefinitions.push(
|
|
27736
|
+
if (!mergedColumns.includes(config.columns[i].column)) {
|
|
27737
|
+
columnsDefinitions.push(config.columns[i].column);
|
|
27655
27738
|
}
|
|
27656
27739
|
}
|
|
27657
27740
|
return columnsDefinitions;
|
|
27658
27741
|
}
|
|
27659
|
-
getColumnByIndex(columnIndex) {
|
|
27660
|
-
return this._config.columns[columnIndex].column;
|
|
27661
|
-
}
|
|
27662
27742
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTableResponsiveRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27663
27743
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTableResponsiveRowService });
|
|
27664
27744
|
}
|
|
@@ -27666,7 +27746,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
27666
27746
|
type: Injectable
|
|
27667
27747
|
}] });
|
|
27668
27748
|
|
|
27669
|
-
// @ts-strict-ignore
|
|
27670
27749
|
class QdTableRowSelectionService {
|
|
27671
27750
|
tableStoreService = inject(QdTableStoreService);
|
|
27672
27751
|
_destroyRef = inject(DestroyRef);
|
|
@@ -27685,7 +27764,7 @@ class QdTableRowSelectionService {
|
|
|
27685
27764
|
return this.tableStoreService.tableId;
|
|
27686
27765
|
}
|
|
27687
27766
|
get selectionType() {
|
|
27688
|
-
return this._config.selection
|
|
27767
|
+
return this._config.selection?.type;
|
|
27689
27768
|
}
|
|
27690
27769
|
get selectedRows$() {
|
|
27691
27770
|
return combineLatest([this.tableStoreService.selectedRows$(), this.tableStoreService.selectedRowsData$()]).pipe(auditTime(0), skip(this._config.selection?.emitOutputInitially ? 0 : 1), map(([ids, cache]) => ids
|
|
@@ -27698,7 +27777,7 @@ class QdTableRowSelectionService {
|
|
|
27698
27777
|
setRowSelected(rowIndex, rowData) {
|
|
27699
27778
|
const identifier = resolveRowIdentifier(rowData, rowIndex, this._config.trackRowBy);
|
|
27700
27779
|
const selectedRow = { ...rowData };
|
|
27701
|
-
if (this._config.selection
|
|
27780
|
+
if (this._config.selection?.type === 'singleSelect') {
|
|
27702
27781
|
this.tableStoreService.selectSingleRow(identifier, selectedRow);
|
|
27703
27782
|
}
|
|
27704
27783
|
else {
|
|
@@ -28077,7 +28156,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
28077
28156
|
type: Input
|
|
28078
28157
|
}] } });
|
|
28079
28158
|
|
|
28080
|
-
// @ts-strict-ignore
|
|
28081
28159
|
class QdTablePaginatorPageSizeComponent {
|
|
28082
28160
|
elementRef = inject(ElementRef);
|
|
28083
28161
|
tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
|
|
@@ -28728,7 +28806,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
28728
28806
|
type: Input
|
|
28729
28807
|
}] } });
|
|
28730
28808
|
|
|
28731
|
-
// @ts-strict-ignore
|
|
28732
28809
|
class QdTableRowSelectionComponent {
|
|
28733
28810
|
rowSelectionService = inject(QdTableRowSelectionService);
|
|
28734
28811
|
rowIndex;
|
|
@@ -28852,11 +28929,11 @@ class QdTableRowComponent {
|
|
|
28852
28929
|
return this.config.columns.find(column => column.column === item)?.tooltip;
|
|
28853
28930
|
}
|
|
28854
28931
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTableRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28855
|
-
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 });
|
|
28932
|
+
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 });
|
|
28856
28933
|
}
|
|
28857
28934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTableRowComponent, decorators: [{
|
|
28858
28935
|
type: Component,
|
|
28859
|
-
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"] }]
|
|
28936
|
+
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"] }]
|
|
28860
28937
|
}], propDecorators: { config: [{
|
|
28861
28938
|
type: Input
|
|
28862
28939
|
}], rowData: [{
|
|
@@ -28942,7 +29019,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
28942
29019
|
args: ['data-test-id']
|
|
28943
29020
|
}] } });
|
|
28944
29021
|
|
|
28945
|
-
// @ts-strict-ignore
|
|
28946
29022
|
class QdTableEmptyStateComponent {
|
|
28947
29023
|
emptyStateService = inject(QdTableEmptyStateService);
|
|
28948
29024
|
config;
|
|
@@ -29101,7 +29177,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
29101
29177
|
args: ['data-test-id']
|
|
29102
29178
|
}] } });
|
|
29103
29179
|
|
|
29104
|
-
// @ts-strict-ignore
|
|
29105
29180
|
class QdTableHeadComponent {
|
|
29106
29181
|
responsiveRowService = inject(QdTableResponsiveRowService);
|
|
29107
29182
|
config;
|
|
@@ -29140,7 +29215,7 @@ class QdTableHeadComponent {
|
|
|
29140
29215
|
return this.config.columns.some(column => column.column === columnName && column.sort !== undefined && !column.sort?.isDisabled);
|
|
29141
29216
|
}
|
|
29142
29217
|
getSortConfig(columnName) {
|
|
29143
|
-
return this.config.columns.find(column => column.column === columnName)
|
|
29218
|
+
return this.config.columns.find(column => column.column === columnName)?.sort;
|
|
29144
29219
|
}
|
|
29145
29220
|
getTooltip(columnName) {
|
|
29146
29221
|
return this.config.columns.find(column => column.column === columnName)?.tooltip;
|
|
@@ -29859,7 +29934,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
29859
29934
|
type: Injectable
|
|
29860
29935
|
}] });
|
|
29861
29936
|
|
|
29862
|
-
// @ts-strict-ignore
|
|
29863
29937
|
/**
|
|
29864
29938
|
* Directive for establishing a connection between **QdTableComponent** and the existing **QdFilterComponent** within **QdSection**.
|
|
29865
29939
|
*
|
|
@@ -30046,7 +30120,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
30046
30120
|
}]
|
|
30047
30121
|
}], ctorParameters: () => [] });
|
|
30048
30122
|
|
|
30049
|
-
// @ts-strict-ignore
|
|
30050
30123
|
/**
|
|
30051
30124
|
* Directive for establishing a connection between **QdTableComponent** and the existing **QdSearchComponent** within **QdSection**.
|
|
30052
30125
|
*
|
|
@@ -30954,12 +31027,11 @@ class QdGroupedIndicesNotConsecutiveError extends Error {
|
|
|
30954
31027
|
}
|
|
30955
31028
|
}
|
|
30956
31029
|
|
|
30957
|
-
// @ts-strict-ignore
|
|
30958
31030
|
class QdTreeGroupService {
|
|
30959
31031
|
config;
|
|
30960
31032
|
columnsDetails = [];
|
|
30961
31033
|
groupColumn;
|
|
30962
|
-
ungroupedColumns;
|
|
31034
|
+
ungroupedColumns = [];
|
|
30963
31035
|
/**
|
|
30964
31036
|
* Groups columns that matches the given function and returns resulting columns with details.
|
|
30965
31037
|
*
|
|
@@ -30970,7 +31042,7 @@ class QdTreeGroupService {
|
|
|
30970
31042
|
initialize(config, isColumnGrouped) {
|
|
30971
31043
|
this.config = config;
|
|
30972
31044
|
this.columnsDetails = this.getColumnsDetailsAfterGrouping(isColumnGrouped);
|
|
30973
|
-
this.groupColumn = this.columnsDetails.find(column => column.type === 'group');
|
|
31045
|
+
this.groupColumn = this.columnsDetails.find((column) => column.type === 'group');
|
|
30974
31046
|
this.ungroupedColumns = this.columnsDetails.filter(column => column.type !== 'group');
|
|
30975
31047
|
}
|
|
30976
31048
|
updateTableConfig(config, isColumnGrouped) {
|
|
@@ -31158,7 +31230,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
31158
31230
|
type: Injectable
|
|
31159
31231
|
}] });
|
|
31160
31232
|
|
|
31161
|
-
// @ts-strict-ignore
|
|
31162
31233
|
const RESERVED_ROW_PROPERTIES = ['uid', 'nestedRows', 'expanded', 'full'];
|
|
31163
31234
|
class QdTreeRowsService {
|
|
31164
31235
|
groupService = inject(QdTreeGroupService);
|
|
@@ -31166,7 +31237,7 @@ class QdTreeRowsService {
|
|
|
31166
31237
|
_destroyRef = inject(DestroyRef);
|
|
31167
31238
|
config;
|
|
31168
31239
|
treeRowSubject = new BehaviorSubject(null);
|
|
31169
|
-
treeRow$ = this.treeRowSubject.
|
|
31240
|
+
treeRow$ = this.treeRowSubject.pipe(filter$1((tree) => tree !== null));
|
|
31170
31241
|
toggledRows = new WeakMap();
|
|
31171
31242
|
get groupColumn() {
|
|
31172
31243
|
return this.groupService.groupColumn;
|
|
@@ -31189,7 +31260,7 @@ class QdTreeRowsService {
|
|
|
31189
31260
|
}
|
|
31190
31261
|
initializeConfig(config) {
|
|
31191
31262
|
this.config = config;
|
|
31192
|
-
this.expanderService
|
|
31263
|
+
this.expanderService?.init(this.config?.uid, this);
|
|
31193
31264
|
}
|
|
31194
31265
|
updateRows(data) {
|
|
31195
31266
|
this.treeRowSubject.next(data);
|
|
@@ -31215,8 +31286,9 @@ class QdTreeRowsService {
|
|
|
31215
31286
|
return this.toggledRows.get(row) ?? row.expanded ?? false;
|
|
31216
31287
|
}
|
|
31217
31288
|
getGroupValue(row) {
|
|
31218
|
-
const
|
|
31219
|
-
|
|
31289
|
+
const looseRow = row;
|
|
31290
|
+
const column = this.groupColumn?.groupedColumns.find(groupedColumn => looseRow[groupedColumn.column] !== undefined);
|
|
31291
|
+
return column ? `${column.column}:${String(looseRow[column.column])}` : '';
|
|
31220
31292
|
}
|
|
31221
31293
|
splitRowsByTree(rows) {
|
|
31222
31294
|
rows.forEach(row => {
|
|
@@ -31226,16 +31298,19 @@ class QdTreeRowsService {
|
|
|
31226
31298
|
});
|
|
31227
31299
|
return rows.map(this.splitRowByTree.bind(this));
|
|
31228
31300
|
}
|
|
31229
|
-
splitRowByTree(
|
|
31301
|
+
splitRowByTree(treeRow) {
|
|
31302
|
+
const row = treeRow;
|
|
31230
31303
|
const treeRows = [];
|
|
31231
|
-
|
|
31232
|
-
|
|
31233
|
-
|
|
31234
|
-
|
|
31304
|
+
const groupColumn = this.groupColumn;
|
|
31305
|
+
if (groupColumn) {
|
|
31306
|
+
groupColumn.groupedColumns.forEach(groupedColumn => {
|
|
31307
|
+
const column = groupedColumn.column;
|
|
31308
|
+
if (row[column]) {
|
|
31309
|
+
treeRows.push({ [column]: row[column] });
|
|
31235
31310
|
}
|
|
31236
31311
|
});
|
|
31237
31312
|
}
|
|
31238
|
-
if (treeRows.length === 0) {
|
|
31313
|
+
if (!groupColumn || treeRows.length === 0) {
|
|
31239
31314
|
treeRows.push(row);
|
|
31240
31315
|
}
|
|
31241
31316
|
else {
|
|
@@ -31243,20 +31318,20 @@ class QdTreeRowsService {
|
|
|
31243
31318
|
this.ungroupedColumns.forEach(column => {
|
|
31244
31319
|
lastTreeRow[column.column] = row[column.column];
|
|
31245
31320
|
});
|
|
31246
|
-
this.getMetadataProperties(
|
|
31321
|
+
this.getMetadataProperties(treeRow, groupColumn).forEach(property => {
|
|
31247
31322
|
lastTreeRow[property] = row[property];
|
|
31248
31323
|
});
|
|
31249
|
-
if (row
|
|
31250
|
-
lastTreeRow
|
|
31251
|
-
lastTreeRow
|
|
31252
|
-
if (!this.config?.group?.aggregation || !lastTreeRow
|
|
31253
|
-
lastTreeRow
|
|
31324
|
+
if (row['uid'])
|
|
31325
|
+
lastTreeRow['uid'] = row['uid'];
|
|
31326
|
+
lastTreeRow['nestedRows'] = row['nestedRows'];
|
|
31327
|
+
if (!this.config?.group?.aggregation || !lastTreeRow['nestedRows'])
|
|
31328
|
+
lastTreeRow['full'] = row;
|
|
31254
31329
|
}
|
|
31255
31330
|
return this.nestRowsIntoOneAnother(treeRows);
|
|
31256
31331
|
}
|
|
31257
|
-
getMetadataProperties(row) {
|
|
31332
|
+
getMetadataProperties(row, groupColumn) {
|
|
31258
31333
|
const configuredColumns = [
|
|
31259
|
-
...
|
|
31334
|
+
...groupColumn.groupedColumns.map(column => column.column),
|
|
31260
31335
|
...this.ungroupedColumns.map(column => column.column)
|
|
31261
31336
|
];
|
|
31262
31337
|
return Object.keys(row).filter(property => !configuredColumns.includes(property) && !RESERVED_ROW_PROPERTIES.includes(property));
|
|
@@ -31325,8 +31400,9 @@ class QdTreeRowsService {
|
|
|
31325
31400
|
}
|
|
31326
31401
|
});
|
|
31327
31402
|
const properties = this.getRowsProperties(rows);
|
|
31328
|
-
|
|
31329
|
-
|
|
31403
|
+
const looseRows = rows;
|
|
31404
|
+
if (properties.length === 1 && looseRows.every(row => typeof row[properties[0]] === 'number')) {
|
|
31405
|
+
looseRows.sort((rowA, rowB) => rowA[properties[0]] - rowB[properties[0]]);
|
|
31330
31406
|
}
|
|
31331
31407
|
}
|
|
31332
31408
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTreeRowsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -31487,7 +31563,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
31487
31563
|
type: Input
|
|
31488
31564
|
}] } });
|
|
31489
31565
|
|
|
31490
|
-
// @ts-strict-ignore
|
|
31491
31566
|
class QdTreeBodyComponent {
|
|
31492
31567
|
groupService = inject(QdTreeGroupService);
|
|
31493
31568
|
treeRowsService = inject(QdTreeRowsService);
|
|
@@ -31513,7 +31588,7 @@ class QdTreeBodyComponent {
|
|
|
31513
31588
|
this.treeRowsService.updateRows(this.data);
|
|
31514
31589
|
}
|
|
31515
31590
|
get hasSeveralTreeColumns() {
|
|
31516
|
-
return this.groupService.groupColumn?.groupedColumns.length > 1;
|
|
31591
|
+
return (this.groupService.groupColumn?.groupedColumns.length ?? 0) > 1;
|
|
31517
31592
|
}
|
|
31518
31593
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTreeBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31519
31594
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdTreeBodyComponent, isStandalone: false, selector: "[qd-tree-body]", inputs: { config: "config", data: "data", testId: ["data-test-id", "testId"] }, host: { classAttribute: "qd-tree-body" }, usesOnChanges: true, ngImport: i0, template: "@for (rowData of tree$ | async; track rowData; let rowIndex = $index) {\n<ng-container\n [ngTemplateOutlet]=\"rowTemplate\"\n [ngTemplateOutletContext]=\"{ rowData, rowIndex, indentation: 0 }\"\n></ng-container>\n}\n\n<ng-template #rowTemplate let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-indentation=\"indentation\">\n <tr\n #row\n qd-tree-row\n [class]=\"'qd-tree-body-row'\"\n [columnsDetails]=\"columnsDetails\"\n [rowData]=\"rowData\"\n [rowIndex]=\"rowIndex\"\n [config]=\"config\"\n [indentation]=\"indentation\"\n [data-test-id]=\"testId + '-row-' + rowIndex\"\n ></tr>\n @if (row.expanded && rowData.nestedRows) { @for (rowData of rowData.nestedRows; track rowData; let rowIndex = $index)\n {\n <ng-container\n [ngTemplateOutlet]=\"rowTemplate\"\n [ngTemplateOutletContext]=\"{ rowData, rowIndex, indentation: indentation + 1 }\"\n ></ng-container>\n } }\n</ng-template>\n", styles: [".qd-tree-body .qd-tree-body-row{border:0 solid rgb(229,229,229);border-left-width:.0625rem}.qd-tree-body .qd-tree-body-row:hover{background-color:#f5f5f5}.qd-tree-body .qd-tree-body-cell{border:0 solid rgb(229,229,229);border-right-width:.0625rem;border-bottom-width:.0625rem}.qd-tree-body .qd-tree-body-cell:first-child{border-left-width:.0625rem}.qd-tree-body .qd-tree-body-cell-group span{margin-left:.25rem}.qd-tree-body .qd-tree-body-cell-group span+span:before{content:\"\\e002\";font-family:Quadrel-Icon,sans-serif}.qd-tree-body .qd-tree-body-cell-group.expandable{cursor:pointer}.qd-tree-body .qd-tree-body-cell-group-index-0{padding-left:1rem!important}.qd-tree-body .qd-tree-body-cell-group-index-1{padding-left:2rem!important}.qd-tree-body .qd-tree-body-cell-group-index-2{padding-left:3rem!important}.qd-tree-body .qd-tree-body-cell-group-index-3{padding-left:4rem!important}.qd-tree-body .qd-tree-body-cell-group-index-4{padding-left:5rem!important}.qd-tree-body .qd-tree-body-cell-group-index-5{padding-left:6rem!important}.qd-tree-body .qd-tree-body-cell-group-index-6{padding-left:7rem!important}.qd-tree-body .qd-tree-body-cell-group-index-7{padding-left:8rem!important}.qd-tree-body .qd-tree-body-cell-group-index-8{padding-left:9rem!important}.qd-tree-body .qd-tree-body-cell-group-index-9{padding-left:10rem!important}.qd-tree-body .qd-tree-body-cell-group-index-10{padding-left:11rem!important}.qd-tree-body .qd-tree-body-cell-group-index-11{padding-left:12rem!important}.qd-tree-body .qd-tree-body-cell-group-index-12{padding-left:13rem!important}.qd-tree-body .qd-tree-body-cell-group-index-13{padding-left:14rem!important}.qd-tree-body .qd-tree-body-cell-group-index-14{padding-left:15rem!important}.qd-tree-body .qd-tree-body-cell-group-index-15{padding-left:16rem!important}.qd-tree-body .qd-tree-body-cell-group-index-16{padding-left:17rem!important}.qd-tree-body .qd-tree-body-cell-group-index-17{padding-left:18rem!important}.qd-tree-body .qd-tree-body-cell-group-index-18{padding-left:19rem!important}.qd-tree-body .qd-tree-body-cell-group-index-19{padding-left:20rem!important}.qd-tree-body .qd-tree-body-cell-group-index-20{padding-left:21rem!important}.qd-tree-body .expander{width:0;cursor:pointer;transform:translate(-.75rem)}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdTreeRowComponent, selector: "[qd-tree-row]", inputs: ["columnsDetails", "indentation", "config", "data-test-id", "rowData", "rowIndex"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
|
|
@@ -31530,7 +31605,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
31530
31605
|
args: ['data-test-id']
|
|
31531
31606
|
}] } });
|
|
31532
31607
|
|
|
31533
|
-
// @ts-strict-ignore
|
|
31534
31608
|
class QdTreeEmptyStateComponent {
|
|
31535
31609
|
emptyStateService = inject(QdTableEmptyStateService);
|
|
31536
31610
|
config;
|
|
@@ -31553,7 +31627,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
31553
31627
|
type: Input
|
|
31554
31628
|
}] } });
|
|
31555
31629
|
|
|
31556
|
-
// @ts-strict-ignore
|
|
31557
31630
|
class QdTreeHeadComponent {
|
|
31558
31631
|
groupService = inject(QdTreeGroupService);
|
|
31559
31632
|
responsiveRowService = inject(QdTableResponsiveRowService);
|
|
@@ -31566,7 +31639,7 @@ class QdTreeHeadComponent {
|
|
|
31566
31639
|
return this.config.i18ns;
|
|
31567
31640
|
}
|
|
31568
31641
|
get headData() {
|
|
31569
|
-
return this.groupService.columnsDetails.map(column => column.type === 'group' ? column.groupedColumns[0].column : column.column);
|
|
31642
|
+
return this.groupService.columnsDetails.map(column => (column.type === 'group' ? column.groupedColumns[0].column : column.column));
|
|
31570
31643
|
}
|
|
31571
31644
|
ngOnInit() {
|
|
31572
31645
|
this.responsiveRowService.config = this.config;
|
|
@@ -32495,16 +32568,16 @@ class QdMultiSelectFacetComponent {
|
|
|
32495
32568
|
get options() {
|
|
32496
32569
|
return this.facet.options;
|
|
32497
32570
|
}
|
|
32498
|
-
handleAction(
|
|
32571
|
+
handleAction(action, event) {
|
|
32499
32572
|
event.stopPropagation();
|
|
32500
|
-
|
|
32573
|
+
action.handler();
|
|
32501
32574
|
}
|
|
32502
32575
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMultiSelectFacetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32503
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdMultiSelectFacetComponent, isStandalone: false, selector: "qd-multi-select-facet", inputs: { facet: "facet", data: "data" }, ngImport: i0, template: "@for (option of $any(data[facet.name]); track option) {\n<span>\n <span class=\"label\">{{ option.label }}:</span> {{ option.value }}\n</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options, $event)\"\n data-test-id=\"multi-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host>*{display:block}:host>span{margin-bottom:.5rem}:host>span:last-child{margin-bottom:0}:host>span .label{color:#757575}:host button{height:auto;line-height:1rem}\n"], dependencies: [{ kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonLinkDirective, selector: "button[qdButtonLink], a[qdButtonLink]" }] });
|
|
32576
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdMultiSelectFacetComponent, isStandalone: false, selector: "qd-multi-select-facet", inputs: { facet: "facet", data: "data" }, ngImport: i0, template: "@for (option of $any(data[facet.name]); track option) {\n<span>\n <span class=\"label\">{{ option.label }}:</span> {{ option.value }}\n</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options.action, $event)\"\n data-test-id=\"multi-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host>*{display:block}:host>span{margin-bottom:.5rem}:host>span:last-child{margin-bottom:0}:host>span .label{color:#757575}:host button{height:auto;line-height:1rem}\n"], dependencies: [{ kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonLinkDirective, selector: "button[qdButtonLink], a[qdButtonLink]" }] });
|
|
32504
32577
|
}
|
|
32505
32578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdMultiSelectFacetComponent, decorators: [{
|
|
32506
32579
|
type: Component,
|
|
32507
|
-
args: [{ selector: 'qd-multi-select-facet', standalone: false, template: "@for (option of $any(data[facet.name]); track option) {\n<span>\n <span class=\"label\">{{ option.label }}:</span> {{ option.value }}\n</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options, $event)\"\n data-test-id=\"multi-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host>*{display:block}:host>span{margin-bottom:.5rem}:host>span:last-child{margin-bottom:0}:host>span .label{color:#757575}:host button{height:auto;line-height:1rem}\n"] }]
|
|
32580
|
+
args: [{ selector: 'qd-multi-select-facet', standalone: false, template: "@for (option of $any(data[facet.name]); track option) {\n<span>\n <span class=\"label\">{{ option.label }}:</span> {{ option.value }}\n</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options.action, $event)\"\n data-test-id=\"multi-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host>*{display:block}:host>span{margin-bottom:.5rem}:host>span:last-child{margin-bottom:0}:host>span .label{color:#757575}:host button{height:auto;line-height:1rem}\n"] }]
|
|
32508
32581
|
}], propDecorators: { facet: [{
|
|
32509
32582
|
type: Input
|
|
32510
32583
|
}], data: [{
|
|
@@ -32553,16 +32626,16 @@ class QdSingleSelectFacetComponent {
|
|
|
32553
32626
|
get options() {
|
|
32554
32627
|
return this.facet.options;
|
|
32555
32628
|
}
|
|
32556
|
-
handleAction(
|
|
32629
|
+
handleAction(action, event) {
|
|
32557
32630
|
event.stopPropagation();
|
|
32558
|
-
|
|
32631
|
+
action.handler();
|
|
32559
32632
|
}
|
|
32560
32633
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdSingleSelectFacetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32561
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdSingleSelectFacetComponent, isStandalone: false, selector: "qd-single-select-facet", inputs: { facet: "facet", data: "data" }, ngImport: i0, template: "@if (data[facet.name]) {\n<span>{{ data[facet.name] }}</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options, $event)\"\n data-test-id=\"single-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host span{display:block;margin-bottom:.5rem}:host span:last-child{margin-bottom:0}:host button{display:block;height:auto;line-height:1rem}\n"], dependencies: [{ kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonLinkDirective, selector: "button[qdButtonLink], a[qdButtonLink]" }] });
|
|
32634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdSingleSelectFacetComponent, isStandalone: false, selector: "qd-single-select-facet", inputs: { facet: "facet", data: "data" }, ngImport: i0, template: "@if (data[facet.name]) {\n<span>{{ data[facet.name] }}</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options.action, $event)\"\n data-test-id=\"single-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host span{display:block;margin-bottom:.5rem}:host span:last-child{margin-bottom:0}:host button{display:block;height:auto;line-height:1rem}\n"], dependencies: [{ kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonLinkDirective, selector: "button[qdButtonLink], a[qdButtonLink]" }] });
|
|
32562
32635
|
}
|
|
32563
32636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdSingleSelectFacetComponent, decorators: [{
|
|
32564
32637
|
type: Component,
|
|
32565
|
-
args: [{ selector: 'qd-single-select-facet', standalone: false, template: "@if (data[facet.name]) {\n<span>{{ data[facet.name] }}</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options, $event)\"\n data-test-id=\"single-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host span{display:block;margin-bottom:.5rem}:host span:last-child{margin-bottom:0}:host button{display:block;height:auto;line-height:1rem}\n"] }]
|
|
32638
|
+
args: [{ selector: 'qd-single-select-facet', standalone: false, template: "@if (data[facet.name]) {\n<span>{{ data[facet.name] }}</span>\n} @if (options.action) {\n<button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"handleAction(options.action, $event)\"\n data-test-id=\"single-select-facet-button\"\n>\n {{ options.action.label.i18n }}\n</button>\n}\n", styles: [":host{font-size:.875rem}:host span{display:block;margin-bottom:.5rem}:host span:last-child{margin-bottom:0}:host button{display:block;height:auto;line-height:1rem}\n"] }]
|
|
32566
32639
|
}], propDecorators: { facet: [{
|
|
32567
32640
|
type: Input
|
|
32568
32641
|
}], data: [{
|
|
@@ -32786,6 +32859,8 @@ class QdDynamicFacetComponent {
|
|
|
32786
32859
|
this.setFacetValue('testId', changes['testId'].currentValue);
|
|
32787
32860
|
}
|
|
32788
32861
|
setFacetValue(name, value) {
|
|
32862
|
+
if (!this.ref)
|
|
32863
|
+
return;
|
|
32789
32864
|
if (this.inputNames.has(name)) {
|
|
32790
32865
|
this.ref.setInput(name, value);
|
|
32791
32866
|
return;
|
|
@@ -33511,6 +33586,8 @@ class QdPageObjectHeaderComponent {
|
|
|
33511
33586
|
injector = inject(Injector);
|
|
33512
33587
|
pageStoreService = inject(QdPageStoreService);
|
|
33513
33588
|
_destroyRef = inject(DestroyRef);
|
|
33589
|
+
_zone = inject(NgZone);
|
|
33590
|
+
_host = inject(ElementRef);
|
|
33514
33591
|
_pageObjectDataSubject = new BehaviorSubject({});
|
|
33515
33592
|
_isLoadingSubject = new BehaviorSubject(false);
|
|
33516
33593
|
_customActionsSubject = new BehaviorSubject({ actions: [] });
|
|
@@ -33605,6 +33682,9 @@ class QdPageObjectHeaderComponent {
|
|
|
33605
33682
|
this.formGroupManagerService.$hasValuesChanged()
|
|
33606
33683
|
]).pipe(map(([isValid, hasChanges]) => isValid && hasChanges));
|
|
33607
33684
|
}
|
|
33685
|
+
constructor() {
|
|
33686
|
+
afterNextRender(() => this._zone.runOutsideAngular(() => this.observeTitleWidth()));
|
|
33687
|
+
}
|
|
33608
33688
|
ngOnInit() {
|
|
33609
33689
|
if (this.pageObjectResolver)
|
|
33610
33690
|
this.setupResolverTrigger(this.pageObjectResolver);
|
|
@@ -33629,6 +33709,13 @@ class QdPageObjectHeaderComponent {
|
|
|
33629
33709
|
handleAction(facet) {
|
|
33630
33710
|
facet?.action?.handler();
|
|
33631
33711
|
}
|
|
33712
|
+
/**
|
|
33713
|
+
* Returns the custom actions that are not hidden.
|
|
33714
|
+
* The icon menu on narrow headers lists only these.
|
|
33715
|
+
*/
|
|
33716
|
+
visibleCustomActions(customActions) {
|
|
33717
|
+
return customActions.actions.filter(action => !action.isHidden);
|
|
33718
|
+
}
|
|
33632
33719
|
hasHeaderFacets(config) {
|
|
33633
33720
|
return this.config.headerFacets != null;
|
|
33634
33721
|
}
|
|
@@ -33759,6 +33846,23 @@ class QdPageObjectHeaderComponent {
|
|
|
33759
33846
|
this._customActionsSubject.next(this.getCustomActionsByMode(actions, mode));
|
|
33760
33847
|
});
|
|
33761
33848
|
}
|
|
33849
|
+
observeTitleWidth() {
|
|
33850
|
+
const title = this._host.nativeElement.querySelector('.object-header-title');
|
|
33851
|
+
const titleRow = title.parentElement;
|
|
33852
|
+
const measure = () => {
|
|
33853
|
+
const width = Math.ceil(qdMeasureNaturalSize(title, titleRow).outerWidth);
|
|
33854
|
+
if (width > 0)
|
|
33855
|
+
title.style.setProperty('--qd-title-natural-width', `${width}px`);
|
|
33856
|
+
};
|
|
33857
|
+
const mutationObserver = new MutationObserver(measure);
|
|
33858
|
+
mutationObserver.observe(title, { childList: true, characterData: true, subtree: true });
|
|
33859
|
+
document.fonts?.addEventListener('loadingdone', measure);
|
|
33860
|
+
measure();
|
|
33861
|
+
this._destroyRef.onDestroy(() => {
|
|
33862
|
+
mutationObserver.disconnect();
|
|
33863
|
+
document.fonts?.removeEventListener('loadingdone', measure);
|
|
33864
|
+
});
|
|
33865
|
+
}
|
|
33762
33866
|
getCustomActionsByMode(customActions, mode) {
|
|
33763
33867
|
const actions = customActions
|
|
33764
33868
|
.filter(action => !action.operationMode || action.operationMode === mode)
|
|
@@ -33783,12 +33887,12 @@ class QdPageObjectHeaderComponent {
|
|
|
33783
33887
|
});
|
|
33784
33888
|
}
|
|
33785
33889
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdPageObjectHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33786
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdPageObjectHeaderComponent, isStandalone: false, selector: "qd-page-object-header", inputs: { config: "config", hasNavigation: "hasNavigation", testId: ["data-test-id", "testId"] }, host: { listeners: { "click": "toggleFacets()" }, properties: { "style.borderBottom": "borderBottomStyle", "class.in-dialog": "this.isInDialog" } }, usesOnChanges: true, ngImport: i0, template: "@if (isLoading$ | async) {\n<div class=\"loading-overlay\"><qd-spinner></qd-spinner></div>\n}\n\n<div class=\"object-header-top\">\n <header class=\"object-header-title\" [attr.data-test-id]=\"titleTestId\">{{ config.title.i18n | translate }}</header>\n <div class=\"object-header-toolbar\">\n <ng-content></ng-content>\n\n <button class=\"button-icon\" data-test-id=\"archive-button\">\n @if (showArchive$ | async) {\n <qd-icon (click)=\"archiveButton?.handler()\" class=\"header-action-icon\" [icon]=\"'resultNew'\"></qd-icon>\n }\n </button>\n\n <button class=\"button-icon\" data-test-id=\"delete-button\">\n @if (showDelete$ | async) {\n <qd-icon class=\"header-action-icon\" (click)=\"deleteButton?.handler()\" [icon]=\"'trash'\"></qd-icon>\n }\n </button>\n\n @if (showEdit$ | async) {\n <button qdButton (click)=\"edit()\" data-test-id=\"edit-button\">\n {{ editButton?.label?.i18n || \"i18n.qd.page.header.edit\" | translate }}\n </button>\n } @if (showCancel$ | async) {\n <button qdButton qdButtonGhost (click)=\"cancel()\" data-test-id=\"cancel-button\">\n {{ cancelButton.label?.i18n || \"i18n.qd.page.header.cancel\" | translate }}\n </button>\n } @if (showSave$ | async) {\n <button qdButton (click)=\"save()\" data-test-id=\"save-button\" [disabled]=\"($canSave | async) === false\">\n {{ saveButton.label?.i18n || \"i18n.qd.page.header.save\" | translate }}\n </button>\n } @if (customActions$ | async; as customActions) { @if (!adaptiveMode) { @if (customActions.actions.length > 1) {\n <button [qdMenuButton]=\"customActions\" [autoSize]=\"false\" [data-test-id]=\"'page-'\" data-test-id=\"custom-button\">\n {{ config?.customActionsLabel?.i18n || \"i18n.qd.page.header.actions\" | translate }}\n </button>\n } @else { @if ((customActions$ | async).actions[0]; as singleAction) { @if (singleAction.handler &&\n !singleAction.isHidden) {\n <button qdButton [disabled]=\"singleAction.isDisabled\" (click)=\"singleAction.handler()\" data-test-id=\"custom-button\">\n {{ singleAction.label?.i18n | translate }}\n </button>\n } } } } @else { @if ((customActions$ | async)?.actions.length >= 1) {\n <button\n type=\"button\"\n class=\"adaptive-menu-button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverMinWidth]=\"160\"\n >\n <qd-icon icon=\"overflowMenuVertical\"></qd-icon>\n </button>\n }\n <ng-template #menu>\n @for (action of customActions.actions; track action; let i = $index) {\n <button class=\"adaptive-menu-entry\" type=\"button\" [disabled]=\"action.isDisabled\" (click)=\"action.handler()\">\n {{ action.label.i18n | translate }}\n </button>\n }\n </ng-template>\n } }\n </div>\n</div>\n\n<div class=\"object-header-facets\" [ngClass]=\"{ amongThemselves: adaptiveMode && !facetsCollapsed }\">\n @if (pageObjectData$ | async; as data) { @for (facet of headerFacets | slice : 0 : (adaptiveMode && facetsCollapsed ?\n 2 : headerFacets?.length ?? 0); track facet) {\n <div class=\"object-header-facet\" [attr.data-test-id]=\"testId + '-facet-' + facet.name\">\n <div class=\"facet-label\">{{ facet.label.i18n | translate }}</div>\n <qd-dynamic-facet\n class=\"dynamic-facet\"\n [facet]=\"facet\"\n [data]=\"data\"\n [testId]=\"testId + '-facet-' + facet.name\"\n ></qd-dynamic-facet>\n </div>\n } } @if (!config.hideContexts && contexts$ | async; as contexts) { @for ( context of contexts | slice : 0 :\n (adaptiveMode && facetsCollapsed ? 2 - (headerFacets?.length ?? 0) : contexts?.length); track context; let index =\n $index; let first = $first) {\n <div\n class=\"object-header-facet qd-context-facet\"\n [ngClass]=\"{ hasDivider: headerFacets && first, adaptiveFirst: headerFacets && adaptiveMode && first }\"\n [attr.data-test-id]=\"testId + '-context-facet-' + context.context.id\"\n >\n <div class=\"facet-label\">{{ context.label | translate }}</div>\n @if (context.value.length === 0) {\n <span class=\"no-selected-context\">{{ \"i18n.qd.page.context.noSelectionPlaceholder\" | translate }}</span>\n } @if (context.value.length !== 0) {\n <qd-context-selection-chip\n [selection]=\"context.value\"\n [removable]=\"isContextSelectable\"\n [testId]=\"testId + '-context-selection-' + context.context.id\"\n (selectionCleared)=\"clearContext(context.context)\"\n ></qd-context-selection-chip>\n } @if (isContextSelectable && (!facetsCollapsed || !adaptiveMode)) {\n <span class=\"select-button\">\n <button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"changeContext(context.context, context.selection, $event)\"\n [data-test-id]=\"'object-header-select-context-' + context.context.id\"\n >\n {{\n context.value.length !== 0\n ? (\"i18n.qd.page.context.button.change\" | translate)\n : (\"i18n.qd.page.context.button.select\" | translate)\n }}\n </button>\n </span>\n }\n </div>\n } } @if (contexts$ | async; as togglerContexts) { @if (adaptiveMode && headerFacets?.length + togglerContexts.length >\n 2) {\n <span class=\"facets-toggler\" [attr.data-test-id]=\"testId + '-facets-toggler'\">\n @if (facetsCollapsed) {\n <span [attr.data-test-id]=\"testId + '-facets-toggler-count'\"\n >+{{ headerFacets.length + togglerContexts.length - 2 }}</span\n >\n }\n <button qdIconButton [data-test-id]=\"'toggle-button'\">\n <qd-icon [icon]=\"facetsCollapsed ? 'ctrlDown' : 'ctrlTop'\"></qd-icon>\n </button>\n </span>\n } }\n</div>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;padding:1.25rem;border-bottom:.125rem solid rgb(213,213,213);background:#fff;gap:1.25rem}@media(max-width:599.98px){:host{padding:1.25rem .9375rem}}:host .object-header-top{display:flex;align-items:flex-start;justify-content:space-between}:host .object-header-top .object-header-title{padding:2px;color:#171717;font-size:1.3125rem;font-weight:500}:host .object-header-top .object-header-toolbar{display:flex;align-items:center;column-gap:.5rem}:host .object-header-top .object-header-toolbar .button-icon{background:none}:host .object-header-top .object-header-toolbar .button-icon+.button-icon{margin-left:-.5rem}:host .object-header-top .object-header-toolbar .header-action-icon{color:#14516f;cursor:pointer;font-size:1.5rem}:host.in-dialog .object-header-toolbar{padding-right:2.5rem}:host .object-header-facets{position:relative;display:flex;flex-wrap:wrap;font-size:1.125rem;gap:1.25rem}:host .object-header-facets .object-header-facet{display:flex;min-width:3.75rem;flex-direction:column}:host .object-header-facets .object-header-facet.hasDivider{padding-left:1.25rem;border-left:.0625rem solid rgb(117,117,117)}:host .object-header-facets .object-header-facet.adaptiveFirst{padding-top:1.25rem}:host .object-header-facets .object-header-facet .facet-label{display:block;margin-bottom:0;color:#757575;font-size:.875rem;padding-bottom:.375rem;font-weight:500}:host .object-header-facets .facets-toggler{position:absolute;top:0;right:0;display:flex;align-items:center;padding-right:.3125rem;font-size:.625rem;line-height:.625rem}:host .object-header-facets.amongThemselves{display:grid}:host .object-header-facets.amongThemselves .object-header-facet.hasDivider{padding-left:0;border-top:.0625rem solid rgb(117,117,117);border-left:none}.loading-overlay{position:absolute;z-index:10000;inset:0;display:flex;align-items:center;justify-content:center;background-color:#0003}.no-selected-context{height:1.625rem;color:#979797;font-size:.875rem;line-height:1.625rem}.select-button{margin-top:.25rem}.adaptive-menu-button{display:flex;background:unset;color:#454545;font-size:2rem}.adaptive-menu-button:hover,.adaptive-menu-button:focus{color:#000}.adaptive-menu-entry{display:block;overflow:hidden;width:100%;min-height:2.25rem;padding:0 1rem;background:#fff0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adaptive-menu-entry:focus-visible{box-shadow:inset 0 0 0 2px #069;outline:none}.object-header-facets .object-header-facet{max-width:100%}@media(min-width:600px){.object-header-facets:not(.amongThemselves) .object-header-facet.qd-context-facet{max-width:max-content;flex:1 1 0}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonGhostDirective, selector: "button[qdButtonGhost], a[qdButtonGhost]" }, { kind: "directive", type: QdButtonLinkDirective, selector: "button[qdButtonLink], a[qdButtonLink]" }, { kind: "component", type: QdIconButtonComponent, selector: "button[qdIconButton], a[qdIconButton]", inputs: ["color", "data-test-id"] }, { kind: "component", type: QdMenuButtonComponent, selector: "button[qdMenuButton], a[qdMenuButton]", inputs: ["qdMenuButton", "data-test-id", "autoSize"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "component", type: QdSpinnerComponent, selector: "qd-spinner" }, { kind: "directive", type: QdPopoverOnClickDirective, selector: "[qdPopoverOnClick]", inputs: ["qdPopoverOnClick", "qdPopoverPlacement", "qdPopoverOffsetX", "qdPopoverOffsetY", "qdPopoverCloseStrategy", "qdPopoverDisabled", "qdPopoverStopPropagation", "qdPopoverBackgroundColor", "qdPopoverMaxHeight", "qdPopoverMinWidth", "qdPopoverMaxWidth", "qdPopoverAutoSize", "qdPopoverEnableKeyControl", "qdPopoverRestoreFocus", "qdPopoverFlipIntoViewport"], outputs: ["opened", "closed"], exportAs: ["qdPopoverOnClick"] }, { kind: "component", type: QdDynamicFacetComponent, selector: "qd-dynamic-facet", inputs: ["facet", "data", "testId"] }, { kind: "component", type: QdContextSelectionChipComponent, selector: "qd-context-selection-chip", inputs: ["selection", "removable", "testId"], outputs: ["selectionCleared"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33890
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdPageObjectHeaderComponent, isStandalone: false, selector: "qd-page-object-header", inputs: { config: "config", hasNavigation: "hasNavigation", testId: ["data-test-id", "testId"] }, host: { listeners: { "click": "toggleFacets()" }, properties: { "style.borderBottom": "borderBottomStyle", "class.in-dialog": "this.isInDialog" } }, usesOnChanges: true, ngImport: i0, template: "@if (isLoading$ | async) {\n<div class=\"loading-overlay\"><qd-spinner></qd-spinner></div>\n}\n\n<div class=\"object-header-top\">\n <header class=\"object-header-title\" [attr.data-test-id]=\"titleTestId\">{{ config.title.i18n | translate }}</header>\n <div class=\"object-header-toolbar\">\n <ng-content></ng-content>\n\n @if (showArchive$ | async) {\n <button class=\"button-icon\" data-test-id=\"archive-button\">\n <qd-icon (click)=\"archiveButton?.handler()\" class=\"header-action-icon\" [icon]=\"'resultNew'\"></qd-icon>\n </button>\n } @if (showDelete$ | async) {\n <button class=\"button-icon\" data-test-id=\"delete-button\">\n <qd-icon class=\"header-action-icon\" (click)=\"deleteButton?.handler()\" [icon]=\"'trash'\"></qd-icon>\n </button>\n } @if (showEdit$ | async) {\n <button qdButton (click)=\"edit()\" data-test-id=\"edit-button\">\n {{ editButton?.label?.i18n || \"i18n.qd.page.header.edit\" | translate }}\n </button>\n } @if (showCancel$ | async) {\n <button qdButton qdButtonGhost (click)=\"cancel()\" data-test-id=\"cancel-button\">\n {{ cancelButton.label?.i18n || \"i18n.qd.page.header.cancel\" | translate }}\n </button>\n } @if (showSave$ | async) {\n <button qdButton (click)=\"save()\" data-test-id=\"save-button\" [disabled]=\"($canSave | async) === false\">\n {{ saveButton.label?.i18n || \"i18n.qd.page.header.save\" | translate }}\n </button>\n } @if (customActions$ | async; as customActions) { @if (!adaptiveMode) { @if (customActions.actions.length > 1) {\n <button\n class=\"qd-desktop-actions\"\n [qdMenuButton]=\"customActions\"\n [autoSize]=\"false\"\n [data-test-id]=\"'page-'\"\n data-test-id=\"custom-button\"\n >\n {{ config?.customActionsLabel?.i18n || \"i18n.qd.page.header.actions\" | translate }}\n </button>\n } @else { @if ((customActions$ | async).actions[0]; as singleAction) { @if (singleAction.handler &&\n !singleAction.isHidden) {\n <button\n qdButton\n class=\"qd-desktop-actions\"\n [disabled]=\"singleAction.isDisabled\"\n (click)=\"singleAction.handler()\"\n data-test-id=\"custom-button\"\n >\n {{ singleAction.label?.i18n | translate }}\n </button>\n } } } @if (customActions.actions.length > 1 || visibleCustomActions(customActions).length > 0) { @let mobileLabel =\n (customActions.actions.length > 1 ? config?.customActionsLabel?.i18n || \"i18n.qd.page.header.actions\" :\n customActions.actions[0].label.i18n) | translate;\n <button\n type=\"button\"\n class=\"qd-mobile-actions\"\n data-test-id=\"custom-mobile-button\"\n [attr.aria-label]=\"mobileLabel\"\n [attr.title]=\"mobileLabel\"\n [disabled]=\"visibleCustomActions(customActions).length === 0\"\n [qdPopoverOnClick]=\"mobileMenu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverMinWidth]=\"200\"\n [qdPopoverMaxWidth]=\"300\"\n [qdPopoverFlipIntoViewport]=\"true\"\n [qdPopoverEnableKeyControl]=\"true\"\n [qdPopoverRestoreFocus]=\"true\"\n >\n <qd-icon icon=\"ctrlDown\"></qd-icon>\n </button>\n <ng-template #mobileMenu>\n @for (action of visibleCustomActions(customActions); track action) {\n <button class=\"adaptive-menu-entry\" type=\"button\" [disabled]=\"action.isDisabled\" (click)=\"action.handler()\">\n {{ action.label.i18n | translate }}\n </button>\n }\n </ng-template>\n } } @else { @if ((customActions$ | async)?.actions.length >= 1) {\n <button\n type=\"button\"\n class=\"adaptive-menu-button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverMinWidth]=\"160\"\n >\n <qd-icon icon=\"overflowMenuVertical\"></qd-icon>\n </button>\n }\n <ng-template #menu>\n @for (action of customActions.actions; track action; let i = $index) {\n <button class=\"adaptive-menu-entry\" type=\"button\" [disabled]=\"action.isDisabled\" (click)=\"action.handler()\">\n {{ action.label.i18n | translate }}\n </button>\n }\n </ng-template>\n } }\n </div>\n</div>\n\n<div class=\"object-header-facets\" [ngClass]=\"{ amongThemselves: adaptiveMode && !facetsCollapsed }\">\n @if (pageObjectData$ | async; as data) { @for (facet of headerFacets | slice : 0 : (adaptiveMode && facetsCollapsed ?\n 2 : headerFacets?.length ?? 0); track facet) {\n <div class=\"object-header-facet\" [attr.data-test-id]=\"testId + '-facet-' + facet.name\">\n <div class=\"facet-label\">{{ facet.label.i18n | translate }}</div>\n <qd-dynamic-facet\n class=\"dynamic-facet\"\n [facet]=\"facet\"\n [data]=\"data\"\n [testId]=\"testId + '-facet-' + facet.name\"\n ></qd-dynamic-facet>\n </div>\n } } @if (!config.hideContexts && contexts$ | async; as contexts) { @for ( context of contexts | slice : 0 :\n (adaptiveMode && facetsCollapsed ? 2 - (headerFacets?.length ?? 0) : contexts?.length); track context; let index =\n $index; let first = $first) {\n <div\n class=\"object-header-facet qd-context-facet\"\n [ngClass]=\"{ hasDivider: headerFacets && first, adaptiveFirst: headerFacets && adaptiveMode && first }\"\n [attr.data-test-id]=\"testId + '-context-facet-' + context.context.id\"\n >\n <div class=\"facet-label\">{{ context.label | translate }}</div>\n @if (context.value.length === 0) {\n <span class=\"no-selected-context\">{{ \"i18n.qd.page.context.noSelectionPlaceholder\" | translate }}</span>\n } @if (context.value.length !== 0) {\n <qd-context-selection-chip\n [selection]=\"context.value\"\n [removable]=\"isContextSelectable\"\n [testId]=\"testId + '-context-selection-' + context.context.id\"\n (selectionCleared)=\"clearContext(context.context)\"\n ></qd-context-selection-chip>\n } @if (isContextSelectable && (!facetsCollapsed || !adaptiveMode)) {\n <span class=\"select-button\">\n <button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"changeContext(context.context, context.selection, $event)\"\n [data-test-id]=\"'object-header-select-context-' + context.context.id\"\n >\n {{\n context.value.length !== 0\n ? (\"i18n.qd.page.context.button.change\" | translate)\n : (\"i18n.qd.page.context.button.select\" | translate)\n }}\n </button>\n </span>\n }\n </div>\n } } @if (contexts$ | async; as togglerContexts) { @if (adaptiveMode && headerFacets?.length + togglerContexts.length >\n 2) {\n <span class=\"facets-toggler\" [attr.data-test-id]=\"testId + '-facets-toggler'\">\n @if (facetsCollapsed) {\n <span [attr.data-test-id]=\"testId + '-facets-toggler-count'\"\n >+{{ headerFacets.length + togglerContexts.length - 2 }}</span\n >\n }\n <button qdIconButton [data-test-id]=\"'toggle-button'\">\n <qd-icon [icon]=\"facetsCollapsed ? 'ctrlDown' : 'ctrlTop'\"></qd-icon>\n </button>\n </span>\n } }\n</div>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;padding:1.25rem;border-bottom:.125rem solid rgb(213,213,213);background:#fff;container-type:inline-size;gap:1.25rem}@media(max-width:599.98px){:host{padding:1.25rem .9375rem}}:host .object-header-top{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;column-gap:1.5rem;row-gap:.75rem}:host .object-header-top .object-header-title{min-width:0;flex:1 1 min(var(--qd-title-natural-width, 16rem),16rem);padding:.125rem 0;margin-left:.125rem;color:#171717;font-size:1.3125rem;font-weight:500;line-height:1.509375rem;overflow-wrap:break-word}:host .object-header-top:has(>.object-header-toolbar>*) .object-header-title{padding:calc((2.25rem - 1.509375rem) / 2) 0}:host .object-header-top .object-header-toolbar{display:flex;min-width:0;max-width:100%;flex:0 1 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;margin-left:auto;gap:.5rem}:host .object-header-top .object-header-toolbar>*{max-width:100%;flex:none;white-space:nowrap}:host .object-header-top .object-header-toolbar .button-icon{background:none}:host .object-header-top .object-header-toolbar .button-icon+.button-icon{margin-left:-.5rem}:host .object-header-top .object-header-toolbar .header-action-icon{color:#14516f;cursor:pointer;font-size:1.5rem}:host .object-header-top .object-header-toolbar .qd-mobile-actions{display:flex;width:3.125rem;height:2.25rem;align-items:center;justify-content:center;padding:0;background:#069;color:#fff;cursor:pointer;font-size:1.125rem}:host .object-header-top .object-header-toolbar .qd-mobile-actions:hover{background:#14516f}:host .object-header-top .object-header-toolbar .qd-mobile-actions[disabled]{background:#d5d5d5;color:#979797;cursor:default}:host .object-header-top .object-header-toolbar .qd-mobile-actions qd-icon{line-height:1}:host.in-dialog .object-header-top{padding-right:2.5rem}:host .object-header-facets{position:relative;display:flex;flex-wrap:wrap;font-size:1.125rem;gap:1.25rem}:host .object-header-facets .object-header-facet{display:flex;min-width:3.75rem;flex-direction:column}:host .object-header-facets .object-header-facet.hasDivider{padding-left:1.25rem;border-left:.0625rem solid rgb(117,117,117)}:host .object-header-facets .object-header-facet.adaptiveFirst{padding-top:1.25rem}:host .object-header-facets .object-header-facet .facet-label{display:block;margin-bottom:0;color:#757575;font-size:.875rem;padding-bottom:.375rem;font-weight:500}:host .object-header-facets .facets-toggler{position:absolute;top:0;right:0;display:flex;align-items:center;padding-right:.3125rem;font-size:.625rem;line-height:.625rem}:host .object-header-facets.amongThemselves{display:grid}:host .object-header-facets.amongThemselves .object-header-facet.hasDivider{padding-left:0;border-top:.0625rem solid rgb(117,117,117);border-left:none}.loading-overlay{position:absolute;z-index:10000;inset:0;display:flex;align-items:center;justify-content:center;background-color:#0003}.no-selected-context{height:1.625rem;color:#979797;font-size:.875rem;line-height:1.625rem}.select-button{margin-top:.25rem}.adaptive-menu-button{display:flex;background:unset;color:#454545;font-size:2rem}.adaptive-menu-button:hover,.adaptive-menu-button:focus{color:#000}.adaptive-menu-entry{display:block;overflow:hidden;width:100%;min-height:2.25rem;padding:0 1rem;background:#fff0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adaptive-menu-entry:focus-visible{box-shadow:inset 0 0 0 2px #069;outline:none}.object-header-facets .object-header-facet{max-width:100%}@media(min-width:600px){.object-header-facets:not(.amongThemselves) .object-header-facet.qd-context-facet{max-width:max-content;flex:1 1 0}}@media(min-width:600px){@container (max-width: 559.98px){:host .object-header-top .object-header-toolbar .qd-desktop-actions{display:none}}@container (min-width: 560px){:host .object-header-top .object-header-toolbar .qd-mobile-actions{display:none}}}@media(max-width:599.98px){@container (max-width: 569.98px){:host .object-header-top .object-header-toolbar .qd-desktop-actions{display:none}}@container (min-width: 570px){:host .object-header-top .object-header-toolbar .qd-mobile-actions{display:none}}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonGhostDirective, selector: "button[qdButtonGhost], a[qdButtonGhost]" }, { kind: "directive", type: QdButtonLinkDirective, selector: "button[qdButtonLink], a[qdButtonLink]" }, { kind: "component", type: QdIconButtonComponent, selector: "button[qdIconButton], a[qdIconButton]", inputs: ["color", "data-test-id"] }, { kind: "component", type: QdMenuButtonComponent, selector: "button[qdMenuButton], a[qdMenuButton]", inputs: ["qdMenuButton", "data-test-id", "autoSize"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "component", type: QdSpinnerComponent, selector: "qd-spinner" }, { kind: "directive", type: QdPopoverOnClickDirective, selector: "[qdPopoverOnClick]", inputs: ["qdPopoverOnClick", "qdPopoverPlacement", "qdPopoverOffsetX", "qdPopoverOffsetY", "qdPopoverCloseStrategy", "qdPopoverDisabled", "qdPopoverStopPropagation", "qdPopoverBackgroundColor", "qdPopoverMaxHeight", "qdPopoverMinWidth", "qdPopoverMaxWidth", "qdPopoverAutoSize", "qdPopoverEnableKeyControl", "qdPopoverRestoreFocus", "qdPopoverFlipIntoViewport"], outputs: ["opened", "closed"], exportAs: ["qdPopoverOnClick"] }, { kind: "component", type: QdDynamicFacetComponent, selector: "qd-dynamic-facet", inputs: ["facet", "data", "testId"] }, { kind: "component", type: QdContextSelectionChipComponent, selector: "qd-context-selection-chip", inputs: ["selection", "removable", "testId"], outputs: ["selectionCleared"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33787
33891
|
}
|
|
33788
33892
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdPageObjectHeaderComponent, decorators: [{
|
|
33789
33893
|
type: Component,
|
|
33790
|
-
args: [{ selector: 'qd-page-object-header', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[style.borderBottom]': 'borderBottomStyle' }, standalone: false, template: "@if (isLoading$ | async) {\n<div class=\"loading-overlay\"><qd-spinner></qd-spinner></div>\n}\n\n<div class=\"object-header-top\">\n <header class=\"object-header-title\" [attr.data-test-id]=\"titleTestId\">{{ config.title.i18n | translate }}</header>\n <div class=\"object-header-toolbar\">\n <ng-content></ng-content>\n\n <button class=\"button-icon\" data-test-id=\"archive-button\">\n @if (showArchive$ | async) {\n <qd-icon (click)=\"archiveButton?.handler()\" class=\"header-action-icon\" [icon]=\"'resultNew'\"></qd-icon>\n }\n </button>\n\n <button class=\"button-icon\" data-test-id=\"delete-button\">\n @if (showDelete$ | async) {\n <qd-icon class=\"header-action-icon\" (click)=\"deleteButton?.handler()\" [icon]=\"'trash'\"></qd-icon>\n }\n </button>\n\n @if (showEdit$ | async) {\n <button qdButton (click)=\"edit()\" data-test-id=\"edit-button\">\n {{ editButton?.label?.i18n || \"i18n.qd.page.header.edit\" | translate }}\n </button>\n } @if (showCancel$ | async) {\n <button qdButton qdButtonGhost (click)=\"cancel()\" data-test-id=\"cancel-button\">\n {{ cancelButton.label?.i18n || \"i18n.qd.page.header.cancel\" | translate }}\n </button>\n } @if (showSave$ | async) {\n <button qdButton (click)=\"save()\" data-test-id=\"save-button\" [disabled]=\"($canSave | async) === false\">\n {{ saveButton.label?.i18n || \"i18n.qd.page.header.save\" | translate }}\n </button>\n } @if (customActions$ | async; as customActions) { @if (!adaptiveMode) { @if (customActions.actions.length > 1) {\n <button [qdMenuButton]=\"customActions\" [autoSize]=\"false\" [data-test-id]=\"'page-'\" data-test-id=\"custom-button\">\n {{ config?.customActionsLabel?.i18n || \"i18n.qd.page.header.actions\" | translate }}\n </button>\n } @else { @if ((customActions$ | async).actions[0]; as singleAction) { @if (singleAction.handler &&\n !singleAction.isHidden) {\n <button qdButton [disabled]=\"singleAction.isDisabled\" (click)=\"singleAction.handler()\" data-test-id=\"custom-button\">\n {{ singleAction.label?.i18n | translate }}\n </button>\n } } } } @else { @if ((customActions$ | async)?.actions.length >= 1) {\n <button\n type=\"button\"\n class=\"adaptive-menu-button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverMinWidth]=\"160\"\n >\n <qd-icon icon=\"overflowMenuVertical\"></qd-icon>\n </button>\n }\n <ng-template #menu>\n @for (action of customActions.actions; track action; let i = $index) {\n <button class=\"adaptive-menu-entry\" type=\"button\" [disabled]=\"action.isDisabled\" (click)=\"action.handler()\">\n {{ action.label.i18n | translate }}\n </button>\n }\n </ng-template>\n } }\n </div>\n</div>\n\n<div class=\"object-header-facets\" [ngClass]=\"{ amongThemselves: adaptiveMode && !facetsCollapsed }\">\n @if (pageObjectData$ | async; as data) { @for (facet of headerFacets | slice : 0 : (adaptiveMode && facetsCollapsed ?\n 2 : headerFacets?.length ?? 0); track facet) {\n <div class=\"object-header-facet\" [attr.data-test-id]=\"testId + '-facet-' + facet.name\">\n <div class=\"facet-label\">{{ facet.label.i18n | translate }}</div>\n <qd-dynamic-facet\n class=\"dynamic-facet\"\n [facet]=\"facet\"\n [data]=\"data\"\n [testId]=\"testId + '-facet-' + facet.name\"\n ></qd-dynamic-facet>\n </div>\n } } @if (!config.hideContexts && contexts$ | async; as contexts) { @for ( context of contexts | slice : 0 :\n (adaptiveMode && facetsCollapsed ? 2 - (headerFacets?.length ?? 0) : contexts?.length); track context; let index =\n $index; let first = $first) {\n <div\n class=\"object-header-facet qd-context-facet\"\n [ngClass]=\"{ hasDivider: headerFacets && first, adaptiveFirst: headerFacets && adaptiveMode && first }\"\n [attr.data-test-id]=\"testId + '-context-facet-' + context.context.id\"\n >\n <div class=\"facet-label\">{{ context.label | translate }}</div>\n @if (context.value.length === 0) {\n <span class=\"no-selected-context\">{{ \"i18n.qd.page.context.noSelectionPlaceholder\" | translate }}</span>\n } @if (context.value.length !== 0) {\n <qd-context-selection-chip\n [selection]=\"context.value\"\n [removable]=\"isContextSelectable\"\n [testId]=\"testId + '-context-selection-' + context.context.id\"\n (selectionCleared)=\"clearContext(context.context)\"\n ></qd-context-selection-chip>\n } @if (isContextSelectable && (!facetsCollapsed || !adaptiveMode)) {\n <span class=\"select-button\">\n <button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"changeContext(context.context, context.selection, $event)\"\n [data-test-id]=\"'object-header-select-context-' + context.context.id\"\n >\n {{\n context.value.length !== 0\n ? (\"i18n.qd.page.context.button.change\" | translate)\n : (\"i18n.qd.page.context.button.select\" | translate)\n }}\n </button>\n </span>\n }\n </div>\n } } @if (contexts$ | async; as togglerContexts) { @if (adaptiveMode && headerFacets?.length + togglerContexts.length >\n 2) {\n <span class=\"facets-toggler\" [attr.data-test-id]=\"testId + '-facets-toggler'\">\n @if (facetsCollapsed) {\n <span [attr.data-test-id]=\"testId + '-facets-toggler-count'\"\n >+{{ headerFacets.length + togglerContexts.length - 2 }}</span\n >\n }\n <button qdIconButton [data-test-id]=\"'toggle-button'\">\n <qd-icon [icon]=\"facetsCollapsed ? 'ctrlDown' : 'ctrlTop'\"></qd-icon>\n </button>\n </span>\n } }\n</div>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;padding:1.25rem;border-bottom:.125rem solid rgb(213,213,213);background:#fff;gap:1.25rem}@media(max-width:599.98px){:host{padding:1.25rem .9375rem}}:host .object-header-top{display:flex;align-items:flex-start;justify-content:space-between}:host .object-header-top .object-header-title{padding:2px;color:#171717;font-size:1.3125rem;font-weight:500}:host .object-header-top .object-header-toolbar{display:flex;align-items:center;column-gap:.5rem}:host .object-header-top .object-header-toolbar .button-icon{background:none}:host .object-header-top .object-header-toolbar .button-icon+.button-icon{margin-left:-.5rem}:host .object-header-top .object-header-toolbar .header-action-icon{color:#14516f;cursor:pointer;font-size:1.5rem}:host.in-dialog .object-header-toolbar{padding-right:2.5rem}:host .object-header-facets{position:relative;display:flex;flex-wrap:wrap;font-size:1.125rem;gap:1.25rem}:host .object-header-facets .object-header-facet{display:flex;min-width:3.75rem;flex-direction:column}:host .object-header-facets .object-header-facet.hasDivider{padding-left:1.25rem;border-left:.0625rem solid rgb(117,117,117)}:host .object-header-facets .object-header-facet.adaptiveFirst{padding-top:1.25rem}:host .object-header-facets .object-header-facet .facet-label{display:block;margin-bottom:0;color:#757575;font-size:.875rem;padding-bottom:.375rem;font-weight:500}:host .object-header-facets .facets-toggler{position:absolute;top:0;right:0;display:flex;align-items:center;padding-right:.3125rem;font-size:.625rem;line-height:.625rem}:host .object-header-facets.amongThemselves{display:grid}:host .object-header-facets.amongThemselves .object-header-facet.hasDivider{padding-left:0;border-top:.0625rem solid rgb(117,117,117);border-left:none}.loading-overlay{position:absolute;z-index:10000;inset:0;display:flex;align-items:center;justify-content:center;background-color:#0003}.no-selected-context{height:1.625rem;color:#979797;font-size:.875rem;line-height:1.625rem}.select-button{margin-top:.25rem}.adaptive-menu-button{display:flex;background:unset;color:#454545;font-size:2rem}.adaptive-menu-button:hover,.adaptive-menu-button:focus{color:#000}.adaptive-menu-entry{display:block;overflow:hidden;width:100%;min-height:2.25rem;padding:0 1rem;background:#fff0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adaptive-menu-entry:focus-visible{box-shadow:inset 0 0 0 2px #069;outline:none}.object-header-facets .object-header-facet{max-width:100%}@media(min-width:600px){.object-header-facets:not(.amongThemselves) .object-header-facet.qd-context-facet{max-width:max-content;flex:1 1 0}}\n"] }]
|
|
33791
|
-
}], propDecorators: { config: [{
|
|
33894
|
+
args: [{ selector: 'qd-page-object-header', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[style.borderBottom]': 'borderBottomStyle' }, standalone: false, template: "@if (isLoading$ | async) {\n<div class=\"loading-overlay\"><qd-spinner></qd-spinner></div>\n}\n\n<div class=\"object-header-top\">\n <header class=\"object-header-title\" [attr.data-test-id]=\"titleTestId\">{{ config.title.i18n | translate }}</header>\n <div class=\"object-header-toolbar\">\n <ng-content></ng-content>\n\n @if (showArchive$ | async) {\n <button class=\"button-icon\" data-test-id=\"archive-button\">\n <qd-icon (click)=\"archiveButton?.handler()\" class=\"header-action-icon\" [icon]=\"'resultNew'\"></qd-icon>\n </button>\n } @if (showDelete$ | async) {\n <button class=\"button-icon\" data-test-id=\"delete-button\">\n <qd-icon class=\"header-action-icon\" (click)=\"deleteButton?.handler()\" [icon]=\"'trash'\"></qd-icon>\n </button>\n } @if (showEdit$ | async) {\n <button qdButton (click)=\"edit()\" data-test-id=\"edit-button\">\n {{ editButton?.label?.i18n || \"i18n.qd.page.header.edit\" | translate }}\n </button>\n } @if (showCancel$ | async) {\n <button qdButton qdButtonGhost (click)=\"cancel()\" data-test-id=\"cancel-button\">\n {{ cancelButton.label?.i18n || \"i18n.qd.page.header.cancel\" | translate }}\n </button>\n } @if (showSave$ | async) {\n <button qdButton (click)=\"save()\" data-test-id=\"save-button\" [disabled]=\"($canSave | async) === false\">\n {{ saveButton.label?.i18n || \"i18n.qd.page.header.save\" | translate }}\n </button>\n } @if (customActions$ | async; as customActions) { @if (!adaptiveMode) { @if (customActions.actions.length > 1) {\n <button\n class=\"qd-desktop-actions\"\n [qdMenuButton]=\"customActions\"\n [autoSize]=\"false\"\n [data-test-id]=\"'page-'\"\n data-test-id=\"custom-button\"\n >\n {{ config?.customActionsLabel?.i18n || \"i18n.qd.page.header.actions\" | translate }}\n </button>\n } @else { @if ((customActions$ | async).actions[0]; as singleAction) { @if (singleAction.handler &&\n !singleAction.isHidden) {\n <button\n qdButton\n class=\"qd-desktop-actions\"\n [disabled]=\"singleAction.isDisabled\"\n (click)=\"singleAction.handler()\"\n data-test-id=\"custom-button\"\n >\n {{ singleAction.label?.i18n | translate }}\n </button>\n } } } @if (customActions.actions.length > 1 || visibleCustomActions(customActions).length > 0) { @let mobileLabel =\n (customActions.actions.length > 1 ? config?.customActionsLabel?.i18n || \"i18n.qd.page.header.actions\" :\n customActions.actions[0].label.i18n) | translate;\n <button\n type=\"button\"\n class=\"qd-mobile-actions\"\n data-test-id=\"custom-mobile-button\"\n [attr.aria-label]=\"mobileLabel\"\n [attr.title]=\"mobileLabel\"\n [disabled]=\"visibleCustomActions(customActions).length === 0\"\n [qdPopoverOnClick]=\"mobileMenu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverMinWidth]=\"200\"\n [qdPopoverMaxWidth]=\"300\"\n [qdPopoverFlipIntoViewport]=\"true\"\n [qdPopoverEnableKeyControl]=\"true\"\n [qdPopoverRestoreFocus]=\"true\"\n >\n <qd-icon icon=\"ctrlDown\"></qd-icon>\n </button>\n <ng-template #mobileMenu>\n @for (action of visibleCustomActions(customActions); track action) {\n <button class=\"adaptive-menu-entry\" type=\"button\" [disabled]=\"action.isDisabled\" (click)=\"action.handler()\">\n {{ action.label.i18n | translate }}\n </button>\n }\n </ng-template>\n } } @else { @if ((customActions$ | async)?.actions.length >= 1) {\n <button\n type=\"button\"\n class=\"adaptive-menu-button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverMinWidth]=\"160\"\n >\n <qd-icon icon=\"overflowMenuVertical\"></qd-icon>\n </button>\n }\n <ng-template #menu>\n @for (action of customActions.actions; track action; let i = $index) {\n <button class=\"adaptive-menu-entry\" type=\"button\" [disabled]=\"action.isDisabled\" (click)=\"action.handler()\">\n {{ action.label.i18n | translate }}\n </button>\n }\n </ng-template>\n } }\n </div>\n</div>\n\n<div class=\"object-header-facets\" [ngClass]=\"{ amongThemselves: adaptiveMode && !facetsCollapsed }\">\n @if (pageObjectData$ | async; as data) { @for (facet of headerFacets | slice : 0 : (adaptiveMode && facetsCollapsed ?\n 2 : headerFacets?.length ?? 0); track facet) {\n <div class=\"object-header-facet\" [attr.data-test-id]=\"testId + '-facet-' + facet.name\">\n <div class=\"facet-label\">{{ facet.label.i18n | translate }}</div>\n <qd-dynamic-facet\n class=\"dynamic-facet\"\n [facet]=\"facet\"\n [data]=\"data\"\n [testId]=\"testId + '-facet-' + facet.name\"\n ></qd-dynamic-facet>\n </div>\n } } @if (!config.hideContexts && contexts$ | async; as contexts) { @for ( context of contexts | slice : 0 :\n (adaptiveMode && facetsCollapsed ? 2 - (headerFacets?.length ?? 0) : contexts?.length); track context; let index =\n $index; let first = $first) {\n <div\n class=\"object-header-facet qd-context-facet\"\n [ngClass]=\"{ hasDivider: headerFacets && first, adaptiveFirst: headerFacets && adaptiveMode && first }\"\n [attr.data-test-id]=\"testId + '-context-facet-' + context.context.id\"\n >\n <div class=\"facet-label\">{{ context.label | translate }}</div>\n @if (context.value.length === 0) {\n <span class=\"no-selected-context\">{{ \"i18n.qd.page.context.noSelectionPlaceholder\" | translate }}</span>\n } @if (context.value.length !== 0) {\n <qd-context-selection-chip\n [selection]=\"context.value\"\n [removable]=\"isContextSelectable\"\n [testId]=\"testId + '-context-selection-' + context.context.id\"\n (selectionCleared)=\"clearContext(context.context)\"\n ></qd-context-selection-chip>\n } @if (isContextSelectable && (!facetsCollapsed || !adaptiveMode)) {\n <span class=\"select-button\">\n <button\n qdButton\n qdButtonLink\n type=\"button\"\n (click)=\"changeContext(context.context, context.selection, $event)\"\n [data-test-id]=\"'object-header-select-context-' + context.context.id\"\n >\n {{\n context.value.length !== 0\n ? (\"i18n.qd.page.context.button.change\" | translate)\n : (\"i18n.qd.page.context.button.select\" | translate)\n }}\n </button>\n </span>\n }\n </div>\n } } @if (contexts$ | async; as togglerContexts) { @if (adaptiveMode && headerFacets?.length + togglerContexts.length >\n 2) {\n <span class=\"facets-toggler\" [attr.data-test-id]=\"testId + '-facets-toggler'\">\n @if (facetsCollapsed) {\n <span [attr.data-test-id]=\"testId + '-facets-toggler-count'\"\n >+{{ headerFacets.length + togglerContexts.length - 2 }}</span\n >\n }\n <button qdIconButton [data-test-id]=\"'toggle-button'\">\n <qd-icon [icon]=\"facetsCollapsed ? 'ctrlDown' : 'ctrlTop'\"></qd-icon>\n </button>\n </span>\n } }\n</div>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;padding:1.25rem;border-bottom:.125rem solid rgb(213,213,213);background:#fff;container-type:inline-size;gap:1.25rem}@media(max-width:599.98px){:host{padding:1.25rem .9375rem}}:host .object-header-top{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;column-gap:1.5rem;row-gap:.75rem}:host .object-header-top .object-header-title{min-width:0;flex:1 1 min(var(--qd-title-natural-width, 16rem),16rem);padding:.125rem 0;margin-left:.125rem;color:#171717;font-size:1.3125rem;font-weight:500;line-height:1.509375rem;overflow-wrap:break-word}:host .object-header-top:has(>.object-header-toolbar>*) .object-header-title{padding:calc((2.25rem - 1.509375rem) / 2) 0}:host .object-header-top .object-header-toolbar{display:flex;min-width:0;max-width:100%;flex:0 1 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;margin-left:auto;gap:.5rem}:host .object-header-top .object-header-toolbar>*{max-width:100%;flex:none;white-space:nowrap}:host .object-header-top .object-header-toolbar .button-icon{background:none}:host .object-header-top .object-header-toolbar .button-icon+.button-icon{margin-left:-.5rem}:host .object-header-top .object-header-toolbar .header-action-icon{color:#14516f;cursor:pointer;font-size:1.5rem}:host .object-header-top .object-header-toolbar .qd-mobile-actions{display:flex;width:3.125rem;height:2.25rem;align-items:center;justify-content:center;padding:0;background:#069;color:#fff;cursor:pointer;font-size:1.125rem}:host .object-header-top .object-header-toolbar .qd-mobile-actions:hover{background:#14516f}:host .object-header-top .object-header-toolbar .qd-mobile-actions[disabled]{background:#d5d5d5;color:#979797;cursor:default}:host .object-header-top .object-header-toolbar .qd-mobile-actions qd-icon{line-height:1}:host.in-dialog .object-header-top{padding-right:2.5rem}:host .object-header-facets{position:relative;display:flex;flex-wrap:wrap;font-size:1.125rem;gap:1.25rem}:host .object-header-facets .object-header-facet{display:flex;min-width:3.75rem;flex-direction:column}:host .object-header-facets .object-header-facet.hasDivider{padding-left:1.25rem;border-left:.0625rem solid rgb(117,117,117)}:host .object-header-facets .object-header-facet.adaptiveFirst{padding-top:1.25rem}:host .object-header-facets .object-header-facet .facet-label{display:block;margin-bottom:0;color:#757575;font-size:.875rem;padding-bottom:.375rem;font-weight:500}:host .object-header-facets .facets-toggler{position:absolute;top:0;right:0;display:flex;align-items:center;padding-right:.3125rem;font-size:.625rem;line-height:.625rem}:host .object-header-facets.amongThemselves{display:grid}:host .object-header-facets.amongThemselves .object-header-facet.hasDivider{padding-left:0;border-top:.0625rem solid rgb(117,117,117);border-left:none}.loading-overlay{position:absolute;z-index:10000;inset:0;display:flex;align-items:center;justify-content:center;background-color:#0003}.no-selected-context{height:1.625rem;color:#979797;font-size:.875rem;line-height:1.625rem}.select-button{margin-top:.25rem}.adaptive-menu-button{display:flex;background:unset;color:#454545;font-size:2rem}.adaptive-menu-button:hover,.adaptive-menu-button:focus{color:#000}.adaptive-menu-entry{display:block;overflow:hidden;width:100%;min-height:2.25rem;padding:0 1rem;background:#fff0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adaptive-menu-entry:focus-visible{box-shadow:inset 0 0 0 2px #069;outline:none}.object-header-facets .object-header-facet{max-width:100%}@media(min-width:600px){.object-header-facets:not(.amongThemselves) .object-header-facet.qd-context-facet{max-width:max-content;flex:1 1 0}}@media(min-width:600px){@container (max-width: 559.98px){:host .object-header-top .object-header-toolbar .qd-desktop-actions{display:none}}@container (min-width: 560px){:host .object-header-top .object-header-toolbar .qd-mobile-actions{display:none}}}@media(max-width:599.98px){@container (max-width: 569.98px){:host .object-header-top .object-header-toolbar .qd-desktop-actions{display:none}}@container (min-width: 570px){:host .object-header-top .object-header-toolbar .qd-mobile-actions{display:none}}}\n"] }]
|
|
33895
|
+
}], ctorParameters: () => [], propDecorators: { config: [{
|
|
33792
33896
|
type: Input,
|
|
33793
33897
|
args: [{ required: true }]
|
|
33794
33898
|
}], hasNavigation: [{
|
|
@@ -33907,7 +34011,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
33907
34011
|
}]
|
|
33908
34012
|
}] });
|
|
33909
34013
|
|
|
33910
|
-
// @ts-strict-ignore
|
|
33911
34014
|
/**
|
|
33912
34015
|
* **QdPageStepHeader** renders the header of a single step. It is used quadrel-internally.
|
|
33913
34016
|
*/
|
|
@@ -33979,7 +34082,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
33979
34082
|
|
|
33980
34083
|
const QD_PAGE_STEP_RESOLVER_TOKEN = new InjectionToken('QD_PAGE_STEP_RESOLVER_TOKEN');
|
|
33981
34084
|
|
|
33982
|
-
// @ts-strict-ignore
|
|
33983
34085
|
/**
|
|
33984
34086
|
* The **QdPageStepper** allows linear navigation through process steps within a **QdPage**.
|
|
33985
34087
|
*
|
|
@@ -34031,10 +34133,11 @@ class QdPageStepperComponent extends CdkStepper {
|
|
|
34031
34133
|
if (this.footerService && (this.config?.submit || this.config?.cancel)) {
|
|
34032
34134
|
throw new Error('Quadrel Framework | QdPageStepper - When using <qd-page-stepper> inside <qd-page>, don\'t use the "submit" and "cancel" attributes. Instead, use the QdPageConfig.');
|
|
34033
34135
|
}
|
|
34034
|
-
|
|
34136
|
+
const footerService = this.footerService;
|
|
34137
|
+
if (footerService) {
|
|
34035
34138
|
this.selectedIndexChange
|
|
34036
34139
|
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
34037
|
-
.subscribe(() => this.updateFooterActionsVisibility());
|
|
34140
|
+
.subscribe(() => this.updateFooterActionsVisibility(footerService));
|
|
34038
34141
|
}
|
|
34039
34142
|
this.selectedStepValid$ = this.isSelectedStepValid$();
|
|
34040
34143
|
this.allStepsValid$ = this.areAllStepsValid$();
|
|
@@ -34047,9 +34150,9 @@ class QdPageStepperComponent extends CdkStepper {
|
|
|
34047
34150
|
ngAfterContentInit() {
|
|
34048
34151
|
super.ngAfterContentInit();
|
|
34049
34152
|
if (this.footerService) {
|
|
34050
|
-
this.setFooterActions();
|
|
34051
|
-
this.updateFooterActionsDisabledState();
|
|
34052
|
-
this.updateFooterActionsVisibility();
|
|
34153
|
+
this.setFooterActions(this.footerService);
|
|
34154
|
+
this.updateFooterActionsDisabledState(this.footerService);
|
|
34155
|
+
this.updateFooterActionsVisibility(this.footerService);
|
|
34053
34156
|
}
|
|
34054
34157
|
// Mark component for change detection whenever the content children query changes
|
|
34055
34158
|
this.steps.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this._stateChanged());
|
|
@@ -34057,9 +34160,9 @@ class QdPageStepperComponent extends CdkStepper {
|
|
|
34057
34160
|
handleClickHeader(step, clickedIndex) {
|
|
34058
34161
|
if (this.selectedIndex === clickedIndex)
|
|
34059
34162
|
return;
|
|
34060
|
-
if (this.selected
|
|
34163
|
+
if (this.selected?.stepControl && !this.selected.optional)
|
|
34061
34164
|
this.selected.stepControl.markAllAsTouched();
|
|
34062
|
-
if (this.selectedIndex < clickedIndex && !this.selected
|
|
34165
|
+
if (this.selectedIndex < clickedIndex && !this.selected?.optional && this.selected?.stepControl?.invalid)
|
|
34063
34166
|
return;
|
|
34064
34167
|
if (this.selectedIndex < clickedIndex) {
|
|
34065
34168
|
this.config?.next?.handler?.({ fromIndex: this.selectedIndex, toIndex: clickedIndex });
|
|
@@ -34074,9 +34177,9 @@ class QdPageStepperComponent extends CdkStepper {
|
|
|
34074
34177
|
this.previous();
|
|
34075
34178
|
}
|
|
34076
34179
|
nextStep() {
|
|
34077
|
-
if (this.selected
|
|
34180
|
+
if (this.selected?.stepControl && !this.selected.optional)
|
|
34078
34181
|
this.selected.stepControl.markAllAsTouched();
|
|
34079
|
-
if (!this.selected
|
|
34182
|
+
if (!this.selected?.optional && this.selected?.stepControl?.invalid)
|
|
34080
34183
|
return;
|
|
34081
34184
|
if (this.isGoingToNextStep)
|
|
34082
34185
|
return;
|
|
@@ -34179,7 +34282,7 @@ class QdPageStepperComponent extends CdkStepper {
|
|
|
34179
34282
|
return step.stepControl.statusChanges.pipe(startWith(step.stepControl.status), map(status => step.optional || status === 'VALID'));
|
|
34180
34283
|
}))), map(validities => validities.every(isValid => isValid)));
|
|
34181
34284
|
}
|
|
34182
|
-
setFooterActions() {
|
|
34285
|
+
setFooterActions(footerService) {
|
|
34183
34286
|
const actionsArray = [
|
|
34184
34287
|
{
|
|
34185
34288
|
key: 'previous',
|
|
@@ -34222,22 +34325,22 @@ class QdPageStepperComponent extends CdkStepper {
|
|
|
34222
34325
|
}
|
|
34223
34326
|
}
|
|
34224
34327
|
];
|
|
34225
|
-
|
|
34328
|
+
footerService.setActions(actionsArray);
|
|
34226
34329
|
}
|
|
34227
|
-
updateFooterActionsVisibility() {
|
|
34228
|
-
|
|
34330
|
+
updateFooterActionsVisibility(footerService) {
|
|
34331
|
+
footerService.updateActions([
|
|
34229
34332
|
{ actionKey: 'previous', partialAction: { isVisible: this.showPreviousButton(this.selectedIndex) } },
|
|
34230
34333
|
{ actionKey: 'next', partialAction: { isVisible: this.showNextButton(this.selectedIndex) } },
|
|
34231
34334
|
{ actionKey: 'submit', partialAction: { isVisible: this.showSubmitButton(this.selectedIndex) } }
|
|
34232
34335
|
]);
|
|
34233
34336
|
}
|
|
34234
|
-
updateFooterActionsDisabledState() {
|
|
34337
|
+
updateFooterActionsDisabledState(footerService) {
|
|
34235
34338
|
this.isSelectedStepValid$()
|
|
34236
34339
|
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
34237
|
-
.subscribe(isValid =>
|
|
34340
|
+
.subscribe(isValid => footerService.updateActions([{ actionKey: 'next', partialAction: { isDisabled: !isValid } }]));
|
|
34238
34341
|
this.areAllStepsValid$()
|
|
34239
34342
|
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
34240
|
-
.subscribe(isValid =>
|
|
34343
|
+
.subscribe(isValid => footerService.updateActions([{ actionKey: 'submit', partialAction: { isDisabled: !isValid } }]));
|
|
34241
34344
|
}
|
|
34242
34345
|
blockCdkInput(inputName) {
|
|
34243
34346
|
throw new Error(`Quadrel Framework | QdPageStepper - The "${inputName}" attribute is not allowed. Please use QdPageStepperConfig instead.`);
|
|
@@ -36301,13 +36404,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
36301
36404
|
}]
|
|
36302
36405
|
}] });
|
|
36303
36406
|
|
|
36304
|
-
// @ts-strict-ignore
|
|
36305
36407
|
class QdShellFooterComponent {
|
|
36306
36408
|
copyrightInfo;
|
|
36307
36409
|
isSticky;
|
|
36308
36410
|
currentYear = new Date().getFullYear();
|
|
36309
36411
|
get shouldShowYear() {
|
|
36310
|
-
return this.copyrightInfo && this.copyrightInfo.showYear !== false;
|
|
36412
|
+
return !!this.copyrightInfo && this.copyrightInfo.showYear !== false;
|
|
36311
36413
|
}
|
|
36312
36414
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdShellFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36313
36415
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdShellFooterComponent, isStandalone: false, selector: "[qd-shell-footer]", inputs: { copyrightInfo: "copyrightInfo", isSticky: "isSticky" }, host: { properties: { "class.sticky": "isSticky" } }, ngImport: i0, template: "@if (copyrightInfo?.i18n) { ©@if (shouldShowYear) {\n<span> {{ currentYear }}</span>\n} {{ copyrightInfo?.i18n | translate }}\n} @if (!copyrightInfo?.i18n) { © Created with ☕ by Quadrel }\n", styles: [":host{color:#757575;font-size:.875rem;font-weight:400;line-height:1.3125rem;z-index:999;display:block;height:2.5rem;align-self:end;padding:.625rem 1.25rem;border-top:.0625rem solid rgb(213,213,213);border-bottom:.0625rem solid rgb(213,213,213);background-color:#fff;grid-area:footer}:host.sticky{position:sticky;bottom:0}\n"], dependencies: [{ kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -36353,7 +36455,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
36353
36455
|
type: Injectable
|
|
36354
36456
|
}] });
|
|
36355
36457
|
|
|
36356
|
-
// @ts-strict-ignore
|
|
36357
36458
|
class QdShellHeaderBannerComponent {
|
|
36358
36459
|
bannerService = inject(QdShellBannerService);
|
|
36359
36460
|
get colorClassName() {
|
|
@@ -36378,7 +36479,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
36378
36479
|
args: ['class']
|
|
36379
36480
|
}] } });
|
|
36380
36481
|
|
|
36381
|
-
// @ts-strict-ignore
|
|
36382
36482
|
class QdCounterBadgeComponent {
|
|
36383
36483
|
/**
|
|
36384
36484
|
* A number that is displayed as a badge. Used by the shell toolbar.
|
|
@@ -36416,7 +36516,6 @@ const loadJavascriptAsset = (path, scriptElementAttributes = {}) => {
|
|
|
36416
36516
|
document.body.append(scriptElement);
|
|
36417
36517
|
};
|
|
36418
36518
|
|
|
36419
|
-
// @ts-strict-ignore
|
|
36420
36519
|
const LANG_PARAM_NAME = 'lang';
|
|
36421
36520
|
const FEATURE_LABEL = { name: 'Shell', plural: 'shells', isViewState: false };
|
|
36422
36521
|
class QdLanguageFromUrlService {
|
|
@@ -36447,15 +36546,17 @@ class QdLanguageFromUrlService {
|
|
|
36447
36546
|
});
|
|
36448
36547
|
}
|
|
36449
36548
|
getLanguageFromUrl() {
|
|
36450
|
-
|
|
36549
|
+
const activatedRoute = this.activatedRoute;
|
|
36550
|
+
if (!this.router || !activatedRoute)
|
|
36451
36551
|
return EMPTY;
|
|
36452
|
-
return this._navigationEnded$.pipe(switchMap$1(() =>
|
|
36552
|
+
return this._navigationEnded$.pipe(switchMap$1(() => activatedRoute.queryParams), filter(queryParams => queryParams.hasOwnProperty('lang')), map(queryParams => queryParams['lang']));
|
|
36453
36553
|
}
|
|
36454
36554
|
removeLangParameterFromUrlAfterNavigation() {
|
|
36455
|
-
|
|
36555
|
+
const activatedRoute = this.activatedRoute;
|
|
36556
|
+
if (!this.router || !activatedRoute)
|
|
36456
36557
|
return;
|
|
36457
36558
|
this._navigationPending$
|
|
36458
|
-
.pipe(debounceTime(300), filter(navigationPending => !navigationPending), switchMap$1(() =>
|
|
36559
|
+
.pipe(debounceTime(300), filter(navigationPending => !navigationPending), switchMap$1(() => activatedRoute.queryParams), take(1))
|
|
36459
36560
|
.subscribe(queryParams => {
|
|
36460
36561
|
if (!queryParams[LANG_PARAM_NAME] || !this._ownsLangParam)
|
|
36461
36562
|
return;
|
|
@@ -36769,7 +36870,8 @@ class QdShellServiceNavigationComponent {
|
|
|
36769
36870
|
.getLanguageFromUrl()
|
|
36770
36871
|
.pipe(delayWhen(() => this._attributesHaveBeenSet$), filter(languageFromUrl => this.languageList.includes(languageFromUrl)), takeUntilDestroyed(this._destroyRef))
|
|
36771
36872
|
.subscribe(languageFromUrl => {
|
|
36772
|
-
this.serviceNavigationService.config
|
|
36873
|
+
if (this.serviceNavigationService.config)
|
|
36874
|
+
this.serviceNavigationService.config.defaultLanguage = languageFromUrl;
|
|
36773
36875
|
this.translateService.setDefaultLang(languageFromUrl);
|
|
36774
36876
|
this.serviceNavigation.nativeElement.setAttribute('default-language', languageFromUrl);
|
|
36775
36877
|
this.serviceNavigation.nativeElement.setAttribute('language', languageFromUrl);
|
|
@@ -36871,7 +36973,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
36871
36973
|
}]
|
|
36872
36974
|
}] });
|
|
36873
36975
|
|
|
36874
|
-
// @ts-strict-ignore
|
|
36875
36976
|
class QdNavigationService {
|
|
36876
36977
|
router = inject(Router);
|
|
36877
36978
|
activatedRoute = inject(ActivatedRoute);
|
|
@@ -36923,7 +37024,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
36923
37024
|
type: Injectable
|
|
36924
37025
|
}], ctorParameters: () => [] });
|
|
36925
37026
|
|
|
36926
|
-
// @ts-strict-ignore
|
|
36927
37027
|
class QdShellLeftService {
|
|
36928
37028
|
_hasNavigation = new BehaviorSubject(false);
|
|
36929
37029
|
_isNavigationPinned = new BehaviorSubject(false);
|
|
@@ -36932,7 +37032,7 @@ class QdShellLeftService {
|
|
|
36932
37032
|
isNavigationPinned$ = this._isNavigationPinned.asObservable();
|
|
36933
37033
|
isNavigationRolledOver$ = this._isNavigationRolledOver.asObservable();
|
|
36934
37034
|
set config(config) {
|
|
36935
|
-
this._hasNavigation.next(config.navigation?.length > 0);
|
|
37035
|
+
this._hasNavigation.next((config.navigation?.length ?? 0) > 0);
|
|
36936
37036
|
}
|
|
36937
37037
|
set isNavigationRolledOver(value) {
|
|
36938
37038
|
this._isNavigationRolledOver.next(value);
|
|
@@ -36987,7 +37087,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
36987
37087
|
type: Injectable
|
|
36988
37088
|
}], ctorParameters: () => [] });
|
|
36989
37089
|
|
|
36990
|
-
// @ts-strict-ignore
|
|
36991
37090
|
class QdShellHeaderMinimizationService {
|
|
36992
37091
|
navigationService = inject(QdNavigationService);
|
|
36993
37092
|
breakpointService = inject(QdBreakpointService);
|
|
@@ -37033,7 +37132,6 @@ function qdRestoresOverviewAddress(previousHref) {
|
|
|
37033
37132
|
return typeof previousHref === 'function' && previousHref[MARKER] === true;
|
|
37034
37133
|
}
|
|
37035
37134
|
|
|
37036
|
-
// @ts-strict-ignore
|
|
37037
37135
|
class QdShellToolbarItemComponent {
|
|
37038
37136
|
/**
|
|
37039
37137
|
* Configuration of a single item for the shell toolbar.
|
|
@@ -37053,7 +37151,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
37053
37151
|
type: Input
|
|
37054
37152
|
}] } });
|
|
37055
37153
|
|
|
37056
|
-
// @ts-strict-ignore
|
|
37057
37154
|
class QdShellToolbarComponent {
|
|
37058
37155
|
/**
|
|
37059
37156
|
* The configuration of the shell toolbar.
|
|
@@ -37235,7 +37332,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
37235
37332
|
args: ['class.expanded']
|
|
37236
37333
|
}] } });
|
|
37237
37334
|
|
|
37238
|
-
// @ts-strict-ignore
|
|
37239
37335
|
class QdShellNavigationLinkComponent {
|
|
37240
37336
|
config;
|
|
37241
37337
|
handleClick() {
|
|
@@ -37258,7 +37354,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
37258
37354
|
type: Input
|
|
37259
37355
|
}] } });
|
|
37260
37356
|
|
|
37261
|
-
// @ts-strict-ignore
|
|
37262
37357
|
class QdShellNavigationComponent {
|
|
37263
37358
|
config;
|
|
37264
37359
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdShellNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -37293,7 +37388,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
37293
37388
|
type: Input
|
|
37294
37389
|
}] } });
|
|
37295
37390
|
|
|
37296
|
-
// @ts-strict-ignore
|
|
37297
37391
|
/**
|
|
37298
37392
|
* **QdShellNotificationComponent** displays a single notification item within a **qd-shell-notifications** container.
|
|
37299
37393
|
*/
|
|
@@ -37377,7 +37471,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
37377
37471
|
args: ['class']
|
|
37378
37472
|
}] } });
|
|
37379
37473
|
|
|
37380
|
-
// @ts-strict-ignore
|
|
37381
37474
|
class QdShellNotificationsComponent {
|
|
37382
37475
|
notificationService = inject(QdNotificationsService);
|
|
37383
37476
|
notifications$;
|
|
@@ -38315,7 +38408,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
38315
38408
|
}]
|
|
38316
38409
|
}] });
|
|
38317
38410
|
|
|
38318
|
-
// @ts-strict-ignore
|
|
38319
38411
|
/**
|
|
38320
38412
|
* The **QdPageStep** is a single step inside the **QdPageStepper** within a **QdPage**.
|
|
38321
38413
|
*
|
|
@@ -38358,7 +38450,7 @@ class QdPageStepComponent extends CdkStep {
|
|
|
38358
38450
|
ngOnChanges(changes) {
|
|
38359
38451
|
super.ngOnChanges();
|
|
38360
38452
|
['label', 'editable', 'optional', 'errorMessage', 'state', 'completed', 'hasError']
|
|
38361
|
-
.filter(input => changes[input])
|
|
38453
|
+
.filter(input => changes?.[input])
|
|
38362
38454
|
.forEach(input => this.blockCdkInput(input));
|
|
38363
38455
|
}
|
|
38364
38456
|
blockCdkInput(inputName) {
|