@quadrel-enterprise-ui/framework 21.19.2 → 21.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25679,6 +25679,204 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
25679
25679
|
}]
|
|
25680
25680
|
}] });
|
|
25681
25681
|
|
|
25682
|
+
/**
|
|
25683
|
+
* Converts a point in time of a `QdTimeSpan` to a timestamp in milliseconds.
|
|
25684
|
+
*
|
|
25685
|
+
* Returns `null` when the value is missing or cannot be parsed, e.g. `'21.10.2026 10:00'`.
|
|
25686
|
+
*/
|
|
25687
|
+
function qdToTimestamp(value) {
|
|
25688
|
+
if (value === undefined || value === null)
|
|
25689
|
+
return null;
|
|
25690
|
+
const timestamp = new Date(value).getTime();
|
|
25691
|
+
return Number.isNaN(timestamp) ? null : timestamp;
|
|
25692
|
+
}
|
|
25693
|
+
/**
|
|
25694
|
+
* Returns the duration of a `QdTimeSpan` in milliseconds.
|
|
25695
|
+
*
|
|
25696
|
+
* Returns `0` when the time span is missing, a point in time is invalid or `endsAt` is not after `startsAt`.
|
|
25697
|
+
*/
|
|
25698
|
+
function qdTimeSpanDuration(timeSpan) {
|
|
25699
|
+
const startsAt = qdToTimestamp(timeSpan?.startsAt);
|
|
25700
|
+
const endsAt = qdToTimestamp(timeSpan?.endsAt);
|
|
25701
|
+
if (startsAt === null || endsAt === null)
|
|
25702
|
+
return 0;
|
|
25703
|
+
return Math.max(0, endsAt - startsAt);
|
|
25704
|
+
}
|
|
25705
|
+
/**
|
|
25706
|
+
* Returns the time left until `endsAt` of a `QdTimeSpan` in milliseconds, at most the duration of the time span.
|
|
25707
|
+
*
|
|
25708
|
+
* Returns `0` when the time span has ended, is empty or is invalid.
|
|
25709
|
+
*/
|
|
25710
|
+
function qdTimeSpanRemaining(timeSpan) {
|
|
25711
|
+
const endsAt = qdToTimestamp(timeSpan?.endsAt) ?? 0;
|
|
25712
|
+
return Math.min(qdTimeSpanDuration(timeSpan), Math.max(0, endsAt - Date.now()));
|
|
25713
|
+
}
|
|
25714
|
+
/**
|
|
25715
|
+
* Formats a number of seconds as a duration in the given locale, e.g. `04:05` (`'digital'`) or `4 min, 5 s` (`'short'`).
|
|
25716
|
+
* Hours are only shown when there are hours left.
|
|
25717
|
+
*
|
|
25718
|
+
* Uses `Intl.DurationFormat`. Where the browser does not support it yet, a simple fallback formats the duration.
|
|
25719
|
+
*/
|
|
25720
|
+
function qdFormatDuration(totalSeconds, locale, format) {
|
|
25721
|
+
const wholeSeconds = Math.max(0, Math.floor(totalSeconds));
|
|
25722
|
+
const parts = {
|
|
25723
|
+
hours: Math.floor(wholeSeconds / 3600),
|
|
25724
|
+
minutes: Math.floor((wholeSeconds % 3600) / 60),
|
|
25725
|
+
seconds: wholeSeconds % 60
|
|
25726
|
+
};
|
|
25727
|
+
const DurationFormat = Intl.DurationFormat;
|
|
25728
|
+
if (DurationFormat) {
|
|
25729
|
+
const options = { style: format, hoursDisplay: 'auto' };
|
|
25730
|
+
const formatter = new DurationFormat(locale, wholeSeconds === 0 ? { ...options, secondsDisplay: 'always' } : options);
|
|
25731
|
+
return formatter.format(parts);
|
|
25732
|
+
}
|
|
25733
|
+
return format === 'digital' ? formatDigitalFallback(parts) : formatShortFallback(parts, locale);
|
|
25734
|
+
}
|
|
25735
|
+
function formatDigitalFallback({ hours, minutes, seconds }) {
|
|
25736
|
+
const paddedMinutes = minutes.toString().padStart(2, '0');
|
|
25737
|
+
const paddedSeconds = seconds.toString().padStart(2, '0');
|
|
25738
|
+
return hours === 0 ? `${paddedMinutes}:${paddedSeconds}` : `${hours}:${paddedMinutes}:${paddedSeconds}`;
|
|
25739
|
+
}
|
|
25740
|
+
function formatShortFallback(parts, locale) {
|
|
25741
|
+
const hasNoTimeLeft = parts.hours === 0 && parts.minutes === 0 && parts.seconds === 0;
|
|
25742
|
+
const units = ['hours', 'minutes', 'seconds'].filter(unit => parts[unit] > 0 || (unit === 'seconds' && hasNoTimeLeft));
|
|
25743
|
+
const formattedUnits = units.map(unit => new Intl.NumberFormat(locale, { style: 'unit', unit: unit.slice(0, -1), unitDisplay: 'short' }).format(parts[unit]));
|
|
25744
|
+
return new Intl.ListFormat(locale, { type: 'unit', style: 'short' }).format(formattedUnits);
|
|
25745
|
+
}
|
|
25746
|
+
|
|
25747
|
+
/**
|
|
25748
|
+
* **QdTimerProgressBar** displays a countdown to a point in time, e.g. the end of a reaction time.
|
|
25749
|
+
*
|
|
25750
|
+
* The countdown runs until `timeSpan.endsAt`. The remaining time is `endsAt` minus the current time of the client, so
|
|
25751
|
+
* reloading the page does not restart the countdown. A time span that has already ended shows an empty bar and emits
|
|
25752
|
+
* `countdownExpired` right away. Before `timeSpan.startsAt` the bar stays full.
|
|
25753
|
+
* The remaining time is derived from the clock on every tick, so it is correct again on the next tick after the
|
|
25754
|
+
* browser has throttled the page. In a background tab the browser can delay the ticks by up to a minute, so the display
|
|
25755
|
+
* and `countdownExpired` can be late there. The bar empties continuously and shows the remaining time inside the bar.
|
|
25756
|
+
*
|
|
25757
|
+
* The remaining time is formatted with `Intl.DurationFormat` in the language of the application, which the service
|
|
25758
|
+
* navigation sets. `format` chooses between a digital clock (`04:05`) and abbreviated units (`4 min, 5 s`).
|
|
25759
|
+
*
|
|
25760
|
+
* The ticks run outside the Angular zone and only update the timer progress bar itself, so a running countdown does
|
|
25761
|
+
* not trigger change detection for the whole application every second. `countdownExpired` is emitted inside the
|
|
25762
|
+
* Angular zone and always asynchronously, so a host can update its template in response.
|
|
25763
|
+
*
|
|
25764
|
+
* This component is internal to the framework and not part of the public API.
|
|
25765
|
+
*/
|
|
25766
|
+
class QdTimerProgressBarComponent {
|
|
25767
|
+
/**
|
|
25768
|
+
* The configuration of the timer progress bar, e.g. the `timeSpan` of the countdown.
|
|
25769
|
+
*/
|
|
25770
|
+
config;
|
|
25771
|
+
/**
|
|
25772
|
+
* A static test ID for integration tests can be set. <br />
|
|
25773
|
+
* The value for the HTML attribute [data-test-id].
|
|
25774
|
+
*/
|
|
25775
|
+
testId = 'timer-progress-bar';
|
|
25776
|
+
/**
|
|
25777
|
+
* Emits once when the countdown reaches 0.
|
|
25778
|
+
* Also emits once, right after the config is set, when the time span has already ended, is empty or is invalid.
|
|
25779
|
+
*/
|
|
25780
|
+
countdownExpired = new EventEmitter();
|
|
25781
|
+
get dataTestId() {
|
|
25782
|
+
return this.testId;
|
|
25783
|
+
}
|
|
25784
|
+
get hostClasses() {
|
|
25785
|
+
return `qd-timer-progress-bar-${this.state}`;
|
|
25786
|
+
}
|
|
25787
|
+
state = 'critical';
|
|
25788
|
+
remainingSeconds = 0;
|
|
25789
|
+
percentage = 0;
|
|
25790
|
+
formattedTime = '';
|
|
25791
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
25792
|
+
_destroyRef = inject(DestroyRef);
|
|
25793
|
+
_ngZone = inject(NgZone);
|
|
25794
|
+
_localeService = inject(QdLocaleService, { optional: true });
|
|
25795
|
+
_locale = navigator.language;
|
|
25796
|
+
_format = 'digital';
|
|
25797
|
+
_duration = 0;
|
|
25798
|
+
_remaining = 0;
|
|
25799
|
+
_countdown;
|
|
25800
|
+
ngOnInit() {
|
|
25801
|
+
this._localeService?.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
|
|
25802
|
+
this._locale = locale;
|
|
25803
|
+
this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
|
|
25804
|
+
this._changeDetectorRef.markForCheck();
|
|
25805
|
+
});
|
|
25806
|
+
}
|
|
25807
|
+
ngOnChanges(changes) {
|
|
25808
|
+
if (!changes['config'])
|
|
25809
|
+
return;
|
|
25810
|
+
this.state = this.config?.state ?? 'critical';
|
|
25811
|
+
this._format = this.config?.format ?? 'digital';
|
|
25812
|
+
this._duration = qdTimeSpanDuration(this.config?.timeSpan);
|
|
25813
|
+
this.updateData();
|
|
25814
|
+
this.startCountdown();
|
|
25815
|
+
}
|
|
25816
|
+
startCountdown() {
|
|
25817
|
+
this._countdown?.unsubscribe();
|
|
25818
|
+
if (this.remainingSeconds === 0) {
|
|
25819
|
+
this._countdown = timer(0)
|
|
25820
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
25821
|
+
.subscribe(() => this.countdownExpired.emit());
|
|
25822
|
+
return;
|
|
25823
|
+
}
|
|
25824
|
+
this._countdown = this._ngZone.runOutsideAngular(() => timer(this._remaining % 1000 || 1000, 1000)
|
|
25825
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
25826
|
+
.subscribe(() => this.tick()));
|
|
25827
|
+
}
|
|
25828
|
+
tick() {
|
|
25829
|
+
this.updateData();
|
|
25830
|
+
this._changeDetectorRef.detectChanges();
|
|
25831
|
+
if (this.remainingSeconds > 0)
|
|
25832
|
+
return;
|
|
25833
|
+
this._countdown?.unsubscribe();
|
|
25834
|
+
this._ngZone.run(() => this.countdownExpired.emit());
|
|
25835
|
+
}
|
|
25836
|
+
updateData() {
|
|
25837
|
+
this._remaining = qdTimeSpanRemaining(this.config?.timeSpan);
|
|
25838
|
+
this.remainingSeconds = Math.ceil(this._remaining / 1000);
|
|
25839
|
+
this.percentage = this._duration > 0 ? (this._remaining / this._duration) * 100 : 0;
|
|
25840
|
+
this.formattedTime = qdFormatDuration(this.remainingSeconds, this._locale, this._format);
|
|
25841
|
+
}
|
|
25842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: QdTimerProgressBarComponent, isStandalone: false, selector: "qd-timer-progress-bar", inputs: { config: "config", testId: ["data-test-id", "testId"] }, outputs: { countdownExpired: "countdownExpired" }, host: { properties: { "attr.data-test-id": "this.dataTestId", "class": "this.hostClasses" } }, usesOnChanges: true, ngImport: i0, template: "<span class=\"qd-timer-progress-bar-container\" role=\"timer\" [attr.aria-label]=\"formattedTime\">\n <span\n class=\"qd-timer-progress-bar-progress\"\n [style.width.%]=\"percentage\"\n [attr.data-test-id]=\"testId + '-progress'\"\n ></span>\n <span class=\"qd-timer-progress-bar-value\" [attr.data-test-id]=\"testId + '-value'\">{{ formattedTime }}</span>\n</span>\n", styles: [":host{display:block}:host .qd-timer-progress-bar-container{position:relative;display:flex;overflow:hidden;width:100%;min-width:7rem;height:1.625rem;box-sizing:border-box;align-items:center;justify-content:center;padding:0 .5rem;border-radius:.8125rem}:host .qd-timer-progress-bar-progress{position:absolute;top:0;bottom:0;left:0;transition:width 1s linear}:host .qd-timer-progress-bar-value{position:relative;font-size:.8125rem;font-weight:400;white-space:nowrap}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{border:.0625rem solid rgb(117,117,117)}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-container{background:#6ebee6;color:#fff}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-progress{background:#069}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-container{background:#00813a80;color:#fff}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-progress{background:#00813a}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-container{background:#c7002380;color:#fff}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-progress{background:#c70023}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{background:#fff;color:#171717}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-progress{background:#e5e5e5}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25844
|
+
}
|
|
25845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarComponent, decorators: [{
|
|
25846
|
+
type: Component,
|
|
25847
|
+
args: [{ selector: 'qd-timer-progress-bar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<span class=\"qd-timer-progress-bar-container\" role=\"timer\" [attr.aria-label]=\"formattedTime\">\n <span\n class=\"qd-timer-progress-bar-progress\"\n [style.width.%]=\"percentage\"\n [attr.data-test-id]=\"testId + '-progress'\"\n ></span>\n <span class=\"qd-timer-progress-bar-value\" [attr.data-test-id]=\"testId + '-value'\">{{ formattedTime }}</span>\n</span>\n", styles: [":host{display:block}:host .qd-timer-progress-bar-container{position:relative;display:flex;overflow:hidden;width:100%;min-width:7rem;height:1.625rem;box-sizing:border-box;align-items:center;justify-content:center;padding:0 .5rem;border-radius:.8125rem}:host .qd-timer-progress-bar-progress{position:absolute;top:0;bottom:0;left:0;transition:width 1s linear}:host .qd-timer-progress-bar-value{position:relative;font-size:.8125rem;font-weight:400;white-space:nowrap}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{border:.0625rem solid rgb(117,117,117)}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-container{background:#6ebee6;color:#fff}:host(.qd-timer-progress-bar-info) .qd-timer-progress-bar-progress{background:#069}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-container{background:#00813a80;color:#fff}:host(.qd-timer-progress-bar-positive) .qd-timer-progress-bar-progress{background:#00813a}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-container{background:#c7002380;color:#fff}:host(.qd-timer-progress-bar-critical) .qd-timer-progress-bar-progress{background:#c70023}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-container{background:#fff;color:#171717}:host(.qd-timer-progress-bar-neutral) .qd-timer-progress-bar-progress{background:#e5e5e5}\n"] }]
|
|
25848
|
+
}], propDecorators: { config: [{
|
|
25849
|
+
type: Input
|
|
25850
|
+
}], testId: [{
|
|
25851
|
+
type: Input,
|
|
25852
|
+
args: ['data-test-id']
|
|
25853
|
+
}], countdownExpired: [{
|
|
25854
|
+
type: Output
|
|
25855
|
+
}], dataTestId: [{
|
|
25856
|
+
type: HostBinding,
|
|
25857
|
+
args: ['attr.data-test-id']
|
|
25858
|
+
}], hostClasses: [{
|
|
25859
|
+
type: HostBinding,
|
|
25860
|
+
args: ['class']
|
|
25861
|
+
}] } });
|
|
25862
|
+
|
|
25863
|
+
/**
|
|
25864
|
+
* Internal module of the timer progress bar. It is deliberately not part of the public API.
|
|
25865
|
+
* Consumers use the timer through a configuration, e.g. the page object header facet of type `timer`.
|
|
25866
|
+
*/
|
|
25867
|
+
class QdTimerProgressBarModule {
|
|
25868
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
25869
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, declarations: [QdTimerProgressBarComponent], exports: [QdTimerProgressBarComponent] });
|
|
25870
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule });
|
|
25871
|
+
}
|
|
25872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerProgressBarModule, decorators: [{
|
|
25873
|
+
type: NgModule,
|
|
25874
|
+
args: [{
|
|
25875
|
+
declarations: [QdTimerProgressBarComponent],
|
|
25876
|
+
exports: [QdTimerProgressBarComponent]
|
|
25877
|
+
}]
|
|
25878
|
+
}] });
|
|
25879
|
+
|
|
25682
25880
|
const updateStateWithNewSearch = (state, searchId, newSearch) => ({
|
|
25683
25881
|
...state,
|
|
25684
25882
|
[searchId]: newSearch
|
|
@@ -32391,6 +32589,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
32391
32589
|
type: Input
|
|
32392
32590
|
}] } });
|
|
32393
32591
|
|
|
32592
|
+
/**
|
|
32593
|
+
* **QdTimerFacet** shows the time span of a page object in the page object header.
|
|
32594
|
+
*
|
|
32595
|
+
* The facet value is a `QdTimeSpan` or `null`:
|
|
32596
|
+
* - `endsAt` after `startsAt` and in the future: a timer progress bar counts down to `endsAt`.
|
|
32597
|
+
* A page reload does not restart the countdown.
|
|
32598
|
+
* - Countdown expired: `startsAt` is shown as date and time in the language of the application, also when the page is
|
|
32599
|
+
* opened after the end.
|
|
32600
|
+
* - `endsAt` not after `startsAt` or not parsable: `startsAt` is shown as date.
|
|
32601
|
+
* - `null` or a `startsAt` that cannot be parsed: nothing is shown.
|
|
32602
|
+
*
|
|
32603
|
+
* `state` and `format` from the facet options are passed to the timer progress bar.
|
|
32604
|
+
*
|
|
32605
|
+
* The timer config is only rebuilt when the time span or the facet changes.
|
|
32606
|
+
*/
|
|
32607
|
+
class QdTimerFacetComponent {
|
|
32608
|
+
set facet(facet) {
|
|
32609
|
+
this._facet = facet;
|
|
32610
|
+
this.updateData(true);
|
|
32611
|
+
}
|
|
32612
|
+
get facet() {
|
|
32613
|
+
return this._facet;
|
|
32614
|
+
}
|
|
32615
|
+
set data(data) {
|
|
32616
|
+
this._data = data;
|
|
32617
|
+
this.updateData();
|
|
32618
|
+
}
|
|
32619
|
+
get data() {
|
|
32620
|
+
return this._data;
|
|
32621
|
+
}
|
|
32622
|
+
testId;
|
|
32623
|
+
config = null;
|
|
32624
|
+
startsAt = null;
|
|
32625
|
+
endsAt = null;
|
|
32626
|
+
hasDuration = false;
|
|
32627
|
+
formattedStartsAt = '';
|
|
32628
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
32629
|
+
_destroyRef = inject(DestroyRef);
|
|
32630
|
+
_localeService = inject(QdLocaleService);
|
|
32631
|
+
_facet;
|
|
32632
|
+
_data;
|
|
32633
|
+
_locale = navigator.language;
|
|
32634
|
+
ngOnInit() {
|
|
32635
|
+
this._localeService.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
|
|
32636
|
+
this._locale = locale;
|
|
32637
|
+
this.updateFormattedStartsAt();
|
|
32638
|
+
this._changeDetectorRef.markForCheck();
|
|
32639
|
+
});
|
|
32640
|
+
}
|
|
32641
|
+
handleCountdownExpired() {
|
|
32642
|
+
this.config = null;
|
|
32643
|
+
}
|
|
32644
|
+
updateData(facetChanged = false) {
|
|
32645
|
+
if (!this._facet || !this._data)
|
|
32646
|
+
return;
|
|
32647
|
+
const timeSpan = this._data[this._facet.name];
|
|
32648
|
+
const startsAt = qdToTimestamp(timeSpan?.startsAt);
|
|
32649
|
+
const endsAt = qdToTimestamp(timeSpan?.endsAt);
|
|
32650
|
+
if (!facetChanged && startsAt === this.startsAt && endsAt === this.endsAt)
|
|
32651
|
+
return;
|
|
32652
|
+
const { state, format } = this._facet.options;
|
|
32653
|
+
this.startsAt = startsAt;
|
|
32654
|
+
this.endsAt = endsAt;
|
|
32655
|
+
this.hasDuration = qdTimeSpanDuration(timeSpan) > 0;
|
|
32656
|
+
this.updateFormattedStartsAt();
|
|
32657
|
+
this.config = qdTimeSpanRemaining(timeSpan) > 0 ? { timeSpan: timeSpan, state, format } : null;
|
|
32658
|
+
}
|
|
32659
|
+
updateFormattedStartsAt() {
|
|
32660
|
+
if (this.startsAt === null)
|
|
32661
|
+
return;
|
|
32662
|
+
this.formattedStartsAt = new Intl.DateTimeFormat(this._locale, { dateStyle: 'medium', timeStyle: 'short' }).format(this.startsAt);
|
|
32663
|
+
}
|
|
32664
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerFacetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32665
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: QdTimerFacetComponent, isStandalone: false, selector: "qd-timer-facet", inputs: { facet: "facet", data: "data", testId: "testId" }, ngImport: i0, template: "@if (config) {\n<qd-timer-progress-bar\n [config]=\"config\"\n [data-test-id]=\"testId + '-timer'\"\n (countdownExpired)=\"handleCountdownExpired()\"\n></qd-timer-progress-bar>\n} @else if (hasDuration) {\n<span class=\"timer-facet-date\" [attr.data-test-id]=\"testId + '-date'\">{{ formattedStartsAt }}</span>\n} @else if (startsAt !== null) {\n<span class=\"timer-facet-date\" [attr.data-test-id]=\"testId + '-date'\">{{ startsAt | date }}</span>\n}\n", styles: [":host{display:block}:host .timer-facet-date{font-weight:500}: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"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
32666
|
+
}
|
|
32667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: QdTimerFacetComponent, decorators: [{
|
|
32668
|
+
type: Component,
|
|
32669
|
+
args: [{ selector: 'qd-timer-facet', standalone: false, template: "@if (config) {\n<qd-timer-progress-bar\n [config]=\"config\"\n [data-test-id]=\"testId + '-timer'\"\n (countdownExpired)=\"handleCountdownExpired()\"\n></qd-timer-progress-bar>\n} @else if (hasDuration) {\n<span class=\"timer-facet-date\" [attr.data-test-id]=\"testId + '-date'\">{{ formattedStartsAt }}</span>\n} @else if (startsAt !== null) {\n<span class=\"timer-facet-date\" [attr.data-test-id]=\"testId + '-date'\">{{ startsAt | date }}</span>\n}\n", styles: [":host{display:block}:host .timer-facet-date{font-weight:500}:host qd-timer-progress-bar{width:fit-content}\n"] }]
|
|
32670
|
+
}], propDecorators: { facet: [{
|
|
32671
|
+
type: Input
|
|
32672
|
+
}], data: [{
|
|
32673
|
+
type: Input
|
|
32674
|
+
}], testId: [{
|
|
32675
|
+
type: Input
|
|
32676
|
+
}] } });
|
|
32677
|
+
|
|
32394
32678
|
class QdValueFacetComponent {
|
|
32395
32679
|
facet;
|
|
32396
32680
|
data;
|
|
@@ -32419,6 +32703,7 @@ class QdDynamicFacetsService {
|
|
|
32419
32703
|
['references', QdReferencesFacetComponent],
|
|
32420
32704
|
['singleSelect', QdSingleSelectFacetComponent],
|
|
32421
32705
|
['status', QdStatusFacetComponent],
|
|
32706
|
+
['timer', QdTimerFacetComponent],
|
|
32422
32707
|
['value', QdValueFacetComponent]
|
|
32423
32708
|
]);
|
|
32424
32709
|
static getInstance() {
|
|
@@ -35622,6 +35907,7 @@ class QdPageModule {
|
|
|
35622
35907
|
QdDynamicFacetDirective,
|
|
35623
35908
|
QdCriticalityFacetComponent,
|
|
35624
35909
|
QdProgressFacetComponent,
|
|
35910
|
+
QdTimerFacetComponent,
|
|
35625
35911
|
QdReferencesFacetComponent,
|
|
35626
35912
|
QdConnectFormStateToPageDirective,
|
|
35627
35913
|
QdPageFooterCustomContentDirective,
|
|
@@ -35642,6 +35928,7 @@ class QdPageModule {
|
|
|
35642
35928
|
QdSpinnerModule,
|
|
35643
35929
|
QdStatusIndicatorModule,
|
|
35644
35930
|
QdTableModule,
|
|
35931
|
+
QdTimerProgressBarModule,
|
|
35645
35932
|
QdTextSectionModule,
|
|
35646
35933
|
QdSearchModule,
|
|
35647
35934
|
QdPopoverModule,
|
|
@@ -35674,6 +35961,7 @@ class QdPageModule {
|
|
|
35674
35961
|
QdSpinnerModule,
|
|
35675
35962
|
QdStatusIndicatorModule,
|
|
35676
35963
|
QdTableModule,
|
|
35964
|
+
QdTimerProgressBarModule,
|
|
35677
35965
|
QdTextSectionModule,
|
|
35678
35966
|
QdSearchModule,
|
|
35679
35967
|
QdPopoverModule,
|
|
@@ -35697,6 +35985,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
35697
35985
|
QdSpinnerModule,
|
|
35698
35986
|
QdStatusIndicatorModule,
|
|
35699
35987
|
QdTableModule,
|
|
35988
|
+
QdTimerProgressBarModule,
|
|
35700
35989
|
QdTextSectionModule,
|
|
35701
35990
|
QdSearchModule,
|
|
35702
35991
|
QdPopoverModule,
|
|
@@ -35718,6 +36007,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
35718
36007
|
QdDynamicFacetDirective,
|
|
35719
36008
|
QdCriticalityFacetComponent,
|
|
35720
36009
|
QdProgressFacetComponent,
|
|
36010
|
+
QdTimerFacetComponent,
|
|
35721
36011
|
QdReferencesFacetComponent,
|
|
35722
36012
|
QdConnectFormStateToPageDirective,
|
|
35723
36013
|
QdPageFooterCustomContentDirective,
|