UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

66 lines (60 loc) 3.27 kB
import * as i1 from '@c8y/ngx-components'; import { gettext, CoreModule, hookDocs } from '@c8y/ngx-components'; import * as i0 from '@angular/core'; import { Injectable, NgModule } from '@angular/core'; import * as i2 from 'ngx-bootstrap/modal'; import { ModalModule } from 'ngx-bootstrap/modal'; import { of } from 'rxjs'; gettext('Phone Sensor Dashboard'), gettext('Vibration'), gettext('Signal'), gettext('Smartphone sensors'); class ConnectSmartphoneFactory { constructor(optionsService, bsModalService) { this.optionsService = optionsService; this.bsModalService = bsModalService; } get() { if (this.optionsService.get('sensorPhone', false)) { return of([ { icon: 'c8y-icon c8y-icon-mobile-add', type: 'quicklink', label: gettext('Connect smartphone'), url: undefined, click: async () => { const { SensorPhoneModalComponent } = await import('@c8y/ngx-components/sensor-phone/sensor-phone-modal'); this.bsModalService.show(SensorPhoneModalComponent, { backdrop: 'static', ariaDescribedby: 'modal-body', ariaLabelledBy: 'modal-title', class: 'lg' }); } } ]); } } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConnectSmartphoneFactory, deps: [{ token: i1.OptionsService }, { token: i2.BsModalService }], target: i0.ɵɵFactoryTarget.Injectable }); } static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConnectSmartphoneFactory }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConnectSmartphoneFactory, decorators: [{ type: Injectable }], ctorParameters: () => [{ type: i1.OptionsService }, { type: i2.BsModalService }] }); class SensorPhoneModule { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SensorPhoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); } static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SensorPhoneModule, imports: [CoreModule, ModalModule] }); } static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SensorPhoneModule, providers: [hookDocs(ConnectSmartphoneFactory)], imports: [CoreModule, ModalModule] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SensorPhoneModule, decorators: [{ type: NgModule, args: [{ imports: [CoreModule, ModalModule], providers: [hookDocs(ConnectSmartphoneFactory)] }] }] }); /** * Generated bundle index. Do not edit. */ export { ConnectSmartphoneFactory, SensorPhoneModule }; //# sourceMappingURL=c8y-ngx-components-sensor-phone.mjs.map