@coreui/angular-pro 5.7.7 → 5.7.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.
|
@@ -774,7 +774,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
774
774
|
class DropdownToken {
|
|
775
775
|
}
|
|
776
776
|
class DropdownToggleDirective {
|
|
777
|
-
// injections
|
|
778
777
|
#destroyRef = inject(DestroyRef);
|
|
779
778
|
elementRef = inject(ElementRef);
|
|
780
779
|
#dropdownService = inject(DropdownService);
|
|
@@ -793,7 +792,7 @@ class DropdownToggleDirective {
|
|
|
793
792
|
*/
|
|
794
793
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
795
794
|
/**
|
|
796
|
-
* Enables pseudo
|
|
795
|
+
* Enables pseudo-element caret on toggler.
|
|
797
796
|
* @return boolean
|
|
798
797
|
*/
|
|
799
798
|
caret = input(true, /* @ts-ignore */
|
|
@@ -830,9 +829,14 @@ class DropdownToggleDirective {
|
|
|
830
829
|
}
|
|
831
830
|
if (this.dropdown) {
|
|
832
831
|
const dropdown = this.dropdown;
|
|
833
|
-
dropdown?.visibleChange?.subscribe((visible) => {
|
|
832
|
+
const subscription = dropdown?.visibleChange?.subscribe((visible) => {
|
|
834
833
|
this.#ariaExpanded.set(visible);
|
|
835
834
|
});
|
|
835
|
+
if (subscription) {
|
|
836
|
+
this.#destroyRef.onDestroy(() => {
|
|
837
|
+
subscription.unsubscribe();
|
|
838
|
+
});
|
|
839
|
+
}
|
|
836
840
|
}
|
|
837
841
|
}
|
|
838
842
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: DropdownToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -12767,33 +12771,27 @@ class NavbarComponent {
|
|
|
12767
12771
|
return false;
|
|
12768
12772
|
}, /* @ts-ignore */
|
|
12769
12773
|
...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
|
|
12770
|
-
#
|
|
12771
|
-
ngAfterContentInit() {
|
|
12774
|
+
#breakpointEffect = effect((onCleanup) => {
|
|
12772
12775
|
const breakpoint = this.breakpoint();
|
|
12773
|
-
if (breakpoint) {
|
|
12774
|
-
|
|
12775
|
-
this.#observer = this.#breakpointObserver
|
|
12776
|
-
.observe([onBreakpoint])
|
|
12777
|
-
.pipe()
|
|
12778
|
-
.subscribe((result) => {
|
|
12779
|
-
const collapse = this.collapse();
|
|
12780
|
-
if (collapse) {
|
|
12781
|
-
const animate = collapse.animate();
|
|
12782
|
-
collapse.animate.set(false);
|
|
12783
|
-
collapse.toggle(false);
|
|
12784
|
-
setTimeout(() => {
|
|
12785
|
-
collapse.toggle(result.matches);
|
|
12786
|
-
setTimeout(() => {
|
|
12787
|
-
collapse.animate.set(animate);
|
|
12788
|
-
});
|
|
12789
|
-
});
|
|
12790
|
-
}
|
|
12791
|
-
});
|
|
12776
|
+
if (!breakpoint) {
|
|
12777
|
+
return;
|
|
12792
12778
|
}
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12779
|
+
const subscription = this.#breakpointObserver.observe([`(min-width: ${breakpoint})`]).subscribe((result) => {
|
|
12780
|
+
const collapse = this.collapse();
|
|
12781
|
+
if (!collapse) {
|
|
12782
|
+
return;
|
|
12783
|
+
}
|
|
12784
|
+
const animate = collapse.animate();
|
|
12785
|
+
collapse.animate.set(false);
|
|
12786
|
+
collapse.toggle(false);
|
|
12787
|
+
setTimeout(() => {
|
|
12788
|
+
collapse.toggle(result.matches);
|
|
12789
|
+
setTimeout(() => collapse.animate.set(animate));
|
|
12790
|
+
});
|
|
12791
|
+
});
|
|
12792
|
+
onCleanup(() => subscription.unsubscribe());
|
|
12793
|
+
}, /* @ts-ignore */
|
|
12794
|
+
...(ngDevMode ? [{ debugName: "#breakpointEffect" }] : /* istanbul ignore next */ []));
|
|
12797
12795
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12798
12796
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.7", type: NavbarComponent, isStandalone: true, selector: "c-navbar", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.role": "role()" } }, queries: [{ propertyName: "collapse", first: true, predicate: CollapseDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: ThemeDirective, inputs: ["colorScheme", "colorScheme"] }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"container() ? withContainerTemplate : noContainerTemplate\" />\n\n<ng-template #withContainerTemplate>\n <div [class]=\"containerClass()\">\n <ng-content />\n </div>\n</ng-template>\n\n<ng-template #noContainerTemplate>\n <ng-content />\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
12799
12797
|
}
|