@taiga-ui/kit
Version:
Taiga UI Angular main components kit
1 lines • 2.29 kB
Source Map (JSON)
{"version":3,"file":"taiga-ui-kit-directives-present.mjs","sources":["../../../projects/kit/directives/present/present.directive.ts","../../../projects/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import type {OnDestroy} from '@angular/core';\nimport {Directive, Output} from '@angular/core';\nimport {BehaviorSubject, distinctUntilChanged, skip} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[tuiPresentChange]',\n host: {\n '[style.animation]': '\"tuiPresent 1s infinite\"',\n '(animationcancel.self)': 'onAnimation(false)',\n '(animationstart.self)': 'onAnimation(true)',\n },\n})\nexport class TuiPresent implements OnDestroy {\n private readonly visibility$ = new BehaviorSubject(false);\n\n @Output()\n public readonly tuiPresentChange = this.visibility$.pipe(\n distinctUntilChanged(),\n skip(1),\n );\n\n public ngOnDestroy(): void {\n this.visibility$.next(false);\n }\n\n protected onAnimation(visibility: boolean): void {\n this.visibility$.next(visibility);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA,MASa,UAAU,CAAA;AATvB,IAAA,WAAA,GAAA;AAUqB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AAG1C,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CACpD,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,CACV,CAAC;AASL,KAAA;IAPU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAChC;AAES,IAAA,WAAW,CAAC,UAAmB,EAAA;AACrC,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACrC;+GAfQ,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SA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