source: trip-planner-front/node_modules/primeng/fesm2015/primeng-inputswitch.mjs.map@ 571e0df

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

adding photos

  • Property mode set to 100644
File size: 6.3 KB
RevLine 
[59329aa]1{"version":3,"file":"primeng-inputswitch.mjs","sources":["../../src/app/components/inputswitch/inputswitch.ts","../../src/app/components/inputswitch/primeng-inputswitch.ts"],"sourcesContent":["import {NgModule,Component,Input,forwardRef,EventEmitter,Output,ChangeDetectorRef,ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {NG_VALUE_ACCESSOR,ControlValueAccessor} from '@angular/forms';\n\nexport const INPUTSWITCH_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputSwitch),\n multi: true\n};\n\n@Component({\n selector: 'p-inputSwitch',\n template: `\n <div [ngClass]=\"{'p-inputswitch p-component': true, 'p-inputswitch-checked': checked(), 'p-disabled': disabled, 'p-focus': focused}\"\n [ngStyle]=\"style\" [class]=\"styleClass\" (click)=\"onClick($event, cb)\">\n <div class=\"p-hidden-accessible\">\n <input #cb type=\"checkbox\" [attr.id]=\"inputId\" [attr.name]=\"name\" [attr.tabindex]=\"tabindex\" [checked]=\"checked()\" (change)=\"onInputChange($event)\"\n (focus)=\"onFocus($event)\" (blur)=\"onBlur($event)\" [disabled]=\"disabled\" role=\"switch\" [attr.aria-checked]=\"checked()\" [attr.aria-labelledby]=\"ariaLabelledBy\"/>\n </div>\n <span class=\"p-inputswitch-slider\"></span>\n </div>\n `,\n providers: [INPUTSWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./inputswitch.css'],\n host: {\n 'class': 'p-element'\n }\n})\nexport class InputSwitch implements ControlValueAccessor {\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() tabindex: number;\n\n @Input() inputId: string;\n\n @Input() name: string;\n\n @Input() disabled: boolean;\n\n @Input() readonly: boolean;\n\n @Input() trueValue: any = true;\n\n @Input() falseValue: any = false;\n\n @Input() ariaLabelledBy: string;\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n modelValue: any = false;\n\n focused: boolean = false;\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n constructor(private cd: ChangeDetectorRef) {}\n\n onClick(event: Event, cb: HTMLInputElement) {\n if (!this.disabled && !this.readonly) {\n event.preventDefault();\n this.toggle(event);\n cb.focus();\n }\n }\n\n onInputChange(event: Event) {\n if (!this.readonly) {\n const inputChecked = (<HTMLInputElement> event.target).checked;\n this.updateModel(event, inputChecked);\n }\n }\n\n toggle(event: Event) {\n this.updateModel(event, !this.checked());\n }\n\n updateModel(event: Event, value: boolean) {\n this.modelValue = value ? this.trueValue : this.falseValue;\n this.onModelChange(this.modelValue);\n this.onChange.emit({\n originalEvent: event,\n checked: this.modelValue\n });\n }\n\n onFocus(event: Event) {\n this.focused = true;\n }\n\n onBlur(event: Event) {\n this.focused = false;\n this.onModelTouched();\n }\n\n writeValue(value: any) : void {\n this.modelValue = value;\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n checked() {\n return this.modelValue === this.trueValue;\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [InputSwitch],\n declarations: [InputSwitch]\n})\nexport class InputSwitchModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAIa,0BAA0B,GAAQ;IAC7C,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;IAC1C,KAAK,EAAE,IAAI;EACX;MAsBW,WAAW;IAgCpB,YAAoB,EAAqB;QA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