@c8y/ngx-components 1017.0.63 → 1017.0.65

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ngx-components",
3
- "version": "1017.0.63",
3
+ "version": "1017.0.65",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "Angular modules for Cumulocity IoT applications",
@@ -22,7 +22,7 @@
22
22
  "rxjs": "~6.6.3"
23
23
  },
24
24
  "dependencies": {
25
- "@c8y/client": "1017.0.63",
25
+ "@c8y/client": "1017.0.65",
26
26
  "@ngx-translate/core": "14.0.0",
27
27
  "@ngx-translate/http-loader": "7.0.0",
28
28
  "@ngx-formly/core": "5.10.13",
@@ -1,10 +1,11 @@
1
- import { AfterContentInit, EventEmitter, OnInit } from '@angular/core';
1
+ import { AfterContentInit, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { IManagedObject, IResultList } from '@c8y/client';
3
- import { AdvancedSoftwareService, DeviceSoftware, DeviceSoftwareChange, FilterCriteria } from '@c8y/ngx-components/repository/shared';
3
+ import { DeviceSoftware, DeviceSoftwareChange, FilterCriteria } from '@c8y/ngx-components/repository/shared';
4
4
  import { Observable } from 'rxjs';
5
+ import { DeviceSoftwareService } from './device-software.service';
5
6
  import * as i0 from "@angular/core";
6
- export declare class DeviceSoftwareListComponent implements OnInit, AfterContentInit {
7
- private advancedSoftwareService;
7
+ export declare class DeviceSoftwareListComponent implements OnInit, AfterContentInit, OnDestroy {
8
+ private deviceSoftwareService;
8
9
  PRODUCT_EXPERIENCE: {
9
10
  SOFTWARE: {
10
11
  EVENTS: {
@@ -71,12 +72,12 @@ export declare class DeviceSoftwareListComponent implements OnInit, AfterContent
71
72
  supportsSoftwareOperations: boolean;
72
73
  private readonly operationTypes;
73
74
  private legacySoftwareList$;
74
- constructor(advancedSoftwareService: AdvancedSoftwareService);
75
+ private destroyed$;
76
+ constructor(deviceSoftwareService: DeviceSoftwareService);
75
77
  ngOnInit(): void;
76
78
  ngAfterContentInit(): void;
77
79
  isSoftwareGoingToBeChanged(software: DeviceSoftware): boolean;
78
- private getAdvancedSoftwareList;
79
- private getLegacySoftwareList;
80
+ ngOnDestroy(): void;
80
81
  private notifyListEmpty;
81
82
  static ɵfac: i0.ɵɵFactoryDeclaration<DeviceSoftwareListComponent, never>;
82
83
  static ɵcmp: i0.ɵɵComponentDeclaration<DeviceSoftwareListComponent, "c8y-device-software-list", never, { "softwareList": "softwareList"; "device": "device"; "deviceSoftwareChanges": "deviceSoftwareChanges"; "filterCriteria$": "filterCriteria$"; }, { "update": "update"; "remove": "remove"; "onListEmpty": "onListEmpty"; }, never, [".c8y-empty-state:not(.c8y-no-results-state)", ".c8y-no-results-state"], false>;
@@ -0,0 +1,33 @@
1
+ import { IResultList } from '@c8y/client';
2
+ import { AdvancedSoftwareService, DeviceSoftware, FilterCriteria } from '@c8y/ngx-components/repository/shared';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DeviceSoftwareService {
6
+ private advancedSoftwareService;
7
+ /**
8
+ * Indicates whether device software data is currently being loaded.
9
+ */
10
+ get loading$(): Observable<boolean>;
11
+ private reloadSubject$;
12
+ private loadingSubject$;
13
+ constructor(advancedSoftwareService: AdvancedSoftwareService);
14
+ /**
15
+ * Trigger device software data reload.
16
+ */
17
+ reload(): void;
18
+ /**
19
+ * Retrieves the software list that is installed on a given device.
20
+ *
21
+ * @param deviceId ID of the device to retrieve software data for
22
+ * @param filterCriteria Criteria that software items are filtered by.
23
+ * @param legacySoftwareList If provided no data will be fetched from backend. The provided software list
24
+ * will be filtered by the specified filter criteria.
25
+ *
26
+ * @returns The software items installed on the specified device filtered by the specified criteria.
27
+ */
28
+ getSoftwareList(deviceId: any, filterCriteria: FilterCriteria, legacySoftwareList?: DeviceSoftware[]): Observable<IResultList<DeviceSoftware>>;
29
+ private getAdvancedSoftwareList;
30
+ private getLegacySoftwareList;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<DeviceSoftwareService, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<DeviceSoftwareService>;
33
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './device-software-changes.component';
2
2
  export * from './device-software-list.component';
3
+ export * from './device-software.service';
3
4
  export * from './installed-software.component';
4
5
  export * from './software-device-tab.component';
5
6
  export * from './software-device-tab.guard';
@@ -3,11 +3,13 @@ import { ActivatedRoute } from '@angular/router';
3
3
  import { IManagedObject, InventoryService, IOperation } from '@c8y/client';
4
4
  import { AdvancedSoftwareService, DeviceSoftware, DeviceSoftwareChange, RepositoryService } from '@c8y/ngx-components/repository/shared';
5
5
  import { BehaviorSubject, Observable } from 'rxjs';
6
+ import { DeviceSoftwareService } from './device-software.service';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class SoftwareDeviceTabComponent implements OnInit {
8
9
  private route;
9
10
  private repository;
10
11
  private inventory;
12
+ private deviceSoftwareService;
11
13
  private advancedSoftwareService;
12
14
  deviceId: string | number;
13
15
  device$: BehaviorSubject<IManagedObject>;
@@ -18,7 +20,7 @@ export declare class SoftwareDeviceTabComponent implements OnInit {
18
20
  changesInProgress$: Observable<boolean>;
19
21
  reloading: boolean;
20
22
  showSoftwareChanges: boolean;
21
- constructor(route: ActivatedRoute, repository: RepositoryService, inventory: InventoryService, advancedSoftwareService: AdvancedSoftwareService);
23
+ constructor(route: ActivatedRoute, repository: RepositoryService, inventory: InventoryService, deviceSoftwareService: DeviceSoftwareService, advancedSoftwareService: AdvancedSoftwareService);
22
24
  ngOnInit(): Promise<void>;
23
25
  addChanges(requestedChanges: DeviceSoftwareChange[]): void;
24
26
  dropChange(changeToBeDropped: DeviceSoftwareChange): void;