@c8y/ngx-components 1024.18.0 → 1024.18.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/fesm2022/c8y-ngx-components-actility-device-registration.mjs +1 -1
  2. package/fesm2022/c8y-ngx-components-actility-device-registration.mjs.map +1 -1
  3. package/fesm2022/c8y-ngx-components-asset-properties.mjs +67 -20
  4. package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
  5. package/fesm2022/c8y-ngx-components-assets-navigator.mjs +75 -13
  6. package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
  7. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +2 -4
  8. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs.map +1 -1
  9. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +6 -8
  10. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +98 -19
  12. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +4 -4
  14. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +7 -7
  16. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +5 -3
  18. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  20. package/fesm2022/c8y-ngx-components-echart.mjs +52 -7
  21. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  22. package/fesm2022/c8y-ngx-components-ecosystem.mjs +1 -1
  23. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  24. package/fesm2022/c8y-ngx-components-file-preview.mjs +2 -2
  25. package/fesm2022/c8y-ngx-components-file-preview.mjs.map +1 -1
  26. package/fesm2022/c8y-ngx-components-icon-selector.mjs +6 -6
  27. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  28. package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +1 -1
  29. package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs.map +1 -1
  30. package/fesm2022/c8y-ngx-components-operation-picker.mjs +2 -2
  31. package/fesm2022/c8y-ngx-components-operation-picker.mjs.map +1 -1
  32. package/fesm2022/c8y-ngx-components-register-device.mjs +4 -4
  33. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  34. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +2 -3
  35. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
  36. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +2 -2
  37. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -1
  38. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +2 -2
  39. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -1
  40. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +2 -4
  41. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -1
  42. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +2 -3
  43. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -1
  44. package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +1 -1
  45. package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs.map +1 -1
  46. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +2 -2
  47. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
  48. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +3 -4
  49. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-widgets-definitions-scada.mjs +10 -1
  51. package/fesm2022/c8y-ngx-components-widgets-definitions-scada.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +4 -4
  53. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +18 -3
  55. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +1 -1
  57. package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
  58. package/fesm2022/c8y-ngx-components.mjs +59 -19
  59. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  60. package/locales/de.po +35 -20
  61. package/locales/es.po +35 -21
  62. package/locales/fr.po +35 -21
  63. package/locales/ja_JP.po +33 -20
  64. package/locales/ko.po +34 -21
  65. package/locales/locales.pot +1 -1
  66. package/locales/nl.po +35 -21
  67. package/locales/pl.po +34 -21
  68. package/locales/pt_BR.po +34 -21
  69. package/locales/zh_CN.po +34 -20
  70. package/locales/zh_TW.po +35 -21
  71. package/package.json +1 -1
  72. package/types/c8y-ngx-components-asset-properties.d.ts +9 -1
  73. package/types/c8y-ngx-components-asset-properties.d.ts.map +1 -1
  74. package/types/c8y-ngx-components-assets-navigator.d.ts +30 -3
  75. package/types/c8y-ngx-components-assets-navigator.d.ts.map +1 -1
  76. package/types/c8y-ngx-components-branding-shared-lazy-add-branding-modal.d.ts.map +1 -1
  77. package/types/c8y-ngx-components-context-dashboard.d.ts +44 -1
  78. package/types/c8y-ngx-components-context-dashboard.d.ts.map +1 -1
  79. package/types/c8y-ngx-components-echart-models.d.ts +9 -0
  80. package/types/c8y-ngx-components-echart-models.d.ts.map +1 -1
  81. package/types/c8y-ngx-components-echart.d.ts +32 -5
  82. package/types/c8y-ngx-components-echart.d.ts.map +1 -1
  83. package/types/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.d.ts.map +1 -1
  84. package/types/c8y-ngx-components-widgets-implementations-datapoints-graph.d.ts +6 -0
  85. package/types/c8y-ngx-components-widgets-implementations-datapoints-graph.d.ts.map +1 -1
  86. package/types/c8y-ngx-components.d.ts +50 -2
  87. package/types/c8y-ngx-components.d.ts.map +1 -1
@@ -462,7 +462,7 @@ class ActilityDeviceRegistrationComponent {
462
462
  this.unsubscribe$.complete();
463
463
  }
