source: trip-planner-front/node_modules/primeng/fesm2020/primeng-inputtextarea.mjs.map@ 1ad8e64

Last change on this file since 1ad8e64 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 6.1 KB
RevLine 
[59329aa]1{"version":3,"file":"primeng-inputtextarea.mjs","sources":["../../src/app/components/inputtextarea/inputtextarea.ts","../../src/app/components/inputtextarea/primeng-inputtextarea.ts"],"sourcesContent":["import {NgModule,Directive,ElementRef,HostListener,Input,Output, EventEmitter,Optional, AfterViewInit, OnInit, OnDestroy, ChangeDetectorRef} from '@angular/core';\nimport {NgModel, NgControl} from '@angular/forms';\nimport {CommonModule} from '@angular/common';\nimport { Subscription } from 'rxjs';\n\n@Directive({\n selector: '[pInputTextarea]',\n host: {\n 'class': 'p-inputtextarea p-inputtext p-component p-element',\n '[class.p-filled]': 'filled',\n '[class.p-inputtextarea-resizable]': 'autoResize'\n }\n})\nexport class InputTextarea implements OnInit, AfterViewInit, OnDestroy {\n\n @Input() autoResize: boolean;\n\n @Output() onResize: EventEmitter<any> = new EventEmitter();\n\n filled: boolean;\n\n cachedScrollHeight:number;\n\n ngModelSubscription: Subscription;\n\n ngControlSubscription: Subscription;\n\n constructor(public el: ElementRef, @Optional() public ngModel: NgModel, @Optional() public control : NgControl, private cd: ChangeDetectorRef) {}\n\n ngOnInit() {\n if (this.ngModel) {\n this.ngModelSubscription = this.ngModel.valueChanges.subscribe(() =>{\n this.updateState();\n })\n }\n\n if (this.control) {\n this.ngControlSubscription = this.control.valueChanges.subscribe(() => {\n this.updateState();\n });\n }\n }\n\n ngAfterViewInit() {\n if (this.autoResize)\n this.resize();\n\n this.updateFilledState();\n this.cd.detectChanges();\n }\n\n @HostListener('input', ['$event'])\n onInput(e) {\n this.updateState();\n }\n\n updateFilledState() {\n this.filled = this.el.nativeElement.value && this.el.nativeElement.value.length;\n }\n\n @HostListener('focus', ['$event'])\n onFocus(e) {\n if (this.autoResize) {\n this.resize(e);\n }\n }\n\n @HostListener('blur', ['$event'])\n onBlur(e) {\n if (this.autoResize) {\n this.resize(e);\n }\n }\n\n resize(event?: Event) {\n this.el.nativeElement.style.height = 'auto';\n this.el.nativeElement.style.height = this.el.nativeElement.scrollHeight + 'px';\n\n if (parseFloat(this.el.nativeElement.style.height) >= parseFloat(this.el.nativeElement.style.maxHeight)) {\n this.el.nativeElement.style.overflowY = \"scroll\";\n this.el.nativeElement.style.height = this.el.nativeElement.style.maxHeight;\n }\n else {\n this.el.nativeElement.style.overflow = \"hidden\";\n }\n\n this.onResize.emit(event||{});\n }\n\n updateState() {\n this.updateFilledState();\n\n if (this.autoResize) {\n this.resize();\n }\n }\n\n ngOnDestroy() {\n if (this.ngModelSubscription) {\n this.ngModelSubscription.unsubscribe();\n }\n\n if (this.ngControlSubscription) {\n this.ngControlSubscription.unsubscribe();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [InputTextarea],\n declarations: [InputTextarea]\n})\nexport class InputTextareaModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAaa,aAAa;IActB,YAAmB,EAAc,EAAqB,OAAgB,EAAqB,OAAmB,EAAU,EAAqB;QAA1H,OAAE,GAAF,EAAE,CAAY;QAAqB,YAAO,GAAP,OAAO,CAAS;QAAqB,YAAO,GAAP,OAAO,CAAY;QAAU,OAAE,GAAF,EAAE,CAAmB;QAVnI,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;KAUsF;IAEjJ,QAAQ;QACJ,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;gBAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;aACtB,CAAC,CAAA;SACL;QAED,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,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