@coreui/angular-pro 5.5.7 → 5.5.8
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.
|
@@ -17584,22 +17584,19 @@ class ToastComponent {
|
|
|
17584
17584
|
* @return boolean
|
|
17585
17585
|
*/
|
|
17586
17586
|
visibleInput = input(false, ...(ngDevMode ? [{ debugName: "visibleInput", transform: booleanAttribute, alias: 'visible' }] : [{ transform: booleanAttribute, alias: 'visible' }]));
|
|
17587
|
-
#
|
|
17588
|
-
|
|
17589
|
-
|
|
17587
|
+
#visible = linkedSignal(this.visibleInput);
|
|
17588
|
+
#visibleEffect = effect(() => {
|
|
17589
|
+
const newValue = this.#visible();
|
|
17590
|
+
newValue ? this.setTimer() : this.clearTimer();
|
|
17591
|
+
this.visibleChange?.emit(newValue);
|
|
17592
|
+
this.changeDetectorRef.markForCheck();
|
|
17593
|
+
}, ...(ngDevMode ? [{ debugName: "#visibleEffect" }] : []));
|
|
17590
17594
|
set visible(value) {
|
|
17591
|
-
|
|
17592
|
-
if (this.#visible !== newValue) {
|
|
17593
|
-
this.#visible = newValue;
|
|
17594
|
-
newValue ? this.setTimer() : this.clearTimer();
|
|
17595
|
-
this.visibleChange?.emit(newValue);
|
|
17596
|
-
this.changeDetectorRef.markForCheck();
|
|
17597
|
-
}
|
|
17595
|
+
this.#visible.set(value);
|
|
17598
17596
|
}
|
|
17599
17597
|
get visible() {
|
|
17600
|
-
return this.#visible;
|
|
17598
|
+
return this.#visible();
|
|
17601
17599
|
}
|
|
17602
|
-
#visible = false;
|
|
17603
17600
|
/**
|
|
17604
17601
|
* @ignore
|
|
17605
17602
|
*/
|
|
@@ -17841,6 +17838,11 @@ class ToasterComponent {
|
|
|
17841
17838
|
position = input('absolute', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
17842
17839
|
toasterHost = viewChild.required(ToasterHostDirective);
|
|
17843
17840
|
contentToasts = contentChildren(ToastComponent, ...(ngDevMode ? [{ debugName: "contentToasts", read: ViewContainerRef }] : [{ read: ViewContainerRef }]));
|
|
17841
|
+
#contentToastsEffect = effect(() => {
|
|
17842
|
+
// Ensure that the contentToasts is available before accessing it
|
|
17843
|
+
// temp fix for: ASSERTION ERROR: Unexpected state: no hydration info available for a given TNode, which represents a view container. [Expected=> null != undefined <=Actual]
|
|
17844
|
+
this.contentToasts();
|
|
17845
|
+
}, ...(ngDevMode ? [{ debugName: "#contentToastsEffect" }] : []));
|
|
17844
17846
|
hostClasses = computed(() => {
|
|
17845
17847
|
const placement = this.placement;
|
|
17846
17848
|
const position = this.position();
|
|
@@ -17888,7 +17890,7 @@ class ToasterComponent {
|
|
|
17888
17890
|
this.contentToasts()?.forEach((item) => {
|
|
17889
17891
|
if (state.toast && item.element.nativeElement === state.toast.hostElement.nativeElement) {
|
|
17890
17892
|
if (!state.toast.dynamic()) {
|
|
17891
|
-
state.toast
|
|
17893
|
+
state.toast.visible = false;
|
|
17892
17894
|
}
|
|
17893
17895
|
}
|
|
17894
17896
|
});
|
|
@@ -17904,14 +17906,14 @@ class ToasterComponent {
|
|
|
17904
17906
|
});
|
|
17905
17907
|
}
|
|
17906
17908
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ToasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17907
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.6", type: ToasterComponent, isStandalone: true, selector: "c-toaster", inputs: { placementInput: { classPropertyName: "placementInput", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" }, classAttribute: "toaster toast-container" }, queries: [{ propertyName: "contentToasts", predicate: ToastComponent, read: ViewContainerRef, isSignal: true }], viewQueries: [{ propertyName: "toasterHost", first: true, predicate: ToasterHostDirective, descendants: true, isSignal: true }], exportAs: ["cToaster"], ngImport: i0, template: "<ng-template cToasterHost />\n<ng-content
|
|
17909
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.6", type: ToasterComponent, isStandalone: true, selector: "c-toaster", inputs: { placementInput: { classPropertyName: "placementInput", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" }, classAttribute: "toaster toast-container" }, providers: [ToasterService], queries: [{ propertyName: "contentToasts", predicate: ToastComponent, read: ViewContainerRef, isSignal: true }], viewQueries: [{ propertyName: "toasterHost", first: true, predicate: ToasterHostDirective, descendants: true, isSignal: true }], exportAs: ["cToaster"], ngImport: i0, template: "<ng-template cToasterHost />\n<ng-content />\n", dependencies: [{ kind: "directive", type: ToasterHostDirective, selector: "[cToasterHost]", exportAs: ["cToasterHost"] }] });
|
|
17908
17910
|
}
|
|
17909
17911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ToasterComponent, decorators: [{
|
|
17910
17912
|
type: Component,
|
|
17911
17913
|
args: [{ selector: 'c-toaster', exportAs: 'cToaster', imports: [ToasterHostDirective], host: {
|
|
17912
17914
|
class: 'toaster toast-container',
|
|
17913
17915
|
'[class]': 'hostClasses()'
|
|
17914
|
-
}, template: "<ng-template cToasterHost />\n<ng-content
|
|
17916
|
+
}, providers: [ToasterService], template: "<ng-template cToasterHost />\n<ng-content />\n" }]
|
|
17915
17917
|
}] });
|
|
17916
17918
|
|
|
17917
17919
|
class ToastModule {
|