464
464
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ActilityDeviceRegistrationComponent, deps: [{ token: i1$1.BsModalRef }, { token: ActilityDeviceRegistrationService }, { token: i3.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
465
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: ActilityDeviceRegistrationComponent, isStandalone: true, selector: "c8y-actility-registration", ngImport: i0, template: "<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", dependencies: [{ kind: "component", type: ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "progressLabel", "message"] }, { kind: "component", type: C8yStepper, selector: "c8y-stepper", inputs: ["disableDefaultIcons", "disableProgressButtons", "customClasses", "hideStepProgress", "useStepLabelsAsTitlesOnly"], outputs: ["onStepChange"] }, { kind: "component", type: CdkStep, selector: "cdk-step", inputs: ["stepControl", "label", "errorMessage", "aria-label", "aria-labelledby", "state", "editable", "optional", "completed", "hasError"], outputs: ["interacted"], exportAs: ["cdkStep"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "component", type: C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "component", type: OperationResultComponent, selector: "c8y-operation-result", inputs: ["text", "vertical", "size", "type"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
465
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: ActilityDeviceRegistrationComponent, isStandalone: true, selector: "c8y-actility-registration", ngImport: i0, template: "<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", dependencies: [{ kind: "component", type: ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "flushBody", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "progressLabel", "message"] }, { kind: "component", type: C8yStepper, selector: "c8y-stepper", inputs: ["disableDefaultIcons", "disableProgressButtons", "customClasses", "hideStepProgress", "useStepLabelsAsTitlesOnly"], outputs: ["onStepChange"] }, { kind: "component", type: CdkStep, selector: "cdk-step", inputs: ["stepControl", "label", "errorMessage", "aria-label", "aria-labelledby", "state", "editable", "optional", "completed", "hasError"], outputs: ["interacted"], exportAs: ["cdkStep"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "component", type: C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "component", type: OperationResultComponent, selector: "c8y-operation-result", inputs: ["text", "vertical", "size", "type"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
466
466
  }
467
467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ActilityDeviceRegistrationComponent, decorators: [{
468
468
  type: Component,
@@ -1 +1 @@
1
- {"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 { gettext } from '@c8y/ngx-components/gettext';\nimport { AppStateService, OptionsService } 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, ChangeDetectionStrategy } from '@angular/core';\nimport { AbstractControl, FormGroup } from '@angular/forms';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n C8yStepper,\n GainsightService,\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 changeDetection: ChangeDetectionStrategy.Eager\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, ChangeDetectionStrategy } 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 changeDetection: ChangeDetectionStrategy.Eager\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;;ACxBV,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,uBAA+C;AAC/C,IAAA,iBAAA,CAAA,0BAAA,CAAA,GAAA,0BAAqD;AACrD,IAAA,iBAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD;AACjD,IAAA,iBAAA,CAAA,2BAAA,CAAA,GAAA,2BAAuD;AACvD,IAAA,iBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACzC,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;MAahB,iCAAiC,CAAA;IAS5C,WAAA,CACU,gBAAkC,EAClC,MAAmB,EACnB,gBAAkC,EAClC,kBAAsC,EACtC,cAA8B,EAC9B,QAAyB,EAAA;QALzB,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,I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C;YACzC,mCAAmC,CAAA,EAAA,CAAA,CAAA;AAO1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,EAAA,SAAA,EALhC;YACT,iCAAiC;YACjC,sBAAsB,CAAC,iCAAiC;AACzD,SAAA,EAAA,OAAA,EAAA,CARC,UAAU;YACV,YAAY;YAEZ,mCAAmC,CAAA,EAAA,CAAA,CAAA;;4FAO1B,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAZ5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,UAAU;wBACV,YAAY;wBACZ,yCAAyC;wBACzC;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT,iCAAiC;wBACjC,sBAAsB,CAAC,iCAAiC;AACzD;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"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 { gettext } from '@c8y/ngx-components/gettext';\nimport { AppStateService, OptionsService } 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, ChangeDetectionStrategy } from '@angular/core';\nimport { AbstractControl, FormGroup } from '@angular/forms';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n C8yStepper,\n GainsightService,\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 changeDetection: ChangeDetectionStrategy.Eager\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, ChangeDetectionStrategy } 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 changeDetection: ChangeDetectionStrategy.Eager\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;;ACxBV,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,uBAA+C;AAC/C,IAAA,iBAAA,CAAA,0BAAA,CAAA,GAAA,0BAAqD;AACrD,IAAA,iBAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD;AACjD,IAAA,iBAAA,CAAA,2BAAA,CAAA,GAAA,2BAAuD;AACvD,IAAA,iBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACzC,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;MAahB,iCAAiC,CAAA;IAS5C,WAAA,CACU,gBAAkC,EAClC,MAAmB,EACnB,gBAAkC,EAClC,kBAAsC,EACtC,cAA8B,EAC9B,QAAyB,EAAA;QALzB,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,gBAAg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,YAVzC,UAAU;YACV,YAAY;YACZ,yCAAyC;YACzC,mCAAmC,CAAA,EAAA,CAAA,CAAA;AAO1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,EAAA,SAAA,EALhC;YACT,iCAAiC;YACjC,sBAAsB,CAAC,iCAAiC;AACzD,SAAA,EAAA,OAAA,EAAA,CARC,UAAU;YACV,YAAY;YAEZ,mCAAmC,CAAA,EAAA,CAAA,CAAA;;4FAO1B,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAZ5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,UAAU;wBACV,YAAY;wBACZ,yCAAyC;wBACzC;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT,iCAAiC;wBACjC,sBAAsB,CAAC,iCAAiC;AACzD;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -957,6 +957,29 @@ class AssetPropertiesService {
957
957
  }
958
958
  return false;
959
959
  }
960
+ /**
961
+ * Checks whether two properties refer to the same logical property, identified by
962
+ * name, nested keyPath and (for computed properties) instanceId.
963
+ * @param property1 First property to compare.
964
+ * @param property2 Second property to compare.
965
+ * @returns True if both refer to the same logical property.
966
+ */
967
+ isSameProperty(property1, property2) {
968
+ if (property1.name !== property2.name) {
969
+ return false;
970
+ }
971
+ const path1 = property1.keyPath?.join('.');
972
+ const path2 = property2.keyPath?.join('.');
973
+ if (path1 !== path2) {
974
+ return false;
975
+ }
976
+ // Computed properties can be selected multiple times with different configs, so they
977
+ // are only the same when their generated instanceId matches.
978
+ if (property1.computed || property2.computed) {
979
+ return property1.instanceId === property2.instanceId;
980
+ }
981
+ return true;
982
+ }
960
983
  /**
961
984
  * Retrieves custom properties from the properties library, optionally filtered by search text.
962
985
  * @param searchText Optional search text to filter properties.
@@ -2127,7 +2150,7 @@ class AssetPropertyListComponent {
2127
2150
  property.config = configs[0];
2128
2151
  return true;
2129
2152
  }
2130
- catch (err) {
2153
+ catch {
2131
2154
  return false;
2132
2155
  }
2133
2156
  }
@@ -2488,9 +2511,9 @@ class AssetPropertyListComponent {
2488
2511
  }
2489
2512
  }
2490
2513
  else {
2491
- // Multi or plus mode - iterate through all nodes
2514
+ // Multi or plus mode - iterate through all nodes.
2492
2515
  this.dataSource.data.forEach(node => {
2493
- const matchingNode = selectedPropertiesToApply.find(configProperty => this.assetPropertiesService.propertiesMatch(node.property, configProperty));
2516
+ const matchingNode = selectedPropertiesToApply.find(configProperty => this.assetPropertiesService.isSameProperty(node.property, configProperty));
2494
2517
  if (matchingNode) {
2495
2518
  this.onSelectMulti(true, node, false);
2496
2519
  }
@@ -2975,6 +2998,12 @@ class AssetPropertyTabsComponent {
2975
2998
  this.selectedRegularProperties = [];
2976
2999
  this.selectedComputedProperties = [];
2977
3000
  }
3001
+ // Check if a selected property exist in the tab and determine if it has been deselected in the current tab
3002
+ const deselectedInCurrentTab = (property) => this.displayedProperties.some(displayed => this.assetPropertiesService.isSameProperty(displayed, property)) &&
3003
+ !properties.some(selected => this.assetPropertiesService.isSameProperty(selected, property));
3004
+ this.selectedAssetProperties = this.selectedAssetProperties.filter(property => !deselectedInCurrentTab(property));
3005
+ this.selectedRegularProperties = this.selectedRegularProperties.filter(property => !deselectedInCurrentTab(property));
3006
+ this.selectedComputedProperties = this.selectedComputedProperties.filter(property => !deselectedInCurrentTab(property));
2978
3007
  // Update the selected properties for the current tab
2979
3008
  if (this.selectedTab === 'asset') {
2980
3009
  this.selectedAssetProperties = cloneDeep(properties);
@@ -2989,7 +3018,8 @@ class AssetPropertyTabsComponent {
2989
3018
  ...this.selectedAssetProperties,
2990
3019
  ...this.selectedRegularProperties,
2991
3020
  ...this.selectedComputedProperties
2992
- ];
3021
+ ].filter((property, index, all) => all.findIndex(other => this.assetPropertiesService.isSameProperty(other, property)) ===
3022
+ index);
2993
3023
  this.selectedPropertiesChange.emit(cloneDeep(allSelected));
2994
3024
  }
2995
3025
  onTabChange(tabName) {
@@ -3101,20 +3131,17 @@ class AssetPropertyTabsComponent {
3101
3131
  this.updateConfigWithCurrentTabSelections();
3102
3132
  }
3103
3133
  /**
3104
- * Updates the config to show only the current tab's selected properties.
3134
+ * Updates the config with the selected properties of all tabs.
3105
3135
  */
3106
3136
  updateConfigWithCurrentTabSelections() {
3107
- let currentTabSelections = [];
3108
- if (this.selectedTab === 'asset') {
3109
- currentTabSelections = this.selectedAssetProperties;
3110
- }
3111
- else if (this.selectedTab === 'regular') {
3112
- currentTabSelections = this.selectedRegularProperties;
3113
- }
3114
- else {
3115
- currentTabSelections = this.selectedComputedProperties;
3116
- }
3117
- this.config = { ...this.config, selectedProperties: currentTabSelections };
3137
+ this.config = {
3138
+ ...this.config,
3139
+ selectedProperties: [
3140
+ ...this.selectedAssetProperties,
3141
+ ...this.selectedRegularProperties,
3142
+ ...this.selectedComputedProperties
3143
+ ]
3144
+ };
3118
3145
  }
3119
3146
  /**
3120
3147
  * Categorizes incoming selectedProperties by matching them against loaded properties.
@@ -3126,20 +3153,40 @@ class AssetPropertyTabsComponent {
3126
3153
  const assetSelected = [];
3127
3154
  const regularSelected = [];
3128
3155
  const computedSelected = [];
3156
+ // Snapshot the current per-tab assignments so a property already placed in a tab (e.g. the
3157
+ // one the user just picked it on) keeps that tab on re-categorization. The same property
3158
+ // name can appear in more than one tab (a default like `name` is both an asset property and
3159
+ // a custom property)
3160
+ const previousAsset = this.selectedAssetProperties;
3161
+ const previousRegular = this.selectedRegularProperties;
3162
+ const previousComputed = this.selectedComputedProperties;
3163
+ const belongsTo = (bucket, prop) => bucket.some(existing => this.assetPropertiesService.isSameProperty(existing, prop));
3129
3164
  for (const selectedProp of this.selectedProperties) {
3130
- // Check if it's in asset properties
3131
- const inAsset = this.assetProperties.some(prop => this.assetPropertiesService.propertiesMatch(prop, selectedProp));
3165
+ // Keep the property in the tab it already belongs to.
3166
+ if (belongsTo(previousAsset, selectedProp)) {
3167
+ assetSelected.push(selectedProp);
3168
+ continue;
3169
+ }
3170
+ if (belongsTo(previousComputed, selectedProp)) {
3171
+ computedSelected.push(selectedProp);
3172
+ continue;
3173
+ }
3174
+ if (belongsTo(previousRegular, selectedProp)) {
3175
+ regularSelected.push(selectedProp);
3176
+ continue;
3177
+ }
3178
+ const inAsset = this.assetProperties.some(prop => this.assetPropertiesService.isSameProperty(prop, selectedProp));
3132
3179
  if (inAsset) {
3133
3180
  assetSelected.push(selectedProp);
3134
3181
  continue;
3135
3182
  }
3136
- const inComputed = this.computedProperties.some(prop => this.assetPropertiesService.propertiesMatch(prop, selectedProp));
3183
+ const inComputed = this.computedProperties.some(prop => this.assetPropertiesService.isSameProperty(prop, selectedProp));
3137
3184
  if (inComputed) {
3138
3185
  computedSelected.push(selectedProp);
3139
3186
  continue;
3140
3187
  }
3141
3188
  // Check if it's in regular properties
3142
- const inRegular = this.regularProperties.some(prop => this.assetPropertiesService.propertiesMatch(prop, selectedProp));
3189
+ const inRegular = this.regularProperties.some(prop => this.assetPropertiesService.isSameProperty(prop, selectedProp));
3143
3190
  if (inRegular) {
3144
3191
  regularSelected.push(selectedProp);
3145
3192
  continue;