@coreui/angular 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.
|
@@ -8617,22 +8617,19 @@ class ToastComponent {
|
|
|
8617
8617
|
* @return boolean
|
|
8618
8618
|
*/
|
|
8619
8619
|
visibleInput = input(false, ...(ngDevMode ? [{ debugName: "visibleInput", transform: booleanAttribute, alias: 'visible' }] : [{ transform: booleanAttribute, alias: 'visible' }]));
|
|
8620
|
-
#
|
|
8621
|
-
|
|
8622
|
-
|
|
8620
|
+
#visible = linkedSignal(this.visibleInput);
|
|
8621
|
+
#visibleEffect = effect(() => {
|
|
8622
|
+
const newValue = this.#visible();
|
|
8623
|
+
newValue ? this.setTimer() : this.clearTimer();
|
|
8624
|
+
this.visibleChange?.emit(newValue);
|
|
8625
|
+
this.changeDetectorRef.markForCheck();
|
|
8626
|
+
}, ...(ngDevMode ? [{ debugName: "#visibleEffect" }] : []));
|
|
8623
8627
|
set visible(value) {
|
|
8624
|
-
|
|
8625
|
-
if (this.#visible !== newValue) {
|
|
8626
|
-
this.#visible = newValue;
|
|
8627
|
-
newValue ? this.setTimer() : this.clearTimer();
|
|
8628
|
-
this.visibleChange?.emit(newValue);
|
|
8629
|
-
this.changeDetectorRef.markForCheck();
|
|
8630
|
-
}
|
|
8628
|
+
this.#visible.set(value);
|
|
8631
8629
|
}
|
|
8632
8630
|
get visible() {
|
|
8633
|
-
return this.#visible;
|
|
8631
|
+
return this.#visible();
|
|
8634
8632
|
}
|
|
8635
|
-
#visible = false;
|
|
8636
8633
|
/**
|
|
8637
8634
|
* @ignore
|
|
8638
8635
|
*/
|
|
@@ -8874,6 +8871,11 @@ class ToasterComponent {
|
|
|
8874
8871
|
position = input('absolute', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
8875
8872
|
toasterHost = viewChild.required(ToasterHostDirective);
|
|
8876
8873
|
contentToasts = contentChildren(ToastComponent, ...(ngDevMode ? [{ debugName: "contentToasts", read: ViewContainerRef }] : [{ read: ViewContainerRef }]));
|
|
8874
|
+
#contentToastsEffect = effect(() => {
|
|
8875
|
+
// Ensure that the contentToasts is available before accessing it
|
|
8876
|
+
// temp fix for: ASSERTION ERROR: Unexpected state: no hydration info available for a given TNode, which represents a view container. [Expected=> null != undefined <=Actual]
|
|
8877
|
+
this.contentToasts();
|
|
8878
|
+
}, ...(ngDevMode ? [{ debugName: "#contentToastsEffect" }] : []));
|
|
8877
8879
|
hostClasses = computed(() => {
|
|
8878
8880
|
const placement = this.placement;
|
|
8879
8881
|
const position = this.position();
|
|
@@ -8921,7 +8923,7 @@ class ToasterComponent {
|
|
|
8921
8923
|
this.contentToasts()?.forEach((item) => {
|
|
8922
8924
|
if (state.toast && item.element.nativeElement === state.toast.hostElement.nativeElement) {
|
|
8923
8925
|
if (!state.toast.dynamic()) {
|
|
8924
|
-
state.toast
|
|
8926
|
+
state.toast.visible = false;
|
|
8925
8927
|
}
|
|
8926
8928
|
}
|
|
8927
8929
|
});
|
|
@@ -8937,14 +8939,14 @@ class ToasterComponent {
|
|
|
8937
8939
|
});
|
|
8938
8940
|
}
|
|
8939
8941
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ToasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8940
|
-
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
|
|
8942
|
+
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"] }] });
|
|
8941
8943
|
}
|
|
8942
8944
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ToasterComponent, decorators: [{
|
|
8943
8945
|
type: Component,
|
|
8944
8946
|
args: [{ selector: 'c-toaster', exportAs: 'cToaster', imports: [ToasterHostDirective], host: {
|
|
8945
8947
|
class: 'toaster toast-container',
|
|
8946
8948
|
'[class]': 'hostClasses()'
|
|
8947
|
-
}, template: "<ng-template cToasterHost />\n<ng-content
|
|
8949
|
+
}, providers: [ToasterService], template: "<ng-template cToasterHost />\n<ng-content />\n" }]
|
|
8948
8950
|
}] });
|
|
8949
8951
|
|
|
8950
8952
|
class ToastModule {
|