@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
76 lines (70 loc) • 3.52 kB
JavaScript
import { gettext } from '@c8y/ngx-components/gettext';
import * as i0 from '@angular/core';
import { Injectable, NgModule } from '@angular/core';
import * as i1 from '@c8y/ngx-components';
import { hookDocs, hookQueryParamModal } from '@c8y/ngx-components';
import { of } from 'rxjs';
gettext('Phone Sensor Dashboard'),
gettext('Vibration'),
gettext('Signal'),
gettext('Smartphone sensors');
class ConnectSmartphoneFactory {
constructor(optionsService) {
this.optionsService = optionsService;
}
get() {
if (this.optionsService.get('sensorPhone', false)) {
return of([
{
icon: 'c8y-icon c8y-icon-mobile-add',
type: 'quicklink',
label: gettext('Connect smartphone'),
url: '?showConnectSmartphone=true'
}
]);
}
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ConnectSmartphoneFactory, deps: [{ token: i1.OptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ConnectSmartphoneFactory }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ConnectSmartphoneFactory, decorators: [{
type: Injectable
}], ctorParameters: () => [{ type: i1.OptionsService }] });
const SHOW_CONNECT_SMARTPHONE = 'showConnectSmartphone';
class SensorPhoneModule {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SensorPhoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: SensorPhoneModule }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SensorPhoneModule, providers: [
hookDocs(ConnectSmartphoneFactory),
hookQueryParamModal({
queryParam: SHOW_CONNECT_SMARTPHONE,
loadComponent: () => import('@c8y/ngx-components/sensor-phone/sensor-phone-modal').then(m => m.SensorPhoneModalComponent),
modalConfig: {
ignoreBackdropClick: true,
keyboard: false
}
})
] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SensorPhoneModule, decorators: [{
type: NgModule,
args: [{
imports: [],
providers: [
hookDocs(ConnectSmartphoneFactory),
hookQueryParamModal({
queryParam: SHOW_CONNECT_SMARTPHONE,
loadComponent: () => import('@c8y/ngx-components/sensor-phone/sensor-phone-modal').then(m => m.SensorPhoneModalComponent),
modalConfig: {
ignoreBackdropClick: true,
keyboard: false
}
})
]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { ConnectSmartphoneFactory, SHOW_CONNECT_SMARTPHONE, SensorPhoneModule };
//# sourceMappingURL=c8y-ngx-components-sensor-phone.mjs.map