@fundamental-ngx/core 0.59.1-rc.9 → 0.59.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/fundamental-ngx-core-avatar-group-legacy.mjs +33 -50
- package/fesm2022/fundamental-ngx-core-avatar-group-legacy.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs +9 -11
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar.mjs +206 -293
- package/fesm2022/fundamental-ngx-core-avatar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs +25 -12
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-calendar.mjs +11 -14
- package/fesm2022/fundamental-ngx-core-calendar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-card.mjs +13 -26
- package/fesm2022/fundamental-ngx-core-card.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-carousel.mjs +11 -11
- package/fesm2022/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs +33 -7
- package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +13 -17
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs +32 -24
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-fixed-card-layout.mjs +28 -30
- package/fesm2022/fundamental-ngx-core-fixed-card-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-grid-list.mjs +12 -10
- package/fesm2022/fundamental-ngx-core-grid-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs +202 -100
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-layout-panel.mjs +72 -231
- package/fesm2022/fundamental-ngx-core-layout-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-list.mjs +12 -12
- package/fesm2022/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +28 -28
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-strip.mjs +85 -84
- package/fesm2022/fundamental-ngx-core-message-strip.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs +21 -24
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +19 -12
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +46 -39
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-nested-list.mjs +66 -103
- package/fesm2022/fundamental-ngx-core-nested-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-notification.mjs +10 -12
- package/fesm2022/fundamental-ngx-core-notification.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-marker.mjs +69 -59
- package/fesm2022/fundamental-ngx-core-object-marker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-status.mjs +92 -118
- package/fesm2022/fundamental-ngx-core-object-status.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-overflow-layout.mjs +27 -29
- package/fesm2022/fundamental-ngx-core-overflow-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs +17 -18
- package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-panel.mjs +7 -9
- package/fesm2022/fundamental-ngx-core-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +10 -15
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-product-switch.mjs +12 -15
- package/fesm2022/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs +18 -20
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs +8 -11
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +6 -8
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-settings.mjs +9 -12
- package/fesm2022/fundamental-ngx-core-settings.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +48 -34
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-slider.mjs +30 -31
- package/fesm2022/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-status-indicator.mjs +137 -131
- package/fesm2022/fundamental-ngx-core-status-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tabs.mjs +21 -17
- package/fesm2022/fundamental-ngx-core-tabs.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tile.mjs +375 -631
- package/fesm2022/fundamental-ngx-core-tile.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time.mjs +7 -9
- package/fesm2022/fundamental-ngx-core-time.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-token.mjs +11 -13
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-toolbar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tree.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-tree.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-user-menu.mjs +63 -21
- package/fesm2022/fundamental-ngx-core-user-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-wizard.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-wizard.mjs.map +1 -1
- package/package.json +4 -4
- package/types/fundamental-ngx-core-avatar-group-legacy.d.ts +15 -17
- package/types/fundamental-ngx-core-avatar-group.d.ts +1 -1
- package/types/fundamental-ngx-core-avatar.d.ts +66 -86
- package/types/fundamental-ngx-core-breadcrumb.d.ts +13 -5
- package/types/fundamental-ngx-core-calendar.d.ts +3 -4
- package/types/fundamental-ngx-core-card.d.ts +4 -11
- package/types/fundamental-ngx-core-carousel.d.ts +3 -3
- package/types/fundamental-ngx-core-combobox.d.ts +8 -1
- package/types/fundamental-ngx-core-dialog.d.ts +2 -4
- package/types/fundamental-ngx-core-dynamic-page.d.ts +0 -6
- package/types/fundamental-ngx-core-fixed-card-layout.d.ts +7 -7
- package/types/fundamental-ngx-core-grid-list.d.ts +6 -4
- package/types/fundamental-ngx-core-illustrated-message.d.ts +165 -31
- package/types/fundamental-ngx-core-layout-panel.d.ts +19 -131
- package/types/fundamental-ngx-core-list.d.ts +8 -6
- package/types/fundamental-ngx-core-menu.d.ts +16 -13
- package/types/fundamental-ngx-core-message-strip.d.ts +5 -2
- package/types/fundamental-ngx-core-micro-process-flow.d.ts +8 -6
- package/types/fundamental-ngx-core-multi-combobox.d.ts +8 -5
- package/types/fundamental-ngx-core-multi-input.d.ts +24 -16
- package/types/fundamental-ngx-core-nested-list.d.ts +19 -33
- package/types/fundamental-ngx-core-notification.d.ts +2 -2
- package/types/fundamental-ngx-core-object-marker.d.ts +47 -27
- package/types/fundamental-ngx-core-object-status.d.ts +49 -48
- package/types/fundamental-ngx-core-overflow-layout.d.ts +10 -10
- package/types/fundamental-ngx-core-pagination.d.ts +7 -8
- package/types/fundamental-ngx-core-panel.d.ts +2 -4
- package/types/fundamental-ngx-core-popover.d.ts +7 -5
- package/types/fundamental-ngx-core-product-switch.d.ts +5 -4
- package/types/fundamental-ngx-core-resizable-card-layout.d.ts +10 -8
- package/types/fundamental-ngx-core-segmented-button.d.ts +5 -4
- package/types/fundamental-ngx-core-select.d.ts +4 -5
- package/types/fundamental-ngx-core-settings.d.ts +7 -10
- package/types/fundamental-ngx-core-shellbar.d.ts +23 -14
- package/types/fundamental-ngx-core-slider.d.ts +18 -13
- package/types/fundamental-ngx-core-status-indicator.d.ts +42 -58
- package/types/fundamental-ngx-core-tabs.d.ts +9 -7
- package/types/fundamental-ngx-core-tile.d.ts +114 -243
- package/types/fundamental-ngx-core-time.d.ts +5 -4
- package/types/fundamental-ngx-core-token.d.ts +5 -4
- package/types/fundamental-ngx-core-tree.d.ts +1 -1
- package/types/fundamental-ngx-core-user-menu.d.ts +25 -21
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Overlay } from '@angular/cdk/overlay';
|
|
2
2
|
import * as i1 from '@angular/cdk/portal';
|
|
3
|
-
import { ComponentPortal, PortalModule, DomPortal, TemplatePortal
|
|
3
|
+
import { ComponentPortal, PortalModule, CdkPortalOutlet, DomPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, inject, DestroyRef,
|
|
5
|
+
import { InjectionToken, input, signal, inject, DestroyRef, effect, Injector, Component, computed, viewChildren, ViewEncapsulation, Directive, EventEmitter, booleanAttribute, ContentChild, Output, Input, HostBinding, ChangeDetectionStrategy, ElementRef, isDevMode, ViewContainerRef, Renderer2, TemplateRef, ViewChild, Injectable, NgModule } from '@angular/core';
|
|
6
6
|
import { applyCssClass, destroyObservable, ViewportSizeObservable, ResponsiveBreakpoints } from '@fundamental-ngx/cdk/utils';
|
|
7
7
|
import { FD_LANGUAGE, TranslationResolver, I18nModule, patchLanguage } from '@fundamental-ngx/i18n';
|
|
8
|
-
import {
|
|
9
|
-
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
8
|
+
import { of, map, withLatestFrom, merge, fromEvent, startWith, Observable, takeUntil, filter, BehaviorSubject, Subject, combineLatest, tap } from 'rxjs';
|
|
10
9
|
import { ScrollbarDirective } from '@fundamental-ngx/core/scrollbar';
|
|
11
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
10
|
+
import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
11
|
import { Router, NavigationStart } from '@angular/router';
|
|
13
12
|
import { switchMap } from 'rxjs/operators';
|
|
14
13
|
import { __decorate, __metadata } from 'tslib';
|
|
14
|
+
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
15
15
|
import { ButtonComponent } from '@fundamental-ngx/core/button';
|
|
16
16
|
import { ContentDensityDirective } from '@fundamental-ngx/core/content-density';
|
|
17
17
|
import { IconComponent } from '@fundamental-ngx/core/icon';
|
|
@@ -52,7 +52,15 @@ const MessageStripAlertComponentData = new InjectionToken('MessageStripAlertComp
|
|
|
52
52
|
* it will be empty.
|
|
53
53
|
*/
|
|
54
54
|
class MessageStripAlertContainerFooterComponent {
|
|
55
|
+
/** @hidden */
|
|
55
56
|
constructor() {
|
|
57
|
+
/** @hidden */
|
|
58
|
+
this.alertRefs = input([], ...(ngDevMode ? [{ debugName: "alertRefs" }] : []));
|
|
59
|
+
/**
|
|
60
|
+
* Reference to the user provided component's portal.
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
this._footerComponentPortal = signal(undefined, ...(ngDevMode ? [{ debugName: "_footerComponentPortal" }] : []));
|
|
56
64
|
/**
|
|
57
65
|
* Position of the overlay in which this component is rendered.
|
|
58
66
|
*/
|
|
@@ -62,43 +70,77 @@ class MessageStripAlertContainerFooterComponent {
|
|
|
62
70
|
/** @hidden */
|
|
63
71
|
this.messageStripAlertService = inject(MessageStripAlertService);
|
|
64
72
|
/**
|
|
65
|
-
*
|
|
73
|
+
* Footer component from service as signal.
|
|
66
74
|
*/
|
|
67
|
-
this.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
/** @hidden */
|
|
74
|
-
ngAfterViewInit() {
|
|
75
|
-
this.messageStripAlertService.footerComponents$
|
|
76
|
-
.pipe(map((components) => components[this.position]), tap((footerComponent) => {
|
|
75
|
+
this._footerComponent = toSignal(this.messageStripAlertService.footerComponents$, { initialValue: {} });
|
|
76
|
+
// Convert alertRefs signal to observable in injection context
|
|
77
|
+
this._alertRefs$ = toObservable(this.alertRefs).pipe(takeUntilDestroyed(this._destroyRef));
|
|
78
|
+
effect(() => {
|
|
79
|
+
const footerComponent = this._footerComponent()[this.position];
|
|
77
80
|
if (footerComponent) {
|
|
78
|
-
this.
|
|
81
|
+
this._footerComponentPortal.set(new ComponentPortal(footerComponent, null, Injector.create({
|
|
79
82
|
providers: [
|
|
80
83
|
{
|
|
81
84
|
provide: MessageStripAlertContainerAlertRefs,
|
|
82
|
-
useValue: this.
|
|
85
|
+
useValue: this._alertRefs$
|
|
83
86
|
}
|
|
84
87
|
]
|
|
85
|
-
}));
|
|
88
|
+
})));
|
|
86
89
|
}
|
|
87
90
|
else {
|
|
88
|
-
this.
|
|
91
|
+
this._footerComponentPortal.set(undefined);
|
|
89
92
|
}
|
|
90
|
-
})
|
|
91
|
-
.subscribe();
|
|
93
|
+
});
|
|
92
94
|
}
|
|
93
95
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
96
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: MessageStripAlertContainerFooterComponent, isStandalone: true, selector: "fd-message-strip-alert-container-footer", inputs: { alertRefs: { classPropertyName: "alertRefs", publicName: "alertRefs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: ` <ng-template [cdkPortalOutlet]="_footerComponentPortal()"></ng-template> `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
|
|
95
97
|
}
|
|
96
98
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerFooterComponent, decorators: [{
|
|
97
99
|
type: Component,
|
|
98
|
-
args: [{ selector: 'fd-message-strip-alert-container-footer', template: ` <ng-template [cdkPortalOutlet]="
|
|
99
|
-
}], propDecorators: { alertRefs: [{
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
args: [{ selector: 'fd-message-strip-alert-container-footer', template: ` <ng-template [cdkPortalOutlet]="_footerComponentPortal()"></ng-template> `, imports: [PortalModule], styles: [":host{display:block}\n"] }]
|
|
101
|
+
}], ctorParameters: () => [], propDecorators: { alertRefs: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertRefs", required: false }] }] } });
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* This will be rendered in the overlay. It is responsible for rendering the alerts and the footer.
|
|
105
|
+
*/
|
|
106
|
+
class MessageStripAlertContainerComponent {
|
|
107
|
+
constructor() {
|
|
108
|
+
/**
|
|
109
|
+
* The list of the elements that are attached to the container.
|
|
110
|
+
*/
|
|
111
|
+
this.attachedElements = signal([], ...(ngDevMode ? [{ debugName: "attachedElements" }] : []));
|
|
112
|
+
/**
|
|
113
|
+
* List of the rendered message strip alerts. It is used in the footer and is injected into the
|
|
114
|
+
* user-provided footer component portal. This way, user has full control over the container alerts.
|
|
115
|
+
* @hidden
|
|
116
|
+
*/
|
|
117
|
+
this._alertRefs = computed(() => this._portalOutlets()
|
|
118
|
+
.map((p) => p.attachedRef?.instance?.alertRef)
|
|
119
|
+
.filter((ref) => !!ref), ...(ngDevMode ? [{ debugName: "_alertRefs" }] : []));
|
|
120
|
+
/** @hidden */
|
|
121
|
+
this._portalOutlets = viewChildren(CdkPortalOutlet, ...(ngDevMode ? [{ debugName: "_portalOutlets" }] : []));
|
|
122
|
+
}
|
|
123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
124
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: MessageStripAlertContainerComponent, isStandalone: true, selector: "fd-message-strip-alert-container", viewQueries: [{ propertyName: "_portalOutlets", predicate: CdkPortalOutlet, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
125
|
+
<div fdScrollbar>
|
|
126
|
+
@for (portal of attachedElements(); track portal) {
|
|
127
|
+
<ng-template [cdkPortalOutlet]="portal"></ng-template>
|
|
128
|
+
}
|
|
129
|
+
</div>
|
|
130
|
+
<fd-message-strip-alert-container-footer [alertRefs]="_alertRefs()"></fd-message-strip-alert-container-footer>
|
|
131
|
+
`, isInline: true, styles: [".fd-message-strip-alert-overlay{max-width:33.33vw;padding:.5rem}.fd-message-strip-alert-overlay--top{top:0;max-height:100vh}.fd-message-strip-alert-overlay--top.fd-message-strip-alert-overlay--bottom-opened{max-height:50vh}.fd-message-strip-alert-overlay--bottom{top:initial;bottom:0;max-height:100vh}.fd-message-strip-alert-overlay--bottom fd-message-strip-alert-container{flex-direction:column-reverse}.fd-message-strip-alert-overlay--bottom.fd-message-strip-alert-overlay--top-opened{max-height:50vh}.fd-message-strip-alert-overlay--start{left:0}.fd-message-strip-alert-overlay--middle{left:33.33vw;width:33.33vw}@media screen and (max-width:992px){.fd-message-strip-alert-overlay--middle{left:5vw;width:90vw;max-width:90vw}}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container{width:100%}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container>.fd-scrollbar>*{width:fit-content;margin:0 auto}.fd-message-strip-alert-overlay--end{right:0}.fd-message-strip-alert-overlay fd-message-strip-alert-container{display:flex;flex-direction:column}.fd-message-strip-alert-overlay fd-message-strip-alert-container div[fdscrollbar]{width:100%;display:flex;padding:.5rem;gap:.75rem;flex-direction:column;max-height:100%}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: ScrollbarDirective, selector: "[fdScrollbar], [fd-scrollbar]", inputs: ["noHorizontalScroll", "noVerticalScroll", "alwaysVisible"] }, { kind: "component", type: MessageStripAlertContainerFooterComponent, selector: "fd-message-strip-alert-container-footer", inputs: ["alertRefs"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
132
|
+
}
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerComponent, decorators: [{
|
|
134
|
+
type: Component,
|
|
135
|
+
args: [{ selector: 'fd-message-strip-alert-container', template: `
|
|
136
|
+
<div fdScrollbar>
|
|
137
|
+
@for (portal of attachedElements(); track portal) {
|
|
138
|
+
<ng-template [cdkPortalOutlet]="portal"></ng-template>
|
|
139
|
+
}
|
|
140
|
+
</div>
|
|
141
|
+
<fd-message-strip-alert-container-footer [alertRefs]="_alertRefs()"></fd-message-strip-alert-container-footer>
|
|
142
|
+
`, encapsulation: ViewEncapsulation.None, imports: [PortalModule, ScrollbarDirective, MessageStripAlertContainerFooterComponent], styles: [".fd-message-strip-alert-overlay{max-width:33.33vw;padding:.5rem}.fd-message-strip-alert-overlay--top{top:0;max-height:100vh}.fd-message-strip-alert-overlay--top.fd-message-strip-alert-overlay--bottom-opened{max-height:50vh}.fd-message-strip-alert-overlay--bottom{top:initial;bottom:0;max-height:100vh}.fd-message-strip-alert-overlay--bottom fd-message-strip-alert-container{flex-direction:column-reverse}.fd-message-strip-alert-overlay--bottom.fd-message-strip-alert-overlay--top-opened{max-height:50vh}.fd-message-strip-alert-overlay--start{left:0}.fd-message-strip-alert-overlay--middle{left:33.33vw;width:33.33vw}@media screen and (max-width:992px){.fd-message-strip-alert-overlay--middle{left:5vw;width:90vw;max-width:90vw}}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container{width:100%}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container>.fd-scrollbar>*{width:fit-content;margin:0 auto}.fd-message-strip-alert-overlay--end{right:0}.fd-message-strip-alert-overlay fd-message-strip-alert-container{display:flex;flex-direction:column}.fd-message-strip-alert-overlay fd-message-strip-alert-container div[fdscrollbar]{width:100%;display:flex;padding:.5rem;gap:.75rem;flex-direction:column;max-height:100%}\n"] }]
|
|
143
|
+
}], propDecorators: { _portalOutlets: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });
|
|
102
144
|
|
|
103
145
|
class MessageStripIconDirective {
|
|
104
146
|
/** @hidden */
|
|
@@ -321,8 +363,11 @@ class AutoDismissMessageStripDirective {
|
|
|
321
363
|
this.duration = 10000;
|
|
322
364
|
/** Whether the alert should stay open if the mouse is hovering over it. */
|
|
323
365
|
this.mousePersist = false;
|
|
324
|
-
/**
|
|
325
|
-
|
|
366
|
+
/**
|
|
367
|
+
* Whether the message strip is currently opened.
|
|
368
|
+
* @hidden
|
|
369
|
+
*/
|
|
370
|
+
this._opened = signal(false, ...(ngDevMode ? [{ debugName: "_opened" }] : []));
|
|
326
371
|
/** @hidden */
|
|
327
372
|
this.messageStripComponent = inject(MessageStripComponent, { optional: false, host: true });
|
|
328
373
|
/** @hidden */
|
|
@@ -345,7 +390,7 @@ class AutoDismissMessageStripDirective {
|
|
|
345
390
|
}
|
|
346
391
|
/** @hidden */
|
|
347
392
|
open() {
|
|
348
|
-
this.
|
|
393
|
+
this._opened.set(true);
|
|
349
394
|
this.elementRef.nativeElement.classList.remove('fd-has-display-block');
|
|
350
395
|
this.elementRef.nativeElement.classList.remove('fd-has-display-none');
|
|
351
396
|
this.stopAutoDismiss();
|
|
@@ -380,7 +425,7 @@ class AutoDismissMessageStripDirective {
|
|
|
380
425
|
}
|
|
381
426
|
}
|
|
382
427
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AutoDismissMessageStripDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
383
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.1.0", type: AutoDismissMessageStripDirective, isStandalone: true, selector: "fd-message-strip[mousePersist], fd-message-strip[duration], fd-message-strip[autoDismiss]", inputs: { dismissible: ["dismissible", "dismissible", booleanAttribute], autoDismiss: ["autoDismiss", "autoDismiss", booleanAttribute], duration: "duration", mousePersist: ["mousePersist", "mousePersist", booleanAttribute] }, host: { properties: { "style.display": "!
|
|
428
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.1.0", type: AutoDismissMessageStripDirective, isStandalone: true, selector: "fd-message-strip[mousePersist], fd-message-strip[duration], fd-message-strip[autoDismiss]", inputs: { dismissible: ["dismissible", "dismissible", booleanAttribute], autoDismiss: ["autoDismiss", "autoDismiss", booleanAttribute], duration: "duration", mousePersist: ["mousePersist", "mousePersist", booleanAttribute] }, host: { properties: { "style.display": "!_opened() ? \"none\" : null" } }, exportAs: ["fdAutoDismissMessageStrip"], ngImport: i0 }); }
|
|
384
429
|
}
|
|
385
430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AutoDismissMessageStripDirective, decorators: [{
|
|
386
431
|
type: Directive,
|
|
@@ -390,7 +435,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
390
435
|
exportAs: 'fdAutoDismissMessageStrip',
|
|
391
436
|
standalone: true,
|
|
392
437
|
host: {
|
|
393
|
-
'[style.display]': '!
|
|
438
|
+
'[style.display]': '!_opened() ? "none" : null'
|
|
394
439
|
}
|
|
395
440
|
}]
|
|
396
441
|
}], propDecorators: { dismissible: [{
|
|
@@ -471,54 +516,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
471
516
|
args: [AutoDismissMessageStripDirective]
|
|
472
517
|
}] } });
|
|
473
518
|
|
|
474
|
-
/**
|
|
475
|
-
* This will be rendered in the overlay. It is responsible for rendering the alerts and the footer.
|
|
476
|
-
*/
|
|
477
|
-
class MessageStripAlertContainerComponent {
|
|
478
|
-
constructor() {
|
|
479
|
-
/**
|
|
480
|
-
* The list of the elements that are attached to the container.
|
|
481
|
-
*/
|
|
482
|
-
this.attachedElements = [];
|
|
483
|
-
}
|
|
484
|
-
/** @hidden */
|
|
485
|
-
ngAfterViewInit() {
|
|
486
|
-
this.alertRefs$ = this.portalOutlets.changes.pipe(startWith(this.portalOutlets), map(() => this.portalOutlets
|
|
487
|
-
.toArray()
|
|
488
|
-
.map((p) => p.attachedRef?.instance.alertRef)));
|
|
489
|
-
}
|
|
490
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
491
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: MessageStripAlertContainerComponent, isStandalone: true, selector: "fd-message-strip-alert-container", viewQueries: [{ propertyName: "portalOutlets", predicate: CdkPortalOutlet, descendants: true }, { propertyName: "alerts", predicate: MessageStripAlertComponent, descendants: true }], ngImport: i0, template: `
|
|
492
|
-
<div fdScrollbar>
|
|
493
|
-
@for (portal of attachedElements; track portal) {
|
|
494
|
-
<ng-template [cdkPortalOutlet]="portal"></ng-template>
|
|
495
|
-
}
|
|
496
|
-
</div>
|
|
497
|
-
<fd-message-strip-alert-container-footer
|
|
498
|
-
[alertRefs]="alertRefs$ | async"
|
|
499
|
-
></fd-message-strip-alert-container-footer>
|
|
500
|
-
`, isInline: true, styles: [".fd-message-strip-alert-overlay{max-width:33.33vw;padding:.5rem}.fd-message-strip-alert-overlay--top{top:0;max-height:100vh}.fd-message-strip-alert-overlay--top.fd-message-strip-alert-overlay--bottom-opened{max-height:50vh}.fd-message-strip-alert-overlay--bottom{top:initial;bottom:0;max-height:100vh}.fd-message-strip-alert-overlay--bottom fd-message-strip-alert-container{flex-direction:column-reverse}.fd-message-strip-alert-overlay--bottom.fd-message-strip-alert-overlay--top-opened{max-height:50vh}.fd-message-strip-alert-overlay--start{left:0}.fd-message-strip-alert-overlay--middle{left:33.33vw;width:33.33vw}@media screen and (max-width:992px){.fd-message-strip-alert-overlay--middle{left:5vw;width:90vw;max-width:90vw}}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container{width:100%}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container>.fd-scrollbar>*{width:fit-content;margin:0 auto}.fd-message-strip-alert-overlay--end{right:0}.fd-message-strip-alert-overlay fd-message-strip-alert-container{display:flex;flex-direction:column}.fd-message-strip-alert-overlay fd-message-strip-alert-container div[fdscrollbar]{width:100%;display:flex;padding:.5rem;gap:.75rem;flex-direction:column;max-height:100%}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: ScrollbarDirective, selector: "[fdScrollbar], [fd-scrollbar]", inputs: ["noHorizontalScroll", "noVerticalScroll", "alwaysVisible"] }, { kind: "component", type: MessageStripAlertContainerFooterComponent, selector: "fd-message-strip-alert-container-footer", inputs: ["alertRefs"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
501
|
-
}
|
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerComponent, decorators: [{
|
|
503
|
-
type: Component,
|
|
504
|
-
args: [{ selector: 'fd-message-strip-alert-container', template: `
|
|
505
|
-
<div fdScrollbar>
|
|
506
|
-
@for (portal of attachedElements; track portal) {
|
|
507
|
-
<ng-template [cdkPortalOutlet]="portal"></ng-template>
|
|
508
|
-
}
|
|
509
|
-
</div>
|
|
510
|
-
<fd-message-strip-alert-container-footer
|
|
511
|
-
[alertRefs]="alertRefs$ | async"
|
|
512
|
-
></fd-message-strip-alert-container-footer>
|
|
513
|
-
`, encapsulation: ViewEncapsulation.None, imports: [PortalModule, ScrollbarDirective, MessageStripAlertContainerFooterComponent, AsyncPipe], styles: [".fd-message-strip-alert-overlay{max-width:33.33vw;padding:.5rem}.fd-message-strip-alert-overlay--top{top:0;max-height:100vh}.fd-message-strip-alert-overlay--top.fd-message-strip-alert-overlay--bottom-opened{max-height:50vh}.fd-message-strip-alert-overlay--bottom{top:initial;bottom:0;max-height:100vh}.fd-message-strip-alert-overlay--bottom fd-message-strip-alert-container{flex-direction:column-reverse}.fd-message-strip-alert-overlay--bottom.fd-message-strip-alert-overlay--top-opened{max-height:50vh}.fd-message-strip-alert-overlay--start{left:0}.fd-message-strip-alert-overlay--middle{left:33.33vw;width:33.33vw}@media screen and (max-width:992px){.fd-message-strip-alert-overlay--middle{left:5vw;width:90vw;max-width:90vw}}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container{width:100%}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container>.fd-scrollbar>*{width:fit-content;margin:0 auto}.fd-message-strip-alert-overlay--end{right:0}.fd-message-strip-alert-overlay fd-message-strip-alert-container{display:flex;flex-direction:column}.fd-message-strip-alert-overlay fd-message-strip-alert-container div[fdscrollbar]{width:100%;display:flex;padding:.5rem;gap:.75rem;flex-direction:column;max-height:100%}\n"] }]
|
|
514
|
-
}], propDecorators: { portalOutlets: [{
|
|
515
|
-
type: ViewChildren,
|
|
516
|
-
args: [CdkPortalOutlet]
|
|
517
|
-
}], alerts: [{
|
|
518
|
-
type: ViewChildren,
|
|
519
|
-
args: [MessageStripAlertComponent]
|
|
520
|
-
}] } });
|
|
521
|
-
|
|
522
519
|
/**
|
|
523
520
|
* Service that is responsible for opening and closing message strip alerts.
|
|
524
521
|
* This should be only created once in entire application.
|
|
@@ -635,8 +632,7 @@ class MessageStripAlertService {
|
|
|
635
632
|
topSectionIsOpened = topSectionIsOpened || position.startsWith('top');
|
|
636
633
|
bottomSectionIsOpened = bottomSectionIsOpened || position.startsWith('bottom');
|
|
637
634
|
const { containerRef } = this.getOverlayRef(position);
|
|
638
|
-
containerRef.instance.attachedElements
|
|
639
|
-
containerRef.changeDetectorRef.detectChanges();
|
|
635
|
+
containerRef.instance.attachedElements.set(portals);
|
|
640
636
|
});
|
|
641
637
|
this.syncExistingOverlays(messageAlertsByPosition, bottomSectionIsOpened, topSectionIsOpened);
|
|
642
638
|
}))
|
|
@@ -645,12 +641,16 @@ class MessageStripAlertService {
|
|
|
645
641
|
/** @hidden */
|
|
646
642
|
syncExistingOverlays(messageAlertsByPosition, bottomSectionIsOpened, topSectionIsOpened) {
|
|
647
643
|
Object.keys(this._overlayRefs).forEach((position) => {
|
|
644
|
+
const overlayRef = this._overlayRefs[position];
|
|
645
|
+
if (!overlayRef) {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
648
|
if (!messageAlertsByPosition[position]) {
|
|
649
|
-
|
|
649
|
+
overlayRef.ref.dispose();
|
|
650
650
|
delete this._overlayRefs[position];
|
|
651
651
|
}
|
|
652
652
|
else {
|
|
653
|
-
const ref =
|
|
653
|
+
const ref = overlayRef.ref;
|
|
654
654
|
if (position.startsWith('top')) {
|
|
655
655
|
if (bottomSectionIsOpened) {
|
|
656
656
|
ref.overlayElement.classList.add('fd-message-strip-alert-overlay--bottom-opened');
|
|
@@ -686,6 +686,7 @@ class MessageStripAlertService {
|
|
|
686
686
|
})));
|
|
687
687
|
this._overlayRefs[position] = { ref: overlayRef, containerRef };
|
|
688
688
|
}
|
|
689
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
689
690
|
return this._overlayRefs[position];
|
|
690
691
|
}
|
|
691
692
|
/** @hidden */
|