{"version":3,"file":"ui-vts-kit-ng-vts-core-transition-patch.mjs","sources":["../../components/core/transition-patch/transition-patch.directive.ts","../../components/core/transition-patch/transition-patch.module.ts","../../components/core/transition-patch/public-api.ts","../../components/core/transition-patch/ui-vts-kit-ng-vts-core-transition-patch.ts"],"sourcesContent":["/**\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\nimport { AfterViewInit, Directive, ElementRef, Input, OnChanges, Renderer2 } from '@angular/core';\nimport { VtsSafeAny } from '@ui-vts-kit/ng-vts/core/types';\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 */\n@Directive({\n  selector:\n    '[vts-button], vts-button-group, [vts-icon], [vts-menu-item], [vts-submenu], vts-select-top-control, vts-select-placeholder, vts-input-group'\n})\nexport class VtsTransitionPatchDirective implements AfterViewInit, OnChanges {\n  @Input() hidden: VtsSafeAny = null;\n  setHiddenAttribute(): void {\n    if (this.hidden === true) {\n      this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n    } else if (this.hidden === false || this.hidden === null) {\n      this.renderer.removeAttribute(this.elementRef.nativeElement, 'hidden');\n    } else if (typeof this.hidden === 'string') {\n      this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', this.hidden);\n    }\n  }\n\n  constructor(private elementRef: ElementRef, private renderer: Renderer2) {\n    this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n  }\n\n  ngOnChanges(): void {\n    this.setHiddenAttribute();\n  }\n\n  ngAfterViewInit(): void {\n    this.setHiddenAttribute();\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\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { NgModule } from '@angular/core';\nimport { VtsTransitionPatchDirective } from './transition-patch.directive';\n\n@NgModule({\n  imports: [PlatformModule],\n  exports: [VtsTransitionPatchDirective],\n  declarations: [VtsTransitionPatchDirective]\n})\nexport class VtsTransitionPatchModule {}\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\nexport { VtsTransitionPatchModule as ɵVtsTransitionPatchModule } from './transition-patch.module';\nexport { VtsTransitionPatchDirective as ɵVtsTransitionPatchDirective } from './transition-patch.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;AAKH;;;;AAIG;MAKU,2BAA2B,CAAA;IAEtC,kBAAkB,GAAA;AAChB,QAAA,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;AACxB,YAAA,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AACzE,SAAA;aAAM,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;AACxD,YAAA,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AACxE,SAAA;AAAM,aAAA,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;AAC1C,YAAA,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;AAClF,SAAA;KACF;IAED,WAAoB,CAAA,UAAsB,EAAU,QAAmB,EAAA;QAAnD,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAAU,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAX9D,IAAM,CAAA,MAAA,GAAe,IAAI,CAAC;AAYjC,QAAA,IAAI,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