@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
1 lines • 45.8 kB
Source Map (JSON)
{"version":3,"file":"c8y-ngx-components-actility-device-registration.mjs","sources":["../../actility-device-registration/actility-device-registration.model.ts","../../actility-device-registration/actility-device-registration.service.ts","../../actility-device-registration/actility-device-registration.component.ts","../../actility-device-registration/actility-device-registration.component.html","../../actility-device-registration/actility-device-registration-button.component.ts","../../actility-device-registration/actility-device-registration-button.component.html","../../actility-device-registration/actility-device-registration.factory.ts","../../actility-device-registration/actility-device-registration.module.ts","../../actility-device-registration/c8y-ngx-components-actility-device-registration.ts"],"sourcesContent":["export interface ConnectivityPlan {\n grantedConnections: string;\n id: string;\n name: string;\n ref: string;\n usedConnections: string;\n message?: string;\n}\n\nexport interface DeviceType {\n name: string;\n id: string;\n}\n\nexport interface ActilityDeviceProfile {\n id: string;\n name: string;\n typeMAC: string;\n message?: string;\n}\n\nexport interface ActilityDeviceRegistration {\n applicationEUI: string;\n applicationKey: string;\n devEUI: string;\n deviceProfile: ActilityDeviceProfile;\n connectivityPlan: ConnectivityPlan;\n deviceType: DeviceType;\n lnsConnectionName: string;\n connection: {\n name: string;\n description: string;\n baseUrl: string;\n profileId: string;\n username: string;\n password: string;\n };\n}\n\nexport const PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION = {\n EVENT: 'deviceRegistration',\n COMPONENT: 'actility-registration',\n RESULT: { SUCCESS: 'registrationSuccess', FAILURE: 'registrationFailure' }\n} as const;\n","import { Injectable } from '@angular/core';\nimport {\n ApplicationService,\n FetchClient,\n IFetchOptions,\n IManagedObject,\n IResultList,\n InventoryService\n} from '@c8y/client';\nimport { AppStateService, OptionsService, gettext } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { some } from 'lodash-es';\nimport {\n ActilityDeviceProfile,\n ActilityDeviceRegistration,\n ConnectivityPlan\n} from './actility-device-registration.model';\n\nexport enum ActilityErrorName {\n NoConnectivityPlansError = 'NoConnectivityPlansError',\n NoFreeSlotsInConnectivityPlansError = 'NoFreeSlotsInConnectivityPlansError',\n NoConnectivitySettingsError = 'NoConnectivitySettingsError',\n ConnectivitySettingsError = 'ConnectivitySettingsError',\n NoDeviceProfilesError = 'NoDeviceProfilesError',\n DeviceProfilesFetchError = 'DeviceProfilesFetchError',\n NoDeviceProtocolsError = 'NoDeviceProtocolsError',\n DeviceProtocolsFetchError = 'DeviceProtocolsFetchError',\n RegistrationError = 'RegistrationError'\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ActilityDeviceRegistrationService {\n private baseUrl = '/service/actility';\n private registrationUrl = `${this.baseUrl}/newDeviceRequest`;\n private connectivityPlansUrl = `${this.baseUrl}/connectivityPlans`;\n private deviceProfilesUrl = `${this.baseUrl}/deviceProfiles`;\n private headers: object = {\n 'Content-Type': 'application/json'\n };\n\n constructor(\n private inventoryService: InventoryService,\n private client: FetchClient,\n private translateService: TranslateService,\n private applicationService: ApplicationService,\n private optionsService: OptionsService,\n private appState: AppStateService\n ) {}\n\n async getConnections() {\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers\n };\n const res = await this.client.fetch(`${this.baseUrl}/lns-connection`, options);\n const data = await res.json();\n\n if (res.status === 200) {\n if (data.length === 0) {\n await this.throwNoConnectivitySettingsError();\n }\n } else {\n await this.throwConnectivitySettingsError(data);\n }\n return { res, data };\n }\n /**\n * Gets connectivity plans from LoRa platform.\n * @param connectionName The name of connection for which connectivity plans will be retrieved\n * @returns The result list with connectivity plans, or throws an error with exception.\n */\n async getConnectivityPlans(connectionName: string): Promise<IResultList<ConnectivityPlan>> {\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers,\n params: {\n actilityConnectionName: connectionName\n }\n };\n\n const res = await this.client.fetch(this.connectivityPlansUrl, options);\n const data = await res.json();\n\n if (res.status === 200) {\n if (data.length === 0) {\n this.throwNoConnectivityPlansError();\n } else {\n if (!this.hasAvailableConnections(data)) {\n this.throwNoFreeSlotsInConnectivityPlansError();\n }\n }\n } else {\n await this.throwConnectivitySettingsError(data);\n }\n\n return { res, data };\n }\n\n /**\n * Gets the device profiles from LoRa platform.\n * @param connectionName The name of connection for which device profiles will be retrieved\n * @returns The result list with device profiles, or throws an error with exception.\n */\n async getDeviceProfiles(connectionName: string): Promise<IResultList<ActilityDeviceProfile>> {\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers,\n params: {\n actilityConnectionName: connectionName\n }\n };\n\n const res = await this.client.fetch(this.deviceProfilesUrl, options);\n const data = await res.json();\n\n if (res.status === 200) {\n if (data.length === 0) {\n this.throwNoDeviceProfilesError();\n }\n } else {\n this.throwDeviceProfilesFetchError();\n }\n\n return { res, data };\n }\n\n /**\n * Gets the device protocols\n */\n async getDeviceProtocols(\n filter: object = { withTotalPages: true }\n ): Promise<IResultList<IManagedObject>> {\n const query = {\n __filter: {\n __and: [\n { __has: 'c8y_IsDeviceType' },\n {\n type: { __in: ['c8y_ActilityDeviceType', 'c8y_LoraDeviceType', 'c8y_LpwanDeviceType'] }\n }\n ]\n },\n __orderby: [{ name: 1 }]\n };\n const deviceProtocolsList = await this.inventoryService.listQuery(query, filter);\n const { res, data } = deviceProtocolsList;\n\n if (res.status === 200) {\n if (data.length === 0) {\n this.throwNoDeviceProtocolsError();\n }\n } else {\n this.throwDeviceProtocolsFetchError();\n }\n\n return deviceProtocolsList;\n }\n\n /**\n * Creates device registration\n */\n async register(registration: ActilityDeviceRegistration) {\n const options: IFetchOptions = {\n method: 'POST',\n headers: this.headers,\n body: JSON.stringify(registration)\n };\n\n const res = await this.client.fetch(this.registrationUrl, options);\n const data = await res.json();\n\n if (res.status !== 201) {\n this.throwRegistrationError(data);\n }\n\n return { res, data };\n }\n\n /**\n * checks if used connections is less then granted connections\n */\n private hasAvailableConnections(connectivityPlans) {\n return some(\n connectivityPlans,\n plan => parseInt(plan.grantedConnections, 10) > parseInt(plan.usedConnections, 10)\n );\n }\n\n private async throwNoConnectivitySettingsError() {\n const error = new Error();\n error.name = ActilityErrorName.NoConnectivitySettingsError;\n\n if (await this.appState.isApplicationAvailable('administration')) {\n error.message = this.translateService.instant(\n gettext(\n `Could not get connectivity plans from the LoRa platform. Verify the ThingPark credentials in the Administration application under <a href=\"{{ link }}\">Settings</a>.`\n ),\n {\n link: '/apps/administration/index.html#/connectivitySettings/multiple_lns_connectors_actility'\n }\n );\n } else {\n error.message = gettext(\n 'Could not get connectivity plans from the LoRa platform. Please contact the administrator.'\n );\n }\n\n throw error;\n }\n\n private throwConnectivitySettingsError(data: { message: string }) {\n const error = new Error();\n error.name = ActilityErrorName.ConnectivitySettingsError;\n error.message = data.message;\n throw error;\n }\n\n private throwNoConnectivityPlansError() {\n const error = new Error();\n error.name = ActilityErrorName.NoConnectivityPlansError;\n error.message = gettext(\n 'No connectivity plans found. New connectivity plans must be created via the LoRa platform.'\n );\n throw error;\n }\n\n private throwNoFreeSlotsInConnectivityPlansError() {\n const companyName = this.optionsService.get('companyName', 'Cumulocity IoT');\n const error = new Error();\n error.name = ActilityErrorName.NoFreeSlotsInConnectivityPlansError;\n error.message = this.translateService.instant(\n gettext(\n `No connectivity plans with free slots available. Please contact ThingPark on the device quota limits for your connectivity plans or remove unused devices from ThingPark and retry registering the device in the {{companyName}} platform.`\n ),\n {\n companyName\n }\n );\n throw error;\n }\n\n private throwDeviceProfilesFetchError() {\n const error = new Error();\n error.name = ActilityErrorName.DeviceProfilesFetchError;\n error.message = gettext('Could not load device profiles from the LoRa platform.');\n throw error;\n }\n\n private throwNoDeviceProfilesError() {\n const error = new Error();\n error.name = ActilityErrorName.NoDeviceProfilesError;\n error.message = gettext(\n 'No device profiles found. Create a new device profile via the LoRa platform.'\n );\n throw error;\n }\n\n private throwDeviceProtocolsFetchError() {\n const error = new Error();\n error.name = ActilityErrorName.DeviceProtocolsFetchError;\n error.message = gettext('Could not load device protocols.');\n throw error;\n }\n\n private throwNoDeviceProtocolsError() {\n const error = new Error();\n error.name = ActilityErrorName.NoDeviceProtocolsError;\n error.message = this.translateService.instant(\n gettext(\n `No device protocols configured. Create a LoRa device protocol in <a href=\"{{ link }}\">Device protocols</a>.`\n ),\n {\n link: '/apps/devicemanagement/#/deviceprotocols'\n }\n );\n throw error;\n }\n\n private throwRegistrationError(data: { message: string }) {\n const error = new Error();\n error.name = ActilityErrorName.RegistrationError;\n error.message = data.message;\n throw error;\n }\n}\n","import { CdkStep } from '@angular/cdk/stepper';\nimport { Component } from '@angular/core';\nimport { AbstractControl, FormGroup } from '@angular/forms';\nimport {\n C8yStepper,\n GainsightService,\n gettext,\n ModalComponent,\n IconDirective,\n LoadingComponent,\n C8yStepperButtons,\n OperationResultComponent,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';\nimport { cloneDeep, uniq } from 'lodash-es';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\nimport { BehaviorSubject, defer, forkJoin, from, of, Subject, throwError } from 'rxjs';\nimport { catchError, map, mergeMap, shareReplay, switchMap, takeUntil } from 'rxjs/operators';\nimport {\n ActilityDeviceRegistration,\n PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION\n} from './actility-device-registration.model';\nimport {\n ActilityDeviceRegistrationService,\n ActilityErrorName\n} from './actility-device-registration.service';\nimport { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common';\n\ntype ActilityState =\n | 'loadPending'\n | 'loadSuccess'\n | 'loadError'\n | 'registrationPending'\n | 'registrationSuccess'\n | 'registrationError';\n@Component({\n selector: 'c8y-actility-registration',\n templateUrl: 'actility-device-registration.component.html',\n imports: [\n ModalComponent,\n IconDirective,\n NgIf,\n LoadingComponent,\n C8yStepper,\n CdkStep,\n FormlyModule,\n C8yStepperButtons,\n OperationResultComponent,\n NgFor,\n NgClass,\n C8yTranslatePipe,\n AsyncPipe\n ]\n})\nexport class ActilityDeviceRegistrationComponent {\n stepper: C8yStepper;\n registrationStepLabels = {\n next: gettext('Register')\n };\n finalStepLabels = {\n custom: gettext('Close')\n };\n\n state: ActilityState = 'loadPending';\n errors$ = new BehaviorSubject<Error[]>([]);\n errorMessages$ = this.errors$.pipe(\n map(errors => errors.map(error => error.message)),\n map(messages => uniq(messages))\n );\n\n connections$ = this.getConnections$();\n deviceProtocols$ = this.getDeviceProtocols$();\n unsubscribe$: Subject<void> = new Subject();\n load$ = this.connections$.pipe(\n catchError((error: Error) => of(error)),\n switchMap(connections => {\n if (\n connections instanceof Error &&\n connections.name === ActilityErrorName.NoConnectivitySettingsError\n ) {\n return of([connections]);\n }\n\n return forkJoin([\n of(connections),\n this.deviceProtocols$.pipe(catchError((error: Error) => of(error)))\n ]);\n }),\n map(results => results.filter(result => result instanceof Error)),\n switchMap(errors => (errors.length === 0 ? of([]) : throwError(errors)))\n );\n\n form = new FormGroup({});\n model = {} as ActilityDeviceRegistration;\n\n // Formly schema definition to render actility device registration form\n fields: FormlyFieldConfig[] = [\n {\n key: 'connection',\n type: 'typeahead',\n templateOptions: {\n label: gettext('Connection'),\n required: true,\n c8yForOptions: this.connections$,\n displayProperty: 'name',\n valueProperties: ['name']\n }\n },\n {\n key: 'deviceProfile',\n type: 'typeahead',\n templateOptions: {\n label: gettext('Device profile'),\n required: true,\n displayProperty: 'name',\n placeholder: 'IWM-LR3',\n valueProperties: ['id', 'name', 'typeMAC']\n },\n hooks: {\n onInit: field => {\n const connectionControl = field.form.get('connection');\n connectionControl.valueChanges\n .pipe(\n takeUntil(this.unsubscribe$),\n mergeMap(({ name }) => this.getDeviceProfiles$(name))\n )\n .subscribe(\n profiles => {\n field.templateOptions.c8yForOptions = of(profiles);\n field.formControl.setValue(null);\n },\n error => {\n field.form.get('deviceProfile').setErrors({ deviceProfile: true });\n field.validators.deviceProfile.message = error.message;\n }\n );\n }\n },\n validators: {\n deviceProfile: {\n expression: (control: AbstractControl) => {\n return control.status === 'VALID';\n },\n message: () => ''\n }\n }\n },\n {\n key: 'deviceType',\n type: 'typeahead',\n templateOptions: {\n label: gettext('Device protocol'),\n required: true,\n c8yForOptions: this.deviceProtocols$,\n displayProperty: 'name',\n valueProperties: ['id', 'name']\n }\n },\n {\n key: 'devEUI',\n type: 'input',\n templateOptions: {\n placeholder: '0018A20000000004',\n label: gettext('Device EUI'),\n required: true,\n pattern: '^([a-fA-F0-9]{16})$'\n },\n validation: {\n messages: {\n pattern: gettext('Must be a valid 16 digit hexadecimal number.')\n }\n }\n },\n {\n key: 'applicationEUI',\n type: 'input',\n templateOptions: {\n placeholder: '70B3D53260000003',\n label: gettext('Application EUI'),\n required: true,\n pattern: '^([a-fA-F0-9]{16})$'\n },\n validation: {\n messages: {\n pattern: gettext('Must be a valid 16 digit hexadecimal number.')\n }\n }\n },\n {\n key: 'applicationKey',\n type: 'input',\n templateOptions: {\n label: gettext('Application key'),\n placeholder: '258DB54023EA74F0D55085F7351737D0',\n required: true,\n pattern: '^([a-fA-F0-9]{32})$'\n },\n validation: {\n messages: {\n pattern: gettext('Must be a valid 32 digit hexadecimal number.')\n }\n }\n },\n {\n key: 'connectivityPlan',\n type: 'typeahead',\n templateOptions: {\n label: gettext('Connectivity plan'),\n description: gettext('Only connectivity plans with free slots are displayed'),\n required: true,\n placeholder: 'Dev-ope testing CP',\n displayProperty: 'name',\n valueProperties: ['id', 'ref', 'name', 'grantedConnections', 'usedConnections']\n },\n hooks: {\n onInit: field => {\n const connectionControl = field.form.get('connection');\n connectionControl.valueChanges\n .pipe(\n takeUntil(this.unsubscribe$),\n mergeMap(({ name }) => this.getConnectivityPlans$(name))\n )\n .subscribe(\n profiles => {\n field.templateOptions.c8yForOptions = of(profiles);\n field.formControl.setValue(null);\n },\n error => {\n field.form.get('connectivityPlan').setErrors({ connectivityPlan: true });\n field.validators.connectivityPlan.message = error.message;\n }\n );\n }\n },\n validators: {\n connectivityPlan: {\n expression: (control: AbstractControl) => {\n return control.status === 'VALID';\n },\n message: () => ''\n }\n }\n }\n ];\n\n constructor(\n public bsModalRef: BsModalRef,\n private registrationService: ActilityDeviceRegistrationService,\n private gainsightService: GainsightService\n ) {\n this.load$.subscribe(\n () => {\n this.state = 'loadSuccess';\n },\n errors => {\n this.state = 'loadError';\n this.errors$.next(errors);\n }\n );\n }\n\n getConnectivityPlans$(name) {\n return defer(() => from(this.registrationService.getConnectivityPlans(name))).pipe(\n shareReplay(1)\n );\n }\n\n getDeviceProfiles$(name) {\n return defer(() => from(this.registrationService.getDeviceProfiles(name))).pipe(shareReplay(1));\n }\n\n getDeviceProtocols$() {\n return defer(() => from(this.registrationService.getDeviceProtocols())).pipe(shareReplay(1));\n }\n\n getConnections$() {\n return defer(() => from(this.registrationService.getConnections())).pipe(shareReplay(1));\n }\n\n async register(event: { stepper: C8yStepper; step: CdkStep }) {\n event.stepper.next();\n this.state = 'registrationPending';\n try {\n const actilityDevice = this.getActilityDeviceToSend();\n await this.registrationService.register(actilityDevice);\n this.state = 'registrationSuccess';\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION.EVENT, {\n result: PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION.RESULT.SUCCESS,\n component: PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION.COMPONENT\n });\n } catch (error) {\n this.state = 'registrationError';\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION.EVENT, {\n result: PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION.RESULT.FAILURE,\n component: PRODUCT_EXPERIENCE_ACTILITY_REGISTRATION.COMPONENT\n });\n this.errors$.next([error]);\n }\n }\n\n getActilityDeviceToSend() {\n const actilityDevice: ActilityDeviceRegistration = cloneDeep(this.model);\n actilityDevice.lnsConnectionName = this.model.connection.name;\n delete (actilityDevice as any).connection;\n return actilityDevice;\n }\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n}\n","<c8y-modal\n [title]=\"'Actility LoRa registration' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [customFooter]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'c8y-device-connect'\"></span>\n </ng-container>\n\n <ng-container *ngIf=\"state === 'loadPending'; else registrationForm\">\n <div class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n </ng-container>\n\n <!--Formly schema is rendered-->\n <ng-template #registrationForm>\n <c8y-stepper\n [hideStepProgress]=\"true\"\n c8y-modal-body\n linear\n *ngIf=\"(errorMessages$ | async).length === 0; else errorMessagesPresent\"\n >\n <cdk-step [stepControl]=\"form\">\n <div class=\"p-b-16\">\n <p class=\"modal-subtitle sticky-top\">\n {{ 'Register a single Actility device' | translate }}\n </p>\n <formly-form\n class=\"formly-group-array-cols d-block p-l-24 p-r-24 p-t-16\"\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n ></formly-form>\n </div>\n\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n [labels]=\"registrationStepLabels\"\n (onNext)=\"register($event)\"\n (onCancel)=\"bsModalRef.hide()\"\n [showButtons]=\"{ cancel: true, next: true }\"\n [pending]=\"state === 'registrationPending'\"\n [disabled]=\"!form?.valid\"\n ></c8y-stepper-buttons>\n </cdk-step>\n <cdk-step state=\"final\">\n <!--success scenario-->\n <div\n class=\"p-16 text-center\"\n *ngIf=\"state === 'registrationPending'\"\n >\n <c8y-loading></c8y-loading>\n </div>\n <div class=\"m-24\">\n <c8y-operation-result\n class=\"lead m-b-0\"\n type=\"success\"\n *ngIf=\"state === 'registrationSuccess'\"\n text=\"{{ 'Device registered' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n ></c8y-operation-result>\n </div>\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n (onCustom)=\"bsModalRef.hide()\"\n [showButtons]=\"{ custom: true }\"\n [labels]=\"finalStepLabels\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n </ng-template>\n\n <!--Failure scenario-->\n <ng-template #errorMessagesPresent>\n <div class=\"m-24\">\n <c8y-operation-result\n class=\"lead\"\n type=\"error\"\n *ngIf=\"state === 'registrationError'\"\n text=\"{{ 'Failed to register' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n ></c8y-operation-result>\n <div\n class=\"m-b-8\"\n *ngFor=\"let msg of errorMessages$ | async\"\n data-cy=\"actility-device-registration.component--registration-error\"\n [ngClass]=\"{\n 'text-center': state === 'registrationError',\n 'alert alert-danger': state === 'loadError'\n }\"\n >\n <span [innerHTML]=\"msg | translate\"></span>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Close' | translate }}\"\n type=\"button\"\n (click)=\"bsModalRef.hide()\"\n >\n {{ 'Close' | translate }}\n </button>\n </div>\n </ng-template>\n</c8y-modal>\n","import { Component } from '@angular/core';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { ActilityDeviceRegistrationComponent } from './actility-device-registration.component';\nimport { IconDirective, C8yTranslatePipe } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-actility-registration-button',\n templateUrl: 'actility-device-registration-button.component.html',\n imports: [IconDirective, C8yTranslatePipe]\n})\nexport class ActilityDeviceRegistrationButtonComponent {\n constructor(private modalService: BsModalService) {}\n\n open() {\n this.modalService.show(ActilityDeviceRegistrationComponent, {\n class: 'modal-sm',\n ariaDescribedby: 'modal-body',\n ariaLabelledBy: 'modal-title',\n ignoreBackdropClick: true\n });\n }\n}\n","<button title=\"{{ 'Actility LoRa' | translate }}\" type=\"button\" (click)=\"open()\">\n <i c8yIcon=\"c8y-device-connect\"></i>\n {{ 'Actility LoRa' | translate }}\n</button>\n","import { Injectable } from '@angular/core';\nimport { TenantUiService } from '@c8y/ngx-components';\nimport { ActilityDeviceRegistrationButtonComponent } from './actility-device-registration-button.component';\nimport { RegisterDeviceFactory, RegisterDeviceItem } from '@c8y/ngx-components/register-device';\n@Injectable({\n providedIn: 'root'\n})\nexport class ActilityDeviceRegistrationFactory implements RegisterDeviceFactory {\n constructor(private tenantService: TenantUiService) {}\n\n get() {\n const actions: RegisterDeviceItem[] = [];\n if (this.tenantService.isMicroserviceSubscribedInCurrentTenant('actility')) {\n actions.push({\n template: ActilityDeviceRegistrationButtonComponent,\n priority: 99,\n category: 'single'\n } as RegisterDeviceItem);\n }\n return actions;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule, CoreModule } from '@c8y/ngx-components';\nimport { hookDeviceRegistration } from '@c8y/ngx-components/register-device';\nimport { ActilityDeviceRegistrationButtonComponent } from './actility-device-registration-button.component';\nimport { ActilityDeviceRegistrationFactory } from './actility-device-registration.factory';\nimport { ActilityDeviceRegistrationComponent } from './actility-device-registration.component';\nimport { ActilityDeviceRegistrationService } from './actility-device-registration.service';\n\n@NgModule({\n imports: [\n CoreModule,\n CommonModule,\n ActilityDeviceRegistrationButtonComponent,\n ActilityDeviceRegistrationComponent\n ],\n providers: [\n ActilityDeviceRegistrationService,\n hookDeviceRegistration(ActilityDeviceRegistrationFactory)\n ]\n})\nexport class ActilityDeviceRegistrationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.ActilityDeviceRegistrationService"],"mappings":";;;;;;;;;;;;;;;;;AAuCO,MAAM,wCAAwC,GAAG;AACtD,IAAA,KAAK,EAAE,oBAAoB;AAC3B,IAAA,SAAS,EAAE,uBAAuB;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,qBAAqB;CAChE;;ACzBV,IAAY,iBAUX;AAVD,CAAA,UAAY,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,0BAAA,CAAA,GAAA,0BAAqD;AACrD,IAAA,iBAAA,CAAA,qCAAA,CAAA,GAAA,qCAA2E;AAC3E,IAAA,iBAAA,CAAA,6BAAA,CAAA,GAAA,6BAA2D;AAC3D,IAAA,iBAAA,CAAA,2BAAA,CAAA,GAAA,2BAAuD;AACvD,IAAA,iBAAA,CAAA,uBAAA,CAAA,GAAA,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