3ea54d5495bf0879dfeae9a75ce632c48491f9afab799c0bbc6e86e4b1f80acf.json 11 KB

1
  1. {"ast":null,"code":"var _NzTransitionPatchDirective, _NzTransitionPatchModule;\nimport * as i0 from '@angular/core';\nimport { Directive, Input, NgModule } from '@angular/core';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n/**\n * hack the bug\n * angular router change with unexpected transition trigger after calling applicationRef.attachView\n * https://github.com/angular/angular/issues/34718\n */\nclass NzTransitionPatchDirective {\n setHiddenAttribute() {\n if (this.hidden) {\n if (typeof this.hidden === 'string') {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', this.hidden);\n } else {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n }\n } else {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'hidden');\n }\n }\n constructor(elementRef, renderer) {\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.hidden = null;\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n }\n ngOnChanges() {\n this.setHiddenAttribute();\n }\n ngAfterViewInit() {\n this.setHiddenAttribute();\n }\n}\n_NzTransitionPatchDirective = NzTransitionPatchDirective;\n_NzTransitionPatchDirective.ɵfac = function _NzTransitionPatchDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || _NzTransitionPatchDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2));\n};\n_NzTransitionPatchDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _NzTransitionPatchDirective,\n selectors: [[\"\", \"nz-button\", \"\"], [\"nz-button-group\"], [\"\", \"nz-icon\", \"\"], [\"\", \"nz-menu-item\", \"\"], [\"\", \"nz-submenu\", \"\"], [\"nz-select-top-control\"], [\"nz-select-placeholder\"], [\"nz-input-group\"]],\n inputs: {\n hidden: \"hidden\"\n },\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature]\n});\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzTransitionPatchDirective, [{\n type: Directive,\n args: [{\n selector: '[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group',\n standalone: true\n }]\n }], () => [{\n type: i0.ElementRef\n }, {\n type: i0.Renderer2\n }], {\n hidden: [{\n type: Input\n }]\n });\n})();\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzTransitionPatchModule {}\n_NzTransitionPatchModule = NzTransitionPatchModule;\n_NzTransitionPatchModule.ɵfac = function _NzTransitionPatchModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || _NzTransitionPatchModule)();\n};\n_NzTransitionPatchModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: _NzTransitionPatchModule\n});\n_NzTransitionPatchModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzTransitionPatchModule, [{\n type: NgModule,\n args: [{\n imports: [NzTransitionPatchDirective],\n exports: [NzTransitionPatchDirective]\n }]\n }], null, null);\n})();\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NzTransitionPatchDirective as ɵNzTransitionPatchDirective, NzTransitionPatchModule as ɵNzTransitionPatchModule };","map":{"version":3,"names":["i0","Directive","Input","NgModule","NzTransitionPatchDirective","setHiddenAttribute","hidden","renderer","setAttribute","elementRef","nativeElement","removeAttribute","constructor","ngOnChanges","ngAfterViewInit","_NzTransitionPatchDirective","ɵfac","_NzTransitionPatchDirective_Factory","__ngFactoryType__","ɵɵdirectiveInject","ElementRef","Renderer2","ɵdir","ɵɵdefineDirective","type","selectors","inputs","standalone","features","ɵɵNgOnChangesFeature","ngDevMode","ɵsetClassMetadata","args","selector","NzTransitionPatchModule","_NzTransitionPatchModule","_NzTransitionPatchModule_Factory","ɵmod","ɵɵdefineNgModule","ɵinj","ɵɵdefineInjector","imports","exports","ɵNzTransitionPatchDirective","ɵNzTransitionPatchModule"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-transition-patch.mjs"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { Directive, Input, NgModule } from '@angular/core';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n/**\n * hack the bug\n * angular router change with unexpected transition trigger after calling applicationRef.attachView\n * https://github.com/angular/angular/issues/34718\n */\nclass NzTransitionPatchDirective {\n setHiddenAttribute() {\n if (this.hidden) {\n if (typeof this.hidden === 'string') {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', this.hidden);\n }\n else {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n }\n }\n else {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'hidden');\n }\n }\n constructor(elementRef, renderer) {\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.hidden = null;\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n }\n ngOnChanges() {\n this.setHiddenAttribute();\n }\n ngAfterViewInit() {\n this.setHiddenAttribute();\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.2.1\", ngImport: i0, type: NzTransitionPatchDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"18.2.1\", type: NzTransitionPatchDirective, isStandalone: true, selector: \"[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group\", inputs: { hidden: \"hidden\" }, usesOnChanges: true, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.2.1\", ngImport: i0, type: NzTransitionPatchDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group',\n standalone: true\n }]\n }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { hidden: [{\n type: Input\n }] } });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzTransitionPatchModule {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.2.1\", ngImport: i0, type: NzTransitionPatchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }\n static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"18.2.1\", ngImport: i0, type: NzTransitionPatchModule, imports: [NzTransitionPatchDirective], exports: [NzTransitionPatchDirective] }); }\n static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"18.2.1\", ngImport: i0, type: NzTransitionPatchModule }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.2.1\", ngImport: i0, type: NzTransitionPatchModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [NzTransitionPatchDirective],\n exports: [NzTransitionPatchDirective]\n }]\n }] });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NzTransitionPatchDirective as ɵNzTransit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