UNPKG

@nativescript-community/ui-cameraview

Version:

A CameraView allowing custom live processing for NativeScript

1 lines 2.62 kB
{"version":3,"file":"nativescript-community-ui-cameraview-angular.mjs","sources":["../../../../src/ui-cameraview/angular/index.ts","../../../../src/ui-cameraview/angular/nativescript-community-ui-cameraview-angular.ts"],"sourcesContent":["import { Directive, ElementRef, HostListener, Inject, NgModule, forwardRef } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseValueAccessor, registerElement } from '@nativescript/angular';\nimport { View } from '@nativescript/core';\nimport { CameraView } from '@nativescript-community/ui-cameraview';\n\nregisterElement('CameraView', () => CameraView);\n\n// const CHECKED_VALUE_ACCESSOR = {\n// provide: NG_VALUE_ACCESSOR,\n// useExisting: forwardRef(() => CheckedValueAccessor),\n// multi: true\n// };\n\n// export type CheckableView = { checked: boolean } & View;\n\n// /**\n// * The accessor for setting checked property and listening to changes that is used by the\n// * {@link NgModel} directives.\n// *\n// * ### Example\n// * ```\n// * <CheckBox [(ngModel)]=\"model.test\">\n// * ```\n// */\n// @Directive({\n// selector:\n// 'CheckBox[ngModel], CheckBox[formControlName], CheckBox[formControl], checkBox[ngModel], checkBox[formControlName], checkBox[formControl], check-box[ngModel], check-box[formControlName], check-box[formControl]',\n// providers: [CHECKED_VALUE_ACCESSOR]\n// })\n// export class CheckedValueAccessor extends BaseValueAccessor<CheckableView> {\n// constructor(@Inject(ElementRef) elementRef: ElementRef) {\n// super(elementRef.nativeElement);\n// }\n\n// @HostListener('checkedChange', ['$event'])\n// public checkedChangeListener(event: any) {\n// this.onChange(event.value);\n// }\n\n// public onTouched = () => {};\n\n// public writeValue(value: any): void {\n// this.view.checked = value;\n// }\n\n// public registerOnTouched(fn: () => void): void {\n// this.onTouched = fn;\n// }\n// }\n\n// @NgModule({\n// declarations: [CheckedValueAccessor],\n// providers: [],\n// imports: [FormsModule],\n// exports: [FormsModule, CheckedValueAccessor]\n// })\n// export class CheckBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAMA,eAAe,CAAC,YAAY,EAAE,MAAM,UAAU,CAAC;AAE/C;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;;AAEG"}