ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
92 lines (91 loc) • 2.83 kB
JavaScript
import * as i0 from "@angular/core";
import { Directive, ElementRef, Input, NgModule, Renderer2, inject } from "@angular/core";
var NzTransitionPatchDirective = class NzTransitionPatchDirective {
elementRef = inject(ElementRef);
renderer = inject(Renderer2);
hidden = null;
setHiddenAttribute() {
if (this.hidden) {
if (typeof this.hidden === "string") this.renderer.setAttribute(this.elementRef.nativeElement, "hidden", this.hidden);
else this.renderer.setAttribute(this.elementRef.nativeElement, "hidden", "");
} else this.renderer.removeAttribute(this.elementRef.nativeElement, "hidden");
}
constructor() {
this.renderer.setAttribute(this.elementRef.nativeElement, "hidden", "");
}
ngOnChanges() {
this.setHiddenAttribute();
}
ngAfterViewInit() {
this.setHiddenAttribute();
}
static ɵfac = i0.ɵɵngDeclareFactory({
minVersion: "12.0.0",
version: "22.2.2",
ngImport: i0,
type: NzTransitionPatchDirective,
deps: [],
target: i0.ɵɵFactoryTarget.Directive
});
static ɵdir = i0.ɵɵngDeclareDirective({
minVersion: "14.0.0",
version: "22.2.2",
type: NzTransitionPatchDirective,
isStandalone: true,
selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group",
inputs: { hidden: "hidden" },
usesOnChanges: true,
ngImport: i0
});
};
i0.ɵɵngDeclareClassMetadata({
minVersion: "12.0.0",
version: "22.2.2",
ngImport: i0,
type: NzTransitionPatchDirective,
decorators: [{
type: Directive,
args: [{ selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group" }]
}],
ctorParameters: () => [],
propDecorators: { hidden: [{ type: Input }] }
});
var NzTransitionPatchModule = class NzTransitionPatchModule {
static ɵfac = i0.ɵɵngDeclareFactory({
minVersion: "12.0.0",
version: "22.2.2",
ngImport: i0,
type: NzTransitionPatchModule,
deps: [],
target: i0.ɵɵFactoryTarget.NgModule
});
static ɵmod = i0.ɵɵngDeclareNgModule({
minVersion: "14.0.0",
version: "22.2.2",
ngImport: i0,
type: NzTransitionPatchModule,
imports: [NzTransitionPatchDirective],
exports: [NzTransitionPatchDirective]
});
static ɵinj = i0.ɵɵngDeclareInjector({
minVersion: "12.0.0",
version: "22.2.2",
ngImport: i0,
type: NzTransitionPatchModule
});
};
i0.ɵɵngDeclareClassMetadata({
minVersion: "12.0.0",
version: "22.2.2",
ngImport: i0,
type: NzTransitionPatchModule,
decorators: [{
type: NgModule,
args: [{
imports: [NzTransitionPatchDirective],
exports: [NzTransitionPatchDirective]
}]
}]
});
export { NzTransitionPatchDirective as ɵNzTransitionPatchDirective, NzTransitionPatchModule as ɵNzTransitionPatchModule };
//# sourceMappingURL=ng-zorro-antd-core-transition-patch.mjs.map